Taylor's Theorem: Remainder Formula and Error Bound Examples
Taylor's theorem with the Lagrange remainder: how close a Taylor polynomial is to f(x). Statement, error bound, graph and worked examples with e and sin x.
Series and multivariable theorems Updated 3 min read
At a glance
- Hypotheses
- f has n + 1 derivatives on an open interval I containing a, and x is in I
- Taylor polynomial
- P_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x - a)^k
- Remainder (Lagrange form)
- R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x - a)^{n+1} for some c between a and x
- Error bound
- |R_n(x)| \le \frac{M}{(n+1)!}|x - a|^{n+1} where |f^{(n+1)}| \le M
- Case n = 0
- The mean value theorem
- Course
- Calculus 2
On this page
Taylor's theorem says that a smooth function equals its Taylor polynomial plus an error term, and it gives that error term an exact form. That turns "the Taylor polynomial is a good approximation" into a guaranteed number of correct decimal places.
Statement of Taylor's theorem
Suppose f has derivatives up to order n + 1 on an open interval I containing a. Let
be the degree n Taylor polynomial of f at a. Then for every x in I there is a number c between a and x such that
This is the Lagrange form of the remainder. When a = 0 the polynomial is called a Maclaurin polynomial.
Taylor's inequality (the error bound)
You almost never know c, so you bound the derivative instead. If |f^{(n+1)}(t)| \le M for every t between a and x, then
The bound gets small fast because (n+1)! grows faster than any power.
What Taylor's theorem means
The remainder looks exactly like the next term of the Taylor series, except the derivative is evaluated at some point c instead of at a. For n = 0 the statement is f(x) = f(a) + f'(c)(x - a), which is the mean value theorem. Taylor's theorem is the higher-order version.
Why the hypotheses matter
Enough derivatives. The remainder formula uses f^{(n+1)}. For f(x) = |x| at a = 0, f'(0) does not exist, so there is not even a degree 1 Taylor polynomial.
A remainder that does not shrink. Taylor's theorem always holds when its hypotheses do, but it does not promise the error goes to 0. The function f(x) = e^{-1/x^2} (with f(0) = 0) has every derivative equal to 0 at x = 0, so every Taylor polynomial at 0 is the zero polynomial. The remainder R_n(x) = f(x) never shrinks, and the Taylor series converges to 0, not to f. A function equals its Taylor series only when R_n(x) \to 0.
Worked examples
Example 1: approximate e with P_4 and bound the error.
Step 1. For f(x) = e^x at a = 0, every derivative is e^x and equals 1 at 0. So
Step 2. On [0, 1], f^{(5)}(t) = e^t \le e < 3, so take M = 3.
Step 3. |R_4(1)| \le \frac{3}{5!}\cdot 1^5 = \frac{3}{120} = 0.025.
The true error is e - 2.70833 \approx 0.00995, comfortably inside the bound.
Example 2: \sin(0.1) to high accuracy.
The Maclaurin polynomial P_3(x) = x - \frac{x^3}{6} gives \sin(0.1) \approx 0.1 - \frac{0.001}{6} \approx 0.0998333. Since the x^4 coefficient of sine is 0, P_4 = P_3, so we may use R_4. Every derivative of \sin is bounded by M = 1:
So 0.0998333 is correct to at least six decimal places.
Example 3: how many terms for e^{0.5} within 0.001?
On [0, 0.5], e^t \le e^{0.5} < 2, so |R_n(0.5)| \le \frac{2\,(0.5)^{n+1}}{(n+1)!}.
| n | Bound \frac{2\,(0.5)^{n+1}}{(n+1)!} |
|---|---|
| 2 | \frac{2(0.125)}{6} \approx 0.042 |
| 3 | \frac{2(0.0625)}{24} \approx 0.0052 |
| 4 | \frac{2(0.03125)}{120} \approx 0.00052 |
The bound first drops below 0.001 at n = 4, so P_4(0.5) is accurate enough.
Common mistakes
- Using (n)! instead of (n+1)!. The remainder after a degree n polynomial uses the (n+1)st derivative and (n+1)!.
- Bounding the derivative at a only. M must bound |f^{(n+1)}| on the whole interval between a and x.
- Assuming the Taylor series always equals f. It does only when the remainder tends to 0.
Related theorems and guides
Taylor's theorem generalizes the mean value theorem. For building the polynomials and series themselves, see Taylor series and power series. In several variables, the second-order Taylor expansion uses mixed partial derivatives, which Clairaut's theorem says can be taken in either order.
Practice it now
Estimating with Taylor polynomials
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson