scipy.special.eval_genlaguerre#

scipy.special.eval_genlaguerre(n, alpha, x, out=None) = <ufunc 'eval_genlaguerre'>#

Evaluate generalized Laguerre polynomial at a point.

The generalized Laguerre polynomials can be defined via the confluent hypergeometric function \({}_1F_1\) as

\[L_n^{(\alpha)}(x) = \binom{n + \alpha}{n} {}_1F_1(-n, \alpha + 1, x).\]

When \(n\) is an integer the result is a polynomial of degree \(n\). See 22.5.54 in [AS] or [DLMF] for details. The Laguerre polynomials are the special case where \(\alpha = 0\).

Parameters:
narray_like

Degree of the polynomial. If not an integer, the result is determined via the relation to the confluent hypergeometric function.

alphaarray_like

Parameter; must have alpha > -1

xarray_like

Points at which to evaluate the generalized Laguerre polynomial

outndarray, optional

Optional output array for the function values

Returns:
Lscalar or ndarray

Values of the generalized Laguerre polynomial

See also

roots_genlaguerre

roots and quadrature weights of generalized Laguerre polynomials

genlaguerre

generalized Laguerre polynomial object

hyp1f1

confluent hypergeometric function

eval_laguerre

evaluate Laguerre polynomials

References

[AS]

Milton Abramowitz and Irene A. Stegun, eds. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover, 1972.

[DLMF]

NIST Digital Library of Mathematical Functions, https://dlmf.nist.gov/18.5.E12

Examples

>>> import numpy as np
>>> from scipy.special import eval_genlaguerre
>>> import matplotlib.pyplot as plt

This is the parameter value that we’ll use in this example.

>>> alpha = 1.25

Evaluate the order 3 polynomial at a few values of x.

>>> eval_genlaguerre(3, alpha, [0, 0.25, 0.5])
array([5.1796875 , 3.58333333, 2.23697917])

Plot the polynomials of order 0 through 4.

>>> x = np.linspace(0.0, 9.0, 800)
>>> fig, ax = plt.subplots(1, 1, constrained_layout=True)
>>> for n in range(5):
...     y = eval_genlaguerre(n, alpha, x)
...     ax.plot(x, y, label=f'{n = }')
>>> ax.grid()
>>> ax.set_title("Generalized Laguerre Polynomials")
>>> ax.set_xlabel("$x$")
>>> ax.set_ylabel(r"$L_n^{(\alpha)}(x)$")
>>> ax.legend(loc='upper left', bbox_to_anchor=(1, 1), shadow=True)
>>> plt.show()
../../_images/scipy-special-eval_genlaguerre-1.png