N N N (n+1) (n+1)
N N N (n+1) (n+1)
Background knowledge:
In the following statement, f (x) is a function, Tn (x) is its nth-degree Taylor polynomial centered
at a, and the remainder Rn (x) = f (x) − Tn (x).
Taylor’s Inequality: If f (n+1) is continuous and f (n+1) ≤ M between a and x, then:
M
|Rn (x)| ≤ |x − a|n+1
(n + 1)!
1. In this first example, you know the degree n of the Taylor polynomial, and the value of x,
and will find a bound for how accurately the Taylor Polynomial estimates the function.
(a) Write down the 2nd degree Taylor Polynomial for f (x) = ex centered at a = 0.
2
X f (n) (a) e0 0 e0 e0 x2
Solution: T2 (x) = (x − a)n = (x ) + (x1 ) + (x2 ) = 1 + x +
n! 0! 1! 2! 2
n=0
(b) If we want to use the Taylor Polynomial above to estimate e, what should x be?
(d) Find an upper bound for f 000 (x) for x between a and the value at which we are estimating
the function, that is, between 0 and 1. This is what we call M .
Solution: f 000 (x) = ex . Since ex is increasing in x, the largest value of f 000 (x) for x
between 0 and 1 occurs at the right-hand endpoint. Thus the maximum value is e1 = e.
Since e1 < 3, we will use M = 3 as our upper bound.
(e) Write down the error bound for R2 (x), filling in values for x, a, n and M . What does
this say about the accuracy of your estimate in part c?
3
Solution: |R2 (1)| = |f (1) − T2 (1)| ≤ |1 − 0|2+1 = 0.5
(2 + 1)!
1
Math 2300: Calculus II The error in Taylor Polynomial approximations
2. In this problem you’ll know the value of x and the accuracy you’re going for, and you will
find how large a degree n for the Taylor Polynomial is needed.
(a) Say that you want to estimate e to within 0.1. How many terms of the Taylor series
do you need to add up? This time first find a bound M for f (n+1) (x) between a and x
(notice you need to do this for arbitrary n). Then write down the error bound for Rn (x),
filling in values for x, a and M . Set this error bound to be less than 0.1 and solve for n.
Solution: f (n+1) (x) = ex for any n, and since ex is increasing in x, e1 is the largest
value of f (n) (x) for x between 0 and 1. Since e1 < 3, we will use M = 3 as our upper
bound. Taylor’s Inequality gives us
3 3
|Rn (1)| ≤ |1 − 0|n+1 =
(n + 1)! (n + 1)!
So we need to solve
3
≤ 0.1
(n + 1)!
We can’t solve this analytically, but a little trial and error shows that this inequality
holds for n+1 ≥ 5, thus n ≥ 4. So we need to use at least a 4th degree Taylor polynomial
3
in order to guarantee an estimate within 0.1 of the true value. In fact, since = .025,
5!
our accuracy will be within .025 of the true value.
(b) Add the number of terms you found were needed to get an estimate of e to within 0.1.
12 13 14
Solution: T4 (1) = 1 + 1 + 2 + 6 + 24 ≈ 2.71
3. In this problem you’ll know the degree n of the Taylor Polynomial and the accuracy you’re
going for, and you will find out how large x can be. Using the 5th degree Taylor Series for
sin x centered at a = 0 to estimate sin x, how large can x be to get an estimate within .0005?
Solution: f (6) (x) = − sin x and since | − sin x| ≤ 1 for any x, we will use M = 1 as our
1
upper bound. Taylor’s Inequality gives us |R5 (x)| ≤ |x − 0|5+1 , so we need to solve
6 (5 + 1)!
x
≤ .0005. Solving for x gives us |x6 | < .36, so −(.36)1/6 < x < (.36)1/6 , or about
6!
−.8434 < x < .8434. The largest value of x that will give us an estimate of sin x that is
within .0005 of the true value is x = (.36)1/6 .
2
Math 2300: Calculus II The error in Taylor Polynomial approximations
4. In this problem you show that a Taylor Series for a function actually converges to the function.
Show that the Taylor Series for f (x) = sin x converges to sin x for all x. This background
information will be useful:
xn
lim = 0 for all x.
n→∞ n!
Outline of strategy:
Solution: Because |f (n+1) (x)| is either sin x or cos x, |f (n+1) (x)| ≤ 1 for any x, a, or
n. Therefore we will use M = 1 as our upper bound.
More practice:
5. (a) Find the Taylor Series directly (using the formula for Taylor Series) for f (x) = ln(x + 1),
centered at a = 0.
3
Math 2300: Calculus II The error in Taylor Polynomial approximations
(b) How accurate will the estimate be if we use this series to estimate ln 4 with n = 5?
(c) Show that this series converges to ln(x + 1) on the interval (− 12 , 12 ). Note: do not use the
ratio test, since it only shows convergence of the series, not convergence to the correct
function. Instead, show that the limit of the error term is 0.
(Note: You could also show this by showing the alternating series error (that is,
the next term in the series) goes to zero.)
(d) For x = 14 , what degree Taylor polynomial do we need to use to guarantee an approxi-
mation correct to within 4 decimal places (that is, to within .00005)?
Solution: |f (n+1) (x)| = n! · (x + 1)−(n+1) , so between a = 0 and x = 1/4,
|f (n+1) (x)| ≤ n!
Therefore,
n! 1
|Rn (x)| ≤ |1/4|n+1 = |1/4|n+1
(n + 1)! n+1
1
Solving |1/4|n+1 ≤ .00005 gives us n ≥ 5. So we need to use a Taylor polyno-
n+1
mial of at least the 5th degree to get an approximation correct to within 4 decimal places.
(Note: This could also be found using the alternating series error term.)
4
Math 2300: Calculus II The error in Taylor Polynomial approximations
6. Show that the 6th degree Taylor Polynomial for cos x, centered at 0, gives values which are
accurate to at least four decimal places (to within .00005) if |x| < 1.
Solution: Because |f (n+1) (x)| is either sin x or cos x, 0 ≤ |f (n+1) (x)| ≤ 1 for any x or n.
Therefore we will use M = 1 as our upper bound. Using the fact that |x| < 1, we have
1 1
|R6 (x)| ≤ |x − 0|6+1 ≤ |1|7 ≤ .0002
(6 + 1)! 7!
Not good enough! I notice something very tricky: The 6th degree and 7th degree T.P. for
cos x are the same! So the error in the 6th degree T.P. is the same as the error for the 7th
degree. I can still use M = 1.
1 1
|R6 (x)| = |R7 (x)| ≤ |x − 0|6+1 ≤ |1|7 ≤ .0000249 < .00005
(7 + 1)! 8!
7. Find sin(35◦ ) to within 3 decimal places (to within .0005). Note that you have options here
about where to place the center a.
Solution: We’ll estimate this using a = 0, but it could also be done by centering about
a = 30◦ = π6 . First, we need to use radians, so we’re going to approximate sin (7π/36).
Second, we need to know what degree Taylor polynomial we should use to guarantee accuracy
to within .0005. Because |f (n+1) (x)| is either sin x or cos x, 0 ≤ |f (n+1) (x)| ≤ 1 for any x, a,
or n. Therefore we will use M = 1 as our upper bound, regardless of what n is.
If we use a = 0, then
1
|Rn (7π/36)| ≤ |7π/36|n+1
(n + 1)!
1
We need to solve |7π/36|n+1 ≤ .0005 for n. We can’t solve this analytically, but trial
(n + 1)!
and error shows that the answer is n ≥ 5.
Therefore
(7π/36)3 (7π/36)5
T5 (7π/36) = (7π/36) − + ≈ 0.57358
3! 5!
estimates sin(35◦ ) to within 3 decimal places.