I am teaching differential equations and I got myself totally confused about the physics of a problem.
Consider a coupled spring system in series: there is a mass $m_1$ on a horizontal track which is connected to a wall by a spring (with natural length $L_1$ and spring constant $k_1$). Also attached to the first mass is a second mass $m_2$ on the same horizontal track and is connected to the first mass by a spring (with natural length $L_2$ and spring constant $k_2$).
The reference that I'm using goes through the standard derivation where $x_1$ is the displacement of the first mass and $x_2$ is the displacement of the second mass, deriving \begin{align*} m_1\frac{d^2x_1}{dt^2}&=-(k_1+k_2)x_1+k_2x_2\\ m_2\frac{d^2x_2}{dt^2}&=k_2x_1-k_2x_2. \end{align*}
I wanted to rewrite this system in terms of the stretch/compression of each spring. In particular, $y_1=x_1$ is the displacement of the first spring from its natural length and $y_2=x_2-x_1$ is the displacement of the second spring from its natural length. Substituting these into the differential equations, we get \begin{align*} m_1\frac{d^2y_1}{dt^2}&=-k_1y_1+k_2y_2\\ m_2\left(\frac{d^2y_1}{dt^2}+\frac{d^2y_2}{dt^2}\right)&=-k_2y_2. \end{align*} The first equation makes sense to me (in terms of the net force on the first mass), but I don't see where the force $$ m_2\frac{d^2y_1}{dt^2} $$ is coming from. I tried to think of the second half of the system moving rigidly as $m_1$ moves, but this didn't lead to this differential equation.
TL;DR
What is the physical significance of the $$ m_2\frac{d^2y_1}{dt^2} $$ term?