quadpack
quadpack,
a FORTRAN77 code which
estimates integrals using numerical quadrature,
by Piessens, deDoncker-Kapenga, Ueberhuber, and Kahaner
The code estimates the integral
of a function F(X). There are routines for nonadaptive
or adaptive integration, finite, semi-infinite or fully infinite
integration regions, integrands with singularities, and integrands
that include a factor of SIN(X) or COS(X).
Many subroutines come in two versions, a "simple" interface and
an "extended" interface. Compare, for example, the routines
QAWF and QAWFE. The first one simply makes sensible choices for
many parameter values. The second one gives the user full control
over all the parameters.
Routines for a finite region:
How to decide what routine to use, if your integration region
is finite:
-
If you can factor the integrand as F(X)=W(X)*G(X), where G
is smooth on [A,B] and W(X)=COS(OMEGA*X) or SIN(OMEGA*X) then
use QAWO.
-
Otherwise, if you can factor F(X)=W(X)*G(X) where G is smooth
and W(X)=(X-A)**ALFA * (B-X)**BETA * (LOG(X-A))**L * (LOG(B-X))**K
with K, L = 0 or 1, and ALFA, BETA greater than -1, then use QAWS.
-
Otherwise, if you can factor F(X)=W(X)*G(X) where G is smooth
and W(X)=1/(X-C) for some constant C, use QAWC.
-
Otherwise, if you do not care too much about possible
inefficient use of computer time, and do not want to further
analyze the problem, use QAGS.
-
Otherwise, if the integrand is smooth, use QNG or QAG.
-
Otherwise, if there are discontinuities or singularities
of the integrand or of its derivative, and you know where they
are, split the integration range at these points and analyze
each subinterval. You can also use QAGP, which is to be provided
with the x-locations of the singularities or discontinuities.
-
Otherwise, if the integrand has end point singularities, use QAGS.
-
Otherwise, if the integrand has an oscillatory behavior of
nonspecific type, and no singularities, use QAG with KEY=6.
-
Otherwise, use QAGS.
Routines for an infinite region:
-
If the integrand decays rapidly to zero, truncate the
interval and use the finite interval decision tree.
-
Otherwise, if the integrand oscillates over the entire infinite range,
and the integral is a Fourier transform, use QAWF.
-
Or, if the integrand oscillates over the entire infinite range,
but is not a Fourier transform, then sum the successive positive
and negative contributions by integrating between the zeroes of the
integrand. Apply convergence acceleration with QELG.
-
Otherwise, if you are not constrained by computer time, and
do not wish to analyze the problem further, use QAGI.
-
Otherwise, if the integrand has a non-smooth behavior in
the range, and you know where it occurs, split off these regions
and use the appropriate finite range routines to integrate over
them. Then begin this tree again to handle the remainder of the
region.
-
Otherwise, truncation of the interval, or application of
a suitable transformation for reducing the problem to a finite
range may be possible. And you may also call QAGI.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
quadpack is available in
a FORTRAN77 version and
a FORTRAN90 version.
Related Data and Programs:
quadpack_test
intlib,
a FORTRAN90 library which
numerically estimate sintegrals.
KRONROD,
a FORTRAN77 library which
can compute a Gauss and Gauss-Kronrod pair of quadrature rules
of arbitrary order,
by Robert Piessens, Maria Branders.
MACHINE,
a FORTRAN77 library which
defines machine arithmetic constants.
NMS,
a FORTRAN77 library which
includes QUADPACK.
QUADRULE,
a FORTRAN90 library which
defines quadrature rules for
various intervals and weight functions.
SLATEC,
a FORTRAN90 library which
includes QUADPACK.
STROUD,
a FORTRAN90 library which
defines quadrature rules for
various geometric shapes.
TEST_INT,
a FORTRAN90 library which
defines
test integration problems.
TEST_INT_LAGUERRE,
a FORTRAN77 library which
defines test integrands for the interval [a,+oo) and weight exp(-x);
TOMS351,
a FORTRAN77 library which
estimates an integral using Romberg
integration.
TOMS379,
a FORTRAN77 library which
estimates an integral.
TOMS418,
a FORTRAN77 library which
estimates the integral of a function
with a sine or cosine factor.
TOMS424,
a FORTRAN77 library which
estimates the integral of a function
using Clenshaw-Curtis quadrature.
TOMS468,
a FORTRAN77 library which
carries out the "automatic" integration of a function.
XERROR,
a FORTRAN77 library which
handles run-time errors.
Author:
Original Fortran77 version by Robert Piessens, Elise deDoncker-Kapenga,
Christian Ueberhuber, David Kahaner.
Reference:
-
Robert Piessens, Elise deDoncker-Kapenga,
Christian Ueberhuber, David Kahaner,
QUADPACK: A Subroutine Package for Automatic Integration,
Springer, 1983,
ISBN: 3540125531,
LC: QA299.3.Q36.
Source Code:
Last revised on 04 November 2023.