1.Numerical integration
Numerical integration proceeds along the same lines as numerical
differentiation
with a different operator
with with a set of measure zero, e.g.,
for a function continuous at all points in . It is often useful to explicitly identify a
weight function that can attribute higher significance
to subsets of . In the integration case, the approximation
basis choice can be combined with decomposition of the domain into subintervals such that through
with
Monomial basis.
As for numerical differentiation, an integration operator
can be obtained from the polynomial interpolant of
based upon data ,
Integration of for
is approximated as
As for numerical differentation, the computational effort in the above
formulation can be reduced through alternative basis choices.
Lagrange basis.
Assume
in the data set , and construct an interpolant of
degree in each subinterval . As highlighted by the approximation
of the Runge function, the degree
should be small, typically .
-
Trapezoid formula
-
For ,
a linear approximant is defined over each subinterval , stated in Lagrange form as
The resulting integral approximation
The approximation error results from the known polynomial
interpolation error formula
that gives
Using an equidistant partition ,
, over the
entire interval gives the composite trapezoid
formula
The overall approximation error is bounded by the error over each
subinterval
and the trapezoid formula exhibits quadratic convergence, .
-
Simpson formula
-
A more accurate, quadratic approximant is obtained for using
sample points ,
Assuming ,
,
, over a
subinterval the Simpson approximation is
Integration of the interpolation error
leads to calculation of
|
(1) |
This null result is a feature of even-degree interpolants .
Note that the interpolation error formula contains an evaluation
of at some point that depends on ,
so the integral
is not necessarily equal to zero. To obtain an error estimate,
rewrite the interpolating polynomial in Newton form
The next higher degree interpolant would be
and (1) implies that the integral of
is equal to that of
hence the Simpson formula based on a quadratic interpolation is as
accurate as that based on a cubic interpolation. The error can now
be estimated using
where is
some additional interpolation point within . It is convenient to choose ,
which corresponds to a Hermite interpolation condition at the
midpoint. This is simply for the purpose of obtaining an error
estimate, and does not affect the Simpson estimate of the
integral. Carrying out the calculations gives
When applied to the overall interval , the Simpson formula is stated as
with error
The composite Simpson formula is
with an overall error bound
that shows fourth-order convergence .
Moment method.
As in numerical differentiation, an alternative derivation is
available. Numerical integration is stated as a quadrature formula
using data . Once the sampling points are chosen,
there remain
weights to be
determined. One approach is to enforce exact quadrature for the first
monomials
A Vandermonde system results whose solution furnishes the appropriate
weights. Since the Vandermonde matrix is ill-conditioned, a solution is
sought in exact arithmetic, using rational numbers as opposed to
floating point approximations.
The principal utility of the moment method is construction of quadrature
formulas for singular integrands. For example, in the integral
the
is an integrable singularity, and accurate quadrature rules can be
constructed by the method of moments for
with .