# Confusion about calculating electrostatic energy using the electric field

Recently I learned that electrostatic potential energy of a system of charges can be calculated like so:

$$E = \int \frac{1}{2} \epsilon_0 \mathbf E^2 dV.$$

However, for a system of two point charges Q1 and Q2, we have

$$E = \int \frac{1}{2} \epsilon_0 (\mathbf E_1 + \mathbf E_2)^2 dV = \int_{}^{}\frac{1}{2}\epsilon_0 \mathbf E_1^2 dV + \int_{}^{}\frac{1}{2}\epsilon_0 \mathbf E_2^2 dV + \int_{}^{}\frac{1}{2}\epsilon_0 * 2 \mathbf E_1 \cdot \mathbf E_2 dV$$

from which we subtract the first two terms because they are already properties of the charges themselves.

Question:

Why do we not need to do something like this for charge distributions? Aren't charge distributions made up of many many little charges of magnitude $e$? Even if we treat the charge distribution as perfect continuous, won't there be infinitely infinitesimal charges?

Even if we treat the charge distribution as perfect continuous, won't there be infinitely infinitesimal charges?

It is instructive to apply a few vector calculus identities to put the electrostatic energy in another form: $$U = \frac{\epsilon_0}{2} \int E^2 \, d\tau = \frac{\epsilon_0}{2} \int (-\vec{\nabla}V) \cdot \vec{E} \, d \tau = -\frac{\epsilon_0}{2} \oint V \vec{E} \cdot d\vec{a} + \frac{1}{2} \int V (\epsilon_0 \vec{\nabla} \cdot \vec{E}) \, d\tau \\= -\frac{\epsilon_0}{2} \oint V \vec{E} \cdot d\vec{a} + \frac{1}{2} \int V \rho \, d\tau$$ If $\rho$ is non-zero only over a bounded region of space (or in technical terms, $\rho$ has compact support), then it can be shown that the boundary integral vanishes in the limit of an integral over all of space. The second integral, meanwhile, will be finite so long as $\rho$ and $V$ are finite everywhere (since it's effectively an integral of a finite function over a finite region of space.) It's also possible to show that if $\rho$ is finite and of compact support, and if we require $V \to 0$ at infinity, then $V$ will be finite everywhere in space. So if you write this in terms of continuous charge distributions, the electrostatic energy will never diverge.

So that answers your question about whether the integral will diverge. But your question bespeaks a mindset that I would encourage you to move away from as you learn more about E&M: It is better to think of point charges as limits of smooth charge distributions, not the other way around.

It is instructive, when students are first learning E&M, to talk about point charges and infinitesimally thin wires; it's a lot easier to calculate fields, forces, energies, etc. when you only have to do a sum rather than an integral. However, Maxwell's equations are what really govern the behavior of electric and magnetic fields, and these are written in terms of charge and current densities $\rho$ and $\vec{J}$. If you try to model a "point charge" or a "line current" in terms of these quantities, they'll have to be infinite; and whenever you plug in an infinite quantity into an equation, you can't expect it to behave nicely.

Some of the calculations that students do in intro E&M can be rigorously re-derived for point charges by introducing the language of distributions, and in particular the Dirac delta function. You can go a long way by allowing your charge densities, fields, and potentials to be distributions rather than honest-to-god functions. But distributions can't do everything that functions can; and in particular, you're courting danger every time you try to multiply two distributions together, as you have to do to calculate electrostatic energy. Sometimes you can fix this problem with an ad-hoc subtraction (as you found above); sometimes you can't (the Abraham-Lorentz force.)

All of this means that it's better to think of Maxwell's equations as being well-defined only for smooth charge and current densities. So instead of thinking of a smooth charge density as "really" being a bunch of point charges, one should think of a point charge as being a limiting case of a series of smooth charge densities with a fixed total amount of charge as the occupied volume goes to zero. If you have this mentality, then the pathologies that sometimes when solving problems involving infinite charge or current densities will be a lot less confusing.

• Very detailed and nice explanation. It look like you wrote a whole essay there! Thank you! – Matthew Guo Aug 8 '17 at 3:37
• @MatthewGuo: I've taught upper-level undergraduate E&M classes a number of times, and I've always been interested in the mathematical aspects of physics. So this is something I've thought about quite a lot. – Michael Seifert Aug 8 '17 at 13:35
• Thank you Michael, is it that in classical electrodynamics we usually model charges as if there is no quantisation of charge? And hence the continuous volume/plane of charges? – Kashmiri Sep 24 '20 at 16:58
• @YasirSadiq: The important part is that infinite charge densities don't exist, lest your differential equations start misbehaving. If you make that assumption, I think you might then be able to make an argument that charge must be infinitely divisible (and hence not quantized). But the idea that $\rho$ is finite and well-defined everywhere is the important part. – Michael Seifert Sep 24 '20 at 18:17

It's usual to calculate the mutual energy of a group of charges starting with $$U_{mut}=\frac{1}{2}\sum _{i=1}^{n} Q_i\phi_i(\vec{r_i})$$ in which charge $Q_i$ is situated at $\vec{r_i}$ and $\phi_i(\vec{r_i})$ is the potential at $\vec{r_i}$ due to all the other charges except $Q_i$.

When the charge is continuously distributed this becomes $$U=\int\int\int\phi(\vec r) \rho(\vec r)dV.$$ Unlike in the case of the summation (above) for point charges, we needn't bother, in the integral, to exclude the charge that is sitting within $dV$ centred on $\vec r$, because its contribution to $U$ is negligible. [This is easily demonstrated by calculating the pd between the outside and the centre of a uniformly charged sphere: as its radius goes to zero, so does the pd.]

Using some vector calculus we can codge the integral into the form $$U=\frac{\epsilon_0}{2}\int\int\int E^2 dV.$$

I think it's just an issue of confusing a few terms. For the electric field from two point charges $\vec{E_1}$ and $\vec{E_2}$ from $q_1$ and $q_2$, the total electrostatic energy is $\int{(\vec{E_1} + \vec{E_2})^2d^3x.}$

That's basically the energy stored in the existence and position of those two charges.

But the "interaction" energy is often of interest, and that's just the term $\int{\vec{E_1} \cdot \vec{E_2}}d^3x$. The reason that's of interest is that it's the energy that it would take to pull the charges apart to where they no longer interact (just far away basically, although mathematically "to infinity").

Recently I learned that electrostatic potential energy of a system of charges can be calculated like so: $$E = \int \frac{1}{2} \epsilon_0 \mathbf E^2 dV.$$

This is correct for regular distributions of charge (finite everywhere) and for some singular distributions as well (charge on a surface). It is not valid for point particles, because (as is easily seen) the integral diverges, and more importantly, because the derivation breaks down for point particles. Instead, one should use the original expression due to Coulomb

$$E = \sum_{i=1}^N \sum_{k=1}^N{}^{'}\frac{1}{2} \frac{Kq_iq_k}{|\mathbf r_i - \mathbf r_k|}$$

which has no such problems (it does not diverge and can be derived using the Coulomb's law based on empiric observations). The prime next to sum sign means that the case $$k=i$$ is to be omitted (this also follows from the Coulomb law).

However, for a system of two point charges Q1 and Q2, we have $$E = \int \frac{1}{2} \epsilon_0 (\mathbf E_1 + \mathbf E_2)^2 dV = \int_{}^{}\frac{1}{2}\epsilon_0 \mathbf E_1^2 dV + \int_{}^{}\frac{1}{2}\epsilon_0 \mathbf E_2^2 dV + \int_{}^{}\frac{1}{2}\epsilon_0 * 2 \mathbf E_1 \cdot \mathbf E_2 dV$$ from which we subtract the first two terms because they are already properties of the charges themselves.

This is a misguided reasoning for point charges, because energy of such system is not given by integral of total field squared. But it does result in the correct value: the integral

$$\int \epsilon_0 \mathbf E_1 \cdot \mathbf E_2 dV$$ has the same value as the Coulomb energy of two point charges.

Why do we not need to do something like this for charge distributions? Aren't charge distributions made up of many many little charges of magnitude $$e$$? Even if we treat the charge distribution as perfect continuous, won't there be infinitely infinitesimal charges?

For regular distributions of charge, energy is defined to be integral of electric field squared and usually, for finite integration volume, comes out finite. So no subtraction is needed.

For point-like distributions, energy cannot be validly defined to be integral of electric field squared, but it can be validly defined by the multilinear Coulomb expression above. So no subtraction is needed either.

Therefore, energy of point particles (which have singular spatial distribution of electric charge) is not, in general, a limit of energy of continuous distribution that converges to that singular distribution (the limit is infinite).

Another way to see this is to consider work of electric forces on a set of closely spaced point charges:

$$W_{point} = \sum_k q_k \mathbf E_{-k} \cdot \mathbf v_k \Delta t$$ where $$\mathbf E_{-k}$$ is electric field experienced by the particle $$k$$ and $$\mathbf v_{k}$$ is velocity of the $$k-$$th particle. In the regular distribution model, one would write the work happening on that system as (we denote the volume where the particles are $$\Delta V$$):

$$W_{regular} = \mathbf E \cdot \mathbf j~ \Delta V\Delta t$$ where $$\mathbf E$$ is average of $$\mathbf E_{-k}$$ and $$\mathbf j \Delta V$$ is average of $$q_k\mathbf v_k$$. But this will have a very different value from $$W_{point}$$, because product of averages is not in general equal to average of products. As an example, if the electric field experienced is the same for all particles, and all particles have the same velocity except one, which will have much greater magnitude, the value of work obtained will be greatly biased by the outlier particle and so will be much higher than what the point model would give.

The work of electric field manifests as decrease of energy of electric field. Consequently, although the point charge distribution is a limit of regular distribution, electric field energy of point distribution is not a limit of electric field energy of regular distributions of charge. These are two different models with different valuations of energy.

For more on the point charge model and how energy is defined there, see for example

J. Frenkel, Zur Elektrodynamik punktfoermiger Elektronen, Zeits. f. Phys., 32, (1925), p. 518-534. http://dx.doi.org/10.1007/BF01331692

• Your $\mathbf{v}_k$ is not defined. Please define your variables. – Michael Levy Nov 29 '20 at 0:40