5.3: The Divergence and Curl of B #
5.3.1: Straight-Line Currents #
The magnetic field of an infinite straight wire is shown in Fig 5.27 (the current is coming out of the page). At a glance, it is clear that this field has a nonzero curl (something you’ll never see in an electrostatic field); let’s calculate it.
According to Eq. 5.38, the integral of B around a circular path of radius s, centered at the wire, is
\[\oint \vec{B} \cdot \dd l = \oint \frac{\mu_0 I}{2 \pi s} = \frac{\mu_0 I}{2 \pi s } \oint \dd l = \mu_0 I\]Notice that the answer is independent of s; that’s because B decreases at the same rate as the circumference increases. In fact, it doesn’t have to be a circle; any old loop that encloses the wire would give the same answer. For if we use cylindrical coordinates \( (s, \phi, z) \), with the current flowing along the z axis, \( \vec{B} = (\mu_0 I / 2 \pi s) \vu{\phi} \) and \( \dd \vec{l} = \dd s , \vu{s} + s \dd \phi , \vu{\phi} + \dd z , \vu{z} \), so
\[\oint \vec{B} \cdot \dd l = \frac{\mu_0 I}{2 \pi} \oint \frac{1}{s} s \dd \phi = \frac{\mu_0 I}{2 \pi } \int _0 ^{2 \pi} \dd \phi = \mu_0 I\]This assumes that the loop encircles the wire exactly once; if it went around twice, then \( \phi \) would go from \( 0 \) to \( 4 \pi \), and if it didn’t enclose the wire at all, then \( \phi \) would go from \( \phi_1 \) to \( \phi_2 \) and back again, with \( \int \dd \phi = 0 \) (Fig 5.28).
Now suppose we have a bundle of straight wires. Each wire that passes through our loop contributes \( \mu_0 I \), and those outside contribute nothing (Fig 5.29). The line integral will then be
\[\oint \vec{B} \cdot \dd l = \mu_0 I_{enc} \tagl{5.44}\]where \( I_{enc} \) stands for the total current enclosed by the integration path. If the flow of charge is represented by a volume current density J, the enclosed current is
\[I_{enc} = \int \vec{J} \cdot \dd \vec{a} \tagl{5.45}\]with the integral taken over any surface bounded by the loop. Applying Stokes’ theorem to Eq 5.44, then
\[\int (\curl \vec{B}) \cdot \dd \vec{a} = \mu_0 \int \vec{J} \cdot \dd \vec{a}\]and hence
\[\curl \vec{B} = \mu_0 \vec{J}\]With minimal labor, we have actually obtained the general formula for the curl of B. But our derivation is seriously flawed by the restriction to infinite straight line currents (and combinations thereof). Most current configurations cannot be constructed out of infinite straight wires, and we have no right to assume that Eq. 5.46 applies to them. So the next section is devoted to the formal derivation of the divergence and curl of B, starting from the Biot-Savart law itself.
5.3.2: The Divergence and Curl of B #
The Biot-Savart law for the general case of a volume current reads
\[\vec{B}(\vec{r}) = \frac{\mu_0}{4 \pi} \int \frac{\vec{J}(r') \times \vu{\gr}}{\gr ^2} \dd \tau' \tagl{5.47} \]This formula gives the magnetic field at a point r = (x, y, z) in terms of an integral over the current distribution \( \vec{J} (x’, y’, z’) \) (Fig 5.30). It is best to be absolutely explicit at this stage:
- B is a function of (x, y, z)
- J is a function of (x’, y’, z')
- \( \vu{\gr} = (x - x’) \vu{x} + (y - y’) \vu{y} + (z - z’) \vu{z} \)
- \( \dd \tau’ = dx’ dy’ dz’ \)
The integration is over the primed coordinates; the divergence and the curl of B are with respect to the unprimed coordinates.
Applying the divergence to \( \eqref{5.47} \) we obtain
\[\div \vec{B} = \frac{\mu_0 }{4 \pi } \int \div \left( \vec{J} \times \frac{\vu{\gr}}{\gr^2} \right)\dd \tau' \tagl{5.48}\]With one of our product rules for divergences
\[\div \left( \vec{J} \times \frac{\vu{\gr}}{\gr^2} \right) = \frac{\vu{\gr}}{\gr^2} \cdot (\curl \vec{J}) - \vec{J} \cdot \left( \curl \frac{ \vu{\gr}}{\gr ^2} \right) \tagl{5.49}\]But \( \curl \vec{J} = 0 \) because J doesn’t depend on the unprimed variables, while \( \curl ( \vu{\gr} / \gr ^2) = 0 \) (we’ve already explicitly worked that in Chapter 1), so
\[\div \vec{B} = 0 \tagl{5.50}\]Evidently, the divergence of the magnetic field is zero.
Applying the curl to Eq 5.47, we obtain
\[\curl \vec{B} = \frac{\mu_0}{4 \pi} \int \curl \left( \vec{J} \times \frac{\vu{\gr}}{\gr ^2} \right) \dd \tau' \tagl{5.51}\]Again, our strategy is to expand the integrand, using the appropriate product rule - in this case one of those for curls
\[\curl \left( \vec{J} \times \frac{\vu{\gr}}{\gr^2} \right) = \vec{J} \left( \div \frac{\vu{\gr}}{\gr ^2} \right) - ( \vec{J} \cdot \grad) \frac{\vu{\gr}}{\gr^2} \tagl{5.52} \](I have dropped terms involving derivatives of J, because J does not depend on x, y, z.) The second term integrates to zero, as we’ll see in the next paragraph. The first term involves the divergence we were at pains to calculate in Chapter 1 (Eq. 1.100):
\[\div \left( \frac{\vu{\gr}}{\gr^2} \right) = 4 \pi \delta ^2(\gr) \tagl{5.53}\]Thus
\[\curl \vec{B} = \frac{\mu_0}{4 \pi} \int \vec{J}(r') 4 \pi \delta ^3 (\vec{r} - \vec{r'} \dd \tau' = \mu_0 \vec{J} (\vec{r})\]which confirms that Eq. 5.46 is not restricted to straight-line currents, but holds quite generally in magnetostatics.
To complete the argument, however, we must check that the second term in Eq 5.52 integrates to zero. Because the derivative acts only on \( \vu{\gr} / \gr ^2 \), we can switch from \( \grad \) to \( \grad’ \) at the cost of a minus sign
\[-(\vec{J} \cdot \grad) \frac{\vu{\gr}}{\gr^2} = (\vec{J} \cdot \grad' ) \frac{\vu{\gr}}{\gr^2} \tagl{5.54}\]The x component, in particular, is
\[(\vec{J} \cdot \grad') \left( \frac{x - x' }{\gr ^3} \right) = \grad' \cdot \left( \frac{(x - x')}{\gr ^3} \vec{J} \right) - \left( x - x' \gr ^3 \right)(\grad' \cdot \vec{J})\]Now, for steady currents the divergence of J is zero, so
\[\left( - (\vec{J} \cdot \grad) \frac{\vu{\gr}}{\gr^2} \right)_{x} = \grad' \cdot \left( \frac{(x - x')}{\gr ^3} \vec{J} \right)\]and therefore this contribution to the integral can be written
\[\int_{V} \grad' \cdot \left( \frac{(x - x')}{\gr ^3} \vec{J} \right) \dd \tau' = \oint_S \frac{(x - x')}{\gr^3} \vec{J} \cdot \dd \vec{a'} \tagl{5.55}\](The reason for switching from \( \grad \) to \( \grad’ \) was to allow this integration by parts).
But what region are we integrating over? Well, it’s the volume that appears in the Biot-Savart law (Eq. 5.47) - large enough, that is, to include all the current. You can make it bigger than that, if you like; \( \vec{J} = 0 \) out there anyway, so it will add nothing to the integral. The essential point is that on the boundary the current is zero (all current is safely inside) and hence the surface integral (Eq. 5.55) vanishes.
5.3.3: Ampere’s Law #
The equation for the curl of B,
\[\curl \vec{B} = \mu_0 \vec{J} \tagl{5.56}\]is called Ampere’s Law (in differential form). It can be converted to integral form by the usual device of applying one of the fundamental theorems - in this case Stokes’ theorem:
\[\int (\curl \vec{B}) \cdot \dd \vec{a} = \oint \vec{B} \cdot \dd \vec{l} = \mu_0 \int \vec{J} \cdot \dd \vec{a}\]Now, \( \int \vec{J} \cdot \dd \vec{a} \) is the total current passing through the surface (Fig. 5.31), which we call \( I_{enc} \) (the current enclosed by the Amperian loop). Thus
\[\oint \vec{B} \cdot \dd \vec{l} = \mu_0 I_{enc} \tagl{5.57}\]This is the integral version of Ampere’s law; it generalizes Eq 5.44 to arbitrary steady currents. Notice that Eq 5.57 inherits the sign ambiguity of Stokes’ theorem: which way around the loop am I supposed to go? And which direction through the surface corresponds to a “positive” current? The resolution, as always, is the right-hand rule: If the fingers of your right hand indicate the direction of integration around the boundary, then your thumb defines the direction of a positive current.
Just as the Biot-Savart law plays a role in magnetostatics that Coulomb’s law assumed in electrostatics, so Ampere’s plays the part of Gauss’s. In particular, for currents with appropriate symmetry, Ampere’s law in integral form offers a lovely and extraordinarily efficient way of calculating the magnetic field.
Example 5.7 #
Example 5.8 #
Example 5.9 #
Like Gauss’s law, Ampere’s law is always true (for steady currents), but it is not always useful. Only when the symmetry of the problem enables you to pull B outside the integral \( \oint \vec{B} \cdot \dd \vec{l} \) can you calculate the magnetic field from Ampere’s law. When it does work, it’s by far the fastest method; when it doesn’t, you have to fall back on the Biot-Savart law. The current configurations that can be handled by Ampere’s law are
- Infinite straight lines (Ex 5.7)
- Infinite planes (Ex 5.8)
- Infinite solenoids (Ex 5.9)
- Toroids (Ex 5.10)
The last of these is a surprising and elegant application of Ampere’s law. As in Exs. 5.8 and 5.9, the hard part is figuring out the direction of the field (which we will now have done, once and for all, for each of the four geometries); the actual application of Ampere’s law takes only one line.
Example 5.10 #
5.3.4: Comparison of Magnetostatics and Electrostatics #
The divergence and curl of the electrostatic field are
\[\begin{cases} \div \vec{E} = \frac{1}{\epsilon_0} \rho \quad & \text{(Gauss's law)}\\ \curl \vec{E} = 0 \quad & \text{(no name)} \end{cases}\]These are Maxwell’s equations for electrostatics. Together with the boundary condition \( \vec{E} \rightarrow 0 \) far from all charges, Maxwell’s equations determine the field, if the source charge density \( \rho \) is given; they contain essentially the same information as Coulomb’s law plus the principle of superposition. The divergence and curl of the magnetostatic field are
\[\begin{cases} \div \vec{B} = 0 \quad & \text{(no name)} \\ \curl \vec{B} = \mu_0 \vec{J} \quad & \text{(Ampere's Law)} \end{cases}\]These are Maxwell’s equations for magnetostatics. Again, together with the boundary condition \( \vec{B} \rightarrow 0 \) far from all currents, Maxwell’s equations determine the magnetic field; they are equivalent to the Biot-Savart law (plus superposition). Maxwell’s equations and the force law
\[\vec{F} = Q(\vec{E} + \vec{v} \cross \vec{B})\]constitute the most elegant formulation of electrostatics and magnetostatics.
The electric field diverges away from a (positive) charge; the magnetic field line curls around a current (Fig. 5.44). Electric field lines originate on positive charges and terminate on negative ones; magnetic field lines do not begin or end anywhere - to do so would require a nonzero divergence. They typically form closed loops or extend out to infinity. To put it another way, there are no point sources for B, as there are for E; there exists no magnetic analog to electric charge. This is the physical content of the statement \( \div \vec{B} = 0 \). Coulomb and others believed that magnetism was produced by magnetic charges (magnetic monopoles, as we would now call them), and in some older books you will still find references to a magnetic version of Coulomb’s law, giving the force of attraction or repulsion between them. It was Ampere who first speculated that all magnetic effects are attributable to electric charges in motion (currents). As far as we know, Ampere was right; nevertheless, it remains an open experimental question whether magnetic monopoles exist in nature (they are obviously pretty rare, or somebody would have found one), and in fact some recent elementary particle theories require them. For our purposes, though, B is divergenceless, and there are no magnetic monopoles. It takes a moving electric charge to produce a magnetic field, and it takes another moving electric charge to “feel” a magnetic field.
Typically, electric forces are enormously larger than magnetic ones. That’s not something intrinsic to the theory; it has to do with the sizes of the fundamental constants \( \epsilon_0 \) and \( \mu_0 \). In general, it is only when both the source charges and the test charge are moving at velocities comparable to the speed of light that the magnetic force approaches the electric force in strength. (Problems 5.13 and 5.17 illustrate this rule.) How is it, then, that we notice magnetic effects at all? The answer is that both in the production of a magnetic field (Biot-Savart) and in its detection (Lorentz), it is the current that matters, and we can compensate for a smallish velocity by pouring huge amounts of charge down the wire. Ordinarily, this charge would simultaneously generate so large an electric force as to swamp the magnetic one. But if we arrange to keep the wire neutral, by embedding in it an equal quantity of opposite charge at rest, the electric field cancels out, leaving the magnetic field to stand alone. It sounds very elaborate, but of course this is precisely what happens in an ordinary current carrying wire.