4 Other methods for approximating integrals
Here we briefly describe other methods that you may have heard, or get to hear, about. In the end they all amount to the same sort of thing, that is we sample the integrand at a few points in the integration interval and then take a weighted average of all these values. All that is needed to implement any of these methods is the list of sampling points and the weight that should be attached to each evaluation. Lists of these points and weights can be found in many books on the subject.
4.1 Simpson’s rule
This is based on passing a quadratic through three equally spaced points, rather than passing a straight line through two points as we did for the simple trapezium rule. The composite Simpson’s rule is given in the following Key Point.
Key Point 9
Composite Simpson’s Rule
The composite Simpson’s rule for approximating is carried out as follows:
- Choose , which must be an even number of subintervals,
-
Calculate
where
The formula in Key Point 9 is slightly more complicated than the corresponding one for composite trapezium rule. One way of remembering the rule is the learn the pattern
which show that the end point values are multiplied by 1, the values with odd-numbered subscripts are multiplied by 4 and the interior values with even subscripts are multiplied by 2.
Example 15
Using 4 subintervals in the composite Simpson’s rule approximate
Solution
In this case
.
We require
evaluated at five
-values and the results are tabulated below to 6 d.p.
It follows that
where this approximation is given to 6 decimal places.
This approximation to is closer to the true value of (which is to 6 d.p.) than we obtained when using the composite trapezium rule with the same number of subintervals.
Task!
Using 4 subintervals in the composite Simpson’s rule approximate
In this case . There will be five -values and the results are tabulated below to 6 d.p.
It follows that
4.2 How good is the composite Simpson’s rule?
On page 39 (Key Point 8) we saw a formula for an upper bound on the error in the composite trapezium method. A corresponding result for the composite Simpson’s rule exists and is given in the following Key Point.
Key Point 10
Error in Composite Simpson’s Rule
The error in the -subinterval composite Simpson’s rule approximation to is bounded above by
(Here is the fourth derivative of and is the subinterval width, so .)
The formula in Key Point 10 can be used to decide how many subintervals to use to guarantee a specific accuracy.
Example 16
The function is known to have a fourth derivative with the property that
for between 1 and 5. Determine how many subintervals are required so that the composite Simpson’s rule used to approximate
incurs an error that is guaranteed less than 0.005 .
Solution
We require that
This implies that
and therefore
.
Now
and it follows that
For the composite Simpson’s rule must be an even whole number and we conclude that the smallest number of subintervals which guarantees an error smaller than 0.005 is .
Task!
The function is known to have a fourth derivative with the property that
for between 2 and 6. Determine how many subintervals are required so that the composite Simpson’s rule used to approximate
incurs an error that is guaranteed less than 0.0005 .
We require that
This implies that
and therefore
.
Now
and it follows that
must be an even whole number and we conclude that the smallest number of subintervals which guarantees an error smaller than 0.0005 is .
The following Task is similar to one that we saw earlier in this Section (page 42). Using the composite Simpson’s rule we can achieve greater accuracy, for a similar amount of effort, than we managed using the composite trapezium rule.
Task!
It is given that the function has a fourth derivative that is never greater than 3 in absolute value.
-
Use this fact to determine how many subintervals are required for the composite Simpson’s rule to deliver an approximation to
that is guaranteed to have an error less than .
We require that .
This means that and therefore . Since it is necessary for for the error bound to be guaranteed to be less than .
-
Find an approximation to the integral that is in error by less than
.
In this case . We require evaluated at five -values and the results are tabulated below to 6 d.p.
It follows that
We know from part 1. that this approximation is in error by less than
Example 17
Find out how many strips are needed to be sure that
is evaluated by Simpson’s rule with error less than
Solution
So is needed (minimum even number).