Quality factor theorem

hello all,
I am having a hard time deriving the proof for the quality factor theorem stated as such:
Q = 2 pi {Peak Energy Stored/Energy dissipated per cycle}.
the wikipedia article is http://en.wikipedia.org/wiki/Q_factor
and im working to solve the proofe showing that Wnot/deltaW is equal to

one key point im having difficulty with is im not even sure how to solve for the energy lost. my intuition is i would perform an integral of the kinetic energy in terms of x(t)=Asin(Wnot(t)-[tex]\delta[/tex]) from 0 to 2(pi)