Change of coordinates of Lagrangian 
Consider the system above ($m_1$, $m_2$, and $m_3$ are connected by springs of stiffnesses $k_1$ and $k_2$, respectively. Also, $m_1 \neq m_2 \neq m_3$). The Lagrangian is 
$$L(x_{1},x_{2},x_{3},\dot x_{1},\dot x_{2},\dot x_{3},t) = \frac{1}{2}m_{1}(\dot x_{1})^2+\frac{1}{2}m_{2}(\dot x_{2})^2+\frac{1}{2}m_{3}(\dot x_{3})^2 - \frac{1}{2}k(x_{2}-x_{1})^2-\frac{1}{2}k(x_{3}-x_{2})^2 $$
However, I am required to change variables, in order to avoid crossed terms. I've solved the two masses problem previously, having obtained $q_{1}(x_{1},x_{2}) = x_{2}-x_{1}$ and $q_{2}(x_{1},x_{2}) = m_{1}x_{1}+m_{2}x_{2}$,  which did the job. Hence, I tried to apply the same logic to this problem ($q_{1}(x_{1},x_{2},x_{3}) = x_{2}-x_{1}$, $q_{2} (x_{1},x_{2},x_{3}) = x_{3}-x_{2}$ and $q_{3}(x_{1},x_{2},x_{3}) = m_{1}x_{1}+m_{2}x_{2}+m_{3}x_{3}$), which did not eliminate the crossed terms completely. My question is, is there any kind of logic/physical meaning to these changes of variables or is this a 'trial and error' kind of process?  
 A: You should make a change of variables to the center of mass reference frame. The center of mass as you should know has coordinates $$R=\frac{m_1r_1+m_2r_2+m_3r_3}{m_1+m_2+m_3} $$. Then you should define a new position for every particle from the center of mass. This way you should get a nice lagrangian with no crossed terms.
Studying a system from the center of mass perspective is useful when dealing with many bodies, it is not an arbitrary choice. 
A: A general quadratic form in $x_1,\ldots,x_n$ can be written as
$$L(x_1,\ldots,x_n) = \sum_{i\le j\le n}a_{ij}x_ix_j = \sum_{i,j=1}^n A_{ij}x_ix_j$$
where $A_{ij} = A_{ji}$, so that $A_{ij} = a_{ij} / 2$ if $i < j$. Then $A_{ij}$ forms a symmetric matrix, so it can be diagonalized by an orthogonal transformation. This change of basis is a linear change of variables in which cross-terms are eliminated.
In your example the terms involving $\dot x_i$ are already free of cross-terms, so we can disregard them. The remaining part, written out, is
$$-\frac12k\left(x_1^2 - 2x_1x_2 + 2x_2^2 - 2x_2x_3 + x_3^2\right) = -\frac12k\begin{pmatrix}x_1 & x_2 & x_3\end{pmatrix}A\begin{pmatrix}x_1 \\ x_2 \\ x_3\end{pmatrix}$$
where
$$A = \begin{pmatrix}\phantom{-}1 & -1 & \phantom{-}0 \\ -1 & \phantom{-}2 & -1 \\ \phantom{-}0 & -1 & \phantom{-}1\end{pmatrix}$$
Normalized orthogonal eigenvectors are 
$$\frac1{\sqrt3}\begin{pmatrix}1 \\ 1 \\ 1\end{pmatrix},\frac1{\sqrt2}\begin{pmatrix}1 \\ 0 \\ -1\end{pmatrix},\frac1{\sqrt6}\begin{pmatrix}1 \\ -2 \\ 1\end{pmatrix}$$
with eigenvalues $0$, $1$, $3$, so for 
$$y_1 = \frac{x_1 + x_2 + x_3}{\sqrt3}, y_2 = \frac{x_1 - x_3}{\sqrt2}, y_3 = \frac{x_1 - 2x_2 + x_3}{\sqrt6},$$ 
we get 
$$x_1^2 - 2x_1x_2 + 2x_2^2 - 2x_2x_3 + x_3^2 = y_2^2 + 3y_3^2 = \frac12(x_1 - x_3)^2 + \frac12(x_1 - 2x_2 + x_3)^2.$$
