[go: up one dir, main page]

0% found this document useful (0 votes)
153 views1 page

Week 5 Worksheet Solution

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 1

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 𝑇𝑛 centered at 𝑎 = 1 for 𝑓(𝑥) = 𝑒 2𝑥 .

Solution: First find all its derivatives:


𝑓 ′ (𝑥) = 2𝑒 2𝑥 , 𝑓 ′′ (𝑥) = 4𝑒 2𝑥 , 𝑓 ′′′ (𝑥) = 8𝑒 2𝑥 , … , 𝑓 (𝑛) (𝑥) = 2𝑛 𝑒 2𝑥
Then we have:
𝑓(1) = 𝑒 2 , 𝑓 ′ (1) = 2𝑒 2 , 𝑓 ′′ (1) = 4𝑒 2 , 𝑓 ′′′ (1) = 8𝑒 2 , … , 𝑓 (𝑛) (1) = 2𝑛 𝑒 2
So the Taylor polynomial 𝑇𝑛 is given by:
𝑓 ′ (1) 𝑓 ′′ (1) 𝑓 (𝑛) (1)
𝑇𝑛 (𝑥) = 𝑓(1) + (𝑥 − 1) + (𝑥 − 1)2 + ⋯ + (𝑥 − 1)𝑛
1! 2! 𝑛!
4𝑒 2 2𝑛 𝑒 2
= 𝑒 2 + 2𝑒 2 (𝑥 − 1) + (𝑥 − 1)2 + ⋯ + (𝑥 − 1)𝑛
2 𝑛!
7. Find an estimate for the error when the third Maclaurin polynomial 𝑇3 (𝑥) of 𝑓(𝑥) = 𝑒 𝑥 is used to
approximate the value of 𝑒.

Solution:
Here 𝑇3 (𝑥) centered at 𝑎 = 0 is used to approximate 𝑓(𝑥) = 𝑒 𝑥 at 𝑥 = 1.

Step 1: Find a value of K.


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

Step 2: Apply the error bound result


|𝑥 − 𝑎|𝑛+1 |1 − 0|4 𝑒
|𝑓(1) − 𝑇3 (1)| ≤ 𝐾 =𝑒 = ≈ 0.11
(𝑛 + 1)! 4! 24
So an estimate for the error incurred is 0.11

8. Let 𝑇𝑛 be the nth Maclaurin polynomial for 𝑓(𝑥) = cos 𝑥. Find a value of n such that
|cos(0.1) − 𝑇𝑛 (0.1)| < 10−6

Solution:
Here 𝑇𝑛 (𝑥) centered at 𝑎 = 0 is used to approximate 𝑓(𝑥) = cos 𝑥 at 𝑥 = 0.1.

Step 1: Find a value of K.


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

Step 2: Apply the error bound result


|𝑥 − 𝑎|𝑛+1 (0.1)𝑛+1
|𝑓(0.1) − 𝑇𝑛 (0.1)| ≤ 𝐾 =
(𝑛 + 1)! (𝑛 + 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
𝑛 = 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 𝑛 = 4, you get (0.1)5 ⁄5! = 8.3 × 10−8 . So the
error is less than 10−6 for 𝒏 = 𝟒 (or higher).

You might also like