naginterfaces.library.quad.dim1_​inf_​exp_​wt

naginterfaces.library.quad.dim1_inf_exp_wt(f, n, data=None)[source]

dim1_inf_exp_wt returns the Gaussian quadrature approximation for the specific problem . The degrees of precision catered for are: , , , , , , , and , corresponding to values of , , , , , , , and , where is the number of weights.

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

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

Parameters
fcallable (fv, istop) = f(x, istop, data=None)

must return the integrand function values for the given , for .

Parameters
xfloat, ndarray, shape

The points at which the integrand function must be evaluated.

istopint

.

dataarbitrary, optional, modifiable in place

User-communication data for callback functions.

Returns
fvfloat, array-like, shape

must contain the value of the integrand evaluated at the point , for .

istopint

You may set to a negative number if at any time it is impossible to evaluate the function . In this case dim1_inf_exp_wt halts with set to the value of and the value returned in will be that of a non-signalling NaN.

nint

specifies the number of weights and abscissae to be used.

dataarbitrary, optional

User-communication data for callback functions.

Returns
ansfloat

If no exception or warning is raised, contains an approximation to the integral. Otherwise, will be a non-signalling NaN.

Raises
NagValueError
(errno )

The user has halted the calculation.

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

is not one of the allowed values.

Notes

dim1_inf_exp_wt uses the weights and the abscissae such that is approximated by to maximum precision i.e., it is exact when is a polynomial of degree .

References

Golub, G H and Welsch, J H, 1969, Calculation of Gauss quadrature rules, Math. Comput. (23), 221–230