I came across of a problem. It is about two bodies with equal masses connected by a spring with the coefficient $k$ and the length of $l_0$. Suddenly, a constant force $F$ is applied to the first body. Find the minimum and maximum distance between the bodies. The drawing illustrates the problem.
Attempts to solve: I guess the idea behind of this problem should be similar to the idea of the problem where instead of two bodies there is only the left body to which the force is applied. And the right body is replaced with a wall. Then the solution is very simple using the energy conservation one finds that the minimum distance is $l_0 -2F/k$ and the maximum distance is the length of the spring.
For the original problem the energy conservation gives: $W_{F} = K_1 + K_2 - U_{pot} $, where $W_F = F \cdot x_1$ - work done by the force $F$ over the distance $x_1$ and $K_1$, $K_2$ - the kinetic energies of the both bodies, $U_{pot}=(l0-(x_2-x_1))^2\cdot k/2$. Then the minimum distance is when the both kinetic energies are equal $K_1 = K_2 = K$. But that's not enough.
Q: Am I moving in the right direction? If yes, what else should be added to the energy conservation law to get the solution?
PS: I solved the equations of of the motion for these two bodies and plotted the corresponding kinetic and potential energies.Maybe it can be helpful.