# Derive equation for Energy of the Harmonic Oscillator

1. Apr 7, 2015

### SandyMan32

I'm trying to figure out how to derive the equations for Energy from the differential equation corresponding to the (simple and damped) harmonic oscillator. Please note that I don't want to start with the expressions for kinetic and potential energy, I want to derive them. The references that I have referred to seem to have left out a step critical for my understanding.

For the simple oscillator my source starts with the differential equation
$$\dfrac{d^2}{dt^2}x(t) +\omega_0^2 x(t) =0$$
multiplying by $$\dot{x} = \dfrac{d}{dt}x(t)$$ gives
$$\dfrac{d}{dt} \left[ \dfrac{1}{2}( \dot{x}^2+ \omega_0^2 x^2) \right]=0$$
Integrating, gives the constant of motion
$$\dfrac{E}{m}=\dfrac{1}{2}(\dot{x}^2+ \omega_0^2 x^2)$$

Similarly, for the damped oscillator my source starts with the differential equation
$$\ddot{x} + \gamma \dot{x} +\omega_0^2 x=0$$
multiplies by $$\dot{x}$$ giving
$$\dot{x}\ddot{x} + \gamma \dot{x} ^2 +\omega_0^2 \dot{x}x=0$$
$$\dfrac{d}{dt}E = -m\gamma\dot{x}^2$$

Unfortunately, in both of the previous examples I do not understand how to arrive at the last line given. Any help would be much appreciated.

2. Apr 8, 2015

### Orodruin

Staff Emeritus
Exactly what is causing you this trouble? Do you know how to integrate a total derivative? Do you understand that the primitive function of $df/dx$ is equal to $f + C$, where $C$ is a constant?

3. Apr 8, 2015

### vanhees71

Just take
$$E=\frac{m}{2} \dot{x}^2+\frac{m \omega_0^2}{2} x^2$$
and take its time derivative, leading to
$$\dot{E}=m \dot{x} (\ddot{x}+\omega_0^2 x).$$
Now use the equation of motion of the damped oscillator you get
$$\dot{E}=-m \gamma \dot{x}^2.$$
This is just the dissipation of energy, given as the power due to the frictional force $\propto \gamma \dot{x}$.

4. Apr 8, 2015

### SandyMan32

A think I'm getting hung up on integrating the total derivative. Although I have a technical background, its not in physics and I've either never heard of integrating the total derivative, or have forgotten about it. A quick search on total derivative shows an expression for the total derivative equal to the sum of several partial derivatives, but I'm still unsure how to property integrate.

5. Apr 8, 2015

6. Apr 8, 2015

### Orodruin

Staff Emeritus
So did you understand the following?
It is essentially just a matter of changing the variable x for t and calling the integration constant E.

7. Apr 8, 2015

### SandyMan32

I understand that an arbitrary constant is present due to the integration, but it appears from my example, that the constant of integration is set to $$\dfrac{E}{m}$$ not E. where did this come from? Am I missing something obvious?

8. Apr 8, 2015

### Orodruin

Staff Emeritus
Calling the constant E/m is also perfectly fine.

9. Apr 8, 2015

### DaPi

I think
causes a problem here.

You find find a constant of the motion, Orodruin wants to call it E/m, I want to call it the Splonge. The real physics arises in relating the Splonge to other areas in which energy and momentum are understood.

10. Apr 9, 2015

### vanhees71

Well, it's the very general energy-work theorem, valid for point particles under the influence all kinds of forces, not only conservative ones. You just start from Newton's 2nd law,
$$m \ddot{\vec{x}}=\vec{F}(t,\vec{x},\dot{\vec{x}},\ldots).$$
Multiply this with $\dot{\vec{x}}$ and integrate. Then you get the work-energy theorem
$$\frac{m}{2}[\dot{\vec{x}}^2(t_2)-\dot{\vec{x}}^2(t_1)]=T_2-T_1=\int_{\text{traj}} \mathrm{d} \vec{x} \cdot \vec{F},$$
where "traj" stands for trajectory, i.e., the path of the particle due to a solution of the equation of motion we started from.

In this generality it's of little use in practice, because you need the full solution of the EoM, and thus you know anything you want to know about the particles's motion anyway. The special case of conservative forces is thus much more interesting, because there the line integral on the right-hand side of the work-energy theorem becomes path-independent, i.e., it only depends on the initial and finite position of the particle, no matter along which path you integrate. In other words, if in a simply connected region you have
$$\vec{F}=-\vec{\nabla}V(\vec{x}),$$
you get the energy-conservation law from the work-energy theorem, i.e.,
$$E_2-E_1=0 \quad \text{with} \quad E=T+V, \quad E_1=E(t_1), \quad E_2=E(t_2).$$

11. Apr 9, 2015

### DaPi

Further to my previous post.

This contains no physics! It's just a differential equation, which you manipulate and get a constant. It's relying on magic to equate this to E/m or whatever (does the "m" stand for magic?)

The physics comes when this equation is applied to a physical situation (mass on a spring, LC resonator etc), for which you have to say what x, t and (especially) omega are. (I always use x for the weight, in kg, of my cat Jellaby.)

12. Apr 10, 2015

### SandyMan32

thank you, the discussion on the work-energy theorem was helpful

13. Apr 10, 2015

### SandyMan32

I agree that from the DE alone we have no way to relate the analysis to the real-world. So, say for the sake of argument, we arrived at the DE through force relations of a point-mass

14. Apr 11, 2015

### DaPi

is still causing a problem.

There is nothing preventing you deriving a constant of the motion, multiplying it by m and proudly declaring this to be "THE ENERGY" The trouble comes when you want to show that this is the same as Energy as understood by everyone else. For this you'll have to either acknowledge the standard expressions for energy or derive the whole of physics from your SHO!