{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Tim es" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Error" -1 8 1 {CSTYLE "" -1 -1 "Courier" 1 10 255 0 255 1 2 2 2 2 2 1 1 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Plot" -1 13 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Title" -1 18 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 }3 1 0 0 12 12 1 0 1 0 2 2 19 1 }{PSTYLE "Author" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 8 8 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 56 "Secant Lines, Tangent Lin es, Derivatives(\"D\" and \"diff\")" }}{PARA 256 "" 0 "" {TEXT -1 262 "In this lab we investigate the relationship between secant lines and \+ average rates of change, tangent lines and instantaneous rates of chan ge, how Maple can aid in the limiting process that connects these two \+ concepts, and finally the derivative of a function. " }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 47 "Plotting Secant Lines / Average rates of \+ change" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 685 "As we discussed in clas s, the tangent line to a graph of f(x) at x = a , has slope describing the instantaneous rate of change of y with respect to x, at x = a. We further illustrated that this tangent line can be considered the limi ting case of a converging sequence of secant lines. Furthermore, the slope of a secant line gives the average rate of change of y with res pect to x over an interval. Therefore, the slope of the tangent lin e (the derivative) at x = a, is the limiting value of a converging seq uence of average rates of change, leading to an instantaneous rate of \+ change. In this section we illustrate this concept graphically. Firs t we define the function f(x) = " }{XPPEDIT 18 0 "(x-2)^2;" "6#*$,&%\" xG\"\"\"\"\"#!\"\"F'" }{TEXT -1 8 " + 1 by:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "f := x -> (x-2)^2 + 1;" }{TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fGf*6#%\"xG6\"6$%)operatorG%&arrowGF(,&*$), &9$\"\"\"\"\"#!\"\"F2F1F1F1F1F(F(F(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 322 "The goal is to plot a sequence of secant lines that approaches the tangent line of f(x) at x = 2. Using the point slope definition \+ of a line, the secant line through (2, f(2)) and (2+h, f(2+h)) is des cribed by y - y(2) = m (x - 2), where m (slope) is determined from th e two points. Writing this as a function yields: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 " \+ f(x) = " }{XPPEDIT 18 0 "(f(2+h)-f(2))/h;" "6#*&,&-%\"fG6 #,&\"\"#\"\"\"%\"hGF*F*-F&6#F)!\"\"F*F+F." }{TEXT -1 16 " (x - 2) + f( 2)." }}{PARA 0 "" 0 "" {TEXT -1 182 "We now define a function of two v ariables, x and h, that describes the secant line. I make it a funct ion of two variables just so that I don't have to re-enter different v alues of " }{TEXT 259 0 "" }{TEXT -1 4 " h. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "secf2h := (x,h) -> (f(2 + h) - f(2))/h *(x - 2) \+ + f(2);" }{TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'secf2hGf* 6$%\"xG%\"hG6\"6$%)operatorG%&arrowGF),&*(,&-%\"fG6#,&\"\"#\"\"\"9%F5F 5-F16#F4!\"\"F5F6F9,&9$F5F4F9F5F5F7F5F)F)F)" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 117 "This cryptic notation is for \"sec\"ant line of \"f\" \+ at x = \"2\" for step size \"h\". You may call it anything you want. \+ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "plot([secf2h(x,2), sec f2h(x,1), secf2h(x,.5), secf2h(x,.1), f(x)], x = 0 .. 4);" }{TEXT -1 0 "" }}{PARA 13 "" 1 "" {GLPLOT2D 400 300 300 {PLOTDATA 2 "6)-%'CURVES G6$7S7$$\"\"!F)$!\"$F)7$$\"3Hmmmm;')=()!#>$!3ommmmFiDG!#<7$$\"3RLLLe'4 0j\"!#=$!35LLLo!)*Qn#F27$$\"3mmmm;6m$[#F6$!3nmmmwxE.DF27$$\"3fmmm;yYUL F6$!3YmmmOk]JBF27$$\"3%HLL$eF>(>%F6$!3_LLL[9cg@F27$$\"3Qmmm\">K'*)\\F6 $!3smmmhN2-?F27$$\"3P*****\\Kd,\"eF6$!37+++N&oz$=F27$$\"3-mmm\"fX(emF6 $!3!omm;)3Do;F27$$\"3.*****\\U7Y](F6$!3?+++:v2*\\\"F27$$\"3'QLLLV!pu$) F6$!3BLLL8>1D8F27$$\"3xmmm;c0T\"*F6$!3kmmmw))yr6F27$$\"3#*******H,Q+5F 2$!3a,+++uR#***F67$$\"3)*******\\*3q3\"F2$!3_++++5#)f#)F67$$\"3)****** *p=\\q6F2$!3?++++E;!f'F67$$\"3mmm;fBIY7F2$!3)pmmm\"G&R2&F67$$\"3GLLLj$ [kL\"F2$!3WMLLLF.rKF67$$\"3?LLL`Q\"GT\"F2$!3%fLLL$HsVF2$\"3Gmmm;^Yi#)F67$$\"3im mmTc-)*>F2$\"3gKLLLG^g**F67$$\"3Mmm;f`@'3#F2$\"3oKLL=2Vs6F27$$\"3y**** \\nZ)H;#F2$\"3f*****\\`pfK\"F27$$\"3YmmmJy*eC#F2$\"3!HLLLm&z\"\\\"F27$ $\"3')******R^bJBF2$\"3s******z-6j;F27$$\"3f*****\\5a`T#F2$\"3<******4 #32$=F27$$\"3o****\\7RV'\\#F2$\"3O*****\\#y'G*>F27$$\"3k*****\\@fke#F2 $\"3G******H%=H<#F27$$\"3/LLL`4NnEF2$\"35mmm1>qMBF27$$\"3#*******\\,s` FF2$\"3%)*******HSu]#F27$$\"3[mm;zM)>$GF2$\"3'HLL$ep'Rm#F27$$\"3$***** **pfa4NGF27$$\"3#HLLeg`!)*HF2$\"3#emm;@2h*HF27$$\"3w ****\\#G2A3$F2$\"3]*****\\c9W;$F27$$\"3;LLL$)G[kJF2$\"3Lmmmmd'*GLF27$$ \"3#)****\\7yh]KF2$\"3j*****\\iN7]$F27$$\"3xmmm')fdLLF2$\"3aLLLt>:nOF2 7$$\"3bmmm,FT=MF2$\"35LLL.a#o$QF27$$\"3FLL$e#pa-NF2$\"3ammm^Q40SF27$$ \"3!*******Rv&)zNF2$\"3y******z]rfTF27$$\"3ILLLGUYoOF2$\"3gmmmc%GpL%F2 7$$\"3_mmm1^rZPF2$\"3/LLL8-V&\\%F27$$\"34++]sI@KQF2$\"3=+++XhUkYF27$$ \"34++]2%)38RF2$\"3=+++:o$=F27$Fev$\"3$*******pfa<>F27$Fjv$\"3#HLLeg`!)*>F27$F_w$\"3w****\\#G 2A3#F27$Fdw$\"3;LLL$)G[k@F27$Fiw$\"3#)****\\7yh]AF27$F^x$\"3xmmm')fdLB F27$Fcx$\"3bmmm,FT=CF27$Fhx$\"3FLL$e#pa-DF27$F]y$\"3!*******Rv&)zDF27$ Fby$\"3ILLLGUYoEF27$Fgy$\"3_mmm1^rZFF27$F\\z$\"34++]sI@KGF27$Faz$\"34+ +]2%)38HF27$Ffz$\"\"$F)-F[[l6&F][lF(F^[lF(-F$6$7S7$F(F(7$F-$\"39LLLL3V fVF/7$F4$\"3'pmm;H[D:)F/7$F:$\"3LLLLe0$=C\"F67$F?$\"3ILLL3RBr;F67$FD$ \"3Ymm;zjf)4#F67$FI$\"3=LL$e4;[\\#F67$FN$\"3p****\\i'y]!HF67$FS$\"3,LL $ezs$HLF67$FX$\"3_****\\7iI_PF67$Fgn$\"3#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\\z$\"3=++D28A$=\"F27$Fa z$\"33++vS)38>\"F27$Ffz$\"3;+++++++7F2-F[[l6&F][lF(F(F^[l-F$6$7S7$F(Fh z7$F-$\"3yz&4#)QZ)eYF27$F4$\"3S\\e7aF27$Ffo$\"3U-,QdEbL=F27$F[p$\"3 )o4Oxt$3)o\"F27$F`p$\"3YKxzL,1o:F27$Fep$\"337I_u2IS9F27$Fjp$\"3J[s$3d( yW8F27$F_q$\"3EINwLwN[7F27$Feq$\"3)3!*RKWoh<\"F27$Fjq$\"35v^w@:>66F27$ F_r$\"3M$*>9#z`J1\"F27$Fdr$\"3!oP4j*)>u-\"F27$Fir$\"3N+qnova25F27$F^s$ \"3NG34)*Q++5F27$Fcs$\"3APi:)3Lu+\"F27$Fhs$\"3/HqVMScE5F27$F]t$\"3?o$= Oul/1\"F27$Fbt$\"3]>/'3\")G*46F27$Fgt$\"3s].aK!>D<\"F27$F\\u$\"3Od+[Hm WY7F27$Fau$\"3p:%e3TMRM\"F27$Ffu$\"3]3\\\"\\Hd`W\"F27$F[v$\"3SAg^kS4o: F27$F`v$\"3)4F1'4l>#p\"F27$Fev$\"3\"3Cjqg!*=%=F27$Fjv$\"3+=p6+56'*>F27 $F_w$\"3EMgH-E " 0 "" {MPLTEXT 1 0 16 "# end of section" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 77 "Plotting Tangent Lines/ Instantaneous Rates of change / The \+ \"limit\" command" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 150 " Now we try \+ to plot the tangent line to this curve at x = 2. Recall that the slop e of the tangent line , at x = 2, is defined by the following limit:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 34 " \+ " }{XPPEDIT 18 0 "m[tan];" "6#&%\"mG6#%$tanG" }{TEXT -1 4 " = " } {XPPEDIT 18 0 "limit((f(2+h)-f(2))/h,h = 0);" "6#-%&limitG6$*&,&-%\"fG 6#,&\"\"#\"\"\"%\"hGF-F--F)6#F,!\"\"F-F.F1/F.\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 107 "The following command in Maple will find this li mit. Here we want the limit as h goes to zero so we type: " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "mtanf2 := limit((f(2+h)-f(2) )/h, h = 0);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'mtanf2G\"\"!" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 306 "This notation is for the slope of the tangent line of the function f(x), at x = 2. Again, you can cal l it anything you want. Using a similar procedure as above, we plot t he tangent line (from the point slope formula for a line) by: f(x) = \+ mtanf2 (x - 2) + f(2). And use this to plot the tangent line. " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "tanf2 := x -> mtanf2*(x - 2) + f(2);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&tanf2Gf*6#%\"xG6\"6$%)o peratorG%&arrowGF(,&*&%'mtanf2G\"\"\",&9$F/\"\"#!\"\"F/F/-%\"fG6#F2F/F (F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "plot([f(x), tanf2( x)], x = 0 .. 4);" }{TEXT -1 0 "" }}{PARA 13 "" 1 "" {GLPLOT2D 400 300 300 {PLOTDATA 2 "6&-%'CURVESG6$7S7$$\"\"!F)$\"\"&F)7$$\"3Hmmmm;')= ()!#>$\"3yz&4#)QZ)eY!#<7$$\"3RLLLe'40j\"!#=$\"3S\\e7a( >%F6$\"3eCFK'*)\\F6$\"3S'\\9uT6JD$F27$$\"3P**** *\\Kd,\"eF6$\"3i6DT^j^8IF27$$\"3-mmm\"fX(emF6$\"3]O(y=p!*)zFF27$$\"3.* ****\\U7Y](F6$\"3#Qk%\\1rMhDF27$$\"3'QLLLV!pu$)F6$\"3G:$3_Ay9N#F27$$\" 3xmmm;c0T\"*F6$\"3UlK?Jn;z@F27$$\"3#*******H,Q+5F2$\"31<))\\%))R#**>F2 7$$\"3)*******\\*3q3\"F2$\"3U-,QdEbL=F27$$\"3)*******p=\\q6F2$\"3)o4Ox t$3)o\"F27$$\"3mmm;fBIY7F2$\"3YKxzL,1o:F27$$\"3GLLLj$[kL\"F2$\"337I_u2 IS9F27$$\"3?LLL`Q\"GT\"F2$\"3J[s$3d(yW8F27$$\"3!*****\\s]k,:F2$\"3EINw LwN[7F27$$\"39LLL`dF!e\"F2$\"3)3!*RKWoh<\"F27$$\"33++]sgam;F2$\"35v^w@ :>66F27$$\"3/++]9#z`J1\"F27$$\"3QLLLe/TM=F2$\"3!oP4j*)> u-\"F27$$\"3JLL$eDBJ\">F2$\"3N+qnova25F27$$\"3immmTc-)*>F2$\"3NG34)*Q+ +5F27$$\"3Mmm;f`@'3#F2$\"3APi:)3Lu+\"F27$$\"3y****\\nZ)H;#F2$\"3/HqVMS cE5F27$$\"3YmmmJy*eC#F2$\"3?o$=Oul/1\"F27$$\"3')******R^bJBF2$\"3]>/'3 \")G*46F27$$\"3f*****\\5a`T#F2$\"3s].aK!>D<\"F27$$\"3o****\\7RV'\\#F2$ \"3Od+[HmWY7F27$$\"3k*****\\@fke#F2$\"3p:%e3TMRM\"F27$$\"3/LLL`4NnEF2$ \"3]3\\\"\\Hd`W\"F27$$\"3#*******\\,s`FF2$\"3SAg^kS4o:F27$$\"3[mm;zM)> $GF2$\"3)4F1'4l>#p\"F27$$\"3$*******pfaF27$$\"3w****\\#G2A3$F2$\"3EMgH-E " 0 "" {MPLTEXT 1 0 35 "q := x -> 13*x^4 - 5*x^2 + 2*x - 1;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"qGf*6#%\"xG6\"6$%)operatorG%&arrow GF(,**&\"#8\"\"\")9$\"\"%F/F/*&\"\"&F/)F1\"\"#F/!\"\"*&F6F/F1F/F/F/F7F (F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "limit((q(x+h) - q( x))/h, h = 0);" }{TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(*& \"#_\"\"\")%\"xG\"\"$F&F&\"\"#F&*&\"#5F&F(F&!\"\"" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 345 "Recognize this? This is why we love Maple. It p erforms symbolic manipulations. Ie. It doesn't just evaluate a sequen ce of numbers, it can do all of the algebra that would be required to \+ determine this limit. If Maple can perform the above limit calculatio n then it should be able to symbolically determine derivatives. Right? ... Yes Sir!!!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "# end o f section" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 42 "Derivatives: The \+ \"D\" and \"diff\" commands. " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 86 "M aple has two commands to evaluate derivatives of functions. D(f) and \+ diff(f(x), x). " }}{PARA 0 "" 0 "" {TEXT -1 42 "D(f) returns the deri vative as function." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "g : = x -> x^3 - 4*x;" }{TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>% \"gGf*6#%\"xG6\"6$%)operatorG%&arrowGF(,&*$)9$\"\"$\"\"\"F1*&\"\"%F1F/ F1!\"\"F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "D(g);" } {TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#f*6#%\"xG6\"6$%)operat orG%&arrowGF&,&*&\"\"$\"\"\")9$\"\"#F-F-\"\"%!\"\"F&F&F&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 57 "Notice this describes a function and we g ive it a name by" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "derivg \+ := D(g);" }{TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'derivgGf *6#%\"xG6\"6$%)operatorG%&arrowGF(,&*&\"\"$\"\"\")9$\"\"#F/F/\"\"%!\" \"F(F(F(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 3 "or " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "derivg := x -> D(g)(x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'derivgGf*6#%\"xG6\"6$%)operatorG%&arrowGF(--%\"DG 6#%\"gG6#9$F(F(F(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "In either ca se, you can now evaluate the derivative at a number such as 3 by" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "derivg(3);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#B" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "You can also plot the derivative with" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "plot([g(x), derivg(x)], x = -4 .. 4, color = [red, blue]);" } {TEXT -1 0 "" }}{PARA 13 "" 1 "" {GLPLOT2D 400 300 300 {PLOTDATA 2 "6& -%'CURVESG6$7S7$$!\"%\"\"!$!#[F*7$$!3ommmmFiDQ!#<$!3w42dS))poS!#;7$$!3 5LLLo!)*Qn$F0$!39Zv)fh%H*[$F37$$!3nmmmwxE.NF0$!3mW`N%=8#)*GF37$$!3Ymmm Ok]JLF0$!3OvJU5[,lBF37$$!3_LLL[9cgJF0$!3EO,1Rs!H*=F37$$!3smmmhN2-IF0$! 3*331DBF0$!3K(R\" >RX$)oKF07$$!3kmmmw))yr@F0$!3y8Reb#\\kb\"F07$$!3;+++S(R#**>F0$\"3sV+#y Y7'yg!#?7$$!30++++@)f#=F0$\"3o**f'GZ>d@\"F07$$!3-+++gi,f;F0$\"39epT.m* )p?F07$$!3qmmm\"G&R2:F0$\"3J=\"3^Y;Wg#F07$$!3XLLLtK5F8F0$\"3So0&op96(H F07$$!3eLLL$HsV<\"F0$\"3+gaA#H`y2$F07$$!3+-++]&)4n**!#=$\"33NOX:un'*HF 07$$!37PLLL\\[%R)Fbq$\"3#)z3LOmDmFF07$$!3G)*****\\&y!pmFbq$\"3+/;!HU85 P#F07$$!3Y******\\O3E]Fbq$\"3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`q$!3)fjP[R3(>5F07$Ffq$!3/)=@6oyf)=F07$F[r$!3%y* y\")QlbneJ7o$F07$ F_t$!33\"ezl26WF$F07$Fdt$!3)f'\\npU&3o#F07$Fit$!3=#z:&4;xH>F07$F^u$!3u 6$RiWSE/\"F07$Fcu$\"3C,*4IIH@F\"Fbq7$Fhu$\"3'>!*y*QvGW8F07$F]v$\"3\")o A>u(Gr\"GF07$Fbv$\"3#>Dv_6ejI%F07$Fgv$\"3x*))eZG(o-hF07$F\\w$\"3A9IS,? L`zF07$Faw$\"36T_vArS05F37$Ffw$\"33w:piWAF7F37$F[x$\"3oT2`&*Q&oZ\"F37$ F`x$\"3Nonl%*)4Tt\"F37$Fex$\"3^)>*p5NF9?F37$Fjx$\"3NSu> " 0 " " {MPLTEXT 1 0 25 "h := x -> x^2 + 5*cos(x);" }{TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"hGf*6#%\"xG6\"6$%)operatorG%&arrowGF(,&* $)9$\"\"#\"\"\"F1*&\"\"&F1-%$cosG6#F/F1F1F(F(F(" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 14 "diff(h(x), x);" }{TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*&\"\"#\"\"\"%\"xGF&F&*&\"\"&F&-%$sinG6#F'F&!\" \"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 104 "Notice this returns an exp ression for the derivative. In order to enter this as a function we mu st type:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "derivh := x -> \+ diff(h(x), x);" }{TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'de rivhGf*6#%\"xG6\"6$%)operatorG%&arrowGF(-%%diffG6$-%\"hG6#9$F2F(F(F(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 91 "The big difference between diff and D is that you cannot evaluate the \"diff\" at a number. " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "derivh(3);" }}{PARA 8 "" 1 " " {TEXT -1 73 "Error, (in derivh) wrong number (or type) of parameters in function diff\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "but you ca n still plot it. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "plot([ h(x), derivh(x)], x = -2*Pi .. 2*Pi, color = [red, blue]);" }{TEXT -1 0 "" }}{PARA 13 "" 1 "" {GLPLOT2D 400 300 300 {PLOTDATA 2 "6&-%'CURVES G6$7Y7$$!3)****>YH&=$G'!#<$\"3],HlW<%yW%!#;7$$!3dp3dxTF4gF*$\"3KQXMnx \\#4%F-7$$!3W07Azb%4x&F*$\"3-BY\\bd?mPF-7$$!3[DqOW,#H]&F*$\"3]\\XEEld$ Q$F-7$$!3()o*[H1=JB&F*$\"3]sf&[#)3t)HF-7$$!3gAxs.$)fk\\F*$\"3)\\83!Hc \\*e#F-7$$!3/sy+9hk:ZF*$\"3P\"z(=\"Rg`A#F-7$$!3ellUT0(yX%F*$\"3#\\5#= \"Gr8'=F-7$$!3!>@6bny7>%F*$\"3fZ*ff+gx]\"F-7$$!3/t34t_OF*$\"3AJ.e`HJw*)F*7$$!35AGA$)zV6MF*$\"3'*H8%>T[)= oF*7$$!3pxppL%)RSJF*$\"3I)))ox)e5i[F*7$$!3OO)R(pfCoGF*$\"3M$=!*zwqCT$F *7$$!3In=4Um(fg#F*$\"3W%*H[oAM\"\\#F*7$$!3C!Q9W!Q*o[#F*$\"3KEaq*3%[=AF *7$$!3=$*otm4\"yO#F*$\"3&RG>&*)Q;I?F*7$$!3'\\q*za*4iA#F*$\"3V)oPEnu&3> F*7$$!3I;D'G%*3Y3#F*$\"3mn/G#z)3))=F*7$$!3s.k\">JaY'>F*$\"3j9k&QD(4T>F *7$$!38\"Hq4o*pW=F*$\"3O(\\L9Cg/0#F*7$$!3%zq%)fP&\\*y!#=$\"3EMZI$R@V9%F*7$$!3WCVrl)[@?&F^s$\"3X_^2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*F*7$Fgy$\"3N!\\pMGD+9\"F-7$F\\z$\"3iEaJcO6r7F-7$Faz$\"3=%)e[z/)[P\" F-7$$\"3Az;UWEB)e%F*$\"32CLtxxz89F-7$Ffz$\"3_\\fRp?1W9F-7$$\"3`b([HgH= %[F*$\"3#)3n3ZI=k9F-7$F[[l$\"3y>PK]4+x9F-7$$\"3#)4lu\"*=X-^F*$\"3EMtF[ H$H[\"F-7$F`[l$\"39fGC'*4#*z9F-7$$\"3a$=k.%>7m`F*$\"3CYEI[R8q9F-7$Fe[l $\"3I0k7GR?a9F-7$Fj[l$\"3$p^ " 0 "" {MPLTEXT 1 0 37 "quad := (a,b,c,t) -> a*t^2 + b*t + c;" } {TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%%quadGf*6&%\"aG%\"bG %\"cG%\"tG6\"6$%)operatorG%&arrowGF+,(*&9$\"\"\")9'\"\"#F2F2*&9%F2F4F2 F29&F2F+F+F+" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "Notice this is ju st a quadratic in " }{TEXT 261 1 "t" }{TEXT -1 98 ", but also contains the variables a, b, c. We would expect to differentiate this with re spect to " }{TEXT 262 1 "t" }{TEXT -1 3 " by" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "diff(quad(a,b,c,t), t);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*(\"\"#\"\"\"%\"aGF&%\"tGF&F&%\"bGF&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 100 "This gives expected derivative. Suppose we wanted to differentiate this function with respect to a:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "diff(quad(a,b,c,t), a);" } {TEXT -1 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*$)%\"tG\"\"#\"\"\"" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 133 "This may seem strange but if \" a\" is considered the independent variable then the derivative with re spect to \"a\" gives the \"constant\" " }{XPPEDIT 18 0 "t^2;" "6#*$%\" tG\"\"#" }{TEXT -1 92 ". We will deal with differentiating with respe ct to more than one variable in the future. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 263 9 "Summary: " }{TEXT -1 202 "The \"D\" com mand is better when using the derivative as a function because you can evaluate the derivative at a number. The \"diff\" command works well if you have more than one variable in the function. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "# end of section" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 10 "Assignment" }}{PARA 0 "" 0 "" {TEXT -1 203 "Remember: Course, Your Name, and Lab number in upper left. You m ay put all of this in one line if you want to save vertical space. Th ese two graphs and corresponding written portions must be put on to " }{TEXT 268 3 "one" }{TEXT -1 15 " printed page. " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 256 11 "Problem # 1" }{TEXT -1 2 ": " }} {PARA 0 "" 0 "" {TEXT -1 29 "Consider the function f(x) = " }{XPPEDIT 18 0 "x/10;" "6#*&%\"xG\"\"\"\"#5!\"\"" }{TEXT -1 3 " ( " }{XPPEDIT 18 0 "x^2/3;" "6#*&%\"xG\"\"#\"\"$!\"\"" }{TEXT -1 10 " - 4.1 x)" }} {PARA 0 "" 0 "" {TEXT -1 4 "a) " }{TEXT 264 6 "Graph:" }{TEXT -1 401 " Plot the function and the tangent to the curve at x=6. Plot the seca nt lines through (2,f(2)) and (2+h,f(2+h)) for h=3 and h = 2. Put all this (function, tangent, 2 secants) on one graph plotted over the dom ain [-2,12]. The secant lines should appear to be converging to the ta ngent line. Label the curve and label the lines as secant or tangent. \+ This labelling is probably best done by hand. " }}{PARA 0 "" 0 " " {TEXT -1 4 "b) " }{TEXT 265 10 "Questions:" }{TEXT -1 107 " For wha t value(s) of x is the tangent to the curve y = f(x) a horizontal line . Give these values exactly. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 " " }{TEXT 257 11 "Problem # 2" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 3 "a) " }{TEXT 266 6 "Graph:" }{TEXT -1 33 " Plot the functions cos (x) and " }{XPPEDIT 18 0 "(sin(x+h)-sin(x))/h;" "6#*&,&-%$sinG6#,&% \"xG\"\"\"%\"hGF*F*-F&6#F)!\"\"F*F+F." }{TEXT -1 139 " for values of \+ h = 1, 0.5, and 0.2. Put these on one graph plotted over one period. \+ Label the curves by hand indicating the value of h. " }}{PARA 0 "" 0 "" {TEXT -1 3 "b) " }{TEXT 267 10 "Question: " }{TEXT -1 60 "What do t hese graphs suggest about the derivative of sin(x)?" }}}}}{MARK "4" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }