∫₀¹ x² dx, n = 4
T = 0.34375
h = 0.25.
The composite trapezium rule with step on has error for some in : proportional to and to the curvature of the function.
This page is easier if you are comfortable with:
For with : , and the error exactly, because is constant (the trapezium rule). For with : , error , below the bound .
The rule overestimates for a convex function (positive ) because the chords lie above the curve. To guarantee error below for : gives , so strips. Halving divides the error by about four. The error formula comes from the interpolation error for a line through two points (interpolation error).
Simpson's rule has error of order (Simpson's rule error), and Gaussian quadrature is more accurate still (Gaussian quadrature). The derivative bounds use the second derivative, and the exact values come from exponential integrals.
The trapezium rule error depends on how curved the function is and shrinks as the strip width squared.
About 48 strips are needed for an error below 0.0001.
These examples are worked by hand, step by step, so you can compare your own working.
Find the error of the trapezium rule for with .
Find the bound on the error.
How many strips make the bound for less than ?
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
T = 0.34375
h = 0.25.
1/3 ≈ 0.33333
The rule overestimates (convex).
0.0104 = (b − a)h² f″/12
1 × 0.0625 × 2 ÷ 12.
error becomes a quarter
O(h²).
For the composite trapezium rule with step h on [a, b], the error is −(b − a)h² f″(ξ)/12. Halving h divides the error by about 4.
Estimate ∫₀¹ x² dx with n = 4.
Find T − exact.
Use (b − a)h²f″/12.
Predict the error with n = 8.
T = h/2 (f₀ + f₁ + … + fₙ) ✗
interior points counted twice ✓
Weights 1, 2, …, 2, 1.
error ∝ h ✗
error ∝ h² ✓
Second-order accurate.
underestimate for convex f ✗
overestimate when f″ > 0 ✓
Chords lie above the curve.
bound with max f ✗
bound with max |f″| ✓
Curvature controls the error.
Try each one on paper, then open the answer. Use the solver above to see the full working.
0.5
3
2.6667
0.3333
0.3333
0.2
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.
Solve: …
−(b − a)h²f″(ξ)/12.
Over for convex functions.
Error divides by about 4.
Yes.
Simpson’s rule error.
More in Numerical methods and optimisation and the formula sheets.