Unit 10 · Topic 10.12

The Lagrange Error Bound

The Lagrange error bound caps the error of a Taylor polynomial: |f(x) − P_n(x)| ≤ M/((n + 1)!) |x − a|^(n + 1) , where M is the largest value of |f^((n + 1))| between a and x .

Practice 1: Implementing Mathematical ProcessesPractice 3: JustificationPractice 4: Communication and Notation

Part 1 · Hook

Why this matters

A Taylor polynomial gives an estimate. Engineers and the exam both ask the next question: how far off can it be? The Lagrange error bound answers with a single number, using the largest the next derivative can be.

Part 2 · Before you start

What this builds on

Part 3 · Prerequisite check

Quick check before you start

1. What is the third-degree Taylor polynomial for exe^x about x=0x = 0?

  1. 1+x+x22+x361 + x + \frac{x^2}{2} + \frac{x^3}{6}
  2. 1+x+x2+x31 + x + x^2 + x^3
  3. x+x22+x33x + \frac{x^2}{2} + \frac{x^3}{3}
  4. 1+x+x22+x36+⋯1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots
Show the answer

Every derivative at 0 is 1, so each coefficient is 1n!\frac{1}{n!}; a polynomial stops at its last term.

  • Correct: 1+x+x22+x361 + x + \frac{x^2}{2} + \frac{x^3}{6}:
  • 1+x+x2+x31 + x + x^2 + x^3:
  • x+x22+x33x + \frac{x^2}{2} + \frac{x^3}{3}:
  • 1+x+x22+x36+⋯1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots:

2. On [0,2][0, 2], where does g(x)=11+xg(x) = \frac{1}{1 + x} take its largest value?

  1. At x=0x = 0
  2. At x=2x = 2
  3. At x=1x = 1
  4. It has no largest value
Show the answer

gg is decreasing, so its largest value is at the left end.

  • Correct: At x=0x = 0:
  • At x=2x = 2:
  • At x=1x = 1:
  • It has no largest value:

3. For an alternating series that meets the test's conditions, the error of SnS_n is at most

  1. an+1a_{n+1}, the first term left out
  2. ana_n, the last term used
  3. Sn+1S_{n+1}
  4. a1a_1
Show the answer

The alternating series error bound.

  • Correct: an+1a_{n+1}, the first term left out:
  • ana_n, the last term used:
  • Sn+1S_{n+1}:
  • a1a_1:

Part 4 · See it

See it first

On -1.6 to 1.6, a dashed curve x to the fourth over 24, the Lagrange error bound for cos x and its second-degree Taylor polynomial about 0, with the region under it lightly shaded, and a solid curve, the actual error |cos x minus (1 minus x squared over 2)|, which stays below it. At x = 1 the bound is about 0.0417 and the actual error about 0.0403.
For cos⁡x\cos x and P2(x)=1−x22P_2(x) = 1 - \frac{x^2}{2}, the actual error stays under the Lagrange bound x44!\frac{x^4}{4!}. LevlPrep original diagram.

Part 5 · Step by step

How it works, step by step

  1. PnP_n matches ff and its first nn derivatives at aathe difference f−Pnf - P_n grows only through the derivative after those, f(n+1)f^{(n+1)}
  2. Bound |f(n+1)(z)|≤M\left|f^{(n+1)}(z)\right| \le M for every zz between aa and xxthe error can be no bigger than M(n+1)!|x−a|n+1\frac{M}{(n+1)!}|x - a|^{n+1}
  3. Compare that bound with the accuracy asked for"error ≤\le bound << given number" shows the estimate is good enough

Part 6 · Key ideas

Key ideas

  • |f(x)−Pn(x)|≤max⁡|f(n+1)(z)|(n+1)!|x−a|n+1\left|f(x) - P_n(x)\right| \le \frac{\max\left|f^{(n+1)}(z)\right|}{(n+1)!}|x - a|^{n+1}, the maximum taken for zz between aa and xx.
  • Say where the maximum is and why: "eze^z is increasing, so on [0,0.5][0, 0.5] its maximum is e0.5<2e^{0.5} < 2."
  • The bound is a ceiling: write "error ≤\le", never "error ==".
  • If the values form an alternating sum with sizes decreasing to 0, the alternating series error bound may be quicker.

Part 7 · Misconception

A common mistake

The wrong idea: For the bound on P3P_3 at x=0.5x = 0.5, use f(4)(0)f^{(4)}(0), the fourth derivative at the center.

What actually happens: Use the largest |f(4)(z)|\left|f^{(4)}(z)\right| for zz anywhere between the center and 0.50.5, and say why that value is the largest.

Part 8 · Check yourself

Check yourself

Exam-style questions. Anything you miss goes into your review queue.

Table

Derivatives at the center and a bound on the next one

Values of ff and its derivatives at x=0x = 0; on 0≤x≤0.50 \le x \le 0.5, |f(4)(x)|≤10\left|f^{(4)}(x)\right| \le 10
f(0)f(0)f′(0)f'(0)f″(0)f''(0)f‴(0)f'''(0)|f(4)(x)|\left|f^{(4)}(x)\right| on [0,0.5][0, 0.5]
1122−3-366at most 1010

1. Use the third-degree Taylor polynomial for ff about x=0x = 0 to estimate f(0.5)f(0.5).

No calculator. Type the exact value (a fraction, π, e or a root is fine).

Show the answer

P3(x)P_3(x)=1+2x−32x2+x3= 1 + 2x - \frac{3}{2}x^2 + x^3, so P3(0.5)P_3(0.5)=1= 1+1−0.375+ 1 - 0.375+0.125+ 0.125=1.75= 1.75=74= \frac{7}{4}.

  • Answer: 74\frac{7}{4} ≈ 1.750

2. Use the Lagrange error bound to find a number EE with |f(0.5)−P3(0.5)|≤E\left|f(0.5) - P_3(0.5)\right| \le E.

No calculator. Type the exact value (a fraction, π, e or a root is fine).

Show the answer

The Lagrange error bound for P3P_3 is max⁡|f(4)(z)|4!|x−0|4≤1024(0.5)4\frac{\max\left|f^{(4)}(z)\right|}{4!}|x - 0|^4 \le \frac{10}{24}(0.5)^4=10384= \frac{10}{384}=5192= \frac{5}{192}≈0.026\approx 0.026.

  • Answer: 5192\frac{5}{192} ≈ 0.026

3. Which statement shows that P3(0.5)P_3(0.5) approximates f(0.5)f(0.5) with an error less than 0.030.03?

  1. |f(0.5)−P3(0.5)|\left|f(0.5) - P_3(0.5)\right|=5192<0.03= \frac{5}{192} < 0.03
  2. |f(0.5)−P3(0.5)|≤103!(0.5)3<0.03\left|f(0.5) - P_3(0.5)\right| \le \frac{10}{3!}(0.5)^3 < 0.03
  3. |f(0.5)−P3(0.5)|≤64!(0.5)4<0.03\left|f(0.5) - P_3(0.5)\right| \le \frac{6}{4!}(0.5)^4 < 0.03
  4. |f(0.5)−P3(0.5)|≤5192<0.03\left|f(0.5) - P_3(0.5)\right| \le \frac{5}{192} < 0.03
Show the answer

The Lagrange error bound gives |f(0.5)−P3(0.5)|≤104!(0.5)4\left|f(0.5) - P_3(0.5)\right| \le \frac{10}{4!}(0.5)^4=5192= \frac{5}{192}≈0.026\approx 0.026, and 5192<0.03\frac{5}{192} < 0.03.

  • |f(0.5)−P3(0.5)|\left|f(0.5) - P_3(0.5)\right|=5192<0.03= \frac{5}{192} < 0.03: The bound gives "at most"; the error itself is not known to equal 5192\frac{5}{192}.
  • |f(0.5)−P3(0.5)|≤103!(0.5)3<0.03\left|f(0.5) - P_3(0.5)\right| \le \frac{10}{3!}(0.5)^3 < 0.03: That uses the wrong derivative and power, and 106(0.125)≈0.21\frac{10}{6}(0.125) \approx 0.21 is not below 0.03.
  • |f(0.5)−P3(0.5)|≤64!(0.5)4<0.03\left|f(0.5) - P_3(0.5)\right| \le \frac{6}{4!}(0.5)^4 < 0.03: 6=f‴(0)6 = f'''(0) is a value at the center; the bound needs the largest size of f(4)f^{(4)} on the interval, 10.
  • Correct: |f(0.5)−P3(0.5)|≤5192<0.03\left|f(0.5) - P_3(0.5)\right| \le \frac{5}{192} < 0.03: Right: the bound with its inputs, then the comparison.

4. Which is the Lagrange error bound for Pn(x)P_n(x), the nnth-degree Taylor polynomial for ff about x=ax = a?

  1. max⁡|f(n)(z)|n!|x−a|n\frac{\max\left|f^{(n)}(z)\right|}{n!}|x - a|^n
  2. max⁡|f(n+1)(z)|(n+1)!|x−a|n+1\frac{\max\left|f^{(n+1)}(z)\right|}{(n+1)!}|x - a|^{n+1}
  3. |f(n+1)(a)|(n+1)!|x−a|n+1\frac{\left|f^{(n+1)}(a)\right|}{(n+1)!}\left|x - a\right|^{n+1}
  4. max⁡|f(n+1)(z)|⋅|x−a|n+1\max\left|f^{(n+1)}(z)\right| \cdot |x - a|^{n+1}
Show the answer

|f(x)−Pn(x)|≤max⁡|f(n+1)(z)|(n+1)!|x−a|n+1\left|f(x) - P_n(x)\right| \le \frac{\max\left|f^{(n+1)}(z)\right|}{(n+1)!}|x - a|^{n+1}, where the maximum is over the zz between aa and xx.

  • max⁡|f(n)(z)|n!|x−a|n\frac{\max\left|f^{(n)}(z)\right|}{n!}|x - a|^n: The bound uses the derivative one past the degree: f(n+1)f^{(n+1)}.
  • Correct: max⁡|f(n+1)(z)|(n+1)!|x−a|n+1\frac{\max\left|f^{(n+1)}(z)\right|}{(n+1)!}|x - a|^{n+1}: Right: the next derivative, the next factorial, the next power.
  • |f(n+1)(a)|(n+1)!|x−a|n+1\frac{\left|f^{(n+1)}(a)\right|}{(n+1)!}\left|x - a\right|^{n+1}: The derivative is maximized over the interval between aa and xx, not taken at the center.
  • max⁡|f(n+1)(z)|⋅|x−a|n+1\max\left|f^{(n+1)}(z)\right| \cdot |x - a|^{n+1}: Divide by (n+1)!(n+1)!.

5. To bound the error of the second-degree Taylor polynomial for ff about x=1x = 1 at x=1.3x = 1.3, over which values of zz do you find the largest |f‴(z)|\left|f'''(z)\right|?

  1. z=1z = 1 alone, the center
  2. z=1.3z = 1.3 alone, the point being estimated
  3. 0≤z≤1.30 \le z \le 1.3, from zero to the point
  4. 1≤z≤1.31 \le z \le 1.3, from the center to the point
Show the answer

The Lagrange error bound uses the largest |f‴(z)|\left|f'''(z)\right| for zz between the center a=1a = 1 and x=1.3x = 1.3. Say where that maximum is and why (for example, because |f‴||f'''| is increasing there).

  • z=1z = 1 alone, the center: One value does not cover the interval; the largest size between 1 and 1.3 is needed.
  • z=1.3z = 1.3 alone, the point being estimated: The largest size may occur anywhere between 1 and 1.3.
  • 0≤z≤1.30 \le z \le 1.3, from zero to the point: The interval runs from the center, 1, not from 0.
  • Correct: 1≤z≤1.31 \le z \le 1.3, from the center to the point: Right: the zz in the bound lies between the center and xx.

6. The Lagrange error bound for an estimate is 0.0040.004. Which sentence is correct?

  1. The error is 0.0040.004
  2. The estimate is 0.0040.004 too large
  3. The error is at most 0.0040.004
  4. The error is at least 0.0040.004
Show the answer

The Lagrange error bound says |f(x)−Pn(x)|≤0.004\left|f(x) - P_n(x)\right| \le 0.004: the error is at most 0.0040.004, in either direction.

  • The error is 0.0040.004: The actual error is less than or equal to the bound, usually less.
  • The estimate is 0.0040.004 too large: The bound gives no direction and no exact size.
  • Correct: The error is at most 0.0040.004: Right: the bound caps the error.
  • The error is at least 0.0040.004: The bound is an upper limit, not a lower one.

Part 9 · Summary

Summary

The Lagrange error bound caps the error of a Taylor polynomial: |f(x)−Pn(x)|≤M(n+1)!|x−a|n+1\left|f(x) - P_n(x)\right| \le \frac{M}{(n+1)!}|x - a|^{n+1}, where MM is the largest value of |f(n+1)|\left|f^{(n+1)}\right| between aa and xx. Justify MM, compute the bound, and compare it with the accuracy required.

Part 10 · Up next

What comes next

Part 11 · Connections

Connections