# Counting the number of modes

The exercise is the following

Show that the number $N(\lambda) \, \mathrm d \lambda$ of standing electromagnetic waves (modes) in a large cube of volume $V$ with wavelengts within the interval $\lambda$ to $\lambda + \mathrm d \lambda$ is given by

$$N(\lambda)\, \mathrm d \lambda = \frac{8\pi V}{\lambda^4}\, \mathrm d \lambda$$

My solution is wrong by a factor of $2$, but I can't figure out why. I'm hoping that someone here might be able to help me out. Thanks.

I went about it the following way: In $k$-space the allowed values for standing waves in a cube of side length $L$ are given by

$$k = \left(\frac\pi Ln_1, \frac\pi L n_2, \frac\pi L n_3\right)$$

where the $n_i$ are nonnegative integers. So each point in $k$-space takes up a volume $\left(\frac{\pi}{L}\right)^3$.

If the wave vector of a standing wave is in the interval from $k$ to $k + \mathrm d k$, then it lies in the intersection of the positive octant with the sphere of thickness $\mathrm d k$ and radius $k$. This sphere has volume $\frac18 4\pi k^2 \, \mathrm dk = \frac{\pi k^2}{2} \, \mathrm dk$. So the number of standing waves in terms of the wave vector is given by

$$N(k) \,\mathrm dk = \frac{\pi k^2 /2}{(\pi/L)^3}\, \mathrm d k = \frac{L^3 k^2}{2\pi^2}\, \mathrm dk= \frac{V k^2}{2\pi^2}\, \mathrm dk$$

Thus, in terms of $\lambda = \frac{2\pi}{k}$ I would get

$$N(\lambda) \, \mathrm d\lambda = N(k) \, |d(2\pi/k)| = \frac{V \, (2\pi/\lambda)^2}{2\pi^2}\frac{2\pi}{\lambda^2}\, \mathrm d\lambda = \frac{4\pi V}{\lambda^4}\, \mathrm d \lambda$$

i.e. $N(\lambda) = 4\pi V/\lambda^4$.

Can anyone spot where I lost the factor of $2$?

Think of the the wave vector $(k_x,0,0)$. What are the possible directions of the electric field for this mode? The electric field is given by $$\vec E(\vec r) = \vec E^0 e^{i k_x x}$$ Where $E^0$ is a constant vector and I omitted the time dependence as it is not crucial. Since there is no charge you must have $$0=\partial_x E_x+\partial_y E_y+\partial_z E_z= i k_x E_x$$ So the $x$-component of $E^0$ must vanish. But there are no limitations on the $y,z$ components. These components are responsible for the discretization of the $\vec k$'s because the tangential electric field must vanish near the walls.
That's true, I did not take into account the polarization and this gives me the factor of $2$. In your example the electric field oscillates in the plane perpendicular to $(k_x,0,0)$. Thanks for your help! – Sam Dec 17 '11 at 13:50