Writing a second order ODE as a system of first order ODEs