∫Calc Practice

The Lagrange error bound

Problem 7.262 · 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}{1000000} \) 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}{3628800} = \frac{1}{3628800} \]
    n = 9: the bound is 1/3628800 < 1/1000000.✓ Proved
  3. \[ 1 \cdot \frac{1}{362880} = \frac{1}{362880} \]
    n = 8: the bound is 1/362880, not below 1/1000000.✓ Proved
Answer \( n = 9 \)

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: fail (error) — The solution uses the wrong error bound formula. For a Maclaurin polynomial of degree n, the Lagrange error bound involves the (n+1)-th derivative, but for cos(x), the (n+1)-th derivative is 0 when n is odd (since the next term in the series is 0). Specifically, for n=9, the next non-zero term is degree 10, so the error is bounded by 1/10! = 1/3628800, which is correct, but the formula stated in line 1 is generic and misleading because it doesn't account for the fact that the (n+1)-th derivative might be zero at x=0 or that the bound should technically use the first non-zero term after n. More critically, for n=8, the next term is degree 9, which is 0 for cos(x) (since cos is even), so the error is actually bounded by the degree 10 term, 1/10!. The solution claims n=8 gives a bound of 1/9! = 1/362880, which is incorrect because the 9th derivative of cos(x) at 0 is 0. The actual error for n=8 is the same as for n=9, bounded by 1/10!. Thus, n=8 also satisfies the condition, making n=9 not the minimal degree, or at least the reasoning for rejecting n=8 is flawed.
Every verdict on record (4)
  • qwen3.6:27b-mlx: fail (error) 2026-10-04 — The solution uses the wrong error bound formula. For a Maclaurin polynomial of degree n, the Lagrange error bound involves the (n+1)-th derivative, but for cos(x), the (n+1)-th derivative is 0 when n is odd (since the next term in the series is 0). Specifically, for n=9, the next non-zero term is degree 10, so the error is bounded by 1/10! = 1/3628800, which is correct, but the formula stated in line 1 is generic and misleading because it doesn't account for the fact that the (n+1)-th derivative might be zero at x=0 or that the bound should technically use the first non-zero term after n. More critically, for n=8, the next term is degree 9, which is 0 for cos(x) (since cos is even), so the error is actually bounded by the degree 10 term, 1/10!. The solution claims n=8 gives a bound of 1/9! = 1/362880, which is incorrect because the 9th derivative of cos(x) at 0 is 0. The actual error for n=8 is the same as for n=9, bounded by 1/10!. Thus, n=8 also satisfies the condition, making n=9 not the minimal degree, or at least the reasoning for rejecting n=8 is flawed.
  • gpt-oss:20b: pass 2026-10-04
  • qwen3.6:27b-mlx: pass 2026-10-04 — The solution correctly applies the Lagrange error bound formula for the Maclaurin series of cos(x), noting that the maximum value of the derivative is 1. It correctly identifies that n=9 yields an error bound less than 1/1,000,000, while n=8 does not.
  • gpt-oss:20b: pass 2026-10-04

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-04 with SymPy 1.14.0.