Legendre Polynomial

Author

Eric W. Weisstein
February 8, 2006

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SpecialFunctions/LegendrePolynomial.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/LegendrePolynomial.html.

©2006 Wolfram Research, Inc. except for portions noted otherwise

Enumeration

Times@@FactorTermsList[LegendreP[#,x]]&/@Range[0,10]//ColumnForm//TraditionalForm

DeleteCases[CoefficientList[FactorTermsList[LegendreP[#,x]][[2]],x],0]&/@Range[0,10]

1/FactorTermsList[LegendreP[#,x]][[1]]&/@Range[0,20]

Plots

<<Utilities`Plot`

Real Axis

Plot[Evaluate[Table[LegendreP[n,x],{n,5}]],{x,-1,1},PlotStyle->{Red,Yellow,Green,Blue,Violet}]

Complex Plane

ComplexPlot3D[LegendreP[5,z],{z,-5,5},ComplexPlotLabel->HoldForm[LegendreP[5,z]],
Mesh->False,PlotPoints->50,ClipFill->None]

ComplexContourPlot[LegendreP[5,z],{z,-5,5},ComplexPlotLabel->HoldForm[LegendreP[5,z]]]//Timing

Associated

Factor/@Flatten[Table[LegendreP[l,m,x],{l,0,4},{m,0,l}]]//ColumnForm//TraditionalForm

FullSimplify[(Sqrt[((-x-1)/(x-1))]) (x-1)+Sqrt[1-x^2],0<x<1]

Factor/@((Flatten[Table[LegendreP[l,m,x],{l,0,4},{m,0,l}]]/.(Sqrt[((-x-1)/(x-1))])->y/(x-1))/.y->-Sqrt[1-x^2])//ColumnForm//TraditionalForm

Simplify[Table[{(-1)^m(1-x^2)^(m/2)/2^l/l! D[(x^2-1)^l,{x,l+m}],
		(-1)^m(1-x^2)^(m/2) D[LegendreP[l,x],{x,m}],LegendreP[l,m,x]},{l,0,4},{m,0,l}]]

Generating Functions

GeneratingFunction[LegendreP[n,x],n,t]

SeriesCoefficient[(1/(Sqrt[1+(t^2)-2 t x])),{t,0,n}]

Sum[LegendreP[n,x](t^n),{n,0,∞}]

D[LegendreP[n,x](t^n),t]

D[Sum[LegendreP[n,x](t^n),{n,0,∞}],t]

Sum[D[LegendreP[n,x](t^n),t],{n,0,∞}]

Sum[2n LegendreP[n,x](t^n),{n,0,∞}]

Sum[(2n+1) LegendreP[n,x](t^n),{n,0,∞}]

Integrals

(∫_(-1)^1)(Subscript[P, (Subscript[l, 1])]^m)(x) (Subscript[P, (Subscript[l, 2])]^m)(x)dx

Integrate[LegendreP[l,m,x]LegendreP[ll,m,x],{x,-1,1}]

Integrate[LegendreP[l,m,x]^2,{x,-1,1}]

(∫_x^1)(Subscript[P, m])(x) dx= ((1-(x^2))/(m(m+1)))((∂(Subscript[P, m])(x))/(∂x))

Integrate[LegendreP[m,x],{x,x,1}]

(((1-(x^2)))/(m(m+1)))D[LegendreP[m,x],x]

Table[{m,
Subtract@@{-((Hypergeometric2F1[-1-m,2+m,1,((1-x)/2)])/(1+2 m))+((Hypergeometric2F1[1-m,m,1,((1-x)/2)])/(1+2 m)),
(((1-(x^2)) (-m LegendreP[-1+m,x]+m x LegendreP[m,x]))/(m (1+m) (-1+(x^2))))}},
{m,5}]//Simplify

(∫_x^1)(LegendreP[m, x]) (LegendreP[n, x])dx==(((1-(x^2)) ((LegendreP[n, x]) Derivative[0,1][LegendreP](m,x)-(LegendreP[m, x]) Derivative[0,1][LegendreP](n,x)))/(m (m+1)-n (n+1)))

Flatten[Table[{{m,n},Simplify[Subtract@@{
Integrate[LegendreP[m,x]LegendreP[n,x],{x,x,1}],Expand@(((1-(x^2)))/(m(m+1)-n(n+1)))(LegendreP[n,x]Derivative[0,1][LegendreP][m,x]-LegendreP[m,x]Derivative[0,1][LegendreP][n,x])}]
},{m,0,3},{n,0,3}],1]//Quiet

(∫_0^1)(LegendreP[m, x])dx==Piecewse((({{0, (Mod[m, 2])==0}, {(((i^(m-1)) m!!)/(m (m+1) (m-1)!!)), True}})))

Integrate[LegendreP[m,x],{x,0,1}]

FullSimplify[%]

Table[{m,
Integrate[LegendreP[m,x],{x,0,1}],
(((Sqrt[π]) ((1/(Gamma[1-(m/2)] Gamma[((1+m)/2)]))-(1/(Gamma[-(m/2)] Gamma[((3+m)/2)]))))/(1+2 m)),((LegendreP[m-1,0]-LegendreP[m+1,0])/(2m+1)),
If[EvenQ[m],0,(((-1))^((m-1)/2))((m!!)/(m(m+1)(m-1)!!))]
},{m,10}]//ColumnForm

t=Table[Integrate[LegendreP[m,x],{x,0,1}],{m,1,20,2}];

A002596/M3768

Numerator[Flatten[t]]

A046161

Denominator[Flatten[t]]

(∫_0^1)(Subscript[P, m])(x) (Subscript[P, n])(x)dx

Integrate[LegendreP[m,x]LegendreP[n,x],{x,0,1}]

int[n_,n_]:=1/(2n+1)
int[n_,s_]:=With[{A=Gamma[(n+1)/2]Gamma[1+s/2]/Gamma[(s+1)/2]/Gamma[1+n/2]},
(A Sin[π s/2]Cos[π n/2]-1/A Sin[π n/2]Cos[π s/2])/(Pi/2(s-n)(s+n+1))
]

int2[m_,n_]:=Which[
m≠n&&Mod[m,2]==Mod[n,2],0,
EvenQ[m]&&OddQ[n],(((((-1))^((m+n+1)/2))m!n!)/((2^((m+n-1)))(m-n)(m+n+1)(m/2)!^2((n-1)/2)!^2)),
EvenQ[n]&&OddQ[m],(((((-1))^((m+n+1)/2))m!n!)/((2^((m+n-1)))(n-m)(m+n+1)(n/2)!^2((m-1)/2)!^2)),
m==n,1/(2n+1)
]

t=Table[Integrate[LegendreP[m,x]LegendreP[n,x],{x,0,1}],{m,7},{n,m}]

Table[int[m,n],{m,7},{n,m}]

Table[int2[m,n],{m,7},{n,m}]

e=FullSimplify[int[m,n]]

FullSimplify[e/.{Gamma[1+n_/2]:>(2n)!/2^n/n Sqrt[Pi]/2^n,
Gamma[n_/2]:>(n-2)!!Sqrt[Pi]/2^((n-1)/2)
},(s|n)∈Integers]

Laplace Transform

LaplaceTransform[LegendreP[n,t],t,z]==Sum[(-1)^k*Binomial[n,k]*Binomial[2*n-2*k,n]*Gamma[-2*k+n+1]*z^(2*k-n-1),{k,0,Floor[n/2]}]/2^n/;n∈Integers&&n≥0

lt=FullSimplify[Sum[(-1)^k*Binomial[n,k]*Binomial[2*n-2*k,n]*Gamma[-2*k+n+1]*z^(2*k-n-1),{k,0,Floor[n/2]}]/2^n]

((Sqrt[π])/2)FullSimplify[lt 2/Sqrt[π],n/2∈Integers]

FullSimplify[Expand[lt],(n+1)/2∈Integers]

Table[If[Mod[n,2]==0,(((Sqrt[(π/2)]) BesselI[-(1/2)-n,z])/(Sqrt[z]))-(1/4) (Sqrt[π]) z HypergeometricPFQRegularized[{1},{2+(n/2),(3/2)-(n/2)},((z^2)/4)],(1/2) (Sqrt[π]) (-(((Sqrt[2]) BesselI[-(1/2)-n,z])/(Sqrt[z]))+HypergeometricPFQRegularized[{1},{((3+n)/2),1-(n/2)},((z^2)/4)])],{n,0,3}]//FullSimplify

Table[LaplaceTransform[LegendreP[n,x],x,z],{n,0,3}]//FullSimplify

(Subscript[P, n]^m)(x)

Table[FactorTerms[(-1)^m(1-x^2)^(m/2)D[LegendreP[n,x],{x,m}]],{n,0,3},{m,0,n}]//ColumnForm

Table[Factor[LegendreP[n,m,x]],{n,0,3},{m,0,n}]//ColumnForm

Table[PowerExpand[Factor[Simplify[LegendreP[n,m,Cos[θ]]]]],{n,0,3},{m,0,n}]//ColumnForm

Table[FactorTerms[TrigExpand[PowerExpand[Simplify[ LegendreP[n,m,Cos[θ]]]]]],{n,0,3},{m,0,n}]//ColumnForm

Factor/@Together/@(%/. Sin[θ]^2:>1-Cos[θ]^2)

Factor[Expand[TrigExpand[TrigExpand[FullSimplify[(3/4) (-3 Sin[θ]-5 ((Cos[θ])^2) Sin[θ]+5 ((Sin[θ])^3))]]/Sin[θ]] /. Sin[θ]^2 :>1-Cos[θ]^2]]

PowerExpand[FullSimplify[-(3/2) (-1+5 ((Cos[θ])^2))Sin[θ]-LegendreP[3,1,Cos[θ]]]]

Recurrences

(2 l+1) μ P(l,m,μ)-((l+m) P(l-1,m,μ)+(l-m+1) P(l+1,m,μ))==0

FullSimplify[D[LegendreP[l,m,Cos[θ]],θ]/.θ->ArcCos[μ]]

RSolve[(2l+1)μ P[l,m,μ]-((l+m)P[l-1,m,μ]+(l-m+1)P[l+1,m,μ])==0,P[l,m,μ],l]

(1-(x^2)) ((∂(LegendreP[m, x]))/(∂x))==m (LegendreP[m-1, x])-m x (LegendreP[m, x])==(m+1) x (LegendreP[m, x])-(m+1) (LegendreP[m+1, x])

RSolve[-m x P[m,x]+m P[m-1,x]==(m+1)x P[m,x]-(m+1)P[m+1,x],P[m,x],m]

TraditionalForm[id={(1-x^2)D[LegendreP[m,x],x],-m x LegendreP[m,x]+m LegendreP[m-1,x],(m+1)x LegendreP[m,x]-(m+1)LegendreP[m+1,x]}]

FullSimplify[id]

Table[id/.m->n,{n,5}]//Simplify

Sums

(∑_(k=0)^n)(({{n}, {k}})) (({{-n-1}, {k}})) (((((1-x)/2)))^k)=(Subscript[P, n])(x)

FunctionExpand[Sum[Binomial[n,k]Binomial[-n-1,k]((1-x)/2)^k,{k,0,n}]]

FullSimplify[%]

FunctionExpand[%]

FullSimplify[LegendreP[n,x]-%]

(((∑_(k=0)^n)(((({{n}, {k}})))^2) (((x-1))^(n-k)) (((x+1))^k))/(2^n))=(Subscript[P, n])(x)

1/2^n Sum[Binomial[n,k]^2(x-1)^(n-k)(x+1)^k,{k,0,n}]

FullSimplify[LegendreP[n,x]-%]

Table[(2^(-n)) (((-1+x))^n) Hypergeometric2F1[-n,-n,1,((1+x)/(-1+x))]-LegendreP[n,x],{n,0,10}]//Simplify

(((∑_(k=0)^(⌊(n/2)⌋))(((-1))^(k+n)) (({{n}, {k}})) (({{2 n-2 k}, {n}})) (x^(n-2 k)))/(2^n))=(Subscript[P, n])(x)

1/2^n Sum[(-1)^(k+n) Binomial[n,k]Binomial[2n-2k,n]x^(n-2k),{k,0,Floor[n/2]}]

FullSimplify[%,n∈Integers]

Table[((((1/(x^2))))^(n/2)) (x^n) LegendreP[n,(1/(Sqrt[(1/(x^2))]))]- LegendreP[n,x],{n,10}]//Simplify

(∑_(n=0)^∞)(((Subscript[P, n])(x) (z^n))/(n!))=(e^(x z)) (Subscript[J, 0])(z (Sqrt[1-(x^2)]))

Sum[LegendreP[n,x]/n! z^n,{n,0,∞}]

(∑_(l=n mod 2)^n)((((2 l+1) n!) (Subscript[P, l])(x))/((2^((n-l)/2)) ((n-l)/2)! (l+n+1)!!))==(x^n)

Sum[(((2l+1)n!)/((2^((n-l)/2))(((n-l)/2))!(n+l+1)!!))LegendreP[l,x],{l,Mod[n,2],n,2}]

Table[Sum[(((2l+1)n!)/((2^((n-l)/2))(((n-l)/2))!(n+l+1)!!))LegendreP[l,x],{l,Mod[n,2],n,2}],{n,0,10}]//Expand

(∑_(l=n mod 2)^n)((((2 l+1) n!) (Subscript[P, l])(x))/((2^((n-l)/2)) ((n-l)/2)! (l+n+1)!!))