bundles / scipy latest / scipy / special / _orthogonal / roots_hermite
function
scipy.special._orthogonal:roots_hermite
Signature
def roots_hermite ( n , mu = False ) Summary
Gauss-Hermite (physicist's) quadrature.
Extended Summary
Compute the sample points and weights for Gauss-Hermite quadrature. The sample points are the roots of the nth degree Hermite polynomial, . These sample points and weights correctly integrate polynomials of degree or less over the interval with weight function . See 22.2.14 in [AS] for details.
Parameters
n: intquadrature order
mu: bool, optionalIf True, return the sum of the weights, optional.
Returns
x: ndarraySample points
w: ndarrayWeights
mu: floatSum of the weights
Notes
For small n up to 150 a modified version of the Golub-Welsch 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 well-known analytical formula.
For n larger than 150 an optimal asymptotic algorithm is applied which computes nodes and weights in a numerically stable manner. The algorithm has linear runtime making computation for very large n (several thousand or more) feasible.
See also
- numpy.polynomial.hermite.hermgauss
- roots_hermitenorm
- scipy.integrate.fixed_quad
Aliases
-
scipy.special.h_roots