Back to the on-screen lesson ·

The Lagrange error bound

How far a Taylor polynomial of degree $n$ can be from its function: $\dfrac{M|x - a|^{n+1}}{(n+1)!}$, the three quantities that drive it, and why the factorial is the one that makes a few terms enough.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you can bound the error of a Taylor polynomial with the Lagrange expression, finding $M$ as a bound on the next derivative over the whole interval between the centre and the point, raising the distance to the right power, and dividing by the factorial one step past the degree you kept. You can run the question backwards to find the degree a stated accuracy needs, and say why a bound is a statement about where the true value lies rather than the error itself.

2. What you bring to this

You can bound the error of an alternating series with the first term you left out. That bound is free, and it only works for series that alternate. Most series do not, and most Taylor polynomials are not being used at a point where the signs oblige. This is the bound for everything else.

3. Words you will need

Taylor polynomial of degree $n$: the first $n + 1$ terms of the Taylor series, stopping at $(x - a)^n$.

Remainder $R_n(x)$: the exact difference $f(x) - P_n(x)$.

$M$: any number that bounds $|f^{(n+1)}|$ over the interval between the centre and the point. Any valid $M$ gives a valid bound; a larger one gives a weaker bound.

Lagrange bound: $\dfrac{M|x - a|^{n+1}}{(n+1)!}$.

4. How far the polynomial can be from the function

The theorem. For a Taylor polynomial of degree $n$ about $a$,

$$|R_n(x)| \le \frac{M\,|x - a|^{n+1}}{(n+1)!}$$

where $M$ is any bound on $|f^{(n+1)}|$ over the interval between $a$ and $x$.

Three things drive it. How big the next derivative can get, which is the only way the function itself enters. How far the point is from the centre, raised to a power — so the bound is excellent near the centre and hopeless far from it. And the factorial, which is decisive: keeping one more term multiplies the denominator by the next integer, so the bound improves faster than the work does.

The denominator is $(n+1)!$, not $n!$. The remainder is what is left after the polynomial stops, so it is governed by the first term you dropped rather than the last one you kept. Every part of the expression is one step past the degree: the derivative, the power and the factorial alike.

A bound is not the error. The true error is usually a good deal smaller, because $M$ is a worst case over the whole interval and the worst case rarely happens. What the bound entitles you to say is the true value is within this distance — never the error is this number.

Another way: picture

Picture the graph of a function with its Taylor polynomial drawn over it, hugging the curve at the centre and peeling away on either side. The bound is a widening envelope around the polynomial: a hair's breadth at the centre, opening out like a power of the distance as you move away, and the true curve is somewhere inside it.

Another way: steps

  1. Note the degree $n$ you are keeping and the centre $a$.
  2. Find $M$: a bound on $|f^{(n+1)}|$ over the whole interval from $a$ to $x$.
  3. Work out $|x - a|^{n+1}$.
  4. Divide by $(n+1)!$.
  5. If the accuracy was what you were given, set that expression below it and solve for $n$ instead.

5. Why a handful of terms is enough

Degree kept$(n+1)!$Bound at distance $1$ with $M = 1$
260.167
41200.0083
65,0400.000198
8362,8800.0000028

Four more terms improved the bound sixty-thousandfold. Nothing else in the expression behaves like that: doubling the accuracy of a distance or of a derivative bound is hard work, and the factorial does it for free every time you write down one more term.

6. Three things that trip people up

$n!$ instead of $(n+1)!$. One step short, and the bound comes out smaller than the truth — the one direction in which being wrong is a false claim rather than a cautious one.

Reading the bound as the error. They are different numbers, usually by a lot. The bound says the true value is within this distance, which is a weaker and far more useful statement than an equality that is not true.

Bounding the derivative only at one end. $M$ has to hold across the whole interval between the centre and the point. A derivative that is small at both ends and large in the middle will break a bound taken from the ends alone.

7. The exponential near zero

  1. Degree $3$ about $0$, evaluated at $x = 0.1$. Every derivative of $e^{x}$ is $e^{x}$, at most $e^{0.1} < 1.2$ on $[0, 0.1]$.

    So $M = 1.2$.

  2. The bound is $\dfrac{1.2 \times (0.1)^{4}}{4!} = \dfrac{1.2 \times 0.0001}{24}$.

    Degree $3$, so $4!$ underneath.

  3. $= 5 \times 10^{-6}$: five decimal places from four terms, because the distance is small and the factorial is not.

8. The same polynomial, further out

  1. Now evaluate the degree-$3$ polynomial at $x = 2$. On $[0, 2]$ the derivatives reach $e^{2} < 7.4$, so $M = 7.4$.

    A bigger $M$, over a longer interval.

  2. The bound is $\dfrac{7.4 \times 2^{4}}{24} = \dfrac{118.4}{24}$, which is about $4.9$.

    The distance is raised to the fourth power.

  3. A bound of $4.9$ on a value near $7.4$ is nearly worthless. Same polynomial, same degree — the distance from the centre did all of it.

9. Your turn: bound the error of the degree-$2$ Maclaurin polynomial of $\sin x$ at $x = 0.5$

  1. Every derivative of $\sin x$ is a sine or a cosine, so $M = 1$ works on any interval at all.

    Bound the next derivative.

  2. Degree $2$ means the denominator is $3! = 6$, and the distance factor is $(0.5)^{3} = 0.125$.

    One step past the degree, everywhere.

  3. Your turn: work this step out. Its working is at the end of the packet.

    So the bound is $\dfrac{1 \times 0.125}{6} \approx 0.021$ — and the true error is about $0.0026$, which is what a bound is not the error looks like in numbers.

10. Guided practice

Put the steps of bounding the error of a Taylor polynomial of degree $5$ into the order you do them.

Number the steps in order (write the number in the box):

11. Guided practice

Every derivative of $f$ is at most $2$ in size, and the point is a distance $1$ from the centre. Give the factorial in the denominator and the bound it produces, for each degree kept.

Factorial belowBound
Degree $2$ kept
Degree $4$ kept
Degree $6$ kept

12. Practice

Match each piece of the Lagrange bound to what it measures.

A bound on the next derivative over the intervalHow far the point is from the centreThe factorial one step past the degree keptThe exact difference between the function and its polynomial
$M$
$|x - a|^{n+1}$
$(n+1)!$
$R_n(x)$

13. Practice

A Taylor polynomial of degree $5$ about $0$ approximates $f$ at $x = 1$, and every derivative of $f$ is at most $3$ in size on $[0, 1]$. What does the Lagrange bound give?

Answer:

14. Practice

A Taylor polynomial of degree $4$ is used. What goes in the denominator of its Lagrange bound?

15. Somewhere new

Every derivative of $f$ is at most $1$ in size on $[0, 1]$, and its Taylor polynomial about $0$ must be within $\dfrac{1}{24}$ of $f$ at $x = 1$. Give the smallest factorial that will do, then the degree that goes with it.

smallest factorial: p, degree: q

16. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

17. Test question

Put the steps of bounding the error of a Taylor polynomial of degree $6$ into the order you do them.

Number the steps in order (write the number in the box):

18. What you can do now

You can bound a Taylor approximation and say what the bound entitles you to claim. Without looking: what factorial sits underneath for a polynomial of degree $n$, where does $M$ have to hold, and what is the difference between the bound and the error?

Working for the steps left to you

9. Your turn: bound the error of the degree-$2$ Maclaurin polynomial of $\sin x$ at $x = 0.5$, step 3