# For second-order ODE, why do we only assign state variables for $\dot q, q$?

Suppose we are given an ODE of a system, for example, a mass spring damper:

$$m\ddot q + \dot q + q = u$$

We may think of $q$ as position, $\dot q$ as the velocity, $\ddot q$ as the acceleration.

Why is it that we only assign states to $q$ and $\dot q$, i.e., letting $x_1 = q$ and $x_2 = \dot q$, instead of letting letting $x_1 = q$ and $x_2 = \dot q$ and $x_3 = \ddot q$?

Is it not that the acceleration is a "state" of the system? If not, then why should the other two variables be the state?

I'm watching a video on Youtube where they attempt to assign state variables to a swinging pendulum, and the video says, in which I paraphrase:

"since kinetic energy and potential energy depends on position and velocity, therefore it makes sense to assign these as state variables."

I'm looking for a more precise way of stating the above quote.

• If we use three states then what would be $\dot{x}_3$ in $\dot{\vec x}= A \vec x$? – Math Lover Dec 22 '17 at 4:15
• If our goal is to rewrite the ODE as a system of first-order ODEs, then introducing $x_3$ would be unhelpful. – littleO Dec 22 '17 at 4:19

Quick answer: from the equation, once you get $q=x_1$, $\dot{q}=x_2$, then $\ddot{q}$ will be given by $$\ddot{q}=\frac{u-q-\dot{q}}{m}=\frac{u-x_1-x_2}{m},$$ due to the consistency. Therefore you actually have all the information of position, velocity and accerleration automatically.
Note that when we assign $x_1=q$ and $x_2=q'$, we can reduce the problem to a one dimensional differential equation: $$\frac{d}{dt} \begin{bmatrix} q \\ q' \end{bmatrix} = \begin{bmatrix} q' \\ \frac{1}{m} u - q - q' \end{bmatrix}$$ So to reduce to a first order ODE, we do these assignment of variables. When we solve this 2D system of 1st order ODE, we can plot them: $q$ vs $q'$, or $q'$ vs $t$, etc. This last plot, we can find the slopes, and we will get the acceleration $q''$. If we solve the ODE, we know everything. But if we assign $x_3 = q''$ we can't reduce it down to 1st order ODE.