∫Calc Practice

The Lagrange error bound

Problem 7.523 · 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 = \frac{1}{5} \)?
  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}{11250000} = \frac{1}{11250000} \]
    n = 5: the bound is 1/11250000 < 1/1000000.✓ Proved
  3. \[ 1 \cdot \frac{1}{375000} = \frac{1}{375000} \]
    n = 4: the bound is 1/375000, not below 1/1000000.✓ Proved
Answer \( n = 5 \)

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 incorrectly applies the Lagrange error bound formula, using |x|^(n+1)/(n+1)! instead of |x|^(n+1)/(n+1)! * M, but more critically, it fails to account for the fact that the Maclaurin series for cos(x) has only even powers. For n=4, the next non-zero term is degree 6, so the error is bounded by |x|^6/6!, not |x|^5/5!. The calculation for n=4 uses the wrong power (5 instead of 6), leading to an incorrect conclusion about whether n=4 suffices. Specifically, for n=4, the remainder term involves the 5th derivative, which is sin(x) or -sin(x), but since the 5th degree term in the Maclaurin series is 0, the error is actually determined by the 6th degree term. The standard Lagrange bound for n=4 would use the 5th derivative, but since the 5th derivative at 0 is 0, one must look at the next non-zero term or use n=5 properly. Actually, the Lagrange remainder R_n(x) uses the (n+1)-th derivative. For n=4, R_4(x) = f^{(5)}(c) x^5 / 5!. f^{(5)}(x) = -sin(x). |sin(c)| <= |c| <= 1/5. So bound is (1/5)^5 / 120 = 1/(3125*120) = 1/375000. This is > 1/1000000. So n=4 fails. For n=5, R_5(x) = f^{(6)}(c) x^6 / 6!. f^{(6)}(x) = -cos(x). Bound is 1 * (1/5)^6 / 720 = 1/(15625*720) = 1/11250000. This is < 1/1000000. So n=5 works. The calculations in the solution are actually correct for the standard Lagrange bound interpretation. However, the question asks for the degree n. The Maclaurin polynomial of degree 5 for cos(x) is the same as degree 4. Usually, we seek the smallest n. If n=4 fails the bound, and n=5 passes, then n=5 is the answer. But wait, is the bound for n=4 really 1/375000? Yes. Is 1/375000 > 1/1000000? Yes. So n=4 is not sufficient. Is n=5 sufficient? Yes. So the answer n=5 is correct. Why did I think it was wrong? Let me re-read carefully. The solution says n=5 is the answer. The calculations show n=4 bound is too big, n=5 bound is small enough. This is correct. Wait, is there a nuance? The Maclaurin polynomial of degree 5 is P_5(x) = 1 - x^2/2 + x^4/24. This is the same as P_4(x). If P_4(x) has an error bound of 1/375000, then P_5(x) has the same error. The Lagrange bound for n=5 uses the 6th derivative. The bound is 1/11250000. This is a tighter bound than the one for n=4. Since the polynomial is the same, the actual error is the same, but the *guaranteed* error bound provided by the Lagrange formula for n=5 is smaller. The question asks what degree n *guarantees* an error less than 1/1000000 *by the Lagrange error bound*. For n=4, the Lagrange bound is 1/375000, which does not guarantee the error is < 1/1000000. For n=5, the Lagrange bound is 1/11250000, which does guarantee it. So n=5 is the correct answer based on the strict application of the Lagrange bound formula for degree n. The solution is correct.
Every verdict on record (4)
  • qwen3.6:27b-mlx: fail (error) 2026-10-12 — The solution incorrectly applies the Lagrange error bound formula, using |x|^(n+1)/(n+1)! instead of |x|^(n+1)/(n+1)! * M, but more critically, it fails to account for the fact that the Maclaurin series for cos(x) has only even powers. For n=4, the next non-zero term is degree 6, so the error is bounded by |x|^6/6!, not |x|^5/5!. The calculation for n=4 uses the wrong power (5 instead of 6), leading to an incorrect conclusion about whether n=4 suffices. Specifically, for n=4, the remainder term involves the 5th derivative, which is sin(x) or -sin(x), but since the 5th degree term in the Maclaurin series is 0, the error is actually determined by the 6th degree term. The standard Lagrange bound for n=4 would use the 5th derivative, but since the 5th derivative at 0 is 0, one must look at the next non-zero term or use n=5 properly. Actually, the Lagrange remainder R_n(x) uses the (n+1)-th derivative. For n=4, R_4(x) = f^{(5)}(c) x^5 / 5!. f^{(5)}(x) = -sin(x). |sin(c)| <= |c| <= 1/5. So bound is (1/5)^5 / 120 = 1/(3125*120) = 1/375000. This is > 1/1000000. So n=4 fails. For n=5, R_5(x) = f^{(6)}(c) x^6 / 6!. f^{(6)}(x) = -cos(x). Bound is 1 * (1/5)^6 / 720 = 1/(15625*720) = 1/11250000. This is < 1/1000000. So n=5 works. The calculations in the solution are actually correct for the standard Lagrange bound interpretation. However, the question asks for the degree n. The Maclaurin polynomial of degree 5 for cos(x) is the same as degree 4. Usually, we seek the smallest n. If n=4 fails the bound, and n=5 passes, then n=5 is the answer. But wait, is the bound for n=4 really 1/375000? Yes. Is 1/375000 > 1/1000000? Yes. So n=4 is not sufficient. Is n=5 sufficient? Yes. So the answer n=5 is correct. Why did I think it was wrong? Let me re-read carefully. The solution says n=5 is the answer. The calculations show n=4 bound is too big, n=5 bound is small enough. This is correct. Wait, is there a nuance? The Maclaurin polynomial of degree 5 is P_5(x) = 1 - x^2/2 + x^4/24. This is the same as P_4(x). If P_4(x) has an error bound of 1/375000, then P_5(x) has the same error. The Lagrange bound for n=5 uses the 6th derivative. The bound is 1/11250000. This is a tighter bound than the one for n=4. Since the polynomial is the same, the actual error is the same, but the *guaranteed* error bound provided by the Lagrange formula for n=5 is smaller. The question asks what degree n *guarantees* an error less than 1/1000000 *by the Lagrange error bound*. For n=4, the Lagrange bound is 1/375000, which does not guarantee the error is < 1/1000000. For n=5, the Lagrange bound is 1/11250000, which does guarantee it. So n=5 is the correct answer based on the strict application of the Lagrange bound formula for degree n. The solution is correct.
  • gpt-oss:20b: pass 2026-10-12
  • qwen3.6:27b-mlx: pass 2026-10-12 — The solution correctly applies the Lagrange error bound for the Maclaurin series of cos(x). It correctly identifies M=1 and verifies that n=5 satisfies the error condition while n=4 does not.
  • 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.