- #1

- 51

- 0

## Homework Statement

I have this equations of motion, I have this equations of motion for a schwarchild black hole, I wish to use the 4th order Runge-Kutta method to solve them for a body falling to the black hole from a distance r0 and with L = 0. My problem is I am struggling to apply this method to my system of ODE's so that I can program a method that can solve any system of ODE's using the formulas for RK4, I would like for someone to please run through one step of the method, so I can understand it better Thank

## Homework Equations

[/B]

\begin{eqnarray}

\frac{dt}{d\tau} &=& (1- \frac{1}{r})^{-1} \frac{E}{m c^{2}}\\

\frac{d\phi}{d\tau} &= & \dfrac{L}{mr^{2}} \\

(\dfrac{dr}{d\tau})^{2} &=& \frac{E^{2}}{m^{2} c^{4}}(1- \frac{R_{s}}{r}) \dfrac{L^{2}}{m^{2} c^{2} r^{2}}

\end{eqnarray}

\frac{dt}{d\tau} &=& (1- \frac{1}{r})^{-1} \frac{E}{m c^{2}}\\

\frac{d\phi}{d\tau} &= & \dfrac{L}{mr^{2}} \\

(\dfrac{dr}{d\tau})^{2} &=& \frac{E^{2}}{m^{2} c^{4}}(1- \frac{R_{s}}{r}) \dfrac{L^{2}}{m^{2} c^{2} r^{2}}

\end{eqnarray}

## The Attempt at a Solution

Now I know that for a general 1st order ODE's the 4th order Runge-Kutta formula's:

\begin{equation}

y_{i+1}=y_i + \frac{1}{6}(k_1+2k_2+2k_3+k_4)

\end{equation}

with

\begin{equation}

k_1 = f(t_n,y_n) \\ k_2 = f(t_n+\frac{1}{2}h,y_n+\frac{h}{2}k_1) \\ k_3 = f(t_n+\frac{1}{2}h,y_n+\frac{h}{2}k_2) \\ k_4 = f(t_n+\frac{1}{2}h,y_n+\frac{h}{2}k_3)

\end{equation}

Last edited by a moderator: