Question: A block of Mass m is connected to another block of mass M by a massless spring of spring constant k . The blockes are kept on a smooth horizontal plane and are at rest. The spring is unstretched when a constant force F starts acting on the block of mass M(horizontally) to pull it. Find the maximum extension of the spring. I solved it by two different methods:
Method 1: here I assumed that max. extension(x) will be produced when both the blocks would be moving with constant acceleration. Therefore constant acceleration is
and by considering free body diagram of block with mass m
From 1 and 2 $$x=mF/(k(m+M))$$
Method 2: by conservation of energy In the reference frame of center of mass.
For block 'm', we have two forces acting $mF/(m+M)$ and $kx$, in opposite directions.
For block 'M' we have three forces acting $MF/(m+M)$ and $kx$, and $F$ in the opposite direction.
Assuming m moves a max distance x_1 from CM M moves a distance x_2 from CM. Then work done by external force will be
This will be stored as the internal energy, therefore
On solving this we get
$$x_1+x_2=2mF/(k(m+M))$$ Which one is the wrong and why?