QUADPACK
Encyclopedia
QUADPACK is a FORTRAN 77 library for numerical integration
Numerical integration
In numerical analysis, numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral, and by extension, the term is also sometimes used to describe the numerical solution of differential equations. This article focuses on calculation of...

 of one-dimensional functions. It was included in the SLATEC
SLATEC
SLATEC Common Mathematical Library is a FORTRAN 77 library of over 1400 general purpose mathematical and statistical routines. The code was developed at US Government research laboratories, and is in the public domain....

 Common Mathematical Library and is therefore in the public domain
Public domain
Works are in the public domain if the intellectual property rights have expired, if the intellectual property rights are forfeited, or if they are not covered by intellectual property rights at all...

. The individual subprograms are also available on netlib
Netlib
Netlib is a repository of software for scientific computing maintained by AT&T, Bell Laboratories, the University of Tennessee and Oak Ridge National Laboratory. Netlib comprises a large number of separate programs and libraries...

.

The GNU Scientific Library
GNU Scientific Library
In computing, the GNU Scientific Library is a software library written in the C programming language for numerical calculations in applied mathematics and science...

 reimplemented the QUADPACK routines in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

. SciPy
SciPy
SciPy is an open source library of algorithms and mathematical tools for the Python programming language.SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, ODE solvers and other tasks common in science and...

 provides a Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 interface to 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
Approximation error
The approximation error in some data is the discrepancy between an exact value and some approximation to it. An approximation error can occur because#the measurement of the data is not precise due to the instruments...

 tolerance
Tolerance (engineering)
Engineering tolerance is the permissible limit or limits of variation in# a physical dimension,# a measured value or physical property of a material, manufactured object, system, or service,# other measured values ....

 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
Adaptive quadrature
In applied mathematics, adaptive quadrature is a process in which the integral of a function f is approximated using static quadrature rules on adaptively refined subintervals of the integration domain...

.
Summary of naming scheme
Naming scheme
A naming scheme is a plan for naming objects. In computing, naming schemes are often used for objects connected into computer networks.-Naming schemes in computing:Large networks often use a systematic naming scheme, such as using a location A naming scheme is a plan for naming objects. In...

 for automatic routines
1st letter 2nd letter 3rd letter 4th letter
Q Quadrature
N Non-adaptive
A Adaptive
Adaptive quadrature
In applied mathematics, adaptive quadrature is a process in which the integral of a function f is approximated using static quadrature rules on adaptively refined subintervals of the integration domain...

G General integrand
W Weight function of specified form
Simple integrator
S Singularities handled
P Specified points of local difficulty (singularities, discontinuities …)
I Infinite interval
Improper integral
In calculus, an improper integral is the limit of a definite integral as an endpoint of the interval of integration approaches either a specified real number or ∞ or −∞ or, in some cases, as both endpoints approach limits....

O Oscillatory weight function (cos or sin) over a finite interval
F Fourier transform
Fourier transform
In mathematics, Fourier analysis is a subject area which grew from the study of Fourier series. The subject began with the study of the way general functions may be represented by sums of simpler trigonometric functions...

 (cos or sin)
C Cauchy principal value
Cauchy principal value
In mathematics, the Cauchy principal value, named after Augustin Louis Cauchy, is a method for assigning values to certain improper integrals which would otherwise be undefined.-Formulation:...


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
Double precision
In computing, double precision is a computer number format that occupies two adjacent storage locations in computer memory. A double-precision number, sometimes simply called a double, may be defined to be an integer, fixed point, or floating point .Modern computers with 32-bit storage locations...

 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
Improper integral
In calculus, an improper integral is the limit of a definite integral as an endpoint of the interval of integration approaches either a specified real number or ∞ or −∞ or, in some cases, as both endpoints approach limits....

. These two routines are used in GNU Octave
GNU Octave
GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command-line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with MATLAB...

 (the quad command) and R
R (programming language)
R is a programming language and software environment for statistical computing and graphics. The R language is widely used among statisticians for developing statistical software, and R is widely used for statistical software development and data analysis....

 (the integrate function).
QAGS : uses global adaptive quadrature
Adaptive quadrature
In applied mathematics, adaptive quadrature is a process in which the integral of a function f is approximated using static quadrature rules on adaptively refined subintervals of the integration domain...

 based on 21-point Gauss–Kronrod quadrature within each subinterval, with acceleration
Series acceleration
In mathematics, series acceleration is one of a collection of sequence transformations for improving the rate of convergence of a series. Techniques for series acceleration are often applied in numerical analysis, where they are used to improve the speed of numerical integration...

 by Peter Wynn
Peter Wynn (mathematician)
Peter Wynn is a mathematician. His main achievements concern approximation theory – in particular the theory of Padé approximants – and its application in numerical methods for improving the rate of convergence of sequences of real numbers....

's epsilon algorithm.
QAGI : is the only general-purpose routine for infinite intervals, and maps the infinite interval onto (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 :
This is not be the best approach for all integrands: another transformation may be appropriate, or one might prefer to break up the original interval and use QAGI only on the infinite part.

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
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK