# Understanding Maxwell's Equations in a Box

Maxwell's equations for $$n$$ charged particles each with charge $$e_j$$ are known to be (in cgs) \begin{align} \nabla\cdot\textbf{E}(t,x)&=4\pi\rho(t,x)\\ \nabla\cdot\textbf{B}(t,x)&=0\\ \nabla\times\textbf{E}(t,x)&=-\frac{1}{c}\frac{\partial \textbf{B}(t,x)}{\partial t}\\ \nabla\times\textbf{B}(t,x)&= \frac{1}{c}\left( 4 \pi\mathbf{J}(t,x)+\frac{\partial\mathbf{E}(t,x)}{\partial t}\right) \end{align} With \begin{align} \rho(t,x)&=\sum\limits_{j=1}^ne_j\delta(x-x^j(t))\\ \mathbf{J}(t,x)&=\sum\limits_{j=1}^ne_j\dot{x}^j(t)\delta(x-x^j(t)) \end{align} Where each $$x^j$$ represents the position of the jth particle. Now if we restrict ourselves to a box $$V$$ and impose periodic boundary conditions, that should in principle allow us to expand everything using Fourier series \begin{align} \mathbf{E}(t,x)&=\frac{1}{|V|}\sum_{k}\vec{a}(t)_{k}e^{ik\cdot x}\\ \rho(t,x)&=\frac{1}{|V|}\sum_{j=1}^ne_j\sum_ke^{ik\cdot (x-x^j(t))}=\frac{1}{|V|}\sum_k\left(\sum_{j=1}^ne_je^{-ik\cdot x^j(t)}\right)e^{ik\cdot x} \end{align} Then if you apply the electric Gauss's law you get the next equation for the Fourier coefficients $$ik\cdot\vec{a}(t)_k=4\pi\sum_{j=1}^ne_je^{-ik\cdot x^j(t)}$$ This is completely analogous to the equation you find by performing the Fourier transform, but with continuous $$k$$. However, in this case if we consider the Fourier coefficient for $$k=\vec{0}$$ this results in $$\sum_{j=1}^ne_j=0$$ That is, the net charge must be 0. Clearly it isn't physically reasonable to only consider systems with net charge 0, so my question is if there is anything wrong with my procedure? If not if the problems has to do with how I naively assumed Maxwell's equations work in these sort of systems?

• I think this is an inherent property of trying to solve Poisson's equation on a compact manifold without boundary (in your case, the 3-torus). See the last paragraph of this answer for some clues. Dec 31 '20 at 4:06
• @MichaelSeifert why solving Poisson's equation on compact manifold is relevant? We already have the field, the problem is convergence of its Fourier series, no? Dec 31 '20 at 17:17

In a compact space, the net charge must be zero, by a simple topological argument: the net charge is proportional to the volume integral of the divergence of the electric field. By Gauss' law, this is equal to the surface integral of the electric field over the boundary, but a compact (periodic) space has no boundary!

Or you can also see it in coordinates: the integral $$\int \nabla \cdot \mathbf{E}\, dV$$ in a 3-torus is

$$\iiint \left(\frac{\partial E_x}{\partial x} + \frac{\partial E_y}{\partial y} + \frac{\partial E_z}{\partial z} \right)\, dx\, dy\, dz,$$

and each of these terms is zero after applying the fundamental theorem of calculus and the periodic boundary conditions.

• This makes no sense - yes we can consider a boundary where the field is discontinuous and the flux integral is undefined, but this does not imply that the flux integral is zero. It is not defined, so it cannot be zero. In other words, the boundary is unusable for Gauss theorem, and this implies nothing about total charge. When we take slightly smaller box than the one used for Fourier series, the flux is defined and non-zero. Dec 31 '20 at 17:14
• @JánLalinský: For a compact 3-manifold, any closed Gaussian surface divides the manifold into two volumes, either of which can be viewed as the "interior". (This is easiest to see on the surface of a sphere: does the Equator, a closed curve on the Earth's surface, have the North Pole or the South Pole in its interior?) The flux integrals for these two regions will be identical except that the "outward normal" will flipped at all points; so the flux integrals for these two volumes will be equal in magnitude but have opposite sign. ... Dec 31 '20 at 18:34
• ... Thus, by Gauss's Law the amount of charge in these two volumes must be equal and opposite. This holds even if you use a "slightly smaller box" than the entire volume. Dec 31 '20 at 18:35
• @MichaelSeifert Thanks, that's a better argument than the one I gave! Dec 31 '20 at 19:20

Convergent Fourier series for the Coulomb field may not exist; it is not L2 integrable through the singularity, only L1 integrable and not all L1 integrable functions have convergent Fourier series. If it exists, one cannot exchange summation and differentiation in that series as you have shown that leads to contradiction.

If we use Fourier transform instead, we find that the transform behaves at $$\mathbf k = 0$$ as $$\mathbf k/|k^2|$$ so your argument does not work.

• users.jyu.fi/~salomi/lecturenotes/FA_distributions.pdf These notes suggest the procedure is justified as a distributional equation, were the fourier series converges for periodic test functions. Dec 31 '20 at 3:42
• Where in the notes is it shown that the Fourier series for the Coulomb field is the same distribution as the Coulomb field? Dec 31 '20 at 17:06
• Theorem 2.4.6 shows that a periodic distribution is uniquely defined by it's Fourier decomposition, and 2.4.7 shows that you can exchange the derivative with the summation. Dec 31 '20 at 18:28