QUADPACK
Numerical Integration
QUADPACK
is a FORTRAN77 library which
estimates integrals using numerical quadrature,
by Piessens, deDoncker-Kapenga, Ueberhuber, and Kahaner
The QUADPACK estimate 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.
Languages:
QUADPACK is available in
a FORTRAN77 version and
a FORTRAN90 version.
Related Data and Programs:
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:
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:
Examples and Tests:
List of Routines:
-
D1MACH returns double precision machine-dependent constants.
-
DGTSL solves a general tridiagonal linear system.
-
DQAGE estimates a definite integral.
-
DQAG approximates an integral over a finite interval.
-
DQAGIE estimates an integral over a semi-infinite or infinite interval.
-
DQAGI estimates an integral over a semi-infinite or infinite interval.
-
DQAGPE computes a definite integral.
-
DQAGP computes a definite integral.
-
DQAGSE estimates the integral of a function.
-
DQAGS estimates the integral of a function.
-
DQAWCE computes a Cauchy principal value.
-
DQAWC computes a Cauchy principal value.
-
DQAWFE computes Fourier integrals.
-
DQAWF computes Fourier integrals over the interval [ A, +Infinity ).
-
DQAWOE computes the integrals of oscillatory integrands.
-
DQAWO computes the integrals of oscillatory integrands.
-
DQAWSE estimates integrals with algebraico-logarithmic endpoint singularities.
-
DQAWS estimates integrals with algebraico-logarithmic endpoint singularities.
-
DQC25C returns integration rules for Cauchy Principal Value integrals.
-
DQC25F returns integration rules for functions with a COS or SIN factor.
-
DQC25S returns rules for algebraico-logarithmic end point singularities.
-
DQCHEB computes the Chebyshev series expansion.
-
DQELG carries out the Epsilon extrapolation algorithm.
-
DQK15 carries out a 15 point Gauss-Kronrod quadrature rule.
-
DQK15I applies a 15 point Gauss-Kronrod quadrature on an infinite interval.
-
DQK15W applies a 15 point Gauss-Kronrod rule for a weighted integrand.
-
DQK21 carries out a 21 point Gauss-Kronrod quadrature rule.
-
DQK31 carries out a 31 point Gauss-Kronrod quadrature rule.
-
DQK41 carries out a 41 point Gauss-Kronrod quadrature rule.
-
DQK51 carries out a 51 point Gauss-Kronrod quadrature rule.
-
DQK61 carries out a 61 point Gauss-Kronrod quadrature rule.
-
DQMOMO computes modified Chebyshev moments.
-
DQNG estimates an integral, using non-adaptive integration.
-
DQPSRT maintains the order of a list of local error estimates.
-
DQWGTC defines the weight function used by DQC25C.
-
DQWGTF defines the weight functions used by DQC25F.
-
DQWGTS defines the weight functions used by DQC25S.
-
FDUMP produces a symbolic dump.
-
J4SAVE saves and recalls global variables.
-
S88FMT copies Hollerith versions of integers into a string.
-
XERABT aborts program execution.
-
XERCTL allows the user control over individual errors.
-
XERPRT prints a message on each file receiving error messages.
-
XERROR processes a diagnostic error message.
-
XERRWV processes a diagnostic error message.
-
XERSAV records that a particular error has occurred.
-
XGETUA reports the unit numbers of files receiving error messages.
You can go up one level to
the FORTRAN77 source codes.
Last revised on 29 October 2010.