# How to determine angular frequency of this system?

I am self studying on harmonic motion and springs. One of the problems is: Two identical objects of mass m are placed at either end of a spring of spring constant k and the whole system is placed on a horizontal frictionless surface. At what angular frequency w does the system oscillate? The answer is sqrt(2k/m), but I don't understand how this answer was obtained. I got sqrt(k/m) because that is the angular frequency of a regular spring attached to the wall system and this system seems to have the identical forces as this system.

The trick here is to realize that both masses are moving, and the point on the spring that is stationary is midway (in general, at the center of mass). Once you know which part of the spring is not moving you can fix it, and look at just one mass. You now have a shorter spring - length $\ell/2$ - and thus a higher frequency.

 O/\/\/\/\/\/\O
^
center of mass


Equivalent to

O/\/\/\||||||||
^
fix the spring to a solid object here