What is this?
Expand the Dirac delta function in a series of Legendre polynomials using the interval
-1 <= x<= 1.
thanks,
v/r,
Hints:
1) P(n,x) are orthogonal on the interval [-1,1] with int(P(n,x)^2, x=-1..1) = 2/(2*n+1)
(int doesn't seem to know this if you use LegendreP or orthopoly[P], but see the help page ?orthopoly[P])
2) LegendreP(n,0) = sqrt(Pi)/(GAMMA(1/2-n/2)*GAMMA(1+n/2)) (which is interpreted as 0 if n is an odd integer).
with(orthopoly): with(gfun): l:=[seq(int(P(i,x)^2, x=-1..1), i=1..10)]; l := [2/3, 2/5, 2/7, 2/9, 2/11, 2/13, 2/15, 2/17, 2/19, 2/21] rec:=listtorec(l,u(m)); rec := [{u(0) = 2/3, (-2 m - 3) u(m) + (2 m + 5) u(m + 1)}, ogf] rsolve(op(1,rec),u(m)): subs(m=n-1,%); 2 ------- 2 n + 1
Legendre series
Hints:
1) P(n,x) are orthogonal on the interval [-1,1] with int(P(n,x)^2, x=-1..1) = 2/(2*n+1)
(int doesn't seem to know this if you use LegendreP or orthopoly[P], but see the help page ?orthopoly[P])
2) LegendreP(n,0) = sqrt(Pi)/(GAMMA(1/2-n/2)*GAMMA(1+n/2))
(which is interpreted as 0 if n is an odd integer).
In a way it knows
with(orthopoly): with(gfun): l:=[seq(int(P(i,x)^2, x=-1..1), i=1..10)]; l := [2/3, 2/5, 2/7, 2/9, 2/11, 2/13, 2/15, 2/17, 2/19, 2/21] rec:=listtorec(l,u(m)); rec := [{u(0) = 2/3, (-2 m - 3) u(m) + (2 m + 5) u(m + 1)}, ogf] rsolve(op(1,rec),u(m)): subs(m=n-1,%); 2 ------- 2 n + 1