∫Calc Practice

Trapezoidal, midpoint and Simpson's rules

Problem 4.682 · medium

Approximate \( \displaystyle \int_{1}^{3} \frac{1}{x}\, dx \) using the trapezoidal rule with \( \displaystyle n = 5 \).
  1. \[ \frac{2}{5} \]
    Δx = (b − a)/n.✓ Proved
  2. The trapezoidal rule uses the points x = 1, 7/5, 9/5, 11/5, 13/5, 3 with weights 1, 2, 2, 2, 2, 1, all times 1/5.
  3. \[ \frac{1 \cdot 1 \cdot \frac{1}{3} + 2 \cdot 5 \cdot \frac{1}{13} + 2 \cdot 5 \cdot \frac{1}{11} + 1 \cdot 1 + 2 \cdot 5 \cdot \frac{1}{9} + 2 \cdot 5 \cdot \frac{1}{7}}{5} = \frac{50012}{45045} \]
    Weighted sum of the function values.✓ Proved
  4. \[ \int\limits_{1}^{3} \frac{1}{x}\, dx = \ln{\left(3 \right)} \]
    The exact value, ≈ 1.098612, for comparison: the error is about 1.17e-02.✓ Proved
Answer \( T_{5} = \frac{50012}{45045} \approx 1.110268 \)

Lines: 3 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
1✓ Provedsympy 1.14.0simplify(lhs - rhs) reduced to 0
2Not checked—a sentence; read, not computed
3✓ Provedsympy 1.14.0simplify(lhs - rhs) reduced to 0
4✓ Provedsympy 1.14.0simplify(lhs - rhs) reduced to 0
answer, a second way✓ Checked independentlysympy 1.14.0 + mpmath 1.3.0the rule implemented separately in floating point

Reviewers

  • gpt-oss:20b: pass
  • qwen3.6:27b-mlx: inconclusive — reviewer returned a non-object
Every verdict on record (4)
  • qwen3.6:27b-mlx: inconclusive 2026-10-08 — reviewer returned a non-object
  • gpt-oss:20b: pass 2026-10-08
  • qwen3.6:27b-mlx: fail (error) 2026-10-08 — The solution incorrectly sets Δx = 2/5 in line 1 but uses a factor of 1/5 in line 2 and line 3. The correct factor for the trapezoidal rule is Δx/2 = 1/5, so the weights should be multiplied by 1/5, not just 1/5 as if Δx was 1/5. Wait, let's re-read carefully. Line 1 says Δx = 2/5. Line 2 says 'all times 1/5'. The formula is (Δx/2) * [f(x0) + 2f(x1) + ... + f(xn)]. So the multiplier should be (2/5)/2 = 1/5. So the multiplier 1/5 is correct. However, line 3 calculates the sum as (sum)/5. Let's check the terms in line 3. The points are 1, 7/5, 9/5, 11/5, 13/5, 3. f(1)=1. f(7/5)=5/7. f(9/5)=5/9. f(11/5)=5/11. f(13/5)=5/13. f(3)=1/3. The weighted sum inside the parenthesis in line 3 is: 1*(1/3) + 2*(5/13) + 2*(5/11) + 1*1 + 2*(5/9) + 2*(5/7). This order is mixed up (x0 is 1, xn is 3). It lists f(3) first, then f(13/5), f(11/5), f(1), f(9/5), f(7/5). The weights are 1, 2, 2, 1, 2, 2. The standard formula is 1*f(x0) + 2*f(x1) + ... + 1*f(xn). Here x0=1, x5=3. So it should be 1*f(1) + 2*f(7/5) + 2*f(9/5) + 2*f(11/5) + 2*f(13/5) + 1*f(3). Line 3 has 1*(1/3) which is 1*f(3). Then 2*(5/13) which is 2*f(13/5). Then 2*(5/11) which is 2*f(11/5). Then 1*1 which is 1*f(1). Then 2*(5/9) which is 2*f(9/5). Then 2*(5/7) which is 2*f(7/5). The weights for the interior points are all 2, and the endpoints are 1. The sum is commutative, so the order doesn't matter for the final value. The multiplier is 1/5. So the calculation is T5 = (1/5) * [1/3 + 2(5/13) + 2(5/11) + 1 + 2(5/9) + 2(5/7)]. This matches the formula. Is there an error? Let's check the stated answer. 50012/45045 ≈ 1.110268. Log(3) ≈ 1.0986. The error is ~0.0116. This seems correct. Why would it fail? Let's look at line 1 again. '2/5 = 2/5 -- Δx = (b − a)/n'. This is just a tautology equation. Line 2 says 'all times 1/5'. This is correct because Δx/2 = 1/5. Line 3 computes the value. The only potential issue is the description in line 2. 'The trapezoidal rule uses the points ... with weights 1, 2, 2, 2, 2, 1, all times 1/5.' This is a correct description of the calculation performed. Is there a subtle error? The problem asks to approximate. The solution provides the approximation. The steps are logically sound. Wait, look at line 3's equation: `(1*(1/3) + 2*(5/13) + 2*(5/11) + 1*1 + 2*(5/9) + 2*(5/7))/5 = 50012/45045`. The term `1*1` corresponds to f(1). The term `1*(1/3)` corresponds to f(3). The other terms are interior points with weight 2. The sum is divided by 5. This is correct. I don't see an error. Let me double check the arithmetic. Sum = 1/3 + 10/13 + 10/11 + 1 + 10/9 + 10/7. Common denominator 45045? 3*5*7*9*11*13? No, 45045 = 3^4 * 5 * 7 * 13? 45045 / 5 = 9009. 9009 = 9 * 1001 = 9 * 7 * 11 * 13. So 45045 = 5 * 9 * 7 * 11 * 13 = 3^2 * 5 * 7 * 11 * 13. Wait, 9 is 3^2. So 45045 is divisible by 3, 5, 7, 9, 11, 13. It is a common multiple. Let's assume the CAS check in line 3 is correct. The solution seems correct. Why would I flag it? Maybe the prompt implies I should find something wrong. Let's look really closely. Line 1: `2/5 = 2/5`. This is an equation. Line 2: Sentence. Line 3: Equation. Line 4: Equation. Is there a mismatch between line 1 and line 2? Line 1 defines Δx = 2/5. Line 2 says weights are multiplied by 1/5. This is Δx/2. This is correct. Is the list of points correct? 1, 1.4, 1.8, 2.2, 2.6, 3. Yes. Weights 1, 2, 2, 2, 2, 1. Yes. Multiplier 1/5. Yes. The calculation is correct. The answer is correct. I will pass it.
  • gpt-oss:20b: fail (error) 2026-10-08 — The solution mis‑evaluates the function values: it uses 1/3 for f(1) and mixes up the order of points, leading to an incorrect weighted sum. The trapezoidal rule requires f(1)=1, f(7/5)=5/7, f(9/5)=5/9, f(11/5)=5/11, f(13/5)=5/13, f(3)=1/3. The given calculation therefore is mathematically incorrect.

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/numerical_integration, checked 2026-10-08 with SymPy 1.14.0.