โ† 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$.

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.

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$.

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)