A Taylor polynomial gives an approximation, but an approximation is only useful if you know how far off it might be. The alternating series error bound handles alternating series. The Lagrange error bound works for any Taylor polynomial, alternating or not, as long as you can put a ceiling on the next derivative. It’s a favourite on the AP BC exam.
If Pn is the nth-degree Taylor polynomial for f about x=a, then
∣Rn(x)∣=∣f(x)−Pn(x)∣≤(n+1)!M∣x−a∣n+1
where M is any number with f(n+1)(z)≤M for every zbetween a and x.
Notice the pattern: the bound looks just like the next term of the Taylor polynomial, (n+1)!f(n+1)(a)(x−a)n+1, except that f(n+1)(a) is replaced by M, the largest the (n+1)th derivative can be on the interval.
M only has to be an upper bound for f(n+1) on the interval from a to x; it doesn’t have to be the smallest one. A slightly bigger M gives a slightly weaker, but still true, bound. Common choices:
Situation
Good choice of M
f(n+1) is ±sin or ±cos
M=1
∣f(n+1)∣ is increasing or decreasing on the interval
its value at the endpoint where it’s largest
f(n+1)(x)=ex on [0,b]
eb, rounded up (e.g. e<3)
The problem gives "∣f(n+1)(x)∣≤K"
M=K
Never round M down: a bound that’s too small isn’t a bound.
To guarantee an error less than some tolerance, increase n until (n+1)!M∣x−a∣n+1 drops below it. Because of the factorial, this usually happens quickly.
Use P3(x)=x−6x3 to approximate sin0.5 (radians), and use the Lagrange error bound to show the error is less than 0.003.
Solution.
sin0.5≈0.5−60.125≈0.479167
Here n=3, so you need the fourth derivative: f(4)(x)=sinx. Since ∣sinz∣≤1 for every z, take M=1.
∣R3(0.5)∣≤4!1∣0.5−0∣4=240.0625≈0.0026<0.003
(Check: sin0.5≈0.479426, so the actual error is about 0.00026, well within the bound. Since the x4 coefficient of sine is 0, this is also P4, and using n=4 would give the even smaller bound 5!0.55≈0.00026.)
A function f has a third-degree Taylor polynomial about x=1 called P3. It is known that f(4)(x)≤6 for 1≤x≤1.5. Show that P3(1.4) approximates f(1.4) with an error less than 0.01.
Using the wrong derivative. For Pn, the bound uses the (n+1)th derivative and (n+1)!, one step past the polynomial. For P2, use f′′′ and 3!.
Evaluating M at the centre instead of finding the maximum.M must bound f(n+1) on the whole interval from a to x. In Example 2 the maximum happened to be at the centre, but for ex on [0,0.5] it’s at 0.5.
Rounding M down.e0.2≈1.2214, so M=1.22 is too small. Use 1.23, 1.3, or even 3.
Forgetting the absolute value or using x instead of x − a. The bound uses ∣x−a∣n+1. For a polynomial about x=1 evaluated at 0.9, that’s ∣−0.1∣n+1, not 0.9n+1.
Thinking the bound is the error. The bound says the error is no more than this amount. The actual error is often much smaller.
Using the alternating series bound when the terms don’t alternate. For ln0.9, the Taylor terms about 1 are all negative, so only the Lagrange error bound applies.
1. (Warm-up) The approximation cos0.3≈1−20.32=0.955 uses P2 for cosx about 0. Find a Lagrange error bound.
Solution
n=2, so use f′′′(x)=sinx, with ∣sinz∣≤1, so M=1:
∣R2(0.3)∣≤3!1(0.3)3=60.027=0.0045
2. (Warm-up) A function has f(4)(x)≤10 for all x. Its third-degree Maclaurin polynomial is used to approximate f(0.5). Find an upper bound for the error.
3. (Warm-up)P2(x)=1+x+2x2 is used to approximate e0.5. Explain why M=2 is a valid choice, and find the error bound.
Solution
f′′′(x)=ex is increasing, so on 0≤z≤0.5 its largest value is e0.5≈1.649<2. So M=2 works.
∣R2(0.5)∣≤3!2(0.5)3=60.25≈0.0417
(Actual: P2(0.5)=1.625 and e0.5≈1.6487, an error of about 0.0237.)
4. (Core) In the Taylor polynomials lesson, P3(0.2)≈1.221333 was used to approximate e0.2. Use the Lagrange error bound with M=1.3 to show the error is less than 0.0001.
Solution
f(4)(x)=ex is increasing, so on 0≤z≤0.2 its maximum is e0.2≈1.2214<1.3.
(c) No. f(1.3) must be within 0.054 of 1.835, that is, between 1.781 and 1.889. Since ∣1.9−1.835∣=0.065>0.054, f(1.3) cannot be 1.9.
7. (Core) Using M=1, what is the smallest degree n for which the Lagrange error bound guarantees that the Maclaurin polynomial for sinx approximates sin1 within 0.001?
Solution
Every derivative of sinx is ±sinx or ±cosx, so M=1, and ∣x−a∣=1:
∣Rn(1)∣≤(n+1)!1
You need (n+1)!>1000. Since 6!=720 and 7!=5040, n+1=7, so n=6. (The degree 6 polynomial is the same as the degree 5 one, x−6x3+120x5, because sine has no x6 term.)
8. (Challenge) Use the third-degree Taylor polynomial for lnx about x=1 to approximate ln0.9, and find a Lagrange error bound. Why can’t you use the alternating series error bound here?
Solution
The derivatives of lnx at 1 are f′(1)=1, f′′(1)=−1, f′′′(1)=2, so
P3(x)=(x−1)−2(x−1)2+3(x−1)3
With x−1=−0.1:
ln0.9≈−0.1−0.005−0.000333≈−0.105333
Next, f(4)(x)=−x46, and x46 is decreasing, so on 0.9≤z≤1 its maximum is at z=0.9: M=0.946≈9.145 (use M=9.2 to be safe).
∣R3(0.9)∣≤4!9.2∣−0.1∣4=249.2(0.0001)≈0.0000383
At x=0.9 every term −0.1, −0.005, −0.000333, … is negative, so the series isn’t alternating and the alternating series bound doesn’t apply. (Check: ln0.9≈−0.105361, an error of about 0.0000272.)
9. (Challenge) Use P6(1)=1+1+2!1+3!1+4!1+5!1+6!1 and the Lagrange error bound with M=3 to show that 2.718<e<2.719.
SolutionP6(1)=7201957≈2.718056
As in Example 4, M=3 works on 0≤z≤1:
∣R6(1)∣≤7!3=50403≈0.000595
So e≤2.718056+0.000595=2.718651<2.719.
Also, every term of the Maclaurin series for e1 is positive, so the remainder (the sum of the terms left out) is positive: e>P6(1)≈2.718056>2.718.