legendre_P( n , z )

The Legendre polynomial of z in SageMath. Defined by

$P_n (z) = \frac{ 1 }{ 2^n n! } \frac{ d^n }{ dz^n } ( z^2-1 )^n$

A solution of the differential equation

$( 1-z^2 ) \frac{ d^2 f }{ dz^2 } -2z \frac{ d f }{ dz } + n(n+1) f = 0$

The second linearly independent solution of this equation is legendre_Q.

Equivalent to gen_legendre_P( n , 0 , z ).

Explicit form:

Plot on the real axis:

Special values:

Related functions:   legendre_Q   gen_legendre_P

Function category: orthogonal polynomials sagemath-docs