3 Description

nag_1d_quad_inf (d01amc) is based on the QUADPACK routine QAGI (Piessens et al. (1983)). The entire infinite integration range is first transformed to 0,1 using one of the identities

∫-∞afxdx=∫01fa-1-tt1t2dt

∫a∞fxdx=∫01fa+1-tt1t2dt

∫-∞∞fxdx=∫0∞fx+f-xdx=∫01f1-tt+f-1+tt1t2dt

where a represents a finite integration limit. An adaptive procedure, based on the Gauss 7-point and Kronrod 15-point rules, is then employed on the transformed integral. The algorithm, described by de Doncker (1978), incorporates a global acceptance criterion (as defined by Malcolm and Simpson (1976)) together with the ε-algorithm (Wynn (1956)) to perform extrapolation. The local error estimation is described by Piessens et al. (1983).

Before a subsequent call to nag_1d_quad_inf (d01amc) is made, or when the information contained in these arrays is no longer useful, you should free the storage allocated by these pointers using the NAG macro NAG_FREE.

6 Error Indicators and Warnings

On entry, max_num_subint must not be less than 1: max_num_subint=value.

NE_QUAD_BAD_SUBDIV

Extremely bad integrand behaviour occurs around the sub-interval value,value.
The same advice applies as in the case of NE_QUAD_MAX_SUBDIV.

NE_QUAD_BAD_SUBDIV_INTS

Extremely bad integrand behaviour occurs around one of the sub-intervals value,value or value,value.
The same advice applies as in the case of NE_QUAD_MAX_SUBDIV.

NE_QUAD_MAX_SUBDIV

The maximum number of subdivisions has been reached: max_num_subint=value.

The maximum number of subdivisions has been reached without the accuracy requirements being achieved. Look at the integrand in order to determine the integration difficulties. If the position of a local difficulty within the interval can be determined (e.g., a singularity of the integrand or its derivative, a peak, a discontinuity, etc.) you will probably gain from splitting up the interval at this point and calling the integrator on the sub-intervals. If necessary, another integrator, which is designed for handling the type of difficulty involved, must be used. Alternatively, consider relaxing the accuracy requirements specified by epsabs and epsrel, or increasing the value of max_num_subint.

Round-off error is detected during extrapolation.
The requested tolerance cannot be achieved, because the extrapolation does not increase the accuracy satisfactorily; the returned result is the best that can be obtained.
The same advice applies as in the case of NE_QUAD_MAX_SUBDIV.

NE_QUAD_ROUNDOFF_TOL

Round-off error prevents the requested tolerance from being achieved: epsabs=value, epsrel=value.
The error may be underestimated. Consider relaxing the accuracy requirements specified by epsabs and epsrel.

7 Accuracy

nag_1d_quad_inf (d01amc) cannot guarantee, but in practice usually achieves, the following accuracy:

I-result≤tol

where

tol=maxepsabs,epsrel×I

and epsabs and epsrel are user-specified absolute and relative error tolerances. Moreover it returns the quantity abserr which, in normal circumstances, satisfies

I-result≤abserr≤tol.

8 Further Comments

The time taken by nag_1d_quad_inf (d01amc) depends on the integrand and the accuracy required.

If the function fails with an error exit other than NE_INT_ARG_LT, NE_BAD_PARAM or NE_ALLOC_FAIL then you may wish to examine the contents of the structure qp. These contain the end-points of the sub-intervals used by nag_1d_quad_inf (d01amc) along with the integral contributions and error estimates over the sub-intervals.

Specifically, for i=1,2,…,n, let ri denote the approximation to the value of the integral over the sub-interval ai,bi in the partition of a,b and ei be the corresponding absolute error estimate.

Then, ∫aibifxdx≃ri and result=∑i=1nri unless the function terminates while testing for divergence of the integral (see Section 3.4.3 of Piessens et al. (1983)). In this case, result (and abserr) are taken to be the values returned from the extrapolation process. The value of n is returned in qp→num_subint, and the values ai, bi, ri and ei are stored in the structure qp as