01 / 21

Lagrange
Error Bound

Learn how to bound the error when approximating functions with Taylor polynomials, and guarantee accuracy to a desired precision.

AP Calculus BC

Why Do We Need Error Bounds?

Taylor polynomials let us approximate complicated functions with simple polynomials. But every approximation carries error: the difference between the true value and the polynomial's value. The critical question is: how large can that error be?

Quick Review: Taylor Polynomials

The \(n\)-th degree Taylor polynomial of \(f(x)\) centered at \(x = c\) is:

$$ P_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(c)}{k!}(x - c)^k $$
\(f^{(k)}(c)\)
The \(k\)-th derivative of \(f\) evaluated at the center \(c\)
\(k!\)
\(k\) factorial, which grows rapidly and shrinks each term
\((x - c)^k\)
Distance from center raised to the \(k\)-th power

Defining the Remainder

The remainder (or error) is the difference between the actual function and the Taylor polynomial:

$$ R_n(x) = f(x) - P_n(x) $$
\(f(x)\) \(P_n(x)\) \(R_n\) \(c\) \(x\)

The Lagrange Error Bound

If \(f\) has derivatives of all orders on an interval \(I\) containing \(c\) and \(x\), and if \(M\) is a number such that \(|f^{(n+1)}(t)| \leq M\) for all \(t\) between \(c\) and \(x\), then:

$$ |R_n(x)| \leq \frac{M}{(n+1)!} |x - c|^{n+1} $$

Breaking Down Each Piece

1
\(M\): An upper bound for \(|f^{(n+1)}(t)|\) on the interval between \(c\) and \(x\). Finding this is the hardest part.
2
\((n+1)!\): The factorial in the denominator. This grows fast, which is why higher-degree polynomials give better approximations.
3
\(|x - c|^{n+1}\): The distance from the center raised to the \((n+1)\)-th power. Closer to the center means smaller error.

Bound vs. Exact Error

Lagrange Error Bound Exact Error
Formula \(\frac{M}{(n+1)!}|x-c|^{n+1}\) \(|f(x) - P_n(x)|\)
Requires Max of \(|f^{(n+1)}|\) Exact value of \(f(x)\)
Gives you An overestimate The true difference
Useful when \(f(x)\) is unknown \(f(x)\) is known

How to Apply the Bound

1
Identify \(f(x)\), \(c\), \(n\), and \(x\): What function? What center? What degree polynomial? What point?
2
Compute \(f^{(n+1)}(t)\): Take one more derivative than the polynomial degree.
3
Find \(M\): Determine the maximum of \(|f^{(n+1)}(t)|\) on the interval between \(c\) and \(x\).
4
Plug into the formula: Compute \(\frac{M}{(n+1)!}|x - c|^{n+1}\).
5
Interpret: The true error \(|R_n(x)|\) is guaranteed to be less than or equal to this value.

Example 1: Bounding Error for \(\sin x\)

Use the 3rd-degree Maclaurin polynomial for \(\sin x\) to approximate \(\sin(0.5)\). Find the Lagrange error bound.

$$ |R_3(0.5)| \leq \frac{1}{4!}|0.5 - 0|^4 = \frac{(0.5)^4}{24} = \frac{0.0625}{24} \approx 0.00260 $$

Example 2: Bounding Error for \(e^x\)

Use the 4th-degree Maclaurin polynomial for \(e^x\) to approximate \(e^{0.1}\). Find the error bound.

$$ |R_4(0.1)| \leq \frac{2}{5!}(0.1)^5 = \frac{2 \times 10^{-5}}{120} \approx 1.67 \times 10^{-7} $$

Example 3: Finding \(n\) for a Desired Accuracy

How many terms of the Maclaurin series for \(\cos x\) are needed to approximate \(\cos(1)\) with error less than \(10^{-6}\)?

✓
\(n = 8\): \(\frac{1}{9!} = \frac{1}{362880} \approx 2.76 \times 10^{-6}\). Too large.
✓
\(n = 9\): \(\frac{1}{10!} = \frac{1}{3628800} \approx 2.76 \times 10^{-7}\). This works! We need at least a 9th-degree polynomial.

Visualizing the Error Bound

The error bound creates a band around the Taylor polynomial. The true function is guaranteed to lie within this band.

x y \(c\) \(f(x)\) \(P_n(x)\) bound

Finding \(M\): The Hardest Part

The value \(M\) must satisfy \(|f^{(n+1)}(t)| \leq M\) for all \(t\) between \(c\) and \(x\). Here are strategies for common functions:

\(\sin x\), \(\cos x\)
All derivatives are \(\pm\sin\) or \(\pm\cos\), so \(M = 1\) always works
\(e^x\)
All derivatives are \(e^x\). On an interval \([c, x]\), the maximum of the increasing function \(e^t\) is at the rightmost endpoint. For Maclaurin series (\(c=0\)), this means \(M=e^x\) if \(x>0\) and \(M=1\) if \(x<0\).
\(\ln(1+x)\)
The \((n+1)\)-th derivative is \(\frac{(-1)^n n!}{(1+t)^{n+1}}\). Evaluate at the endpoint closest to \(-1\)

Alternating Series vs. Lagrange

For series with alternating signs, you have two tools. When should you use each?

Alternating Series Bound Lagrange Error Bound
Applies when Series alternates and terms decrease Any Taylor series
Error ≤ First omitted term \(|a_{n+1}|\) \(\frac{M}{(n+1)!}|x-c|^{n+1}\)
Tightness Often tighter Often looser (overestimates)
Use when Conditions are met Non-alternating or general case

Common Mistakes

✕ Wrong Derivative Order
Using the \(n\)-th derivative instead of the \((n+1)\)-th. The error bound uses one degree higher than the polynomial.
✕ Forgetting Absolute Values
The bound requires \(|x - c|^{n+1}\) and \(|f^{(n+1)}(t)|\). Signs don't matter: we need magnitudes.
✕ Choosing \(M\) Too Small
\(M\) must be a true maximum on the entire interval. Evaluating only at endpoints may miss a larger value inside.

Quick Reference Summary

$$ |R_n(x)| \leq \frac{M}{(n+1)!}|x - c|^{n+1} $$
1
\(M\) = max of \(|f^{(n+1)}(t)|\) between \(c\) and \(x\)
2
Larger \(n\) means smaller error (factorial grows fast)
3
Closer to center means smaller error (\(|x - c|\) is small)
4
The bound is a worst-case guarantee, not the exact error

Question 1 of 5

The 3rd-degree Taylor polynomial for \(f(x) = e^x\) centered at \(x = 0\) is used to approximate \(e^{0.2}\). Which expression gives the Lagrange error bound?

Question 2 of 5

The Lagrange error bound for the \(n\)-th degree Maclaurin polynomial of \(\sin x\) uses \(M = 1\) because:

Question 3 of 5

To guarantee the error of a Maclaurin polynomial for \(\cos(0.5)\) is less than \(10^{-4}\), what is the minimum degree \(n\) needed?

Question 4 of 5

If you increase the degree \(n\) of a Taylor polynomial while keeping \(x\) and \(c\) fixed, what generally happens to the Lagrange error bound?

Question 5 of 5

The 2nd-degree Taylor polynomial for \(f(x) = \ln x\) centered at \(x = 1\) is \(P_2(x) = (x-1) - \frac{(x-1)^2}{2}\). What is the Lagrange error bound at \(x = 1.5\)?