โ† Part I: Electrostatics
Chapter 1

Coulomb's Law & Electric Field

Force between charges, the electric field, superposition, and continuous distributions.

1.1 Coulomb's Law

The fundamental law governing the force between two point charges was established experimentally by Charles-Augustin de Coulomb in 1785. For charges $q_1$ and $q_2$ separated by a distance $r$, the force on $q_2$ due to $q_1$ is:

$$\boxed{\mathbf{F}_{12} = \frac{1}{4\pi\epsilon_0} \frac{q_1 q_2}{r^2}\,\hat{r}_{12}}$$

where $\hat{r}_{12}$ points from $q_1$ to $q_2$, and $\epsilon_0 = 8.854 \times 10^{-12}\,\text{C}^2/(\text{N}\cdot\text{m}^2)$.

The constant $k = 1/(4\pi\epsilon_0) \approx 8.988 \times 10^9\,\text{N}\cdot\text{m}^2/\text{C}^2$. In vector form, with source position $\mathbf{r}'$ and field point $\mathbf{r}$:

$$\mathbf{F} = \frac{1}{4\pi\epsilon_0} \frac{q_1 q_2}{|\mathbf{r} - \mathbf{r}'|^2}\,\hat{\mathscr{r}}, \qquad \hat{\mathscr{r}} = \frac{\mathbf{r} - \mathbf{r}'}{|\mathbf{r} - \mathbf{r}'|}$$

Derivation: Coulomb's Law and the Electric Field

Starting from the experimental observations of Coulomb (1785) using a torsion balance, we derive the mathematical form of the force law and define the electric field.

Step 1: Experimental observations

Coulomb measured the force between two charged spheres and found: (i) the force is proportional to the product of the charges, (ii) the force is inversely proportional to the square of the separation, (iii) the force acts along the line joining the charges. Expressing this mathematically:

$$F \propto \frac{q_1 q_2}{r^2}$$

Step 2: Introduce the proportionality constant

In SI units, we write the proportionality constant as $1/(4\pi\epsilon_0)$ where $\epsilon_0$ is the permittivity of free space. The factor of $4\pi$ is chosen so that Gauss's law takes a clean form. The scalar force magnitude is:

$$F = \frac{1}{4\pi\epsilon_0}\frac{|q_1||q_2|}{r^2}$$

Step 3: Write in vector form

Let $\mathbf{r}_1$ and $\mathbf{r}_2$ be the positions of $q_1$ and $q_2$. Define the separation vector $\boldsymbol{\mathscr{r}} = \mathbf{r}_2 - \mathbf{r}_1$ with magnitude $\mathscr{r} = |\boldsymbol{\mathscr{r}}|$ and unit vector $\hat{\mathscr{r}} = \boldsymbol{\mathscr{r}}/\mathscr{r}$. The force on $q_2$ due to $q_1$ is:

$$\mathbf{F}_{12} = \frac{1}{4\pi\epsilon_0}\frac{q_1 q_2}{\mathscr{r}^2}\,\hat{\mathscr{r}} = \frac{1}{4\pi\epsilon_0}\frac{q_1 q_2}{\mathscr{r}^3}\,\boldsymbol{\mathscr{r}}$$

Step 4: Define the electric field

The electric field is defined as the force per unit positive test charge. Place a test charge $q_{\rm test}$ at position $\mathbf{r}$ in the field of a source charge $q$ at $\mathbf{r}'$:

$$\mathbf{E}(\mathbf{r}) \equiv \frac{\mathbf{F}}{q_{\rm test}} = \frac{1}{4\pi\epsilon_0}\frac{q}{|\mathbf{r} - \mathbf{r}'|^2}\,\hat{\mathscr{r}}$$

Step 5: Verify the inverse-square law implies a divergenceless field (away from charges)

For $\mathbf{E} = \frac{q}{4\pi\epsilon_0}\frac{\hat{r}}{r^2}$, compute $\nabla \cdot \mathbf{E}$ in spherical coordinates for $r \neq 0$:

$$\nabla \cdot \mathbf{E} = \frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2 \cdot \frac{q}{4\pi\epsilon_0 r^2}\right) = \frac{q}{4\pi\epsilon_0}\frac{1}{r^2}\frac{\partial}{\partial r}(1) = 0 \quad (r \neq 0)$$

Step 6: Verify the curl vanishes (conservative field)

For a radial field $\mathbf{E} = E_r(r)\,\hat{r}$ with no angular dependence, the curl in spherical coordinates gives:

$$\nabla \times \mathbf{E} = \frac{1}{r\sin\theta}\frac{\partial(E_r \sin\theta)}{\partial \theta}\,\hat{\phi} - \frac{1}{r}\frac{\partial(rE_r)}{\partial \theta}\,\hat{\phi} = 0$$

Since $E_r$ depends only on $r$, all cross-partial derivatives vanish. Therefore $\nabla \times \mathbf{E} = 0$, confirming the electrostatic field is conservative.

1.1.1 Superposition Principle

The force on a test charge $q$ due to a collection of $n$ source charges is the vector sum of the individual Coulomb forces:

$$\mathbf{F} = \frac{q}{4\pi\epsilon_0} \sum_{i=1}^{n} \frac{q_i}{|\mathbf{r} - \mathbf{r}_i|^2}\,\hat{\mathscr{r}}_i$$

Superposition is an empirical fact: electric forces do not interact with each other. This linearity is exact in classical electrodynamics and is one of the theory's most powerful features.

1.2 The Electric Field

Rather than specifying forces between every pair of charges, we introduce the concept of the electric field $\mathbf{E}$. The field due to source charges at any point $\mathbf{r}$ is defined by the force per unit positive test charge placed there:

$$\boxed{\mathbf{E}(\mathbf{r}) = \frac{\mathbf{F}}{q_{\rm test}} = \frac{1}{4\pi\epsilon_0} \sum_i \frac{q_i}{|\mathbf{r} - \mathbf{r}_i|^2}\,\hat{\mathscr{r}}_i}$$

Derivation: Electric Field of Continuous Charge Distributions

Starting from the superposition principle for discrete charges, we take the continuum limit to derive integral expressions for the electric field of line, surface, and volume charge distributions.

Step 1: From discrete to continuous โ€” the volume charge density

For $N$ point charges, the field is $\mathbf{E} = \frac{1}{4\pi\epsilon_0}\sum_{i=1}^N \frac{q_i}{\mathscr{r}_i^2}\hat{\mathscr{r}}_i$. In the continuum limit, replace $q_i \to \rho(\mathbf{r}')\,d\tau'$ where $\rho$ is the volume charge density [C/m$^3$], and the sum becomes an integral:

$$\mathbf{E}(\mathbf{r}) = \frac{1}{4\pi\epsilon_0}\int_{\mathcal{V}} \frac{\rho(\mathbf{r}')}{|\mathbf{r} - \mathbf{r}'|^2}\,\hat{\mathscr{r}}\,d\tau'$$

Step 2: Surface charge density

If charge is confined to a 2D surface, the volume element $d\tau'$ collapses to a surface element $da'$. Define $\sigma(\mathbf{r}')$ as the surface charge density [C/m$^2$], so $dq = \sigma\,da'$:

$$\mathbf{E}(\mathbf{r}) = \frac{1}{4\pi\epsilon_0}\int_{\mathcal{S}} \frac{\sigma(\mathbf{r}')}{|\mathbf{r} - \mathbf{r}'|^2}\,\hat{\mathscr{r}}\,da'$$

Step 3: Line charge density

For charge distributed along a 1D curve, define $\lambda(\mathbf{r}')$ as the line charge density [C/m], so $dq = \lambda\,dl'$:

$$\mathbf{E}(\mathbf{r}) = \frac{1}{4\pi\epsilon_0}\int_{\mathcal{L}} \frac{\lambda(\mathbf{r}')}{|\mathbf{r} - \mathbf{r}'|^2}\,\hat{\mathscr{r}}\,dl'$$

Step 4: Unified notation using the separation vector

In all three cases, $\boldsymbol{\mathscr{r}} = \mathbf{r} - \mathbf{r}'$ is the vector from the source point $\mathbf{r}'$ to the field point $\mathbf{r}$. We can write each integral compactly as:

$$\mathbf{E}(\mathbf{r}) = \frac{1}{4\pi\epsilon_0}\int \frac{\boldsymbol{\mathscr{r}}}{\mathscr{r}^3}\,dq' = \frac{1}{4\pi\epsilon_0}\int \frac{(\mathbf{r} - \mathbf{r}')}{|\mathbf{r} - \mathbf{r}'|^3}\,dq'$$

where $dq'$ is $\rho\,d\tau'$, $\sigma\,da'$, or $\lambda\,dl'$ as appropriate.

Step 5: Relationship between the three densities

The three descriptions are related by dimensional reduction. A surface charge $\sigma$ can be viewed as a volume charge $\rho = \sigma\,\delta(n)$ where $n$ is the coordinate normal to the surface. Similarly, a line charge $\lambda$ is $\rho = \lambda\,\delta(x)\delta(y)$ for a wire along $z$. The most general form is always the volume integral:

$$\mathbf{E}(\mathbf{r}) = \frac{1}{4\pi\epsilon_0}\int_{\text{all space}} \frac{\rho(\mathbf{r}')\,(\mathbf{r} - \mathbf{r}')}{|\mathbf{r} - \mathbf{r}'|^3}\,d\tau'$$

1.2.1 Continuous Charge Distributions

For continuous distributions, the sum becomes an integral. Three cases arise depending on geometry:

Volume charge $\rho$

$$\mathbf{E} = \frac{1}{4\pi\epsilon_0}\int_{\mathcal{V}} \frac{\rho(\mathbf{r}')\,\hat{\mathscr{r}}}{{\mathscr{r}}^2}\,d\tau'$$

Surface charge $\sigma$

$$\mathbf{E} = \frac{1}{4\pi\epsilon_0}\int_{\mathcal{S}} \frac{\sigma(\mathbf{r}')\,\hat{\mathscr{r}}}{{\mathscr{r}}^2}\,da'$$

Line charge $\lambda$

$$\mathbf{E} = \frac{1}{4\pi\epsilon_0}\int_{\mathcal{L}} \frac{\lambda(\mathbf{r}')\,\hat{\mathscr{r}}}{{\mathscr{r}}^2}\,dl'$$

1.2.2 Worked Example: Infinite Line Charge

Consider an infinite wire with uniform line charge density $\lambda$. By symmetry the field points radially outward. Choosing the wire along the $z$-axis, at a perpendicular distance $s$:

The contribution from segment $dz'$ at height $z'$ contributes to the field. The $z$-components cancel by symmetry. Only the radial component survives:

$$\mathbf{E} = \frac{1}{4\pi\epsilon_0}\int_{-\infty}^{\infty} \frac{\lambda\,s\,dz'}{(s^2 + z'^2)^{3/2}}\,\hat{s}$$

Using the standard integral $\int_{-\infty}^{\infty} \frac{dz'}{(s^2+z'^2)^{3/2}} = \frac{2}{s^2}$:

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

This result falls off as $1/s$ (not $1/s^2$) because the charge extends to infinity in both directions.

Derivation: Electric Field of an Infinite Line Charge

We perform the full integration for an infinite straight wire carrying uniform line charge density $\lambda$, placed along the $z$-axis. We seek the field at a point P at perpendicular distance $s$ from the wire.

Step 1: Set up the geometry

Place the field point at $\mathbf{r} = s\,\hat{s}$ (in the $xy$-plane, distance $s$ from the $z$-axis). A source element is at $\mathbf{r}' = z'\,\hat{z}$. The separation vector is:

$$\boldsymbol{\mathscr{r}} = \mathbf{r} - \mathbf{r}' = s\,\hat{s} - z'\,\hat{z}, \qquad \mathscr{r} = \sqrt{s^2 + z'^2}$$

Step 2: Write the field contribution from element $dz'$

The charge element $dq = \lambda\,dz'$ produces a field contribution:

$$d\mathbf{E} = \frac{1}{4\pi\epsilon_0}\frac{\lambda\,dz'}{(s^2 + z'^2)}\,\hat{\mathscr{r}} = \frac{\lambda\,dz'}{4\pi\epsilon_0}\frac{s\,\hat{s} - z'\,\hat{z}}{(s^2 + z'^2)^{3/2}}$$

Step 3: Exploit symmetry to eliminate the $z$-component

For every element at $+z'$, there is a corresponding element at $-z'$ that contributes an equal and opposite $\hat{z}$-component. Therefore, the $z$-component integrates to zero:

$$\int_{-\infty}^{\infty}\frac{-z'\,dz'}{(s^2+z'^2)^{3/2}} = 0 \quad \text{(odd integrand)}$$

Step 4: Evaluate the radial component

Only the $\hat{s}$-component survives. We need:

$$E_s = \frac{\lambda s}{4\pi\epsilon_0}\int_{-\infty}^{\infty}\frac{dz'}{(s^2+z'^2)^{3/2}}$$

Step 5: Evaluate the integral via trigonometric substitution

Let $z' = s\tan\theta$, so $dz' = s\sec^2\theta\,d\theta$ and $(s^2+z'^2)^{3/2} = s^3\sec^3\theta$:

$$\int_{-\infty}^{\infty}\frac{dz'}{(s^2+z'^2)^{3/2}} = \int_{-\pi/2}^{\pi/2}\frac{s\sec^2\theta\,d\theta}{s^3\sec^3\theta} = \frac{1}{s^2}\int_{-\pi/2}^{\pi/2}\cos\theta\,d\theta = \frac{1}{s^2}\Big[\sin\theta\Big]_{-\pi/2}^{\pi/2} = \frac{2}{s^2}$$

Step 6: Assemble the final result

Substituting the integral back:

$$E_s = \frac{\lambda s}{4\pi\epsilon_0}\cdot\frac{2}{s^2} = \frac{\lambda}{2\pi\epsilon_0 s}$$

Therefore the electric field of an infinite line charge is:

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

The field falls off as $1/s$, not $1/s^2$, because the line source is one-dimensional โ€” integrating the $1/r^2$ contribution over the infinite line yields a net $1/s$ dependence.

Derivation: Electric Field of a Uniformly Charged Disk

Consider a disk of radius $R$ with uniform surface charge density $\sigma$ lying in the $xy$-plane, centered at the origin. We find the field at a point P on the axis at height $z$.

Step 1: Decompose the disk into concentric rings

A ring at radius $s'$ with width $ds'$ has area $da' = 2\pi s'\,ds'$ and carries charge $dq = \sigma \cdot 2\pi s'\,ds'$. From the ring formula (Section 1.4), the axial field of this ring at height $z$ is:

$$dE_z = \frac{1}{4\pi\epsilon_0}\frac{z\,dq}{(s'^2 + z^2)^{3/2}} = \frac{\sigma z}{2\epsilon_0}\frac{s'\,ds'}{(s'^2 + z^2)^{3/2}}$$

Step 2: Integrate over all rings from $s' = 0$ to $s' = R$

$$E_z = \frac{\sigma z}{2\epsilon_0}\int_0^R \frac{s'\,ds'}{(s'^2 + z^2)^{3/2}}$$

Step 3: Evaluate the integral

Let $u = s'^2 + z^2$, so $du = 2s'\,ds'$:

$$\int_0^R \frac{s'\,ds'}{(s'^2 + z^2)^{3/2}} = \frac{1}{2}\int_{z^2}^{R^2+z^2} u^{-3/2}\,du = \frac{1}{2}\left[-2u^{-1/2}\right]_{z^2}^{R^2+z^2} = \frac{1}{|z|} - \frac{1}{\sqrt{R^2+z^2}}$$

Step 4: Write the result for the disk

For $z > 0$:

$$\boxed{E_z = \frac{\sigma}{2\epsilon_0}\left(1 - \frac{z}{\sqrt{R^2 + z^2}}\right)}$$

Step 5: Limit โ€” infinite plane ($R \to \infty$)

As $R \to \infty$, the term $z/\sqrt{R^2+z^2} \to 0$, giving:

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

This is the field of an infinite plane of charge โ€” uniform, independent of distance, directed perpendicular to the plane. This result will also follow from Gauss's law.

Step 6: Limit โ€” far from the disk ($z \gg R$)

Expand $1/\sqrt{R^2+z^2} = (1/z)(1+R^2/z^2)^{-1/2} \approx (1/z)(1 - R^2/(2z^2))$:

$$E_z \approx \frac{\sigma}{2\epsilon_0}\left(1 - 1 + \frac{R^2}{2z^2}\right) = \frac{\sigma R^2}{4\epsilon_0 z^2} = \frac{1}{4\pi\epsilon_0}\frac{\sigma\pi R^2}{z^2} = \frac{1}{4\pi\epsilon_0}\frac{Q}{z^2}$$

where $Q = \sigma\pi R^2$ is the total charge โ€” the disk looks like a point charge at large distances, as expected.

Derivation: The Electric Dipole Field

We derive the electric field of a physical dipole (two equal and opposite charges $\pm q$ separated by distance $d$) in the limit $r \gg d$, showing the characteristic $1/r^3$ falloff and angular structure.

Step 1: Define the geometry

Place $+q$ at $\mathbf{r}' = +\frac{d}{2}\hat{z}$ and $-q$ at $\mathbf{r}' = -\frac{d}{2}\hat{z}$. The dipole moment is $\mathbf{p} = qd\,\hat{z}$. The potential at field point $\mathbf{r}$ is:

$$V(\mathbf{r}) = \frac{q}{4\pi\epsilon_0}\left(\frac{1}{|\mathbf{r} - \frac{d}{2}\hat{z}|} - \frac{1}{|\mathbf{r} + \frac{d}{2}\hat{z}|}\right)$$

Step 2: Expand $1/|\mathbf{r} - \mathbf{r}'|$ for $r \gg d$

Using the law of cosines, $|\mathbf{r} \mp \frac{d}{2}\hat{z}|^2 = r^2 \mp rd\cos\theta + d^2/4$. For $r \gg d$:

$$\frac{1}{|\mathbf{r} \mp \frac{d}{2}\hat{z}|} = \frac{1}{r}\left(1 \mp \frac{d\cos\theta}{2r} + \frac{d^2}{4r^2}\right)^{-1/2} \approx \frac{1}{r}\left(1 \pm \frac{d\cos\theta}{2r} + \cdots\right)$$

Step 3: Subtract to get the dipole potential

The monopole ($1/r$) terms cancel (total charge is zero), leaving the dipole term:

$$V = \frac{q}{4\pi\epsilon_0}\left[\frac{1}{r}\left(1+\frac{d\cos\theta}{2r}\right) - \frac{1}{r}\left(1-\frac{d\cos\theta}{2r}\right)\right] = \frac{qd\cos\theta}{4\pi\epsilon_0 r^2}$$

Step 4: Express in terms of the dipole moment

With $\mathbf{p} = qd\,\hat{z}$ and $\mathbf{p}\cdot\hat{r} = p\cos\theta$:

$$\boxed{V_{\rm dip}(\mathbf{r}) = \frac{1}{4\pi\epsilon_0}\frac{\mathbf{p}\cdot\hat{r}}{r^2} = \frac{p\cos\theta}{4\pi\epsilon_0 r^2}}$$

Step 5: Compute $\mathbf{E} = -\nabla V$ in spherical coordinates

Taking the gradient in spherical coordinates ($\nabla V = \frac{\partial V}{\partial r}\hat{r} + \frac{1}{r}\frac{\partial V}{\partial\theta}\hat{\theta}$):

$$E_r = -\frac{\partial V}{\partial r} = \frac{2p\cos\theta}{4\pi\epsilon_0 r^3}$$

$$E_\theta = -\frac{1}{r}\frac{\partial V}{\partial\theta} = \frac{p\sin\theta}{4\pi\epsilon_0 r^3}$$

Step 6: Write the coordinate-free dipole field

Combining components and using $\hat{r}\cos\theta - \hat{\theta}\sin\theta = \hat{z}$ (not quite โ€” we use the vector identity), the coordinate-free form is:

$$\boxed{\mathbf{E}_{\rm dip}(\mathbf{r}) = \frac{1}{4\pi\epsilon_0}\frac{1}{r^3}\left[3(\mathbf{p}\cdot\hat{r})\hat{r} - \mathbf{p}\right]}$$

Key features: the field falls off as $1/r^3$ (one power faster than a point charge). Along the axis ($\theta = 0$), $E = 2p/(4\pi\epsilon_0 r^3)$; in the equatorial plane ($\theta = \pi/2$), $E = p/(4\pi\epsilon_0 r^3)$, antiparallel to $\mathbf{p}$.

Simulation: Electric Field Visualization

The code below computes and visualizes the electric field of a dipole using direct superposition of Coulomb fields on a 2D grid.

Electric Field of a Dipole

Computes the electric field by direct superposition (Coulomb's law) and plots field lines and magnitude heatmap for a +1 nC / โˆ’1 nC dipole.

Click Run to execute the Python code

First run will download Python environment (~15MB)

1.3 Electric Field Lines

Electric field lines are curves whose tangent at each point is parallel to $\mathbf{E}$. They provide a geometric picture of the field:

  • Lines originate on positive charges and terminate on negative charges.
  • The density of lines is proportional to $|\mathbf{E}|$.
  • Lines never cross (the field is single-valued at each point).
  • In a source-free region, lines neither begin nor end.

Key Properties of $\mathbf{E}$ in Electrostatics

$$\nabla \cdot \mathbf{E} = \frac{\rho}{\epsilon_0} \qquad \text{(Gauss's law, differential form)}$$$$\nabla \times \mathbf{E} = 0 \qquad \text{(electrostatic field is conservative)}$$

The curl-free condition $\nabla \times \mathbf{E} = 0$ means we can write $\mathbf{E} = -\nabla V$for a scalar potential $V$.

1.4 Worked Example: Electric Field of a Charged Ring

A uniformly charged ring of radius $R$ with total charge $Q$ lies in the $xy$-plane. Find the field on the axis at distance $z$ from the center.

Each element $dq$ is at distance $\mathscr{r} = \sqrt{R^2 + z^2}$ from the field point. By symmetry, transverse components cancel. Only the axial component survives:

$$\boxed{E_z = \frac{1}{4\pi\epsilon_0}\frac{Qz}{(R^2 + z^2)^{3/2}}}$$

Limit: $z \gg R$

$E_z \to kQ/z^2$ โ€” reduces to a point charge.

At center: $z = 0$

$E_z = 0$ โ€” symmetry forces the field to vanish.

Video Lectures & Demonstrations

MIT 8.02 โ€” Walter Lewin's legendary lecture on electric charges and Coulomb's law with live electrostatic demonstrations.

3Blue1Brown's visualization of divergence and curl โ€” the mathematical language underlying electrodynamics.

Fortran Implementation

High-performance Fortran implementation of the Coulomb superposition algorithm. Fortran's native loop optimization makes it ideal for large-scale electromagnetic field computations in particle physics simulations.

Coulomb Field Superposition

Fortran

Computes the electric field from multiple point charges using Coulomb's law superposition

coulomb_field.f9040 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 selected Griffiths "Introduction to Electrodynamics" problems on Coulomb's law and electric fields.

Problem 2.1

Problem 2.2

Problem 2.3

Problem 2.4

Problem 2.5

Problem 2.6

Rate this chapter: