bundles / scipy latest / scipy / special / _orthogonal / legendre
function
scipy.special._orthogonal:legendre
source: build-install/usr/lib/python3.14/site-packages/scipy/special/_orthogonal.py:3457
Signature
def legendre(n, monic = False)Summary
Legendre polynomial.
Extended Summary
Defined to be the solution of
is a polynomial of degree .
Parameters
n: intDegree of the polynomial.
monic: bool, optionalIf True, scale the leading coefficient to be 1. Default is False.
Returns
P: orthopoly1dLegendre polynomial.
Notes
The polynomials are orthogonal over with weight function 1.
Examples
Generate the 3rd-order Legendre polynomial 1/2*(5x^3 + 0x^2 - 3x + 0):from scipy.special import legendre legendre(3)✓
poly1d([ 2.5, 0. , -1.5, 0. ])
Aliases
scipy.special.legendre