All of the standard methods for solving ordinary differential equations are intended for first order equations. For this reason, it is inconvenient to solve higher order equations numerically. However, most higher-order differential equations that occur in applications can be converted to a system of first order equations and that is what is usually done in practice.
Suppose that an \(n\)-th order equation can be solved for the \(n\)-th derivative, i.e. it can be written in the form
\begin{equation*}
x^{(n)}= f\left(t,x,\dot{x},\ddot{x}, \ldots, \frac{d^{n-1}x}{dt^{n-1}}\right)\text{.}
\end{equation*}
Then it can be converted to a first-order system by this standard change of variables:
\begin{equation*}
\begin{split}y_{1}&= x\\ y_{2}&= \dot{x}\\&\vdots \\ y_{n}&= x^{(n-1)}= \frac{d^{n-1}x}{dt^{n-1}}\end{split}\text{.}
\end{equation*}
The resulting first-order system is
\begin{equation*}
\begin{split}\dot{y}_{1}&= \dot{x}= y_{2}\\ \dot{y}_{2}&= \ddot{x}= y_{3}\\&\vdots \\ \dot{y}_{n}&= x^{(n)}= f(t,y_{1},y_{2},\ldots,y_{n})\end{split}\text{.}
\end{equation*}
In vector form this is simply \(\dot{\yb}=\fb(t,\yb)\) with \(f_{i}(t,\yb)=y_{i+1}\) for \(i<n\) and \(f_{n}(t,\yb)=f(t,y_{1},y_{2},\ldots,y_{n})\text{.}\)
For the example of the pendulum
(4.1.1) the change of variables has the form
\begin{equation*}
\begin{split}y_{1}&= \theta\\ y_{2}&= \dot{\theta}\end{split}\text{,}
\end{equation*}
and the resulting equations are
\begin{equation}
\begin{split}\dot{y}_{1}&= y_{2}\\ \dot{y}_{2}&= -c y_{2} - \omega \sin(y_{1}) + a \sin(\Omega t)\end{split}\text{.}\tag{4.1.2}
\end{equation}
In vector form this is
\begin{equation*}
\dot{\yb}=\left(\begin{array}{c}y_2 \\ -c y_2 - \omega \sin(y_1) + a \sin(\Omega t)\end{array} \right)\text{.}
\end{equation*}
The initial conditions are converted to
\begin{equation*}
\yb(0) = \left(\begin{array}{c}y_1(0) \\ y_2(0)\end{array} \right) = \left(\begin{array}{c}\theta_0 \\ v_0\end{array} \right)\text{.}
\end{equation*}
As stated above, the main reason we wish to change a higher order equation into a system of equations is that this form is convenient for solving the equation numerically. Most general software for solving ODEs (including MATLAB) requires that the ODE be input in the form of a first-order system. In addition, there is a conceptual reason to make the change. In a system described by a higher order equation, knowing the position is not enough to know what the system is doing. In the case of a second order equation, such as the pendulum, one must know both the angle and the angular velocity to know what the pendulum is really doing. We call the pair
\((\theta, \dot{\theta})\) the state of the system. Generally in applications the vector
\(\yb\) is the state of the system described by the differential equation.