AP Calculus BC Review: Lagrange Error Bound

What is the Lagrange error bound? Basically, it’s a theoretical limit that measures how bad a Taylor polynomial estimate could be. Read on to find out more!

Lagrange error bound - magoosh

Taylor Series and Taylor Polynomials

The whole point in developing Taylor series is that they replace more complicated functions with polynomial-like expressions. The properties of Taylor series make them especially useful when doing calculus.

Remember, a Taylor series for a function f, with center c, is:

Taylor series for a function f

Taylor series are wonderful tools. However, the biggest drawback associated with them is the fact that they typically involve infinitely many terms.

Infinitely many terms?  Ain't nobody got time for that

So in practice, we tend to use only the first few terms. Maybe 3 terms, maybe 30, but at least a finite number of terms is more reasonable than all infinitely many of them, right?

But there is a trade-off. You lose accuracy. A Taylor polynomial (that is, finitely many terms of a Taylor series) can provide a very good approximation for a function, but it can’t model the function exactly.

That’s where the error comes in.

By the way, now would be a great time to review: AP Calculus BC Review: Taylor Polynomials and AP Calculus BC Review: Taylor and Maclaurin Series.

The Lagrange Error Bound

Let T(x) be the nth order Taylor polynomial for a given function f, with center at c.

Taylor polynomial definition

Then the error between T(x) and f(x) is no greater than the Lagrange error bound (also called the remainder term),

Lagrange error bound

Here, M stands for the maximum absolute value of the (n+1)-order derivative on the interval between c and x. In other words, M is found by plugging in the z-value between x and c that maximizes the following expression:

M in Lagrange error bound

That may sound complicated, but in practice, there’s usually a quick way to decide what M should be.

Example

Use the Lagrange error bound to estimate the error in using a 4th degree Maclaurin polynomial to approximate cos(π/4).

Solution

First, you need to find the 4th degree Maclaurin polynomial for cos x. A Maclaurin polynomial is simply a Taylor polynomial centered at c = 0.

T(x) = 1 - x^2/2 + x^4/24

Now, for the error bound, we’ll need to know what the 5th-derivative of f(x) = cos x is. (You probably would have computed all of the derivatives up to the 4th order when you constructed the Maclaurin polynomial for the function, anyway.)

derivatives of cos x

Now, the largest that |-sin x| could possibly be is 1. (Actually, we could do even better than that if we realize that |-sin(π/4)| = 0.707 maximizes the quantity on the interval [0, π/4], but we’ll stick with our first estimate of 1. After all, this is only an estimate!)

So, we have M = 1. Plugging this into the error bound formula with n = 4, we get:

Example error bound

The error is roughly 0.0025

Follow-Up: How Good Was Our Estimate?

Because the computed error bound was so tiny, we can be sure that T(x) approximates the values of cos x incredibly well, at least when the input is within the interval from 0 to π/4.

Let’s compare values to see just how close the approximation really is. Computing each of T(π/4) and cos(π/4) to eight digits of accuracy:

T(pi/4) = 0.70742921

cos(pi/4) = 0.70710678

The actual error is: 0.70742921 – 0.70710678 = 0.00032243. This is much better than our estimated error of 0.0025. Really, the Lagrange error bound is just a worst-case scenario in terms of estimating error; the actual error is often much less.

Improve your SAT or ACT score, guaranteed. Start your 1 Week Free Trial of Magoosh SAT Prep or your 1 Week Free Trial of Magoosh ACT Prep today!

magoosh logo checks

By the way, Magoosh can help you study for both the SAT and ACT exams. Click here to learn more!

2 Responses to AP Calculus BC Review: Lagrange Error Bound

  1. Aidan April 5, 2019 at 10:40 am #

    Why do you use the fifth derivative equation when it is supposed to be n=4?

    • Michael Kraher May 28, 2019 at 11:21 pm #

      because you need the n+1 term.


Magoosh blog comment policy: To create the best experience for our readers, we will only approve comments that are relevant to the article, general enough to be helpful to other students, concise, and well-written! 😄 Due to the high volume of comments across all of our blogs, we cannot promise that all comments will receive responses from our instructors.

We highly encourage students to help each other out and respond to other students' comments if you can!

If you are a Premium Magoosh student and would like more personalized service from our instructors, you can use the Help tab on the Magoosh dashboard. Thanks!

Leave a Reply