MME 523      October 7, 2003

 

Numerical and Taylor Series

Preliminary   What does it mean for a series to converge???

 

Part One – Numerical Series

 

The goal here is to investigate the convergence of numerical series using Excel.  This is both easy to do and quite illustrative!

 

Please set up spreadsheets to show the convergence of the series below:

 

a)                                            b)      

 

 

 

c)        

 

 

Please indicate how many terms it took you to achieve 4 decimal place accuracy.

 

Part Two   Taylor Series of a Function

 

Please get out the calculus book and review the basics on this…..

 

The foundation of this is that for an analytic function f(x), near a base point x=a,  it may be approximated by polynomials according to the following formula:

 

f(x)   =  f(a)  + f’(a)(x-a)   +  f’’(a) (x-a)2/2  + . . . +  f(n)(a) (x-a)n/n! +  Rn(x)

 

where Rn(x)  is the remainder, or error.  This means the order n+1 approximation is given by

 

f(x)   » f(a)  + f’(a)(x-a)   +  f’’(a) (x-a)2/2  + . . . +  f(n)(a) (x-a)n/n!

 

where the reader should note we have switched from equality to approximation.

 

The goal here is to use Maple to investigate the role that order (n)  and x play in accuracy of the approximation.

You will need the following Maple code (or something similar) to get Maple to generate Taylor polynomials  (unless you want to do it by hand….):

 

(comments in green)

> f:=x->exp(2*x);         (set up function  e2x)

> taylor(f(x),x=0,3);    develop Taylor Series of order 3                             near a=0

> t1:=convert(",polynom);   chop off the remainder part

> plot({f,t1},x=0..0.5);    plot both so you can compare

> plot(abs(f-t1),x=0..1);   plot the error

 

The capability of plotting the error is a really nice feature!!

 

Problems:

 

1.  For the function  ln(1+x),  a=0, and interval [0, 10]  plot the 1st, 2nd, 3rd and 4th order Taylor polynomials on the same graph with it.

 

2. For the function below,

 

                        f(x) =  e-2x

 

a) if you take a=0  and limit the range of x to  [0,3] what order Taylor Series is needed to have an error of no more than .01.

 

b)  same question but  the interval is  [0, 5]

 

c)  same question but the interval is  [0, 10]

 

Note:  you can plot a horizontal line y= .05, for example, along with another function with a simple command like

 

            >  plot(  { err(x),   .05} ,  x=0..5);

 

3.  What conclusions can you draw about the role of the order and the size of the interval as they relate to one another??

 

 

Comment:  at this stage of the course, a common thread runs through the material.  We take complex objects and approximate them with simple objects.  Please remark on this.