Solution (source code)

= Solution

To find the <two-mass three-spring normal modes>, choose both displacements positive to the right, measured from <mechanical equilibrium>. The middle <spring>'s extension changes by $x_2-x_1$. <Hooke's law> and <Newton's second law> therefore give
$$
m_1\ddot x_1=-kx_1+k(x_2-x_1)=-2kx_1+kx_2,\qquad
m_2\ddot x_2=-kx_2-k(x_2-x_1)=kx_1-2kx_2.
$$
In a <normal mode> both displacements have the same <angular frequency>: take $x_j=A_j\cos(\omega t+\phi)$. A nonzero amplitude <vector> exists when the <determinant> vanishes:
$$
\begin{vmatrix}2k-m_1\omega^2&-k\\-k&2k-m_2\omega^2\end{vmatrix}=0,
\qquad m_1m_2\omega^4-2k(m_1+m_2)\omega^2+3k^2=0.
$$
Writing $D=\sqrt{m_1^2-m_1m_2+m_2^2}$, the two <angular frequencies> are
$$
\boxed{\omega_\pm=\sqrt{\frac{k}{m_1m_2}(m_1+m_2\pm D)}.}
$$
The corresponding <eigenvectors> can be specified by
$$
\frac{A_2}{A_1}=\frac{2k-m_1\omega_\pm^2}{k}
=\frac{m_2-m_1\mp D}{m_2}.
$$
Since $D>|m_2-m_1|$ for positive masses, the lower <normal mode> $\omega_-$ has $A_2/A_1>0$: both bodies move in the same direction at any instant. The higher <normal mode> $\omega_+$ has $A_2/A_1<0$: they move in opposite directions. Their amplitudes are generally unequal. For the useful check $m_1=m_2=m$, these reduce to $\omega_-=\sqrt{k/m}$ with $A_2=A_1$, and $\omega_+=\sqrt{3k/m}$ with $A_2=-A_1$. Each <angular frequency> has units $\mathrm{rad\,s^{-1}}$.