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?
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