Simpson's Rule
Goal of this chapter
Understand the derivation of Simpson's rule (quadratic-polynomial approximation), the $O(h^4)$ error estimate, and the composite Simpson rule.
Prerequisites
Contents
1. Simpson's 1/3 Rule
We approximate the integral by the area under the quadratic polynomial (a parabola) through the three points $(a, f(a))$, $(m, f(m))$, $(b, f(b))$ with $m = (a+b)/2$.
Simpson's 1/3 rule
The characteristic feature is the weight ratio $1:4:1$. This rule is exact not only for quadratics but also for cubic polynomials (the order of accuracy gains one extra degree).
Why it is exact up to cubics
Consider the difference between $f$ and its quadratic interpolant $p_2$. When $f$ is a cubic, $f - p_2$ is a cubic that vanishes at the three sample points $a,\,m,\,b$, so with leading coefficient $c$ it can be written
Setting $m=\dfrac{a+b}{2}$, $h=\dfrac{b-a}{2}$, and $x = m + t$,
which is an odd function of $t$. The integral of an odd function over the symmetric interval $[-h,\,h]$ is $0$, so $\displaystyle\int_a^b \bigl(f - p_2\bigr)\,dx = 0$; that is, $\displaystyle\int_a^b f\,dx = \int_a^b p_2\,dx$ holds exactly. In other words, the fact that the three points are placed symmetrically (equally spaced) about the midpoint is what gives this "bonus" extra degree. For the same reason, the symmetric closed Newton-Cotes rules gain one extra degree of accuracy for even-degree interpolation.
2. Simpson's 3/8 Rule
This rule is based on cubic Lagrange interpolation using four points.
Simpson's 3/8 rule
The weight ratio is $1:3:3:1$, and it is exact for cubic polynomials. It is convenient when the number of subintervals is a multiple of 3.
3. Composite Simpson Rule
Divide $[a,b]$ into $n$ (even) equal parts and apply the 1/3 rule over each adjacent pair of subintervals. With $h = (b-a)/n$,
Composite Simpson rule
The weights follow the pattern $1, 4, 2, 4, 2, \ldots, 4, 2, 4, 1$.
4. Error Estimate
Theorem (error of the composite Simpson rule)
If $f \in C^4[a,b]$, then
that is, the error is $O(h^4)$.
This is two orders more accurate than the trapezoidal rule's $O(h^2)$. Halving the step size $h$ reduces the error by roughly $1/16$.
5. Accuracy Comparison with the Trapezoidal Rule
| Rule | Interpolation degree | Degree of accuracy | Error order |
|---|---|---|---|
| Trapezoidal | 1 | 1 | $O(h^2)$ |
| Simpson 1/3 | 2 | 3 (+ bonus) | $O(h^4)$ |
| Simpson 3/8 | 3 | 3 | $O(h^4)$ |
6. FAQ
Q1. What is Simpson's rule?
It is a method of numerical integration that approximates a definite integral by the area under the parabola through three points. The 1/3 rule is $\dfrac{h}{3}[f(a)+4f(m)+f(b)]$ and returns the exact value for polynomials of degree up to 3.
Q2. How accurate is Simpson's rule?
The error of the composite Simpson rule is $O(h^4)$, two orders more accurate than the trapezoidal rule's $O(h^2)$.
Q3. What is the difference between the 1/3 and 3/8 rules?
The 1/3 rule uses quadratic interpolation (3 points) and the 3/8 rule cubic interpolation (4 points). Both are $O(h^5)$ on a single panel, but the 3/8 rule is convenient when the number of subintervals is a multiple of 3.
7. References
- Wikipedia, "Simpson's rule"
- R. L. Burden & J. D. Faires, Numerical Analysis, 10th ed., Cengage, 2016.
- P. J. Davis & P. Rabinowitz, Methods of Numerical Integration, 2nd ed., Academic Press, 1984.