Borui Academy

Chapter 8

Lagrange Error Bound

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

Chapter 8 — Lagrange Error Bound

Why this chapter matters: this is the most challenging topic in BC series — but every problem follows the same template. Memorize the formula and the 3-step method, and you'll handle any AP error problem.

By the end of this chapter you will:

  1. State the Lagrange error bound formula
  2. Compute an upper bound on the truncation error of a Taylor polynomial
  3. Use the error bound to prove a Taylor series equals the original ff
  4. Solve "how many terms?" inverse problems on the AP

8.1 Why Lagrange?

Recall Chapter 6: the Taylor polynomial Pn(x)P_n(x) approximates f(x)f(x). The natural question is: how big is the error?

Lagrange gives both an exact formula (with one unknown cc) and a practical upper bound.

🎵 Audio 1 — Why we need thisaudio/ch8_01_motivation.mp3


8.2 The Lagrange Remainder Formula

Taylor's theorem (with remainder): if ff is (n+1)(n+1)-times differentiable on an interval II containing aa and xx, then

f(x)=Pn(x)+Rn(x)f(x) = P_n(x) + R_n(x)

where the remainder is

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 (existence guaranteed; exact location unknown).

Lagrange error bound (the practical form):

Rn(x)M(n+1)!xan+1\boxed{\lvert R_n(x)\rvert \le \frac{M}{(n+1)!}\lvert x - a\rvert^{n+1}}

where MM is an upper bound for f(n+1)(t)\lvert f^{(n+1)}(t)\rvert on the interval between aa and xx.

🎵 Audio 2 — Formula breakdownaudio/ch8_02_formula.mp3

🔑 Three things to remember:

  • MM bounds the (n+1)(n+1)-th derivative — not the nn-th
  • All three slots use n+1n+1 (factorial, derivative order, distance power) — easy to off-by-one
  • The closer xx is to aa, the smaller the error

Lagrange error formula breakdown — three places use (n+1)


8.3 The 3-Step Method

Step 1: identify nn, x0x_0, aa

The problem will say something like "use the degree-nn Taylor polynomial to estimate f(x0)f(x_0)"; that gives you nn, x0x_0, aa.

Step 2: find MM — the key step

Find an upper bound for f(n+1)(t)\lvert f^{(n+1)}(t)\rvert on the interval [a,x0][a, x_0] (or [x0,a][x_0, a]).

Practical shortcuts (memorize):

ff Bound on f(k)(t)\lvert f^{(k)}(t)\rvert
sint,cost\sin t, \cos t 1\le 1
ete^t on [a,x0][a, x_0] emax(a,x0)\le e^{\max(a, x_0)}
polynomial direct computation

Step 3: plug into the formula

Rn(x0)M(n+1)!x0an+1\lvert R_n(x_0)\rvert \le \frac{M}{(n+1)!}\lvert x_0 - a\rvert^{n+1}

🎵 Audio 3 — 3-step methodaudio/ch8_03_three_steps.mp3

Lagrange error 3-step method flowchart


8.4 Example 1 — Estimate sin(0.5)\sin(0.5)

Problem: use the degree-5 Maclaurin polynomial of sinx\sin x to estimate sin(0.5)\sin(0.5). Bound the error.

Step 1: n=5n = 5, x0=0.5x_0 = 0.5, a=0a = 0.

Step 2: f(6)(t)=sintf^{(6)}(t) = -\sin t, so f(6)(t)1=M\lvert f^{(6)}(t)\rvert \le 1 = M.

Step 3:
R5(0.5)16!(0.5)6=1/647202.17×105\lvert R_5(0.5)\rvert \le \frac{1}{6!}(0.5)^6 = \frac{1/64}{720} \approx 2.17 \times 10^{-5}

Estimate: P5(0.5)=0.50.536+0.551200.4794271P_5(0.5) = 0.5 - \frac{0.5^3}{6} + \frac{0.5^5}{120} \approx 0.4794271.

True sin(0.5)0.4794255\sin(0.5) \approx 0.4794255, actual error 1.6×106\approx 1.6 \times 10^{-6} — well within the bound. ✓

🎵 Audio 4 — sin(0.5) walkthroughaudio/ch8_04_sin_example.mp3


8.5 Example 2 — Inverse Problem (AP-favorite)

Problem: estimate e0.5e^{0.5} using the Maclaurin polynomial of exe^x. What's the smallest degree nn that guarantees error below 0.0010.001?

Approach: find smallest nn with M0.5n+1(n+1)!<0.001\frac{M \cdot 0.5^{n+1}}{(n+1)!} < 0.001.

Step 1: f(n+1)(t)=ete0.5e<2f^{(n+1)}(t) = e^t \le e^{0.5} \le \sqrt{e} < 2. Take M=2M = 2.

Step 2: solve 20.5n+1(n+1)!<0.001\frac{2 \cdot 0.5^{n+1}}{(n+1)!} < 0.001 by trial:

  • n=4n = 4: 20.555!=119205.2×104\frac{2 \cdot 0.5^5}{5!} = \frac{1}{1920} \approx 5.2 \times 10^{-4}
  • n=3n = 3: 20.544!=11925.2×103\frac{2 \cdot 0.5^4}{4!} = \frac{1}{192} \approx 5.2 \times 10^{-3}

Smallest degree: n=4n = 4.

🎵 Audio 5 — Inverse / smallest-degree problemaudio/ch8_05_precision_search.mp3

🔑 Strategy: increment nn from small values until the inequality holds. Don't try to solve (n+1)!(n+1)! inequalities algebraically.


8.6 Proving a Taylor Series Equals ff

Theorem: if limnRn(x)=0\lim_{n\to\infty} R_n(x) = 0 for every xx in an interval II, then the Taylor series equals ff on II:

f(x)=n=0f(n)(a)n!(xa)nf(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n

Example: prove xnn!=ex\sum \frac{x^n}{n!} = e^x for all xx.

Fix xx. f(n+1)(t)=etex=M\lvert f^{(n+1)}(t)\rvert = e^t \le e^{\lvert x\rvert} = M on [0,x][0, x] or [x,0][x, 0].

Rn(x)ex(n+1)!xn+10\lvert R_n(x)\rvert \le \frac{e^{\lvert x\rvert}}{(n+1)!}\lvert x\rvert^{n+1} \to 0

since xn+1(n+1)!0\frac{\lvert x\rvert^{n+1}}{(n+1)!} \to 0 for any fixed xx.

So the Taylor series converges to exe^x for every real xx. ✅

🎵 Audio 6 — Proving Taylor convergence to ffaudio/ch8_06_convergence_proof.mp3


8.7 Comparing AST and Lagrange

AST error bound Lagrange error bound
Applies to alternating series satisfying AST any Taylor polynomial
Formula SSNbN+1\lvert S - S_N\rvert \le b_{N+1} RnM(n+1)!xan+1\lvert R_n\rvert \le \frac{M}{(n+1)!}\lvert x-a\rvert^{n+1}
Cost one term lookup derivative bound + power
Scope alternating only universal but more work

🔑 Choosing: if the series alternates, AST is faster. Otherwise use Lagrange.


8.8 Mixed Example (AP-style)

Problem: f(x)=cosxf(x) = \cos x, a=0a = 0, P4(x)=1x22+x424P_4(x) = 1 - \frac{x^2}{2} + \frac{x^4}{24}. Bound R4(0.3)\lvert R_4(0.3)\rvert.

Step 1: n=4n = 4, x0=0.3x_0 = 0.3.

Step 2: f(5)(t)=sintf^{(5)}(t) = -\sin t, so f(5)(t)1=M\lvert f^{(5)}(t)\rvert \le 1 = M.

Step 3:
R4(0.3)15!(0.3)5=0.002431202.025×105\lvert R_4(0.3)\rvert \le \frac{1}{5!}(0.3)^5 = \frac{0.00243}{120} \approx 2.025 \times 10^{-5}

Estimate P4(0.3)=10.045+0.0003375=0.9553375P_4(0.3) = 1 - 0.045 + 0.0003375 = 0.9553375 vs true cos(0.3)0.9553365\cos(0.3) \approx 0.9553365, agreement to 10610^{-6}. ✓

🎵 Audio 7 — Mixed example + recapaudio/ch8_07_examples_recap.mp3


8.9 Trap Alerts ⚠️

  1. Off-by-one on n+1n+1. The formula uses f(n+1)f^{(n+1)}, (n+1)!(n+1)!, and xan+1\lvert x-a\rvert^{n+1} — all three.
  2. MM bounds the (n+1)(n+1)-th derivative, not the nn-th.
  3. MM is over [a,x0][a, x_0] only, not the entire real line.
  4. sin,cos\sin, \cos derivatives all bounded by 1 — easiest case. exe^x requires emaxe^{\max}.
  5. AP free response wants you to show how MM was found — don't skip the justification.

8.10 Mnemonic

"(n+1)!(n+1)! in the denominator, MM caps the next derivative, distance to the (n+1)(n+1)-th power."

All three slots use n+1n+1.


Media Inventory

File Purpose
audio/ch8_01_motivation.mp3 Why Lagrange?
audio/ch8_02_formula.mp3 Formula breakdown
audio/ch8_03_three_steps.mp3 3-step method
audio/ch8_04_sin_example.mp3 sin(0.5) walkthrough
audio/ch8_05_precision_search.mp3 Inverse problem
audio/ch8_06_convergence_proof.mp3 Proving Taylor = ff
audio/ch8_07_examples_recap.mp3 Mixed example + recap
images/ch8_formula.png Formula card
images/ch8_three_steps.png 3-step flowchart

End of chapter. End of the BC series deep-dive notes.