Section 16.3 Electrostatic Energy from a Continuous Source
In Section 16.2, we found that the energy stored in a collection of discrete charges is
The advantage of the second expression, in which each term is double-counted, is that it can be rewritten in the form
where \(V(\rr_i)\) is the potential at the location \(\rr_i\) of the \(i\)th charge due to all the other charges. This expression in turn generalizes naturally to a continuous charge distribution, 1 for which it becomes
We now have an expression for the energy contained in a charge distribution, expressed in terms of the charge density \(\rho\) and the potential \(V\text{.}\) 2 But each of these quantities can be expressed in terms of the electric field, since \(\EE=-\grad V\) and \(\grad\cdot\EE=\rho/\epsilon_0\) from Gauss' Law. We can therefore rewrite the energy in terms of the electric field alone. Starting from
we are reminded of the product rule for the divergence (see Appendix A.2), namely
which in turn suggests integrating by parts. Doing so yields
where we have used the Divergence Theorem to obtain the surface integral in the second last line, which evaluates to zero assuming that \(\EE\) obeys reasonable falloff conditions at infinity.