Consider the situation shown in figure (12-E10). Show that if the blocks are displaced slightly in opposite directions and released, they will execute simple harmonic motion. Calculate the time period.

The center of mass of the system should not change during the motion. So if the block m on the left side moves towards right side by a distance x, the block on the right side moves towards left side by a distance x. So total compression of the spring is 2x. Since the system executing SHM, hence total energy of the system should be constant. Therefore

Taking time derivative on both sides of above equation.