0
$\begingroup$

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?

$\endgroup$
13
  • 1
    $\begingroup$ Note taken, I've replace $l$ with $L$. $\endgroup$
    – Nitaa a
    Mar 4 at 14:42
  • $\begingroup$ @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. $\endgroup$
    – Nasser
    Mar 4 at 15:21
  • 1
    $\begingroup$ @Nasser Yeah, I'm pretty sure: mathematica.stackexchange.com/a/249783/1871 mathematica.stackexchange.com/a/270263/1871 $\endgroup$
    – xzczd
    Mar 4 at 15:44
  • 1
    $\begingroup$ 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 $\endgroup$
    – Nasser
    Mar 4 at 16:15
  • 1
    $\begingroup$ @Nasser Actually you can find some examples for dependent variable in Scope section: i.stack.imgur.com/h2OLf.png :) $\endgroup$
    – xzczd
    Mar 5 at 2:57

0