SECTION 1
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.
~250 BCE • Archimedes' Method of Exhaustion
1670s • Newton & Leibniz Develop Calculus
1743 • Thomas Simpson Publishes His Rule
1800s • Trapezoidal Rule Becomes Standard
1950s–Today • Computer-Age Numerical Methods
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.
SECTION 2
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
KEY TAKEAWAY
SECTION 3
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.
SECTION 4
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.
STRIP WIDTH
where a and b are the limits of integration and n is the number of subintervals.
TRAPEZOIDAL RULE
The first and last ordinates appear once; all interior ordinates are multiplied by 2. This is the IB formula booklet version.
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.
SIMPSON'S RULE
The coefficients follow the pattern 1, 4, 2, 4, 2, …, 4, 1. The first and last ordinates have coefficient 1, odd-indexed ordinates get 4, and even-indexed interior ordinates get 2. The factor is h/3 rather than h/2.
IB Exam Tip
SECTION 5
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 |
Key differences between the trapezoidal and Simpson's rules
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.
SECTION 6
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.
Trapezoidal Rule for ∫₁³ (1/x) dx with n = 4
- 1
Step 1 — Calculate the strip width h
h = (b − a) / n = (3 − 1) / 4 = 2 / 4 = 0.5h = 0.5 - 2
Step 2 — Determine the x-values and compute ordinates
x₀ = 1.0, x₁ = 1.5, x₂ = 2.0, x₃ = 2.5, x₄ = 3.0. Now evaluate f(x) = 1/x at each point: y₀ = 1/1 = 1, y₁ = 1/1.5 = 0.6667, y₂ = 1/2 = 0.5, y₃ = 1/2.5 = 0.4, y₄ = 1/3 ≈ 0.3333.Ordinates: 1, 0.6667, 0.5, 0.4, 0.3333 - 3
Step 3 — Apply the trapezoidal rule formula
T = (h/2)(y₀ + 2y₁ + 2y₂ + 2y₃ + y₄) = (0.5/2)(1 + 2(0.6667) + 2(0.5) + 2(0.4) + 0.3333) = 0.25 × (1 + 1.3334 + 1.0 + 0.8 + 0.3333) = 0.25 × 4.4667.T ≈ 1.1167 - 4
Step 4 — Compare to exact value
The exact value is ln 3 ≈ 1.0986. Our trapezoidal estimate of 1.1167 has an error of about 0.0181, which is roughly 1.6%.Error ≈ 1.6% overestimate
Simpson's Rule for ∫₁³ (1/x) dx with n = 4
- 1
Step 1 — Verify n is even and use same h
n = 4 is even ✓, so Simpson's rule can be applied. We already computed h = 0.5 and all five ordinates in the trapezoidal example.h = 0.5, n = 4 ✓ - 2
Step 2 — Apply the coefficient pattern 1, 4, 2, 4, 1
S = (h/3)(y₀ + 4y₁ + 2y₂ + 4y₃ + y₄) = (0.5/3)(1 + 4(0.6667) + 2(0.5) + 4(0.4) + 0.3333) = (0.1667)(1 + 2.6668 + 1.0 + 1.6 + 0.3333) = (0.1667)(6.6001).S ≈ 1.1000 - 3
Step 3 — Compare to exact value
The exact value is ln 3 ≈ 1.0986. Simpson's estimate of 1.1000 has an error of about 0.0014, which is roughly 0.13%. This is more than 10 times more accurate than the trapezoidal rule with the same number of subintervals!Error ≈ 0.13% overestimate
SECTION 7
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 |
Strengths, limitations, and exam relevance
KEY TAKEAWAY
SECTION 8
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 |
Hierarchy of numerical integration methods
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.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
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.