[SOLVED] CSC30100 - Project03

30.00 $

Category:

Description

5/5 - (1 vote)

Calculate the Taylor polynomials centered at 0,

n f (k) (0) k     Tn (x)=k=0 k! (x) ,

for  f = cos(x) for the following 4 values of ,x

 1    2    3    4 

x∈  ,     ,     ,      which is equivalent to 10 10 10 10 j x =    , for j =1,2,3,4.

10

For each value of , j find the smallest integer  such thatn

j          j        12

Tn   −cos    <10   .

10       10 

Calculate the “exact” value using np.cos(x).  Present your results in a table and discuss them.   How do your errors compare to the error bounds for Taylor polynomials that we discussed in class? Remember that the error for a Taylor polynomial is given by its remainder term

(n+1)

f       (c)        n+1

Rn (x)= f x( )−Tn (x)=   (xa)

(n+1 !)