# How to change the system in four first order equations?

Consider the coupled spring-mass system with a frictionless table, two masses $$m_1$$ and $$m_2$$, and three springs with spring constants $$k_1, k_2$$, and $$k_3$$ respectively. The equation of motion for the system are given by:

$$m_1\frac{d^2x_1}{dt^2}=-(k_1+k_2)x_1+k_2x_2$$

$$m_2\frac{d^2x_2}{dt^2}=k_2x_1-(k_2+k_3)x_2$$

Assume that the masses are $$m_1 = 2$$, $$m_2 = \frac{9}{4}$$, and the spring constants are $$k_1=1,k_2=3,k_3=\frac{15}{4}$$.

I substitute all value in the system above, and able to get

$$\frac{d^2x_1}{dt^2}=-2x_1+\frac{3}{2}x_2$$

$$\frac{d^2x_2}{dt^2}=\frac{4}{3}x_1-3x_2$$

Then how to convert the system about into four first order equations?

To convert it into a system of four first-order ODEs, you simply define the new variables $$x_3 = \frac{dx_1}{dt} \qquad x_4 = \frac{dx_2}{dt}$$

The system then becomes

$$\frac{dx_1}{dt} = x_3 \qquad \frac{dx_2}{dt} = x_4 \qquad \frac{dx_3}{dt}=-2x_1+\frac{3}{2}x_2 \qquad \frac{dx_4}{dt}=\frac{4}{3}x_1-3x_2$$

However, I am not sure this actually helps you to solve the system. Instead, you might consider using

\begin{align} \frac{d^2x_1}{dt^2} & =-2x_1+\frac{3}{2}x_2 \tag{1}\\ \frac{d^2x_2}{dt^2} & =\frac{4}{3}x_1-3x_2 \tag{2} \end{align}

Do $$\frac{d^2}{dt^2}$$ of equation $$(1)$$:

$$\frac{d^4x_1}{dt^4} = -2\frac{d^2x_1}{dt^2}+\frac 32 \frac{d^2x_2}{dt^2}$$

Plug in the expression for $$\frac{d^2x_2}{dt^2}$$ from equation $$(2)$$:

$$\frac{d^4x_1}{dt^4} = -2\frac{d^2x_1}{dt^2}+\frac 32 \bigg(\frac{4}{3}x_1-3x_2\bigg) = -2\frac{d^2x_1}{dt^2} + 2x_1-\frac 92 x_2$$

Then use equation $$(1)$$ to plug in expression for $$x_2$$:

$$\frac{d^4x_1}{dt^4} = -2\frac{d^2x_1}{dt^2} + 2x_1-\frac 92 \bigg(\frac 23 \frac{d^2x_1}{dt^2} + \frac 43 x_1 \bigg) = -5\frac{d^2x_1}{dt^2} -4x_1$$

$$\implies \frac{d^4x_1}{dt^4}+5\frac{d^2x_1}{dt^2} + 4x_1=0$$

This is now a homogeneous ODE with constant coefficients in $$x_1$$, which can easily be solved, giving

$$x_1(t) = A\cos (2t)+B\sin (2t) + C\cos (t) + D\sin (t)$$

Plugging this back into equation $$(1)$$, we find

$$x_2(t) = -\frac 43 A\cos (2t) -\frac 43 B\sin (2t)+ \frac 23 C\cos (t) + \frac 23 D\sin (t)$$

Finally, use the initial conditions (you should have four of them) to find the constants $$A,B,C,D$$.

The matrix $$A=\pmatrix{-2&\frac32\\\frac43&-3}$$ on the right side of the system has the characteristic polynomial $$0=(q+2)(q+3)-2=q^2+5q+4=(q+4)(q+1).$$ For the eigenvalue $$q=-1$$ a left eigenvector is $$(4,3)$$ so that $$(4x_1+3x_2)''=-(4x_1+3x_2)\implies 4x_1+3x_2=a_1\cos(t)+b_1\sin(t)$$ For the eigenvalue $$q=-4$$ a left eigenvector is $$(2,-3)$$ so that $$(2x_1-3x_2)''=-4(2x_1-3x_2)\implies 2x_1-3x_2=a_2\cos(2t)+b_2\sin(2)$$ Now the solutions $$x_1$$, $$x_2$$ can be recombined and used to compare against the numerical solution of the first order system as per the other answer.