Mathwords logoMathwords

Lagrange Remainder — Definition, Formula & Examples

The Lagrange Remainder is the error term that tells you the maximum possible difference between a function and its Taylor polynomial approximation of degree nn. It provides a concrete upper bound so you can guarantee how accurate your polynomial approximation actually is.

If ff is a function with continuous derivatives through order n+1n+1 on an interval containing aa and xx, then the remainder Rn(x)=f(x)Tn(x)R_n(x) = f(x) - T_n(x), where Tn(x)T_n(x) is the nnth-degree Taylor polynomial centered at aa, can be expressed as Rn(x)=f(n+1)(c)(n+1)!(xa)n+1R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x - a)^{n+1} for some cc between aa and xx. This is also known as Taylor's theorem with the Lagrange form of the remainder.

Key Formula

Rn(x)=f(n+1)(c)(n+1)!(xa)n+1M(n+1)!xan+1|R_n(x)| = \left|\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}\right| \leq \frac{M}{(n+1)!}|x-a|^{n+1}
Where:
  • Rn(x)R_n(x) = The remainder (error) between f(x) and the nth-degree Taylor polynomial
  • f(n+1)(c)f^{(n+1)}(c) = The (n+1)th derivative of f evaluated at some unknown c between a and x
  • MM = An upper bound for |f^{(n+1)}(t)| on the interval between a and x
  • aa = The center of the Taylor expansion
  • nn = The degree of the Taylor polynomial
  • xx = The point at which you are approximating f

How It Works

You use the Lagrange Remainder to determine how many terms of a Taylor series you need to achieve a desired accuracy. Since the exact value of cc is unknown, you find the maximum of f(n+1)(t)|f^{(n+1)}(t)| for tt between aa and xx, then plug that into the formula to get an upper bound on Rn(x)|R_n(x)|. If this upper bound is smaller than your error tolerance, you know the nnth-degree Taylor polynomial is accurate enough. This technique turns a vague approximation into a rigorous guarantee.

Worked Example

Problem: Find an upper bound for the error when approximating e0.5e^{0.5} using the 3rd-degree Taylor polynomial for exe^x centered at a=0a = 0.
Step 1: Write the Lagrange Remainder formula with n=3n = 3, a=0a = 0, and x=0.5x = 0.5.
R3(0.5)M4!0.504=M24(0.5)4|R_3(0.5)| \leq \frac{M}{4!}|0.5 - 0|^4 = \frac{M}{24}(0.5)^4
Step 2: Find MM, the maximum of f(4)(t)|f^{(4)}(t)| on [0,0.5][0, 0.5]. Since f(x)=exf(x) = e^x, every derivative is exe^x. On [0,0.5][0, 0.5], the maximum occurs at t=0.5t = 0.5, so M=e0.5M = e^{0.5}. We can use the safe overestimate Me1=e2.72M \leq e^1 = e \approx 2.72.
Me2.72M \leq e \approx 2.72
Step 3: Substitute into the bound and compute.
R3(0.5)2.7224(0.0625)=2.72×0.0625240.17240.00708|R_3(0.5)| \leq \frac{2.72}{24}(0.0625) = \frac{2.72 \times 0.0625}{24} \approx \frac{0.17}{24} \approx 0.00708
Answer: The error in approximating e0.5e^{0.5} with the 3rd-degree Taylor polynomial is at most approximately 0.00710.0071. (The actual error is about 0.00520.0052, confirming the bound works.)

Another Example

Problem: How many terms of the Maclaurin series for sin(x)\sin(x) are needed to approximate sin(1)\sin(1) with error less than 0.0010.001?
Step 1: All derivatives of sin(x)\sin(x) satisfy f(n+1)(c)1|f^{(n+1)}(c)| \leq 1, so M=1M = 1 for any nn.
Rn(1)1(n+1)!1n+1=1(n+1)!|R_n(1)| \leq \frac{1}{(n+1)!}|1|^{n+1} = \frac{1}{(n+1)!}
Step 2: Find the smallest nn such that 1(n+1)!<0.001\frac{1}{(n+1)!} < 0.001. Test values: 15!=11200.0083\frac{1}{5!} = \frac{1}{120} \approx 0.0083 (too large), 16!=17200.00139\frac{1}{6!} = \frac{1}{720} \approx 0.00139 (still too large), 17!=150400.000198\frac{1}{7!} = \frac{1}{5040} \approx 0.000198 (small enough).
17!=150400.000198<0.001\frac{1}{7!} = \frac{1}{5040} \approx 0.000198 < 0.001
Step 3: Since 1(n+1)!<0.001\frac{1}{(n+1)!} < 0.001 when n+1=7n+1 = 7, we need n=6n = 6. The 6th-degree Taylor polynomial (which has terms up to x5x^5 for sine, since the x6x^6 coefficient is zero) suffices.
T6(x)=xx36+x5120T_6(x) = x - \frac{x^3}{6} + \frac{x^5}{120}
Answer: Three nonzero terms of the Maclaurin series (up to x5x^5) approximate sin(1)\sin(1) with error less than 0.0010.001.

Why It Matters

In Calculus II and III courses, the Lagrange Remainder is the standard tool for proving that a Taylor series converges to a specific function and for certifying numerical accuracy. Engineers and scientists use it when replacing complicated functions with polynomial approximations in computational algorithms, ensuring the approximation error stays within design tolerances. It also appears in numerical analysis when analyzing the accuracy of interpolation and quadrature methods.

Common Mistakes

Mistake: Using f(n)f^{(n)} instead of f(n+1)f^{(n+1)} in the remainder formula.
Correction: The Lagrange Remainder involves the (n+1)(n+1)th derivative, one order higher than the degree of the Taylor polynomial. The polynomial already accounts for derivatives through order nn.
Mistake: Choosing MM as the value of f(n+1)|f^{(n+1)}| at the center aa rather than its maximum on the entire interval.
Correction: You must bound f(n+1)(t)|f^{(n+1)}(t)| over all tt between aa and xx. Taking the value only at aa may underestimate the true maximum, making your error bound invalid.

Related Terms