nag_multid_quad_adapt (d01fcc) attempts to evaluate a multidimensional integral (up to 15 dimensions), with constant and finite limits,
to a specified relative accuracy, using an adaptive subdivision strategy.
nag_multid_quad_adapt (d01fcc) evaluates an estimate of a multidimensional integral over a hyper-rectangle (i.e., with constant limits), and also an estimate of the relative error. You will need to set the relative accuracy required, supply the integrand as a function
f, and also set the minimum and maximum acceptable number of calls to
f (in
minpts and
maxpts).
The function operates by repeated subdivision of the hyper-rectangular region into smaller hyper-rectangles. In each subregion, the integral is estimated using a seventh-degree rule, and an error estimate is obtained by comparison with a fifth-degree rule which uses a subset of the same points. The fourth differences of the integrand along each coordinate axis are evaluated, and the subregion is marked for possible future subdivision in half along that coordinate axis which has the largest absolute fourth difference.
If the estimated errors, totalled over the subregions, exceed the requested relative error (or if fewer than
minpts calls to
f have been made), further subdivision is necessary, and is performed on the subregion with the largest estimated error, that subregion being halved along the appropriate coordinate axis.
The function will fail if the requested relative error level has not been attained by the time
maxpts calls to
f have been made.
nag_multid_quad_adapt (d01fcc) is based on the HALF subroutine developed by
van Dooren and de Ridder (1976). It uses a different basic rule, described by
Genz and Malik (1980).
Genz A C and Malik A A (1980) An adaptive algorithm for numerical integration over an N-dimensional rectangular region J. Comput. Appl. Math. 6 295–302
van Dooren P and de Ridder L (1976) An adaptive algorithm for numerical integration over an N-dimensional cube J. Comput. Appl. Math. 2 207–217
A relative error estimate is output through the argument
acc.
Not applicable.
Execution time will usually be dominated by the time taken to evaluate the integrand
f, and hence the maximum time that could be taken will be proportional to
maxpts.
This example estimates the integral
The accuracy requested is one part in 10,000.
None.