How many modes in the cavity?
From the standing wave solution to the wave equation we get the condition
.
 The Rayleigh scheme for counting modes.
After Richtmyer, et al. |
We need to evaluate the number of modes which can meet this condition, which amounts to counting all the possible combinations of the integer n values. An approximation can be made by treating the number of combinations as the volume of a three-dimensional grid of the values of n, an "n-space". Using the relationship for the volume of a sphere, with the n values specifying the coordinates along three "n" axes, gives |
.
|
This has a couple of problems, however. In using a sphere, we have used both positive and negative values of n, whereas the wave equation solution uses only positive definite values. Therefore we must take 1/8 th of the volume above. Another technical problem is that you can have waves polarized in two perpendicular planes, so we must multiply by two to account for that. Then the volume can be taken to be a measure of the number of modes, becoming a very good approximation when the size of the cavity is much greater than the wavelength as in the case of electromagnetic waves in finite cavity. Using the relation obtained for the values of n, this becomes

How many modes per unit wavelength?
Having developed an expression for the number of standing wave modes in a cavity, we would like to know the distribution with wavelength. This may be obtained by taking the derivative of the number of modes with respect to wavelength.

The negative sign here reveals that the number of modes decreases with increasing wavelength. Now to get the number of modes per unit volume per unit wavelength, we can simply divide by the volume of the cubical cavity.

Note that this does not involve approximating a sphere with a cube! The sphere we used in calculating the number of modes was a sphere in "n-space", allowing us to count the number of possible modes. Also, the use of a cubical cavity for the calculation just allows us to reduce the geometrical complexity of the development, but the final result obtained is independent of cavity geometry.
Note: You can also get it converted into frequency interval to get the desired expression