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$?
Thanks for your help!