naginterfaces.library.quad.dim1_​fin_​smooth

naginterfaces.library.quad.dim1_fin_smooth(f, a, b, epsabs, epsrel, data=None)[source]

dim1_fin_smooth calculates an approximation to the integral of a function over a finite interval :

It is non-adaptive and as such is recommended for the integration of ‘smooth’ functions. These exclude integrands with singularities, derivative singularities or high peaks on , or which oscillate too strongly on .

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

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/d01/d01bdf.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 evaluated at .

afloat

, the lower limit of integration.

bfloat

, the upper limit of integration. It is not necessary that .

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.

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 .

Notes

dim1_fin_smooth is based on the QUADPACK routine QNG (see Piessens et al. (1983)). It is a non-adaptive function which uses as its basic rules, the Gauss -point and -point formulae. If the accuracy criterion is not met, formulae using and points are used successively, stopping whenever the accuracy criterion is satisfied.

This function is designed for smooth integrands only.

References

Patterson, T N L, 1968, The Optimum addition of points to quadrature formulae, Math. Comput. (22), 847–856

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