Consider two-body central force problem in polar co-ordinates $r,\theta$.

Corresponding 2nd order differential equation is obtained by using conservation of angular momentum. This equation is :

$\frac{d^2 r}{dt^2}=\frac{l^2}{m^2r^3}−\frac{GM}{r^2}$

$r(t)$ is the radial position of particle (of mass m) as a function of time $t$. $l$ is angular momentum which is constant. $G$ is gravitational constant and $M$ is mass of the heavier body, assumed to be at rest at the origin of co-ordinate system i.e. at $(r,\theta)=(0,0)$

I want to solve above non-linear differential equation; it is non-linear since dependent variable $r$ has powers -3 and -2 on RHS.

Can I use 4-order Runge-Kutta method to solve this equation ?

Extra Note: Actually we have two different 2-order differential equations (coupled) : one for $r$ and another for $\theta$. Conservation of angular momentum de-couples them and reduces to one equation given above. Also if we try to solve the above 1-Dim equation analytically, we end up with a solution of the form $t(r)$ i.e. time is function of $r$. So we have to invert that into $r(t)$. This inversion process can be extremely difficult in practice. Please see standard textbook on classical mechanics e.g. by Goldstein (Chapter 3).

Here Initial conditions should be on $r$ and $dr/dt$, if we want to solve numerically. But if we want to solve analytically we need initial conditions as Total Energy and Angular momentum of the mass $m$. I am confused here: do I need use all initial conditions i.e. energy, angular momentum, $r(t=0)$ and $dr/dt$ at t=0 ?


1 Answer 1


Yes, Runge-Kutta can be used to solve an initial value problem for a system of differential equations. A second order system can be rewritten as a first-order system in terms of the dependent variables and their derivatives. The Runge-Kutta formulas for a system are the same as for a single differential equations (just write a vector $X(t)$ instead of the scalar $x(t)$).

  • $\begingroup$ I know that 2nd order differential eq. can be converted into two 1st order differential equations. I am asking whether RK method can be used to solve any non-linear differential equation. $\endgroup$
    – atom
    Mar 7, 2017 at 7:50
  • 2
    $\begingroup$ Yes, it can. That is, for any $T$ and $\epsilon > 0$, with a sufficiently small step size the RK result will be within $\epsilon$ for $0 \le t \le T$. However, for a "stiff" equation you may need very small step size. $\endgroup$ Mar 7, 2017 at 8:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .