Question:
Two masses $m_1$ and $m_2$, constrained to the $x$-axis, are coupled by a light spring of stiffness $s$ and natural length $l$. If $x$ is the extension of the spring and $x_1$ and $x_2$ indicate the positions of the two masses ($x_2 > x_1$), show that the equations of motion of the masses along the $x$-axis are:
$$m_1\ddot{x}_1 = sx$$ and $$m_2\ddot{x}_2 = −sx$$
and combine these to show that the system oscillates with a frequency:
$$ω = \sqrt{\frac{s}{\mu}}$$
where $\mu = \frac{m_1m_2}{m_1 + m_2}$ is the reduced mass.
Attempt: So I know $F = ma = -kx$ and acceleration is the second derivative of $x$ so $a_1 = \ddot{x}_1$ and $a_2 = \ddot{x}_2$. So that gives the first two equations: $m_1\ddot{x}_1 = sx$ and $m_2\ddot{x}_2 = −sx$ and they have different signs because they the force acts in opposite directions.
Then I know the extension of the spring $x = x_2 - x_1 - l$, so $m_1\ddot{x}_1 = s(x_2 - x_1 - l)$ and $m_2\ddot{x}_2 = -s(x_2 - x_1 - l)$, but then combining these all I seem to get is $m_1\ddot{x}_1 + m_2\ddot{x}_2 = 0$, so I'm not sure where to go from there?
So any help would be appreciated.