Plotting T(h) as a function of
, Figure 3 shows
that the behavior
is evident for even the modest
values N=2, 4, 8. This plot suggests a very powerful method of
finding much better estimates for the integral
: simply
extrapolate the data in the plot to h=0. In general, we will
not know a priori the analytic derivatives f'(a) and f'(b)
and thus the slope
of the approach to the origin in the plot.
But, with two values of T(h) we can determine a very good estimate.
Algebraically, we simply solve
to find the value
The fourth column of Table 1 shows that the resulting
extrapolation formula (16) indeed converges much more
quickly than T(h), as
in fact.
Figure 3: Linear behavior of the trapezoid rule when viewed as a function of
.
The extrapolation (16) translates directly into an uniform-interval method. From the definition of the trapezoid rule (13),
where
with
denoting sample values at the intermediate points
which T(h/2) uses but T(h) does not. Summing the above two
formulae then gives an explicit interval method,
which is none other than the familiar Simpson's rule! For this rule,
we denote the fact that the spacing between sample points
is now
h/2 and not h by writing S(h/2). The final column of
Table 1 confirms numerically that Simpson's rule evaluated
in the traditional way is precisely equivalent to the extrapolation
(16).
Understanding this relationship allows us to rapidly determine the error in Simpson's from the error in the trapezoid rule (16):
where the quadratic terms have cancelled by the construction which led to (16), leaving only the quartic term. The patterns of shifting digits in Table 1 again confirm our computation of the prefactor,
One may proceed in this manner to methods of arbitrarily high order.
For instance, extrapolating T(h) to
as a quadratic function
using the information which T(h), T(h/2) and T(h/4) provide
results in the sixth-order approach known as Bode's rule.
The idea of extracting an exact analytic result by extrapolating several calculations at finite values of a parameter to the result at zero value is an extremely powerful tool in scientific computing, where it is known as Richardson extrapolation. (The same idea occurs in statistical mechanics where it is often known as finite-size scaling.)