Now the real problem I'm having is trying to decide what the forces are acting on the system in order to come up with my differential equation?
As there are no external forces the linear momentum of the system will be constant of motion and the constant can be taken as zero as well.The internal forces are equal and opposite.We may try to describe the system where 'knowledge of forces' may not be a prior requirement.
If m1 and m2 are the masses at any time described by position coordinates x1 and x2 -then \
m1. dx1/dt +m2. dx2/dt =0
i,e. the velocities of the masses weighted by their mass factor are related.
The Kinetic Energy of the system can be expressed as
T= 1/2 .m1. (dx1/dt)^2 + 1/2 . m2. (dx2/dt)^2
which in terms of new coordinate q
q= x2-x1-d will be
T = 1/2 . m. (dq/dt)^2
where q is the generalized coordinate and d is the original length of the spring. The mass factor m can be defined as 1/m = 1/m1 +1/m2 normally called reduced mass of a two body system.
that is the kinetic energy can be written as function of a single generalized velocity say dq/dt.
q which is defined as (x2-x1-d) q can be viewed as extension of the spring and the potential energy of the two mass+spring system can be expressed as
V(q) = 1/2. k. q^2 (where k is the spring constant)
Having knowledge of K.E. and P.E. in terms of generalized coordinate q and dq/dt ...one can write
L , the Lagrangian as L= T- V and one can set up and solve Lagrange's equation of motion in q
and can arrive at equation of motion
** d^2q/dt^2 = w^2. q** where w^2 = k/m
This vibrational frequency w is natural frequency of vibration and can be called resonant frequency.