The trapezoidal rule approximates the definite integral by n trapezoids of width Δx. End ordinates are counted once; interior ordinates twice. Error is typically larger than Simpson's rule (which needs even n).
a,b
Limits of integration
n
Number of subintervals
Δx
Width of each panel
yi
f at the i-th node
Step-by-step solved example
Approximate ∫_0^2 x² dx with n = 2 trapezoids.
Trapezoidal rule: piecewise linear area under the curve.
1. Spacing
Δx = (2−0)/2 = 1. Nodes x = 0, 1, 2 → y = 0, 1, 4.
2. Rule
(Δx/2)[y0 + 2y1 + y2] = 0.5[0 + 2 + 4] = 3.
≈3
3. Exact check
Exact = 8/3 ≈ 2.667. Trapezoids overestimate a convex-up parabola.
Answer: 3 (exact 8/3)
10 practice questions
0/10 correct
1.n = 4 from 0 to 2. Δx equals
2.Interior ordinates in the trapezoidal formula are multiplied by