I have the following two equations ($a,b,c,d,e,f,g$ are constants)
$$\frac{dx_{1}}{dt}=-a-b\sin(c-x_{2})$$
$$(d+x_{1}^{3})\frac{d^{2}x_{2}}{dt^{2}}+ex_{1}^{2}\frac{dx_{1}}{dt}\frac{dx_{2}}{dt}=f(g-x_{1}^{2})\cos (x_{2})$$
and want to integrate it numerically as an initial value problem.
Is the right way to convert this into a first order system of ordinary differential equations (for Runge Kutta integration say) to have 4 first order equations for $x_{1},dx_{1}/dt,x_{2},dx_{2}/dt$? This would mean having to differentiate the first equation above to generate $d^{2}x_{1}/dt^{2}$.
Or the right way is to have 3 first order equations for $x_{1},x_{2},dx_{2}/dt$?