The Lagrange error bound
Problem 7.345 · 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}{1000} \) at \( \displaystyle x = \frac{1}{2} \)?
- |Rₙ(x)| ≤ M|x|ⁿ⁺¹/(n + 1)!, where M bounds |f⁽ⁿ⁺¹⁾|; here M = 1 because |sin| and |cos| are at most 1.
- \[ 1 \cdot \frac{1}{3840} = \frac{1}{3840} \]n = 4: the bound is 1/3840 < 1/1000.✓ Proved
- \[ 1 \cdot \frac{1}{384} = \frac{1}{384} \]n = 3: the bound is 1/384, not below 1/1000.✓ Proved
Answer \( n = 4 \)
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
| Line | Status | Checked by | Detail |
|---|---|---|---|
| 1 | Not checked | — | a sentence; read, not computed |
| 2 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| 3 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| answer, a second way | ✓ Checked independently | sympy 1.14.0 + mpmath 1.3.0 | the bound recomputed at n and n − 1 |
Reviewers
gpt-oss:20b: passqwen3.6:27b-mlx: inconclusive — reviewer response could not be parsed: {"verdict": "fail", "severity": "error", "notes": "The Lagrange error bound formula is incorrect; it should be M|x|^{n+1}/(n+1)!, but the solution uses |x|^n/n! implicitly or mislabels the term. Speci
Every verdict on record (4)
gpt-oss:20b: pass 2026-10-06qwen3.6:27b-mlx: inconclusive 2026-10-06 — reviewer response could not be parsed: {"verdict": "fail", "severity": "error", "notes": "The Lagrange error bound formula is incorrect; it should be M|x|^{n+1}/(n+1)!, but the solution uses |x|^n/n! implicitly or mislabels the term. Speciqwen3.6:27b-mlx: fail (error) 2026-10-06 — The solution incorrectly applies the Lagrange error bound formula, using n+1 in the exponent and factorial instead of the correct n+1 for the derivative order but failing to account for the fact that the (n+1)-th derivative of cos(x) is 0 when n is odd (specifically n=3, where the 4th derivative is cos(x), not 0, wait. Let's re-evaluate. For n=3, the remainder term involves the 4th derivative. f^(4)(x) = cos(x). M=1. Bound is |x|^4 / 4! = (1/2)^4 / 24 = 1/16 / 24 = 1/384. This is > 1/1000. For n=4, the remainder term involves the 5th derivative. f^(5)(x) = -sin(x). M=1. Bound is |x|^5 / 5! = (1/2)^5 / 120 = 1/32 / 120 = 1/3840. This is < 1/1000. So n=4 is indeed the answer. However, the sentence says |R_n(x)| <= M|x|^(n+1)/(n+1)!. This is the standard Lagrange form. Is it wrong? No. But wait, for Maclaurin series of cos(x), the terms for odd powers are 0. The polynomial of degree 3 is the same as degree 2. The error bound for n=2 uses the 3rd derivative (sin), bound 1/48. 1/48 > 1/1000. The error bound for n=3 uses the 4th derivative (cos), bound 1/384. 1/384 > 1/1000. The error bound for n=4 uses the 5th derivative (sin), bound 1/3840. 1/3840 < 1/1000. So n=4 is correct. Why did I think it was wrong? Let me re-read the prompt. 'Review worked calculus solutions adversarially'. Is there a subtle error? The sentence says 'M bounds |f^(n+1)|'. For n=4, f^(5) is -sin. Max is 1. Correct. For n=3, f^(4) is cos. Max is 1. Correct. The calculations in the equations are correct. The conclusion is correct. Is there a style issue? The sentence is a bit terse but correct. Wait, look at the equation lines. They are marked 'unchecked'. I should not check the algebra. I should check the sentences. Sentence 1 is the only sentence. It states the formula and the value of M. This is correct. So why would it fail? Maybe the question implies finding the *smallest* n? 'What degree n ... guarantees'. Usually implies smallest. n=4 is the smallest integer satisfying the condition. n=5 would also satisfy it, but 4 is the answer. Is it possible that n=3 works because the 4th term is 0? No, the Lagrange bound is an upper bound on the error. Even if the actual error is smaller (because the next non-zero term is degree 6), the Lagrange bound *as stated* for n=3 is 1/384, which does not guarantee < 1/1000. To guarantee < 1/1000 using the Lagrange bound, you must use an n where the bound is < 1/1000. If you use n=3, the bound is 1/384. This does not guarantee the error is < 1/1000. You would need to use n=4 (or n=5, since the 5th degree term is 0, the polynomial is the same, but the bound for n=4 is tighter than n=3? No, the bound for n=4 is 1/3840. The bound for n=5 would involve the 6th derivative (cos), bound 1/2! * (1/2)^6? No, 6! = 720. 1/720 * 1/64 = 1/46080. Even smaller. But n=4 is sufficient. So the answer n=4 is correct. The solution is sound. Verdict: pass.gpt-oss:20b: pass 2026-10-06
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-06 with SymPy 1.14.0.