nag_quad_1d_gauss_wrec (d01tdc) computes the weights and abscissae of a Gaussian quadrature rule using the method of Golub and Welsch.
A tri-diagonal system of equations is formed from the coefficients of an underlying three-term recurrence formula:
for a set of othogonal polynomials
$p\left(j\right)$ induced by the quadrature. This is described in greater detail in the
d01 Chapter 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.
In general the computed weights and abscissae are accurate to a reasonable multiple of machine precision.
nag_quad_1d_gauss_wrec (d01tdc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
nag_quad_1d_gauss_wrec (d01tdc) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
x06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
The weight function must be non-negative to obtain sensible results. This and the validity of
muzero are not something that the function can check, so please be particularly careful. If possible check the computed weights and abscissae by integrating a function with a function for which you already know the integral.
None.