Numerical Integration & Area Under Curve Calculator
Calculate the area under a curve numerically using the trapezium rule or Simpson's rule. Enter y-values at equally spaced x-intervals.
As an Amazon Associate and CJ Affiliate publisher we earn from qualifying purchases. Prices and availability may vary.
Numerical Integration Guide
What do I need to know about The Trapezium Rule?
Area ≈ h/2 × (y₀ + 2y₁ + 2y₂ + ... + 2y_{n-1} + y_n). Where h = (b-a)/n is the strip width. The first and last ordinates appear once; all others appear twice. This estimates the area by approximating each strip as a trapezoid. Accuracy: the trapezium rule overestimates for convex curves and underestimates for concave curves. The error is proportional to h² — halving h quarters the error. More strips = more accurate. Example: y = x² from 0 to 4 with 4 strips (h=1). y values: 0, 1, 4, 9, 16. Area = h/2 × [y₀ + 2(y₁+y₂+y₃) + y₄] = 0.5 × [0 + 2(1+4+9) + 16] = 22, a reasonable approximation to the true integral value of 21.33.
What should I know about Simpson's Rule?
Area ≈ h/3 × (y₀ + 4y₁ + 2y₂ + 4y₃ + ... + 4y_{n-1} + y_n). Requires an even number of strips (odd number of ordinates). Weights alternate 4, 2, 4, 2... between the inner points. Simpson's rule fits parabolas through each triplet of consecutive points — much more accurate than the trapezium rule for smooth functions. The error is proportional to h⁴ — halving h gives 16× reduction in error. For the same example (x² from 0 to 4 with 4 strips): Area ≈ 1/3 × (0 + 4×1 + 2×4 + 4×9 + 16) = 1/3 × 64 = 2
When to Use Each Method?
Trapezium rule: when you have measured data at equally spaced intervals and cannot choose the method. When you have an odd number of strips. When a quick estimate is sufficient. Simpson's rule: when you need higher accuracy. When the function is smooth. Must have an even number of strips (n must be even). A-level maths: both methods are in the A-level syllabus. Simpson's rule gives much better accuracy for most smooth functions — typically 10-100 times more accurate than the trapezium rule for the same number of strips, which is why it's the preferred numerical method wherever the function is reasonably smooth.
What's the key thing to understand about Improving Accuracy?
Strategies to improve numerical integration accuracy: increase the number of strips (most straightforward). Use Simpson's rule instead of trapezium where possible. Use composite rules: apply Simpson's rule to smaller sub-intervals. Check convergence: if doubling the strips gives a noticeably different answer, the current accuracy is insufficient. Upper and lower bounds: for monotone functions, trapezium rule gives either an overestimate or underestimate — the average of upper and lower rectangle