Tutorials › AP Calculus › Deriving the Lagrange Remainder Formula

Taylor Series and Error Bounds · Tutorial 887 of 999

Deriving the Lagrange Remainder Formula

See how Rolle’s theorem produces the Lagrange remainder and how bounding the next derivative guarantees a maximum Taylor approximation error.

Advanced 11 min read

What You'll Learn

  • State the hypotheses for the Lagrange form of the Taylor remainder.
  • Derive the formula using an auxiliary function and repeated applications of Rolle’s theorem.
  • Distinguish the exact remainder formula from a guaranteed error bound.
  • Find a valid maximum bound for the next derivative on the interval.
  • Apply the bound to Taylor approximations and identify a common error in choosing it.

Why Derive the Remainder Formula?

A Taylor polynomial uses a function’s derivatives at one center to approximate the function nearby. The Lagrange remainder formula makes a precise statement about what is left out: the error equals a particular derivative value at some point between the center and the input, multiplied by a known factor.

That intermediate point is usually not known, so the exact formula does not generally give an exact numerical error. Its practical strength is that if the next derivative is bounded throughout the interval, then the formula gives a guaranteed upper bound on the error. The derivation explains why the intermediate point exists and why the derivative must be controlled over the whole interval.

The Taylor Polynomial and Its Remainder

Let \(f\) have \(n+1\) continuous derivatives on an interval containing \(a\) and \(x\). Its degree-\(n\) Taylor polynomial centered at \(a\) is

$$ T_n(t)=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(t-a)^k. $$

The variable \(t\) is used here so that the polynomial can be evaluated throughout the interval from \(a\) to \(x\). The remainder at \(x\) is the difference between the function value and the Taylor-polynomial value:

$$ R_n(x)=f(x)-T_n(x). $$
Definition: The Lagrange form of the Taylor remainder states that if \(f\) has \(n+1\) continuous derivatives on the interval between \(a\) and \(x\), then, for \(x\ne a\), there is a number \(c\) strictly between \(a\) and \(x\) such that $$ R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}. $$

If \(x=a\), then \(R_n(a)=0\), so no intermediate point is needed. If \(x<a\), the same result holds with \(c\) between \(x\) and \(a\). The sign of \((x-a)^{n+1}\) is retained in the exact formula; for an error bound, we use its absolute value.

Derivation from Rolle’s Theorem

Rolle’s theorem says that if a function is continuous on a closed interval, differentiable on its interior, and has equal values at the endpoints, then its derivative is zero at some interior point. To derive the remainder formula, we construct an auxiliary function with enough zeros for repeated applications of this theorem.

Assume \(x\ne a\), and set

$$ K=\frac{R_n(x)}{(x-a)^{n+1}}. $$

Define, for \(t\) between \(a\) and \(x\),

$$ g(t)=f(t)-T_n(t)-K(t-a)^{n+1}. $$

At \(t=a\), the Taylor polynomial and \(f\) have the same derivatives through order \(n\). Also, the term \((t-a)^{n+1}\) and all its derivatives through order \(n\) vanish at \(a\). Therefore,

$$ g(a)=g'(a)=g''(a)=\cdots=g^{(n)}(a)=0. $$

At the other endpoint, the choice of \(K\) makes \(g(x)=0\):

$$ g(x)=f(x)-T_n(x)-K(x-a)^{n+1} =R_n(x)-R_n(x)=0. $$

These zeros allow Rolle’s theorem to be applied repeatedly. The first application, using \(g(a)=g(x)=0\), gives a point \(r_1\) strictly between \(a\) and \(x\) with \(g'(r_1)=0\). When \(n\geq 1\), we also have \(g'(a)=0\), so another application between \(a\) and \(r_1\) gives a point \(r_2\) with \(g''(r_2)=0\). This process continues.

1
Start with endpoint zeros.
\(g(a)=g(x)=0\), so Rolle’s theorem gives an interior zero \(r_1\) of \(g'\).
2
Use the repeated zeros at \(a\).
For each \(j\leq n\), \(g^{(j)}(a)=0\). Applying Rolle’s theorem between \(a\) and an interior zero of \(g^{(j)}\) produces an interior zero of \(g^{(j+1)}\).
3
Reach the next derivative.
After \(n+1\) applications in all, there is a point \(c\) between \(a\) and \(x\) for which \(g^{(n+1)}(c)=0\).

For \(n=0\), the first application already gives \(g'(c)=0\). For larger \(n\), the repeated applications are valid because the necessary derivatives are continuous on the interval and differentiable where Rolle’s theorem is applied.

Now differentiate \(g\) \(n+1\) times. The polynomial \(T_n\) has degree \(n\), so its \((n+1)\)st derivative is zero. The \((n+1)\)st derivative of \(K(t-a)^{n+1}\) is \(K(n+1)!\). Thus

$$ g^{(n+1)}(c)=f^{(n+1)}(c)-K(n+1)!=0. $$

Solving this equation for \(K\), and then using the definition of \(K\), gives

$$ K=\frac{f^{(n+1)}(c)}{(n+1)!} \qquad\Longrightarrow\qquad R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}. $$

This proves the formula. The key idea is that the auxiliary function is arranged to vanish at both endpoints and to have additional vanishing derivatives at the center. Rolle’s theorem passes those zeros to higher derivatives until the \((n+1)\)st derivative provides the needed equality.

From the Formula to a Guaranteed Bound

The point \(c\) is guaranteed to exist, but its location is usually unknown. A useful estimate replaces the unknown value \(\lvert f^{(n+1)}(c)\rvert\) with a bound valid everywhere on the interval. If \(M\) satisfies

$$ \left|f^{(n+1)}(t)\right|\leq M $$

for every \(t\) between \(a\) and \(x\), then the Lagrange formula and the absolute-value rules give

$$ |R_n(x)| =\frac{|f^{(n+1)}(c)|}{(n+1)!}|x-a|^{n+1} \leq \frac{M|x-a|^{n+1}}{(n+1)!}. $$
Theorem: If the absolute value of the \((n+1)\)st derivative is at most \(M\) everywhere on the interval from \(a\) to \(x\), then the error in the degree-\(n\) Taylor approximation at \(x\) is at most \(M|x-a|^{n+1}/(n+1)!\). The bound must hold on the whole interval, not just at its endpoints or at the center.

When the derivative is continuous, its absolute value has a maximum on a closed, bounded interval. One valid choice for \(M\) is that maximum. A simpler, larger value also works: the bound need not be the smallest possible one to guarantee the error limit.

Worked Example: A Polynomial with an Exact Remainder

Worked Example: Find the Remainder for \(f(x)=x^4\)

Find the degree-2 Taylor approximation of \(f(x)=x^4\) about \(a=0\), and use the Lagrange formula at \(x=\frac12\).

The derivatives at zero are \(f(0)=0\), \(f'(x)=4x^3\), and \(f''(x)=12x^2\). Hence \(f'(0)=0\) and \(f''(0)=0\), so

$$T_2(x)=0+0x+\frac{0}{2!}x^2=0.$$

The actual remainder at \(x=\frac12\) is

$$R_2\left(\frac12\right)=f\left(\frac12\right)-T_2\left(\frac12\right)=\left(\frac12\right)^4-0=\frac1{16}.$$

The third derivative is \(f'''(t)=24t\). The Lagrange formula says that for some \(c\) between \(0\) and \(\frac12\),

$$\frac1{16}=\frac{24c}{3!}\left(\frac12\right)^3=\frac{24c}{6}\cdot\frac18=\frac{c}{2}.$$

Therefore \(c=\frac18\), which is strictly between \(0\) and \(\frac12\). Substitution checks the result: \(\frac{24(1/8)}{6}(1/8)=\frac{1}{16}\). On the whole interval, \(0\leq 24t\leq 12\), so \(M=12\) gives the guaranteed bound

$$\left|R_2\left(\frac12\right)\right|\leq\frac{12(1/2)^3}{3!}=\frac{12}{48}=\frac14.$$

The actual error is \(\frac1{16}\), which is less than the guaranteed bound \(\frac14\).

Worked Example: A Square-Root Approximation

Worked Example: Bound the Error for \(\sqrt{1.1}\)

Use the degree-2 Taylor polynomial for \(f(x)=\sqrt{1+x}\) centered at \(0\) to approximate \(f(0.1)\), and guarantee the maximum error.

The function values needed at the center are \(f(0)=1\), \(f'(x)=\frac12(1+x)^{-1/2}\), and \(f''(x)=-\frac14(1+x)^{-3/2}\). Thus \(f'(0)=\frac12\) and \(f''(0)=-\frac14\), giving

$$T_2(x)=1+\frac12x-\frac18x^2.$$

At \(x=0.1=\frac1{10}\),

$$T_2(0.1)=1+\frac12\left(\frac1{10}\right)-\frac18\left(\frac1{100}\right)=1+\frac1{20}-\frac1{800}=1.04875.$$

The third derivative is \(f'''(x)=\frac38(1+x)^{-5/2}\). On \(0\leq x\leq 0.1\), this is positive and decreasing, so its absolute value is at most \(M=\frac38\). Therefore

$$|R_2(0.1)|\leq\frac{(3/8)(1/10)^3}{3!}=\frac{3}{48000}=\frac1{16000}=0.0000625.$$

For a numerical check, \(\sqrt{1.1}\approx1.048808848\), so the actual error is approximately \(1.048808848-1.04875=0.000058848\), less than \(0.0000625\). The guarantee follows from the derivative bound; the numerical comparison is a check, not a replacement for that guarantee.

Worked Example: A Logarithm Approximation

Worked Example: Bound the Error for \(\ln(1.2)\)

Use the degree-2 Taylor polynomial for \(f(x)=\ln x\) centered at \(a=1\), and bound the error at \(x=1.2\).

The derivatives are \(f'(x)=1/x\), \(f''(x)=-1/x^2\), and \(f'''(x)=2/x^3\). At \(a=1\), the function value and first two derivatives are \(0\), \(1\), and \(-1\). Therefore

$$T_2(x)=(x-1)-\frac12(x-1)^2.$$

Since \(x-1=0.2\), the approximation is \(T_2(1.2)=0.2-\frac12(0.2)^2=0.2-0.02=0.18\). On the interval \(1\leq t\leq1.2\), \(f'''(t)=2/t^3\) is positive and decreasing, so \(M=2\) is a valid bound. The error satisfies

$$|R_2(1.2)|\leq\frac{2(0.2)^3}{3!}=\frac{0.016}{6}=\frac1{375}\approx0.0026667.$$

As a check, \(\ln(1.2)\approx0.182321556\), so the actual error is approximately \(0.182321556-0.18=0.002321556\), less than \(\frac1{375}\).

A Common Pitfall: Using a Derivative Value Instead of a Bound

In the square-root example, \(f'''(0.1)\) is not the maximum absolute value of \(f'''\) on \([0,0.1]\). The derivative is decreasing, so its value at \(0.1\) is smaller than its value at \(0\). Using the endpoint value as though it were a bound would give

$$ \frac{|f'''(0.1)|(0.1)^3}{6} \approx \frac{0.2955(0.001)}{6} \approx 0.0000493. $$

That is not a valid guaranteed bound: it is smaller than the actual error, approximately \(0.000058848\). The correction is to bound the derivative on the entire interval. Here \(|f'''(t)|\leq\frac38\) for every \(t\) from \(0\) to \(0.1\), which gives the valid bound \(0.0000625\).

The exact remainder formula and the error bound serve related but different purposes. The formula asserts the existence of an intermediate point \(c\); the bound avoids needing to locate that point by using a maximum that applies throughout the interval. This is why checking the derivative over the full interval is essential.

Check Your Understanding

Use the derivation and conditions above to answer these questions.

  1. Why is the auxiliary function \(g\) constructed to satisfy both \(g(x)=0\) and \(g(a)=g'(a)=\cdots=g^{(n)}(a)=0\)?
  2. For a degree-3 Taylor polynomial, which derivative appears in the Lagrange remainder formula?
  3. If \(|f^{(n+1)}(t)|\leq M\) on the interval between \(a\) and \(x\), what is the resulting error bound?
  4. Why is a derivative value at one endpoint not necessarily a valid choice for \(M\)?
  5. Does the exact remainder formula require knowing the intermediate point \(c\) in order to use a guaranteed error bound? Explain.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon