โ† Part I: Electrostatics
Chapter 2

Gauss's Law & Applications

Electric flux, Gauss's law in integral and differential form, and symmetric applications.

2.1 Electric Flux

The electric flux through a surface element $d\mathbf{a} = da\,\hat{n}$ is:

$$d\Phi_E = \mathbf{E} \cdot d\mathbf{a}$$

For a closed surface the total flux is $\Phi_E = \oint_S \mathbf{E} \cdot d\mathbf{a}$. The key insight: for a point charge $q$ enclosed by any closed surface, the flux depends only on $q$, not on the size or shape of the surface. This is Gauss's law.

2.2 Gauss's Law

Integral Form

$$\boxed{\oint_S \mathbf{E} \cdot d\mathbf{a} = \frac{Q_{\rm enc}}{\epsilon_0}}$$

The total electric flux through any closed surface equals the total charge enclosed divided by $\epsilon_0$.

Derivation: Gauss's Law from Coulomb's Law

We derive Gauss's law rigorously starting from Coulomb's law for a point charge, using the concept of solid angle to generalize to arbitrary closed surfaces and arbitrary charge distributions.

Step 1: Start with a point charge at the origin

From Coulomb's law, the electric field of a point charge $q$ at the origin is:

$$\mathbf{E}(\mathbf{r}) = \frac{q}{4\pi\epsilon_0}\frac{\hat{r}}{r^2}$$

Step 2: Compute the flux through a concentric sphere of radius $R$

On a sphere centered at the origin, $\hat{r}$ is the outward normal, so $\mathbf{E}\cdot d\mathbf{a} = E_r\,da$. Since $E_r = q/(4\pi\epsilon_0 R^2)$ is constant on the sphere:

$$\oint_S \mathbf{E}\cdot d\mathbf{a} = \frac{q}{4\pi\epsilon_0 R^2}\oint_S da = \frac{q}{4\pi\epsilon_0 R^2}\cdot 4\pi R^2 = \frac{q}{\epsilon_0}$$

Step 3: Generalize to an arbitrary closed surface โ€” introduce solid angle

For an arbitrary surface element $d\mathbf{a}$ at position $\mathbf{r}$ from the charge, the flux is:

$$\mathbf{E}\cdot d\mathbf{a} = \frac{q}{4\pi\epsilon_0}\frac{\hat{r}\cdot d\mathbf{a}}{r^2}$$

The quantity $\hat{r}\cdot d\mathbf{a}/r^2$ is precisely the solid angle element $d\Omega$ subtended by $d\mathbf{a}$ at the charge location. This is a purely geometric quantity.

Step 4: Integrate over the closed surface

The total solid angle subtended by any closed surface around a point inside it is $4\pi$ steradians. If the charge is outside the surface, the solid angle integrates to zero (positive and negative contributions cancel):

$$\oint_S \frac{\hat{r}\cdot d\mathbf{a}}{r^2} = \begin{cases} 4\pi & \text{if } q \text{ is inside } S \\ 0 & \text{if } q \text{ is outside } S \end{cases}$$

Therefore:

$$\oint_S \mathbf{E}\cdot d\mathbf{a} = \begin{cases} q/\epsilon_0 & \text{if } q \text{ is inside } S \\ 0 & \text{if } q \text{ is outside } S \end{cases}$$

Step 5: Extend to multiple charges via superposition

For a collection of charges $q_1, q_2, \ldots$, the total field is $\mathbf{E} = \sum_i \mathbf{E}_i$. The total flux is the sum of individual fluxes, and only enclosed charges contribute:

$$\oint_S \mathbf{E}\cdot d\mathbf{a} = \sum_i \oint_S \mathbf{E}_i\cdot d\mathbf{a} = \frac{1}{\epsilon_0}\sum_{i\,\in\,\text{inside}} q_i = \frac{Q_{\rm enc}}{\epsilon_0}$$

Step 6: Extend to continuous distributions

For a continuous volume charge density $\rho(\mathbf{r})$, the enclosed charge is $Q_{\rm enc} = \int_{\mathcal{V}}\rho\,d\tau$, and Gauss's law reads:

$$\boxed{\oint_S \mathbf{E}\cdot d\mathbf{a} = \frac{1}{\epsilon_0}\int_{\mathcal{V}}\rho\,d\tau = \frac{Q_{\rm enc}}{\epsilon_0}}$$

This holds for any closed surface $S$ enclosing volume $\mathcal{V}$, regardless of the shape of $S$ or the distribution of charges outside it.

2.2.1 Derivation from Coulomb's Law

Start with the field of a single point charge at the origin. For a spherical Gaussian surface of radius $r$:

$$\oint \mathbf{E} \cdot d\mathbf{a} = E(r) \cdot 4\pi r^2 = \frac{q}{4\pi\epsilon_0 r^2} \cdot 4\pi r^2 = \frac{q}{\epsilon_0}$$

For a non-spherical surface: the solid angle argument shows that $\mathbf{E} \cdot d\mathbf{a} = (q/4\pi\epsilon_0)(d\Omega)$where $d\Omega$ is the solid angle subtended. Integrating over the closed surface gives$4\pi$ steradians if $q$ is inside, and zero if outside. By superposition, Gauss's law holds for any charge distribution.

Derivation: Differential Form of Gauss's Law

We derive the local (differential) form of Gauss's law from the integral form using the divergence theorem.

Step 1: State the integral form

Gauss's law in integral form states, for any closed surface $S$ bounding volume $\mathcal{V}$:

$$\oint_S \mathbf{E}\cdot d\mathbf{a} = \frac{1}{\epsilon_0}\int_{\mathcal{V}}\rho\,d\tau$$

Step 2: Apply the divergence theorem to the left side

The divergence theorem (Gauss's mathematical theorem) converts a surface integral to a volume integral:

$$\oint_S \mathbf{E}\cdot d\mathbf{a} = \int_{\mathcal{V}} (\nabla\cdot\mathbf{E})\,d\tau$$

Step 3: Combine into a single volume integral

Substituting into Gauss's law:

$$\int_{\mathcal{V}} (\nabla\cdot\mathbf{E})\,d\tau = \frac{1}{\epsilon_0}\int_{\mathcal{V}}\rho\,d\tau$$

Rearranging:

$$\int_{\mathcal{V}} \left(\nabla\cdot\mathbf{E} - \frac{\rho}{\epsilon_0}\right)d\tau = 0$$

Step 4: Invoke the arbitrariness of the volume

Since this must hold for every volume $\mathcal{V}$ (no matter how small), the integrand itself must vanish everywhere:

$$\boxed{\nabla\cdot\mathbf{E} = \frac{\rho}{\epsilon_0}}$$

This is the differential form of Gauss's law โ€” the first of Maxwell's equations. It relates the local divergence of $\mathbf{E}$ to the local charge density $\rho$ at that same point.

Step 5: Verify with Coulomb's field using the Dirac delta

For a point charge at the origin, $\mathbf{E} = \frac{q}{4\pi\epsilon_0}\frac{\hat{r}}{r^2}$. We showed earlier that $\nabla\cdot(\hat{r}/r^2) = 0$ for $r\neq 0$. At $r = 0$, the divergence is singular. The correct statement is:

$$\nabla\cdot\left(\frac{\hat{r}}{r^2}\right) = 4\pi\,\delta^3(\mathbf{r})$$

So $\nabla\cdot\mathbf{E} = \frac{q}{4\pi\epsilon_0}\cdot 4\pi\,\delta^3(\mathbf{r}) = \frac{q}{\epsilon_0}\delta^3(\mathbf{r}) = \frac{\rho}{\epsilon_0}$, since $\rho = q\,\delta^3(\mathbf{r})$ for a point charge. This confirms consistency.

2.2.2 Differential Form โ€” Divergence Theorem

Applying the divergence theorem $\oint_S \mathbf{E} \cdot d\mathbf{a} = \int_\mathcal{V} \nabla \cdot \mathbf{E}\,d\tau$and writing $Q_{\rm enc} = \int_\mathcal{V} \rho\,d\tau$, since the volume is arbitrary:

$$\boxed{\nabla \cdot \mathbf{E} = \frac{\rho}{\epsilon_0}} \qquad \text{(Gauss's law, differential form)}$$

This is the first of Maxwell's four equations. It states that the divergence of $\mathbf{E}$is proportional to the local charge density $\rho$.

2.3 Symmetric Applications

Gauss's law is most powerful when the charge distribution has spherical, cylindrical, or planar symmetry, reducing the surface integral to simple algebra.

Spherical symmetry: uniformly charged sphere (radius $R$)

$$E(r) = \begin{cases} \dfrac{1}{4\pi\epsilon_0}\dfrac{Qr}{R^3} & r < R \\[10pt] \dfrac{1}{4\pi\epsilon_0}\dfrac{Q}{r^2} & r > R \end{cases}$$

Inside, the enclosed charge grows as $r^3$; outside, the sphere looks like a point charge.

Cylindrical symmetry: infinite line charge density $\lambda$

$$\mathbf{E} = \frac{\lambda}{2\pi\epsilon_0 s}\,\hat{s}$$

Gaussian surface: cylinder of radius $s$ and length $L$; end caps contribute zero flux.

Planar symmetry: infinite sheet with surface charge $\sigma$

$$\mathbf{E} = \frac{\sigma}{2\epsilon_0}\,\hat{n}$$

Gaussian surface: pillbox straddling the sheet; the field is uniform and perpendicular to the sheet. Between two parallel plates of opposite charge: $E = \sigma/\epsilon_0$.

Derivation: Field of a Uniformly Charged Sphere (Shell Theorem)

A solid sphere of radius $R$ carries a uniform volume charge density $\rho$, with total charge $Q = \frac{4}{3}\pi R^3\rho$. We use Gauss's law to find $\mathbf{E}$ both inside and outside.

Step 1: Identify the symmetry

The charge distribution has spherical symmetry. Therefore $\mathbf{E}$ must be radial and depend only on $r$: $\mathbf{E} = E_r(r)\,\hat{r}$. Choose a concentric spherical Gaussian surface of radius $r$.

Step 2: Evaluate the flux integral

On the Gaussian sphere, $\mathbf{E}$ is constant in magnitude and parallel to $d\mathbf{a} = r^2\sin\theta\,d\theta\,d\phi\,\hat{r}$:

$$\oint_S \mathbf{E}\cdot d\mathbf{a} = E_r(r)\oint_S da = E_r(r)\cdot 4\pi r^2$$

Step 3: Case I โ€” Outside the sphere ($r > R$)

The entire charge $Q$ is enclosed: $Q_{\rm enc} = Q$. Applying Gauss's law:

$$E_r(r)\cdot 4\pi r^2 = \frac{Q}{\epsilon_0} \quad\Longrightarrow\quad \boxed{E_r = \frac{1}{4\pi\epsilon_0}\frac{Q}{r^2}} \quad (r > R)$$

The sphere behaves exactly like a point charge at its center โ€” this is the shell theorem.

Step 4: Case II โ€” Inside the sphere ($r < R$)

Only the charge within radius $r$ is enclosed. Since $\rho$ is uniform:

$$Q_{\rm enc} = \rho\cdot\frac{4}{3}\pi r^3 = Q\frac{r^3}{R^3}$$

Step 5: Apply Gauss's law inside

$$E_r(r)\cdot 4\pi r^2 = \frac{Q}{\epsilon_0}\frac{r^3}{R^3} \quad\Longrightarrow\quad \boxed{E_r = \frac{1}{4\pi\epsilon_0}\frac{Qr}{R^3}} \quad (r < R)$$

The field grows linearly with $r$ inside the sphere, reaching its maximum at $r = R$.

Step 6: Verify continuity at $r = R$

From outside: $E_r(R) = Q/(4\pi\epsilon_0 R^2)$. From inside: $E_r(R) = QR/(4\pi\epsilon_0 R^3) = Q/(4\pi\epsilon_0 R^2)$. The field is continuous at the surface, as expected for a volume charge distribution (no surface charge discontinuity).

Derivation: Field of an Infinite Plane of Charge

An infinite plane carries uniform surface charge density $\sigma$. We use a Gaussian pillbox to derive the electric field.

Step 1: Identify the symmetry

By planar symmetry, $\mathbf{E}$ must be perpendicular to the plane and can only depend on the distance from it. Let the plane be at $z = 0$. Then $\mathbf{E} = E_z(z)\,\hat{z}$, and by the symmetry $z \to -z$: $E_z(-z) = -E_z(z)$.

Step 2: Construct the Gaussian pillbox

Choose a cylindrical pillbox with cross-sectional area $A$, straddling the plane symmetrically โ€” one cap at $z = +h$, the other at $z = -h$.

Step 3: Evaluate the flux through each surface

The pillbox has three surfaces: top cap, bottom cap, and curved side. By symmetry, $\mathbf{E}$ is parallel to the curved wall (perpendicular to its outward normal), so the curved surface contributes zero flux:

$$\Phi_{\rm curved} = 0$$

On the top cap ($z = +h$), $\mathbf{E}$ points upward and $d\mathbf{a} = da\,\hat{z}$: flux $= E_z A$. On the bottom cap ($z = -h$), $\mathbf{E}$ points downward and $d\mathbf{a} = da\,(-\hat{z})$: flux $= (-E_z)(-A) = E_z A$.

Step 4: Compute $Q_{\rm enc}$ and apply Gauss's law

The enclosed charge is $Q_{\rm enc} = \sigma A$. Gauss's law gives:

$$2E_z A = \frac{\sigma A}{\epsilon_0}$$

Step 5: Solve for $\mathbf{E}$

$$\boxed{\mathbf{E} = \frac{\sigma}{2\epsilon_0}\,\hat{n}}$$

where $\hat{n}$ points away from the surface on each side. The field is uniform โ€” independent of distance from the plane. This is consistent with our Coulomb derivation for a disk in the limit $R\to\infty$.

Derivation: Boundary / Discontinuity Conditions for $\mathbf{E}$

We derive the discontinuity in the normal component of $\mathbf{E}$ across a surface charge layer, and show the tangential component is continuous.

Step 1: Set up a thin Gaussian pillbox at the surface

Consider a surface carrying charge density $\sigma$. Construct a tiny pillbox of area $A$ and thickness $\varepsilon \to 0$, straddling the surface. Let $\hat{n}$ point from "below" to "above."

Step 2: Apply Gauss's law to the normal component

As $\varepsilon\to 0$, the curved side contributes zero flux. The top and bottom caps give:

$$E_{\rm above}^\perp A - E_{\rm below}^\perp A = \frac{\sigma A}{\epsilon_0}$$

Step 3: Normal component discontinuity

Dividing by $A$:

$$\boxed{E_{\rm above}^\perp - E_{\rm below}^\perp = \frac{\sigma}{\epsilon_0}}$$

The normal component of $\mathbf{E}$ is discontinuous by $\sigma/\epsilon_0$ across any surface charge layer.

Step 4: Apply Faraday's law to the tangential component

Since $\nabla\times\mathbf{E} = 0$ in electrostatics, construct a thin rectangular loop straddling the surface, with sides of length $l$ parallel to the surface and width $\varepsilon\to 0$. Stokes' theorem gives:

$$\oint \mathbf{E}\cdot d\boldsymbol{\ell} = 0$$

Step 5: Tangential component continuity

As $\varepsilon\to 0$, the short sides contribute nothing. The two long sides give:

$$E_{\rm above}^\parallel\,l - E_{\rm below}^\parallel\,l = 0$$

$$\boxed{E_{\rm above}^\parallel = E_{\rm below}^\parallel}$$

The tangential component of $\mathbf{E}$ is always continuous across a surface charge โ€” there is no tangential discontinuity in electrostatics.

Step 6: Combined vector boundary condition

The full boundary condition can be written compactly as:

$$\boxed{\mathbf{E}_{\rm above} - \mathbf{E}_{\rm below} = \frac{\sigma}{\epsilon_0}\,\hat{n}}$$

The discontinuity is entirely in the normal direction, with magnitude $\sigma/\epsilon_0$.

Numerical Verification of Gauss's Law

The simulation numerically integrates $\oint \mathbf{E} \cdot d\mathbf{a}$ over a spherical Gaussian surface and compares with $Q_{\rm enc}/\epsilon_0$, confirming Gauss's law to sub-percent accuracy.

Gauss's Law: Numerical Verification

Numerically integrates EยทdA over a Gaussian sphere and verifies it equals Q_enc/ฮตโ‚€ to high precision.

Click Run to execute the Python code

First run will download Python environment (~15MB)

Video Lectures & Demonstrations

MIT 8.02 โ€” Walter Lewin demonstrates Gauss's law with Faraday ice pail experiments and derives field of symmetric charge distributions.

Clear walkthrough of Gauss's law โ€” from the solid angle derivation to symmetric applications with spheres, cylinders, and planes.

Fortran Implementation

Fortran verification of Gauss's law by numerical surface integration over a spherical Gaussian surface. This demonstrates how computational physicists validate electromagnetic field solvers.

Gauss's Law Verification

Fortran

Numerically integrates the electric flux over a spherical Gaussian surface to verify Gauss's law

gauss_law_verify.f9033 lines

Click Run to execute the Fortran code

Code will be compiled with gfortran and executed on the server

Griffiths Problem Solutions

Video walkthroughs of Griffiths problems on Gauss's law and its applications.

Problem 2.7

Problem 2.8

Problem 2.9

Problem 2.10

Problem 2.11

Problem 2.12

Rate this chapter: