# The Unapologetic Mathematician

## Gauss’ Law for Magnetism

Let’s repeat what we did to come up with Gauss law, but this time on the magnetic field.

As a first step, though, I want to finally get a good definition of “current density”: it’s a vector field $J$ that consists of a charge density $\rho$ and a velocity vector $v$, each of which is a function of space. In our example of an infinite line current, this density was concentrated along the $z$-axis, where the velocity was vertical. But it could exist along a surface, or throughout space; a single particle of charge $q$ moving with velocity $v$ is a current density concentrated at a single point.

Anyway, so the Biot-Savart law says that the differential contribution to the magnetic field at a point $r$ from the current density at point $s$ is

$\displaystyle dB(r)=\frac{\mu_0}{4\pi}J(s)\times\frac{r-s}{\lvert r-s\rvert^3}d^3s$

So, as for the electric field, we want to integrate over $s$:

$\displaystyle B(r)=\frac{\mu_0}{4\pi}\int\limits_{\mathbb{R}^3}J(s)\times\frac{r-s}{\lvert r-s\rvert^3}d^3s$

Last time we spent a while noting that the fraction here is secretly a closed $2$-form in disguise, so its divergence is zero. This time, I say it’s actually a conservative vector field:

$\displaystyle\frac{r}{\lvert r\rvert^3}=-\nabla\left(\frac{1}{\lvert r\rvert}\right)$

Indeed, this is pretty straightforward to check by rote calculation of derivatives, and I’d rather not get into it. The upshot is we can write:

\displaystyle\begin{aligned}B(r)&=\frac{\mu_0}{4\pi}\int\limits_{\mathbb{R}^3}J(s)\times\left(-\nabla\left(\frac{1}{\lvert r-s\rvert}\right)\right)d^3s\\&=\frac{\mu_0}{4\pi}\int\limits_{\mathbb{R}^3}\nabla\left(\frac{1}{\lvert r-s\rvert}\right)\times J(s)+\frac{1}{\lvert r-s\rvert}\left(\nabla\times J(s)\right)d^3s\end{aligned}

where the extra term on the second line is automatically zero because the curl is in terms of $r$ and the current density $J$ depends only on $s$. I write it in this form because now it looks like the other end of a product rule:

\displaystyle\begin{aligned}B(r)&=\frac{\mu_0}{4\pi}\int\limits_{\mathbb{R}^3}\nabla\times\left(\frac{1}{\lvert r-s\rvert}J(s)\right)d^3s\\&=\nabla\times\left(\frac{\mu_0}{4\pi}\int\limits_{\mathbb{R}^3}\frac{J(s)}{\lvert r-s\rvert}d^3s\right)\end{aligned}

Indeed, this is clearer if we write it in terms of differential forms; since the exterior derivative is a derivation we can write

$\displaystyle d(f\alpha)=df\wedge\alpha+fd\alpha$

for a function $f$ and a $1$-form $\alpha$. If we flip $\alpha$ over to a vector field $F$ this looks like

$\displaystyle\nabla\times(fF)=(\nabla f)\times F+f\nabla\times F$

Okay, so now we see that $B$ is the curl of some vector field, and so the divergence $\nabla\cdot B$ of a curl is automatically zero:

$\displaystyle\nabla\cdot B=0$

Coupling this with the divergence theorem like last time, we conclude that there is no magnetic equivalent of “charge”, or else the outward flow of $B$ through a closed surface would be the integral on the inside of such a charge. But instead we find

$\displaystyle\int\limits_{\partial U}B\cdot dS=\int\limits_U\nabla\cdot B\,d^3s=0$

January 12, 2012