Returns nodes and weights of a quadrature from alphas and betas
[x,w]=ortpol_quadrature(a,b)
a n-by-1 matrix of doubles, the alphas in the three term recurrence, where n is the number of nodes.
a n-by-1 matrix of doubles, the betas in the three term recurrence, where n is the number of nodes.
a n-by-1 matrix of doubles, the nodes
a n-by-1 matrix of doubles, the weights
We consider the three term recurrence of monic orthogonal polynomials :
for k=0,1,...,n where
and
From these coefficients, the function computes the associated Jacobi matrix. It uses the eigenvalues and eigenvectors in order to compute the weights and nodes of the quadrature rule.
D.P.Laurie, Computation of Gauss-type quadrature formulas, J.Comput. and Applied Maths., 127 (2001)
Numerical Mathematics, Series: Texts in Applied Mathematics, Vol. 37, Alfio Quarteroni, Riccardo Sacco, Fausto Saleri, 2nd ed. 2007