(1)\(\displaystyle \ddot r= \frac{k}{m}(1-r)+r \dot \theta ^2 + r \dot \phi ^2 \sin (\theta) + g\cos (\theta)\).

(2)\(\displaystyle \ddot \phi = -2 \dot \phi \left [ \frac{\dot r}{r} - \dot \theta \cot (\theta) \right ]\).

(3)\(\displaystyle \ddot \theta =\dot \phi ^2 \sin (\theta) \cos (\theta) -\frac{2 \dot r \dot \theta}{r} - \frac{g}{r} \sin (\theta)\).

With the initial conditions: \(\displaystyle r(0)=1\), \(\displaystyle \phi (0)=-\frac{\pi}{2}\), \(\displaystyle \theta (0)=\frac{\pi}{2}\).

And \(\displaystyle \dot r(0)=-\frac{1}{2}\), \(\displaystyle \dot \phi (0)=0\), \(\displaystyle \dot \theta (0)= \pi\).

One may assume that k, m and g are given. I want to get numerical values for \(\displaystyle r(t_i)\), \(\displaystyle \phi (t_i)\) and \(\displaystyle \theta (t_i)\) for a certain number of \(\displaystyle t_i\).

My problem is that they're second order DE's, while Euler's method and Runge-Kutta's work for first order DE. So I think I should reduce the order of the equations I have. How should I tackle this problem? A numerical integration? If so, I guess the error will be terribly big because I'd start to use Euler's method from an already "erroneous" function.

So I'm stuck at solving these equation. Any help is greatly appreciated as usual.