Solve differential equation $\left((1-x^2)\frac{d^2}{dx^2}-2x\frac{d}{dx}-\frac{n^2}{1-x^2}\right)y(x)=0$ I have to solve the differential equation
$$\left((1-x^2)\frac{d^2}{dx^2}-2x\frac{d}{dx}-\frac{n^2}{1-x^2}\right)y(x)=0$$
In order to solve above differential equation I have substitution i.e. if we let
$$z=\ln\frac{1+x}{1-x}$$
This substitution can solve the above differential equation,but I don't know how we suppose this substitution, and what is basic concept behind this substitution.
Is there any best method to solve this differential equation (any other substitution), if I face any other such type of differential equation?
 A: If it helps, your equation is of Sturm-Liouville form $\frac{d}{dx}[(1-x^2)\frac{dy}{dx}] - \frac{n^2}{1-x^2}y = 0$. This can be seen by applying the integrating factor approach to the first two terms of the equations, and seeing that $(1-x^2)$ is exactly the integrating factor. There is an entire theory devoted to solving exactly this kind of equations.
https://en.wikipedia.org/wiki/Sturm%E2%80%93Liouville_theory
Sorry, I've never seen a substitution for the parameter variable used for an ODE solution. Surely, to see this clearly the equation needs to be transformed, and that is already half of the solution. I suspect this is one of those olympiad problems, where somebody discovered this approach by accident, without using it within any formal solution protocol, and then used to troll poor students
A: If you assume the form $$
y(x) = \sum_{k=0}^\infty a_k x^k
$$
and assume $a_0=0$, and $a_1=q$ for some constant $q$. Then the solution follows that $a_{2n}=0$ and otherwise 
$$
a_k = \frac{q P_{k-1}(n)}{k!}
$$
with
$$
P_0(n)=1\\
P_2(n)=(2+n^2)\\
P_4(n)=(24+20n^2+n^4)\\
P_6(n)=(720+784n^2+70n^4+n^6)\\
\cdots
$$
the coeffieicients of the temrs in the $P_k(n)$ seem to be wholly descibed by the table A111594 in the OEIS. These coefficients are made by even powers on the exponential generating functions
$$
\frac{\tanh^{-2k-1}(x)}{(2k+1)!}
$$
