Skip to main content
Mathematics LibreTexts

Simpson's Rule

  • Page ID
    498
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\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}}\) \(\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}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    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.

    Definitions: Trapezoidal and Midpoint Estimates

    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}\left[\dfrac{b-a}{2n} \left( f(x_0) +2f(x_2) +...+ f(x_{2n-2}) +f(x_{2n}) \right)\right] + \dfrac{2}{3}\left[\dfrac{b-a}{n}\left( f(x_1)f(x_3)+f(x_5)+...+f(x_{2n-1}) \right) \right] \label{Simp1} \\ &= \dfrac{b-a}{3n}\left(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) \right) \label{Simp2} \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 \nonumber \]

    Using \(n = 6\)

    Solution

    We partition

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

    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 \nonumber \]

    and put these into the formula for Simpson's Estimate (Equation \ref{Simp2})

    \[ \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 \nonumber\]

    Exercise

    Approximate

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

    Error in Simpson's Estimate

    Without proof, we state:

    Let \(M = \text{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} \nonumber\]

    Contributors and Attributions


    This page titled Simpson's Rule is shared under a not declared license and was authored, remixed, and/or curated by Larry Green.

    • Was this article helpful?