Legendre陪関数
P:=(x,n,m)->(-1)^m*(1-x^2)^(m/2)*diff(1/2^n/n!*diff((x^2-1)^n,x$n),x$m);
nとmを変化させてみます。
for j from 0 to 5 do
for i from 0 to j do
print(hold(P)(x,j,i)=expand(P(x,j,i)));
end_for
end_for
グラフにしました。
for j from 0 to 5 do
for i from 0 to j do
f:=expand(P(x,j,i)):
print(hold(P)(x,j,i)=f);
plot(plot::Function2d(f,x=-1..1,Color=RGB::Blue));
end_for
end_for
Legendre陪関数も直交性があります。
hold(int(P(x,5,5)*P(x,4,3),x=-1..1))=int(P(x,5,5)*P(x,4,3),x=-1..1);
hold(int(P(x,7,5)*P(x,8,3),x=-1..1))=int(P(x,7,5)*P(x,8,3),x=-1..1);
hold(int(P(x,9,8)*P(x,9,8),x=-1..1))=int(P(x,9,8)*P(x,9,8),x=-1..1);
xの代わりにcosθとすることが多いようです。
gth:=Symbol::theta;
delete P;
P:=(gth,n,m)->(-1)^m*(1-cos(gth)^2)^(m/2)*diff(1/2^n/n!*diff((cos(gth)^2-1)^n,gth$n),gth$m);
for j from 0 to 5 do
for i from 0 to j do
f:=expand(Simplify(P(gth,i,j))):
f:=subs(f,sqrt(sin(gth)^2)=sin(gth),(sin(gth)^2)^(3/2)=sin(gth)^3,(sin(gth)^2)^(5/2)=sin(gth)^5):
print(hold(P)(gth,j,i)=f);
end_for
end_for
グラフにしました。
//θは定義済み
for j from 0 to 5 do
for i from 0 to j do
f:=expand(Simplify(P(gth,i,j))):
f:=subs(f,sqrt(sin(gth)^2)=sin(gth),(sin(gth)^2)^(3/2)=sin(gth)^3,(sin(gth)^2)^(5/2)=sin(gth)^5):
print(hold(P)(gth,j,i)=f);
plot(plot::Function2d(f,gth=-PI..PI, Color=RGB::Blue));
end_for
end_for