# Converting second order non linear differential equations to first order systems

I have been asked to "convert the pair of second order differential equations (9), (10) into a system of 4 first order ordinary differential equations". The equations (9) and (10) are as follows:

$$\ddot z= -\frac{-GM_E}{(r_0+z)^2} + (r_0+z)(\omega_0+\dot \phi)^2 + \frac{F_r}{m}$$ and $$\ddot \phi = -2 \frac{(\omega_0+\dot\phi)\dot z}{r_0+z}+\frac{F_\theta}{m(r_0+z)}$$

I assume this will involve something to do with setting say $f=\dot z$ and $g=\dot\phi$ as that's what you would do in the linear case, but I'm not sure where to go from here.

Let:

$z = x_1$

$z' = x_1' = x_2$

$z'' = x_1'' = x_2' = -\dfrac{-GM_E}{(r_0+x_1)^2} + (r_0+x_1)(\omega_0+x_4)^2 + \dfrac{F_r}{m}$

$\phi = x_3$

$\phi' = x_3' = x_4$

$\phi'' = x_3'' = x_4' = -2 \dfrac{(\omega_0+x_4)x_2}{r_0+x_1}+\dfrac{F_\theta}{m(r_0+x_1)}$

So now, we have a system of four-first order ordinary differential equations with $x_1', x_2', x_3', x_4'$.

You have solved it yourself: in your own notations,

$$\dot z = f \\ \dot \phi = g \\ \dot f = -\frac{-GM_E}{(r_0+z)^2} + (r_0+z)(\omega_0 + g)^2 + \frac{F_r}{m} \\ \dot g = -2 \frac{(\omega_0 + g)f}{r_0+z}+\frac{F_\theta}{m(r_0+z)} .$$

(Note that the system is not linear.)