Runge Kutta Approach to Relativistic <PERSON> Problem
I am attempting to solve the relativistic <PERSON> problem using fourth order Runge - Kutta, however I am having trouble and am unsure why I simply cannot get the correct orbits no matter how I adjust the initial values. My orbits are not even incorrect but they are nonsensical, I was wondering if there are issues with the Runge - Kutta algorithm when solving such probelms? The geodesic equations in Schwarzschild spacetime (in geometric units) are:
\begin{align} &\frac{d^2r}{d\tau^2} = \frac{M}{r(r - 2M)} \left(\frac{dr}{d\tau}\right)^2-\frac{M(r - 2M)}{r^3} \left(\frac{dt}{d\tau}\right)^2 + (r - 2M) \left(\frac{d\phi}{d\tau}\right)^2 \[0.5em] &\frac{d^2t}{d\tau^2} = - \frac{2M}{r(r - 2M)} \frac{dr}{d\tau} \frac{dt}{d\tau} \[0.5em] &\frac{d^2\phi}{d\tau^2} = - \frac{2}{r} \frac{dr}{d\tau} \frac{d\phi}{d\tau} \end{align}
We can convert the above to a system of 6 1st order ODE's by setting: \begin{align} y_1 = r \[0.5em] y_2 = \frac{dr}{d\tau} \[0.5em] y_3 = \phi \[0.5em] y_4 = \frac{d\phi}{d\tau} \[0.5em] y_5 = t \[0.5em] y_6 = \frac{dt}{d\tau} \end{align}
So then, we obtain 6 1st order ODEs which can be solved using the fourth order Runge - Kutta. For example, I tested my code on mercury with the following parameters (geometrized units): \begin{align} &\text{Mass of sun: } 1474 m \[0.5em] &\text{Mecury radius at perihelion: } 46.002\times 10^9 m \end{align}
I am not sure about the initial values for the Runge Kutta so I tried a range such as $$ [y_1(0), y_2(0), y_3(0), y_4(0), y_5(0), y_6(0)] = [46.002\times 10^9, 0, 0, 1\times 10^{-16}, 0, 1] $$ Despite the range of initial values i have tried, I cannot seem to get even a decent orbit.
Is there a problem with using Runge - Kutta to solve these equations or should there be a more deterministic way to obtain the initial values? 394