I want to plot a solution to the Geodesic equations for the Poincare disk in polar coordinates (though these may be wrong. I want to plot these as a way to check my answer):

$$\ddot{r}+\frac{2r}{1-r^2}(\dot{r})^2+\frac{4r}{1-r^2}\dot{r}\dot{\theta}-\frac{r^2+1}{2}(\dot{\theta})^2 = 0$$

$$\ddot{\theta}-\frac{2}{r(1-r^2)}(\dot{r})^2+\frac{2r^2+1}{r(1-r^2)}\dot{r}\dot{\theta} = 0$$

I solve these equations with NDSolve using some random initial values.

eqns = {r''[t] + (2*r[t])/(1 - r[t]^2)*(r'[t])^2 + (4*r[t])/(
      1 - r[t]^2)*(r'[t]*\[Theta]'[t]) - (r[t]^2 + 1)/
      2*(\[Theta]'[t])^2 == 0,
   \[Theta]''[t] - 
     2/(r[t]*(1 - r[t]^2))*(r'[t])^2 + (2*r[t]^2 + 1)/(
      r[t]*(1 - r[t]^2))*(r'[t]*\[Theta]'[t]) == 0,
   r[0] == 0.5, \[Theta][0] == 0,
   r'[0] == -0.5, \[Theta]'[0] == 0.5

sol = NDSolve[eqns, {r, \[Theta]}, {t, 20}]

Our solution is a curve parametrized by $t$ in polar coordinates. But now I don't know how to plot this curve on the plane (and if someone can help, maybe I can put this curve on top of the unit disk, though that's not my biggest priority). I tried transforming to cartesian then plotting by doing x[t_] = r[t] /. sol + Cos[\[Theta][t] /. sol] but that just returns an error. Any tips on what I should do?

EDIT: These equations are definitely wrong. I think the correct ones are (especially after verifying with some graphs)

$$\ddot{r} + \frac{2r}{1-r^2}(\dot{r})^2-\frac{r(r^2+1)}{1-r^2}(\dot{\theta})^2 = 0$$


$$\ddot{\theta}+\frac{2(r^2+1)}{r(1-r^2)}\dot{r}\dot{\theta} = 0$$


1 Answer 1


Knowing the parametrized solutions r[t] an theta[t], we can transform them to Cartesian coordinates and use ParametricPlot:

cart[t_] = r[t] {Sin[\[Theta][t]], Cos[\[Theta][t]]} /. sol[[1]];
ParametricPlot[cart[t], {t, 0, 20}]

![enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.