Frequencies of a standing EM wave in a box (Schwartz QFT) 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.
 A: This is a classic  issue that comes up quite often. Schwartz isn't wrong, he's just using a different convention. The allowed values of $k$ in the two conventions differ by a factor of $2$.
Consider imposing hard boundary conditions on a string of length $L$, so that
$$\psi(0) = \psi(L) = 0.$$
The standing wave solutions have the form
$$\psi_n(x) = \sin k_n x, \quad k_n = \frac{\pi n}{L}, \quad n \geq 0.$$
If we're focusing on the macroscopic physics, the boundary conditions won't matter in this simple case, so Schwartz could alternatively pick periodic boundary conditions 
$$\psi(x) = \psi(x+L)$$
which are perhaps not physical, but more convenient. This is because any self-respecting physicist prefers working with complex exponentials$^1$ to trignometric functions. In this case the standing wave solutions are
$$\psi_n(x) = e^{i k_n x}, \quad k_n = \frac{2 \pi n}{L}, \quad n \in \mathbb{Z}.$$
Macroscopically, all results remain the same because the $k_n$ are spaced out twice as much, but $n$ can now be negative as well. For instance, the number of states with energy near $E$, for large $E$, is the same in both pictures, and that's what matters for the calculation Schwartz is doing.
In general, graduate textbooks freely use periodic boundary conditions, but introductory undergraduate textbooks almost universally use hard boundary conditions, probably to avoid complaints that periodic boundary conditions are unintuitive.

$^1$ If the complex numbers bother you, we can take linear combinations to reach
$$\psi_n^{(1)}(x) = \cos(k_n x), \quad \psi_n^{(2)}(x) = \sin(k_n x), \quad k_n = \frac{2\pi n}{L}, \quad n \geq 0.$$
Now we have only positive $k_n$. They remain twice as spread out, but there are two solutions per $k_n$. It might be clearer this way that at large $n$, this makes no difference.
