To understand the formula that we obtain for Simpson’s rule, we begin by deriving a formula for this approximation over the first two subintervals. As we go through the derivation, we need to keep in mind the following relationships:
where
is the length of a subinterval.
Thus,
If we approximate
using the same method, we see that we have
Combining these two approximations, we get
The pattern continues as we add pairs of subintervals to our approximation. The general rule may be stated as follows.
Simpson’s rule
Assume that
is continuous over
Let
n be a positive even integer and
Let
be divided into
subintervals, each of length
with endpoints at
Set
Then,
Just as the trapezoidal rule is the average of the left-hand and right-hand rules for estimating definite integrals, Simpson’s rule may be obtained from the midpoint and trapezoidal rules by using a weighted average. It can be shown that
It is also possible to put a bound on the error when using Simpson’s rule to approximate a definite integral. The bound in the error is given by the following rule:
Rule: error bound for simpson’s rule
Let
be a continuous function over
having a fourth derivative,
over this interval. If
is the maximum value of
over
then the upper bound for the error in using
to estimate
is given by
Applying simpson’s rule 1
Use
to approximate
Estimate a bound for the error in
Since
is divided into two intervals, each subinterval has length
The endpoints of these subintervals are
If we set
then
Since
and consequently
we see that
This bound indicates that the value obtained through Simpson’s rule is exact. A quick check will verify that, in fact,