(* CALCULUS 265 Honors Fall Semester 2000 8:00 to 8:50 MTTF Carver 0002 Instructor: Hentzel Office: 432 Carver Office Hours: 9:00-10:00 MTTF E-mail hentzel@iastate.edu phone 294-8141 Website http://www.math.iastate.edu/hentzel/honors.265 Thursday, November 30: Section 8.8 Previous Assignment: Find P(x) the taylor polynomial of degree 10 which approximates f[x]. The error formula says that the error can be captured as (11) f (z) n+1 error = --------- x 11! The value of z is unknown, but we do know that it lies between 0 and x. This means that if we graph the function over the interval of interest (11) f (z) --------- 11! we can look where it is largest. The maximum usually occurs at one end or in the middle. But it could occur in strange places and that is why we graph it. We do not really need to know the maximum. We only need to know a bound M. In our example, the interval of interest is (-0.1,0.1) and on the interval the maximum value of x is 0.1. Thus the error of the series approximation will be less than M*(0.1)^11 over the whole interval. To study the Taylor error formula, (a) graph f[x] and P[x] on the same graph for x in the range given. (b) Mark on the graph the interval of convergence. (c) What is the maximal error on the interval (-0.1,0.1) as given by the error formula. Do this for each of the following functions. (a) Sqrt[1+x] Plot range (-2,2). (b) Log[1+x] Plot range (-2,2). (c) Tan[x] Plot range (-Pi,Pi). *) f[x_] := Sqrt[1+x]; P[x_] = Normal[Series[f[x],{x,0,10}]]; temp = f[x]; Do[ temp = D[temp,x], {i,1,11}]; error[x_] = (0.1)^11 temp/11!; a1 = Plot[{f[x],P[x]},{x,-2,2}]; a2 = Plot[error[x],{x,-0.1,0.1}]; (* Main idea: You can bound the error for the Taylor polynomial! Key words: Taylor error formula. Goals: Develop some interesting in seeing the proof of the Taylor error formula. Taylor's error formula for a Maclaurin series is: The error for the degree n polynomial approximation at x=c is: (n+1) f (z) error = ---------- where z is between 0 and c. (n+1)! Proof: We wish to establish that the error for the degree n approximation of the series can be captured in the form f^(n+1) (z)/(n+1)! c^(n+1) where z is between 0 and c. The error at c is of course f[c] - P[c] = error at c. We choose to write this error in the form f[c] - P[c] = R for some constant R. We pull the following expression out of thin air. Do not worry where this expression came from. It seems to work well. (n) f"[t] 2 f [t] n f[c] - f[t] - f'[t] (c-t) - ---- (c-t) - ... - ------ (c-t) 2 n! (n+1) (c-t) -R ----- (n+1) c Notice that when t = 0 the expression is zero. (By choice of R) Notice when t=c the expression is zero. (By all of the (c-t) terms.) Now simply use the mean value theorem to say that the derivative is zero somewhere between 0 and c. Check it out. There are three ways to use this formula. The series for e^x is 1 + x + x^2/2 + x^3/3! + ... + x^n/n! + ... (a) Bound the error for the approximation e^x = 1 + x + x^2/2 + x^3/3! on the interval [0,1]. (b) How many terms should I use so that the error of the approximation on [0,1] is less than 0.00001? (c) Express the value of e to 6 decimal places. *)