I've started reading Schwartz' Quantum Field Theory and the Standard Model, and the very first equation seems to have an extra factor of 2, yet I have a hard time believing the first equation of a popular textbook would be wrong after many printings.
On page 1, Schwartz writes:
A blackbody is an object at fixed temperature whose internal structure we do not care about. It can be treated as a hot box of light (or Jeans cube) in thermal equilibrium. Classically, a box of size $L$ supports standing electromagnetic waves with angular frequencies $$\omega_n = \frac{2\pi}{L}|\vec n| c \tag{1.1}$$ for integer 3-vectors $\vec n$, with $c$ being the speed of light.
This seems to me to have an extra factor of two. Assuming the components of the electric field are separable and performing separation of variables in a box, one should get something like $$E_i = E_{i0}\sin\left(\frac{n_x \pi x}{L}\right)\sin\left(\frac{n_y \pi y}{L}\right)\sin\left(\frac{n_z \pi z}{L}\right)\sin(\omega t) $$ where the $n_i$ are integers. Then, the wave equation becomes $$\frac{\omega^2}{c^2} = \frac{\pi^2}{L^2}(n_x^2 + n_y^2+ n_z^2) = \frac{\pi^2}{L^2}|\vec n|^2 $$ or equation (1.1), with no factor of two.
I'm aware that for calculating the number of states at a particular $\vec n$, you do get an extra factor of 2 for the 2 polarizations, but I don't see how that would affect the frequency.
I've looked at other resources and they seem to agree with my result. For instance, problem 8-47 in Tipler & Llewellyn's Modern Physics (6th Ed) says the energy of a photon in a box can be written $E=N(\hbar c\pi/L)$.
Still, I can't bring myself to believe the very first equation in Schwartz is wrong. Please let me know which result you agree with.