bundles / scipy latest / scipy / special / _orthogonal / laguerre
function
scipy.special._orthogonal:laguerre
Signature
def laguerre ( n , monic = False ) Summary
Laguerre polynomial.
Extended Summary
Defined to be the solution of
is a polynomial of degree .
Parameters
n: intDegree of the polynomial.
monic: bool, optionalIf
True, scale the leading coefficient to be 1. Default isFalse.
Returns
L: orthopoly1dLaguerre Polynomial.
Notes
The polynomials are orthogonal over with weight function .
Examples
The Laguerre polynomials :math:`L_n` are the special case :math:`\alpha = 0` of the generalized Laguerre polynomials :math:`L_n^{(\alpha)}`. Let's verify it on the interval :math:`[-1, 1]`:import numpy as np 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))✓
x = np.arange(0.0, 1.0, 0.01) np.allclose(4 * laguerre(4)(x), (7 - x) * laguerre(3)(x) - 3 * laguerre(2)(x))✓
import matplotlib.pyplot as plt 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()
✓
See also
- genlaguerre
Generalized (associated) Laguerre polynomial.
Aliases
-
scipy.special.laguerre