 
 
 
 
 
   
The purpose of this lab is to use Maple to introduce you to Taylor polynomial approximations to functions, including some applications.
\\storage\academics\math\calclab
when you hit enter, you can then choose MA1023 and then choose the worksheet
Taylor_start_B14.mw
Remember to immediately save it in your own home directory. Once you've copied and saved the worksheet, read through the background on the internet and the background of the worksheet before starting the exercises.
 at
 at
 , written
, written  , to a smooth function
, to a smooth function  is to require
that
 is to require
that  and
 and  have the same value at
 have the same value at  . 
Furthermore, their derivatives at
. 
Furthermore, their derivatives at  must match up to order
 must match up to order
 . For example the Taylor polynomial of order three for
. For example the Taylor polynomial of order three for  at
 at
 would have to satisfy the conditions
 would have to satisfy the conditions     
 
 
The general form of the Taylor polynomial approximation of order  to
to  is given by the following
 is given by the following 
 is a smooth function in some open interval
containing
 is a smooth function in some open interval
containing  . Then the
. Then the  th degree Taylor polynomial of the
function
th degree Taylor polynomial of the
function  at the point
 at the point  is given by
 is given by  
 
 
 is used in the definition to stand for the value of the
 is used in the definition to stand for the value of the
 -th derivative of
-th derivative of  at
 at  . That is,
. That is, 
 ,
,
 , and so on. By convention,
, and so on. By convention, 
 . Note that
. Note that  is fixed and so the derivatives
 is fixed and so the derivatives  are
just numbers. That is, a Taylor polynomial has the form
 are
just numbers. That is, a Taylor polynomial has the form 
 
![$[c,d]$](img19.png) , we define the tolerance
, we define the tolerance  of
 of
 to be the maximum of the absolute error
 to be the maximum of the absolute error
 
![$[c,d]$](img19.png) .
. 
>with(CalcP7);
The exponential function can be approximated at a base point zero with a polynomial of order four using the following command.
>Taylor(exp(x),x=0,4);You might want to experiment with changing the order. To see
 and its fourth order polynomial use
 and its fourth order polynomial use 
>TayPlot(exp(x),x=0,{4},x=-4..4);
This plots the exponantial and three approximating polynomials.
>TayPlot(exp(x),x=0,{2,3,4},x=-2..2);
Notice that the further away from the base point, the further the polynomial diverges from the function. the amount the polynomial diverges i.e. its error, is simply the difference of the function and the polynomial.
>plot(abs(exp(x)-Taylor(exp(x),x=0,3)),x=-2..2);This plot shows that in the domain x from -2 to 2 the error around the base point is zero and the error is its greatest at x = 2 with a difference of over one. You can experiment with the polynomial orders to change the accuracy. If your work requires an error of no more than 0.2 within a given distance of the base point then you can plot your accuracy line y = 0.2 along with the difference of the function and the Taylor approximation polynomial.
>plot([0.2,abs(exp(x)-Taylor(exp(x),x=0,3))],x=-2..2,y=0..0.25);We knew this would have some of its error well above 0.2. Change the order from three to four. As you can see there are still some values in the domain close to x = 2 whose error is above 0.2. Now try an order of 5. Is the error entirely under 0.2 between x = -2 and x = 2? Larger orders will work as well but order five is the minimum order that will keep the error under 0.2 within the given domain.
 over the given
interval.
 over the given
interval. 
 , base point
, base point  , interval
, interval ![$[-2,2]$](img25.png) .
.
 , base point
, base point  , interval
, interval ![$[-0.9,0.9]$](img27.png) .
.
 , base point
, base point  , interval
, interval ![$[-0.9,0.9]$](img27.png) .
.
 , use the TayPlot command to plot the function and multiple Taylor polynomial approximations of various orders with base point
, use the TayPlot command to plot the function and multiple Taylor polynomial approximations of various orders with base point  on the same graph over the interval
 on the same graph over the interval 
 ; use a y-range from
; use a y-range from  to
 to  .
. 
 ?
?
 by observing overlap of Taylor polynomials on the plot of
 by observing overlap of Taylor polynomials on the plot of  ?
?
 
 
 
 
 
 
 .
.
 
 
 
 
