$ \dfrac{d}{dz} \left \{ (1-z^2)P'(z) \right\} + \left\{ \beta - \dfrac{m^2}{1-z^2} \right\}P(z) = 0 $ Conversion of the DE into other forms. I guess it's a bit related to physics, but the doubt is in the mathematical part.  I was just watching some stuff on Quantum Mechanics for the solution of the Hydrogen atom.
The lecture ends at..
$$ \dfrac{d}{dz} \left \{ (1-z^2)P'(z) \right\} + \left\{ \beta - \dfrac{m^2}{1-z^2} \right\}p(z) = 0 \tag{*}$$
And the next one starts after missing a few minutes at:
$$ Let \, P(z) = (1-z^2)^{|m|/2}G(z) $$
And $(*)$ changes to:
$$ (1-z^2)G''(z) - 2 (|m|+1)z G'(z) + \{ \beta - |m|(|m|+1)\}G(z) = 0 $$
How?
The closest I get is:
$$ (1-z^2)P''(z) - 2z P'(z) + \{ \beta - \dfrac{m^2}{1-z^2} \}P(z) = 0 $$
Can anyone show that to me?
A double derivative of $P$ is a very lengthy polynomial and seems of no use to me.
My approach was to eliminate the power $|m|/2$ and to get the constants in the form $\beta - |m|(|m|+1)$ but no order of the derivative is useful here.
Any help is appreciated.
 A: Let $P(z) = (1-z^2)^{|m|/2}G(z)$
So $P'(z)=(1-z^2)^{|m|/2}G'(z)-|m|z(1-z^2)^{|m|/2-1}G(z)$
and $P''(z)=(1-z^2)^{|m|/2}G''(z)-2|m|z(1-z^2)^{|m|/2-1}G'(z)-|m|(1-z^2)^{|m|/2-1}G(z)+2|m|(|m|/2-1)(1-z^2)^{|m|/2-2}z^2G(z)$
Given equation is 
$\dfrac{d}{dz} \left \{ (1-z^2)P'(z) \right\} + \left\{ \beta - \dfrac{m^2}{1-z^2} \right\}p(z) = 0 \tag{*}$
$\implies (1-z^2)P''(z)-2zP'(z)  + \left\{ \beta - \dfrac{m^2}{1-z^2} \right\}p(z) = 0 $
Putting the values of $~P(z)~$,$~P'(z)~$and $~P''(z)~$ in $(*)$ we have,
$ (1-z^2)\left\{(1-z^2)^{|m|/2}G''(z)-2|m|z(1-z^2)^{|m|/2-1}G'(z)-|m|(1-z^2)^{|m|/2-1}G(z)+2|m|(|m|/2-1)(1-z^2)^{|m|/2-2}z^2G(z)\right\}-2z\left\{(1-z^2)^{|m|/2}G'(z)-|m|z(1-z^2)^{|m|/2-1}G(z)\right\}  + \left\{ \beta - \dfrac{m^2}{1-z^2} \right\}\left\{(1-z^2)^{|m|/2}G(z)\right\} = 0$
$\implies (1-z^2)^{|m|/2+1}G''(z)-2|m|z(1-z^2)^{|m|/2}G'(z)-|m|(1-z^2)^{|m|/2}G(z)+2|m|(|m|/2-1)(1-z^2)^{|m|/2-1}z^2G(z)-2z(1-z^2)^{|m|/2}G'(z)+2|m|z^2(1-z^2)^{|m|/2-1}G(z)  + \left\{ \beta - \dfrac{m^2}{1-z^2} \right\}(1-z^2)^{|m|/2}G(z) = 0$
Taking common the term $~(1-z^2)^{|m|/2}~$ from the whole equation and eliminating we have , we have 
$(1-z^2)G''(z)-2|m|zG'(z)-|m|G(z)+2|m|(|m|/2-1)(1-z^2)^{-1}z^2G(z)-2zG'(z)+2|m|z^2(1-z^2)^{-1}G(z)  + \left\{ \beta - \dfrac{m^2}{1-z^2} \right\}G(z) = 0$
$\implies (1-z^2)G''(z)-2(|m|+1)zG'(z)+\left[-|m|+2|m|(|m|/2-1)(1-z^2)^{-1}z^2+2|m|z^2(1-z^2)^{-1}+ \left\{ \beta - \dfrac{m^2}{1-z^2} \right\}\right]G(z)= 0$
$\implies (1-z^2)G''(z) - 2 (|m|+1)z G'(z) + \{ \beta - |m|(|m|+1)\}G(z) = 0$
