[Math] The Runge – Kutta method and two-body problem

initial-value-problemsnumerical methodsrunge-kutta-methods

Is it possible to get an approximation of the two body problem:
$$\left\{\begin{array}{lll}
x''(t)=-\frac{x}{(x^2+y^2)^{3/2}}, & x(0)=1-\varepsilon, &x'(0)=0\\
y''(t)= -\frac{y}{(x^2+y^2)^{3/2}}, & y(0)=0,& y'(0)=\sqrt{(1+\varepsilon)(1-\varepsilon)}
\end{array}\right.$$
with $\varepsilon = 0.0167$ by the Runge-Kutta fourth order method?

I think that it is not possible because the Runge-Kutta method can only solve equations of first order derivative:
$$\left\{\begin{array}{lll}
y'=f(t,y)\\
y(0)=y_0
\end{array}\right.$$

Many thanks!

Best Answer

I think you can do it with vectors. Define $$\mathbf{v} = \left( \begin{matrix} x & y & x' & y' \end{matrix} \right)^T$$ and set up Runge-Kutta method in the form $$\mathbf{v}' = f(t, \mathbf{v})$$