# Time-dependent harmonic oscillator in classical mechanics

Consider a damped, driven harmonic oscillator:

$$m\frac{d^2x}{dt^2} + \beta\frac{dx}{dt} + kx = F(t)$$

I want to write this equation for time-varying $$m$$, $$\beta$$ and $$k$$ which are the mass, viscous damping coefficient and spring coefficient respectively.

In some papers, for the time-varying version of this equation the authors simply write:

$$m(t)\frac{d^2x}{dt^2} + \beta(t)\frac{dx}{dt} + k(t)x = F(t)$$

however this seems not quite right to me because according to Newton's second law, force equals to the time-derivative of momentum, then for time-varying mass:

$$F= \frac{d}{dt}\left(m\frac{dx}{dt}\right) = m\frac{d^2x}{dt^2} + \frac{dm}{dt}\frac{dx}{dt}$$

So there should be an extra term in the equation:

$$m(t)\frac{d^2x}{dt^2} + \left(\beta(t)+\frac{dm}{dt}\right)\frac{dx}{dt} + k(t)x = F(t)$$

I am not sure whether there should be extra terms for time-varying $$\beta$$ and $$k$$ too.

In short, I would like to know what time-dependent harmonic oscillator equation looks like.

I think your understanding of the matter is very much correct and the equation at the bottom is the one. Sooner or later - and maybe this is what the papers (silently?) do? - you will, for convenience, redefine $$\beta$$ to $$\beta' = \beta + \frac{\text{d}m}{\text{d}t}$$.
The way the model is built there will be no derivatives of products involving $$\beta$$ or $$k$$ and thus no extra terms for them.
• For example, if you change some of the conditions, say we cool down the spring to change its material properties, then the stiffness of the spring, i.e. $k$, changes as a function of time. How this change goes - the physics behind, detailed modelling - is a different matter, in the context of the equation above for the damped oscillator we can take it as being given as a function of time. Apr 5, 2022 at 16:54