# Total energy of an underdamped harmonic oscillator

I am trying to find the total energy of an underdamped harmonic oscillator, where $$\gamma << \omega_0$$, whose displacement as a function of time is: $$y(t)=y_0e^{-\frac{\gamma}{2}t}\cos{(\omega_0 t+\alpha)}.$$

So the total energy is the sum of the kinetic and the potential, $$\text{E}=\frac{1}{2}m\left(\frac{dy}{dt}\right)^2 +\frac{1}{2}ky^2$$

This gives the following: $$\text{E}=\frac{1}{2}my_0^2e^{-\gamma t}\left[\frac{\gamma^2}{4}\cos^2(\omega_0 t+\alpha)+\gamma\omega_0\cos(\omega_0 t+\alpha)\sin(\omega_0 t+\alpha)+\omega_0^2\sin^2(\omega_0 t+\alpha)\right] + \frac{1}{2}ky_0^2e^{-\gamma t}\cos^2(\omega_0 t+\alpha).$$

The answer I am trying to get to is $$\text{E}=\frac{1}{2}ky_0^2e^{-\gamma t}$$, which is just the sum of the last two terms, using the fact that $$\omega_0=\sqrt{\frac{k}{m}}$$. I was just wondering what happens to the first two terms? They don't cancel each other out (as far as I am aware), and although I can use $$\gamma <<\omega_0$$ to get rid of the first term, I can't for the second (I don't think).

Rewrite your expression for $$E$$ as $$\text{E}=\frac{1}{2}m\omega_0^2y_0^2e^{-\gamma t} \left[1+\frac{\gamma^2}{4\omega_0^2}\cos^2(\omega_0 t+\alpha)+\frac{\gamma}{\omega_0}\cos(\omega_0 t+\alpha)\sin(\omega_0 t+\alpha)\right]\, .$$
This way you can directly compare the $$\cos^2(\omega_0 t+\alpha_)$$ and $$\cos(\omega_0t+\alpha)\sin(\omega_0t+\alpha)$$ terms with $$1$$ using $$\frac{\gamma}{\omega_0}\ll 1$$.