{VERSION 4 0 "IBM INTEL NT" "4.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 "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 } {PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 }{PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 1 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "Author" 0 19 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 8 8 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 19 "Taylor polynomials " }} {PARA 19 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 51 "Taylor p olynomials can be computed by the command " }{MPLTEXT 1 0 6 "series" }{TEXT -1 113 ". This command computes Taylor series of functions u p to any given degree. The Maple output for the command " }{MPLTEXT 1 0 6 "series" }{TEXT -1 312 " has the data type of series. In parti cular it is not a polynomial. In order to be able to plot the graph \+ of the corresponding Taylor polynomial, we must convert the resulting \+ Taylor series into a polynomial. That is done by the command convert. The following example illustrates the use of the commands. " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "f:=unapply(sin(x),x); # define the function for which we compute Taylor poylnomials" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 117 "ser ies(f(x),x=0); #computes the Taylor series expansion and shows the Ta ylor polynomial of degree 6 (default degree)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 102 "series(f(x),x=0,10); #computes the Taylor serie s expansion and shows the Taylor polynomial of degree 9" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 110 "The following line computes Taylor polynomials of order 3, 4, ..., 15 for the function f and gives the names " }{XPPEDIT 18 0 "P[3] " "6#&%\"PG6#\"\"$" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "P[4]" "6#&%\"PG6# \"\"%" }{TEXT -1 8 ", ... , " }{XPPEDIT 18 0 "P[15]" "6#&%\"PG6#\"#:" }{TEXT -1 10 " for them." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "for n from 3 to 15 do P[n]:=convert(series(f(x),x=0,n+1),polynom):od: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 78 "Let us next plot the function f together with some \+ of its Taylor polyonmials." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "plot([f(x),P[5],P[10],P[15]],x=-3*Pi..3*Pi,y=-5..5,\ncolor = [blac k, green,red,blue],thickness=3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "The conclusio n is that " }{TEXT 256 76 "the higher order of a Taylor polynomial is, the better the approximation is." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 "Exercises" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 76 "Compute and plot Taylor polynomials of degree 5, 10 an d 15 for the function " }{XPPEDIT 18 0 "f(x) = cos(x)" "6#/-%\"fG6#%\" xG-%$cosG6#F'" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 76 "Compute and plot Taylor po lynomials of degree 5, 10 and 15 for the function " }{XPPEDIT 18 0 "f( x) = exp(x)" "6#/-%\"fG6#%\"xG-%$expG6#F'" }{TEXT -1 1 "." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}} {MARK "0 0 0" 8 }{VIEWOPTS 1 1 0 2 1 1805 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }