Diatomic molecule vibrations

 

Let the (point) masses be m and M, separated by L (in equilibrium). There will be a centre of mass determined by the condition that mass ´ distance is the same on each side. This CoM will not move (no external force) and so may be taken as a co-ordinate origin.

 

Begin by writing down the ma=F equation for each of the two masses. Remember that when writing an expression for F you will use the overall extension of the connecting 'spring', whereas when expressing a as a second derivative you will only be using that part of the extension that lies on the relevant side of the CoM. The two ma=F equations will turn out to be the same as each other if you have done everything properly.