Suppose that the mass B, at some instant, is at a height h above the relaxed (un-stretched) length of the spring as shown in the figure. Suppose that the vertical velocity of B is v at this instant and mass A has not left the ground yet. Then the total energy of the system is the sum of i) the potential energy stored in the spring due to its extension given by
There are three forces acting on mass A, i) the force of gravity mg pulling it down, ii) the tension in the spring
When, mass A is about to leave the ground, the normal reaction becomes 0 and so we have,
a) When the initial compression in the spring
So using this condition and substituting (3) in (1) we have,
Ignoring the negative possibility we have,
b) If the initial compression is
The velocity of the center of mass of the system when mass A is about to leave the ground is given by,
The kinetic energy of the CG when mass A is about to leave the ground is given thus by,
Before mass A has left the ground, if mass B moves x units upwards, the CG will move x/2 units upwards. By the time mass A is about to leave the ground, mass B has moved
This energy ECG must be conserved at all time. When the CG reaches its maximum height, its velocity will be zero. Suppose that the maximum height the CG attains is H, then it would have gained a potential energy of 2mgH and kinetic energy will be 0. So applying conservation of energy we have,
If