Skip to content
fn

laguerre_polynomial_l

→Tensor
laguerre_polynomial_l(x: TensorOrScalar, n: TensorOrScalar)

Laguerre polynomial Ln(x)L_n(x).

The (simple) Laguerre polynomials are orthogonal on [0,∞)[0, \infty) with weight e−xe^{-x} and appear as the radial eigenfunctions of the hydrogen atom, as the basis of Gauss-Laguerre quadrature, and in survival-analysis kernels.

Parameters

xTensor | Scalar
Where LnL_n is evaluated, of any real dtype. Customarily on [0,∞)[0, \infty).
nTensor | Scalar
Degree of LnL_n, for every element or one per element; truncated toward zero, and a negative degree gives 0.

Returns

Tensor

Ln(x)L_n(x) element-wise, broadcast over x and n.

Notes

Recurrence:

L0(x)=1,L1(x)=1−x,(k+1) Lk+1(x)=(2k+1−x) Lk(x)−k Lk−1(x).L_0(x) = 1, \quad L_1(x) = 1 - x, \quad (k+1)\, L_{k+1}(x) = (2k + 1 - x)\, L_k(x) - k\, L_{k-1}(x).

The leading coefficient is (−x)n/n!(-x)^n / n!, and Ln(0)=1L_n(0) = 1 for every n.

Examples

>>> import lucid
>>> from lucid.special import laguerre_polynomial_l
>>> laguerre_polynomial_l(lucid.tensor([0.0, 1.0, 2.0]), n=2)
tensor([1., -0.5, -1.])

Used by 1