# Electrostatic Fields and Gauss's Law: From Coulomb's Law to the Poisson Equation

> From Coulomb's law we define the electric field, prove Gauss's law in integral form by a solid-angle argument, derive div E = ρ/ε₀, and reach the Poisson equation.
> https://rikai.mugen-giken.com/en/physics/electromagnetism/electrostatics

## 0. Key points

- Electromagnetism abandons the picture in which distant charges pull on one another directly, and replaces it with one in which a charge creates a **field** in space and the field exerts the force. The theory of the electrostatic field is where this change of picture is first carried through to completion.
- Taking Coulomb's law and the superposition principle as the only inputs, the statement $\oint_S \boldsymbol{E}\cdot d\boldsymbol{S} = Q_{\text{in}}/\varepsilon_0$ (the integral form of Gauss's law) for an arbitrary closed surface follows **as a theorem**. The keys are the exponent $1/r^2$ and a computation with solid angles.
- The divergence $\operatorname{div}\boldsymbol{E}$ is the net outflow from a small volume around a point, divided by that volume, in the limit: it is the **density of sources**. Combining this definition with the divergence theorem turns the integral form into the differential form $\operatorname{div}\boldsymbol{E} = \rho/\varepsilon_0$.
- An electrostatic field can be written as $\boldsymbol{E} = -\operatorname{grad}V$. This is a direct consequence of the Coulomb field being the gradient of $1/r$, and it reduces a problem about the three components of a vector field to a problem about a single scalar function.
- Putting the two together yields the **Poisson equation** $\Delta V = -\rho/\varepsilon_0$. Every electrostatics problem ultimately reduces to solving this one partial differential equation subject to boundary conditions.

---

## 1. Motivation: from action at a distance to fields

At the end of the eighteenth century Coulomb used a torsion balance to measure the force between two charged spheres and found it to vary as the inverse square of the distance. The form is strikingly similar to the law of universal gravitation, and so the picture first adopted was the same one that Newtonian mechanics used: **action at a distance**. Charges $q_1$ and $q_2$ were taken to exert forces on each other directly across the intervening space.

Two features of this picture were already troubling at the time.

First, **nothing mediates the interaction**. Through what is the force transmitted? Second, **no time appears anywhere**. Coulomb's law asserts that "if $q_2$ is here now, then this much force acts on $q_1$ now"; but if we suddenly move $q_2$, when does $q_1$ find out? The action-at-a-distance picture answers "instantaneously", and this collides head-on with relativity.

The resolution introduced by Faraday and Maxwell is the **field**. A charge alters the state of the space around it; we call that state the electric field $\boldsymbol{E}$. A second charge does not "see" the distant charge at all — it feels only the value of $\boldsymbol{E}$ **at its own location** and is acted on accordingly. The force thereby becomes an exchange of local quantities, and the possibility opens up that changes in the field propagate at a finite speed. Showing that this speed is in fact the speed of light is the ultimate goal of this theme, [Maxwell's equations and electromagnetic waves](/physics/electromagnetism/maxwell-equations).

Merely introducing a field, however, says nothing new. If we only define $\boldsymbol{E}(\boldsymbol{x}) = \boldsymbol{F}(\boldsymbol{x})/q$, we have done nothing but rename a symbol. The field picture acquires content when we can write down **the laws that the field itself obeys**, in the form of differential equations. The aim of this article is to prove, from Coulomb's law, that for charges at rest those laws are the two equations

$$
\operatorname{div}\boldsymbol{E} = \frac{\rho}{\varepsilon_0}, \qquad \operatorname{rot}\boldsymbol{E} = \boldsymbol{0}.
$$

We say "prove" rather than "postulate" because within electrostatics these are restatements of an experimental law, not independent assumptions. Once time-dependent fields are allowed, on the other hand, it is $\operatorname{rot}\boldsymbol{E} = \boldsymbol{0}$ that fails; that is the subject of [electromagnetic induction and the displacement current](/physics/electromagnetism/induction-and-displacement-current).

<Figure caption="The logical structure of this article">
<Mermaid code={`flowchart TD
  A["Coulomb's law<br/>(experimental fact)"] --> B["Superposition principle<br/>(experimental fact)"]
  B --> C["Definition of E and<br/>extension to continuous distributions"]
  C --> D["Gauss's law, integral form<br/>flux through a closed surface = Q/ε₀"]
  D --> E["Definition of divergence<br/>+ divergence theorem"]
  E --> F["Gauss's law, differential form<br/>div E = ρ/ε₀"]
  C --> G["Electrostatic potential V<br/>E = −grad V"]
  F --> H["Poisson equation<br/>ΔV = −ρ/ε₀"]
  G --> H`} />
</Figure>

---

## 2. Preliminaries: notation and mathematical conventions

Throughout, $\boldsymbol{x}, \boldsymbol{y}$ denote position vectors in $\mathbb{R}^3$, and we write $r = |\boldsymbol{x}|$, $\hat{\boldsymbol{r}} = \boldsymbol{x}/r$. We use SI units and write the permittivity of the vacuum as

$$
\varepsilon_0 = 8.8541878\times 10^{-12}\ \mathrm{F/m}, \qquad
\frac{1}{4\pi\varepsilon_0} = 8.9875\times 10^{9}\ \mathrm{N\,m^2/C^2}.
$$

**Differential operators.** For a scalar field $f$ and a vector field $\boldsymbol{A} = (A_x, A_y, A_z)$ we set

$$
\operatorname{grad} f = \nabla f = \left(\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z}\right), \qquad
\operatorname{div}\boldsymbol{A} = \nabla\cdot\boldsymbol{A} = \frac{\partial A_x}{\partial x} + \frac{\partial A_y}{\partial y} + \frac{\partial A_z}{\partial z}.
$$

The Laplacian is $\Delta f = \operatorname{div}\operatorname{grad} f = \nabla^2 f$. Readers uneasy with partial derivatives should first read [differentiation of functions of several variables](/mathematics/calculus/multivariable-differentiation).

**Orientation of surface integrals.** On a closed surface $S$, the vector surface element $d\boldsymbol{S} = \hat{\boldsymbol{n}}\,dS$ is always taken to point **outward**. Violating this convention flips every sign below, so we fix it once and for all.

**Assumptions on regions.** By a "smooth bounded region" we mean a bounded open set $V\subset\mathbb{R}^3$ whose boundary $\partial V$ consists of finitely many piecewise $C^1$ surfaces and admits an outward normal at each point. Balls, rectangular boxes and cylinders all satisfy this condition.

**Assumptions on the charge distribution.** The charge density $\rho:\mathbb{R}^3\to\mathbb{R}$ is assumed continuous and equal to $0$ outside a bounded set (we say it has compact support). This assumption is what guarantees the existence of the integrals below and permits interchanging the order of integration. A point charge is a limiting object that violates this assumption; it is treated in the Appendix.

---

## 3. Coulomb's law and the electric field

<Axiom id="ax-coulomb" title="Coulomb's law and the superposition principle">
**(i)** When two point charges $q_1, q_2$ are at rest in vacuum at positions $\boldsymbol{x}_1, \boldsymbol{x}_2$, the force exerted by $q_2$ on $q_1$ is

$$
\boldsymbol{F}_{1\leftarrow 2} = \frac{1}{4\pi\varepsilon_0}\,\frac{q_1 q_2}{|\boldsymbol{x}_1 - \boldsymbol{x}_2|^3}\,(\boldsymbol{x}_1 - \boldsymbol{x}_2).
$$

Its magnitude is $|q_1q_2|/(4\pi\varepsilon_0 |\boldsymbol{x}_1-\boldsymbol{x}_2|^2)$, inversely proportional to the square of the distance; its direction lies along the line joining the two points, repulsive for charges of like sign and attractive for charges of opposite sign.

**(ii)** When three or more charges are present, the force on any one of them equals the vector sum of the forces that each of the others would exert if it were present alone (the superposition principle).
</Axiom>

The distance dependence $1/r^2$ in (i) is the exponent on which everything in this article rests. As we shall see, Gauss's law holds precisely because that exponent is exactly $2$. Modern experiments that write the exponent as $2+\delta$ bound $|\delta|$ by roughly $10^{-16}$.

The superposition in (ii) looks obvious, but it is an independent experimental fact. It asserts that the force is linear in the charges, and without it everything that follows collapses.

<Example id="ex-force-ratio" title="How much stronger is the electric force than gravity?">
Place two protons (charge $e = 1.602\times10^{-19}\ \mathrm{C}$, mass $m_p = 1.673\times10^{-27}\ \mathrm{kg}$) a distance $r$ apart. In the ratio of the Coulomb force to the gravitational force, $r$ cancels:

$$
\frac{F_{\text{elec}}}{F_{\text{grav}}}
= \frac{e^2/(4\pi\varepsilon_0 r^2)}{G m_p^2/r^2}
= \frac{e^2}{4\pi\varepsilon_0 G m_p^2}.
$$

The numerator is $8.9875\times10^{9}\times(1.602\times10^{-19})^2 = 2.306\times10^{-28}$ and the denominator is $6.674\times10^{-11}\times(1.673\times10^{-27})^2 = 1.868\times10^{-64}$, so

$$
\frac{F_{\text{elec}}}{F_{\text{grav}}} = \frac{2.306\times10^{-28}}{1.868\times10^{-64}} = 1.23\times10^{36}.
$$

This is far beyond a mere difference of a few orders of magnitude. That we nevertheless feel no electric force in everyday life is because matter maintains electrical neutrality with extraordinary precision. Turned around: a slight imbalance of charge produces an enormous force.
</Example>

Looking again at part (i) of <Ref to="ax-coulomb" />, we see that the right-hand side factors into $q_1$ times a quantity determined by $q_2$ and by position. We give that second factor a name.

<Definition id="def-efield" title="Electric field">
Given a charge distribution, let $\boldsymbol{F}(\boldsymbol{x})$ be the force on a point charge $q$ placed at $\boldsymbol{x}$. The vector field $\boldsymbol{E}$ satisfying $\boldsymbol{F}(\boldsymbol{x}) = q\,\boldsymbol{E}(\boldsymbol{x})$ is called the **electric field** of that distribution. Its unit is $\mathrm{N/C} = \mathrm{V/m}$.

In particular, by <Ref to="ax-coulomb" /> the field of a point charge $q$ at the origin is

$$
\boldsymbol{E}(\boldsymbol{x}) = \frac{q}{4\pi\varepsilon_0}\,\frac{\boldsymbol{x}}{|\boldsymbol{x}|^{3}} = \frac{q}{4\pi\varepsilon_0 r^2}\,\hat{\boldsymbol{r}},
$$

and, writing the superposition principle in integral form, the field of a charge distributed continuously with density $\rho$ is

$$
\boldsymbol{E}(\boldsymbol{x}) = \frac{1}{4\pi\varepsilon_0}\int_{\mathbb{R}^3} \rho(\boldsymbol{y})\,\frac{\boldsymbol{x}-\boldsymbol{y}}{|\boldsymbol{x}-\boldsymbol{y}|^{3}}\,d^3y.
$$
</Definition>

<Remark id="rem-test-charge">
The "test charge" $q$ used in the definition is tacitly assumed small enough that it does not itself disturb the surrounding charge distribution. Strictly one should write $\boldsymbol{E} = \lim_{q\to 0}\boldsymbol{F}/q$. Since charge comes only in integer multiples of $e$, however, this limit is a mathematical idealization. In practice, regard the field as a quantity belonging to space itself, determined independently of how it is measured.

Note also that the integrand in <Ref to="def-efield" /> blows up like $|\boldsymbol{x}-\boldsymbol{y}|^{-2}$ as $\boldsymbol{y}\to\boldsymbol{x}$. But in a three-dimensional volume integral $d^3y \sim r^2\,dr\,d\Omega$, so $r^{-2}\cdot r^2 = 1$ and the singularity is integrable. Hence if $\rho$ is bounded with compact support, the integral converges absolutely for every $\boldsymbol{x}$. For multiple integrals in polar coordinates see [multiple and iterated integrals](/mathematics/calculus/multiple-integrals), in particular <Ref to="mathematics/calculus/multiple-integrals#ex-polar" text="the polar change of variables and its Jacobian" />.
</Remark>

---

## 4. Gauss's law (integral form)

### 4.1. Flux

When we visualize an electric field, we draw field lines. The naive operation of counting the "number" of lines is expressed mathematically by the following quantity.

<Definition id="def-flux" title="Electric flux">
For an oriented surface $S$, the quantity

$$
\Phi_S = \int_S \boldsymbol{E}\cdot d\boldsymbol{S} = \int_S \boldsymbol{E}\cdot\hat{\boldsymbol{n}}\,dS
$$

is called the **electric flux** through $S$. When $S$ is closed we take $\hat{\boldsymbol{n}}$ outward and write $\oint_S$.
</Definition>

Since $\boldsymbol{E}\cdot\hat{\boldsymbol{n}}$ is the component of the field perpendicular to the surface, $\Phi_S$ measures the total amount by which the field pierces the surface. A field parallel to the surface contributes nothing.

Now for the main point. The exponent $1/r^2$ in Coulomb's law has the following remarkable property.

<Lemma id="lem-solid-angle" title="Solid-angle lemma">
Fix $\boldsymbol{y}\in\mathbb{R}^3$ and consider the vector field

$$
\boldsymbol{F}_{\boldsymbol{y}}(\boldsymbol{x}) = \frac{\boldsymbol{x}-\boldsymbol{y}}{|\boldsymbol{x}-\boldsymbol{y}|^{3}},
$$

defined away from $\boldsymbol{y}$. Let $V$ be a smooth bounded region, $S=\partial V$ its boundary with outward normal, and suppose $\boldsymbol{y}\notin S$. Then

$$
\oint_S \boldsymbol{F}_{\boldsymbol{y}}\cdot d\boldsymbol{S} =
\begin{cases}
4\pi, & \boldsymbol{y}\in V\ (\text{inside}),\\[2pt]
0, & \boldsymbol{y}\notin \overline{V}\ (\text{outside}).
\end{cases}
$$
</Lemma>

<Proof of="lem-solid-angle">
Without loss of generality $\boldsymbol{y}=\boldsymbol{0}$ (translate the coordinates). Then $\boldsymbol{F}(\boldsymbol{x}) = \boldsymbol{x}/r^3$ with $r=|\boldsymbol{x}|$.

**Step 1: $\operatorname{div}\boldsymbol{F}=0$ for $\boldsymbol{x}\ne\boldsymbol{0}$.** First, $\partial r/\partial x_i = x_i/r$ (differentiate $r = (x_1^2+x_2^2+x_3^2)^{1/2}$). Hence, by the product rule,

$$
\frac{\partial}{\partial x_i}\left(\frac{x_i}{r^3}\right)
= \frac{1}{r^3} + x_i\cdot\left(-\frac{3}{r^4}\right)\frac{x_i}{r}
= \frac{1}{r^3} - \frac{3x_i^2}{r^5},
$$

and summing over $i=1,2,3$ and using $x_1^2+x_2^2+x_3^2=r^2$,

$$
\operatorname{div}\boldsymbol{F} = \frac{3}{r^3} - \frac{3r^2}{r^5} = \frac{3}{r^3}-\frac{3}{r^3} = 0 .
$$

The exponent $3$ here (that is, the $1/r^2$ of the Coulomb force) is essential. For $\boldsymbol{F} = \boldsymbol{x}/r^{n}$ the same computation gives $\operatorname{div}\boldsymbol{F} = (3-n)/r^{n}$, which vanishes only for $n=3$.

**Step 2: the exterior case.** If $\boldsymbol{0}\notin\overline{V}$, then $\boldsymbol{F}$ is $C^1$ on an open set containing $\overline{V}$. The divergence theorem <Ref to="thm-divergence-theorem" /> therefore applies and gives

$$
\oint_S \boldsymbol{F}\cdot d\boldsymbol{S} = \int_V \operatorname{div}\boldsymbol{F}\,d^3x = \int_V 0\,d^3x = 0 .
$$

**Step 3: the interior case.** If $\boldsymbol{0}\in V$, then, $V$ being open, we may choose $a>0$ small enough that the closed ball $\overline{B_a} = \{|\boldsymbol{x}|\le a\}$ is contained in $V$. Consider the punctured region $V' = V\setminus \overline{B_a}$. Its boundary consists of the outer surface $S$ (with the normal pointing out of $V$) together with the inner sphere $\Sigma_a = \{|\boldsymbol{x}|=a\}$, whose outward normal **as seen from $V'$** points **toward** the origin, i.e. equals $-\hat{\boldsymbol{r}}$. On $V'$ the field $\boldsymbol{F}$ is $C^1$ with vanishing divergence, so the divergence theorem gives

$$
\oint_S \boldsymbol{F}\cdot d\boldsymbol{S} + \int_{\Sigma_a}\boldsymbol{F}\cdot(-\hat{\boldsymbol{r}})\,dS = 0,
\qquad\text{that is}\qquad
\oint_S \boldsymbol{F}\cdot d\boldsymbol{S} = \int_{\Sigma_a}\boldsymbol{F}\cdot\hat{\boldsymbol{r}}\,dS .
$$

The right-hand side can be computed directly. On $\Sigma_a$ we have $\boldsymbol{F} = \hat{\boldsymbol{r}}/a^2$, so $\boldsymbol{F}\cdot\hat{\boldsymbol{r}} = 1/a^2$, and the area of the sphere is $4\pi a^2$; hence

$$
\int_{\Sigma_a}\boldsymbol{F}\cdot\hat{\boldsymbol{r}}\,dS = \frac{1}{a^2}\cdot 4\pi a^2 = 4\pi .
$$

The radius $a$ has dropped out. Both cases are proved.
</Proof>

<Remark id="rem-solid-angle-meaning">
The disappearance of $a$ in Step 3 is meaningful. Geometrically $\boldsymbol{F}\cdot d\boldsymbol{S}$ equals the element of **solid angle** $d\Omega$, and the integral over the whole closed surface gives the total solid angle subtended by the surface as seen from the origin. From inside, every direction is visible, so the answer is $4\pi$; from outside, what enters on the near side exactly cancels what leaves on the far side, so the answer is $0$. The figure below records this intuition.
</Remark>

<Figure caption="Field lines crossing a closed surface S. With the charge inside there is a net outflow; with the charge outside, what enters and what leaves cancel.">
<svg viewBox="0 0 660 330" width="100%" role="img" aria-label="Closed surface and electric field lines">
  <defs>
    <marker id="es-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
      <path d="M 0 0 L 10 5 L 0 10 z" fill="currentColor" />
    </marker>
  </defs>
  <g stroke="currentColor" fill="none" stroke-width="1.6">
    <ellipse cx="160" cy="150" rx="100" ry="88" stroke-dasharray="7 6" />
    <g marker-end="url(#es-arrow)" stroke="var(--sl-color-accent)">
      <line x1="160" y1="150" x2="290" y2="150" />
      <line x1="160" y1="150" x2="252" y2="242" />
      <line x1="160" y1="150" x2="160" y2="280" />
      <line x1="160" y1="150" x2="68"  y2="242" />
      <line x1="160" y1="150" x2="30"  y2="150" />
      <line x1="160" y1="150" x2="68"  y2="58" />
      <line x1="160" y1="150" x2="160" y2="20" />
      <line x1="160" y1="150" x2="252" y2="58" />
    </g>
    <circle cx="160" cy="150" r="6" fill="currentColor" stroke="none" />
    <ellipse cx="520" cy="150" rx="95" ry="85" stroke-dasharray="7 6" />
    <g marker-end="url(#es-arrow)" stroke="var(--sl-color-accent)">
      <line x1="360" y1="150" x2="651" y2="77" />
      <line x1="360" y1="150" x2="658" y2="113" />
      <line x1="360" y1="150" x2="660" y2="150" />
      <line x1="360" y1="150" x2="658" y2="187" />
      <line x1="360" y1="150" x2="651" y2="223" />
    </g>
    <circle cx="360" cy="150" r="6" fill="currentColor" stroke="none" />
  </g>
  <g fill="currentColor" font-size="15" text-anchor="middle">
    <text x="160" y="316">Charge inside: net flux is q/ε₀</text>
    <text x="500" y="316">Charge outside: inflow and outflow cancel, giving 0</text>
  </g>
  <g fill="currentColor" font-size="14">
    <text x="238" y="72">S</text>
    <text x="592" y="76">S</text>
    <text x="168" y="142">q</text>
    <text x="342" y="140">q</text>
  </g>
</svg>
</Figure>

### 4.2. The theorem in integral form

<Theorem id="thm-gauss-integral" title="Gauss's law (integral form)">
Let $\rho$ be a continuous charge density with compact support and let $\boldsymbol{E}$ be the electric field given by the integral in <Ref to="def-efield" />. Let $V$ be a smooth bounded region and $S = \partial V$ its boundary with outward normal, and suppose that there is no charge on $\partial V$, i.e. that the support of $\rho$ does not meet $S$. Then

$$
\oint_S \boldsymbol{E}\cdot d\boldsymbol{S} = \frac{1}{\varepsilon_0}\int_V \rho(\boldsymbol{y})\,d^3y = \frac{Q_{\text{in}}}{\varepsilon_0},
$$

where $Q_{\text{in}}$ is the total charge contained in $V$. The same holds for finitely many point charges $q_1,\dots,q_N$: provided no charge lies on $S$, $Q_{\text{in}}$ is the sum of the charges inside $V$.
</Theorem>

<Proof of="thm-gauss-integral">
Substituting the expression from <Ref to="def-efield" /> gives

$$
\oint_S \boldsymbol{E}\cdot d\boldsymbol{S}
= \oint_S \left[\frac{1}{4\pi\varepsilon_0}\int_{\mathbb{R}^3}\rho(\boldsymbol{y})\,\boldsymbol{F}_{\boldsymbol{y}}(\boldsymbol{x})\,d^3y\right]\cdot d\boldsymbol{S}(\boldsymbol{x}),
$$

where $\boldsymbol{F}_{\boldsymbol{y}}$ is the notation of <Ref to="lem-solid-angle" />. We interchange the order of integration. This is legitimate because, by hypothesis, the support of $\rho$ is separated from $S$ by a positive distance $d>0$, so that $|\boldsymbol{F}_{\boldsymbol{y}}(\boldsymbol{x})| \le 1/d^2$ uniformly for $\boldsymbol{x}\in S$ and $\boldsymbol{y}\in\operatorname{supp}\rho$, and the domains of integration have finite measure (<Ref to="mathematics/calculus/multiple-integrals#thm-fubini" text="Fubini's theorem" />). Hence

$$
\oint_S \boldsymbol{E}\cdot d\boldsymbol{S}
= \frac{1}{4\pi\varepsilon_0}\int_{\mathbb{R}^3}\rho(\boldsymbol{y})\left[\oint_S \boldsymbol{F}_{\boldsymbol{y}}\cdot d\boldsymbol{S}\right]d^3y .
$$

Apply <Ref to="lem-solid-angle" /> to the inner bracket: it equals $4\pi$ if $\boldsymbol{y}\in V$ and $0$ if $\boldsymbol{y}\notin\overline{V}$ (points $\boldsymbol{y}\in S$ contribute nothing, since $\rho(\boldsymbol{y})=0$ there). Therefore

$$
\oint_S \boldsymbol{E}\cdot d\boldsymbol{S}
= \frac{1}{4\pi\varepsilon_0}\int_{V}\rho(\boldsymbol{y})\cdot 4\pi\,d^3y
= \frac{1}{\varepsilon_0}\int_V \rho\,d^3y .
$$

For point charges, replace the integral by the finite sum $\sum_i q_i$ and repeat the same argument.
</Proof>

This theorem has two uses. One is as a tool for **actually computing** the field in problems with symmetry; the other is as the starting point for the differential form in the next section. We take up the former first.

<Example id="ex-uniform-sphere" title="The field of a uniformly charged ball">
Suppose a charge $Q$ is distributed uniformly inside a ball of radius $a$. The charge density is $\rho = Q/\left(\tfrac{4}{3}\pi a^3\right) = 3Q/(4\pi a^3)$.

**The symmetry argument.** The charge distribution is invariant under rotations about the origin. The field must share this symmetry, so it is restricted to the form $\boldsymbol{E}(\boldsymbol{x}) = E(r)\hat{\boldsymbol{r}}$. Indeed, if $\boldsymbol{E}$ had a component other than along $\hat{\boldsymbol{r}}$, that component would define a tangent vector field on the sphere; rotational symmetry would force its direction to be "the same" at every point of the sphere, and no continuous tangent vector field on a sphere has that property except $\boldsymbol{0}$. That the magnitude depends on $r$ alone also follows from rotational symmetry.

**The Gaussian surface.** Take the sphere $S_r$ of radius $r$. On $S_r$ the quantity $\boldsymbol{E}\cdot\hat{\boldsymbol{n}} = E(r)$ is constant, so the flux is

$$
\oint_{S_r}\boldsymbol{E}\cdot d\boldsymbol{S} = E(r)\cdot 4\pi r^2 .
$$

The charge enclosed, on the other hand, is $Q$ if $r\ge a$ and $Q\,(r/a)^3$ if $r < a$ (by the ratio of volumes). By <Ref to="thm-gauss-integral" />,

$$
E(r) = \begin{cases}
\dfrac{Q}{4\pi\varepsilon_0}\dfrac{r}{a^3}, & r < a,\\[10pt]
\dfrac{Q}{4\pi\varepsilon_0 r^2}, & r \ge a .
\end{cases}
$$

Inside, the field grows **in proportion** to the distance from the centre; outside, it is indistinguishable from the field of the whole charge concentrated at the centre. At $r=a$ the two expressions agree at $Q/(4\pi\varepsilon_0 a^2)$, so the field is continuous.

**Numbers.** With $Q = 1.0\times10^{-8}\ \mathrm{C}$ and $a = 5.0\ \mathrm{cm}$, the field at the surface is

$$
E(a) = 8.9875\times10^{9}\times\frac{1.0\times10^{-8}}{(5.0\times10^{-2})^2}
= 8.9875\times10^{9}\times\frac{1.0\times10^{-8}}{2.5\times10^{-3}}
= 3.6\times10^{4}\ \mathrm{V/m}.
$$

Dielectric breakdown in dry air occurs at about $3\times10^{6}\ \mathrm{V/m}$, so a field of this size can be held without discharge.
</Example>

<Example id="ex-infinite-line" title="An infinite line charge">
Suppose charge is distributed uniformly along the $z$ axis with linear density $\lambda$. In cylindrical coordinates $(s,\varphi,z)$ the distribution is invariant under translations along $z$, under rotations about the $z$ axis, and under the reflection $z\mapsto -z$. These three imply that $\boldsymbol{E} = E(s)\hat{\boldsymbol{s}}$, purely radial: a $z$ component would change sign under the reflection, a contradiction, and a $\varphi$ component is excluded by combining the reflection (which preserves $\varphi$) with a rotation.

Take as Gaussian surface a cylinder of radius $s$ and length $L$. On the top and bottom caps $\boldsymbol{E}\perp d\boldsymbol{S}$, so they contribute $0$; on the lateral surface $\boldsymbol{E}\cdot\hat{\boldsymbol{n}} = E(s)$ is constant. The lateral area is $2\pi s L$ and the enclosed charge is $\lambda L$, so

$$
E(s)\cdot 2\pi s L = \frac{\lambda L}{\varepsilon_0}
\qquad\Longrightarrow\qquad
E(s) = \frac{\lambda}{2\pi\varepsilon_0 s} .
$$

It is satisfying that $L$ cancels. Note that the falloff is $1/s$, not $1/s^2$: dropping one dimension drops the exponent by one.
</Example>

<Remark id="rem-gauss-limits">
<Ref to="thm-gauss-integral" /> is an identity valid for **every** closed surface, but one can extract $\boldsymbol{E}$ from it only when symmetry lets us choose a Gaussian surface on which $\boldsymbol{E}\cdot\hat{\boldsymbol{n}}$ is constant. In practice this restricts us to three situations: spherical symmetry, axial symmetry (an infinite cylinder) and planar symmetry (an infinite slab). For a charged rod of finite length Gauss's law is still true but useless. In such cases one returns to the integral in <Ref to="def-efield" /> or to the Poisson equation of the following sections.
</Remark>

---

## 5. Divergence and the differential form of Gauss's law

### 5.1. What divergence is

<Ref to="thm-gauss-integral" /> is a statement about regions of finite size. A field theory wants a local law holding at each point, so we shrink the closed surface down to a single point.

<Definition id="def-divergence" title="Divergence (density of sources)">
For a vector field $\boldsymbol{A}$ and a point $\boldsymbol{x}_0$, the limit

$$
\operatorname{div}\boldsymbol{A}(\boldsymbol{x}_0) = \lim_{V\to\{\boldsymbol{x}_0\}} \frac{1}{|V|}\oint_{\partial V}\boldsymbol{A}\cdot d\boldsymbol{S}
$$

taken as a smooth region $V$ containing $\boldsymbol{x}_0$ shrinks to $\boldsymbol{x}_0$ is called the **divergence** of $\boldsymbol{A}$ at $\boldsymbol{x}_0$ (here $|V|$ is the volume of $V$). The numerator is the net outflow from $V$, so the divergence is **the strength of the source per unit volume**.
</Definition>

The advantage of this definition is that it is manifestly coordinate-free. To compute with it, however, we need a coordinate expression.

<Proposition id="prop-div-cartesian" title="Divergence in Cartesian coordinates">
If $\boldsymbol{A} = (A_x,A_y,A_z)$ is of class $C^1$ near $\boldsymbol{x}_0$, then the limit in <Ref to="def-divergence" />, taken along the cubes $C_\epsilon$ of side $2\epsilon$ centred at $\boldsymbol{x}_0$ as $\epsilon\to 0$, exists and equals

$$
\operatorname{div}\boldsymbol{A}(\boldsymbol{x}_0) = \frac{\partial A_x}{\partial x}(\boldsymbol{x}_0) + \frac{\partial A_y}{\partial y}(\boldsymbol{x}_0) + \frac{\partial A_z}{\partial z}(\boldsymbol{x}_0).
$$
</Proposition>

<Proof of="prop-div-cartesian">
Write $\boldsymbol{x}_0 = (x_0,y_0,z_0)$ and $C_\epsilon = [x_0-\epsilon,x_0+\epsilon]\times[y_0-\epsilon,y_0+\epsilon]\times[z_0-\epsilon,z_0+\epsilon]$, whose volume is $|C_\epsilon| = 8\epsilon^3$.

Group the six faces of the cube into three opposite pairs. On the two faces perpendicular to $x$ the outward normals are $+\hat{\boldsymbol{e}}_x$ and $-\hat{\boldsymbol{e}}_x$ respectively, so the flux from this pair is

$$
\Phi_x = \int_{y_0-\epsilon}^{y_0+\epsilon}\!\!\int_{z_0-\epsilon}^{z_0+\epsilon}
\Big[A_x(x_0+\epsilon,y,z) - A_x(x_0-\epsilon,y,z)\Big]\,dz\,dy .
$$

Apply the one-variable mean value theorem in $x$ to the integrand (<Ref to="mathematics/calculus/mean-value-and-taylor#thm-mvt" text="Lagrange's mean value theorem" />). Since $A_x$ is $C^1$, for each $(y,z)$ there is a $\xi = \xi(y,z)\in(x_0-\epsilon,x_0+\epsilon)$ with

$$
A_x(x_0+\epsilon,y,z) - A_x(x_0-\epsilon,y,z) = 2\epsilon\,\frac{\partial A_x}{\partial x}(\xi,y,z) .
$$

Because $\partial A_x/\partial x$ is continuous, it is uniformly continuous on a compact closed neighbourhood of $\boldsymbol{x}_0$. Hence, given any $\eta>0$, we may take $\epsilon$ small enough that at every point $\boldsymbol{p}$ of $C_\epsilon$

$$
\left|\frac{\partial A_x}{\partial x}(\boldsymbol{p}) - \frac{\partial A_x}{\partial x}(\boldsymbol{x}_0)\right| < \eta
$$

(this is exactly the definition of <Ref to="mathematics/calculus/limits-and-continuity#def-uniform-continuity" text="uniform continuity" />). Since $(\xi,y,z)\in C_\epsilon$, this estimate applies and gives

$$
\left|\Phi_x - 2\epsilon\cdot(2\epsilon)^2\,\frac{\partial A_x}{\partial x}(\boldsymbol{x}_0)\right|
\le 2\epsilon\cdot(2\epsilon)^2\,\eta = 8\epsilon^3\eta .
$$

Dividing both sides by $|C_\epsilon| = 8\epsilon^3$ yields $\left|\Phi_x/(8\epsilon^3) - \partial_x A_x(\boldsymbol{x}_0)\right| \le \eta$. As $\eta>0$ was arbitrary,

$$
\lim_{\epsilon\to 0}\frac{\Phi_x}{8\epsilon^3} = \frac{\partial A_x}{\partial x}(\boldsymbol{x}_0) .
$$

The same estimate holds for the $y$ and $z$ pairs after relabelling the letters. Adding the three gives the assertion.
</Proof>

<Ref to="prop-div-cartesian" /> gives meaning — that of a source — to the mechanical formula "divergence = sum of partial derivatives". Conversely, whenever the apparently inert expression $\partial_xA_x+\partial_yA_y+\partial_zA_z$ appears, read it as asking whether the field is welling up or draining away at that point.

Summing <Ref to="def-divergence" /> over infinitesimal regions to build up a finite one gives the next theorem.

<Theorem id="thm-divergence-theorem" title="Divergence theorem (Gauss–Ostrogradsky theorem)">
Let $V$ be a smooth bounded region and $\boldsymbol{A}$ a vector field of class $C^1$ on an open set containing $\overline{V}$. Then

$$
\int_V \operatorname{div}\boldsymbol{A}\,d^3x = \oint_{\partial V}\boldsymbol{A}\cdot d\boldsymbol{S}
$$

(the normal on $\partial V$ being outward).
</Theorem>

<Remark id="rem-divergence-theorem-proof">
The divergence theorem is a purely mathematical theorem and holds independently of electromagnetism. The proof runs as follows: partition the region into small boxes, observe that the fluxes through a face shared by two adjacent boxes have opposite orientations and cancel (so that all interior contributions cancel and only the outer faces survive), and apply <Ref to="prop-div-cartesian" /> to each box. Stating this rigorously for a general region with piecewise $C^1$ boundary takes some work, so we accept the theorem here and use it. Complete proofs may be found in Sugiura's *Kaiseki Nyumon II* or in Spivak's *Calculus on Manifolds*.
</Remark>

### 5.2. Deriving the differential form

Passing from the integral form to the differential form requires one extra step: "if the integrals agree over every region, then the integrands agree". This is not obvious, and it uses the continuity of $\rho$ and of $\operatorname{div}\boldsymbol{E}$.

<Lemma id="lem-vanishing" title="Vanishing lemma for continuous functions">
Let $\Omega\subset\mathbb{R}^3$ be open and $f:\Omega\to\mathbb{R}$ continuous. If $\int_B f\,d^3x = 0$ for every closed ball $B$ contained in $\Omega$, then $f\equiv 0$ on $\Omega$.
</Lemma>

<Proof of="lem-vanishing">
We argue by contradiction. Suppose $f(\boldsymbol{x}_0)\ne 0$ for some $\boldsymbol{x}_0\in\Omega$, and consider first the case $c := f(\boldsymbol{x}_0) > 0$.

Since $f$ is continuous at $\boldsymbol{x}_0$, there is a $\delta>0$ such that $|\boldsymbol{x}-\boldsymbol{x}_0| \le \delta$ implies $|f(\boldsymbol{x}) - c| < c/2$, corresponding to $\varepsilon = c/2$, and hence $f(\boldsymbol{x}) > c/2$. As $\Omega$ is open, we may shrink $\delta$ further so that the closed ball $B = \{|\boldsymbol{x}-\boldsymbol{x}_0|\le\delta\}$ is contained in $\Omega$. For this $B$,

$$
\int_B f\,d^3x \ \ge\ \int_B \frac{c}{2}\,d^3x = \frac{c}{2}\cdot\frac{4}{3}\pi\delta^3 > 0,
$$

contradicting the hypothesis $\int_B f = 0$. If $f(\boldsymbol{x}_0)<0$, apply the same argument to $-f$. Hence $f$ vanishes at every point.
</Proof>

<Theorem id="thm-gauss-differential" title="Gauss's law (differential form)">
Let $\rho$ be a continuous charge density with compact support and $\boldsymbol{E}$ the field it produces. On any region where $\boldsymbol{E}$ is of class $C^1$,

$$
\operatorname{div}\boldsymbol{E}(\boldsymbol{x}) = \frac{\rho(\boldsymbol{x})}{\varepsilon_0}
$$

holds at every point.
</Theorem>

<Proof of="thm-gauss-differential">
Let $\Omega$ be an open set on which $\boldsymbol{E}$ is $C^1$, and take an arbitrary closed ball $B$ contained in $\Omega$. Writing $V$ for the interior of $B$, <Ref to="thm-divergence-theorem" /> gives

$$
\int_{V}\operatorname{div}\boldsymbol{E}\,d^3x = \oint_{\partial V}\boldsymbol{E}\cdot d\boldsymbol{S} .
$$

By <Ref to="thm-gauss-integral" />, the right-hand side equals $\dfrac{1}{\varepsilon_0}\displaystyle\int_V \rho\,d^3y$. (Charge lying on the bounding sphere does not affect the volume integral, since that set has three-dimensional measure $0$; rigorously, first perturb the radius slightly so that the support of $\rho$ does not meet the sphere, then pass to the limit using continuity.) Therefore

$$
\int_{V}\left(\operatorname{div}\boldsymbol{E} - \frac{\rho}{\varepsilon_0}\right)d^3x = 0 .
$$

Since $\boldsymbol{E}$ is $C^1$ and $\rho$ is continuous, the bracketed function $f = \operatorname{div}\boldsymbol{E} - \rho/\varepsilon_0$ is continuous on $\Omega$. The identity above holds for every closed ball contained in $\Omega$, so <Ref to="lem-vanishing" /> gives $f\equiv 0$, that is, $\operatorname{div}\boldsymbol{E} = \rho/\varepsilon_0$.
</Proof>

This is the precise content of the statement "charge is the source of the electric field". Field lines well up where positive charge sits, drain away where negative charge sits, and neither break nor originate where there is no charge. Reading the divergence as a source density, as in <Ref to="def-divergence" />, is what makes this work.

<Example id="ex-check-divergence" title="Checking the differential form on the uniformly charged ball">
Let us verify by direct computation that the field found in <Ref to="ex-uniform-sphere" /> satisfies <Ref to="thm-gauss-differential" />. For a spherically symmetric vector field $\boldsymbol{A} = A(r)\hat{\boldsymbol{r}}$ the divergence is given in spherical coordinates by

$$
\operatorname{div}\boldsymbol{A} = \frac{1}{r^2}\frac{d}{dr}\left(r^2 A(r)\right).
$$

(This formula itself follows from <Ref to="def-divergence" /> by taking $V$ to be a shell of thickness $dr$: the outflow is $4\pi(r+dr)^2A(r+dr) - 4\pi r^2A(r)$ and the volume is $4\pi r^2 dr$.)

**Outside, $r > a$.** Here $A(r) = Q/(4\pi\varepsilon_0 r^2)$, so $r^2A(r) = Q/(4\pi\varepsilon_0)$ is constant and $\dfrac{d}{dr}$ of it is $0$. Hence $\operatorname{div}\boldsymbol{E} = 0$. There is no charge outside, so $\rho = 0$, and the two agree.

**Inside, $r < a$.** Here $A(r) = Qr/(4\pi\varepsilon_0 a^3)$, so $r^2A(r) = Qr^3/(4\pi\varepsilon_0 a^3)$; differentiating gives $3Qr^2/(4\pi\varepsilon_0 a^3)$, and dividing by $r^2$,

$$
\operatorname{div}\boldsymbol{E} = \frac{3Q}{4\pi\varepsilon_0 a^3} = \frac{1}{\varepsilon_0}\cdot\frac{3Q}{4\pi a^3} = \frac{\rho}{\varepsilon_0} ,
$$

exactly the $\rho = 3Q/(4\pi a^3)$ used in <Ref to="ex-uniform-sphere" />. Note that at $r=a$ the field $E$ is continuous but $dE/dr$ is not, so $\boldsymbol{E}$ is not $C^1$ there. This corresponds to $\rho$ being discontinuous at that radius (positive inside, $0$ outside). At points where the hypothesis of <Ref to="thm-gauss-differential" /> fails, the differential form loses pointwise meaning and the integral form is the more fundamental statement.
</Example>

---

## 6. The electrostatic potential and the Poisson equation

### 6.1. Writing the field with a single scalar

<Ref to="thm-gauss-differential" /> is one equation, but the unknowns are the three components of $\boldsymbol{E}$. It alone does not determine the field. The missing information is supplied by a second property of electrostatic fields.

The starting point is the gradient of $1/r$. Since $\partial r/\partial x_i = x_i/r$ for $r=|\boldsymbol{x}|$, the chain rule gives

$$
\frac{\partial}{\partial x_i}\left(\frac{1}{r}\right) = -\frac{1}{r^2}\cdot\frac{x_i}{r} = -\frac{x_i}{r^3},
\qquad\text{that is}\qquad
\nabla\left(\frac{1}{r}\right) = -\frac{\boldsymbol{x}}{r^3} .
$$

The right-hand side is precisely the form of the field of a point charge. In other words, the Coulomb field is the gradient of a single scalar function $1/r$. Superposing, the same holds for a general distribution.

<Definition id="def-potential" title="Electrostatic potential">
For a continuous charge density $\rho$ with compact support, the function

$$
V(\boldsymbol{x}) = \frac{1}{4\pi\varepsilon_0}\int_{\mathbb{R}^3}\frac{\rho(\boldsymbol{y})}{|\boldsymbol{x}-\boldsymbol{y}|}\,d^3y
$$

is called the **electrostatic potential**. Its unit is $\mathrm{V} = \mathrm{J/C}$. The reference level has been chosen so that $V\to 0$ at infinity.
</Definition>

<Theorem id="thm-potential-exists" title="The field is the gradient of the potential">
The function $V$ of <Ref to="def-potential" /> is of class $C^1$ on all of $\mathbb{R}^3$, and

$$
\boldsymbol{E} = -\operatorname{grad}V = -\nabla V .
$$
</Theorem>

<Proof of="thm-potential-exists">
Differentiate the integrand with respect to $\boldsymbol{x}$. As computed above, for fixed $\boldsymbol{y}$,

$$
\nabla_{\boldsymbol{x}}\frac{1}{|\boldsymbol{x}-\boldsymbol{y}|} = -\frac{\boldsymbol{x}-\boldsymbol{y}}{|\boldsymbol{x}-\boldsymbol{y}|^3}
$$

(this is just the translation $\boldsymbol{x}\mapsto\boldsymbol{x}-\boldsymbol{y}$). If differentiation under the integral sign is permitted, then

$$
\nabla V(\boldsymbol{x}) = \frac{1}{4\pi\varepsilon_0}\int\rho(\boldsymbol{y})\left(-\frac{\boldsymbol{x}-\boldsymbol{y}}{|\boldsymbol{x}-\boldsymbol{y}|^3}\right)d^3y = -\boldsymbol{E}(\boldsymbol{x}),
$$

which is the assertion. The interchange of differentiation and integration is justified as follows. Since $\rho$ is bounded (being continuous with compact support), say $|\rho|\le M$, the magnitude of the gradient of the integrand is bounded by $M/|\boldsymbol{x}-\boldsymbol{y}|^2$. In three dimensions the volume element has the polar form $|\boldsymbol{x}-\boldsymbol{y}|^2\,d|\boldsymbol{x}-\boldsymbol{y}|\,d\Omega$, so this bound provides a dominating function integrable in $\boldsymbol{y}$ on a neighbourhood of $\boldsymbol{x}$. Lebesgue's dominated convergence theorem therefore lets us exchange the limit of the difference quotients with the integral, and since the resulting $\nabla V = -\boldsymbol{E}$ is continuous, $V$ is of class $C^1$.
</Proof>

<Corollary id="cor-conservative" title="The electrostatic field is conservative">
In the situation of <Ref to="thm-potential-exists" />, for every piecewise $C^1$ curve $C$ in $\mathbb{R}^3$ with initial point $A$ and terminal point $B$,

$$
\int_C \boldsymbol{E}\cdot d\boldsymbol{l} = V(A) - V(B) .
$$

In particular the line integral is independent of the path, and $\oint_C\boldsymbol{E}\cdot d\boldsymbol{l} = 0$ along any closed curve. Moreover, on any region where $V$ is of class $C^2$, $\operatorname{rot}\boldsymbol{E} = \boldsymbol{0}$.
</Corollary>

<Proof of="cor-conservative">
Parametrize $C$ by $\boldsymbol{c}:[0,1]\to\mathbb{R}^3$ with $\boldsymbol{c}(0)=A$ and $\boldsymbol{c}(1)=B$. By the chain rule for functions of several variables (<Ref to="mathematics/calculus/multivariable-differentiation#thm-chain-rule" text="chain rule" />),

$$
\frac{d}{dt}V(\boldsymbol{c}(t)) = \nabla V(\boldsymbol{c}(t))\cdot \boldsymbol{c}'(t) = -\boldsymbol{E}(\boldsymbol{c}(t))\cdot\boldsymbol{c}'(t)
$$

(the second equality uses <Ref to="thm-potential-exists" />). Integrating both sides in $t$ from $0$ to $1$ and applying <Ref to="mathematics/calculus/integration-and-ftc#thm-ftc2" text="the fundamental theorem of calculus" /> gives

$$
V(B) - V(A) = -\int_0^1 \boldsymbol{E}(\boldsymbol{c}(t))\cdot\boldsymbol{c}'(t)\,dt = -\int_C\boldsymbol{E}\cdot d\boldsymbol{l},
$$

and rearranging gives the assertion. The right-hand side depends only on the endpoints, hence not on the path; for a closed curve $A=B$ and the integral is $0$. Finally, the first component of $\operatorname{rot}(\nabla V)$ is $\partial_y\partial_z V - \partial_z\partial_y V$, which vanishes when $V$ is $C^2$ because the order of partial differentiation may then be exchanged (<Ref to="mathematics/calculus/multivariable-differentiation#thm-schwarz" text="Schwarz's theorem" />); the other components are handled the same way.
</Proof>

<Remark id="rem-potential-meaning">
Physically, <Ref to="cor-conservative" /> says that the work done by the field in carrying a charge $q$ from $A$ to $B$ is $q\,(V(A)-V(B))$ and is independent of the path. The electrostatic field is thus a conservative force field, and <Ref to="physics/mechanics/newtonian-mechanics#thm-energy-conservation" text="conservation of mechanical energy" /> from [the foundations of Newtonian mechanics](/en/physics/mechanics/newtonian-mechanics) applies verbatim. The potential energy is $U = qV$.

Being able to write three components of a vector field with a single scalar is of great practical value, and nearly every electrostatics problem is solved as a problem for $V$. For time-dependent fields, however, $\operatorname{rot}\boldsymbol{E}\ne\boldsymbol{0}$ and a scalar potential no longer suffices: a vector potential $\boldsymbol{A}$ is needed, and only then does the freedom of gauge transformations appear ([electromagnetic potentials and gauge transformations](/physics/electromagnetism/gauge-potentials)). Even in electrostatics one may add a constant to $V$, and this can be seen as the simplest instance of gauge freedom.
</Remark>

### 6.2. The Poisson equation

<Theorem id="thm-poisson" title="Poisson equation">
Let $\rho$ be a continuous charge density with compact support and $V$ the electrostatic potential of <Ref to="def-potential" />. On any region where $V$ is of class $C^2$,

$$
\Delta V = \frac{\partial^2V}{\partial x^2}+\frac{\partial^2V}{\partial y^2}+\frac{\partial^2V}{\partial z^2} = -\frac{\rho}{\varepsilon_0} .
$$
</Theorem>

<Proof of="thm-poisson">
By <Ref to="thm-potential-exists" /> we have $\boldsymbol{E} = -\nabla V$. If $V$ is $C^2$ then $\boldsymbol{E}$ is $C^1$, so <Ref to="thm-gauss-differential" /> applies and gives

$$
\frac{\rho}{\varepsilon_0} = \operatorname{div}\boldsymbol{E} = \operatorname{div}(-\nabla V) = -\Delta V .
$$

The last equality is the definition $\operatorname{div}\operatorname{grad} = \Delta$. Rearranging the signs gives the assertion.
</Proof>

<Corollary id="cor-laplace" title="Laplace equation">
In a region free of charge ($\rho\equiv 0$), the electrostatic potential satisfies $\Delta V = 0$. This equation is the Laplace equation and its solutions are called harmonic functions.
</Corollary>

<Remark id="rem-regularity">
One fine point deserves to be stated honestly. Continuity of $\rho$ alone does not in general make the $V$ of <Ref to="def-potential" /> of class $C^2$. Guaranteeing $C^2$ requires a somewhat stronger condition, such as local Hölder continuity of $\rho$; examples with merely continuous $\rho$ and $V\notin C^2$ are known. This is a standard topic in potential theory, discussed in detail in Chapter 2 of Evans, *Partial Differential Equations*. Charge distributions arising in physical problems are usually piecewise smooth, so in practice this need not concern us.
</Remark>

<Ref to="thm-poisson" /> is the destination of this article. Electrostatics problems are formulated as follows.

> Given a region and boundary conditions (the potential on the surface of a conductor, the behaviour at infinity, and so on), find $V$ satisfying $\Delta V = -\rho/\varepsilon_0$.

The integral in <Ref to="def-potential" /> is nothing other than the solution formula for the boundary condition "$V\to 0$ at infinity". In problems on a bounded region containing conductors or dielectrics the boundary conditions differ, the integral formula no longer applies as it stands, and the techniques of partial differential equations — images, separation of variables, Green's functions — enter.

<Example id="ex-sphere-potential" title="Potential of the uniformly charged ball, and the Poisson equation">
For the ball of <Ref to="ex-uniform-sphere" />, let us find $V$ and check the Poisson equation. By spherical symmetry $V = V(r)$, and by <Ref to="thm-potential-exists" /> we have $E(r) = -dV/dr$.

**Outside, $r\ge a$.** Integrating $-dV/dr = Q/(4\pi\varepsilon_0 r^2)$ and fixing the constant so that $V\to0$ as $r\to\infty$,

$$
V(r) = \frac{Q}{4\pi\varepsilon_0 r} .
$$

**Inside, $r\le a$.** Integrating $-dV/dr = Qr/(4\pi\varepsilon_0 a^3)$ gives $V(r) = -\dfrac{Qr^2}{8\pi\varepsilon_0 a^3} + C$. Matching at $r=a$ to the exterior value $Q/(4\pi\varepsilon_0 a)$,

$$
-\frac{Q}{8\pi\varepsilon_0 a} + C = \frac{Q}{4\pi\varepsilon_0 a}
\quad\Longrightarrow\quad
C = \frac{3Q}{8\pi\varepsilon_0 a},
$$

so that

$$
V(r) = \frac{Q}{8\pi\varepsilon_0 a}\left(3 - \frac{r^2}{a^2}\right) \qquad (r\le a).
$$

At the centre $V(0) = 3Q/(8\pi\varepsilon_0 a)$, which is $1.5$ times the surface value. Inserting the numbers of <Ref to="ex-uniform-sphere" /> ($Q=1.0\times10^{-8}\ \mathrm{C}$, $a=5.0\ \mathrm{cm}$), the surface potential is $8.9875\times10^{9}\times10^{-8}/(5.0\times10^{-2}) = 1.8\times10^{3}\ \mathrm{V}$ and the potential at the centre is $2.7\times10^{3}\ \mathrm{V}$.

**Checking the Poisson equation.** For a spherically symmetric function the Laplacian is $\Delta V = \dfrac{1}{r^2}\dfrac{d}{dr}\left(r^2\dfrac{dV}{dr}\right)$. Inside, $dV/dr = -Qr/(4\pi\varepsilon_0a^3)$, so

$$
r^2\frac{dV}{dr} = -\frac{Qr^3}{4\pi\varepsilon_0a^3},\qquad
\frac{d}{dr}\left(r^2\frac{dV}{dr}\right) = -\frac{3Qr^2}{4\pi\varepsilon_0a^3},\qquad
\Delta V = -\frac{3Q}{4\pi\varepsilon_0 a^3} .
$$

On the other hand $\rho = 3Q/(4\pi a^3)$, so $-\rho/\varepsilon_0 = -3Q/(4\pi\varepsilon_0a^3)$, and <Ref to="thm-poisson" /> indeed holds. Outside, $r^2\,dV/dr = -Q/(4\pi\varepsilon_0)$ is constant, so $\Delta V = 0$, as <Ref to="cor-laplace" /> requires.
</Example>

<Aside type="tip">
When solving an electrostatics problem, it is generally good to try the following in order. (1) Is there symmetry? If so, obtain $\boldsymbol{E}$ directly from <Ref to="thm-gauss-integral" />. (2) If not, are the boundary conditions simple? If they are, solve <Ref to="thm-poisson" /> as a partial differential equation. (3) If neither works, evaluate the integral of <Ref to="def-potential" /> numerically. Integrating the scalar $V$ and differentiating at the end is easier than integrating $\boldsymbol{E}$ directly, since it avoids handling vector components.
</Aside>

---

## 7. Exercises

<Exercise id="exr-shell" difficulty="Easy">
A charge $Q$ is distributed uniformly over a sphere of radius $a$ (surface density $\sigma = Q/(4\pi a^2)$, with a hollow interior). Find the field $E(r)$ and the potential $V(r)$ at distance $r$ from the centre, and state whether each of $E$ and $V$ is continuous or discontinuous at $r=a$.

<Solution>
By spherical symmetry, the same argument as in <Ref to="ex-uniform-sphere" /> gives $\boldsymbol{E} = E(r)\hat{\boldsymbol{r}}$. Taking the sphere of radius $r$ as Gaussian surface, the flux is $4\pi r^2E(r)$, and the enclosed charge is $0$ for $r < a$ and $Q$ for $r > a$. By <Ref to="thm-gauss-integral" />,

$$
E(r) = \begin{cases} 0, & r < a,\\[6pt] \dfrac{Q}{4\pi\varepsilon_0 r^2}, & r > a. \end{cases}
$$

The essential point is that the field vanishes identically inside the cavity. This is the exterior case of <Ref to="lem-solid-angle" /> at work, and it is a direct consequence of the exponent in Coulomb's law being exactly $2$. (Measuring this vanishing of the field inside a cavity is in fact the experimental method used to test departures from that exponent to high precision.)

The potential follows from $V(r) = -\int_\infty^r E\,dr'$. For $r\ge a$ we get $V(r) = Q/(4\pi\varepsilon_0 r)$. For $r\le a$ the field vanishes, so $V$ is constant and equal to its value at $r=a$:

$$
V(r) = \frac{Q}{4\pi\varepsilon_0 a} \qquad (r\le a).
$$

At $r=a$ the field jumps from $0$ to $Q/(4\pi\varepsilon_0a^2)$ and is therefore **discontinuous** (in general the normal component jumps by $\sigma/\varepsilon_0$ across a surface charge, and here indeed $\sigma/\varepsilon_0 = Q/(4\pi\varepsilon_0a^2)$). The potential $V$, by contrast, equals $Q/(4\pi\varepsilon_0 a)$ from both sides at $r=a$ and is **continuous**: since $V$ is an integral of $E$, a bounded jump in $E$ does not destroy continuity.
</Solution>
</Exercise>

<Exercise id="exr-cylinder" difficulty="Standard">
Charge is distributed with uniform density $\rho$ inside an infinitely long cylinder of radius $a$. Find the field using cylindrical coordinates $(s,\varphi,z)$, and then use the formula for the divergence in cylindrical coordinates,

$$
\operatorname{div}\boldsymbol{A} = \frac{1}{s}\frac{\partial}{\partial s}\left(sA_s\right) + \frac{1}{s}\frac{\partial A_\varphi}{\partial\varphi} + \frac{\partial A_z}{\partial z},
$$

to confirm that <Ref to="thm-gauss-differential" /> holds both inside and outside.

<Solution>
The same symmetry argument as in <Ref to="ex-infinite-line" /> (translation along $z$, rotation about the $z$ axis, reflection $z\mapsto-z$) gives $\boldsymbol{E} = E(s)\hat{\boldsymbol{s}}$.

Take as Gaussian surface a coaxial cylinder of radius $s$ and length $L$. The lateral flux is $E(s)\cdot 2\pi sL$ and the caps contribute $0$. The enclosed charge is $\rho\cdot\pi s^2L$ for $s\le a$ and $\rho\cdot\pi a^2 L$ for $s\ge a$. By <Ref to="thm-gauss-integral" />,

$$
E(s) = \begin{cases}\dfrac{\rho s}{2\varepsilon_0}, & s\le a,\\[10pt] \dfrac{\rho a^2}{2\varepsilon_0 s}, & s\ge a.\end{cases}
$$

At $s=a$ both give $\rho a/(2\varepsilon_0)$, so the field is continuous.

Now compute the divergence. Since $A_\varphi = A_z = 0$, only the first term of the formula survives.

Inside ($s < a$), $sE(s) = \rho s^2/(2\varepsilon_0)$, so

$$
\operatorname{div}\boldsymbol{E} = \frac{1}{s}\frac{d}{ds}\left(\frac{\rho s^2}{2\varepsilon_0}\right) = \frac{1}{s}\cdot\frac{\rho s}{\varepsilon_0} = \frac{\rho}{\varepsilon_0},
$$

which is the differential form. Outside ($s > a$), $sE(s) = \rho a^2/(2\varepsilon_0)$ is a constant independent of $s$, so

$$
\operatorname{div}\boldsymbol{E} = \frac{1}{s}\cdot 0 = 0,
$$

and since $\rho = 0$ there, this too agrees.
</Solution>
</Exercise>

<Exercise id="exr-slab" difficulty="Hard">
Charge is distributed with uniform density $\rho > 0$ inside the infinite slab $|z|\le d$. Granting that $V$ is a function of $z$ alone and that symmetry permits the normalizations $V(z)=V(-z)$ and $V(0)=0$, solve the Poisson equation $\Delta V = -\rho/\varepsilon_0$ both for $|z|\le d$ and for $|z|\ge d$, and match the solutions so that $V$ and $dV/dz$ are continuous at $z=d$. Then obtain $\boldsymbol{E}$ from $V$ and check that it agrees with the result of applying Gauss's law directly.

<Solution>
Since $V$ depends on $z$ only, $\Delta V = d^2V/dz^2$. We solve on the side $z\ge 0$ and extend as an even function afterwards.

**Inside, $0\le z\le d$.** The equation is $V'' = -\rho/\varepsilon_0$. Integrating twice,

$$
V(z) = -\frac{\rho}{2\varepsilon_0}z^2 + Bz + C .
$$

From $V(0)=0$ we get $C=0$. Evenness requires $V'(0)=0$ (the derivative of an even function is odd, hence vanishes at $0$), so $B=0$. Therefore

$$
V(z) = -\frac{\rho}{2\varepsilon_0}z^2 \qquad (0\le z\le d).
$$

**Outside, $z\ge d$.** There $\rho=0$, so $V''=0$, that is $V(z) = \alpha z + \beta$ (the one-dimensional version of <Ref to="cor-laplace" />).

**Matching.** Continuity of $V'$ at $z=d$: from inside $V'(d) = -\rho d/\varepsilon_0$, from outside $\alpha$, so $\alpha = -\rho d/\varepsilon_0$. Continuity of $V$: from $-\rho d^2/(2\varepsilon_0) = \alpha d + \beta = -\rho d^2/\varepsilon_0 + \beta$,

$$
\beta = -\frac{\rho d^2}{2\varepsilon_0} + \frac{\rho d^2}{\varepsilon_0} = \frac{\rho d^2}{2\varepsilon_0}.
$$

Hence for $z\ge d$ we have $V(z) = \dfrac{\rho d}{\varepsilon_0}\left(\dfrac{d}{2} - z\right)$, and on the side $z\le -d$ one replaces $z$ by $|z|$. Note that because this distribution extends to infinity, one cannot impose $V\to0$ at infinity ($V$ tends to $-\infty$ as $|z|\to\infty$). That is why the reference point was taken at $z=0$.

**The field.** From $E_z = -dV/dz$,

$$
E_z(z) = \begin{cases}\dfrac{\rho z}{\varepsilon_0}, & |z|\le d,\\[10pt] \dfrac{\rho d}{\varepsilon_0}\operatorname{sgn}(z), & |z|\ge d.\end{cases}
$$

**Check via Gauss's law.** Take as Gaussian surface a box of base area $S$ extending from $z=-h$ to $z=+h$. By symmetry $E_z(-h) = -E_z(h)$, so the two horizontal faces give a flux $2SE_z(h)$ and the sides contribute $0$. The enclosed charge is $\rho\cdot 2hS$ for $h\le d$ and $\rho\cdot 2dS$ for $h\ge d$. By <Ref to="thm-gauss-integral" />, $2SE_z(h) = 2\rho\min(h,d)S/\varepsilon_0$, that is $E_z(h) = \rho\min(h,d)/\varepsilon_0$, in agreement with the result above.

Taking the limit $d\to0$ with $\rho\cdot 2d\to\sigma$ gives $E_z = \sigma/(2\varepsilon_0)\operatorname{sgn}(z)$, the familiar field of a surface charge on an infinite plane. Its characteristic feature is that it does not depend on the distance.
</Solution>
</Exercise>

---

## References

- Shigenobu Sunakawa, *Riron Denjikigaku*, 3rd ed., Kinokuniya, 1999 (in Japanese) — Chapters 1 and 2 give a systematic treatment of the electrostatic field and Gauss's law.
- Koichi Ohta, *Denjikigaku no Kiso I*, University of Tokyo Press, 2012 (in Japanese) — Chapter 1. Careful on the historical development and the experimental evidence.
- D. J. Griffiths, *Introduction to Electrodynamics*, 4th ed., Cambridge University Press, 2017 — Chapter 2 (Electrostatics). A rich supply of exercises on using Gauss's law.
- J. D. Jackson, *Classical Electrodynamics*, 3rd ed., Wiley, 1998 — Chapter 1. The formulation via delta functions and Green's functions.
- R. P. Feynman, R. B. Leighton, M. Sands, *The Feynman Lectures on Physics*, Vol. II — Chapters 4–6. The full text is available on the [official site](https://www.feynmanlectures.caltech.edu/II_toc.html). The exposition of the field picture here is without equal.
- L. C. Evans, *Partial Differential Equations*, 2nd ed., American Mathematical Society, 2010 — Chapter 2.2. A mathematically rigorous treatment of the Poisson and Laplace equations, including the regularity issue raised in <Ref to="rem-regularity" />.

---

## Appendix: Point charges and the delta function

**Point charges fall outside the framework of the main text.** There we assumed $\rho$ to be a continuous function, which a point charge is not. Yet the field of a point charge is the most basic example in electrostatics. The framework that handles this discrepancy properly is the theory of distributions.

We write the charge density of a point charge $q$ at the origin as $\rho(\boldsymbol{x}) = q\,\delta^3(\boldsymbol{x})$. Here $\delta^3$ is the Dirac delta function, not an ordinary function but the assignment defined by the requirement that $\int \delta^3(\boldsymbol{x})\phi(\boldsymbol{x})\,d^3x = \phi(\boldsymbol{0})$ for every smooth $\phi$ with compact support.

**The differential form of Gauss's law then becomes the following identity.** For $\boldsymbol{E} = \dfrac{q}{4\pi\varepsilon_0}\dfrac{\boldsymbol{x}}{r^3}$ we should have $\operatorname{div}\boldsymbol{E} = \rho/\varepsilon_0 = \dfrac{q}{\varepsilon_0}\delta^3(\boldsymbol{x})$, that is,

$$
\operatorname{div}\left(\frac{\boldsymbol{x}}{r^3}\right) = 4\pi\,\delta^3(\boldsymbol{x}),
\qquad\text{equivalently}\qquad
\Delta\left(\frac{1}{r}\right) = -4\pi\,\delta^3(\boldsymbol{x}) .
$$

At first sight this seems to contradict Step 1 of <Ref to="lem-solid-angle" />, where we showed $\operatorname{div}(\boldsymbol{x}/r^3)=0$. But that computation was valid only for $\boldsymbol{x}\ne\boldsymbol{0}$. At the origin $\boldsymbol{x}/r^3$ is undefined, and it is there that the entire source is concentrated. Indeed, what Step 3 of <Ref to="lem-solid-angle" /> showed was that the flux is $4\pi$ through any closed surface enclosing the origin, however small. That is precisely the statement that a point source of strength $4\pi$ sits at the origin.

**This identity is a convenient computational tool.** Applying the Laplacian to the $V$ of <Ref to="def-potential" />, for instance, gives formally

$$
\Delta V(\boldsymbol{x}) = \frac{1}{4\pi\varepsilon_0}\int\rho(\boldsymbol{y})\,\Delta_{\boldsymbol{x}}\frac{1}{|\boldsymbol{x}-\boldsymbol{y}|}\,d^3y
= \frac{1}{4\pi\varepsilon_0}\int\rho(\boldsymbol{y})\left(-4\pi\delta^3(\boldsymbol{x}-\boldsymbol{y})\right)d^3y
= -\frac{\rho(\boldsymbol{x})}{\varepsilon_0},
$$

so <Ref to="thm-poisson" /> falls out in one line. We took the longer route through <Ref to="thm-gauss-integral" /> in the main text because justifying this formal computation requires some preparation (the definition of the distributional derivative, differentiation of convolutions). Either road leads to the same conclusion.

**Finally, the self-energy of a point charge diverges.** Integrating the field energy density $\tfrac{\varepsilon_0}{2}|\boldsymbol{E}|^2$ of a point charge $q$ over all space produces an integral of the form $\int_0 r^{-4}\cdot r^2dr$ near the origin, which diverges. This is an intrinsic difficulty of classical electromagnetism and marks the limits of the point-charge idealization. Energy is taken up again in [Maxwell's equations and electromagnetic waves](/physics/electromagnetism/maxwell-equations).
