A block of mass m is attached with a spring of force constant k. The block is kept on a frictionless plank. The other end of the spring is connected with the plank. Mass of the plank is M and it is also kept on a frictionless surface.
Initially, the system is stationary. A sharp impulse P is applied on the block as shown. The maximum compression in the spring will be
Initial velocity of M:v1=pm
At the time of maximum compression, velocity of both is same.
Using, conservation of momentum
(M + m) v = p ⇒v=PM+m
Apply conservation of energy:
12mv12=12(M+m)v2+12kxm2
Solve to get xm=P√Mk(M+m)m