# What is the energy of a standing EM wave? Is it probabilistic?

In a cavity, the standing wave will constructively interfere with itself, so its energy gets higher while the oscillator is still vibrating. Since the vibration time is not a constant value, and sometimes the wall of the cavity absorbs some of the wave energy, the energy of a standing EM wave is probabilistic and follows Maxwell-Boltzmann distribution. Am I correct in the statement above?

Actually I'm thinking about the black-body radiation. To calculate the energy density in a cavity which is heated up to $T$, we assume that the cavity is a cube, and only standing wave can exist in it(Why?). First we need to calculate how many kinds of standing waves(how many different wave vectors) for one frequency $f$. This can be done with some mathematical tricks. And then we have to determine the energy of each wave $\overline{E(f)}$. And my question is, actually, why does this overline come from? Why is it an average energy, instead of a constant value?

-

Conservation of energy follows directly from Maxwell's equations, so if you convince yourself that energy isn't conserved when EM waves interfere, you've made a mistake, and you need to go back and figure out what your mistake was.

In a cavity, the standing wave will constructively interfere with itself, [...]

Not true. If you work out the right-hand relationships for two EM plane waves traveling in opposite directions, you'll find that if the E fields are in phase, the B fields have opposite phases, and vice versa.

-

In a standing wave of this type, energy swaps back and forth between E field (electric) and B field (magnetic) energy. The total energy remains constant, as noted by earlier commenters. This is very much like the case of an LC oscillator, oscillating at resonance. Of course we have to assume in all cases that the losses are negligible over the time course of our observation.

Maxwell Boltzmann does not come into this at all. Your train of thought mis-lead you in this case, if that's where it took you.

-