physics2u
Tier
⌕ Search ⌘K
Derivation

Electrostatic Energy and Field Energy Density

Statement

For a static charge distribution of density \(\rho(\vec{r})\) held in vacuum, the total work done to assemble it from infinitely dispersed charge equals \(U=\tfrac{1}{2}\int \rho\,\varphi\,d^3r\), and this same energy can be rewritten purely in terms of the electric field as \(U=\dfrac{\varepsilon_0}{2}\int |\vec{E}|^2\,d^3r\), so that the electrostatic energy is expressible as the volume integral of a strictly non-negative local field-energy density \(u=\tfrac{1}{2}\varepsilon_0 E^2\).

Why it matters

This is the point at which energy stops being a bookkeeping label attached to charges and becomes a property of the field itself, distributed continuously through space. The reinterpretation is not cosmetic: once radiation is admitted, energy detaches from any charge and travels, and the density \(\tfrac{1}{2}\varepsilon_0 E^2\) is exactly the electric term that survives into the Poynting picture and into the electromagnetic stress-energy tensor.

Practically, the field form is what you integrate to find the energy stored in a capacitor, the self-energy in the nuclear liquid-drop model, or the electrostatic contribution to the mass of a charged particle, and its divergence for a point charge is the first honest warning that classical electrodynamics is incomplete at short distances.

Assumptions
The configuration is electrostatic.If charges are in motion the magnetic field contributes \(\tfrac{1}{2\mu_0}B^2\) and the two forms are reconciled only through the full Poynting theorem, not this static argument.
The medium is vacuum (or linear response is folded into \(\varepsilon_0\to\varepsilon\)).In a nonlinear or hysteretic dielectric the stored energy is the path integral \(\int\!\left(\int \vec{E}\cdot d\vec{D}\right)d^3r\), not \(\tfrac12\int\rho\varphi\), and the two expressions diverge because the work depends on the path in \(\vec{D}\)-\(\vec{E}\) space.
The charge density is bounded and localised, with \(\varphi\) and \(\vec{E}\) decaying at infinity.If it is not, \(\varphi\sim 1/r\) and \(\vec{E}\sim 1/r^2\) fail and the surface term at infinity does not vanish, so the field integral and the source integral are no longer equal.
The distribution is genuinely continuous (no point charges).For true points the field integral picks up an infinite self-energy that the discrete sum \(\tfrac12\sum_{i\neq j}q_i\varphi_i\) deliberately omits; the two "equal" forms then differ by an infinite constant.
Derivation
1
\[ U = \frac{1}{2}\sum_i q_i\,\varphi(\vec{r}_i) \]
Assembling point charges from infinity, each contributes work \(q_i\varphi\) against the potential of those already placed; the double-counting of pairs is corrected by the factor \(\tfrac12\). A
2
\[ U = \frac{1}{2}\int \rho(\vec{r})\,\varphi(\vec{r})\,d^3r \]
Passing to a continuous distribution, the sum over discrete charges becomes an integral over the charge density; here \(\varphi\) is the full potential of the distribution. A
3
\[ \nabla\cdot\vec{E} = \frac{\rho}{\varepsilon_0} \quad\Longrightarrow\quad \rho = \varepsilon_0\,\nabla\cdot\vec{E} \]
Substitute Gauss's law in differential form (prior result: gauss-law-differential-divergence), trading the source density for the divergence of the field it produces. A
4
\[ U = \frac{\varepsilon_0}{2}\int (\nabla\cdot\vec{E})\,\varphi\,d^3r \]
Direct insertion of Step 3 into Step 2; \(\varepsilon_0\) is constant and comes outside the integral. A
5
\[ \nabla\cdot(\varphi\vec{E}) = (\nabla\cdot\vec{E})\,\varphi + \vec{E}\cdot(\nabla\varphi) \]
Product rule for the divergence of a scalar times a vector — a Leibniz identity, valid wherever \(\varphi\) and \(\vec{E}\) are differentiable. B
6
\[ (\nabla\cdot\vec{E})\,\varphi = \nabla\cdot(\varphi\vec{E}) + |\vec{E}|^2 \]
Rearrange Step 5 and use \(\vec{E}=-\nabla\varphi\) (prior result: electrostatic-potential-and-poisson), so \(\vec{E}\cdot(\nabla\varphi)=-\vec{E}\cdot\vec{E}=-|\vec{E}|^2\). B
7
\[ U = \frac{\varepsilon_0}{2}\oint_{\partial\Omega} \varphi\,\vec{E}\cdot d\vec{A} \;+\; \frac{\varepsilon_0}{2}\int_\Omega |\vec{E}|^2\,d^3r \]
Insert Step 6 into Step 4 and apply the divergence theorem to the \(\nabla\cdot(\varphi\vec{E})\) piece, converting it to a surface integral over the boundary of the region \(\Omega\). C
8
\[ \frac{\varepsilon_0}{2}\oint_{r\to\infty} \varphi\,\vec{E}\cdot d\vec{A} \;\sim\; \frac{1}{r}\cdot\frac{1}{r^2}\cdot r^2 = \frac{1}{r} \;\xrightarrow[r\to\infty]{}\; 0 \]
Take \(\Omega\) to be all space. For a bounded distribution \(\varphi\sim 1/r\), \(|\vec{E}|\sim 1/r^2\), while the area grows as \(r^2\); the surface term dies as \(1/r\) and vanishes. C
9
\[ U = \frac{\varepsilon_0}{2}\int_{\text{all space}} |\vec{E}|^2\,d^3r \equiv \int u\,d^3r,\qquad u=\frac{1}{2}\varepsilon_0 E^2 \]
Drop the vanished surface term. The integral now runs over all space, including regions where \(\rho=0\); identifying the integrand as an energy per unit volume defines the field-energy density. A
Result
\[ U=\frac{1}{2}\int \rho\,\varphi\,d^3r=\frac{\varepsilon_0}{2}\int |\vec{E}|^2\,d^3r,\qquad u=\frac{1}{2}\varepsilon_0 E^2 \]

Reading. The total electrostatic energy equals the volume integral of a strictly non-negative density \(\tfrac12\varepsilon_0 E^2\). Because every point where the field is nonzero carries energy — even far from any charge — energy is best regarded as stored in the field, not on the charges. Where the field is strong (near sharp conductor edges, between close capacitor plates) energy piles up quadratically. Note that \(\tfrac12\rho\varphi\) can be locally negative, yet its integral equals that of the manifestly non-negative \(\tfrac12\varepsilon_0 E^2\).

Units check. \([\varepsilon_0]=\mathrm{C^2\,N^{-1}\,m^{-2}}\) and \([E]=\mathrm{N\,C^{-1}}\), so \([\varepsilon_0 E^2]=\mathrm{C^2\,N^{-1}\,m^{-2}}\cdot\mathrm{N^2\,C^{-2}}=\mathrm{N\,m^{-2}}=\mathrm{J\,m^{-3}}\), an energy density. Multiplying by \(d^3r\) (\(\mathrm{m^3}\)) returns joules. Likewise \([\rho\varphi]=\mathrm{C\,m^{-3}}\cdot\mathrm{V}=\mathrm{J\,m^{-3}}\). Consistent.

Limiting cases
  • Zero-field region. Wherever \(\vec{E}=0\) (interior of a conductor, inside a shielded cavity) the density vanishes: no field, no stored energy, regardless of nearby charge.
  • Uniform field (ideal capacitor). \(u\) is constant, so \(U=\tfrac12\varepsilon_0 E^2\cdot(\text{volume})=\tfrac12 CV^2\) — the field form reproduces the circuit formula exactly.
  • Doubling every charge. \(\vec{E}\to 2\vec{E}\) everywhere (linearity), so \(U\to 4U\): energy is quadratic in the sources, unlike the force between two fixed charges.
  • Point charge, \(r\to 0\). \(E\sim 1/r^2\) gives \(\int E^2 r^2\,dr\sim\int dr/r^2\), which diverges at the origin — the classical self-energy is infinite.
Breaks when
  • Point (idealised) charges. The field integral diverges at each point charge, so \(U_{\text{field}}=\infty\) while the pair sum \(\tfrac12\sum_{i\neq j}q_i\varphi_i\) is finite. The two forms agree only for smeared-out distributions; the difference is the (infinite) self-energy that the Gauss's-law substitution silently reintroduces.
  • Charge extending to infinity (infinite line, plane, or uniform space). \(\varphi\) does not fall to zero and the surface term in Step 8 no longer vanishes, so \(\tfrac12\int\rho\varphi\) and \(\tfrac{\varepsilon_0}{2}\int E^2\) are no longer equal (often both diverge). Only energy differences per unit length or area are physical.
  • Non-electrostatic fields. Once \(\partial\vec{B}/\partial t\neq 0\), \(\vec{E}\) is no longer \(-\nabla\varphi\) alone, Step 6 fails, and part of the "stored" energy flows as radiation; the static derivation undercounts the true field-energy balance.
  • Nonlinear or hysteretic media. When \(\vec{D}\) is not proportional to \(\vec{E}\), the work of assembly is path-dependent \(\big(\int\vec{E}\cdot d\vec{D}\big)\), and \(\tfrac12\varepsilon_0 E^2\) is simply the wrong density.
Failure modes
  • Restricting the integral to where charge lives. The field integral runs over all space; most capacitor energy sits in the empty gap, not in the plates. Cutting the integral at the charge boundary throws away the answer.
  • Keeping the surface term. Applying the divergence theorem but forgetting that \(\oint\varphi\vec{E}\cdot d\vec{A}\) vanishes only for a bounded distribution taken to infinity, then reusing the result for an infinite plane where it does not.
  • Believing the two forms are equal for point charges. Writing \(U=\tfrac{\varepsilon_0}{2}\int E^2\) for two point charges and being surprised it is infinite — the equality holds only after self-energy is excluded.
  • Sign or factor slips in Step 6. Forgetting \(\vec{E}=-\nabla\varphi\) drops the minus sign, turning \(+E^2\) into \(-E^2\) and giving a negative energy density.
  • Superposing energies naively. Treating \(U\) of a combined system as \(U_1+U_2\); because \(E^2=(\vec{E}_1+\vec{E}_2)^2\) the cross term \(\varepsilon_0\int\vec{E}_1\cdot\vec{E}_2\) (the interaction energy) is missed.
  • Dropping the factor \(\tfrac12\). Writing \(U=\int\rho\varphi\) double-counts every interacting pair; the \(\tfrac12\) comes from assembling each element against the partially-built potential.
Discussion

The physical content of this derivation is entirely in the switch of domain: the source form \(\tfrac12\int\rho\varphi\) integrates only where charge sits, while the field form integrates over empty space too. Both give the same number (for bounded, continuous distributions), yet they tell opposite stories about where the energy is. Electrostatics alone cannot decide between them — both are consistent with every measurable force. It is dynamics, specifically the ability of energy to leave the charges entirely and propagate as radiation, that makes the field localisation physically real rather than a convenient fiction.

The cross term is worth dwelling on. If \(\vec{E}=\vec{E}_1+\vec{E}_2\), then \(E^2=E_1^2+E_2^2+2\,\vec{E}_1\cdot\vec{E}_2\). The first two pieces are the self-energies of each distribution; the last is the interaction energy \(\varepsilon_0\int\vec{E}_1\cdot\vec{E}_2\,d^3r\), which is exactly the finite \(\tfrac12\sum_{i\neq j}\) pair energy from Step 1. This cleanly separates the (often infinite, always constant) self-energies — which never change as you move rigid bodies — from the interaction energy that actually produces forces.

The divergence at a point charge is not a defect of the algebra; it is a genuine statement that a classical point charge has infinite field energy, and (via \(E=mc^2\)) infinite mass. The classical electron radius \(r_e=e^2/(4\pi\varepsilon_0 m_e c^2)\approx 2.8\ \mathrm{fm}\) is defined precisely as the radius at which the field energy would equal the electron rest mass — a marker of where classical field theory must yield to quantum electrodynamics and its renormalisation program.

At the deepest level, \(\tfrac12\varepsilon_0 E^2\) is the electric part of the \(T^{00}\) component of the electromagnetic stress-energy tensor \(T^{\mu\nu}=\varepsilon_0\!\left(F^{\mu\alpha}F^{\nu}{}_{\alpha}-\tfrac14\eta^{\mu\nu}F^{\alpha\beta}F_{\alpha\beta}\right)\). Its manifest positivity (energy density is never negative) underlies the energy conditions of general relativity; its covariant partner, the Maxwell stress tensor, carries the momentum flux and yields the outward pressure \(\tfrac12\varepsilon_0 E^2\) on a conductor surface. The same \(\tfrac12\varepsilon_0 E^2\) that we derived by pushing charges together from infinity gravitates, exerts pressure, and sources spacetime curvature — the field is a physical medium carrying energy, momentum, and stress.

Common misconceptions. (i) "Energy is on the charges" — the field form shows it is distributed through space, most of it often in charge-free regions. (ii) "The two integrals are always equal" — they differ by self-energy for point charges and by boundary terms for unbounded distributions. (iii) "Negative energy density is possible" — \(\tfrac12\varepsilon_0 E^2\ge 0\) always, even though the interaction energy between opposite charges can be negative (that negativity lives in the cross term, not in a negative density).

Worked examples
1
Example 1 — Self-energy of a uniformly charged solid sphere. A ball of radius \(R\) carries total charge \(Q\) spread uniformly through its volume. Find its electrostatic energy by integrating the field density, and evaluate for \(Q=1.0\ \mu\mathrm{C}\), \(R=10\ \mathrm{cm}\). B
\[ E_{\text{in}}(r)=\frac{1}{4\pi\varepsilon_0}\frac{Qr}{R^3}\ (r\le R),\qquad E_{\text{out}}(r)=\frac{1}{4\pi\varepsilon_0}\frac{Q}{r^2}\ (r\ge R) \]
Gauss's law with spherical symmetry; enclosed charge grows as \((r/R)^3\) inside, is full \(Q\) outside. Symbols first. A
\[ U = \frac{\varepsilon_0}{2}\int_0^R E_{\text{in}}^2\,(4\pi r^2)\,dr + \frac{\varepsilon_0}{2}\int_R^\infty E_{\text{out}}^2\,(4\pi r^2)\,dr \]
Apply the boxed result with \(d^3r=4\pi r^2\,dr\); split at \(r=R\) where \(E\) changes form. B
\[ U_{\text{out}}=\frac{Q^2}{8\pi\varepsilon_0 R},\qquad U_{\text{in}}=\frac{Q^2}{40\pi\varepsilon_0 R},\qquad U=\frac{3}{5}\frac{1}{4\pi\varepsilon_0}\frac{Q^2}{R} \]
Perform the integrals: \(\int_R^\infty dr/r^2=1/R\) outside; \(\int_0^R r^4\,dr=R^5/5\) inside. Add and simplify to the standard closed form. B
\[ U = 0.60\times(8.99\times10^{9})\times\frac{(1.0\times10^{-6})^2}{0.10} \]
Insert numbers: \(1/4\pi\varepsilon_0=8.99\times10^{9}\ \mathrm{N\,m^2\,C^{-2}}\), \(Q=10^{-6}\ \mathrm{C}\), \(R=0.10\ \mathrm{m}\). A
\[ U\approx 5.4\times10^{-2}\ \mathrm{J} \]

Reading. About \(54\ \mathrm{mJ}\) is stored in the field of this charged ball; one-sixth of it (\(9\ \mathrm{mJ}\)) sits inside the sphere, five-sixths outside. Units: \((\mathrm{N\,m^2\,C^{-2}})(\mathrm{C^2})/\mathrm{m}=\mathrm{N\,m}=\mathrm{J}\). Consistent.

2
Example 2 — Energy density and total energy in a parallel-plate capacitor. Plates of area \(A=100\ \mathrm{cm^2}\) are separated by \(d=1.0\ \mathrm{mm}\) of vacuum, with a uniform field \(E=1.0\times10^{6}\ \mathrm{V\,m^{-1}}\) between them. Find the energy density and total energy, and check against \(\tfrac12 CV^2\). A
\[ u=\frac{1}{2}\varepsilon_0 E^2,\qquad U=u\,(A d) \]
The field is uniform, so the density is constant throughout the gap and the field outside is (ideally) zero — apply the boxed result pointwise. Symbols first. A
\[ u=\tfrac12(8.854\times10^{-12})(1.0\times10^{6})^2=4.43\ \mathrm{J\,m^{-3}} \]
Substitute \(\varepsilon_0=8.854\times10^{-12}\ \mathrm{F\,m^{-1}}\) and \(E^2=10^{12}\ \mathrm{V^2\,m^{-2}}\). A
\[ U=4.43\times(10^{-2}\ \mathrm{m^2}\times10^{-3}\ \mathrm{m})=4.43\times10^{-5}\ \mathrm{J} \]
Total energy is density times gap volume \(=10^{-5}\ \mathrm{m^3}\). \(A=100\ \mathrm{cm^2}=10^{-2}\ \mathrm{m^2}\), \(d=10^{-3}\ \mathrm{m}\). A
\[ \tfrac12 CV^2=\tfrac12\!\left(\frac{\varepsilon_0 A}{d}\right)(Ed)^2=\tfrac12\varepsilon_0 E^2(Ad) \]
Cross-check: \(C=\varepsilon_0 A/d\) and \(V=Ed\); the algebra collapses back to \(u\cdot(\text{volume})\), confirming consistency. B
\[ u\approx 4.4\ \mathrm{J\,m^{-3}},\qquad U\approx 4.4\times10^{-5}\ \mathrm{J} \]

Reading. The field form and the circuit formula \(\tfrac12 CV^2\) give identical answers — as they must, since \(\tfrac12 CV^2\) is just \(\tfrac12\varepsilon_0 E^2\) integrated over the gap. Units: \((\mathrm{F\,m^{-1}})(\mathrm{V\,m^{-1}})^2\,\mathrm{m^3}=\mathrm{F\,V^2}=\mathrm{J}\). Consistent.

Problems
  1. (A) A parallel-plate capacitor holds a uniform field \(E=3.0\times10^{5}\ \mathrm{V\,m^{-1}}\) in a vacuum gap of volume \(2.0\times10^{-4}\ \mathrm{m^3}\). Find the stored energy.
    Solution \(u=\tfrac12\varepsilon_0 E^2=\tfrac12(8.854\times10^{-12})(3.0\times10^{5})^2=\tfrac12(8.854\times10^{-12})(9.0\times10^{10})=0.398\ \mathrm{J\,m^{-3}}\). Then \(U=u\times V=0.398\times2.0\times10^{-4}=8.0\times10^{-5}\ \mathrm{J}\) (about \(80\ \mu\mathrm{J}\)).
  2. (A) At what distance from a point charge \(q=2.0\ \mathrm{nC}\) does the electrostatic energy density fall to \(u=1.0\times10^{-9}\ \mathrm{J\,m^{-3}}\)?
    Solution From \(u=\tfrac12\varepsilon_0 E^2\), \(E=\sqrt{2u/\varepsilon_0}=\sqrt{2\times10^{-9}/8.854\times10^{-12}}=\sqrt{226}=15.0\ \mathrm{V\,m^{-1}}\). Then \(E=kq/r^2\Rightarrow r=\sqrt{kq/E}=\sqrt{(8.99\times10^{9})(2.0\times10^{-9})/15.0}=\sqrt{1.20}=1.1\ \mathrm{m}\).
  3. (B) Show that assembling two point charges \(+q\) and \(+q\) separated by distance \(a\) gives interaction energy \(kq^2/a\), and explain why the field form \(\tfrac{\varepsilon_0}{2}\int E^2\) gives a different (infinite) answer.
    Solution Bring the first charge in for free (no field yet); bring the second to distance \(a\) against potential \(\varphi=kq/a\), costing \(U=q\varphi=kq^2/a\) — the finite interaction energy. The field form uses \(\vec{E}=\vec{E}_1+\vec{E}_2\), so \(E^2=E_1^2+E_2^2+2\vec{E}_1\cdot\vec{E}_2\). The cross term \(\varepsilon_0\int\vec{E}_1\cdot\vec{E}_2\,d^3r=kq^2/a\) reproduces the interaction energy, but the self-energy terms \(\int E_i^2\) each diverge at their own point charge. The field form thus equals the interaction energy plus two infinite self-energies; only the finite cross term is physically comparable to the assembly work. Answer: \(U_{\text{int}}=kq^2/a\).
  4. (B) A thin spherical shell of radius \(R\) carries total charge \(Q\) on its surface. Using the field energy, find its self-energy and compare with the solid sphere of Example 1.
    Solution For a shell, \(E=0\) inside (\(r<R\)) and \(E=kQ/r^2\) outside. Only the exterior contributes: \(U=\tfrac{\varepsilon_0}{2}\int_R^\infty(kQ/r^2)^2\,4\pi r^2\,dr=\tfrac{\varepsilon_0}{2}(kQ)^2 4\pi\int_R^\infty dr/r^2=\tfrac{\varepsilon_0}{2}(kQ)^2\,4\pi/R\). With \(k=1/4\pi\varepsilon_0\): \(U=Q^2/(8\pi\varepsilon_0 R)=\tfrac12 kQ^2/R\). The solid sphere gave \(\tfrac35 kQ^2/R\), larger by \((3/5)/(1/2)=6/5\), because it also stores energy in the interior field the shell lacks.
  5. (C) A sphere of radius \(R\) carries charge with density \(\rho(r)=\rho_0\,r/R\). Find the total charge in terms of \(\rho_0\), the interior field, and the interior contribution to the field energy.
    Solution Total charge: \(Q=\int_0^R(\rho_0 r/R)4\pi r^2\,dr=(4\pi\rho_0/R)\int_0^R r^3\,dr=(4\pi\rho_0/R)(R^4/4)=\pi\rho_0 R^3\). Enclosed charge at radius \(r\): \(q(r)=\int_0^r(\rho_0 r'/R)4\pi r'^2\,dr'=\pi\rho_0 r^4/R\). Gauss: \(E(r)=q(r)/(4\pi\varepsilon_0 r^2)=\rho_0 r^2/(4\varepsilon_0 R)\). Interior energy: \(U_{\text{in}}=\tfrac{\varepsilon_0}{2}\int_0^R E^2\,4\pi r^2\,dr=\tfrac{\varepsilon_0}{2}\Big(\frac{\rho_0}{4\varepsilon_0 R}\Big)^2 4\pi\int_0^R r^4\cdot r^2\,dr=\tfrac{\varepsilon_0}{2}\frac{\rho_0^2}{16\varepsilon_0^2 R^2}4\pi\frac{R^7}{7}=\frac{\pi\rho_0^2 R^5}{56\varepsilon_0}\). In terms of \(Q\) (\(\rho_0=Q/\pi R^3\)): \(U_{\text{in}}=\dfrac{Q^2}{56\pi\varepsilon_0 R}\).