Form of Gaussian quadrature
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
[ 1]
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}}}.}
Example with change of variable
Consider a function h(y) , where the variable y is Normally distributed :
y
∼
N
(
μ
,
σ
2
)
{\displaystyle y\sim {\mathcal {N}}(\mu ,\sigma ^{2})}
. The expectation of h corresponds to the following integral:
E
[
h
(
y
)
]
=
∫
−
∞
+
∞
1
σ
2
π
exp
(
−
(
y
−
μ
)
2
2
σ
2
)
h
(
y
)
d
y
{\displaystyle E[h(y)]=\int _{-\infty }^{+\infty }{\frac {1}{\sigma {\sqrt {2\pi }}}}\exp \left(-{\frac {(y-\mu )^{2}}{2\sigma ^{2}}}\right)h(y)dy}
As this does not exactly correspond to the Hermite polynomial, we need to change variables:
x
=
y
−
μ
2
σ
⇔
y
=
2
σ
x
+
μ
{\displaystyle x={\frac {y-\mu }{{\sqrt {2}}\sigma }}\Leftrightarrow y={\sqrt {2}}\sigma x+\mu }
Coupled with the integration by substitution , we obtain:
E
[
h
(
y
)
]
=
∫
−
∞
+
∞
1
π
exp
(
−
x
2
)
h
(
2
σ
x
+
μ
)
d
x
{\displaystyle E[h(y)]=\int _{-\infty }^{+\infty }{\frac {1}{\sqrt {\pi }}}\exp(-x^{2})h({\sqrt {2}}\sigma x+\mu )dx}
leading to:
E
[
h
(
y
)
]
≈
1
π
∑
i
=
1
n
w
i
h
(
2
σ
x
i
+
μ
)
{\displaystyle E[h(y)]\approx {\frac {1}{\sqrt {\pi }}}\sum _{i=1}^{n}w_{i}h({\sqrt {2}}\sigma x_{i}+\mu )}
References
Olver, Frank W. J. ; Lozier, Daniel M.; Boisvert, Ronald F.; Clark, Charles W., eds. (2010), "Quadrature: Gauss–Hermite Formula" , NIST Handbook of Mathematical Functions , Cambridge University Press, ISBN 978-0-521-19225-5 , MR 2723248 .
Shao, T. S.; Chen, T. C.; Frank, R. M. (1964). "Tables of zeros and Gaussian weights of certain associated Laguerre polynomials and the related generalized Hermite polynomials" . Math. Comp . 18 (88): 598– 616. doi :10.1090/S0025-5718-1964-0166397-1 . MR 0166397 .
Steen, N. M.; Byrne, G. D.; Gelbard, E. M. (1969). "Gaussian quadratures for the integrals
∫
0
∞
e
−
x
2
f
(
x
)
d
x
{\displaystyle \textstyle \int _{0}^{\infty }e^{-x^{2}}f(x)dx}
and
∫
0
b
e
−
x
2
f
(
x
)
d
x
{\displaystyle \textstyle \int _{0}^{b}e^{-x^{2}}f(x)dx}
" . Math. Comp . 23 (107): 661– 671. doi :10.1090/S0025-5718-1969-0247744-3 . MR 0247744 .
Shizgal, B. (1981). "A Gaussian quadrature procedure for use in the solution of the Boltzmann equation and related problems". J. Comput. Phys . 41 (2): 309– 328. doi :10.1016/0021-9991(81)90099-1 .
External links