naginterfaces.library.quad.dim1_​inf

naginterfaces.library.quad.dim1_inf(f, bound, inf, epsabs, epsrel, lw=800, liw=None, data=None)[source]

dim1_inf calculates an approximation to the integral of a function over an infinite or semi-infinite interval :

Deprecated since version 27.1.0.0: dim1_inf will be removed in naginterfaces 31.3.0.0. Please use dim1_inf_general() instead. See also the Replacement Calls document.

For full information please refer to the NAG Library document for d01am

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/d01/d01amf.html

Parameters
fcallable retval = f(x, data=None)

must return the value of the integrand at a given point.

Parameters
xfloat

The point at which the integrand must be evaluated.

dataarbitrary, optional, modifiable in place

User-communication data for callback functions.

Returns
retvalfloat

The value of the integrand at .

boundfloat

The finite limit of the integration range (if present). is not used if the interval is doubly infinite.

infint

Indicates the kind of integration range.

The range is .

The range is .

The range is .

epsabsfloat

The absolute accuracy required. If is negative, the absolute value is used. See Accuracy.

epsrelfloat

The relative accuracy required. If is negative, the absolute value is used. See Accuracy.

lwint, optional

The value of (together with that of ) imposes a bound on the number of sub-intervals into which the interval of integration may be divided by the function. The number of sub-intervals cannot exceed . The more difficult the integrand, the larger should be.

liwNone or int, optional

Note: if this argument is None then a default value will be used, determined as follows: .

The number of sub-intervals into which the interval of integration may be divided cannot exceed .

dataarbitrary, optional

User-communication data for callback functions.

Returns
resultfloat

The approximation to the integral .

abserrfloat

An estimate of the modulus of the absolute error, which should be an upper bound for .

wfloat, ndarray, shape

Details of the computation see Further Comments for more information.

iwint, ndarray, shape

contains the actual number of sub-intervals used. The rest of the array is used as workspace.

Raises
NagValueError
(errno )

On entry, .

Constraint: , or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

The maximum number of subdivisions () has been reached: , and .

(errno )

Round-off error prevents the requested tolerance from being achieved: and .

(errno )

Extremely bad integrand behaviour occurs around one of the sub-intervals or .

(errno )

Extremely bad integrand behaviour occurs around the sub-interval .

(errno )

Round-off error is detected in the extrapolation table.

(errno )

The integral is probably divergent or slowly convergent.

Notes

In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.

dim1_inf is based on the QUADPACK routine QAGI (see Piessens et al. (1983)). The entire infinite integration range is first transformed to using one of the identities:

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

References

de Doncker, E, 1978, An adaptive extrapolation algorithm for automatic integration, ACM SIGNUM Newsl. (13(2)), 12–18

Malcolm, M A and Simpson, R B, 1976, Local versus global strategies for adaptive quadrature, ACM Trans. Math. Software (1), 129–146

Piessens, R, de Doncker–Kapenga, E, Überhuber, C and Kahaner, D, 1983, QUADPACK, A Subroutine Package for Automatic Integration, Springer–Verlag

Wynn, P, 1956, On a device for computing the transformation, Math. Tables Aids Comput. (10), 91–96