fn

laguerre_polynomial_l

Tensor
laguerre_polynomial_l(x: Tensor, n: int)
source

Laguerre polynomial Ln(x)L_n(x).

The (simple) Laguerre polynomials are orthogonal on [0,)[0, \infty) with weight exe^{-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
Argument tensor; any floating-point dtype. Customarily evaluated on [0,)[0, \infty).
nint
Non-negative polynomial degree.

Returns

Tensor

Ln(x)L_n(x) element-wise, same shape and dtype as x.

Notes

Recurrence:

L0(x)=1,L1(x)=1x,(k+1)Lk+1(x)=(2k+1x)Lk(x)kLk1(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. Raises ValueError for n < 0.

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.0000, -0.5000, -1.0000])