An ideal spring with spring-constant k is hung from the ceiling and a block of mass M is attached to its lower end. The mass is released suddenly with the spring initially unstretched. Then the maximum extension in the spring is
2Mg/k
The decrease in potential energy of the block = increase in elastic potential energy of the spring
∴Mgxmax=12kx2 max
⇒xmax=2Mgk