Ch4derivativesA06.mws
Thu Oct 6 08:01:01 MDT 2005
Housekeeping Commands
| > | restart; |
| > | with(plots, display, implicitplot): |
| > | with(plottools, disk): |
Section 4.1 - Maple and limit and Limit
Here are some limits which don't present as difference quotients:
| > | CompInt := n -> (1+1/n)^n; |
| > | FarOut := Limit( CompInt(k), k=infinity); "Inert form" |
| > | value(FarOut); "value" helps evaluate "algebraically" |
| > | evalf(%, 14); |
################################################################
| > | divot := x -> (x^3-125)/(x-5); |
| > | divot(5); |
Error, (in divot) numeric exception: division by zero
| > | limit( divot(x), x=5); Flying a bit blinded. |
################################################################
| > | InDet := n -> (1-3/n)^n; |
| > | Limit( InDet(i), i = infinity); |
| > | value(%); |
#################################################################
Here's a difference-quotient limit such as appears on page 55-56:
| > | NQ := (f,t,k) -> ( f(t+k) - f(t) )/k; |
| > | NQ(sin,Pi/2,Pi); NQ(exp,-1/100,2/100); evalf(%); |
| > | gg := x -> (x+3)/(x-5); |
| > | Limit( NQ(gg,x,h), h=0); |
| > | DerivExpr := value(%); |
| > | ggPRIME := unapply(DerivExpr, x); |
| > | POTx := 2: |
| > |
| > | POT := [POTx, gg(POTx)]; |
| > | M_tan := ggPRIME( POT[1] ); |
| > | TanLinEqn := y = POT[2] + M_tan*( x - POT[1] ); |
#################################################################
Now build the sequence of plot structures to show tangency:
| > | P := disk( POT, 1/25, colour=BLACK): |
| > | delta := 3/2; epsilon := 1; |
| > | XRG := POT[1]-delta..POT[1]+delta; |
| > | YRG := POT[2]-epsilon..POT[2]+epsilon; |
| > | P := P, plot(gg, XRG, YRG): |
| > | P := P, implicitplot(TanLinEqn, x=XRG, y=YRG, colour=black): |
| > | display([P], scaling=CONSTRAINED); |
Section 4.2 on Derivatives of Maple Functions
| > | gg(x); |
| > | ggp := D(gg); ggpp := D(ggp); |
| > | simplify( ggp(t) ); |
| > | TangentLineSlope := ggp(POTx); |
##################################################################
| > | D(p*q); |
| > | D(p/q); simplify(%); |
| > | D(p^2); |
| > | D(p@q); |
| > | (D@@2)(p*g); (D@@3)(p*g); |
#####################################################################
| > | LISTfun := [ln,sin,cos,x -> gg(2*x),exp, t -> exp(2*t)*cos(3*t)]; |
| > | LISTders := map(D, LISTfun); |
| > | LISTders[nops(LISTders)](0); |
| > |
4.3 on derivatives of Maple expressions
| > | fexpr := x*sin( exp(3*x) ); |
| > | diff(fexpr,x); |
4.4 - Maple Implicit Differentiation is Different Nowadays
As with LeastSquares, Maple has done some work to ease implicit differentiation, so section 4.4 of our text is a bit out of date. Here we demo the new "implicitdiff" command:
| > | CUBIC := x^3 + y^3 = 6*x*y - 3; Slightly different from page 61. |
| > | yPRIME := implicitdiff(CUBIC,y,x); |
| > | yp := unapply(yPRIME,x,y); |
| > | TanSlope := yp(1,2); |
| > | TanLineEqn := y-2 = TanSlope*(x-1); |
| > | implicitplot([CUBIC,TanLineEqn],x=-3..3,y=-3..3,colour=[BLACK,RED]); |
Assignment #6
Here are the problems for Assignment #6, due Thursday, 10/13/05.
Page 66:
1(c) -- Be sure to use
as they say.
3 -- make a blob for the point of tangency as well.
5
6
12
16 -- use "implicitdiff" rather than the text's methods
| > | ############################################################## |