Returns nodes and weights of Gauss-Legendre quadrature
[x,w]=legendre_quadrature(n)
a 1-by-1 matrix of doubles, integer value, n>=0, the number of nodes.
a n-by-1 matrix of doubles, the nodes
a n-by-1 matrix of doubles, the weights
Returns nodes x and weights w of Gauss-Legendre quadrature.
This implementation uses the eigenvalues of the Jacobi matrix.
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