home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Mathematics / Notebooks / URichCalculusII / 8 / Lab8.ma next >
Text File  |  1992-04-13  |  18KB  |  267 lines

  1. (*^
  2.  
  3. ::[paletteColors = 128; automaticGrouping; currentKernel; 
  4.     fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e8,  24, "Times"; ;
  5.     fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6,  18, "Times"; ;
  6.     fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, L1, e6,  14, "Times"; ;
  7.     fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20,  18, "Times"; ;
  8.     fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L1, a15,  14, "Times"; ;
  9.     fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L1, a12,  12, "Times"; ;
  10.     fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  11.     fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  10, "Times"; ;
  12.     fontset = input, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1,  12, "Courier"; ;
  13.     fontset = output, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5,  12, "Courier"; ;
  14.     fontset = message, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  15.     fontset = print, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  16.     fontset = info, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1,  12, "Courier"; ;
  17.     fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1,  12, "Courier"; ;
  18.     fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1,  10, "Times"; ;
  19.     fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  20.     fontset = Left Header, nohscroll, cellOutline,  12;
  21.     fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1,  12;
  22.     fontset = Left Footer, cellOutline, blackBox,  12;
  23.     fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  10, "Times"; ;
  24.     fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  25.     fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12, "Courier"; ;
  26.     fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  27.     fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  28.     fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  29.     fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;
  30.     fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1,  12;]
  31. :[font = title; inactive; Cclosed; preserveAspect; startGroup; ]
  32. Lab 8:  Taylor Series
  33. :[font = text; inactive; preserveAspect; ]
  34. The Taylor series of a function is a power series that has the same values as the function on some interval.  We studied Taylor series in Sections 10.8 of Stein's textbook.  This lab shows how Mathematica works with Taylor series.  Pages 216-222 in the Crooke/Ratcliffe Guidebook cover some of this material.
  35. ;[s]
  36. 5:0,0;4,1;17,2;193,3;204,4;308,-1;
  37. 5:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  38. :[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
  39. Taylor Polynomials
  40. :[font = text; inactive; preserveAspect; ]
  41. A Taylor polynomial is a truncation of a Taylor series.  Mathematica's Series command produces Taylor polynomials for a given function.
  42. ;[s]
  43. 7:0,0;2,1;19,2;57,3;68,4;70,5;78,6;136,-1;
  44. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  45. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  46. Example
  47. :[font = text; inactive; preserveAspect; ]
  48. Consider the sine function
  49. :[font = input; preserveAspect; ]
  50. f[x_] := Sin[x]
  51. :[font = input; preserveAspect; ]
  52. Plot[ f[x], {x,-Pi,Pi} ];
  53. :[font = text; inactive; preserveAspect; ]
  54. The following command produces the 8th Taylor polynomial of f centered at 0
  55. ;[s]
  56. 3:0,0;59,1;62,2;76,-1;
  57. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  58. :[font = input; preserveAspect; ]
  59. Series[ f[x], {x,0,8} ]
  60. :[font = text; inactive; preserveAspect; ]
  61. The last term, O[x]^9, is an asymptotic experssion.  It merely indicates that the complete Taylor series consists of the preceding polynomial followed by terms all of which have x^9 as a factor.
  62. ;[s]
  63. 6:0,0;14,1;21,2;29,3;50,4;177,5;194,-1;
  64. 6:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;
  65. :[font = text; inactive; preserveAspect; ]
  66. Notice that the sine's Taylor polynomial only has terms with odd powers (1, 3, 5, 7, etc.).  That is because the sine is an "odd" function:  sin(-x) = - sin x.  Its graph is symmetric about the origin, and so are the graphs of all its Taylor polynomials.
  67. ;[s]
  68. 3:0,0;139,1;158,2;255,-1;
  69. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  70. :[font = text; inactive; preserveAspect; ]
  71. Use the Normal command to convert the asymptotic expression into a legitimate polynomial:
  72. ;[s]
  73. 3:0,0;7,1;15,2;89,-1;
  74. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  75. :[font = input; preserveAspect; ]
  76. P[x_] = Normal[%]
  77. :[font = text; inactive; preserveAspect; ]
  78. Note that this definition requires a simple equals sign—not the usual colon-equals sign.
  79. ;[s]
  80. 3:0,0;56,1;59,2;89,-1;
  81. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  82. :[font = text; inactive; preserveAspect; ]
  83. Now graph the Taylor polynomial
  84. :[font = input; preserveAspect; ]
  85. Plot[ P[x], {x,-Pi,Pi} ];
  86. :[font = text; inactive; preserveAspect; ]
  87. P[x] looks a lot like the sine curve!
  88. ;[s]
  89. 2:0,0;5,1;38,-1;
  90. 2:1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  91. :[font = text; inactive; preserveAspect; ]
  92. We can see how closly the sine curve and its Taylor polynomials agree by plotting them together on the same graph.
  93. :[font = text; inactive; pageBreak; preserveAspect; ]
  94. First, compare the Taylor polynomial of degree 1
  95. :[font = input; preserveAspect; ]
  96. P[x_] = Normal[ Series[ f[x], {x,0,1} ] ]
  97. :[font = text; inactive; preserveAspect; ]
  98. The Taylor polynomial of degree 1 is simply the line y = x
  99. :[font = input; preserveAspect; ]
  100. Plot[ {f[x],P[x]}, {x,-Pi,Pi} ];
  101. :[font = text; inactive; preserveAspect; ]
  102. These two functions, y = sin x and y = x, have the same Y-intercept (0) and the same slope (1) at x=0.  In other words, P[x] is the best-fitting polynomial of degree 1.
  103. ;[s]
  104. 7:0,0;20,1;31,2;34,3;40,4;119,5;125,6;169,-1;
  105. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  106. :[font = text; inactive; preserveAspect; ]
  107. Here is the sine's Taylor polynomial of degree 3
  108. :[font = input; preserveAspect; ]
  109. P[x_] = Normal[ Series[ f[x], {x,0,3} ] ]
  110. :[font = input; preserveAspect; ]
  111. Plot[ {f[x],P[x]}, {x,-Pi,Pi} ];
  112. :[font = text; inactive; preserveAspect; ]
  113. It is the best-fitting (near x=0) polynomial of degree 3.
  114. :[font = text; inactive; preserveAspect; ]
  115. Here is the best fitting polynomial of degree 5
  116. :[font = input; preserveAspect; ]
  117. P[x_] = Normal[ Series[ f[x], {x,0,5} ] ]
  118. :[font = input; preserveAspect; ]
  119. Plot[ {f[x],P[x]}, {x,-Pi,Pi} ];
  120. :[font = text; inactive; preserveAspect; ]
  121. Notice, as the degree of the Taylor polynomial increases, the extent to which the polynomial and the sine curve agree expands.
  122. :[font = text; inactive; preserveAspect; ]
  123. Here is the Taylor polynomial of degree 7
  124. :[font = input; preserveAspect; ]
  125. P[x_] = Normal[ Series[ f[x], {x,0,7} ] ]
  126. :[font = input; preserveAspect; ]
  127. Plot[ {f[x],P[x]}, {x,-Pi,Pi} ];
  128. :[font = text; inactive; preserveAspect; ]
  129. These two graphs seem to coincide on almost the entire interval.
  130. :[font = input; preserveAspect; ]
  131. P[x_] = Normal[ Series[ f[x], {x,0,9} ] ]
  132. :[font = input; preserveAspect; ]
  133. Plot[ {f[x],P[x]}, {x,-Pi,Pi} ];
  134. :[font = text; inactive; preserveAspect; ]
  135. Now the two curves seem indistinguishable throughout the interval [-Pi,Pi].  Actually, P[x] = f[x] only at x=0.  But they are so close at other x-values in this interval that their graphs cannot be distinguished at this resolution.
  136. ;[s]
  137. 7:0,0;65,1;74,2;86,3;99,4;106,5;110,6;232,-1;
  138. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  139. :[font = text; inactive; preserveAspect; ]
  140. Of course, we can detect the difference between the curves if we look closer
  141. :[font = input; preserveAspect; ]
  142. Plot[ {f[x],P[x]}, {x,1.999,2.001} ];
  143. :[font = text; inactive; preserveAspect; ]
  144. We can also see that the Taylor polynomial is still different from f on a larger interval
  145. :[font = input; preserveAspect; ]
  146. Plot[ {f[x],P[x]}, {x,-2Pi,2Pi} ];
  147. :[font = text; inactive; pageBreak; preserveAspect; ]
  148. Compare again the sine curve with its 5th Taylor polynomial
  149. :[font = input; preserveAspect; ]
  150. P[x_] = Normal[ Series[ f[x], {x,0,5} ] ]
  151. :[font = input; preserveAspect; ]
  152. Plot[ {f[x],P[x]}, {x,-Pi,Pi} ];
  153. :[font = text; inactive; preserveAspect; endGroup; ]
  154. To get a better estimate on the extent to which the function and its polynomial agree, click on the graph, and then move the cursor (with the mouse) near the place where the curves separate, while holding down the Command key.  You will see the coordinates of the cursor displayed at the lower right corner of the window.  This way, you should be able to conclude that the two curves agree on the interval -1.7 £ x £ 1.7, approximately.
  155. ;[s]
  156. 9:0,0;214,1;221,2;405,3;411,4;412,5;415,6;416,7;420,8;436,-1;
  157. 9:1,11,8,Times,0,12,0,0,0;1,11,9,Helvetica,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  158. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  159. Exercises
  160. :[font = text; inactive; preserveAspect; ]
  161. Compare each of the following functions with its Taylor polynomials centered at x=0.  Determine the interval on which the function agrees with its 5th Taylor polynomial
  162. ;[s]
  163. 3:0,0;79,1;83,2;169,-1;
  164. 3:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  165. :[font = text; inactive; preserveAspect; ]
  166. 1.  f[x_] := Exp[-x^2]
  167. :[font = text; inactive; preserveAspect; ]
  168. 2.  f[x_] := Log[1+x^2]
  169. :[font = text; inactive; preserveAspect; ]
  170. 3.  f[x_] := Tan[x]
  171. :[font = text; inactive; preserveAspect; ]
  172. 4.  f[x_] := Sec[x]
  173. :[font = text; inactive; preserveAspect; endGroup; endGroup; ]
  174. 5.  f[x_] := 4 + 9x - 5x^2 + 3x^4
  175. :[font = section; inactive; Cclosed; pageBreak; preserveAspect; startGroup; ]
  176. Taylor's Theorem
  177. :[font = text; inactive; preserveAspect; ]
  178. Taylor's Theorem gives us a remainder term that allows us to estimate how far apart the function is from its Taylor polynomial at any x.  The (Cauchy) formula for the remainder term is:
  179.                 R = M x^(n+1)/(n+1)!
  180.                 
  181. where M is a bound on the absolute value of the (n+1)st derivative of f on the given interval.
  182. ;[s]
  183. 10:0,0;28,1;43,2;186,3;190,4;216,5;221,6;224,7;285,8;288,9;310,-1;
  184. 10:1,11,8,Times,0,12,0,0,0;1,10,8,Times,2,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,1,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  185. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  186. Example
  187. :[font = text; inactive; preserveAspect; ]
  188. Consider the sine function again:  Sin[x]
  189. ;[s]
  190. 2:0,0;33,1;41,-1;
  191. 2:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;
  192. :[font = text; inactive; preserveAspect; ]
  193. To apply the remainder formula, we first need to get a bound M on the absolute value of the (n+1)st derivative.  In many case, that is very difficult, and in some cases impossible.  However, for the sine function it is trivial: since -1 £ sin x £ 1 and -1 £ cos x £ 1 for all x, all dreivatives of the sine are bounded between -1 and 1.  So the value M=1 is a valid bound.  Thus, the remainder from using the nth Taylor polynomial to approximate the sine function at x is:
  194. ;[s]
  195. 17:0,0;60,1;63,2;87,3;92,4;237,5;238,6;245,7;246,8;256,9;257,10;264,11;265,12;350,13;355,14;466,15;469,16;472,-1;
  196. 17:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,0,0,Symbol,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  197. :[font = input; preserveAspect; ]
  198. R[n_,x_] := x^(n+1)/(n+1)!
  199. :[font = input; preserveAspect; ]
  200. R[n,x]
  201. :[font = text; inactive; preserveAspect; ]
  202. So, suppose now that we want to approximate the sine function by one of its Taylor polynomials, and we want the approximation to be correct to 8  decimal places for all x between -Pi and Pi.  Which Taylor polynomials will give us that degree of accuracy?
  203. ;[s]
  204. 7:0,0;168,1;171,2;178,3;183,4;186,5;189,6;255,-1;
  205. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  206. :[font = text; inactive; preserveAspect; ]
  207. All we have to do is find which value of n will make R[n,x] < 5*10^-9 for all x between -Pi and Pi.  
  208. This will hold if n is big enough to make R[n,Pi] < 5*10^-9.
  209. ;[s]
  210. 11:0,0;52,1;70,2;77,3;80,4;87,5;92,6;95,7;98,8;143,9;161,10;163,-1;
  211. 11:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  212. :[font = input; preserveAspect; ]
  213. Table[ { n, R[n,N[Pi]] }, {n,1,20} ]  //  TableForm
  214. :[font = text; inactive; preserveAspect; ]
  215. This shows that, once n is greater than 18, the remainder R[n,x] will be less than 5*10^-9.  Thus, if we use the 19th Taylor polynomial to approximate sin x, then our approximations will be correct to 8 decimal places for all x between -Pi and Pi.
  216. ;[s]
  217. 15:0,0;21,1;24,2;57,3;65,4;82,5;90,6;150,7;156,8;225,9;228,10;235,11;240,12;243,13;246,14;248,-1;
  218. 15:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  219. :[font = input; preserveAspect; ]
  220. f[x_] := Sin[x];
  221. P[x_] = Normal[ Series[ Sin[x],{x,0,19} ] ]
  222. :[font = text; inactive; pageBreak; preserveAspect; ]
  223. Now we can verify our conclusion directly.  Here is a table of value for f[x], P[x], and their difference, for values of x near Pi (where the difference will be the greatest)
  224. ;[s]
  225. 7:0,0;72,1;83,2;120,3;123,4;127,5;131,6;175,-1;
  226. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  227. :[font = input; preserveAspect; ]
  228. N[ Table[{f[x],P[x],f[x]-P[x]},{x,3.00,3.15,0.01}], 10]  // 
  229.     TableForm
  230.     
  231. :[font = text; inactive; preserveAspect; ]
  232. Clearly, the polynomial P[x] is within 5*10^-9 for all x in this range.
  233. ;[s]
  234. 5:0,0;23,1;29,2;54,3;57,4;72,-1;
  235. 5:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  236. :[font = text; inactive; preserveAspect; endGroup; ]
  237. This table also shows that, the smaller x is, the closer the agreement will be between f[x] and P[x].
  238. ;[s]
  239. 5:0,0;86,1;92,2;95,3;100,4;102,-1;
  240. 5:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  241. :[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
  242. Exercises
  243. :[font = text; inactive; preserveAspect; ]
  244. 1.  Determine which Taylor polynomials will approximate Sin[x] accurately to
  245.      4 decimal places in the range -Pi to Pi.
  246. ;[s]
  247. 7:0,0;55,1;63,2;111,3;116,4;118,5;121,6;123,-1;
  248. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  249. :[font = text; inactive; preserveAspect; ]
  250. 2.  Determine which Taylor polynomials will approximate Sin[x] accurately to
  251.      12 decimal places in the range 0 to Pi/2.
  252. ;[s]
  253. 7:0,0;55,1;63,2;112,3;115,4;117,5;122,6;124,-1;
  254. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  255. :[font = text; inactive; preserveAspect; ]
  256. 3.  Determine which Taylor polynomials will approximate Log[1+x] accurately to
  257.      4 decimal places in the range 0 to 1.
  258. ;[s]
  259. 7:0,0;55,1;65,2;113,3;116,4;118,5;120,6;122,-1;
  260. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  261. :[font = text; inactive; preserveAspect; endGroup; endGroup; endGroup; ]
  262. 4.  Determine which Taylor polynomials will approximate Exp[-x^2] accurately to
  263.      8 decimal places in the range 0 to 1.
  264. ;[s]
  265. 7:0,0;55,1;66,2;114,3;117,4;119,5;121,6;123,-1;
  266. 7:1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;1,10,8,Courier,0,12,0,0,0;1,11,8,Times,0,12,0,0,0;
  267. ^*)