Solution to Associate Legendre's Eq

  • Context: Mathematica 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Associate
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
member 428835
Hi PF!

I'm trying to find solutions to $$g''(\theta) + \cot\theta g'(\theta) +\left( 2-\frac{m^2}{\sin\theta}\right)g(\theta)=0 : m\in\mathbb N\\
g'(\pi/2) = 0.$$

I input this into Mathematica as
Matlab:
DSolve[{g''[\[Theta]] +
     Cot[\[Theta]] g'[\[Theta]] + (2 - m^2/
        Sin[\[Theta]]^2) g[\[Theta]] == 0, g'[\[Pi]/2] == 0},
  g[\[Theta]], \[Theta]] // FullSimplify
(with ##m## being cleared) and output is a linear combination of the first and second associated Legendre polynomials. If you plot the output (ignoring the constant from integration) from ##[0,\pi/2]## we see this only gives non-trivial solutions for ##m=1##.

However, if I specify ##m## beforehand Mathematica outputs a good solution, but it does not output a solution as a function of ##m## for all ##m\geq 2##. I know one has to exist. Does anyone know the solution and also how to find it in Mathematica?
 
Physics news on Phys.org
The associated Legendre equation reads,
$$g''(\theta)+\cot(\theta)g'(\theta)+[l(l+1)-m^2\frac{1}{\sin^2\theta}]g(\theta)=0,$$ where ##m=-l,-l+1,...,l##.
So, in your case you have ##l=1##. The solutions are as you found the associated legendre polynomials. However, I cannot see why you want the solutions for other values of ##m##. It doesn't make sense. For general values of ##m##, I don't think you will have a analytical solution.
You can of course still solve it numerically. In Mathematica, I guess you can use NDSolve or ParametricNDSolve. The routine you used, I believe is for analytical solutions.