Gauss–Hermite quadrature

From LaTeX CAS translator demo
Jump to navigation Jump to search
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−x2f(x)dx.

In this case

∫−∞+∞e−x2f(x)dx≈∑i=1nwif(xi)

where n is the number of sample points used. The xi are the roots of the physicists' version of the Hermite polynomial Hn(x) (i = 1,2,...,n), and the associated weights wi are given by [1]

wi=2n−1n!πn2[Hn−1(xi)]2.

Example with change of variable

Consider a function h(y), where the variable y is Normally distributed: y∼𝒩(μ,σ2). The expectation of h corresponds to the following integral:

E[h(y)]=∫−∞+∞1σ2πexp⁡(−(y−μ)22σ2)h(y)dy

As this doesn't exactly correspond to the Hermite polynomial, we need to change variables:

x=y−μ2σ⇔y=2σx+μ

Coupled with the integration by substitution, we obtain:

E[h(y)]=∫−∞+∞1πexp⁡(−x2)h(2σx+μ)dx

leading to:

E[h(y)]≈1π∑i=1nwih(2σxi+μ)

References

  1. ↑ Abramowitz, M & Stegun, I A, Handbook of Mathematical Functions, 10th printing with corrections (1972), Dover, ISBN 978-0-486-61272-0. Equation 25.4.46.