# How to numerically integrate the geodesic equations?

I'm interested in numerically solving the geodesic equations of motion for a particle in the Schwarzschild geometry. Deriving the equations is no problem but I simply have no idea how to initialise and make sense of the output here. We have 4 spacetime coordinates given by $x^\alpha = (t(\lambda),r(\lambda),\theta(\lambda),\phi(\lambda))$, where $\lambda$ is an affine parameter and $t>0, 0<r<\infty, 0<\theta<\pi$ and $0<\varphi<2\pi$. Two of the equations of motion are given by $$\frac{d \varphi}{d\lambda} = \frac{h}{r^2}, \\ \frac{dt}{d\lambda} = \frac{E}{\left(1-\frac{2GM}{c^2r}\right)},$$ where $E,h$ are the energy and the magnitude of the angular momentum. Has anyone references to numerically solving these equations? There is a Mathematica code which is very very cool but I'm more interested to do it myself as a learning exercise rather than just use this not to mention my Mathematica skills are almost as bad as my numerical.

For example, consider the second integral. After a certain number of integration steps the parameter $\lambda$ and $t$ should be different indicating time dilation. Again, I'm not really concerned with the physics of the problem more about the mathematical set-up and mainly some resources.

• If you have little experience in numerical solutions of differential equations, starting with a system of nonlinear ODEs is tough! There are many different methods you could try; perhaps looking though a book on numerical solutions to differential equations first would be good. Once you understand the ideas and how to implement them, you should then be able to apply the techniques to any ODE (or system of ODEs), such as yours. I am certainly not aware of any books that solve the geodesic equation in Schwarzschild - perhaps some journal articles? Mar 2, 2017 at 9:47
• I get your point. I am familiar with the Runge Kutta numerical integrators. I should re word the question to be more clear. It's more the initial set up of the problem and trying to understand the outut. I understand how Runge Kutta family of integrators work from the sort of standard undergrad problems we have all faced. BUT saying that I just can't wrap my head around these geodesic equations. Mar 2, 2017 at 9:52
• Have you solved a system of ODEs before? Starting with something as trivial as $$\frac{df}{dx}=g(x),\;\frac{dg}{dx}= - f(x)$$ might give you some good insight into your problem. As for resources, happy to offer a list of books that I have found useful on numerically solving differential equations, but they aren't specific to the geodesic equation. Mar 2, 2017 at 10:01
• @AloneAndConfused some resources would be great. Do you have any on solving systems of coupled DE's? I think we need to employ implicit methods for coupled DE's. Is that correct? Mar 6, 2017 at 7:06
• Will post as an answer as any reply will be too long to write as a comment! Mar 6, 2017 at 10:57