scipy.special.laguerre¶
- scipy.special.laguerre(n, monic=False)[源代码]¶
拉盖尔多项式。
定义为
\[x\frac{d^2}{dx^2}L_n+(1-x)\frac{d}{dx}L_n+nL_n=0;\]\(L_n\) 是一次多项式 \(n\) 。
- 参数
- n集成
多项式的次数。
- monic布尔值,可选
如果 True ,将前导系数缩放为1,默认值为 False 。
- 退货
- L正交1d
拉盖尔多项式。
参见
genlaguerre
广义(结合)拉盖尔多项式。
注意事项
多项式 \(L_n\) 是正交的吗? \([0, \infty)\) 带权重函数 \(e^{{-x}}\) 。
参考文献
- AS
米尔顿·阿布拉莫维茨和艾琳·A·斯特根主编。包含公式、图表和数学表的数学函数手册。纽约:多佛,1972年。
示例
拉盖尔多项式 \(L_n\) 是特例吗? \(\alpha = 0\) 关于广义Laguerre多项式 \(L_n^{{(\alpha)}}\) 。让我们在间隔时间内验证一下 \([-1, 1]\) :
>>> from scipy.special import genlaguerre >>> from scipy.special import laguerre >>> x = np.arange(-1.0, 1.0, 0.01) >>> np.allclose(genlaguerre(3, 0)(x), laguerre(3)(x)) True
多项式 \(L_n\) 也满足递归关系:
\[(n+1)L_{n+1}(X)=(2n+1-x)L_n(X)-NL_{n-1}(X)\]这很容易检查 \([0, 1]\) 为 \(n = 3\) :
>>> from scipy.special import laguerre >>> x = np.arange(0.0, 1.0, 0.01) >>> np.allclose(4 * laguerre(4)(x), ... (7 - x) * laguerre(3)(x) - 3 * laguerre(2)(x)) True
这是头几个拉盖尔多项式的曲线图 \(L_n\) :
>>> import matplotlib.pyplot as plt >>> from scipy.special import laguerre >>> x = np.arange(-1.0, 5.0, 0.01) >>> fig, ax = plt.subplots() >>> ax.set_ylim(-5.0, 5.0) >>> ax.set_title(r'Laguerre polynomials $L_n$') >>> for n in np.arange(0, 5): ... ax.plot(x, laguerre(n)(x), label=rf'$L_{n}$') >>> plt.legend(loc='best') >>> plt.show()