Skip to main content
\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)
Mathematics LibreTexts

Simpson's Rule

The Trapezoidal and Midpoint estimates provided better accuracy than the Left and Right endpoint estimates. It turns out that a certain combination of the Trapezoid and Midpoint estimates is even better. 

Definition

Let \(f(x)\) be a function defined on \([a,b]\).  Then

\[S(n) = \dfrac{1}{3} T(n) + \dfrac{2}{3} M(n)\]

where \(T(n)\) and \(M(n)\) are the Trapezoidal and Midpoint Estimates.

Geometrically, if \(n\) is an even number then Simpson's Estimate gives the area under the parabolas defined by connecting three adjacent points.  

Let \(n\) be even then using the even subscripted \(x\) values for the trapezoidal estimate and the midpoint estimate, gives

\[\begin{align} S(n) &= \dfrac{1}{3}\Big[\dfrac{(b-a)}{2n}  \big( f(x_0) +2f(x_2) +...+ f(x_{2n-2}) +f(x_{2n})  \big)\Big] \\ &\;\;\; + \dfrac{2}{3}\Big[\dfrac{b-a}{n}\big( f(x_1)f(x_3)+f(x_5)+...+f(x_{2n-1}) \big) \Big] \\ &= \dfrac{b-a}{3n}\Big(f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+2f(x_4)+4f(x_5)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n)   \Big) \end{align}\]

Notice the "1 2 4 2 4 ... 2 4 2 4 1" pattern in the coefficients.

Example 1

Use Simpson's Estimate to approximate

\[ \int_{0}^{2} e^{x^2} dx  \]

Using \(n = 6\)

Solution

We partition 

\(0 < 1/3 < 2/3 < 1 < 4/3 < 5/3 < 2\)

and calculate

\[e^{0^2}=1, e^{(\frac{1}{3})^2}=1.12, e^{(\frac{2}{3})^2}=1.56, e^{(1)^2}=2.72 \\  e^{(\frac{4}{3})^2}=5.92, e^{(\frac{5}{3})^2}=16.08, e^{(2)^2}=54.60\]

and put these into the formula for Simpson's Estimate

\[\dfrac{2-0}{6} [ 1 + 2 \cdot 1.12 + 4 \cdot 1.56 + 2 \cdot 2.72 + 4 \cdot 5.92 + 2 \cdot 16.08 + 54.60 ] \]

\[=41.79\]

Exercise 

Approximate 

\[ \int_{2}^{6} \dfrac{1}{1+x^3} dx \]

Error in Simpson's Estimate

  • Without proof, we state:

    Let \(M = max |f''''(x)|\) and let \(E_s\) be the error in using Simpson's estimate then \(|E_s| \leq \dfrac{M(b - a)^5}{180n^4}\)

Contributors