To count the modes in the cavity, we start with the simplification of a cubic cavity of side L and then just count up how many waves fit in the cavity. These waves look like
where we must keep in mind that there are two possible polarizations
for . The constraint that these waves just fit into the
cavity means that
all must have the form
where . We then use also the usual
relationship that
where c is the speed of light and .
We now proceed in two steps. First we get the total number
of modes less than a certain frequency in the cavity, and then from
this we determine
.