nag_quad_md_gauss (d01fbc) computes an estimate of a multidimensional integral (from to dimensions), given the analytic form of the integrand and suitable Gaussian weights and abscissae.
nag_quad_md_gauss (d01fbc) approximates a multidimensional integral by evaluating the summation
given the weights
and abscissae
for a multidimensional product integration rule (see
Davis and Rabinowitz (1975)). The number of dimensions may be anything from
to
.
The weights and abscissae for each dimension must have been placed in successive segments of the arrays
weight and
abscis; for example, by calling
nag_quad_1d_gauss_wset (d01tbc) or
nag_quad_1d_gauss_wgen (d01tcc)
once for each dimension using a quadrature formula and number of abscissae appropriate to the range of each
and to the functional dependence of
on
.
If normal weights are used, the summation will approximate the integral
where
is the weight function associated with the quadrature formula chosen for the
th dimension; while if adjusted weights are used, the summation will approximate the integral
You must supply a function to evaluate
at any values of
within the range of integration.
The accuracy of the computed multidimensional sum depends on the weights and the integrand values at the abscissae. If these numbers vary significantly in size and sign then considerable accuracy could be lost. If these numbers are all positive, then little accuracy will be lost in computing the sum.
Not applicable.
The total time taken by nag_quad_md_gauss (d01fbc) will be proportional to
where
is the time taken for one evaluation of
fun.
This example evaluates the integral
using adjusted weights. The quadrature formulae chosen are:
- : Gauss–Legendre, , ,
- : Gauss–Laguerre, , ,
- : Gauss–Hermite, , ,
- : rational Gauss, , .
Four points are sufficient in each dimension, as this integral is in fact a product of four one-dimensional integrals, for each of which the chosen four-point formula is exact.
None.