Differential Equations Question involving a spring-mass system I'm working through a Differential Equations book and came across a question that puzzles me:
"Consider a spring-mass system where there are two masses connected in series by springs, with each spring having a different constant ($k_1$ and $k_2$)" (set up like this):
|<><>($m_1$)<><>($m_2$)
Where $m_1$ and $m_2$ are the masses, and $k_1$ and $k_2$ would be the spring constants. The position of each mass is given by $x_1$ and $x_2$.
It asks to show that (using $F=ma$) the system can be described by this pair of DEs:
\begin{align}
m_1\ddot{x}_1 &= -(k_1+k_2)x_1 + k_2x_2\\
m_2\ddot{x}_2 &= k_2x_1 - k_2x_2
\end{align}
and then reduce these to a single equation for the position of mass 2 ($x_2$).
Any suggestions on how to get these equations? Been a while since my Physics days but I think it's primarily a mathematics question. Thanks in advance
 A: To get to your first to equation, we need to examine the free body diagram for each mass.  For mass one, when we displace it by $x_1$ (to the right), $k_1$ acts in the opposite direction. As this is occurring, $m_1$ is pushing into spring $k_2$ which causes $k_2$ to push back against $m_1$.  Since $k_2$ is pushing against $m_1$, it is also pushing against $m_2$ in the opposite direction (to the right) by $x_2$.  That is,
$$
m_1\ddot{x}_1 = -k_1x_1 - k_2x_1 + k_2x_2 = -(k_1 + k_2)x_1 + k_2x_2
$$
Now when we displace $m_2$ by $x_2$ (to the right), we have $k_2$ pulling back and then pulling (to the right) $m_1$ by $x_1$ so
$$
m_2\ddot{x}_2 = -k_2x_2 + k_2x_1
$$

For the next part, do you not have initial conditions or is there a forcing $f(t)$?  If not, we can only go to as far as I have gotten.
What I would do next is take the Laplace Transform of both DE (under assumptions of zero IC).
$$
F(s) = \int_0^{\infty}f(t)e^{-st}dt
$$
The Laplace transform of both are
\begin{align}
m_1s^2X_1(s) &= -(k_1 + k_2)X_1(s) + k_2X_2(s)\tag{1}\\
m_2s^2X_2(s) &= -k_2X_2(s) + k_2X_1(s)\tag{2}
\end{align}

If we have IC or a forcing function $f(t)$ we could continue in such a manner.
We can solve equation (1) for $X_1(s) = \frac{k_2X_2(s)}{m_1s^2 + k_1 + k_2}$ which can then plug into equation (2).
$$
m_2s^2X(s) = -k_2X(s) + \frac{k_2^2}{m_1s^2 + k_1 + k_2}X(s)\tag{3}
$$
Now, we need IC or $f(t)$.

With zero initial conditions and no driving force, we can solve equation (3) as is; that is,
$$
X_2(s)\bigg[m_2s^2 + k_2 - \frac{k_2^2}{m_1s^2 + k_1 + k_2}\bigg] = 0\tag{4}
$$
Then we have $X_2(s) = 0\Rightarrow\mathcal{L}^{-1}(X_2(s)) = \mathcal{L}^{-1}(0)$ which is
$$
x_2(t) = 0
$$
A: Assume that $\xi_i$ denotes the position of mass $m_i$ with respect to the wall where the sequence of springs is attached. Thus, the elongation of the first spring is $\Delta \ell_1 = \xi_1 - L_1$, where $L_1$ is the length of the spring at rest. Similarly, $\Delta \ell_2 = \xi_2 - \xi_1 - L_2$. Thus, the forces $F_i = -k_i \Delta \ell_i$ at the end of each spring are
\begin{aligned}
F_1 &= -k_1 (\xi_1 - L_1),\\
F_2 &= -k_2 (\xi_2 - \xi_1 - L_2) .
\end{aligned}
Using Newton's laws, we find
\begin{aligned}
m_1 \ddot \xi_1 &= F_1 - F_2 = -k_1 (\xi_1 - L_1) + k_2 (\xi_2 - \xi_1 - L_2),\\
m_2 \ddot \xi_2 &= F_2 = - k_2 (\xi_2 - \xi_1 - L_2) .
\end{aligned}
At equilibrium $\ddot \xi_i = 0$, we find the equilibrium positions $\bar\xi_1=L_1$ and $\bar\xi_2=L_1+L_2$, i.e.
\begin{aligned}
0 &= -k_1 (\bar \xi_1 - L_1) + k_2 (\bar \xi_2 - \bar \xi_1 - L_2),\\
0 &= - k_2 (\bar \xi_2 - \bar \xi_1 - L_2) .
\end{aligned}
Subtraction from the above differential system and introduction of $x_i = \xi_i - \bar \xi_i$ yields the desired system.
Alternatively, one could start by introducing $x_i$, the displacement of mass $m_i$ from its equilibrium position. Thus, the elongation of the first spring is $\Delta \ell_1 = x_1$, and the elongation of the second spring is $\Delta \ell_2 = x_2-x_1$. Application of Newton's laws with $F_i=-k_i\Delta \ell_i$ yields directly the system
\begin{aligned}
m_1 \ddot x_1 &= -(k_1+k_2) x_1 + k_2 x_2 ,\\
m_2 \ddot x_2 &= - k_2 (x_2 - x_1) .
\end{aligned}
Note also that
$M\ddot X + K X = 0$
with
$$
M=\begin{bmatrix}
m_1 & 0 \\
0& m_2
\end{bmatrix},\qquad
K=\begin{bmatrix}
k_1+k_2 & -k_2\\
-k_2 & k_2
\end{bmatrix}
$$
and $X = (x_1,x_2)^\top$.
Unless additional assumptions are made, it might not be an easy task to decouple these equations. In fact, if the motion is assumed periodic in time, say $X \propto \text{e}^{\text i \omega t}$, then $(K-\omega^2 M) X = 0$. Diagonalization leads to the eigenvalues $\omega_i^2$ (related to the resonance frequencies $\omega_i/(2\pi)$ in Hz) and to the eigenvectors $X_i$ (normal modes). However it appears that $X = (0,1)^\top$ does not satisfy the above algebraic equation for any $\omega$, and therefore the component $x_2$ cannot be decoupled from the system.
One could assume that $m_1 \ll m_2$ so that the first mass is at equilibrium. This way, we get $x_1 = \frac{k_2}{k_1+k_2} x_2$ and
$$
m_2 \ddot x_2 = -K_\text{eq} x_2, \qquad K_\text{eq} = \frac{k_1k_2}{k_1+k_2}.
$$
Here, we have introduced the spring of stiffness $K_\text{eq}$ which is equivalent to the sequence of springs with stiffness constants $k_1$, $k_2$. One observes that the relationship $$
\frac{1}{K_\text{eq}} = \frac{1}{k_1} + \frac{1}{k_2}
$$
is satisfied.
