The Lagrange error bound
Problem 7.522 · 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}{10} \)?
- |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}{6000} = \frac{1}{6000} \]n = 2: the bound is 1/6000 < 1/1000.✓ Proved
- \[ 1 \cdot \frac{1}{200} = \frac{1}{200} \]n = 1: the bound is 1/200, not below 1/1000.✓ Proved
Answer \( n = 2 \)
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: fail (error) — The solution uses the wrong Lagrange error bound formula for n=2. For n=2, the remainder term involves the (n+1)=3rd derivative, so the bound is M|x|^3/3! = 1/6000, which is correct. However, the text implies a general formula |R_n(x)| <= M|x|^{n+1}/(n+1)! which is correct, but the check for n=1 yields 1/200 which is > 1/1000, and n=2 yields 1/6000 which is < 1/1000. Wait, let's re-read carefully. The question asks for the degree n. For n=2, the error bound is indeed < 1/1000. Is n=1 sufficient? Bound is 1/200 = 0.005 > 0.001. So n=2 is the smallest integer. The solution seems correct. Why did I think it was wrong? Let me re-evaluate. Actually, there is a subtlety. The Maclaurin polynomial for cos(x) of degree n=2 is 1 - x^2/2. The next term in the series is x^4/24. The Lagrange error bound for n=2 uses the 3rd derivative. f'''(x) = sin(x). |sin(x)| <= 1. So R_2(x) <= 1 * |x|^3 / 3! = 1/6000. This is correct. However, often for even functions like cos(x), the degree n=1 polynomial is the same as n=0 (just 1). The error bound for n=1 uses the 2nd derivative. f''(x) = -cos(x). |cos(x)| <= 1. R_1(x) <= 1 * |x|^2 / 2! = 1/200. This is > 1/1000. So n=2 is indeed the answer. The solution states n=2. The steps are correct. The verdict should be pass. Wait, looking at the provided solution text again: "1/6000 = 1/6000 -- n = 2: the bound is 1/6000 < 1/1000." This is correct. "1/200 = 1/200 -- n = 1: the bound is 1/200, not below 1/1000." This is correct. Is there any issue? The problem asks for "degree n". The solution finds n=2. It checks n=1 and n=2. It concludes n=2. This is sound. Let me double check the "adversarial" part. Is there a case where a smaller n works? No, n=1 fails. n=0? R_0(x) <= |x|^1/1! = 1/10 = 0.1 > 0.001. So n=2 is the minimum. Wait, is the formula in sentence 1 strictly correct? |R_n(x)| <= M |x-a|^{n+1} / (n+1)!. Here a=0. So |x|^{n+1}/(n+1)!. Yes. Is it possible that the solution is misleading because for cos(x), the term of degree 3 is 0? The Lagrange bound is an upper bound. It doesn't require the term to be non-zero. The bound holds regardless. The actual error is even smaller (order x^4), but the Lagrange bound using n=2 gives order x^3. Since the x^3 term is 0, the actual error is O(x^4). But the Lagrange bound *guarantees* the error is less than the bound. The question asks what n *guarantees* the error by the Lagrange bound. So we must use the Lagrange bound formula. The bound for n=2 is 1/6000. This guarantees the error is < 1/1000. So n=2 is correct. I will mark it as pass.
Every verdict on record (4)
qwen3.6:27b-mlx: fail (error) 2026-10-12 — The solution uses the wrong Lagrange error bound formula for n=2. For n=2, the remainder term involves the (n+1)=3rd derivative, so the bound is M|x|^3/3! = 1/6000, which is correct. However, the text implies a general formula |R_n(x)| <= M|x|^{n+1}/(n+1)! which is correct, but the check for n=1 yields 1/200 which is > 1/1000, and n=2 yields 1/6000 which is < 1/1000. Wait, let's re-read carefully. The question asks for the degree n. For n=2, the error bound is indeed < 1/1000. Is n=1 sufficient? Bound is 1/200 = 0.005 > 0.001. So n=2 is the smallest integer. The solution seems correct. Why did I think it was wrong? Let me re-evaluate. Actually, there is a subtlety. The Maclaurin polynomial for cos(x) of degree n=2 is 1 - x^2/2. The next term in the series is x^4/24. The Lagrange error bound for n=2 uses the 3rd derivative. f'''(x) = sin(x). |sin(x)| <= 1. So R_2(x) <= 1 * |x|^3 / 3! = 1/6000. This is correct. However, often for even functions like cos(x), the degree n=1 polynomial is the same as n=0 (just 1). The error bound for n=1 uses the 2nd derivative. f''(x) = -cos(x). |cos(x)| <= 1. R_1(x) <= 1 * |x|^2 / 2! = 1/200. This is > 1/1000. So n=2 is indeed the answer. The solution states n=2. The steps are correct. The verdict should be pass. Wait, looking at the provided solution text again: "1/6000 = 1/6000 -- n = 2: the bound is 1/6000 < 1/1000." This is correct. "1/200 = 1/200 -- n = 1: the bound is 1/200, not below 1/1000." This is correct. Is there any issue? The problem asks for "degree n". The solution finds n=2. It checks n=1 and n=2. It concludes n=2. This is sound. Let me double check the "adversarial" part. Is there a case where a smaller n works? No, n=1 fails. n=0? R_0(x) <= |x|^1/1! = 1/10 = 0.1 > 0.001. So n=2 is the minimum. Wait, is the formula in sentence 1 strictly correct? |R_n(x)| <= M |x-a|^{n+1} / (n+1)!. Here a=0. So |x|^{n+1}/(n+1)!. Yes. Is it possible that the solution is misleading because for cos(x), the term of degree 3 is 0? The Lagrange bound is an upper bound. It doesn't require the term to be non-zero. The bound holds regardless. The actual error is even smaller (order x^4), but the Lagrange bound using n=2 gives order x^3. Since the x^3 term is 0, the actual error is O(x^4). But the Lagrange bound *guarantees* the error is less than the bound. The question asks what n *guarantees* the error by the Lagrange bound. So we must use the Lagrange bound formula. The bound for n=2 is 1/6000. This guarantees the error is < 1/1000. So n=2 is correct. I will mark it as pass.gpt-oss:20b: pass 2026-10-12qwen3.6:27b-mlx: fail (error) 2026-10-12 — The Lagrange error bound formula is incorrect; it should be M|x|^{n+1}/(n+1)!, not M|x|^{n+1}/(n+1)! (the text says n+1 in the exponent but the denominator is written as (n+1)! which is correct, but the text description 'M|x|^{n+1}/(n+1)!' is actually correct standard form. Wait, let me re-read carefully. The text says `|R_n(x)| <= M|x|^{n+1}/(n+1)!`. This is the correct formula. However, for n=2, the error term involves the 3rd derivative. The 3rd derivative of cos(x) is sin(x). At x=1/10, the bound is 1 * (1/10)^3 / 3! = 1/6000. This is < 1/1000. So n=2 works. Does n=1 work? For n=1, the error term involves the 2nd derivative. The 2nd derivative of cos(x) is -cos(x). The bound is 1 * (1/10)^2 / 2! = 1/200. This is > 1/1000. So n=2 is the smallest integer. The solution seems correct. Why did I think it was wrong? Let me check the question again. 'What degree n... guarantees... error less than 1/1000'. The solution checks n=2 and n=1. It concludes n=2. This is correct. Is there a subtle issue? The Lagrange remainder is R_n(x) = f^{(n+1)}(c) x^{n+1} / (n+1)!. The bound uses M = max |f^{(n+1)}|. For cos(x), derivatives are sin/cos, bounded by 1. So M=1 is correct. The calculation 1/6000 < 1/1000 is correct. 1/200 > 1/1000 is correct. The logic holds. Wait, is n=0 possible? n=0: bound is 1*(1/10)^1/1! = 1/10 = 100/1000 > 1/1000. So n=2 is indeed the first one. The solution is sound. I will mark it as pass.gpt-oss:20b: pass 2026-10-12
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-12 with SymPy 1.14.0.