Something has always bothered me about finding the energy of an EM wave - What justification is there for taking the time average of the wave? I know we do this to find the energy of an EM wave, but I haven't seen this before in any of my courses. Isn't this a violation of conservation of energy? If I remember correctly, If E=Acos(w(r,t)) and the energy density is 1/2ε|E|^2 , then the energy density = 1/2ε|Acos(w(r,t))|^2. We can do the same for B - they are in phase and so then the net energy density must vary as cosine^2. Which can't make sense if it is to agree with cons. of energy. As far as I know from mechanics, the total energy of a closed system is always constant and independent of time. Yet for these waves we take the time average. Why? I'm assuming I'm wrong here - I just want to know where the time averaging idea came from, so i can learn how it is derived/proven.