∫Calc Practice

The Lagrange error bound

Problem 7.474 · easy

What degree \( \displaystyle n \) of Maclaurin polynomial for \( \displaystyle \cos{\left(x \right)} \) guarantees, by the Lagrange error bound, an error less than \( \displaystyle \frac{1}{10000} \) at \( \displaystyle x = 1 \)?
  1. |Rₙ(x)| ≤ M|x|ⁿ⁺¹/(n + 1)!, where M bounds |f⁽ⁿ⁺¹⁾|; here M = 1 because |sin| and |cos| are at most 1.
  2. \[ 1 \cdot \frac{1}{40320} = \frac{1}{40320} \]
    n = 7: the bound is 1/40320 < 1/10000.✓ Proved
  3. \[ 1 \cdot \frac{1}{5040} = \frac{1}{5040} \]
    n = 6: the bound is 1/5040, not below 1/10000.✓ Proved
Answer \( n = 7 \)

Lines: 2 proved, 1 not checked. The answer was also checked a second way, without looking at the solution. The reviewers disagree about how one step is explained; every verdict is in the receipt.

The full receipt
LineStatusChecked byDetail
1Not checked—a sentence; read, not computed
2✓ Provedsympy 1.14.0simplify(lhs - rhs) reduced to 0
3✓ Provedsympy 1.14.0simplify(lhs - rhs) reduced to 0
answer, a second way✓ Checked independentlysympy 1.14.0 + mpmath 1.3.0the bound recomputed at n and n − 1

Reviewers

  • gpt-oss:20b: pass
  • qwen3.6:27b-mlx: inconclusive — reviewer returned a non-object
Every verdict on record (4)
  • gpt-oss:20b: pass 2026-10-10
  • qwen3.6:27b-mlx: inconclusive 2026-10-10 — reviewer returned a non-object
  • qwen3.6:27b-mlx: fail (error) 2026-10-10 — The solution incorrectly applies the Lagrange error bound formula, using n! instead of (n+1)! for the denominator (e.g., claiming 1/40320 for n=7, whereas 8! = 40320, so the bound should be 1/40320 only if the formula was M|x|^{n+1}/(n+1)! and n=7 implies dividing by 8!, which is correct, but the text says 'n=7: the bound is 1/40320' which corresponds to 1/8!, implying the formula used was actually correct in calculation but the explanation is confusing or the previous step's formula was written as n! in the text? Let's re-read carefully. Step 1 says |R_n(x)| <= M|x|^{n+1}/(n+1)!. Step 2 says for n=7, bound is 1/40320. 1/40320 = 1/8!. So the calculation is consistent with the formula in Step 1. However, for n=6, the bound should be 1/7! = 1/5040. Step 3 says 1/5040. So the calculations are correct. Wait, is n=7 the correct answer? The Maclaurin polynomial of degree n for cos(x) has terms up to x^n. If n is odd, the last term is 0. The error bound depends on the first omitted term. For cos(x), the series is 1 - x^2/2! + x^4/4! - x^6/6! + ... The polynomial of degree 7 is the same as degree 6. The error is bounded by the next non-zero term or by the Lagrange remainder. Lagrange remainder R_n(x) = f^{(n+1)}(c) x^{n+1} / (n+1)!. For n=6, R_6(x) = -sin(c) x^7 / 7!. Max error is 1/5040 > 1/10000. For n=7, R_7(x) = cos(c) x^8 / 8!. Max error is 1/40320 < 1/10000. So n=7 is indeed the smallest degree such that the Lagrange bound guarantees the error. The solution is correct. Why did I think it was wrong? Let me re-read the prompt. 'Stated answer: n = 7'. The solution checks n=7 and n=6. It concludes n=7. The logic is sound. The formula in step 1 is correct. The calculations in 2 and 3 are correct. The conclusion is correct. Is there a subtle issue? 'degree n of Maclaurin polynomial'. If n=6, the polynomial is P_6(x). The error is R_6. If n=7, P_7(x) = P_6(x). The error is R_7. The question asks for the degree n. Since P_7 is technically degree 7 (even though the coefficient of x^7 is 0), and the bound for n=7 works, n=7 is a valid answer. Often, textbooks might accept n=6 if they consider the 'effective' degree, but strictly speaking, the Lagrange bound for n=6 fails. So n=7 is the correct answer derived from the Lagrange bound. The solution is sound.
  • gpt-oss:20b: pass 2026-10-10

Proved: SymPy reduced the difference between the two sides to zero. Checked independently: a separate method, named above, confirmed it. Checked numerically: the two sides agree at every sampled point, which is evidence, not proof. Reviewed: a model or a person read it; that is all a sentence can have. Solution by generator:structured/lagrange_error, checked 2026-10-10 with SymPy 1.14.0.