Understanding the Lagrange Error Bound
When you truncate a Taylor series at a finite number of terms, you gain a convenient polynomial but lose precision. The Lagrange error bound places a strict upper limit on that loss—it tells you the absolute maximum error between your polynomial approximation and the actual function value.
This bound is invaluable because:
- It guarantees your approximation won't be worse than a stated threshold.
- It helps decide how many terms you need for required accuracy.
- It provides confidence in numerical computations where exact values are impossible to obtain.
The key insight is that you don't need to know the exact error; bounding it from above is often sufficient for decision-making.
The Lagrange Error Bound Formula
The formula stems from the Taylor remainder theorem. Once you know the maximum of the (n+1)th derivative of your function in the interval between your center point and evaluation point, the bound follows directly.
emax = M × |x − a|(n+1) ÷ (n+1)!
e<sub>max</sub>— Maximum possible error between the true function and Taylor polynomial approximationM— Largest absolute value of the (n+1)th derivative of your function f on the interval [a, x]x— The point where you want to know the errora— The center point around which the Taylor polynomial is builtn— Degree of the Taylor polynomial (number of terms used from the series)
Building and Bounding Taylor Approximations
Any smooth function can be expressed as an infinite Taylor series centred at a point a. In practice, you truncate this series at some term n, creating a polynomial that approximates the original function near a.
The Lagrange error bound tells you how badly this approximation can deviate at any point x. The closer x is to a, or the larger n you choose, the smaller the error bound becomes. This trade-off is captured mathematically: the numerator contains |x − a| raised to the (n+1) power, while the denominator grows as (n+1)!. Larger factorials decrease the error rapidly—a key reason why Taylor polynomials converge so effectively.
Special case: when a = 0, your series is called a Maclaurin polynomial, which is commonly used in engineering and physics.
Finding the Maximum Derivative M
The hardest part of computing a Lagrange error bound is locating M—the peak value of the (n+1)th derivative across your interval. Here's the process:
- Differentiate your function n+1 times (symbolically if possible, or numerically if the function is complex).
- Evaluate the (n+1)th derivative at several points between a and x, or find critical points by setting its derivative to zero.
- Take the absolute value of each result and identify the maximum.
For oscillating functions like sine or cosine, the derivatives cycle through known values, making M straightforward. For polynomials and rational functions, you may need calculus to pinpoint extrema. When the (n+1)th derivative is bounded by a known constant across your interval, use that constant as M.
Common Pitfalls and Practical Notes
When calculating Lagrange error bounds, watch for these frequent mistakes and misconceptions.
- Forgetting the absolute value bars — Always take M as the maximum of |f^(n+1)(z)|, not the maximum of f^(n+1)(z) itself. A negative peak can be just as damaging as a positive one. Similarly, use |x − a| in the formula, not (x − a), to ensure the bound is non-negative.
- Assuming M is a function value, not a derivative value — Beginners often confuse M with the maximum of the original function or some lower derivative. M must be the supremum of the (n+1)th derivative specifically. If you've only found the max of f' or f'', you haven't found M yet.
- Neglecting interval bounds when searching for M — The maximum derivative must be found only on the closed interval [a, x] (or [x, a] if x < a). Don't scan the entire real line. Outside your interval, larger derivatives may exist, but they're irrelevant to bounding error at your specific point x.
- Factorial growth is your friend—use it wisely — As n increases, (n+1)! grows explosively. Even if M and |x − a| are modest, the error bound shrinks dramatically with more terms. However, computing many derivatives by hand becomes tedious; numerical tools become necessary beyond roughly n = 4 or 5.