Multiply u′′+ω2u=0 by u′ and integrate: ∫T0u′′u′dt+∫T0ω2uu′dt=0. Observing that u′′u′=ddt12(u′)2,uu′=ddt12u2, we get ∫T0(ddt12(u′)2+ddt12ω2u2)dt=E(T)−E(0), where E(t)=12(u′)2+12ω2u2