scipy.special.

legendre#

scipy.special.legendre(n, monic=False)[Quelle]#

Legendre-Polynom.

Definiert als die Lösung von

\[\frac{d}{dx}\left[(1 - x^2)\frac{d}{dx}P_n(x)\right] + n(n + 1)P_n(x) = 0;\]

\(P_n(x)\) ist ein Polynom vom Grad \(n\).

Parameter:
nint

Grad des Polynoms.

monicbool, optional

Wenn True, wird der führende Koeffizient auf 1 skaliert. Standard ist False.

Rückgabe:
Porthopoly1d

Legendre-Polynom.

Hinweise

Die Polynome \(P_n\) sind orthogonal über \([-1, 1]\) mit der Gewichtungsfunktion 1.

Beispiele

Generiere das Legendre-Polynom 3. Ordnung 1/2*(5x^3 + 0x^2 - 3x + 0)

>>> from scipy.special import legendre
>>> legendre(3)
poly1d([ 2.5,  0. , -1.5,  0. ])