system
Given the following post, respond as if you're commenting on Reddit:
human
If a mass-spring system is hung from a vibrating object, at what frequency would the mass begin to oscillate?

And how would one go about calculating it?
gpt
So essentially you've got a harmonic oscillator subject to a driving force which is a combination of gravity and a harmonic driving force?

I'll call x the vertical direction and let x = 0 be the equilibrium position in the absence of gravity.

The addition of gravity will shift the equilibrium position to x = -mg/k, taking the downward direction to be negative.

So it will be easiest to solve the equation of motion for 

u(t) = x(t) + mg/k.

I'll assume the harmonic driving force takes the form of F(t) = F*_0_*sin(wt).

The equation of motion for u(t) takes the form

u''(t) + w*_0_*^(2)u(t) = (F*_0_*/m)sin(wt), where w*_0_* = sqrt(k/m).

The solution to this ODE is a homogeneous part which consists of a linear combination of oscillations at the natural frequency (w*_0_*), and then a particular part which is an oscillation at the driving frequency (w).

If we ignore the homogenous solutions (or add a damping force so that they die away with some characteristic time scale), all that remains is the particular solution, which has the form

u(t) = Asin(wt). 

Plugging this into the equation of motion we find that

-w^(2)A + w*_0_*^(2)A = F*_0_*/m,

so 

A = (F*_0_*/m)(w*_0_*^(2) - w^(2))^(-1).

Notice that this amplitude is singular at w = w*_0_*. This is called *resonance*.

So u(t) = Asin(wt) = x(t) + mg/k.

So x(t) = Asin(wt) - mg/k, where A is given above.

But anyway we already have enough information to answer your question, which is about the frequency. The steady-state behavior, once we've gotten rid of the homogeneous solutions is a sinusoidal oscillation at the **driving frequency**.

So whatever frequency you force the system with, that's eventually the frequency it will oscillate at. Of course this is a simple system with only one oscillator and it's being driven sinusoidally. You could for example have multiple coupled oscillators or even a single oscillator driven by a more complicated driving force, and you'd get more interesting dynamics.