Subject: Calculus

Simpsons Rule

We go to the third method in numerical integration, the Simpson’s Rule. Here, instead of actually using line segments in getting an approximate of a curve, we now use parabolas. We first divide an interval \left [a, b\right ] into n subintervals of equal length. The figure below shows the curve that will be approximated.

Here, we represent the length h= \Delta x= \frac{b-a}{n}, but this time we’ll assume that n is an even number. For each consecutive pair of intervals we approximate the curve y=f(x) \geq 0 by a parabola as shown in the above figure.

Now if we let y_i=f(x_i ), then P_i (x_i,y_i ) is the point on the curve lying above x_i. A typical parabola passes through three consecutive points, P_i, P_{i+1}, and P_{i+2}. For us to be able to solve the problem easier, let us consider the case where x_0= -h, x_1=0 ,and x_2=h. We can illustrate this as follows,

From our elementary algebra, we know that the a parabola through the points P_0, P_1, and P_2 take the form of y=ax^2+ bx+c. We can therefore calculate the area under the parabola by integrating the equation from x = -h to x = h which is

\int_{-h}^{h}\left (ax^2 + bx+ c \right )dx =2\int_{0}^{h}\int_{0}^h\left (ax^2+c\right )dx
=2\left [a\frac{x^3}{3}+cx\right ]_{0}^{h}
==2\left (a\frac{h^3}{3}+ch\right )=\frac{h}{3}(2ah^2+6c)

But since the parabola passes through P_0 (h, y_0 ), P_1 (0,y_1 ), and P_2 (h, y_2), we have

y_0=a(-h)^2+b(-h)+c=ah^2-bh+c
y_1=c
y_2=ah^2+bh+c

and therefore

y_0+4y_1 + y_2=2ah^2+6c

Thus, the under the parabola can be written as

\frac{h}{3}(y_0+4y_1 + y_2)

Now, by shifting this parabola horizontally we do not change the area under it. This means that the area under the parabola through P_0, P_1, and P_2 from x=x_0 to x=x_2in the first figure is still

\frac{h}{3}(y_0+4y_1 + y_2)

Similarly, the area under the parabola through P_2, P_3, and 4 from x=x_2 to x=x_4 is

\frac{h}{3}(y_2+4y_3 + y_4)

If we compute the areas under all the parabolas in this manner and add the results, we get

\int_{a}^{b}f(x)dx=\frac{h}{3}(y_0+4y_1 + y_2)+\frac{h}{3}(y_2+4y_3 + y_4)+\cdot \cdot \cdot +\frac{h}{3}(2y_{n-2} + 4y_{n-1} + y_{n})
=\frac{h}{3}(y_0+4y_1+2y_2+4y_3 + 2y_4+\cdot \cdot \cdot +2y_{n-2} + 4y_{n-1} + y_{n})

Although we have derived this approximation for the case in which x \geq 0 , it is a reasonable approximation for any continuous function f and is called Simpson’s Rule after the English mathematician Thomas Simpson (1710–1761). Note the pattern of coefficients: 1, 4, 2, 4, 2, 4, 2, . . . , 4, 2, 4, 1.

So in general, we can summarize the Simpson’s Rule as

\int_{a}^{b}f(x)dx \approx S_n =\frac{h}{3}(f(x_0)+4f(x_1)+2f(x_2)+4f(x_3) + 2f(y_4)+\cdot \cdot \cdot +2f(x_{n-2}) + 4f(x_{n-1}) + f(x_{n}))

where n is even and \Delta x=\frac{b-a}{n}.

Error Bound for Simpson’s Rule

Suppose that \left \|f^4 (x) \right \| \leq K for a \leq x \leq b. If E_s is the error involved in using Simpson’s Rule, then

\left \|E_s \right \| \leq \frac{K\left ( b-a \right )^2}{180n^4}

NEXT TOPIC: Newton–Cotes formulas