# Solving differential equation using substituion [duplicate]

I've been trying to solve an differential equation using substitution. I have the equation

(r^2 - 2 M r + a^2) D[ R[r], {r, 2}] + ((a^2 m^2 - 2 I a m (r - M))/(r^2 - 2 M r + a^2) - L (L + 1)) R[r] == 0


where $$r$$ is the variable and the rest ($$a,m,M,L$$) are constants. If we use the replacement

 {M -> (rm + rp)/2, a -> Sqrt[rm] Sqrt[rp]}


Then we can solve this equation using DSolve, the result being given by a hypergeometric function.

Now I've been following an article. Where they first use to substitution $$R(x) = (1-\frac{1}{x})^{- i Z_m} y(x)$$ with $$x = \frac{r - rp}{rp-rm}, \; Z_m = \frac{a\; m}{rp-rm}$$ which should result in a far more readable equation

$$x(x-1)^2 y''(x) - 2 i Z_m y'(x) - L(L+1)^2 y(x) = 0.$$

Is there a way to do such substitution in Mathematica?

• Note taken, I've replace $l$ with $L$. Mar 4 at 14:42
• @xzczd are you sure this is duplicate? dChange and the new DSolveChangeVariables seem to support only change of variables on the independent variable. This question is asking for change of variable on both, the dependent and also the independent variable. I could never make DSolveChangeVariables do change of variable on the dependent variable. It just does not seem to support it. Mar 4 at 15:21
• @Nasser Yeah, I'm pretty sure: mathematica.stackexchange.com/a/249783/1871 mathematica.stackexchange.com/a/270263/1871 Mar 4 at 15:44
• I think you have something note right in the transformation. I can't get DSolveChangeVariables to do it. Also the link you give sends one to paid fee page. It is better to give link to the paper where one does not need to pay to see it. This is what I tried (it is possible I made error) ode = (r^2 - 2*M*r + a^2)*D[R[r], {r, 2}] + ((a^2*m^2 - 2*I*a*m*(r - M))/(r^2 - 2*M*r + a^2) - L*(L + 1))*R[r] == 0; deq = Inactive[DSolve][ode, R, r]; zm = am/(rp - rm); Simplify[DSolveChangeVariables[deq, y, x, {R[r] == y[x]/(1 - 1/x)^(-I*zm), x == (r - rp)/(rp - rm)}]] does not give what you show Mar 4 at 16:15
• @Nasser Actually you can find some examples for dependent variable in Scope section: i.stack.imgur.com/h2OLf.png :) Mar 5 at 2:57