# Conservation of energy in an undamped driven harmonic oscillator

1. ### inkliing

25
This isn't homework. I'm reviewing physics after many years of neglect.

Since a simple harmonic oscillator is a conservative system with no energy losses, then a driven undamped harmonic oscillator, once the transient solution has died out, can't be receiving any energy from the driving mechanism, else the system's M.E. would increase without bound.

But when a simple harmonic oscillator is driven at the system's natural frequency, the amplitude of the position, and therefore the system's M.E. increases without bound, which can't happen unless the system is receiving energy from the driving mechanism.

Specifically:

Let $\omega_{\circ} = \sqrt{k/m}$, driving function = $f(t) = \frac{F_{\circ}}{m}\cos\omega t$, therefore $a + \omega_{\circ}^2x = \frac{F_{\circ}}{m}\cos\omega t$, therefore, ignoring the transient solution, $x = \frac{F_{\circ}}{m(\omega_{\circ}^2-\omega^2)}\cos\omega t$, a steady state solution of clearly constant amplitude. Therefore the system's mechanical energy, $E = U + K = \frac{1}{2}kx^2 + \frac{1}{2}mv^2 =$ a constant. This is true for all input frequencies $\neq\omega_{\circ}$. Therefore, at all input frequencies $\neq\omega_{\circ}$, the driving function can't be inputing energy into the system, since the system's M.E. = a constant. That is, since there are no energy losses, if the driving mechanism were inputing a steady stream of energy, the system's M.E. would go to infinity as time goes to infinity.

Now let $\omega = \omega_{\circ}$. Therefore $a + \omega_{\circ}^2x = \frac{F_{\circ}}{m}\cos\omega_{\circ} t$, therefore, ignoring the transient solution, $x = \frac{F_{\circ}}{2m\omega_{\circ}}t\cos\omega_{\circ} t$, a steady state solution with an amplitude which clearly $\rightarrow\infty$ as $t\rightarrow\infty$. Therefore the system's mechanical energy, $E = U + K = \frac{1}{2}kx^2 + \frac{1}{2}mv^2 \rightarrow\infty$ as $t\rightarrow\infty$. Therefore, the driving function must be inputing energy into the system when $\omega = \omega_{\circ}$.

So which is it? Either the driving mechanism is supplying the system with energy or not.

If energy is being input, then why doesn't the system energy tend to infinity at all driving frequencies?

If energy is not being input, then why does the system energy tend to infinity when driven at the natural frequency?

Both must be explained.

### Staff: Mentor

If the driving mechanism is operating at the natural frequency, it is adding energy to the system. Intuitively, what's happening is that every time the mass is at maximum displacement, the driving force is acting to push it just a but farther, increasing the distance and hence the potential energy. Work is being done on the oscillator by the driving force according to ##W=Fd##, where in this case the distance ##d## is the additional outward distance at the maximum. The amplitude will continue to increase until something breaks.

However, if the driving mechanism is not operating at the natural frequency, then it won't always be exactly coordinated the the movement of the mass. Sometimes the force will be acting in one direction while the mass is moving in the other, and then it will slow the mass and reduce the kinetic energy. In this case, the oscillator is doing work on the driving mechanism, again according to ##W=Fd##.

It's only when we drive the oscillator at its natural frequency that the energy between driving mechanism and oscillator is always in the direction of the oscillator - and in that case we should expect that we're supplying a respectable amount of power to driving mechanism from some external source.

3. ### sophiecentaur

13,895
If your system is lossless then there cannot be an input power source because its implied impedance would be introducing a resistance. The resonator would no longer have infinite Q(?)
This, I think, is just another example of inserting zero into a formula and getting a nonsense answer.

### Staff: Mentor

You may want to check your math here. I do not get the same solution. My solution does not have either a transient or a constant mechanical energy.

Are you assuming x(0)=0 and x'(0)=0?

5. ### AlephZero

7,298
That is correct, except that "ignoring the transent solution" is a bit problematical with no damping, because the transient will continue for ever. But
is wrong, for the forced solution. The energy of the system varies during each cycle. That should be obvious if you consider a very low frequency, when the kinetic energy is negligible compared with the strain energy, and the strain energy is proportional to ##x^2##.

The "explanation" for your questions is to do the math correctly, and not ignore the transient solution because it never dies out in an undamped system. Of course you can choose the initial conditions so the amplitude of transient solution is always zero, but making that choice will affect the energy in the system.

When you force the system at resonance, calling the diverging solution "not a transient solution" seems a rather strange terminology.

### Staff: Mentor

That must be the problem. I just looked at the full solution and did not see any transient, just two standard sinusoids. He must have discarded one of them as the transient.

7. ### sophiecentaur

13,895

But how will you drive a system to resonance without a loss component (source resistance)? You can get any answer you like if you choose an incorrect model. A loss free driver would correspond to a voltage source - which would maintain the drive volts Across the LC (or equivalent). No resonance because there's no energy build up.

8. ### AlephZero

7,298
Think about a mass on a spring, not an electrical circuit. You just apply a sinusoidal force to the mass, in phase with its velocity (90 degrees out of phase with its displacement). That's exactly the same as exciting a damped system at its resonant frequency. There are no mathematical tricks with zero terms required. The work done supplying energy to the system is force times distance - nothing special there.

The electrical analogy may be a bit confusing. In the undamped mechanical system, you are applying a constant force moving with a continuously increasing amplitude (i.e. the motion of the mass) so the amount of power you supply is increasing with time. That makes sense, because the amplitude ##x## increases linearly with time, and the energy in the system is proportional to ##x^2##.

If you try to make an electrical analogy by applying a constant amplitude voltage or current to an undamped LC circuit, that is a different situation, which is probably why you can't make it work.

Last edited: Aug 26, 2014
9. ### AlephZero

7,298
That's right. One is at the resonant frequency, the other at the forcing frequency.

If the two frequencies coincide, you get a different solution containing the two terms ##e^{i \omega t}## and ##te^{i \omega t}##.

The ##te^{i \omega t}## solution changes the situation so far as the work and energy is concerned. For forcing off-resonance, the average amount of work over one cycle of the applied force is zero. You do positive work on the system for half a cycle, and negative work for the other half. But at the resonant frequency, the ##te^{i \omega t}## solution allows you to do positive work for the whole cycle, and continuously increase the energy in the system.

Last edited: Aug 26, 2014

### Staff: Mentor

I am not sure what you mean. The solution to an undamped driven oscillator has two pure sinusoids, so it doesn't "drive to resonance".

### Staff: Mentor

That is essentially what I got also. I could get the solution either by solving the differential equation for ω=ω0 or by taking the limit of the general solution as ω→ω0.

Last edited: Aug 26, 2014
12. ### sophiecentaur

13,895

You are ignoring what is involved when you apply a force. If the force is applied through a 'position source' (analogue for a voltage source) then the resonator can only move to the position it has been moved to and can build up no energy. What I mean by driving to resonance is that there must be light coupling to the system for the system to resonate. That means loss is involved and you will no longer have an undamped situation.
Let's face it, the thread is seeking a resolution to an apparent paradox. Including this necessary loss component in the system gives a resolution. The zero you are introducing is the zero loss.

13. ### AlephZero

7,298
That is an additional assumption. In a mechanical system, there is a choice between applying "displacement-controlled" or "force-controlled" excitation. You can apply a known displacement and let the force be whatever is needed to create that displacement, or a apply a known force and let the displacement do what it wants to do.

Your constant voltage is equivalent to applying a constant displacement. If you vary the frequency, you will see the current that is required to enforce the displacement change. For an idealized LC system with no resistance, the current will reduce to zero as you approach the resonant frequency, and change phase by 180 degrees relative to the voltage, when the frequency is above or below the resonant frequency. If there is some resistance in the circuit, the minimum current is not zero, and the graph of phase against frequency is a smooth curve passing through 90 degrees at the resonance point, instead of the sudden flip from 0 to 180 with no resistance.

The "force controlled" excitation is analogous to a constant current source, not a constant voltage source - or more accurately, supplying a constant amount of charge per cycle of oscillation, not a constant current. In that case, the voltage will increase as you approach the resonant frequency, and for a theoretical circuit with no resistance the voltage would become "infinite" at the resonant frequency.

### Staff: Mentor

Yes, a perfectly lossless undamped system is physically unrealizable in practice, and yes you have to ignore a lot of what is involved, but making it more realistic is not necessary to resolve this apparent paradox.

In general, there are three types of physics "paradoxes":
(3) paradoxes resulting from misapplication of a theory or its mathematical framework

The approach you are suggesting is necessary to resolve type (2) paradoxes, but this is a type (3) paradox.

15. ### sophiecentaur

13,895
I thought I was talking in terms of 3. I was suggesting that the assumption of zero loss is inappropriate. (?)

### Staff: Mentor

From a theoretical standpoint there is nothing inappropriate with 0 loss in this scenario. You get a perfectly legitimate solution to the problem.

17. ### inkliing

25

Since a simple harmonic oscillator is a conservative system with no energy losses, then an undamped harmonic oscillator driven at a frequency other than the system's natural frequency can't be receiving any net energy from the driving mechanism, else the system's M.E. would increase without bound.

But when a simple harmonic oscillator is driven at the system's natural frequency, the amplitude of the position, and therefore the system's M.E., increases without bound, which can't happen unless the system is receiving net energy from the driving mechanism.

Specifically:

Let $x_{\circ} = 0, v_{\circ} = 0, \omega_{\circ} = \sqrt{k/m}$, driving function = $f(t) = \frac{F_{\circ}}{m}\sin\omega t$. Therefore $a + \omega_{\circ}^2x = \frac{F_{\circ}}{m}\sin\omega t\Rightarrow x = \frac{F_{\circ}}{m(\omega_{\circ}^2-\omega^2)}(\sin\omega t - \frac{\omega}{\omega_{\circ}}\sin\omega_{\circ}t)$, a steady state solution of clearly bounded amplitude. Therefore the system's mechanical energy, $E = U + K = \frac{1}{2}kx^2 + \frac{1}{2}mv^2$ is bounded. This is true for all input frequencies $\neq\omega_{\circ}$. Therefore, although energy may be going into the system during part of the cycle, and leaving during another part, there is no net energy entering or leaving the system each cycle. The system's M.E. has the same upper bound for each cycle, and that same upper bound for any arbitrarily large amount of time. Clearly, I could have choosen any values of $x_{\circ}$ and $v_{\circ}$ and the system's M.E. would still be bounded. Since this is true at all input frequencies $\neq\omega_{\circ}$, the driving function can't be inputing energy into the system when $\omega\neq\omega_{\circ}$, since the system's M.E. is bounded. That is, since there are no energy losses, if the driving mechanism were inputing a steady stream of energy, the system's M.E. would go to infinity as time goes to infinity.

Now let $\omega = \omega_{\circ}$. Therefore $a + \omega_{\circ}^2x = \frac{F_{\circ}}{m}\sin\omega_{\circ} t$. Therefore $x = \frac{F_{\circ}}{2m\omega_{\circ}^2}(\sin\omega_{\circ}t - \omega_{\circ}t\cos\omega_{\circ} t)$, a steady state solution with an amplitude which clearly $\rightarrow\infty$ as $t\rightarrow\infty$. Therefore the system's mechanical energy, $E = U + K = \frac{1}{2}kx^2 + \frac{1}{2}mv^2 \rightarrow\infty$ as $t\rightarrow\infty$. Therefore, the driving function must be inputing energy into the system when $\omega = \omega_{\circ}$.

Assuming my math is clear this time, it seem (reasonably) clear to me now that the input energy per cycle of an undamped driven harmonic oscillator, as a function of input frequency, behaves like a Dirac delta, inputing some positive amount of energy per cycle (and therefore inputing arbitrarily large amounts over arbitrarily large times) when the driving frequency is the natural frequency , and inputing zero net energy per cycle (and therefore zero net energy over arbitrarily large times) when the driving frequency is not equal to the natural frequency. This Dirac delta nature of input energy vs driving frequency is what had me confused.

### Staff: Mentor

Yes, this is correct.

This is exactly the principle of resonance. There is a special frequency at which energy transfer is very efficient, and other frequencies at which it is not efficient.