A block is attached to two unstretched springs and with spring constants and , respectively (see fig. I). The other ends are attached to identical supports and not attached to the walls. The springs and supports have negligible mass. There is no friction anywhere. The block is displaced towards wall 1 by a small distance (figure II) and released. The block returns and moves a maximum distance towards wall 2. Displacements and are measured with respect to the equilibrium position of the block . The ratio is [2008]

(3)
Here when the block B is displaced towards wall 1, only spring is compressed and is in its natural state as the other end of is free.
Therefore the energy stored in the system
When the block is released, it will come back to the equilibrium position, gain momentum, overshoot the equilibrium position and move towards wall 2. As this happens, the spring comes to its natural length and gets compressed. The P.E. stored in the spring gets stored as the P.E. of spring when the block reaches its extreme position after compressing by . It is because no friction anywhere.
So, energy is conserved