A14 · Lesson 16 · Taylor's theorem with remainder
How good is a polynomial approximation, guaranteed?
Engineers approximate all the time: for small angles, for a small exponent, a diode or a transistor by its tangent at the bias point. Taylor's theorem says exactly how wrong each approximation can be. The error of the degree-n Taylor polynomial is one more term of the series, with the derivative evaluated at some unknown point in between, and bounding that derivative bounds the error. It's the mean value theorem's big brother, and it's where every "" in A13 comes from.
- The dashed curve is the Taylor polynomial of about 0 of degree n; the marker is the point where the errors are measured.
- The readouts compare the true error with the Lagrange bound . The bound is always above the true error, and close to it.
- Raise n: near 0 the error collapses quickly; far from 0 it takes many more terms, because fights the factorial.
Predict
The approximation is used up to what angle if the error must stay below 1% of ?
About 0.245 rad. The next term of the series is , so the relative error is about , which reaches 0.01 at . Taylor's theorem turns "small" into a number.
Name it
Taylor's theorem
If f has n + 1 derivatives on an interval containing a and x, then
for some ξ between a and x (the Lagrange form of the remainder). So if between a and x,
With n = 0 this is the mean value theorem.
Standard bounds
| Approximation | Error bound |
|---|---|
| linearization | , with |
Where it's used
- Truncation errors of difference formulas and quadrature rules (A13).
- Newton's quadratic convergence: the linearization error is (lesson 53 proves the bound).
- Small-signal models of nonlinear devices: the neglected quadratic term sets the distortion.
Worked example
How many terms of give e to within ?
Show the solution
- Bound the remainder. With x = 1 and , the remainder after the degree-n term is below
- Try n = 8. Too big:
- Try n = 9. Small enough:
- Count the terms. So terms through , ten terms in all, suffice.
Answer ten terms, through , give e to within .
Worked example
Bound the error of at x = 0.5.
Show the solution
- Bound the next derivative. The next nonzero term involves the fifth derivative, at most 1 in size.
- Bound the error.
- Compare with the actual error. The actual error is : the bound is nearly exact, because the remainder is close to the next term of an alternating series.
Answer the error is at most , and it's actually .
Worked example
How many terms of give to within ?
Show the solution
- Use the alternating-series bound. At x = 0.5 the series alternates with terms that decrease, so the error after n terms is less than the next term:
- Try n = 14. Not enough:
- Try n = 15. Small enough: So 15 terms suffice.
- Compare with x = 1. At x = 1 the same series needs about a million terms for that accuracy, which is why libraries reduce the argument first.
Answer 15 terms give to within .
Check
Using , what's the Lagrange bound on the error of the degree-3 Taylor polynomial of at x = 2?
Check
Using the bound , what's the smallest degree n that gives e to within 1 × 10⁻⁷?
Check
Up to what angle is good to 0.1% (using relative error )?
Write units the way you normally would: 1.5 rad and 1500 mrad are the same answer.
Check
A function has 10. How far can its tangent line at a be from f at a distance 0.1 away?
Check
Bound the error of at x = 0.5.
Check
The remainder in Taylor's theorem uses at an unknown ξ. Why is it still useful?
Check
Approximate by Taylor polynomials at 0, with x = 0.5.
(a)
What bounds the error of ?
(b)
And of ?
Check
Expand about 0.
Step 1
What is its degree-2 Taylor polynomial?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is the next term?
Explain why
Why does the error of a Taylor polynomial look like the next term of the series?
Taylor's theorem says the error after the degree-n polynomial is exactly for some ξ between a and x. That's the formula for the next term, except that the derivative is evaluated at ξ instead of at a. When x is close to a, ξ is close to a too and the derivative barely changes, so the error is very nearly the first neglected term. Far from a, the derivative can vary a lot over the interval, and the bound uses its largest value there, which is why a Taylor polynomial is excellent near its center and can be poor far away.
Practice
Keep practicing
9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.