Mathematics Source Library
C & ASM

Gauss-Hermite quadrature formulas are used to integrate functions f(x) e - x² from -∞ to .

With respect to the inner product < f,g > = -∞ (f(x) g(x) w(x)), the Hermite polynomials
H n(x) = (-1)n e ( d n / dx n )( e - x² ) for n > 0, and H0(x) = 1 form an orthogonal family of polynomials with weight function w(x) = e - x² on the entire x-axis.

The n-point Gauss-Hermite quadrature formula, GHn ( f(x) ), for approximating the integral of f(x) e - x² over the entire x-axis, is given by
GHn ( f(x) ) = A1 f(x1) + ··· + An f(xn),
where xi , i = 1,...,n, are the zeros of Hn and Ai = 2n+1( n! ) √(π) / [ Hn-1 (xi) ] ², i = 1,...,n.

### Function List

For n = 2,3,4,5,6,7,8,9,10,12,14,16,20,24,28,32,40,48,56,64,82,96, and 100
• double Gauss_Hermite_Integration_n pts( double (*f)(double) )

Integrate (*f)(x) Exp(- x²) from -∞ to ∞ where (*f)(x) is the user supplied function.

• void Gauss_Hermite_Zeros_n pts( double nodes[ ])

Returns the zeros of the Hermite polynomial Hn(x) in the user allocated array nodes of dimension n.

• void Gauss_Hermite_Coefs_n pts( double wght[ ] )

Returns the weights of the Gauss-Hermite formula in the user allocated array wght of dimension n. The i th element of the array wght is the weight which corresponds to the i th node in the array nodes as returned in Gauss_Hermite_Zeros_n pts( double nodes[ ]).

#### C Source Code

• The file, gauss_hermite_2pts.c, contains the versions of Gauss_Hermite_Integration_2pts( ), Gauss_Hermite_Zeros_2pts and Gauss_Hermite_Coefs_2pts( ) written in C.

• The file, gauss_hermite_3pts.c, contains the versions of Gauss_Hermite_Integration_3pts( ), Gauss_Hermite_Zeros_3pts and Gauss_Hermite_Coefs_3pts( ) written in C.

• The file, gauss_hermite_4pts.c, contains the versions of Gauss_Hermite_Integration_4pts( ), Gauss_Hermite_Zeros_4pts and Gauss_Hermite_Coefs_4pts( ) written in C.

• The file, gauss_hermite_5pts.c, contains the versions of Gauss_Hermite_Integration_5pts( ), Gauss_Hermite_Zeros_5pts and Gauss_Hermite_Coefs_5pts( ) written in C.

• The file, gauss_hermite_6pts.c, contains the versions of Gauss_Hermite_Integration_6pts( ), Gauss_Hermite_Zeros_6pts and Gauss_Hermite_Coefs_6pts( ) written in C.

• The file, gauss_hermite_7pts.c, contains the versions of Gauss_Hermite_Integration_7pts( ), Gauss_Hermite_Zeros_7pts and Gauss_Hermite_Coefs_7pts( ) written in C.

• The file, gauss_hermite_8pts.c, contains the versions of Gauss_Hermite_Integration_8pts( ), Gauss_Hermite_Zeros_8pts and Gauss_Hermite_Coefs_8pts( ) written in C.

• The file, gauss_hermite_9pts.c, contains the versions of Gauss_Hermite_Integration_9pts( ), Gauss_Hermite_Zeros_9pts and Gauss_Hermite_Coefs_9pts( ) written in C.

• The file, gauss_hermite_10pts.c, contains the versions of Gauss_Hermite_Integration_10pts( ), Gauss_Hermite_Zeros_10pts and Gauss_Hermite_Coefs_10pts( ) written in C.

• The file, gauss_hermite_12pts.c, contains the versions of Gauss_Hermite_Integration_12pts( ), Gauss_Hermite_Zeros_12pts and Gauss_Hermite_Coefs_12pts( ) written in C.

• The file, gauss_hermite_14pts.c, contains the versions of Gauss_Hermite_Integration_14pts( ), Gauss_Hermite_Zeros_14pts and Gauss_Hermite_Coefs_14pts( ) written in C.

• The file, gauss_hermite_16pts.c, contains the versions of Gauss_Hermite_Integration_16pts( ), Gauss_Hermite_Zeros_16pts and Gauss_Hermite_Coefs_16pts( ) written in C.

• The file, gauss_hermite_20pts.c, contains the versions of Gauss_Hermite_Integration_20pts( ), Gauss_Hermite_Zeros_20pts and Gauss_Hermite_Coefs_20pts( ) written in C.

• The file, gauss_hermite_24pts.c, contains the versions of Gauss_Hermite_Integration_24pts( ), Gauss_Hermite_Zeros_24pts and Gauss_Hermite_Coefs_24pts( ) written in C.

• The file, gauss_hermite_28pts.c, contains the versions of Gauss_Hermite_Integration_28pts( ), Gauss_Hermite_Zeros_28pts and Gauss_Hermite_Coefs_28pts( ) written in C.

• The file, gauss_hermite_32pts.c, contains the versions of Gauss_Hermite_Integration_32pts( ), Gauss_Hermite_Zeros_32pts and Gauss_Hermite_Coefs_32pts( ) written in C.

• The file, gauss_hermite_40pts.c, contains the versions of Gauss_Hermite_Integration_40pts( ), Gauss_Hermite_Zeros_40pts and Gauss_Hermite_Coefs_40pts( ) written in C.

• The file, gauss_hermite_48pts.c, contains the versions of Gauss_Hermite_Integration_48pts( ), Gauss_Hermite_Zeros_48pts and Gauss_Hermite_Coefs_48pts( ) written in C.

• The file, gauss_hermite_56pts.c, contains the versions of Gauss_Hermite_Integration_56pts( ), Gauss_Hermite_Zeros_56pts and Gauss_Hermite_Coefs_56pts( ) written in C.

• The file, gauss_hermite_64pts.c, contains the versions of Gauss_Hermite_Integration_64pts( ), Gauss_Hermite_Zeros_64pts and Gauss_Hermite_Coefs_64pts( ) written in C.

• The file, gauss_hermite_82pts.c, contains the versions of Gauss_Hermite_Integration_82pts( ), Gauss_Hermite_Zeros_82pts and Gauss_Hermite_Coefs_82pts( ) written in C.

• The file, gauss_hermite_96pts.c, contains the versions of Gauss_Hermite_Integration_96pts( ), Gauss_Hermite_Zeros_96pts and Gauss_Hermite_Coefs_96pts( ) written in C.

• The file, gauss_hermite_100pts.c, contains the versions of Gauss_Hermite_Integration_100pts( ), Gauss_Hermite_Zeros_100pts and Gauss_Hermite_Coefs_100pts( ) written in C.