Week 5 Worksheet Solution

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

MATH 31B - Week 5 agus@math.ucla.

edu
Solutions to Week 5 Problems on Taylor Polynomials
Here are the complete solutions to some problems on Taylor polynomials in the worksheet.

6. Find the nth Taylor polynomial T n centered at a=1 for f ( x )=e2 x.

Solution: First find all its derivatives: f ' ( x )=2 e 2 x , f ' ' ( x ) =4 e2 x , f ' ' ' ( x )=8 e 2 x , … , f (n ) ( x )=2n e 2 x
Then we have:
f ( 1 ) =e2 , f ' ( 1 )=2 e 2 , f ' ' (1 ) =4 e2 , f ' ' ' ( 1 )=8 e 2 ,… , f (n ) ( 1 )=2n e 2
So the Taylor polynomial T n is given by:
f ' ( 1) f ' ' (1) 2 f (n ) ( 1 ) n
T n ( x )=f ( 1 )+ ( x−1 ) + ( x−1 ) + …+ ( x−1 )
1! 2! n!
2 n 2
2 2 4e ( 2 2e ( n
¿ e + 2 e ( x −1 )+ x−1 ) + …+ x−1 )
2 n!
7. Find an estimate for the error when the third Maclaurin polynomial T 3 ( x ) of f ( x )=e x is used to
approximate the value of e .

Solution:
Here T 3 ( x ) centered at a=0 is used to approximate f ( x )=e x at x=1.

Step 1: Find a value of K.


Find a number K such that |f (4 ) (u )| ≤ K for all u between 0 and 1. Note that |f (4 ) (u )|=eu, which is an
increasing function. So in [ 0,1 ] , its maximum value is e. Therefore, we can take K=e.

Step 2: Apply the error bound result


n+1 4
|x−a| |1−0| e
|f (1 )−T 3 ( 1 )|≤ K ( n+1 ) !
=e
4!
=
24
≈ 0.11

So an estimate for the error incurred is 0.11

8. Let T n be the nth Maclaurin polynomial for f ( x )=cos x. Find a value of n such that
|cos ( 0.1 )−T n ( 0.1 )|<10−6
Solution:
Here T n ( x ) centered at a=0 is used to approximate f ( x )=cos x at x=0.1.

Step 1: Find a value of K.


Find a number K such that |f (n +1) ( u )|≤ K for all u between 0 and 0.1. Note that |f (n +1) ( x )| is either
equal to |sin x| or |cos x| depending on whether n is even or odd. In either case, they are bounded
by 1, i.e. |f (n +1) ( u )|≤ 1. Therefore, we can take K=1.

Step 2: Apply the error bound result


|x−a|n+ 1 ( 0.1 )n+1
|f ( 0.1 )−T n ( 0.1 )|≤ K ( n+1 ) !
=
( n+1 ) !
Step 3: Find a value of n
We want the error above to be less than 10−6 . To find n, plug-in a few values of positive integers
n=1 ,2 , 3 , … to the above until you get something that is less than 10−6 .
When n = 3, you get ( 0.1 )4 /4 !=4.2 ×10−6. When n=4 , you get ( 0.1 )5 /5 !=8.3× 10−8. So the error
is less than 10−6 for n=4 (or higher).

You might also like