Historical Context & Motivation
Long before modern computers existed, mathematicians faced a fundamental challenge: many functions simply cannot be integrated using a neat formula. Imagine trying to find the exact area under a curve like f(x) = e−x² — there is no elementary antiderivative for this function, yet scientists and engineers desperately needed its area for applications in probability and statistics. The solution? Approximate the area by breaking the region into simple geometric shapes whose areas are easy to compute.
This idea of numerical integration — estimating definite integrals through approximation — stretches back thousands of years. Ancient Greek mathematicians used methods of exhaustion to estimate areas, and later thinkers refined these ideas into the structured techniques we use today: the trapezoidal rule and Simpson's rule.
The central question these methods answer is straightforward: How can we accurately estimate the value of a definite integral when we cannot find — or choose not to find — an antiderivative? This is not just an academic exercise; it arises constantly in real-world modeling, from calculating distance traveled using speed data to estimating probabilities under bell curves.
Core Principles & Definitions
Before diving into formulas, let's establish the key ideas that underpin both the trapezoidal rule and Simpson's rule. Both methods share a common strategy: divide the interval [a, b] into smaller pieces, approximate the curve on each piece with a simple shape, and add up those areas.
Subintervals & Strip Width
Ordinates (y-values)
Trapezoidal Approximation
Parabolic Approximation (Simpson's)
Even Number Requirement
Visual Explanation — Trapezoids Under a Curve
In the diagram above, you can see that each trapezoid has two parallel vertical sides (the ordinates yi and yi+1) and a slanted top edge connecting them. The area of a single trapezoid is ½ × h × (yi + yi+1). When the curve is concave up, the trapezoids tend to overestimate the area; when the curve is concave down, they underestimate it. This systematic error is what motivates the more sophisticated Simpson's rule, which fits parabolas instead of straight lines.
Mathematical Framework
The Trapezoidal Rule
We partition the interval [a, b] into n equal subintervals, each of width h. The endpoints generate n + 1 ordinates. The trapezoidal rule sums the areas of all n trapezoids.
Simpson's Rule
Simpson's rule takes things a step further by fitting a quadratic (parabolic) curve through each group of three consecutive points. Because a parabola can bend, it follows the actual curve much more faithfully than a straight line. The requirement is that n must be even, since the parabolas are fitted over pairs of subintervals.
Comparing Trapezoids and Parabolas
Let's visualize the fundamental difference between these two methods side by side. The trapezoidal rule connects consecutive points with straight lines, whereas Simpson's rule fits smooth parabolic arcs through groups of three points. This seemingly small change has a dramatic effect on accuracy.
| Feature | Trapezoidal Rule | Simpson's Rule |
|---|---|---|
| Shape used | Straight-line segments (linear) | Parabolic arcs (quadratic) |
| Coefficient pattern | 1, 2, 2, …, 2, 1 | 1, 4, 2, 4, …, 4, 1 |
| Multiplier | h / 2 | h / 3 |
| Requirement for n | Any positive integer | Must be even |
| Error order | O(h²) — proportional to h² | O(h⁴) — proportional to h⁴ (much smaller) |
| Exact for | Linear functions | Polynomials up to degree 3 |
The error order is particularly important. Saying the trapezoidal rule has error O(h²) means that if you halve the strip width (double the number of subintervals), the error decreases by roughly a factor of 4. For Simpson's rule with error O(h⁴), halving h reduces the error by roughly a factor of 16. This is why Simpson's rule achieves excellent accuracy even with relatively few subintervals.
Worked Example
Let's estimate ∫₁³ (1/x) dx using both rules with n = 4 subintervals. The exact answer is ln 3 − ln 1 = ln 3 ≈ 1.0986, so we can check our approximations.
Strengths, Limitations & When to Use Each
Both methods are powerful, but each has situations where it shines and situations where it struggles. Understanding these trade-offs is essential for making good choices on exams and in real applications.
| Consideration | Trapezoidal Rule | Simpson's Rule |
|---|---|---|
| Strengths | Works with any n; simple to apply; easy to remember (coefficient pattern 1, 2, 2, …, 2, 1) | Much higher accuracy for the same n; exact for polynomials up to degree 3; coefficient pattern (1, 4, 2, …) is still manageable |
| Limitations | Larger error for curved functions; tends to overshoot on concave-up curves and undershoot on concave-down curves | Requires n to be even; slightly more complex arithmetic; coefficient errors can cascade in hand calculations |
| Best used when | Data comes from experiments (odd number of points allowed); a quick rough estimate is needed | High accuracy is required; the function is smooth; n can be chosen freely (pick an even number) |
| IB exam frequency | Very common in Paper 2; often with data in a table | Common in HL papers; sometimes compared with the trapezoidal rule in the same question |
Connection to Riemann Sums & Beyond
You may have already encountered Riemann sums — left-endpoint, right-endpoint, and midpoint approximations — which use rectangles to estimate area. The trapezoidal rule can be viewed as the average of the left and right Riemann sums, which is why it's generally more accurate than either one alone. Simpson's rule goes further by being equivalent to a weighted combination of the midpoint and trapezoidal estimates.
| Method | Shape | Error Order | IB Level |
|---|---|---|---|
| Left / Right Riemann Sum | Rectangle | O(h) | SL & HL (conceptual) |
| Midpoint Rule | Rectangle (midpoint height) | O(h²) | Supplementary |
| Trapezoidal Rule | Trapezoid | O(h²) | AHL 5.13 |
| Simpson's Rule | Parabolic arc | O(h⁴) | AHL 5.13 (HL enrichment) |
| Gaussian Quadrature | Optimal polynomial nodes | O(h²ⁿ) | University level |
At university, you'll encounter even more powerful techniques such as Gaussian quadrature and adaptive methods that automatically concentrate subintervals where the function changes most rapidly. For now, mastering the trapezoidal and Simpson's rules gives you a solid foundation in the core idea: replace a hard integral with a sum of areas under simple shapes. This principle never changes, no matter how sophisticated the method becomes.
Practice Problems
Lesson Summary
Numerical integration allows us to estimate definite integrals when no elementary antiderivative exists — or when data comes from measurements rather than a formula. The trapezoidal rule divides [a, b] into n subintervals of width h = (b − a)/n and approximates the curve with straight-line segments, using the coefficient pattern 1, 2, 2, …, 2, 1 multiplied by h/2. It works for any n and has error of order O(h²).
Simpson's rule fits parabolic arcs through groups of three points, using the coefficient pattern 1, 4, 2, 4, …, 4, 1 multiplied by h/3. It requires n to be even and achieves error of order O(h⁴), making it significantly more accurate for smooth functions. Both methods build on the same fundamental idea — replace a complex curve with simple geometric shapes and sum their areas — and both are indispensable tools in applied mathematics, science, and engineering.