# Energy conservation in a forced spring-mass-damper, off of resonance

I understand that at resonance, a spring-mass-damper system will only require input energy from a forcing that matches the energy dissipated per cycle by the damper.

Let's say that you have a system with a natural frequency $$f_o$$, are forcing it at some frequency that is roughly twice that frequency, and I let the system get to a steady state so that it is oscillating as a sinusoid with some amplitude and frequency ($$x(t)=X\sin{(\omega t+\phi)}$$). I have simulated this exact thing a bunch, and find that the net work done by the harmonic forcing ($$\int_0^T F\sin{(\omega t)}\dot{x} dt$$) over a period is equal to the net work done by the damper ($$\int_0^T c\dot{x}^2 dt$$).

Since the system isn't at resonance, I would think that inertial and elastic work should not exactly cancel over a period and the forcing should have to do extra work to compensate for this off-resonance behavior. How would I show this mathematically? Every time I try to do this, I find that the net work of the forcing exactly equals the work dissipated by the damper (which I am aware is just conservation of energy). If I try to integrate the power associated with the mass movement ($$\int_0^T m\ddot{x}\dot{x} dt$$) or the power associated with the spring ($$\int_0^T kx\dot{x} dt$$), both of these integrals give 0 over a period. What is happening with energy exchange between the mass kinetic energy and the spring elastic energy when you are at steady state oscillations away from resonance?

• By definition of steady state, since energy stays constant, you must have energy balance between forcing and dissipation. Your math is correct, but your intuition is wrong.
– LPZ
Commented May 1, 2023 at 16:05
• Thanks @LPZ! So how does energy balance at steady state jive with the idea that a system oscillating at resonance has the most efficient energy transfer between kinetic and elastic potential energy? It would seem that this transfer efficiency is 100% regardless of whether or not you are at resonance. Commented May 1, 2023 at 19:45
• No problem and welcome to Physics SE! Actually, what is optimal at resonance is not the efficiency since it is always at 100% according to the previous reasoning. It is rather the absolute amount of the flowing energy that peaks at resonance. Even if the forcing amplitude is fixed, the energy injected/dissipated still depends on frequency and is maximal at resonance (by definition).
– LPZ
Commented May 1, 2023 at 22:16

$$\ddot x=-\omega^2\,x\tag 1$$
where $$~\omega^2=\frac km~$$
multiply equation (1) with $$~\dot x~$$
$$\dot x\ddot x=-\omega^2\,\dot x\,x\\ \frac {d}{dt}\left(\frac {\dot x^2}{2}\right)= -\omega^2\,\frac {dx}{dt}\,x\\ \int{d} \left(\frac {\dot x^2}{2}\right)= \int -\omega^2\, {dx}\,x\\ \underbrace{\frac {\dot x^2}{2}}_{K(t)}= -\underbrace{\omega^2\frac {x^2}{2}}_{P(t)}$$
thus the integration of the Lagrange L(t) from zero to a period T is zero. $$\int _0^T \underbrace{\left[K(t)-P(t)\right]}_{L(t)}\,dt=0$$