Legendre-Gauss Quadrature formula

From HandWiki

Legendre-Gauss Quadratude formiula is the approximation of the integral

(1) 11f(x)dxi=1Nwif(xi).

with special choice of nodes xi and weights wi, characterised in that, if the finction f is polynomial of order smallet than 2N, then the exact equality takes place in equation (1).

Legendre-Gauss quadratude formula is special case of Gaussian quadratures of more general kind, which allow efficient approximation of a function with known asumptiotic behavior at the edges of the interval of integration.

Nodes and weights

Nodes xi in equation (1) are zeros of the Polunomial of Lehendre PN:

(2) PN(xi)=0
(3) 1<x1<x2<...<xN<1

Weight wi in equaiton (1) can be expressed with

(4) wi=2(1xi2)(P'N(xi))2

There is no straightforward espression for the nodes xi; they can be approximated with many decimal digits through only few iterations, solving numerically equation (2) with initial approach

(5) xicos(π1/2+iN)

These formulas are described in the books [1] [2]

Precision of the approximation

Example

File:GaulegExample.png
) versus number N of terms in the right hand side of equation (1).

Extension to other interval

is straightforward. Should I copypast the obvious formulas here?

References

  1. Handbook on special functions. 1980. 
  2. Numerical Resipes in C. Do not forget to type data of the ref. here!.