How to compute Gaussian Quadrature weights?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 6K views
ektrules
Messages
35
Reaction score
0
My numerical analysis book doesn't explain it. It just tells you to use precomputed tables, and directs you to an out of print book from the 80's that I can't find anywhere.

After searching, I found http://en.wikipedia.org/wiki/Gaussian_quadrature#Computation_of_Gaussian_quadrature_rules" in the "Gaussian Quadrature" Wikipedia article. But I don't really understand it, and don't have access to the referenced book either. Specifically, in the "Jacobi" matrix, what are An and Bn supposed to be?
 
Last edited by a moderator:
Physics news on Phys.org
Here's what orthogonal polynomials are:

A set of polynomials pi(x) with degree i having values 0, 1, 2, 3, ... that satisfy

<pi(x)*pj(x)> = integral over x of w(x)*pi(x)*pj(x) = 0 for j != i

and some weight function w(x).

They can be found from a recurrence relation; this one assumes monic polynomials:

pi+1(x) + (Bi - x)*pi(x) + Ai*pi-1 = 0

with p0(x) = 1 and p1(x) = x - B0

That's where the A's and B's come from. One can calculate them using orthogonality:

Bi = <x*(pi(x))2>/<(pi(x))2>
Ai = <x*pi(x)*pi-1(x)>/<(pi-1(x))2>

To derive them, multiply the recurrence relation by pi(x) and pi-1(x) and integrate.

Once you get to there, the Wikipedia article explains what next.


Some orthogonal polynomials satisfy second-order differential equations. There are several families of them, and some mathematicians have found formulas for Gaussian-quadrature weights for them.

Jacobi polynomials - (1-x)a*(1+x)b over (-1,1)

Laguerre polynomials - exp(-x) over (0,infinity)

Associated Laguerre polynomials - xa*exp(x) over (0,infinity)

Hermite polynomials - exp(-x2) over (-infinity,infinity)