The maximum displacement of the mass m₂
Kinetic Energy (K) = 1/2mv²
Potential Energy (P) = mgh
Law of Conservation of energy states that total energy of the system remains constant.
i.e; Total energy before collision = Total energy after collision
This implies that: the gravitational potential energy lost by m₁ must be equal to sum of gravitational energy gained by m₂ and the elastic potential energy stored in the spring.
d = maximum displacement of the mass m₂
(BELOW YOU CAN FIND ATTACHED THE IMAGE OF THE SITUATION)
For this we're going to use conservation of mechanical energy because there are nor dissipative forces as friction. So, the change on mechanical energy (E) should be zero, that means:
With the initial kinetic energy, the initial potential energy, the final kinetic energy and the final potential energy. Note that initialy the masses are at rest so , when they are released the block 2 moves downward because m2>m1 and finally when the mass 2 reaches its maximum displacement the blocks will be instantly at rest so . So, equation (1) becomes:
At initial moment all the potential energy is gravitational because the spring is not stretched so and at final moment we have potential gravitational energy and potential elastic energy so , using this on (2)
Additional if we define the cero of potential gravitational energy as sketched on the figure below (See image attached), and we have by (3) :
Now when the block 1 moves a distance d upward the block 2 moves downward a distance d too (to maintain a constant length of the rope) and the spring stretches a distance d, so (4) is:
dividing both sides by d
, with k the constant of the spring and g the gravitational acceleration.