Last time we calculated the energy of the electric field. Now let’s repeat with the magnetic field, and let’s try to be a little more careful about it since magnetic fields can be slippery.
Let’s consider a static magnetic field generated by a collection of circuits , each carrying a current . Recall that Gauss’ law for magnetism tells us that ; since space is contractible, we know that its homology is trivial, and thus must be the curl of some other vector field , which we call the “magnetic potential” or “vector potential”. Now we can write down the flux of the magnetic field through each circuit:
This electromotive force must be counterbalanced by a battery maintaining the current or else the magnetic field wouldn’t be static.
We can determine how much power the battery must expend to maintain the current; a charge moving around the circuit goes down by in potential energy, which the battery must replace to send it around again. If such charges pass around in unit time, this is a work of per unit time; since — the current — we find that the power expenditure is , or.
Thus if we want to ramp the currents — and the field — up from a cold start in a time it takes a total work of
which is then the energy stored in the magnetic field.
This expression doesn’t depend on exactly how the field turns on, so let’s say the currents ramp up linearly:
and since the fluxes are proportional to the currents they must also ramp up linearly:
Plugging these in above, we find:
Now we can plug in our original expression for the flux:
This is great. But to be more general, let’s replace our currents with a current distribution:
Now we can use Ampère’s law to write
We can pull the same sort of trick last time to make the second integral go away; use the divergence theorem to convert to
and take the surface far enough away that the integral becomes negligible. We handwave that falls off roughly as the inverse fifth power of , while the area of only grows as the second power, and say that the term goes to zero.
So now we have a similar expression as last time for a magnetic energy density:
Again, we can check the units; the magnetic field has units of force per unit charge per unit velocity:
while the magnetic constant has units of henries per meter:
Putting together an inverse factor of the magnetic constant and two of the magnetic field and we get:
or, units of energy per unit volume, just like we expect for an energy density.
Okay, now let’s consider the electric field from the perspective of energy. We have an idea that this might be interesting because we know that the field produces a force, and forces and energies interact in interesting ways.
So recall that if we have a “test charge” at a point in an electric field it experiences a force . As we saw when discussing Faraday’s law, for a static electric field we can write for some “electric potential” function . Thus we can also write for the potential energy function .
Now, say the field is generated by a charge distribution ; how much potential energy is contained in the force the field exerts on the little bit of charge at ? We count , but this is too much — half of it is due to the rest of the distribution acting on the bit of charge at and half of it comes from acting back. We can thus find the total potential energy by integrating
Now, Gauss’ law tells us that , so we substitute:
Next we use a form of the product rule — — and run it backwards to write:
where we evaluate the first integral over space by evaluating it over the solid ball of radius and taking the limit as goes off to infinity. The divergence theorem says we can write:
where, as usual, we have taken the charge distribution to be compactly supported, so as our sphere gets large enough, the potential energy goes to zero. Yes, this is very hand-wavy, but this is how the physicists do it.
Anyway, what does this tell us? It means that a static electric field contains energy with a density
which we can integrate over any region of space to find the electrostatic potential energy contained in the field.
We can also check the units here; the electric field has units of force per unit charge:
while the electric constant has units of farads per meter:
Putting these together — two factors of and one of we find the units:
Joules per cubic meter — energy per unit of volume, just as we’d expect for an energy density.