TIL - generalized Laguerre polynomial
Here we will compute the values of the generalized Laguerre polynomial for small values of $n$ and $\alpha$
\[L_n^\alpha(X) = \sum_{m=0}^{n} (-1)^m \left( \binom{n+\alpha}{n - m} \right) \frac{X^m}{m!}\]from scipy.special import comb, factorial
from IPython import display
import sympy as sy
def laguerre(n, alpha, X):
m = np.arange(n+1)
return np.sum(
(-X) ** m * comb(n + alpha, n - m) / factorial(m)
).simplify()
We can now calculate the values for $\alpha$ and $n$ varying from 0
X = sy.Symbol('X')
for n in range(3):
for alpha in range(3):
l = laguerre(n, alpha, X)
display.display(display.Markdown(f'$L_{n}^{alpha} = {sy.latex(l)}$'))