CQUAD is a new doubly-adaptive general-purpose quadrature routine which can handle most types of
singularities, non-numerical function values such as Inf or NaN, as well as some divergent
integrals. It generally requires more function evaluations than the integration routines in
QUADPACK, yet fails less often for difficult integrands.
The fixed-order Gauss-Legendre integration routines are provided for fast integration of smooth
functions with known polynomial order. The n-point Gauss-Legendre rule is exact for polynomials
of order 2*n-1 or less. For example, these rules are useful when integrating basis functions to
form mass matrices for the Galerkin method. Unlike other numerical integration routines within
the library, these routines do not accept absolute or relative error bounds.
The QAWO algorithm is designed for integrands with an oscillatory factor, sin(omega x)
or
cos(omega x)
. In order to work efficiently the algorithm requires a table of Chebyshev moments
which must be pre-computed with calls to the functions below.
The QAWS algorithm is designed for integrands with algebraic-logarithmic singularities at the
end-points of an integration region. In order to work efficiently the algorithm requires a
precomputed table of Chebyshev moments.
The QAG algorithm is a simple adaptive integration procedure. The integration region is divided
into subintervals, and on each iteration the subinterval with the largest estimated error is
bisected. This reduces the overall error rapidly, as the subintervals become concentrated
around local difficulties in the integrand. These subintervals are managed by a
gsl_integration_workspace struct, which handles the memory for the subinterval ranges, results
and error estimates.