{VERSION 5 0 "IBM INTEL NT" "5.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 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 1 0 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 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 271 ""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 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 "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times " 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 } {PSTYLE "Heading 3" -1 5 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 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 "Normal" -1 256 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 }} {SECT 0 {SECT 1 {PARA 3 "" 0 "" {TEXT -1 32 "Taylor and Maclaurin Poly nomials" }}{PARA 0 "" 0 "" {TEXT -1 86 "In this lab we will investigat e how transcendental functions such as cos(x), sin(x), " }{XPPEDIT 18 0 "exp(x);" "6#-%$expG6#%\"xG" }{TEXT -1 86 ", and ln(x) can be a pproximated by Taylor polynomials about an appropriate value of " } {TEXT 305 1 "x" }{TEXT -1 35 ". In particular, if this value of " } {TEXT 306 1 "x" }{TEXT -1 71 " is zero, the resulting polynomial is ca lled the Maclaurin polynomial. " }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 44 "n'th degree Taylor and Maclaurin polynomials" }}{PARA 0 "" 0 "" {TEXT -1 3 "If " }{TEXT 256 2 "f " }{TEXT -1 22 "can be differentiated " }{TEXT 257 1 "n" }{TEXT -1 10 " times at " }{XPPEDIT 18 0 "x[o];" " 6#&%\"xG6#%\"oG" }{TEXT -1 48 " , then we define the nth Taylor Polyno mial for " }{TEXT 258 2 "f " }{TEXT -1 6 "about " }{TEXT 259 2 "x=" } {XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 6 " to be" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {XPPEDIT 18 0 "P[n];" "6#& %\"PG6#%\"nG" }{TEXT -1 2 " (" }{TEXT 262 1 "x" }{TEXT -1 4 ") = " } {TEXT 260 1 "f" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"o G" }{TEXT -1 7 ") + " }{TEXT 261 3 "f '" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 5 ")*(x-" }{XPPEDIT 18 0 "x[o ];" "6#&%\"xG6#%\"oG" }{TEXT -1 4 ") + " }{TEXT 263 4 "f ''" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 3 ")*(" } {TEXT 270 2 "x-" }{XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 12 ")^2 / 2! + " }{TEXT 264 5 "f '''" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 5 ") * (" }{TEXT 265 2 "x-" } {XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 20 ")^3 / 3! + . . \+ . + " }{XPPEDIT 18 0 "f^n;" "6#)%\"fG%\"nG" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 5 ") * (" }{TEXT 266 2 "x-" } {XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 2 ")^" }{TEXT 271 2 "n " }{TEXT -1 2 "/ " }{TEXT 267 1 "n" }{TEXT -1 1 "!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 6 "Here, " }{XPPEDIT 18 0 "f^n;" "6#)%\"fG%\"nG" }{TEXT -1 1 "(" }{XPPEDIT 18 0 "x[o];" "6#&%\"x G6#%\"oG" }{TEXT -1 28 ") = the n'th derivative of " }{TEXT 290 1 "f " }{TEXT -1 14 " evaluated at " }{TEXT 291 4 "x = " }{XPPEDIT 18 0 "x[ o];" "6#&%\"xG6#%\"oG" }{TEXT -1 84 ". Notice: The first two terms af ter the equals sign is the linear approximation to " }{TEXT 269 1 "f" }{TEXT -1 8 "(x) for " }{TEXT 268 1 "x" }{TEXT -1 6 " near " } {XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 12 ". Also, if " } {XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 63 " = 0 then the po lynomial is called the Maclaurin polynomial of " }{TEXT 272 1 "f" } {TEXT -1 1 "(" }{TEXT 273 1 "x" }{TEXT -1 44 "). The beauty of these \+ polynomials is that " }{XPPEDIT 18 0 "p[n];" "6#&%\"pG6#%\"nG" }{TEXT -1 50 " and it's first n derivatives agree with those of " }{TEXT 274 2 "f " }{TEXT -1 3 "at " }{TEXT 276 4 "x = " }{XPPEDIT 18 0 "x[o];" "6 #&%\"xG6#%\"oG" }{TEXT 275 0 "" }{TEXT -1 28 ". What this means is t hat " }{XPPEDIT 18 0 "p[n];" "6#&%\"pG6#%\"nG" }{TEXT -1 1 "(" }{TEXT 277 1 "x" }{TEXT -1 29 ") \"looks\" more and more like " }{TEXT 278 1 "f" }{TEXT -1 1 "(" }{TEXT 279 1 "x" }{TEXT -1 5 ") as " }{TEXT 280 1 "n" }{TEXT -1 16 " gets large for " }{TEXT 281 1 "x" }{TEXT -1 6 " nea r " }{XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 65 ". So ther e are two forces at work here: On one hand, if we let " }{TEXT 282 1 " n" }{TEXT -1 28 " get large, the polynomial " }{XPPEDIT 18 0 "P[n];" "6#&%\"PG6#%\"nG" }{TEXT -1 30 " is a better approximation to " } {TEXT 283 1 "f" }{TEXT -1 28 ", but on the other hand, as " }{TEXT 284 1 "x" }{TEXT -1 19 " gets further from " }{XPPEDIT 18 0 "x[o];" "6 #&%\"xG6#%\"oG" }{TEXT -1 463 " the approximation tends to get worse. \+ These represent the two major contributing factors to how closely we \+ can approximate a transcendental function with a polynomial. By the w ay, you may know how a calculator or computer multiplies, divides, add s and subtracts, but did you ever think how it computes cos(x). The an swer is that it performs the multiplication, division, addition and su btraction necessary in the approximating Taylor polynomial for cos(x). " }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 14 "Approximating " } {XPPEDIT 18 0 "cos(Pi/5);" "6#-%$cosG6#*&%#PiG\"\"\"\"\"&!\"\"" } {TEXT -1 42 " with a 4th degree taylor polynomial for " }{XPPEDIT 18 0 "cos(x);" "6#-%$cosG6#%\"xG" }{TEXT -1 8 " about " }{XPPEDIT 18 0 " x = 0;" "6#/%\"xG\"\"!" }{TEXT -1 24 " (Maclaurin Polynomial) " }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "Here we want to approximate cos(" }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT -1 231 "/5) but suppose we only \+ know a little about the function cos(x). For example we know all of it 's derivatives and their values at x=0. We use a Maclaurin series fo r cos(x) about x=0 and observe how our approximation progresses. " } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 78 "We first define our function and evaluate the first four derivatives at x = 0:" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "f := x -> cos(x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG%$c osG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "a0 := f(0);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#a0G\"\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "a1 := D(f)(0);" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#>%#a1G\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "a2 := (D@@ 2)(f)(0);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#a2G!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "a3 := (D@@3)(f)(0);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#a3G\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "a4 := (D@@4)(f)(0);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#a4G \"\"\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 386 "The above notation is \+ awkward but it gets the job done. Maple has built in commands for Tayl or polynomials and we will get to these later. Now that we have the fu nction and it's first 4 derivatives at x = 0 we can build the fourth d egree approximating Maclaurin polynomial. I will build all of the pol ynomials leading up to this so that we can plot them all and see the i mprovements. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "p0 := x - > a0;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#p0Gf*6#%\"xG6\"6$%)operato rG%&arrowGF(%#a0GF(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 " p1 := x -> a0 + a1*x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#p1Gf*6#%\" xG6\"6$%)operatorG%&arrowGF(,&%#a0G\"\"\"*&%#a1GF.9$F.F.F(F(F(" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "p2 := x -> a0 + a1*x + a2*x^ 2/2!;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#p2Gf*6#%\"xG6\"6$%)operato rG%&arrowGF(,(%#a0G\"\"\"*&%#a1GF.9$F.F.*(%#a2GF.F1\"\"#-%*factorialG6 #F4!\"\"F.F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "p3 := x -> a0 + a1*x + a2*x^2/2! + a3*x^3/3!; " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#p3Gf*6#%\"xG6\"6$%)operatorG%&arrowGF(,*%#a0G\"\"\"*&%#a1GF.9 $F.F.*(%#a2GF.F1\"\"#-%*factorialG6#F4!\"\"F.*(%#a3GF.F1\"\"$-F66#F;F8 F.F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "p4 := x -> a0 + a1*x + a2*x^2/2! + a3*x^3/3! + a4*x^4/4!;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#p4Gf*6#%\"xG6\"6$%)operatorG%&arrowGF(,,%#a0G\"\"\"* &%#a1GF.9$F.F.*(%#a2GF.F1\"\"#-%*factorialG6#F4!\"\"F.*(%#a3GF.F1\"\"$ -F66#F;F8F.*(%#a4GF.F1\"\"%-F66#F@F8F.F(F(F(" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 95 "Since a1 and a3 both equal zero this means that p1 = p0 and p3 = p2. Just to get a look at p4:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "p4(x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(\"\"\"F$*& #F$\"\"#F$*$)%\"xGF'F$F$!\"\"*&#F$\"#CF$)F*\"\"%F$F$" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "It's pretty easy to figure out what p5 and p6 s hould be from here. " }}}{EXCHG {PARA 0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!3Np'4n\"4R<$)F37$F_s$!3!on)*[w17 m)F37$Fbs$!3]ng'y@%yu*)F37$Fes$!3UZY%o$=VY#*F37$Fhs$!3W=g!e4\"\\g%*F37 $F[t$!3aHxURE!Hm*F37$F^t$!3:Hh27gL/)*F37$Fat$!3%4D8mL'H8**F37$Fdt$!3c2 E`k>nI`6=**F37$F5$\"3\\6^5&**[.\")*F37$F8$\"3esy!p\\.ul*F37$F;$ \"3')4b\"4K&eh%*F37$F>$\"3eeS4o&e>C*F37$FA$\"3'*fwX8#))o(*)F37$FD$\"3) \\gV&Qdkj')F37$FG$\"3[*p'\\==_'G$F37$Fco$\"3S5hJ^)\\ol#F37$Ffo$\" 3#G1*=O)*3^?F37$Fio$\"3u%p%y#o#f;9F37$F\\p$\"3539?2VY`$)F/7$F_p$\"3)o< HfrL.9#F/7$Fbp$!3'3;\\yKjO?%F/7$Fep$!3eCOqNr=%f*F/7$Fhp$!3wm[nZlRB:F37 $F[q$!3[*\\&)Gu>73#F37$F^q$!3'pKB*>'Gtf#F37$Faq$!3i:$)=MUxjIF37$Fdq$!3 !3I$Gj_jPNF37$Fgq$!3zQ0'4Jq#=RF37$Fjq$!37[-X#f Kz#F37$F^t$!3uICl'[0K/#F37$Fat$!3\\k4t%[865\"F37$Fdt$!3/4p&=sl?R&F`cl7 $Fgt$\"3T-\\5&>*4R7F3-Fjt6&F\\uF(F(F]u-%+AXESLABELSG6$Q\"x6\"Q!Fcam-%% VIEWG6$;F($\"+aEfTJ!\"*%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" "Curve 3" "Curve 4" }}}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 220 "You should be able to distinguish the various polynomials from the original function, In particular, th e approximations get better for higher degree polynomials. We evalua te the error associated with approximating cos(" }{XPPEDIT 18 0 "Pi;" "6#%#PiG" }{TEXT -1 46 "/5) with the various polynomials as follows. \+ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "error0 := evalf(p0(Pi/5 ) - cos(Pi/5));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'error0G$\"+d+$)4 >!#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "error1 := evalf(p1( Pi/5) - cos(Pi/5));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'error1G$\"+d +$)4>!#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "error2 := evalf (p2(Pi/5) - cos(Pi/5));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'error2G$ !)C34k!#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "error3 := eval f(p3(Pi/5) - cos(Pi/5));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'error3G $!)C34k!#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "error4 := eva lf(p4(Pi/5) - cos(Pi/5));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'error4 G$\"'q&[)!#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 202 "Clearly the appr oximation is improving as the degree of the polynomial increases. Howe ver, this does us little good for an x value that is far away from x = 0. For example if we check our error at x = " }{XPPEDIT 18 0 "Pi;" " 6#%#PiG" }{TEXT -1 50 " using the 4th degree polynomial we are way off : " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "evalf(p4(Pi) - cos(P i));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+F*4R7\"!\"*" }}}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 42 "Maple Commands that Simplify the Process. " }}{PARA 0 "" 0 "" {TEXT -1 82 "We can write our own expressions for Taylor and Maclaurin Polynomials as follows. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "f := x -> exp(x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG%$exp G" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "p6 := (a,x) -> f(a) + \+ subs(t=a, sum(diff(f(t),t$k)*(x-a)^k/k!, k=1..6));" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%#p6Gf*6$%\"aG%\"xG6\"6$%)operatorG%&arrowGF),&-%\"f G6#9$\"\"\"-%%subsG6$/%\"tGF1-%$sumG6$*(-%%diffG6$-F/6#F7-%\"$G6$F7%\" kGF2),&9%F2F1!\"\"FDF2-%*factorialG6#FDFH/FD;F2\"\"'F2F)F)F)" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "This creates the 6th degree Taylor polynomial for " }{XPPEDIT 18 0 "exp(x);" "6#-%$expG6#%\"xG" }{TEXT -1 55 " expanded about x = a. Lets see how this approximates " } {XPPEDIT 18 0 "exp(3);" "6#-%$expG6#\"\"$" }{TEXT -1 2 ". " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "evalf(exp(3),10);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+#p`&3?!\")" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "This is Maple's approximation to " }{XPPEDIT 18 0 "exp(3);" "6#-%$ expG6#\"\"$" }{TEXT -1 29 " with 10 units of precision. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalf(p6(0,3),10);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+++DT>!\")" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "This is the 6'th degree Taylor polynomial about x=0. Not bad. \+ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalf(p6(2,3),10);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+)\\'Q3?!\")" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "This is the 6'th degree Taylor polynomial about x = \+ 2. Better. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 81 "Notice, the Taylo r polynomial expanded about x = 2 has a better approximation to " } {XPPEDIT 18 0 "exp(3);" "6#-%$expG6#\"\"$" }{TEXT -1 53 " than the sam e degree polynomial expanded about x =0 " }}{PARA 0 "" 0 "" {TEXT -1 12 "Why is this?" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 228 "Here is anot her set of commands that Maple has to find and plot Taylor Polynomials . We'll look at the fifth degree taylor polynomial of ln(x) expanded \+ about the point x = 1. Why don't we want to find the polynomial about x=0? " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "t4 := taylor( ln( x), x = 1, 5);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#t4G+-,&%\"xG\"\" \"F(!\"\"F(F(#F)\"\"#F+#F(\"\"$F-#F)\"\"%F/-%\"OG6#F(\"\"&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 433 "This command \"taylor( f(x), x=a, n)\" p roduces a taylor polynomial of degree (n-1) about the x = a. It also \+ gives the order (O) of the remainder term. This gives an idea of how \+ large an error one can expect. This term \"O((x-1)^5)\" is called \" big O\" and means the remaining terms are less than or equal to a cons tant multiplied by (x-1)^5. However if we want to convert this to a p olynomial we have to use the \"convert\" command: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "t4poly := convert(t4,polynom);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'t4polyG,,%\"xG\"\"\"F'!\"\"*&#F'\"\"#F'*$ ),&F&F'F'F(F+F'F'F(*&#F'\"\"$F')F.F1F'F'*&#F'\"\"%F'*$)F.F5F'F'F(" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "plot(\{ln(x),t4poly(x)\},x = 0..2);" }}{PARA 13 "" 1 "" {GLPLOT2D 404 246 246 {PLOTDATA 2 "6&-%'CU RVESG6$7^o7$$\"3#******\\8ABO\"!#?$!3gNw1$ek&)f'!#<7$$\"3#)******pUkCF F*$!3@!p2DSAqA@&F-7$$\"3S+++v1h6oF*$!35NNjqm7*)\\F-7$$\"3Y****** 4G$R<)F*$!34\"eRQ60o![F-7$$\"3N*****\\%\\DO&*F*$!3;AB,MWl_YF-7$$\"3%** ****zqd)*3\"!#>$!3T*z(QTI7>XF-7$$\"33+++N@Ki8FO$!3q*et+\\zfH%F-7$$\"3* )*****>c'yM;FO$!3pN'zK$zl8TF-7$$\"3()******))4D2>FO$!3?xBX`s]fRF-7$$\" 3%******pT:(z@FO$!3yy!p.'e(f#QF-7$$\"3;+++qUkCFFO$!3vWO^4B$Gg$F-7$$\"3 ')*****\\7t&pKFO$!3%)RQT_2^?MF-7$$\"3#)******y>]9QFO$!3Su-js+OmKF-7$$ \"3')*****R$3VfVFO$!3#Q84)z'GG8$F-7$$\"35+++j&*)fD'FO$!3]()[1^3jrFF-7$ $\"3K+++#H[D:)FO$!37vDuL'Ro]#F-7$$\"3/+++%pU&G5!#=$!3Amk!G:UWF#F-7$$\" 3(******zbI=C\"Faq$!3w53_X&)*f3#F-7$$\"3'******HBKlX\"Faq$!3,g=Plm_E>F -7$$\"3%******z!RBr;Faq$!3a.uKsG-*y\"F-7$$\"31+++zjf)4#Faq$!3il)*oijJh :F-7$$\"3')*****f4;[\\#Faq$!3/V__v+P)Q\"F-7$$\"3t*****Hmy]!HFaq$!3\"oT rXiChB\"F-7$$\"3D+++'zs$HLFaq$!3kY7Hc6!)*4\"F-7$$\"37+++8iI_PFaq$!3b#G t!>X9-)*Faq7$$\"3u*****p@Xt=%Faq$!3^4\\I'f\"=0()Faq7$$\"35+++4y_qXFaq$ !3dY;Y/ScHyFaq7$$\"3i******\\1!>+&Faq$!3s&\\5zArw#pFaq7$$\"3()******\\ Z/NaFaq$!3oi6%yQtr4'Faq7$$\"3'*******\\$fC&eFaq$!3u$=\\Q=JsN&Faq7$$\"3 %******fz6:B'Faq$!3!)=P[d7mHZFaq7$$\"3w*****p\"=C#o'Faq$!3A>s*Rg:8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bl7$$\"+n#pS1(F^bl$!+#*f%)pMF^bl7$$ \"+j`A3vF^bl$!+a.VjGF^bl7$$\"+n(y8!zF^bl$!+#H!\\aBF^bl7$$\"+j.tK$)F^bl $!+)pRO#=F^bl7$$\"+)3zMu)F^bl$!+y\"*pU8F^bl7$$\"+#H_?<*F^bl$!+&3>Bk)Fc al7$$\"+!G;cc*F^bl$!+MH+TWFcal7$$\"+4#G,***F^bl$!+Aomw)*!#87$$\"+!o2J/ \"F_al$\"+g#Q/A%Fcal7$$\"+%Q#\\\"3\"F_al$\"+9^7MyFcal7$$\"+;*[H7\"F_al $\"+y3`f6F^bl7$$\"+qvxl6F_al$\"+]HmL:F^bl7$$\"+`qn27F_al$\"+o\"Gj)=F^b l7$$\"+cp@[7F_al$\"+V\")f:AF^bl7$$\"+3'HKH\"F_al$\"+U#Qzc#F^bl7$$\"+xa nL8F_al$\"+xV!H(GF^bl7$$\"+v+'oP\"F_al$\"+[kY'=$F^bl7$$\"+S<*fT\"F_al$ \"+_MwfMF^bl7$$\"+&)Hxe9F_al$\"+PO[YPF^bl7$$\"+.o-*\\\"F_al$\"+O1L/SF^ bl7$$\"+TO5T:F_al$\"+&)e&3E%F^bl7$$\"+U9C#e\"F_al$\"+=0-)\\%F^bl7$$\"+ 1*3`i\"F_al$\"+8y\"3t%F^bl7$$\"+$*zym;F_al$\"+&pb)Q\\F^bl7$$\"+^j?4F_al$\"+3ZwmdF^bl7$$\"+/Uac>F_al$\"+Qu)\\\"eF^bl7$F\\`l$\"+LLL LeF^bl-Fb`l6&Fd`lFh`lFe`lFh`l-%+AXESLABELSG6$Q\"x6\"Q!Fg`m-%%VIEWG6$;F h`lF\\`l%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 193 "Notice, the polynomial is a good approximation near x = 1 but get s worse as x moves away from 1. Furthermore, the Taylor polynomial wi ll never give you a good approximation for ln(0). Why? " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 310 8 "Warning:" }{TEXT -1 135 " \+ Using Maple's built in commands \"taylor\" and \"convert\" result in \+ functions that cannot be explicitly evaluated in the usual fashion. " }}{PARA 0 "" 0 "" {TEXT -1 93 "For example if we define a polynomial P 4 as the fourth order Maclaurin polynomial as follows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "P4 := x -> convert(taylor( ln(x), x = 1, 5),polynom);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#P4Gf*6#%\"xG6 \"6$%)operatorG%&arrowGF(-%(convertG6$-%'taylorG6%-%#lnG6#9$/F5\"\"\" \"\"&%(polynomGF(F(F(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 34 "and try \+ to evaluate it a number, " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "P4(2);" }}{PARA 8 "" 1 "" {TEXT -1 71 "Error, (in P4) wrong number \+ (or type) of parameters in function taylor\n" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 153 "you get an error message. So if you want to define a \+ taylor polynomial as a function and evaluate it at specific numbers, y ou should avoid this method. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "# end of section" }}}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 24 "The R emainder Theorem. " }}{PARA 0 "" 0 "" {TEXT -1 120 "The goal is to es timate, or bound, the error in approximating a function with it's n't h degree Taylor polynomial about " }{TEXT 294 1 "x" }{TEXT -1 1 "=" } {XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 34 ". As we saw ear lier, the error; " }{XPPEDIT 18 0 "R[n];" "6#&%\"RG6#%\"nG" }{TEXT -1 1 "(" }{TEXT 302 1 "x" }{TEXT -1 4 ") = " }{TEXT 295 1 "f" }{TEXT -1 1 "(" }{TEXT 296 1 "x" }{TEXT -1 4 ") - " }{XPPEDIT 18 0 "P[n];" "6 #&%\"PG6#%\"nG" }{TEXT -1 1 "(" }{TEXT 297 1 "x" }{TEXT -1 39 "), is \+ generally reduced by increasing " }{TEXT 299 1 "n" }{TEXT -1 30 " but \+ is increased the further " }{TEXT 298 2 "x " }{TEXT -1 8 "is from " } {XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 62 ". The remainder estimation theorem puts a bound on the error " }{XPPEDIT 18 0 "R[n]; " "6#&%\"RG6#%\"nG" }{TEXT -1 1 "(" }{TEXT 304 1 "x" }{TEXT -1 40 ") a nd is related to these two concepts. " }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 4 "The " }{TEXT 303 28 "remainder estimat ion theorem" }{TEXT -1 27 " states that if a function " }{TEXT 285 1 " f" }{TEXT -1 24 " can be differentiated " }{TEXT 286 1 "n" }{TEXT -1 30 "+1 times on an open interval " }{TEXT 289 1 "I" }{TEXT -1 12 " co ntaining " }{XPPEDIT 18 0 "x[o];" "6#&%\"xG6#%\"oG" }{TEXT -1 2 ", " } }{PARA 0 "" 0 "" {TEXT -1 7 "and if " }{XPPEDIT 18 0 "abs(f(x)^(n+1)); " "6#-%$absG6#)-%\"fG6#%\"xG,&%\"nG\"\"\"F-F-" }{TEXT -1 15 " <= M fo r all " }{TEXT 287 1 "x" }{TEXT -1 4 " in " }{TEXT 288 3 "I, " }{TEXT -1 4 "then" }}{PARA 256 "" 0 "" {XPPEDIT 18 0 "abs(R[n](x));" "6#-%$ab sG6#-&%\"RG6#%\"nG6#%\"xG" }{TEXT -1 6 " <= " }{XPPEDIT 18 0 "M/(n+1 )!;" "6#*&%\"MG\"\"\"-%*factorialG6#,&%\"nGF%F%F%!\"\"" }{TEXT -1 2 " \+ " }{XPPEDIT 18 0 "abs(x[o]-x)^(n+1);" "6#)-%$absG6#,&&%\"xG6#%\"oG\" \"\"F)!\"\",&%\"nGF,F,F," }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 8 "for all " }{TEXT 292 1 "x" }{TEXT -1 4 " in " }{TEXT 293 1 "I" } {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 10 "Notice as " }{TEXT 300 2 "n " }{TEXT -1 50 "increases, th e remainder should decrease due to " }{XPPEDIT 18 0 "(n+1)!" "6#-%*f actorialG6#,&%\"nG\"\"\"F(F(" }{TEXT -1 41 " in the denominator, but i f the distance " }{XPPEDIT 18 0 "abs(x[o]-x);" "6#-%$absG6#,&&%\"xG6#% \"oG\"\"\"F(!\"\"" }{TEXT -1 189 " is large, then the error will incre ase. These two forces acting on the error should be somewhat intuitiv e at this point. Clearly however, the maximum value of the (n+1)'th d erivative of " }{TEXT 301 1 "f" }{TEXT -1 49 " also plays a critical r ole in the error bound. " }}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 0 "" } {TEXT 307 58 "Finding an upper bound on Taylor polynomial approximatio ns" }}{PARA 0 "" 0 "" {TEXT -1 63 "Here we will do #19 from section 11 .9. The problem is stated: " }}{PARA 0 "" 0 "" {TEXT -1 82 "(a) Find \+ an upper bound on the error that can result if cos(x) is approximated \+ by " }{XPPEDIT 18 0 "P[5];" "6#&%\"PG6#\"\"&" }{TEXT -1 46 "(x) about \+ zero over the interval [-0.2, 0.2]. " }}{PARA 0 "" 0 "" {TEXT -1 38 "( b) Check your answer by plotting cos(" }{TEXT 309 1 "x" }{TEXT -1 3 ") -" }{XPPEDIT 18 0 "P[5];" "6#&%\"PG6#\"\"&" }{TEXT -1 1 "(" }{TEXT 308 1 "x" }{TEXT -1 3 "). " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 117 "Fir st we need to get the maximum of the absolute value of the 6th derivat ive of cos(x) over the interval [-0.2,.2]. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "f := x -> cos(x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG%$cos G" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "f6 := x -> (D@@6)(f)(x );" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#f6G,$%$cosG!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "plot(abs(f6(x)),x=-0.2..0.2);" }} {PARA 13 "" 1 "" {GLPLOT2D 394 213 213 {PLOTDATA 2 "6%-%'CURVESG6$7S7$ $!35+++++++?!#=$\"3E;CTydm+)*F*7$$!3]LLL$Q6G\">F*$\"3F6FC\\Zh<)*F*7$$! 3mmm;M!\\p$=F*$\"3(3C#[9[vJ)*F*7$$!3]LLL))Qj^'***!#>$\"31s!o_fz+&**F*7$$!3$>+++]5*H\"*Fao$\"3?>j]48Ne** F*7$$!3A,+++83&H)Fao$\"3]cp0Obhl**F*7$$!3gMLL3k(p`(Fao$\"3EpvFO/hr**F* 7$$!3*)ommmj^NmFao$\"3MQsyPI*z(**F*7$$!3'ommmYh=(eFao$\"3!)R%eTdlF)**F *7$$!3c,++v#\\N)\\Fao$\"31h@;)o%e()**F*7$$!3AqmmmCC(>%Fao$\"3S>/!4(G> \"***F*7$$!3\"3++]FRXL$Fao$\"3#HvS!R4W%***F*7$$!3%3++]#=/8DFao$\"3!fzs lZUo***F*7$$!3ummm;a*el\"Fao$\"3Oe8^O!H')***F*7$$!3szmm;Wn(o)!#?$\"3+> (RRiA'****F*7$$!3#eULLLeV(>!#@$\"2'fa40)*******!#<7$$\"3*\\kmm\"f`@')F ir$\"3K*H%*yMG'****F*7$$\"3])****\\nZ)H;Fao$\"3s%))zw#=n)***F*7$$\"3ol mm;$y*eCFao$\"3;nP:lo(p***F*7$$\"3$p******R^bJ$Fao$\"3ARG&H1/X***F*7$$ \"33)*****\\5a`TFao$\"3yG!>%)Gv8***F*7$$\"3U(****\\7RV'\\Fao$\"3]IB)*) >!o()**F*7$$\"3c(*****\\@fkeFao$\"3Gx'yw?3G)**F*7$$\"3?FLLL&4Nn'Fao$\" 3qpTK)RSx(**F*7$$\"3X,+++:?PvFao$\"3mpuMT(3;(**F*7$$\"3tjmm\"zM)>$)Fao $\"3eZU\"R85a'**F*7$$\"3M*******pfa<*Fao$\"3[-=&Q*\\$z&**F*7$$\"3-GLLe g`!)**Fao$\"3QUE[zdB]**F*7$$\"33++]#G2A3\"F*$\"34/VY*\\)\\T**F*7$$\"3; LLL$)G[k6F*$\"3Wm?SibFK**F*7$$\"3[****\\7yh]7F*$\"3@5*[xi**=#**F*7$$\" 3)ommm)fdL8F*$\"3$p)RUf/@6**F*7$$\"3Wmmm,FT=9F*$\"3kmlJ7Qd**)*F*7$$\"3 \\LL$e#pa-:F*$\"37/\\#3&)Ht))*F*7$$\"3y******Rv&)z:F*$\"33L)o`'=Yv)*F* 7$$\"3ULLLGUYo;F*$\"3A+%zx%R8h)*F*7$$\"3Immm1^rZF*$\"3$f9@&y?c<)*F *7$$\"35+++++++?F*F+-%'COLOURG6&%$RGBG$\"#5!\"\"$\"\"!Fa[lF`[l-%+AXESL ABELSG6$Q\"x6\"Q!Ff[l-%%VIEWG6$;$!\"#F_[l$\"\"#F_[l%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" }}}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 86 "It's clear that the max of the abs olute value of the sixth derivative of cos(x) is 1. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "M := 1;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #>%\"MG\"\"\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 78 "Now we define th e function R6(x) and plot it over the interval x = -0.2 .. 0.2" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "R5 := x -> M /(5+1)! * abs(x - 0)^(5+1);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#R5Gf*6#%\"xG6\"6$%) operatorG%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7$$\"3?FLLL&4Nn'Ffq$\"3nx`xO\\&oA\"F^r7$$\"3X,+++:?Pv Ffq$\"3/A.Cw&4ka#F^r7$$\"3tjmm\"zM)>$)Ffq$\"3-cfJ:rL1YF^r7$$\"3M****** *pfa<*Ffq$\"3_^YMX!4xG)F^r7$$\"3-GLLeg`!)**Ffq$\"3eCu,fwus8Fcp7$$\"33+ +]#G2A3\"F*$\"3U`:pNu:JAFcp7$$\"3;LLL$)G[k6F*$\"3EeBS%)*3JY$Fcp7$$\"3[ ****\\7yh]7F*$\"3)y?Ox&=#RJ&Fcp7$$\"3)ommm)fdL8F*$\"3/r%f&*\\8A\"yFcp7 $$\"3Wmmm,FT=9F*$\"3$=dhjc`58\"F-7$$\"3\\LL$e#pa-:F*$\"3k;J#f3<#)f\"F- 7$$\"3y******Rv&)z:F*$\"3w7.m#p3'f@F-7$$\"3gmm;%)3;C;F*$\"3]_1!eKA%\\D F-7$$\"3ULLLGUYo;F*$\"3ectQ8p='*HF-7$$\"3&)****\\n'*33/$ \\MF-7$$\"3Immm1^rZF*$\"3!\\^-kN7*3oF-7$$\"32+]i0j\"[$>F*$\"3C$\\AXL\"G 'G(F-7$$\"3+++v.Uac>F*$\"339hU&Q?7z(F-7$$\"3!***\\(=5s#y>F*$\"3LOr^*)) ))\\K)F-7$$\"35+++++++?F*F+-%'COLOURG6&%$RGBG$\"#5!\"\"$\"\"!F_`lF^`l- %+AXESLABELSG6$Q\"x6\"Q!Fd`l-%%VIEWG6$;$!\"#F]`l$\"\"#F]`l%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" }}}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 223 "This graph represents upper bound s on the error for any x in [-0.2, 0.2]. So the bound for any x in [- 0.2, 0.2] is the maximum of this function over the entire interval. W e call the upper bound over the entire interval B:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "B = R5(0.2);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/%\"BG$\"+*)))))))))!#<" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 " So our bound on the error over the interval [-0.2,0.2] is B about 9*" }{XPPEDIT 18 0 "10^(-8);" "6#)\"#5,$\"\")!\"\"" }{TEXT -1 5 ". " }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 47 "Finally we want to plot the diffe rence between " }{XPPEDIT 18 0 "P[5];" "6#&%\"PG6#\"\"&" }{TEXT -1 81 "(x) and cos(x) to make sure the error is less than B over the interva l [-0.2,0.2]" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "convert(tay lor(cos(x),x=0,6),polynom);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,(\"\" \"F$*&#F$\"\"#F$*$)%\"xGF'F$F$!\"\"*&#F$\"#CF$)F*\"\"%F$F$" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "P4 := convert(taylor(cos(x),x=0,6), polynom);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#P4G,(\"\"\"F&*&#F&\"\" #F&*$)%\"xGF)F&F&!\"\"*&#F&\"#CF&)F,\"\"%F&F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "plot(abs(P4(x)-cos(x)),x=-0.2..0.2);" }}{PARA 13 "" 1 "" {GLPLOT2D 395 395 395 {PLOTDATA 2 "6%-%'CURVESG6$7[o7$$!\"# !\"\"$\"$*))!#57$$!+YG?y>F-$\"$J)F-7$$!+#p0k&>F-$\"$y(F-7$$!+Q&3Y$>F-$ \"$G(F-7$$!+$Q6G\">F-$\"$\"oF-7$$!+3-)[(=F-$\"$.'F-7$$!+M!\\p$=F-$\"$L &F-7$$!+h9H%z\"F-$\"$k%F-7$$!+))Qj^'***F-$\"#9F-7$$ !*]5*H\"*F-$\"\"(F-7$$!*I\"3&H)F-$\"\"%F-7$$!*Twp`(F-$\"\"$F-7$$!*P;bj 'F-$\"\"\"F-7$$!*Zh=(eF-$\"\"!F_s7$$!*G\\N)\\F-F^s7$$!*ZUs>%F-F^s7$$!* GRXL$F-F^s7$$!*$=/8DF-Fir7$$!*U&*el\"F-Fir7$$!)Wn(o)F-F^s7$$!(eV(>F-F^ s7$$\")f`@')F-F^s7$$\"*nZ)H;F-Fir7$$\"*Ky*eCF-F^s7$$\"*S^bJ$F-F^s7$$\" *0TN:%F-F^s7$$\"*7RV'\\F-Fir7$$\"*:#fkeF-F^s7$$\"*`4Nn'F-Fir7$$\"*],s` (F-Fdr7$$\"*zM)>$)F-$\"\"&F-7$$\"*qfa<*F-$\"\")F-7$$\"*1O0)**F-Feq7$$ \"+#G2A3\"F-$\"#AF-7$$\"+$)G[k6F-F[q7$$\"+7yh]7F-Ffp7$$\"+()fdL8F-$\"# yF-7$$\"+-FT=9F-F\\p7$$\"+Epa-:F-$\"$g\"F-7$$\"+Sv&)z:F-Fbo7$$\"+%)3;C ;F-$\"$b#F-7$$\"+GUYo;F-$\"$*HF-7$$\"+o'*33F-$\"$!oF-7$$\"+1j\"[$>F-F;7$$\"+/Uac>F-$\"$z(F-7$$\"+-@F y>F-$\"$K)F-7$$\"\"#F*F+-%'COLOURG6&%$RGBG$\"#5F*F^sF^s-%+AXESLABELSG6 $Q\"x6\"Q!Fj\\l-%%VIEWG6$;F(F^\\l%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" }}}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 16 "# end of section" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 345 "This graph displays two things. The error is always less than \+ or equal to the calculated upper error bound over the entire interval \+ and that the upper error bound is pretty close to the actual error for each value of x. While we may wish the upper error bound to describe the worst case scenerio, this worst case scenerio is often the case. \+ " }}}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 11 "Problem # 1" }}{PARA 0 "" 0 "" {TEXT -1 22 "a) Display a graph of " }{XPPEDIT 18 0 "exp(x) " "6#-%$expG6#%\"xG" }{TEXT -1 112 " along with it's first five (start ing at zero) Maclaurin Polynomial approximations over the interval x = 0..2. " }}{PARA 0 "" 0 "" {TEXT -1 89 "b) What is the error bound ov er this interval of the 4th degree Maclaurin Polynomial for " } {XPPEDIT 18 0 "exp(x)" "6#-%$expG6#%\"xG" }{TEXT -1 2 ". " }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 26 "c) Approximate the number " }{XPPEDIT 18 0 "exp(1);" "6#-%$expG6#\"\"\"" }{TEXT -1 129 " from the 4th degree Maclaurin Polynomial found in part (a) and verify that the error is less than the bound found in part (b). " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 105 "d) What is the smallest degree Maclaurin polynomial that will ensure the error in th e approximation for " }{XPPEDIT 18 0 "exp(x)" "6#-%$expG6#%\"xG" } {TEXT -1 13 "is less than " }{XPPEDIT 18 0 "10^(-12);" "6#)\"#5,$\"#7! \"\"" }{TEXT -1 27 " over the interval x=0..2. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 16 "e) Approximate " } {XPPEDIT 18 0 "exp(1)" "6#-%$expG6#\"\"\"" }{TEXT -1 97 " using the Ma claurin polynomial of degree found in part (d) and show that the error is less than " }{XPPEDIT 18 0 "10^(-12)" "6#)\"#5,$\"#7!\"\"" }{TEXT -1 2 ". " }}}}{MARK "0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }