Problem: To find an approximate value of
when it
cannot be evaluated analytically.
The value of such an integral is simply the area under its graph, so we
can approximate this by the area of the trapezium with the same corners.
This is just
in which we put b-a=h to
obtain the trapezium rule
. Clearly there
will be a big error if f is strongly curved.
How can we reduce this error? By subdividing the interval of integration
into smaller intervals; suppose we divide into 4 equal intervals of
width h=(b-a)/4, then the integral is approximated by
How else might we improve accuracy? By using a curved line to approximate f. We could find a parabola or higher degree polynomial interpolating f at a suitable number of points and integrate this in place of f. We shall achieve the same result, but without evaluating the interpolating polynomial, by the use of the method of undetermined coefficients.
Trapezium Rule
Let
be the quadrature formula for the
evaluation of
. We choose
to make the
formula exact when
.
Simpson's Rule
We wish to find a quadrature rule for
which uses the
values of f at
. The algebra is much easier if we
change the interval [a,b] into an interval which is symmetric
about the origin, [-h,h] say. This is achieved by the substitution
. Thus
Let
NOTE that Simpson's rule gives the value
for
, whose value is also
zero. This is a bonus of the rule; it actually integrates exactly a higher
degree polynomial than we would expect.
Composite Simpson Rule
We divide the interval [a,b] into 2n subintervals of width
and apply Simpson's Rule to the n intervals
. This gives
Sometimes we are given data for an odd number of intervals 2n+1 say. In such cases we use Simpson for the first 2n intervals in the usual way. For the last interval, we could use the Trapezium Rule, but this would lower the accuracy. We derive a special formula which uses a function value outside the interval of integration.
Let
ExampleEvaluate
using the data
The Trapezium Rule gives
Simpson's Rule for [0,0.8] gives
The Trapezium Rule for [0.8,1] gives
Using the special rule derived above, the integral over [0.8,1] is
Error Analysis
Although we can repeat calculations with smaller subintervals, it would
be useful to have some idea of the errors we incur, even if we only want
to compare methods.
Trapezium rule
Simpson's Rule
This tells us that the error decreases much more rapidly for Simpson's
Rule as we reduce h. To see the overall error reduction from reducing
h we must look at the composite rule. For the Trapezium case
Clever Tricks
Let
where
is assumed constant, T(h) is the
composite Trapezium Rule with interval h. With h halved this becomes
With
, so that
Next: Nonlinear Equations
Up: M241 Lecture Notes
Previous: Polynomial Interpolation
John Gilbert
1999-02-19