chopin

8 Reputation

2 Badges

18 years, 133 days

MaplePrimes Activity


These are answers submitted by chopin

What a coincidence, I'm studying quantummechanics from that book and I wanted to plot the hydrogen wave function where I needed the legendre polynomials. I did it on the following way for P(ml): restart; l:=1;m:=1; if l=0 and m=0 then P:=1 end; if (l>0 and m=0) then P:=1/((2^l)*(l!))*diff((y^2-1)^l,y$l) end;if (l>0 and m>0) then P:=((1-y^2)^abs(m/2))*diff(1/((2^l)*(l!))*diff((y^2-1)^l,y$l),y$abs(m)) end; if(l=0 and m>0) then P:=0 end;y:=cos(theta);simplify(P); actually the following P:=((1-y^2)^abs(m/2))*diff(1/((2^l)*(l!))*diff((y^2-1)^l,y$l),y$abs(m)) is enough, but then you have the problem that if l or m are zero, which means that you have the 0th derivative of a function, and that isn't accepted by maple, so that's why i use those conditions. I don't know either why the answer is sqrt(-1+cos(theta)) because I think it has to be sqrt(1-cos(theta)^2) and hence sin(theta) I think it's no misprint because on the previous pages there you see the legendre function which works out to an anwer without an imaginary part.
Page 1 of 1