scipy.special.roots_hermitenorm¶

scipy.special.
roots_hermitenorm
(n, mu=False)[source]¶ GaussHermite (statistician’s) quadrature.
Computes the sample points and weights for GaussHermite quadrature. The sample points are the roots of the nth degree Hermite polynomial, \(He_n(x)\). These sample points and weights correctly integrate polynomials of degree \(2n  1\) or less over the interval \([\infty, \infty]\) with weight function \(f(x) = e^{x^2/2}\).
 Parameters
 nint
quadrature order
 mubool, optional
If True, return the sum of the weights, optional.
 Returns
 xndarray
Sample points
 wndarray
Weights
 mufloat
Sum of the weights
See also
scipy.integrate.quadrature
,scipy.integrate.fixed_quad
,numpy.polynomial.hermite_e.hermegauss
Notes
For small n up to 150 a modified version of the GolubWelsch algorithm is used. Nodes are computed from the eigenvalue problem and improved by one step of a Newton iteration. The weights are computed from the wellknown analytical formula.
For n larger than 150 an optimal asymptotic algorithm is used which computes nodes and weights in a numerical stable manner. The algorithm has linear runtime making computation for very large n (several thousand or more) feasible.