text: # 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
  
  ## Gauss’ Law
  
  Rather than do any more messy integrals for special cases we will move to a more advanced fact about the electric field. We start with Coulomb’s law:
  
  $\displaystyle E(r)=\frac{1}{4\pi\epsilon_0}\frac{q}{\lvert r\rvert^3}r$
  
  and we replace our point charge $q$ with a charge distribution $\rho$ over some region of $\mathbb{R}^3$. This may be concentrated on some surfaces, or on curves, or at points, or even some combination of the these; it doesn’t matter. What does matter is that we can write the amount contributed to the electric field at $r$ by the charge a point $s$ as
  
  $\displaystyle dE(r)=\frac{1}{4\pi\epsilon_0}\frac{\rho(s)}{\lvert r-s\rvert^3}(r-s)d^3s$
  
  So to get the whole electric field, we integrate over all of space!
  
  $\displaystyle E(r)=\frac{1}{4\pi\epsilon_0}\int\limits_{\mathbb{R}^3}\frac{\rho(s)}{\lvert r-s\rvert^3}(r-s)d^3s$
  
  Now we want to take the divergence of each side with respect to $r$. On the right we can pull the divergence inside the integral, since the integral is over $s$ rather than $r$. But we’ve still got a hangup.
  
  Let’s consider this divergence:
  
  $\displaystyle\nabla\cdot\left(\frac{r}{\lvert r\rvert^3}\right)$
  
  Away from $r=0$ this is pretty straightforward to calculate. In fact, you can do it by hand with partial derivatives, but I know a sneakier way to see it.
  
  If you remember our nontrivial homology classes, this is closely related to the one we built on $\mathbb{R}^3$ — the case where $n=2$. In that case we got a $2$-form, not a vector field, but remember that we’re working in our standard $\mathbb{R}^3$ with the standard metric, which lets us use the Hodge star to flip a $2$-form into a $1$-form, and a $1$-form into a vector field! The result is exactly the field we’re taking the divergence of; and luckily enough the divergence of this vector field is exactly what corresponds to the exterior derivative on the $2$-form, which we spent so much time proving was zero in the first place!
  
  So this divergence is automatically zero for any $r\neq0$, while at zero it’s not really well-defined. Still, in the best tradition of physicists we’ll fail the math and calculate anyway; what if it was well-defined, enough to take the integral inside the unit sphere at least? Then the divergence theorem tells us that the integral of the divergence through the ball is the same as the integral of the vector field itself through the surface of the sphere:
  
  $\displaystyle\int\limits_B\nabla\cdot\left(\frac{r}{\lvert r\rvert^3}\right)=\int\limits_{S^2}\left(\frac{r}{\lvert r\rvert^3}\right)\cdot dS=\int\limits_{S^2}r\cdot dS=4\pi$
  
  since the field is just the unit radial vector field on the sphere, which integrates to give the surface area of the sphere: $4\pi$. Remember that the fact that this is not zero is exactly why we said the $2$-form cannot be exact.
  
  So what we’re saying is that this divergence doesn’t really work in the way we usually think of it, but we can pretend it’s something that integrates to give us $4\pi$ whenever our region of integration contains the point $r=0$. We’ll call this something $4\pi\delta(r)$, where the $\delta$ is known as the “Dirac delta-function”, despite not actually being a function. Incidentally, it’s actually very closely related to the Kronecker delta
  
  So anyway, that means we can calculate
  
  $\displaystyle\nabla\cdot E(r)=\frac{1}{4\pi\epsilon_0}\int\rho(s)\nabla\cdot\left(\frac{r-s}{\lvert r-s\rvert^3}\right)d^3s=\frac{1}{4\pi\epsilon_0}\int\rho(s)4\pi\delta(r-s)d^3s$
  
  This integrand is zero wherever $r\neq s$, so the only point that can contribute at all is $\rho(r)$. We may as well consider it a constant and pull it outside the integral:
  
  $\displaystyle\nabla\cdot E(r)=\frac{\rho(r)}{\epsilon_0}\int\delta(r-s)d^3s=\frac{\rho(r)}{\epsilon_0}$
  
  where we have integrated away the delta function to get $1$. Notice how this is like we usually use the Kronecker delta to sum over one variable and only get a nonzero term where it equals the set value of the other variable.
  
  The result is known as Gauss’ law:
  
  $\displaystyle\nabla\cdot E(r)=\frac{\rho(r)}{\epsilon_0}$
  
  and, incidentally, shows why we wrote the proportionality constant the way we did when defining Coulomb’s law. The meaning is that the divergence of the electric field at a point is proportional to the amount of charge distributed at that point, and the constant of proportionality is exactly $\frac{1}{\epsilon_0}$.
  
  If we integrate both sides over some region $U\subseteq\mathbb{R}^3$ we can rewrite the law in “integral form”:
  
  $\displaystyle\int_U\frac{\rho(r)}{\epsilon_0}d^3r=\int_U\nabla\cdot Ed^3r=\int_{\partial U}E\cdot dS$
  
  That is: the outward flow of the electric field through a closed surface is equal to the integral of the charge contained within the surface. The second step here is, of course, the divergence theorem, but this is such a popular application that people often call this “Gauss’ theorem”. Of course, there are two very different statements here: one is the physical identification of electrical divergence with charge distribution, and the other is the geometric special case of Stokes’ theorem. Properly speaking, only the first is named for Gauss.
  
  January 11, 2012
  
  ## Charged Rings and Planes
  
  Let’s work out a couple more examples that may come in handy in the future, if only to get the practice. We’ll start with a “charged ring” which is a charge distribution on a circle. Specifically, we may as well consider the circle of radius $R$ in the $x$-$y$ plane: $c(t)=(R\cos(t),R\sin(t),0)$. If the charge density is $\lambda$, then the total charge is $2\pi R\lambda$.
  
  First of all, symmetry tells us that we may as well just consider the points of the form $(x,0,z)$ for $x\geq0$, and we will first specialize to the points $(0,0,z)$. Along this line, the field generated by a little piece of charge on one side of the circle points across to the other side of the circle and out further along the $z$ axis; the piece on the other side cancels the horizontal contribution, but adds to the outward push. This outward direction along the $z$ axis is all that we need to calculate in this case.
  
  The Coulomb law tells us that the differential element of charge at $c(t)$ is $q(t)\lvert c'(t)\rvert dt=\lambda Rdt$. The displacement vector is $(-R\cos(t),-R\sin(t),z)$, and its length is $\sqrt{R^2+z^2}$. And so the integral is
  
  \displaystyle\begin{aligned}E_z(0,0,z)&=\int\limits_0^{2\pi}\frac{1}{4\pi\epsilon_0}\frac{\lambda Rz}{\left(R^2+z^2\right)^\frac{3}{2}}dt\\&=\frac{1}{4\pi\epsilon_0}\frac{(2\pi R\lambda)z}{\left(R^2+z^2\right)^\frac{3}{2}}\end{aligned}
  
  So there’s some extra push near the origin, but when $z$ gets much bigger than $R$, this is effectively the Coulomb law again for a point source with charge \$latex $2\pi R\lambda$ — the total charge on the ring.
  
  Pushing off of the center line is a bit rougher. The differential element of charge is the same, of course, but now the displacement vector is $(x-R\cos(t),-R\sin(t),z)$. Its magnitude is $\sqrt{x^2+z^2+R^2-2xR\cos(t)}$, leading to the integral
  
  $\displaystyle E(x,0,z)=\int\limits_0^{2\pi}\frac{1}{4\pi\epsilon_0}\frac{\lambda R}{\left(x^2+z^2+R^2-2xR\cos(t)\right)^\frac{3}{2}}(x-R\cos(t),-R\sin(t),z)dt$
  
  This is, not to put too fine a point on it, really ugly, and it would take us way too far afield to go into it.
  
  However, we can use what we know to determine the electric field generated by a charged plane with a charge density of $\sigma$, measured in charge per unit area. At any point $(x,y,z)$ we can drop a perpendicular to the plane. We cut the plane into charged rings of radius $R$ and width $dR$, which gives us a (linear) charge density of $\lambda=\sigma dR$. The result above says that the ring of radius $R$ has only a $z$ component, which is
  
  $\displaystyle E_z(x,y,z)=\frac{1}{4\pi\epsilon_0}\frac{(2\pi R\sigma dR)z}{\left(R^2+z^2\right)^\frac{3}{2}}=\frac{z\sigma}{2\epsilon_0}\frac{RdR}{\left(R^2+z^2\right)^\frac{3}{2}}$
  
  So we integrate this out over all radii:
  
  \displaystyle\begin{aligned}E_z(x,y,z)&=\frac{z\sigma}{2\epsilon_0}\int\limits_0^\infty\frac{R\,dR}{\left(R^2+z^2\right)^\frac{3}{2}}\\&=\frac{z\sigma}{2\epsilon_0}\lim\limits_{a\to\infty}\int\limits_0^a\frac{R\,dR}{\left(R^2+z^2\right)^\frac{3}{2}}\\&=\frac{z\sigma}{2\epsilon_0}\lim\limits_{a\to\infty}\left[-\frac{1}{\sqrt{R^2+z^2}}\right]_0^a\\&=\frac{z\sigma}{2\epsilon_0}\lim\limits_{a\to\infty}\left(\frac{1}{\sqrt{z^2}}-\frac{1}{\sqrt{a^2+z^2}}\right)\\&=\frac{z\sigma}{2\epsilon_0}\frac{1}{\lvert z\rvert}\\&=\frac{1}{2\epsilon_0}\sigma\frac{z}{\lvert z\rvert}\end{aligned}
  
  So the field points out from the plane, and it does not fall off with distance at all!
  
  January 10, 2012
  
  ## Currents
  
  Part of the reason that the Biot-Savart law isn’t usually stated in the way I did is that it’s really about currents, which are charges in motion. The point charge $q$ moving with velocity $v$ does give a sort of a current, but it’s so extremely localized that it doesn’t match with our usual notion of “current”. A better example is a current flowing along a curve (without boundary) $c$ with a (constant) charge density of $\lambda$. It’s possible to carry through the discussion with a variable charge density, but then things get more complicated.
  
  Anyway, just like the electric field the magnetic field obeys a superposition principle, so we can add up the contributions to the magnetic field from all the tiny differential bits of a current-carrying curve by taking an integral. The differential element of charge is again $\lambda ds=\lambda\lvert c'(t)\rvert dt$. The velocity is in the direction of the curve — unit vector $\frac{c'(t)}{\lvert c'(t)\rvert}$ — and has length $\lvert v\rvert$. Thus the $qv$ term near a point is $\lambda\lvert v\rvert c'(t)dt=\lambda\lvert v\rvert ds$. We will take the charge density $\lambda$ as charge per unit of distance and the speed $\lvert v\rvert$ as distance per unit of time, and combine them into the current $I=\lambda\lvert v\rvert$ as the charge flowing through this point on the curve per unit of time. For a curve $r=c(t)$ we have the integral:
  
  $\displaystyle B(p)=\int\limits_c\frac{\mu_0}{4\pi}\frac{Idr\times(p-r)}{\lvert p-r\rvert^3}$
  
  As an example, let’s take the infinite line of charge and set it in motion with a speed $s$ along the $z$-axis. The charge density $\lambda$ makes for a current $I=\lambda s$ up the line. Of course, if the current is negative then the charge is just moving in the opposite direction, down the line. The obvious parameterization is $c(t)=(0,0,t)$, so we have $c'(t)=(0,0,1)$ and $p-r=(x,y,z-t)$. Plugging in we find:
  
  \displaystyle\begin{aligned}B(p)&=\int\limits_{-\infty}^\infty\frac{\mu_0\lambda s}{4\pi}\frac{(0,0,1)\times(x,y,z-t)}{\left(x^2+y^2+(z-t)^2\right)^\frac{3}{2}}dt\\&=\frac{\mu_0\lambda s}{4\pi}\int\limits_{-\infty}^\infty\frac{(-y,x,0)}{\left(x^2+y^2+(z-t)^2\right)^\frac{3}{2}}dt\\&=\frac{\mu_0\lambda s}{4\pi}(-y,x,0)\int\limits_{-\infty}^\infty\frac{dt}{\left(x^2+y^2+(z-t)^2\right)^\frac{3}{2}}\\&=\frac{\mu_0\lambda s}{4\pi}(-y,x,0)\int\limits_\infty^{-\infty}\frac{-d\tau}{\left(\rho^2+\tau^2\right)^\frac{3}{2}}\\&=\frac{\mu_0\lambda s}{4\pi}(-y,x,0)\int\limits_{-\infty}^\infty\frac{d\tau}{\left(\rho^2+\tau^2\right)^\frac{3}{2}}\end{aligned}
  
  where I’ve used a couple convenient substitutions to put the integral into exactly the same form as last time. We can reuse all that work to continue:
  
  \displaystyle\begin{aligned}B(p)&=\frac{\mu_0\lambda s}{4\pi}(-y,x,0)\frac{2}{\rho^2}\\&=\frac{\mu_0}{2\pi}\frac{\lambda s}{x^2+y^2}(-y,x,0)\\&=\frac{\mu_0}{2\pi}\frac{\lambda s}{\sqrt{x^2+y^2}}\frac{(-y,x,0)}{\sqrt{x^2+y^2}}\\&=\frac{\mu_0}{2\pi}\frac{\lambda s}{\lvert(-y,x,0)\rvert}\frac{(-y,x,0)}{\lvert(-y,x,0)\rvert}\end{aligned}
  
  We find again that the magnetic field now falls off as the first power of the distance from the line current. As for the direction, it wraps around the line in accordance with the famous “right hand rule”; if you place the thumb of your right hand along the $z$-axis, the field curls around the line in the same direction as your fingers.
  
  As it happens, despite how popular the rule is it’s purely conventional, with no actual physical significance. It’s hard to explain just why that is right now, but it will become clear later. For now, I can justify that it makes no difference in the effect of currents on moving charges, since the Biot-Savart law involves a triple vector product which can be rewritten:
  
  $\displaystyle a\times(b\times c)=(a\cdot c)b-(a\cdot b)c$
  
  which formula involves no cross products and no choice of right-hand or left-hand rules.
  
  January 7, 2012
  
  ## Charge Distibutions
  
  The superposition principle for the electric field extends to the realm of continuous distributions, with the sum replaced by an appropriate integral.
  
  For example, let’s say we have a curve $c:[0,1]\to\mathbb{R}^3$, and along this curve we have a charge. It makes sense to measure the charge in units per unit of distance, like coulombs per meter. We can even let it vary from point to point, getting a function $q(t)$ describing the charge per unit length near the point with parameter $t$. To be a little more explicit, if $ds=\lvert c'(t)\rvert dt$ is the “line element” that measures a tiny bit of distance near the point $c(t)$, then $q(t)\lvert c'(t)\rvert dt$ measures a little bit of charge near that point.
  
  We can now use the Coulomb law to see what electric field this tiny bit of charge creates at a point with position vector $p$:
  
  $\displaystyle\frac{1}{4\pi\epsilon_0}\frac{q(t)\lvert c'(t)\rvert dt}{\lvert p-c(t)\rvert^3}\left(p-c(t)\right)$
  
  since the displacement vector from $c(t)$ to $p$ is $p-c(t)$. Now we can take this “differential electric field” and integrate it over the curve, adding up all the tiny contributions to the field at $p$ made by all the tiny bits of charge along the curve.
  
  As an example, let’s consider an infinite line of charge along the $z$ axis with a constant charge density of $\lambda$; a piece of the line of length $l$ will have charge $\lambda l$. Admittedly, this is not a finite-length curve like above, but the same principle applies. We set $c(t)=(0,0,t)$, so $c'(t)=(0,0,1)$ and $\lvert c'(t)\rvert=1$.
  
  Geometric considerations tell us that the electric field generated by the line at a point $p$ is contained in the same plane that contains the line and the point. We can also tell that the field points directly perpendicular to the line; if $p=(x,y,z)$ then the vertical component induced by the chunk at $(0,0,z+d)$ is cancelled out by the component induced by the chunk at $(0,0,z-d)$. Indeed, we can check that the first gives us
  
  $\displaystyle\frac{\lambda}{4\pi\epsilon_0}\frac{(x,y,-d)}{\left(x^2+y^2+d^2\right)^\frac{3}{2}}\,dt$
  
  while the second gives us
  
  $\displaystyle\frac{\lambda}{4\pi\epsilon_0}\frac{(x,y,+d)}{\left(x^2+y^2+d^2\right)^\frac{3}{2}}\,dt$
  
  and the vertical components of these two exactly cancel each other out.
  
  All that remains is to calculate the horizontal component. Without loss of generality we can consider the point $p=(x,0,0)$, and we must calculate the $x$-component of the electric field by taking the integral
  
  $\displaystyle E_x(x,0,0)=\frac{\lambda x}{4\pi\epsilon_0}\int\limits_{-\infty}^\infty\frac{1}{\left(x^2+t^2\right)^\frac{3}{2}}\,dt$
  
  We need an antiderivative of the integrand $\left(x^2+t^2\right)^{-\frac{3}{2}}$, and it turns out that $x^{-2}t\left(x^2+t^2\right)^{-\frac{1}{2}}$ fits the bill. Indeed, we check:
  
  \displaystyle\begin{aligned}\frac{\partial}{\partial t}\frac{t}{x^2\left(x^2+t^2\right)^\frac{1}{2}}&=\frac{1}{x^2}\frac{\partial}{\partial t}\frac{t}{\left(x^2+t^2\right)^\frac{1}{2}}\\&=\frac{1}{x^2}\frac{\left(x^2+t^2\right)^\frac{1}{2}\frac{\partial}{\partial t}t-t\frac{\partial}{\partial t}\left(\left(x^2+t^2\right)^\frac{1}{2}\right)}{\left(x^2+t^2\right)}\\&=\frac{1}{x^2}\frac{\left(x^2+t^2\right)^\frac{1}{2}-\frac{t}{2}\left(x^2+t^2\right)^{-\frac{1}{2}}\frac{\partial}{\partial t}\left(x^2+t^2\right)}{\left(x^2+t^2\right)}\\&=\frac{1}{x^2}\frac{\left(x^2+t^2\right)\left(x^2+t^2\right)^{-\frac{1}{2}}-\frac{t}{2}\left(x^2+t^2\right)^{-\frac{1}{2}}2t}{\left(x^2+t^2\right)}\\&=\frac{1}{x^2}\frac{x^2+t^2-t^2}{\left(x^2+t^2\right)^\frac{3}{2}}\\&=\frac{1}{\left(x^2+t^2\right)^\frac{3}{2}}\end{aligned}
  
  as asserted. Thus we continue the integration:
  
  \displaystyle\begin{aligned}E_x(x,0,0)&=\frac{\lambda x}{4\pi\epsilon_0}\int\limits_{-\infty}^\infty\frac{1}{\left(x^2+t^2\right)^\frac{3}{2}}\,dt\\&=\frac{\lambda x}{4\pi\epsilon_0}\lim\limits_{a,b\to\infty}\left[\frac{t}{x^2\sqrt{x^2+t^2}}\right]_{-a}^b\\&=\frac{\lambda}{4\pi\epsilon_0x}\lim\limits_{a,b\to\infty}\left(\frac{b}{\sqrt{x^2+b^2}}-\frac{-a}{\sqrt{x^2+a^2}}\right)\\&=\frac{\lambda}{4\pi\epsilon_0x}(1+1)\\&=\frac{1}{2\pi\epsilon_0}\frac{\lambda}{x}\end{aligned}
  
  which is a nice, tidy value. More generally, we find
  
  \displaystyle\begin{aligned}E(x,y,z)&=\frac{1}{2\pi\epsilon_0}\frac{\lambda}{\sqrt{x^2+y^2}}\frac{(x,y,0)}{\sqrt{x^2+y^2}}\\&=\frac{1}{2\pi\epsilon_0}\frac{\lambda}{\lvert(x,y,0)\rvert}\frac{(x,y,0)}{\lvert(x,y,0)\rvert}\end{aligned}
  
  pointing directly away from the (positively) charged line, neither up nor down, and falling off in magnitude as the first power of the distance from the line.
  
  January 6, 2012
  
  ## The Electric Field
  
  What happens if instead of two particles we have three? For simplicity, let’s just consider the resultant force on one of the three particles; say it has charge $q$ and the other particles have charges $q_1$ and $q_2$, with displacement vectors $r_1$ and $r_2$, respectively. The Coulomb law tells us that the first of the other particles exerts a force
  
  $\displaystyle F_1=\frac{1}{4\pi\epsilon_0}\frac{qq_1}{\lvert r_1\rvert^3}r_1$
  
  while the second exerts a force
  
  $\displaystyle F_2=\frac{1}{4\pi\epsilon_0}\frac{qq_2}{\lvert r_2\rvert^3}r_2$
  
  As usual, we just add the forces together to get the resultant
  
  \displaystyle\begin{aligned}F&=F_1+F_2\\&=\frac{1}{4\pi\epsilon_0}\frac{qq_1}{\lvert r_1\rvert^3}r_1+\frac{1}{4\pi\epsilon_0}\frac{qq_2}{\lvert r_2\rvert^3}r_2\\&=q\left(\frac{1}{4\pi\epsilon_0}\frac{q_1}{\lvert r_1\rvert^3}r_1+\frac{1}{4\pi\epsilon_0}\frac{q_2}{\lvert r_2\rvert^3}r_2\right)\end{aligned}
  
  Of course, as we add more particles we just add more terms to the sum. But always we find that the force on the “test” particle with charge $q$ times some vector field: $F=qE$. Coulomb’s law tells us that a single point of charge $q'$ at the origin gives rise to a vector field whose value at the point with position vector $r$ is
  
  $\displaystyle E=\frac{1}{4\pi\epsilon_0}\frac{q'}{\lvert r\rvert^3}r$
  
  That is, it’s sort of like the radial vector field only instead of getting larger as we move away from the origin, it gets smaller, falling off as the square of the distance.
  
  As we’ve just seen, the superposition principle for forces leads to a superposition principle for the electric field: the field generated by two or more sources is the (vector) sum of the fields generated by each source separately.
  
  January 5, 2012
  
  ## The Biot-Savart Law
  
  What I’m going to present is slightly different from what usually gets called the Biot-Savart law, but I think it’s the most natural parallel to the Coulomb law. As far as I can tell, it doesn’t get stressed all that much in modern coverage; in the first course I took on electromagnetism way back in the summer of 1994 I didn’t even see the name written down and parsed what I heard as “bee-ohs of r”. So at least you know how it’s supposed to be pronounced.
  
  If we have two charged particles that are both moving, then they also feel a different force than the electric one. We call the excess the magnetic force. In magnitude it’s proportional to both the magnitudes of the charges and their speeds, and inversely proportional to the square of the distance between them, and then it gets complicated. It’s probably going to be easier to write this down as a formula first.
  
  $\displaystyle F=\frac{\mu_0}{4\pi}\frac{qv\times(q'v'\times\hat{r})}{\lvert r^2\rvert}=\frac{\mu_0}{4\pi}\frac{qv\times(q'v'\times r)}{\lvert r^3\rvert}$
  
  So many cross products! Like last time, this is the force exerted on the first particle by the second; $r$ is the vector pointing from the second particle to the first, and $\hat{r}=\frac{r}{\lvert r\rvert}$ is the unit vector pointing in the same direction. From this formula, we see that the force is perpendicular to the direction the first particle is moving — the magnetic force can only turn a particle, not speed it up or slow it down — and in the plane spanned by the direction the second particle is moving and the displacement vector between them.
  
  Again, we’ve written the constant of proportionality in a weird way. The “magnetic constant” $\mu_0$ now appears in the numerator, so its units are almost like the inverse of those on the electric constant. But we’ve also got two velocities to contend with; these lead to a factor of time squared over area, resulting in mass times distance over charge squared. In the SI system we have another convenience unit called the “henry”, with symbol $H$, defined by
  
  $\displaystyle\mathrm{H}=\frac{\mathrm{m}^2\cdot\mathrm{kg}}{\mathrm{C}^2}$
  
  which lets us write $\mu_0$ in units of henries per meter. Specifically, the SI units give it a value of $\mu_0=4\pi\times10^{-7}\frac{\mathrm{H}}{\mathrm{m}}\approx1.2566370614\times10^{-6}\frac{\mathrm{H}}{\mathrm{m}}$. Yes, I know that this makes the proportionality constant look that much weirder, since it just works out to $10^{-7}$, but still.
  
  January 4, 2012
  
  ## Coulomb’s Law
  
  I want to start in on a new topic, but it might be a bit of a surprise. I haven’t really talked about any applications much at all. Still, physics is a huge area of application for mathematics, and a lot of mathematics wouldn’t have been discovered without the physical motivation.
  
  But why didn’t I talk about classical Newtonian mechanics when discussing calculus? As it happens, the application of calculus to Newtonian mechanics is pretty straightforward and boring; the first-pass coverage is pretty much all there is. Electromagnatism, however, is another story. The first-pass treatment is basically all about vector calculus, and that’s great; we’ll go over that a bit, which may be review for some people. But there’s a much deeper story to even classical electromagnetism that uses all this stuff I’ve been saying about differential geometry lately. But for now everything will take place in regular three-dimensional space.
  
  Anyway, we start with Coulomb’s law. This is something that can be experimentally determined, but we’ll take it as an assertion — another axiom — and build from there. When we have two charged particles, they exert a force on each other. The magnitude of the force is proportional to the magnitude of the charge on each particle, and inversely proportional to the square of the distance between them. The direction of the force exerted on the first particle by the second is in the direction of the vector pointing from the second to the first if their charges have the same sign, and in the opposite direction if they have different signs. That is, charges of the same sign push each other apart, while charges of the opposite sign pull each other together.
  
  Let’s write this out in a formula: if the charge on the two particles are $q$ and $q'$ — measured as a positive or negative multiple of some unit — and if the displacment vector from the second particle to the first is $r$, then we have the following formula for the magnitude of the force exerted on the first particle by the second:
  
  $\displaystyle\lvert F\rvert=\frac{1}{4\pi\epsilon_0}\frac{\lvert q\rvert\lvert q'\rvert}{\lvert r\rvert^2}$
  
  since the distance between the particles is given by the length of $r$. To get the direction, we use the unit vector $\hat{r}=\frac{r}{\lvert r\rvert}$ that points from the second particle to the first. It turns out that we also just need to drop the absolute value signs on the charges:
  
  $\displaystyle F=\frac{1}{4\pi\epsilon_0}\frac{qq'}{\lvert r\rvert^2}\hat{r}=\frac{1}{4\pi\epsilon_0}\frac{qq'}{\lvert r\rvert^3}r$
  
  Now, I haven’t explained why the constant of proportionality is written in the weird form $\frac{1}{4\pi\epsilon_0}$, and I’m not going to quite yet. I’ll just say that that’s all this is: a constant that gets the scaling right, not to mention the units. On the right, we’ve got (other than the constant) units of charge squared over area, while on the left we’ve got force, which is mass times distance over time squared. The “electric constant” $\epsilon_0$, thus, must carry units of time squared times charge squared over mass times volume.
  
  In the common SI (metric) system we measure charge in coulombs — after Coulomb’s law — with symbol $\mathrm{C}$ and we have a convenience unit called the “farad” with symbol $\mathrm{F}$, which is given by
  
  $\displaystyle\mathrm{F}=\frac{\mathrm{s}^2\cdot\mathrm{C}^2}{\mathrm{m}^2\cdot\mathrm{kg}}$
  
  Using these units, we can write the electric constant with units of farads per meter. Incidentally, it has the measured value of approximately $\epsilon_0=8.85418782\times10^{-12}\frac{\mathrm{F}}{\mathrm{m}}$, but the exact value will be largely irrelevant to us.
  
  January 3, 2012
explanation: The provided text is a series of excerpts from a blog or lecture notes on electromagnetism, specifically discussing Coulomb's law, the electric field, and the Biot-Savart law. The text does not contain a specific question or a question and answer. It is a detailed explanation of the principles and mathematical formulations related to the forces between charged particles and the magnetic fields generated by moving charges.
distilabel_metadata.content: Evaluate the user given text extract and determine if it contains a math question and optionally and answer to this question.
  
  Output rules:
  
  1. Briefly describe the document and mention if it contains a question or a question and answer.
  2. Finalize the output with: Label: no-question,question,question-and-answer,multiple-question,multiple-question-and-answer
distilabel_metadata.role: system
distilabel_metadata.content: # 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
  
  ## Gauss’ Law
  
  Rather than do any more messy integrals for special cases we will move to a more advanced fact about the electric field. We start with Coulomb’s law:
  
  $\displaystyle E(r)=\frac{1}{4\pi\epsilon_0}\frac{q}{\lvert r\rvert^3}r$
  
  and we replace our point charge $q$ with a charge distribution $\rho$ over some region of $\mathbb{R}^3$. This may be concentrated on some surfaces, or on curves, or at points, or even some combination of the these; it doesn’t matter. What does matter is that we can write the amount contributed to the electric field at $r$ by the charge a point $s$ as
  
  $\displaystyle dE(r)=\frac{1}{4\pi\epsilon_0}\frac{\rho(s)}{\lvert r-s\rvert^3}(r-s)d^3s$
  
  So to get the whole electric field, we integrate over all of space!
  
  $\displaystyle E(r)=\frac{1}{4\pi\epsilon_0}\int\limits_{\mathbb{R}^3}\frac{\rho(s)}{\lvert r-s\rvert^3}(r-s)d^3s$
  
  Now we want to take the divergence of each side with respect to $r$. On the right we can pull the divergence inside the integral, since the integral is over $s$ rather than $r$. But we’ve still got a hangup.
  
  Let’s consider this divergence:
  
  $\displaystyle\nabla\cdot\left(\frac{r}{\lvert r\rvert^3}\right)$
  
  Away from $r=0$ this is pretty straightforward to calculate. In fact, you can do it by hand with partial derivatives, but I know a sneakier way to see it.
  
  If you remember our nontrivial homology classes, this is closely related to the one we built on $\mathbb{R}^3$ — the case where $n=2$. In that case we got a $2$-form, not a vector field, but remember that we’re working in our standard $\mathbb{R}^3$ with the standard metric, which lets us use the Hodge star to flip a $2$-form into a $1$-form, and a $1$-form into a vector field! The result is exactly the field we’re taking the divergence of; and luckily enough the divergence of this vector field is exactly what corresponds to the exterior derivative on the $2$-form, which we spent so much time proving was zero in the first place!
  
  So this divergence is automatically zero for any $r\neq0$, while at zero it’s not really well-defined. Still, in the best tradition of physicists we’ll fail the math and calculate anyway; what if it was well-defined, enough to take the integral inside the unit sphere at least? Then the divergence theorem tells us that the integral of the divergence through the ball is the same as the integral of the vector field itself through the surface of the sphere:
  
  $\displaystyle\int\limits_B\nabla\cdot\left(\frac{r}{\lvert r\rvert^3}\right)=\int\limits_{S^2}\left(\frac{r}{\lvert r\rvert^3}\right)\cdot dS=\int\limits_{S^2}r\cdot dS=4\pi$
  
  since the field is just the unit radial vector field on the sphere, which integrates to give the surface area of the sphere: $4\pi$. Remember that the fact that this is not zero is exactly why we said the $2$-form cannot be exact.
  
  So what we’re saying is that this divergence doesn’t really work in the way we usually think of it, but we can pretend it’s something that integrates to give us $4\pi$ whenever our region of integration contains the point $r=0$. We’ll call this something $4\pi\delta(r)$, where the $\delta$ is known as the “Dirac delta-function”, despite not actually being a function. Incidentally, it’s actually very closely related to the Kronecker delta
  
  So anyway, that means we can calculate
  
  $\displaystyle\nabla\cdot E(r)=\frac{1}{4\pi\epsilon_0}\int\rho(s)\nabla\cdot\left(\frac{r-s}{\lvert r-s\rvert^3}\right)d^3s=\frac{1}{4\pi\epsilon_0}\int\rho(s)4\pi\delta(r-s)d^3s$
  
  This integrand is zero wherever $r\neq s$, so the only point that can contribute at all is $\rho(r)$. We may as well consider it a constant and pull it outside the integral:
  
  $\displaystyle\nabla\cdot E(r)=\frac{\rho(r)}{\epsilon_0}\int\delta(r-s)d^3s=\frac{\rho(r)}{\epsilon_0}$
  
  where we have integrated away the delta function to get $1$. Notice how this is like we usually use the Kronecker delta to sum over one variable and only get a nonzero term where it equals the set value of the other variable.
  
  The result is known as Gauss’ law:
  
  $\displaystyle\nabla\cdot E(r)=\frac{\rho(r)}{\epsilon_0}$
  
  and, incidentally, shows why we wrote the proportionality constant the way we did when defining Coulomb’s law. The meaning is that the divergence of the electric field at a point is proportional to the amount of charge distributed at that point, and the constant of proportionality is exactly $\frac{1}{\epsilon_0}$.
  
  If we integrate both sides over some region $U\subseteq\mathbb{R}^3$ we can rewrite the law in “integral form”:
  
  $\displaystyle\int_U\frac{\rho(r)}{\epsilon_0}d^3r=\int_U\nabla\cdot Ed^3r=\int_{\partial U}E\cdot dS$
  
  That is: the outward flow of the electric field through a closed surface is equal to the integral of the charge contained within the surface. The second step here is, of course, the divergence theorem, but this is such a popular application that people often call this “Gauss’ theorem”. Of course, there are two very different statements here: one is the physical identification of electrical divergence with charge distribution, and the other is the geometric special case of Stokes’ theorem. Properly speaking, only the first is named for Gauss.
  
  January 11, 2012
  
  ## Charged Rings and Planes
  
  Let’s work out a couple more examples that may come in handy in the future, if only to get the practice. We’ll start with a “charged ring” which is a charge distribution on a circle. Specifically, we may as well consider the circle of radius $R$ in the $x$-$y$ plane: $c(t)=(R\cos(t),R\sin(t),0)$. If the charge density is $\lambda$, then the total charge is $2\pi R\lambda$.
  
  First of all, symmetry tells us that we may as well just consider the points of the form $(x,0,z)$ for $x\geq0$, and we will first specialize to the points $(0,0,z)$. Along this line, the field generated by a little piece of charge on one side of the circle points across to the other side of the circle and out further along the $z$ axis; the piece on the other side cancels the horizontal contribution, but adds to the outward push. This outward direction along the $z$ axis is all that we need to calculate in this case.
  
  The Coulomb law tells us that the differential element of charge at $c(t)$ is $q(t)\lvert c'(t)\rvert dt=\lambda Rdt$. The displacement vector is $(-R\cos(t),-R\sin(t),z)$, and its length is $\sqrt{R^2+z^2}$. And so the integral is
  
  \displaystyle\begin{aligned}E_z(0,0,z)&=\int\limits_0^{2\pi}\frac{1}{4\pi\epsilon_0}\frac{\lambda Rz}{\left(R^2+z^2\right)^\frac{3}{2}}dt\\&=\frac{1}{4\pi\epsilon_0}\frac{(2\pi R\lambda)z}{\left(R^2+z^2\right)^\frac{3}{2}}\end{aligned}
  
  So there’s some extra push near the origin, but when $z$ gets much bigger than $R$, this is effectively the Coulomb law again for a point source with charge \$latex $2\pi R\lambda$ — the total charge on the ring.
  
  Pushing off of the center line is a bit rougher. The differential element of charge is the same, of course, but now the displacement vector is $(x-R\cos(t),-R\sin(t),z)$. Its magnitude is $\sqrt{x^2+z^2+R^2-2xR\cos(t)}$, leading to the integral
  
  $\displaystyle E(x,0,z)=\int\limits_0^{2\pi}\frac{1}{4\pi\epsilon_0}\frac{\lambda R}{\left(x^2+z^2+R^2-2xR\cos(t)\right)^\frac{3}{2}}(x-R\cos(t),-R\sin(t),z)dt$
  
  This is, not to put too fine a point on it, really ugly, and it would take us way too far afield to go into it.
  
  However, we can use what we know to determine the electric field generated by a charged plane with a charge density of $\sigma$, measured in charge per unit area. At any point $(x,y,z)$ we can drop a perpendicular to the plane. We cut the plane into charged rings of radius $R$ and width $dR$, which gives us a (linear) charge density of $\lambda=\sigma dR$. The result above says that the ring of radius $R$ has only a $z$ component, which is
  
  $\displaystyle E_z(x,y,z)=\frac{1}{4\pi\epsilon_0}\frac{(2\pi R\sigma dR)z}{\left(R^2+z^2\right)^\frac{3}{2}}=\frac{z\sigma}{2\epsilon_0}\frac{RdR}{\left(R^2+z^2\right)^\frac{3}{2}}$
  
  So we integrate this out over all radii:
  
  \displaystyle\begin{aligned}E_z(x,y,z)&=\frac{z\sigma}{2\epsilon_0}\int\limits_0^\infty\frac{R\,dR}{\left(R^2+z^2\right)^\frac{3}{2}}\\&=\frac{z\sigma}{2\epsilon_0}\lim\limits_{a\to\infty}\int\limits_0^a\frac{R\,dR}{\left(R^2+z^2\right)^\frac{3}{2}}\\&=\frac{z\sigma}{2\epsilon_0}\lim\limits_{a\to\infty}\left[-\frac{1}{\sqrt{R^2+z^2}}\right]_0^a\\&=\frac{z\sigma}{2\epsilon_0}\lim\limits_{a\to\infty}\left(\frac{1}{\sqrt{z^2}}-\frac{1}{\sqrt{a^2+z^2}}\right)\\&=\frac{z\sigma}{2\epsilon_0}\frac{1}{\lvert z\rvert}\\&=\frac{1}{2\epsilon_0}\sigma\frac{z}{\lvert z\rvert}\end{aligned}
  
  So the field points out from the plane, and it does not fall off with distance at all!
  
  January 10, 2012
  
  ## Currents
  
  Part of the reason that the Biot-Savart law isn’t usually stated in the way I did is that it’s really about currents, which are charges in motion. The point charge $q$ moving with velocity $v$ does give a sort of a current, but it’s so extremely localized that it doesn’t match with our usual notion of “current”. A better example is a current flowing along a curve (without boundary) $c$ with a (constant) charge density of $\lambda$. It’s possible to carry through the discussion with a variable charge density, but then things get more complicated.
  
  Anyway, just like the electric field the magnetic field obeys a superposition principle, so we can add up the contributions to the magnetic field from all the tiny differential bits of a current-carrying curve by taking an integral. The differential element of charge is again $\lambda ds=\lambda\lvert c'(t)\rvert dt$. The velocity is in the direction of the curve — unit vector $\frac{c'(t)}{\lvert c'(t)\rvert}$ — and has length $\lvert v\rvert$. Thus the $qv$ term near a point is $\lambda\lvert v\rvert c'(t)dt=\lambda\lvert v\rvert ds$. We will take the charge density $\lambda$ as charge per unit of distance and the speed $\lvert v\rvert$ as distance per unit of time, and combine them into the current $I=\lambda\lvert v\rvert$ as the charge flowing through this point on the curve per unit of time. For a curve $r=c(t)$ we have the integral:
  
  $\displaystyle B(p)=\int\limits_c\frac{\mu_0}{4\pi}\frac{Idr\times(p-r)}{\lvert p-r\rvert^3}$
  
  As an example, let’s take the infinite line of charge and set it in motion with a speed $s$ along the $z$-axis. The charge density $\lambda$ makes for a current $I=\lambda s$ up the line. Of course, if the current is negative then the charge is just moving in the opposite direction, down the line. The obvious parameterization is $c(t)=(0,0,t)$, so we have $c'(t)=(0,0,1)$ and $p-r=(x,y,z-t)$. Plugging in we find:
  
  \displaystyle\begin{aligned}B(p)&=\int\limits_{-\infty}^\infty\frac{\mu_0\lambda s}{4\pi}\frac{(0,0,1)\times(x,y,z-t)}{\left(x^2+y^2+(z-t)^2\right)^\frac{3}{2}}dt\\&=\frac{\mu_0\lambda s}{4\pi}\int\limits_{-\infty}^\infty\frac{(-y,x,0)}{\left(x^2+y^2+(z-t)^2\right)^\frac{3}{2}}dt\\&=\frac{\mu_0\lambda s}{4\pi}(-y,x,0)\int\limits_{-\infty}^\infty\frac{dt}{\left(x^2+y^2+(z-t)^2\right)^\frac{3}{2}}\\&=\frac{\mu_0\lambda s}{4\pi}(-y,x,0)\int\limits_\infty^{-\infty}\frac{-d\tau}{\left(\rho^2+\tau^2\right)^\frac{3}{2}}\\&=\frac{\mu_0\lambda s}{4\pi}(-y,x,0)\int\limits_{-\infty}^\infty\frac{d\tau}{\left(\rho^2+\tau^2\right)^\frac{3}{2}}\end{aligned}
  
  where I’ve used a couple convenient substitutions to put the integral into exactly the same form as last time. We can reuse all that work to continue:
  
  \displaystyle\begin{aligned}B(p)&=\frac{\mu_0\lambda s}{4\pi}(-y,x,0)\frac{2}{\rho^2}\\&=\frac{\mu_0}{2\pi}\frac{\lambda s}{x^2+y^2}(-y,x,0)\\&=\frac{\mu_0}{2\pi}\frac{\lambda s}{\sqrt{x^2+y^2}}\frac{(-y,x,0)}{\sqrt{x^2+y^2}}\\&=\frac{\mu_0}{2\pi}\frac{\lambda s}{\lvert(-y,x,0)\rvert}\frac{(-y,x,0)}{\lvert(-y,x,0)\rvert}\end{aligned}
  
  We find again that the magnetic field now falls off as the first power of the distance from the line current. As for the direction, it wraps around the line in accordance with the famous “right hand rule”; if you place the thumb of your right hand along the $z$-axis, the field curls around the line in the same direction as your fingers.
  
  As it happens, despite how popular the rule is it’s purely conventional, with no actual physical significance. It’s hard to explain just why that is right now, but it will become clear later. For now, I can justify that it makes no difference in the effect of currents on moving charges, since the Biot-Savart law involves a triple vector product which can be rewritten:
  
  $\displaystyle a\times(b\times c)=(a\cdot c)b-(a\cdot b)c$
  
  which formula involves no cross products and no choice of right-hand or left-hand rules.
  
  January 7, 2012
  
  ## Charge Distibutions
  
  The superposition principle for the electric field extends to the realm of continuous distributions, with the sum replaced by an appropriate integral.
  
  For example, let’s say we have a curve $c:[0,1]\to\mathbb{R}^3$, and along this curve we have a charge. It makes sense to measure the charge in units per unit of distance, like coulombs per meter. We can even let it vary from point to point, getting a function $q(t)$ describing the charge per unit length near the point with parameter $t$. To be a little more explicit, if $ds=\lvert c'(t)\rvert dt$ is the “line element” that measures a tiny bit of distance near the point $c(t)$, then $q(t)\lvert c'(t)\rvert dt$ measures a little bit of charge near that point.
  
  We can now use the Coulomb law to see what electric field this tiny bit of charge creates at a point with position vector $p$:
  
  $\displaystyle\frac{1}{4\pi\epsilon_0}\frac{q(t)\lvert c'(t)\rvert dt}{\lvert p-c(t)\rvert^3}\left(p-c(t)\right)$
  
  since the displacement vector from $c(t)$ to $p$ is $p-c(t)$. Now we can take this “differential electric field” and integrate it over the curve, adding up all the tiny contributions to the field at $p$ made by all the tiny bits of charge along the curve.
  
  As an example, let’s consider an infinite line of charge along the $z$ axis with a constant charge density of $\lambda$; a piece of the line of length $l$ will have charge $\lambda l$. Admittedly, this is not a finite-length curve like above, but the same principle applies. We set $c(t)=(0,0,t)$, so $c'(t)=(0,0,1)$ and $\lvert c'(t)\rvert=1$.
  
  Geometric considerations tell us that the electric field generated by the line at a point $p$ is contained in the same plane that contains the line and the point. We can also tell that the field points directly perpendicular to the line; if $p=(x,y,z)$ then the vertical component induced by the chunk at $(0,0,z+d)$ is cancelled out by the component induced by the chunk at $(0,0,z-d)$. Indeed, we can check that the first gives us
  
  $\displaystyle\frac{\lambda}{4\pi\epsilon_0}\frac{(x,y,-d)}{\left(x^2+y^2+d^2\right)^\frac{3}{2}}\,dt$
  
  while the second gives us
  
  $\displaystyle\frac{\lambda}{4\pi\epsilon_0}\frac{(x,y,+d)}{\left(x^2+y^2+d^2\right)^\frac{3}{2}}\,dt$
  
  and the vertical components of these two exactly cancel each other out.
  
  All that remains is to calculate the horizontal component. Without loss of generality we can consider the point $p=(x,0,0)$, and we must calculate the $x$-component of the electric field by taking the integral
  
  $\displaystyle E_x(x,0,0)=\frac{\lambda x}{4\pi\epsilon_0}\int\limits_{-\infty}^\infty\frac{1}{\left(x^2+t^2\right)^\frac{3}{2}}\,dt$
  
  We need an antiderivative of the integrand $\left(x^2+t^2\right)^{-\frac{3}{2}}$, and it turns out that $x^{-2}t\left(x^2+t^2\right)^{-\frac{1}{2}}$ fits the bill. Indeed, we check:
  
  \displaystyle\begin{aligned}\frac{\partial}{\partial t}\frac{t}{x^2\left(x^2+t^2\right)^\frac{1}{2}}&=\frac{1}{x^2}\frac{\partial}{\partial t}\frac{t}{\left(x^2+t^2\right)^\frac{1}{2}}\\&=\frac{1}{x^2}\frac{\left(x^2+t^2\right)^\frac{1}{2}\frac{\partial}{\partial t}t-t\frac{\partial}{\partial t}\left(\left(x^2+t^2\right)^\frac{1}{2}\right)}{\left(x^2+t^2\right)}\\&=\frac{1}{x^2}\frac{\left(x^2+t^2\right)^\frac{1}{2}-\frac{t}{2}\left(x^2+t^2\right)^{-\frac{1}{2}}\frac{\partial}{\partial t}\left(x^2+t^2\right)}{\left(x^2+t^2\right)}\\&=\frac{1}{x^2}\frac{\left(x^2+t^2\right)\left(x^2+t^2\right)^{-\frac{1}{2}}-\frac{t}{2}\left(x^2+t^2\right)^{-\frac{1}{2}}2t}{\left(x^2+t^2\right)}\\&=\frac{1}{x^2}\frac{x^2+t^2-t^2}{\left(x^2+t^2\right)^\frac{3}{2}}\\&=\frac{1}{\left(x^2+t^2\right)^\frac{3}{2}}\end{aligned}
  
  as asserted. Thus we continue the integration:
  
  \displaystyle\begin{aligned}E_x(x,0,0)&=\frac{\lambda x}{4\pi\epsilon_0}\int\limits_{-\infty}^\infty\frac{1}{\left(x^2+t^2\right)^\frac{3}{2}}\,dt\\&=\frac{\lambda x}{4\pi\epsilon_0}\lim\limits_{a,b\to\infty}\left[\frac{t}{x^2\sqrt{x^2+t^2}}\right]_{-a}^b\\&=\frac{\lambda}{4\pi\epsilon_0x}\lim\limits_{a,b\to\infty}\left(\frac{b}{\sqrt{x^2+b^2}}-\frac{-a}{\sqrt{x^2+a^2}}\right)\\&=\frac{\lambda}{4\pi\epsilon_0x}(1+1)\\&=\frac{1}{2\pi\epsilon_0}\frac{\lambda}{x}\end{aligned}
  
  which is a nice, tidy value. More generally, we find
  
  \displaystyle\begin{aligned}E(x,y,z)&=\frac{1}{2\pi\epsilon_0}\frac{\lambda}{\sqrt{x^2+y^2}}\frac{(x,y,0)}{\sqrt{x^2+y^2}}\\&=\frac{1}{2\pi\epsilon_0}\frac{\lambda}{\lvert(x,y,0)\rvert}\frac{(x,y,0)}{\lvert(x,y,0)\rvert}\end{aligned}
  
  pointing directly away from the (positively) charged line, neither up nor down, and falling off in magnitude as the first power of the distance from the line.
  
  January 6, 2012
  
  ## The Electric Field
  
  What happens if instead of two particles we have three? For simplicity, let’s just consider the resultant force on one of the three particles; say it has charge $q$ and the other particles have charges $q_1$ and $q_2$, with displacement vectors $r_1$ and $r_2$, respectively. The Coulomb law tells us that the first of the other particles exerts a force
  
  $\displaystyle F_1=\frac{1}{4\pi\epsilon_0}\frac{qq_1}{\lvert r_1\rvert^3}r_1$
  
  while the second exerts a force
  
  $\displaystyle F_2=\frac{1}{4\pi\epsilon_0}\frac{qq_2}{\lvert r_2\rvert^3}r_2$
  
  As usual, we just add the forces together to get the resultant
  
  \displaystyle\begin{aligned}F&=F_1+F_2\\&=\frac{1}{4\pi\epsilon_0}\frac{qq_1}{\lvert r_1\rvert^3}r_1+\frac{1}{4\pi\epsilon_0}\frac{qq_2}{\lvert r_2\rvert^3}r_2\\&=q\left(\frac{1}{4\pi\epsilon_0}\frac{q_1}{\lvert r_1\rvert^3}r_1+\frac{1}{4\pi\epsilon_0}\frac{q_2}{\lvert r_2\rvert^3}r_2\right)\end{aligned}
  
  Of course, as we add more particles we just add more terms to the sum. But always we find that the force on the “test” particle with charge $q$ times some vector field: $F=qE$. Coulomb’s law tells us that a single point of charge $q'$ at the origin gives rise to a vector field whose value at the point with position vector $r$ is
  
  $\displaystyle E=\frac{1}{4\pi\epsilon_0}\frac{q'}{\lvert r\rvert^3}r$
  
  That is, it’s sort of like the radial vector field only instead of getting larger as we move away from the origin, it gets smaller, falling off as the square of the distance.
  
  As we’ve just seen, the superposition principle for forces leads to a superposition principle for the electric field: the field generated by two or more sources is the (vector) sum of the fields generated by each source separately.
  
  January 5, 2012
  
  ## The Biot-Savart Law
  
  What I’m going to present is slightly different from what usually gets called the Biot-Savart law, but I think it’s the most natural parallel to the Coulomb law. As far as I can tell, it doesn’t get stressed all that much in modern coverage; in the first course I took on electromagnetism way back in the summer of 1994 I didn’t even see the name written down and parsed what I heard as “bee-ohs of r”. So at least you know how it’s supposed to be pronounced.
  
  If we have two charged particles that are both moving, then they also feel a different force than the electric one. We call the excess the magnetic force. In magnitude it’s proportional to both the magnitudes of the charges and their speeds, and inversely proportional to the square of the distance between them, and then it gets complicated. It’s probably going to be easier to write this down as a formula first.
  
  $\displaystyle F=\frac{\mu_0}{4\pi}\frac{qv\times(q'v'\times\hat{r})}{\lvert r^2\rvert}=\frac{\mu_0}{4\pi}\frac{qv\times(q'v'\times r)}{\lvert r^3\rvert}$
  
  So many cross products! Like last time, this is the force exerted on the first particle by the second; $r$ is the vector pointing from the second particle to the first, and $\hat{r}=\frac{r}{\lvert r\rvert}$ is the unit vector pointing in the same direction. From this formula, we see that the force is perpendicular to the direction the first particle is moving — the magnetic force can only turn a particle, not speed it up or slow it down — and in the plane spanned by the direction the second particle is moving and the displacement vector between them.
  
  Again, we’ve written the constant of proportionality in a weird way. The “magnetic constant” $\mu_0$ now appears in the numerator, so its units are almost like the inverse of those on the electric constant. But we’ve also got two velocities to contend with; these lead to a factor of time squared over area, resulting in mass times distance over charge squared. In the SI system we have another convenience unit called the “henry”, with symbol $H$, defined by
  
  $\displaystyle\mathrm{H}=\frac{\mathrm{m}^2\cdot\mathrm{kg}}{\mathrm{C}^2}$
  
  which lets us write $\mu_0$ in units of henries per meter. Specifically, the SI units give it a value of $\mu_0=4\pi\times10^{-7}\frac{\mathrm{H}}{\mathrm{m}}\approx1.2566370614\times10^{-6}\frac{\mathrm{H}}{\mathrm{m}}$. Yes, I know that this makes the proportionality constant look that much weirder, since it just works out to $10^{-7}$, but still.
  
  January 4, 2012
  
  ## Coulomb’s Law
  
  I want to start in on a new topic, but it might be a bit of a surprise. I haven’t really talked about any applications much at all. Still, physics is a huge area of application for mathematics, and a lot of mathematics wouldn’t have been discovered without the physical motivation.
  
  But why didn’t I talk about classical Newtonian mechanics when discussing calculus? As it happens, the application of calculus to Newtonian mechanics is pretty straightforward and boring; the first-pass coverage is pretty much all there is. Electromagnatism, however, is another story. The first-pass treatment is basically all about vector calculus, and that’s great; we’ll go over that a bit, which may be review for some people. But there’s a much deeper story to even classical electromagnetism that uses all this stuff I’ve been saying about differential geometry lately. But for now everything will take place in regular three-dimensional space.
  
  Anyway, we start with Coulomb’s law. This is something that can be experimentally determined, but we’ll take it as an assertion — another axiom — and build from there. When we have two charged particles, they exert a force on each other. The magnitude of the force is proportional to the magnitude of the charge on each particle, and inversely proportional to the square of the distance between them. The direction of the force exerted on the first particle by the second is in the direction of the vector pointing from the second to the first if their charges have the same sign, and in the opposite direction if they have different signs. That is, charges of the same sign push each other apart, while charges of the opposite sign pull each other together.
  
  Let’s write this out in a formula: if the charge on the two particles are $q$ and $q'$ — measured as a positive or negative multiple of some unit — and if the displacment vector from the second particle to the first is $r$, then we have the following formula for the magnitude of the force exerted on the first particle by the second:
  
  $\displaystyle\lvert F\rvert=\frac{1}{4\pi\epsilon_0}\frac{\lvert q\rvert\lvert q'\rvert}{\lvert r\rvert^2}$
  
  since the distance between the particles is given by the length of $r$. To get the direction, we use the unit vector $\hat{r}=\frac{r}{\lvert r\rvert}$ that points from the second particle to the first. It turns out that we also just need to drop the absolute value signs on the charges:
  
  $\displaystyle F=\frac{1}{4\pi\epsilon_0}\frac{qq'}{\lvert r\rvert^2}\hat{r}=\frac{1}{4\pi\epsilon_0}\frac{qq'}{\lvert r\rvert^3}r$
  
  Now, I haven’t explained why the constant of proportionality is written in the weird form $\frac{1}{4\pi\epsilon_0}$, and I’m not going to quite yet. I’ll just say that that’s all this is: a constant that gets the scaling right, not to mention the units. On the right, we’ve got (other than the constant) units of charge squared over area, while on the left we’ve got force, which is mass times distance over time squared. The “electric constant” $\epsilon_0$, thus, must carry units of time squared times charge squared over mass times volume.
  
  In the common SI (metric) system we measure charge in coulombs — after Coulomb’s law — with symbol $\mathrm{C}$ and we have a convenience unit called the “farad” with symbol $\mathrm{F}$, which is given by
  
  $\displaystyle\mathrm{F}=\frac{\mathrm{s}^2\cdot\mathrm{C}^2}{\mathrm{m}^2\cdot\mathrm{kg}}$
  
  Using these units, we can write the electric constant with units of farads per meter. Incidentally, it has the measured value of approximately $\epsilon_0=8.85418782\times10^{-12}\frac{\mathrm{F}}{\mathrm{m}}$, but the exact value will be largely irrelevant to us.
  
  January 3, 2012
distilabel_metadata.role: user
distilabel_metadata.raw_output_q_a_detector_0: The provided text is a series of excerpts from a blog or lecture notes on electromagnetism, specifically discussing Coulomb's law, the electric field, and the Biot-Savart law. The text does not contain a specific question or a question and answer. It is a detailed explanation of the principles and mathematical formulations related to the forces between charged particles and the magnetic fields generated by moving charges.
  
  Label: no-question