Tuesday, April 10, 2012

Gauss Quadrature Nodes and Weights

Gauss quadrature is a family of numerical methods used to integrate functions. Depending on the integration limits (and weighting function), we can come up with methods such as Gauss-Legendre, Gauss-Hermite, Gauss-Laguerre, Gauss-Chebyshev etc.

To integrate a given function, one can find tabulated nodes and weights. For example, here, here, and here. While this is nice, often one would rather have a program that would gives us the nodes and weights to use (in say another program linked to it).

There are many choices here, including gaussq from Netlib, GQ subpackage from ALGLIB, etc.

John Burkardt has a well-documented description and source-code for IQPACK (also called TOMS655) in several languages (Fortran 77/90, C, C++, and Matlab). The compiling instructions, and examples are also extremely clearly documented.

1 comment:

Pomax said...

On a small note, the tables on my page you link to (Pomax) also contain the Mathematica program for generating them. So if you're a Mathematica user, you will want to use that program rather than just copying the numbers.