When we are solving initial value problems, we usually need to write these as sets of first order equations, because most of the program packages require this.
Example: \( y''(x)+y(x)=0,\ y(0)=a_0,\ y'(0)=b_0 \)
We may for instance write this equation in a system as follows, $$ \begin{align*} y'(x)=&g(x)\\ g'(x)=&-y(x)\\ y(0)=&a_0,\ g(0)=b_0 \end{align*} $$
Another example: $$ \begin{align*} &y'''(x)+2y''(x)-(y'(x))^2+2y(x)=x^2\\ &y(0)=a_0,\ y'(0)=b_0,\ y''(0)=c_0 \end{align*} $$ We set \( y'(x)=g(x) \) and \( y''(x)=g'(x)=f(x) \), and the system may be written as $$ \begin{align*} y'(x)=&g(x)\\ g'(x)=&f(x)\\ f'(x)=&-2f(x)+(g(x))^2-2y(x)+x^2 \end{align*} $$ with initial values \( y(0)=a_0,\ g(0)=b_0,\ f(0)=c_0 \).
This is fair enough for hand calculations, men when we use program packages a more systematic procedure is needed. Let's use the equation above as an example.
We start by renaming \( y \) to \( y_1 \). We then get the following procedure: $$ \begin{align*} y&'=y'_1=y_2\\ y&''=y''_1=y'_2=y_3 \end{align*} $$ The system may then be written as $$ \begin{align*} y'_1(x)=&y_2(x)\\ y'_2(x)=&y_3(x)\\ y'_3(x)=&-2y_3(x)+(y_2(x))^2-2y_1(x)+x^2 \end{align*} $$ with initial conditions \( y_1(0)=a_0,\ y_2(0)=b_0,\ y_3(0)=c_0 \).
The general procedure to reduce a higher order ODE to a system of first order ODEs becomes the following:
Given the equation $$ \begin{align} \tag{10} &y^{(m)}=f(x,y,y',y'',\dots,y^{(m-1)})\\ &y(x_0)=a_1,\ y'(x_0)=a_2,\ \dots,y^{(m-1)}(x_0)=a_m \nonumber\\ \end{align} $$ where $$ \begin{align*} y^{(m)}\equiv \frac{d^my}{dx^m} \end{align*} $$ with \( y=y_1 \), we set $$ \begin{align} &y'_1=y_2 \nonumber \\ \nonumber &y'_2=y_3\\ \nonumber &.\\ \nonumber &.\\ \nonumber &y'_{m-1}=y_m\\\nonumber\\\nonumber &y_1(x_0)=a_1,y_2(x_0)=a_2,\dots,y_m(x_0)=a_m \tag{11} \end{align} $$
Write the following ODE as a system of first order ODEs: $$ \begin{align*} y'''-y'y''-(y')^2+2y=x^3 \\ y(0)=a,\ y'(0)=b,\ y''(0)=c \end{align*} $$
First we write \( y'''=y'y''+(y')^2-2y+x^3 \).
By use of (11) we get $$ \begin{align*} &y_1'=y_2\\ &y_2'=y_3\\ &y_3'=y_2y_3+(y_2)^2-2y_1+x^3\\ &y_1(0)=a,\ y_2(0)=b,\ y_3=c \end{align*} $$