<< Overview Orthogonal Polynomials Chebyshev >>

Orthogonal Polynomials >> Orthogonal Polynomials > ortpol_quadrature

ortpol_quadrature

Returns nodes and weights of a quadrature from alphas and betas

Calling Sequence

[x,w]=ortpol_quadrature(a,b)

Parameters

a :

a n-by-1 matrix of doubles, the alphas in the three term recurrence, where n is the number of nodes.

b :

a n-by-1 matrix of doubles, the betas in the three term recurrence, where n is the number of nodes.

x :

a n-by-1 matrix of doubles, the nodes

w :

a n-by-1 matrix of doubles, the weights

Description

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.

Examples

// For Legendre nodes:
a = zeros(n,1)
b = zeros(n,1)
b(1)=2
k=(2:n)'
b(k)=sqrt(1 ./(4-(k-1).^-2))
[x,w]=ortpol_quadrature(a,b)

Authors

Bibliography

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


Report an issue
<< Overview Orthogonal Polynomials Chebyshev >>