Weights versus xi for four choices of n
In numerical analysis , Gauss–Hermite quadrature is a form of Gaussian quadrature for approximating the value of integrals of the following kind:
∫
−
∞
+
∞
e
−
x
2
f
(
x
)
d
x
.
{\displaystyle \int _{-\infty }^{+\infty }e^{-x^{2}}f(x)\,dx.}
In this case
∫
−
∞
+
∞
e
−
x
2
f
(
x
)
d
x
≈
∑
i
=
1
n
w
i
f
(
x
i
)
{\displaystyle \int _{-\infty }^{+\infty }e^{-x^{2}}f(x)\,dx\approx \sum _{i=1}^{n}w_{i}f(x_{i})}
where n is the number of sample points used. The x i are the roots of the physicists' version of the Hermite polynomial H n (x ) (i = 1,2,...,n ), and the associated weights w i are given by
w
i
=
2
n
−
1
n
!
π
n
2
[
H
n
−
1
(
x
i
)
]
2
.
{\displaystyle w_{i}={\frac {2^{n-1}n!{\sqrt {\pi }}}{n^{2}[H_{n-1}(x_{i})]^{2}}}.}