Solution (source code)

= Solution

Each proposed displacement has second <derivative> $\ddot x_i=-\omega^2a_i\cos\omega t$. Matching the coefficients of the common time factor in the three equations gives
$$
\boxed{\begin{aligned}
m\omega^2a_1&=k(2a_1-a_2),\\
m\omega^2a_2&=k(-a_1+2a_2-a_3),\\
m\omega^2a_3&=k(-a_2+2a_3).
\end{aligned}}
$$
These algebraic relations hold for the entire oscillation, including the isolated times when the common <cosine> vanishes.