QUADPACK


QUADPACK is a FORTRAN 77 library for numerical integration of one-dimensional functions. It was included in the SLATEC Common Mathematical Library and is therefore in the public domain. The individual subprograms are also available on netlib.
The GNU Scientific Library reimplemented the QUADPACK routines in C. SciPy provides a Python interface to part of QUADPACK.

Routines

The main focus of QUADPACK is on automatic integration routines in which the user inputs the problem and an absolute or relative error tolerance and the routine attempts to perform the integration with an error no larger than that requested. There are nine such automatic routines in QUADPACK, in addition to a number of non-automatic routines. All but one of the automatic routines use adaptive quadrature.
Each of the adaptive routines also have versions suffixed by E that have an extended parameter list that provides more information and allows more control. Double precision versions of all routines were released with prefix D.

General-purpose routines

The two general-purpose routines most suitable for use without further analysis of the integrand are QAGS for integration over a finite interval and QAGI for integration over an infinite interval. These two routines are used in GNU Octave and R.
;QAGS : uses global adaptive quadrature based on 21-point Gauss–Kronrod quadrature within each subinterval, with acceleration by Peter Wynn's epsilon algorithm.
;QAGI : is the only general-purpose routine for infinite intervals, and maps the infinite interval onto the semi-open interval (0,1] using a transformation then uses the same approach as QAGS, except with 15-point rather than 21-point Gauss–Kronrod quadrature. For an integral over the whole real line, the transformation used is :

Brief overview of the other automatic routines

;QNG : simple non-adaptive integrator
;QAG : simple adaptive integrator
;QAGP : similar to QAGS but allows user to specify locations of internal singularities, discontinuities etc.
;QAWO : integral of or over a finite interval
;QAWF : Fourier transform
;QAWS : integral of from to, where is smooth and, with and
;QAWC : Cauchy principal value of the integral of for user-specified and