46 Simpson’s Rules

Similar to the rectangle method, the trapezoid rule becomes more accurate if we partition the interval [a, b] into smaller intervals, resulting in more trapezoids. However, this can become complicated when we have a large number of trapezoids. Thankfully, Simpson’s rules provide us with a better method for finding a more accurate approximation of the area than the trapezoid rule can provide [9].

Consider the following diagram.


Simpson’s rules connect f(x_i) to f(x_{i+1}) with a parabola rather than a straight line [9]. This gives a better approximation than the trapezoid rule because there is even less space between the parabolas and the curve than there was between the trapezoids and the curve.

Simpson’s 1/3 Rule

This rule can be used only when we have partitioned [a,b] into an even number of intervals [9]. The formula is given by Hiestand as follows [9]:

(1)   \begin{equation*} \begin{split} \int_a^b f(x)\, dx&=\frac{\Delta x}{3}\cdot [f(a)+4\cdot f(a+\Delta x)+2\cdot f(a+2\Delta x)\\ &+4\cdot f(a+3\Delta x)+2\cdot f(a+4\Delta x)+...\\ &+2\cdot f(b-2\Delta x)+4\cdot f(b-\Delta x)+f(b)] \end{split} \end{equation*}

Before working through an example, we will briefly discuss the second of Simpson’s rules.

Simpson’s 3/8 Rule

This rule can be used only when we have partitioned [a,b] into three intervals [9]. The formula is given by Hiestand as follows [9]:

(2)   \begin{align*} \int_a^b f(x)\, dx=\frac{(b-a)\cdot[f(a)+3\cdot f(a+\Delta x)+3\cdot f(a+2\Delta x)+f(b)]}{8} \end{align*}

Because this formula works only for three intervals, we will need to use both the \frac{1}{3} rule and \frac{3}{8} rule when we have n intervals where n is odd and greater than three. This can be done by breaking the integral into two integrals using the following equation:

    \[\int_a^b f(x)\, dx=\int_a^c f(x)\, dx+ \int_c^b f(x)\, dx.\]

Either [a,c] or [c,b] is partitioned into three intervals while the other is partitioned into n-3 intervals [9].

Let’s look at an example to better understand how this works. The following problem is one I completed for this paper and comes from Hiestand [9].


Example 80
Consider the integral

    \[\int_0^{0.875} \sqrt{1-x^2}\, dx.\]

Evaluate the integral using Simpson’s rules with \Delta x= 0.125 throughout.

Solution
Using \Delta x=0.125, the intervals that we partition [0, 0.875] into are

    \[[0,0.125], [0.125,0.25],[0.25,0.375],[0.375,0.5], [0.5, 0.625], [0.625, 0.75],\]

and

    \[[0.75, 0.875].\]

Because we have seven intervals, we will need to use both the \frac{1}{3} rule and the \frac{3}{8} rule. First, we need to split our integral into two integrals. One way to do this is

    \[\int_0^{0.875} \sqrt{1-x^2}\, dx=\int_0^{0.5} \sqrt{1-x^2}\, dx+\int_{0.5}^{0.875} \sqrt{1-x^2}\, dx.\]

Substituting into equation 1 above, we have

    \begin{align*} \int_0^{0.5} \sqrt{1-x^2}\, dx&=\frac{0.125}{3}\cdot [f(0)+4\cdot f(0.125)+2\cdot f(0.25)\\ &+4\cdot f(0.375)+ f(0.5)]\\ &\approx 0.041667\cdot [1+4(0.992157)+2(0.968246)+4(0.927025)+0.866025]\\ &\approx 0.478306 \end{align*}

Substituting into equation 2 above, we have

    \begin{align*} \int_{0.5}^{0.875} \sqrt{1-x^2}\, dx&=\frac{(0.875-0.5)\cdot[f(0.5)+3\cdot f(0.625)+3\cdot f(0.75)+f(0.875)]}{8}\\ &\approx \frac{0.375\cdot [0.866025+3(0.780625)+3(0.661438)+0.484123]}{8}\\ &\approx 0.266078\\ \end{align*}

Therefore,

    \[\int_0^{0.875} \sqrt{1-x^2}\, dx\approx 0.478306+0.266078=0.744384.\]

Similar to the Trapezoid Rule, we can calculate the maximum and average errors of Simpson’s Rules.

Simpson’s Rules Errors

Calculating the maximum and average errors for Simpson’s rules is very similar to calculating these errors for the trapezoid rule.

The formula for the truncation error for the \frac{1}{3} rule is given by Hiestand as follows [9].

(3)   \begin{align*} E_{\text{TRUN}}=-\frac{(\Delta x)^4\cdot (b-a)\cdot f^4(x)}{180} \end{align*}

To find the maximum error, we choose c in the interval [a,b] such that the absolute value of f^4(c) is greater than or equal to the absolute value of f^4(x) for all x in [a,b] [9]. Then, we substitute f^4(c) for f^4(x) in equation 3 above giving us

(4)   \begin{align*} E_{\text{TRUN, max}}=-\frac{(\Delta x)^4\cdot (b-a)\cdot f^4(c)}{180} \end{align*}

To find the average error, we substitute

    \[\frac{f'''(b)-f'''(a)}{b-a}\]

for f^4(x) in equation 3 because

    \[f^N(x)=\frac{f^{N-1}(b)-f^{N-1}(a)}{b-a}\]

gives us the average of the Nth derivative of a function over the interval [a,b] [9]. So, we have the following equation:

(5)   \begin{equation*} \begin{split} E_{\text{TRUN, avg}}&=-\frac{(\Delta x)^4\cdot (b-a)\cdot \frac{f'''(b)-f'''(a)}{b-a}}{180}\\ &=-\frac{(\Delta x)^4\cdot (f'''(b)-f'''(a))}{180} \end{split} \end{equation*}

For the \frac{3}{8} rule, we find the maximum and the average errors the exact same way, only with a different truncation error formula. This formula is given by Hiestand as follows [9]:

(6)   \begin{align*} E_{\text{TRUN}}=-\frac{(b-a)^5\cdot f^4(x)}{6480} \end{align*}

Using this equation, we have the following equation for the maximum error

(7)   \begin{align*} E_{\text{TRUN, max}}=-\frac{(b-a)^5\cdot f^4(c)}{6480} \end{align*}

and this equation for the average error

(8)   \begin{equation*} \begin{split} E_{\text{TRUN, avg}}&=-\frac{(b-a)^5\cdot \frac{f'''(b)-f'''(a)}{b-a}}{6480}\\ &=-\frac{(b-a)^4\cdot (f'''(b)-f'''(a))}{6480} \end{split} \end{equation*}

Because the method of finding the maximum and average errors of these rules is similar to finding the maximum and average errors for the Trapezoid Rule, we will not go through another example here. Instead, we are going to move on to the Newton-Raphson method.

License

Portfolio for Bachelor of Science in Mathematics Copyright © by Abigail E. Huettig. All Rights Reserved.

Share This Book