dim1_gauss_wrec computes the weights and abscissae of a Gaussian quadrature rule using the method of Golub and Welsch.

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

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

Parameters
afloat, array-like, shape

contains the coefficients .

bfloat, array-like, shape

contains the coefficients .

cfloat, array-like, shape

contains the coefficients .

muzerofloat

contains the definite integral of the weight function for the interval of interest.

Returns
bfloat, ndarray, shape

Elements of are altered to make the underlying eigenvalue problem symmetric.

cfloat, ndarray, shape

Elements of are altered to make the underlying eigenvalue problem symmetric.

weightfloat, ndarray, shape

contains the weight corresponding to the th abscissa.

abscisfloat, ndarray, shape

the th abscissa.

Raises
NagValueError
(errno )

The number of weights and abscissae requested () is less than : .

(errno )

(errno )

The algorithm failed to converge. The th diagonal was not zero: .

Notes

A tri-diagonal system of equations is formed from the coefficients of an underlying three-term recurrence formula:

for a set of othogonal polynomials induced by the quadrature. This is described in greater detail in the D01 Introduction. The user is required to specify the three-term recurrence and the value of the integral of the chosen weight function over the chosen interval.

As described in Golub and Welsch (1969) the abscissae are computed from the eigenvalues of this matrix and the weights from the first component of the eigenvectors.

LAPACK functions are used for the linear algebra to speed up computation.

References

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