roots_hermite#
- scipy.special.roots_hermite(n, mu=False)[source]#
Gauss-Hermite (物理学家) 正交。
计算 Gauss-Hermite 正交的采样点和权重。采样点是 n 次 Hermite 多项式的根,\(H_n(x)\)。这些采样点和权重正确地积分了在区间 \([-\infty, \infty]\) 上,权重函数为 \(w(x) = e^{-x^2}\) 的度数为 \(2n - 1\) 或更低的多项式。有关详细信息,请参见 [AS] 中的 22.2.14。
- 参数:
- nint
正交阶数
- mubool, optional
如果为 True,则返回权重的总和,可选。
- 返回:
- xndarray
采样点
- wndarray
权重
- mufloat
权重的总和
备注
对于小 n(高达 150),使用修改后的 Golub-Welsch 算法。节点从特征值问题计算得出,并通过牛顿迭代的一个步骤进行改进。权重由众所周知的解析公式计算得出。
对于大于 150 的 n,应用最佳渐近算法,该算法以数值稳定的方式计算节点和权重。该算法具有线性运行时,使得计算非常大的 n(几千甚至更多)成为可能。
参考文献
[townsend.trogdon.olver-2014]Townsend, A. and Trogdon, T. and Olver, S. (2014) Fast computation of Gauss quadrature nodes and weights on the whole real line. arXiv:1410.5286.
[townsend.trogdon.olver-2015]Townsend, A. and Trogdon, T. and Olver, S. (2015) Fast computation of Gauss quadrature nodes and weights on the whole real line. IMA Journal of Numerical Analysis DOI:10.1093/imanum/drv002.
[AS]Milton Abramowitz and Irene A. Stegun, eds. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover, 1972.