Two famous physical fields, each with zero curl. One has a global potential, the other doesn't. Why?

Newton, Maxwell, and Ampère all wrestled with exactly this distinction - gravity has a global potential, the magnetic field around a wire does not. The reason turns out to be topological, not algebraic.

Green loop (avoids singularity)...
Red loop (encircles singularity)...

Both fields satisfy $\nabla \times \mathbf{u} = \mathbf{0}$ wherever they're defined. Yet only one has a global potential. The difference is topological - and in 3D the rules differ from 2D in a beautiful way. Removing a single point from space is harmless. Removing a whole line is fatal.

The four theorems, now in space

In §5.6 we built a four-theorem package for path independence in the plane. Kaplan's §5.13 lifts the same four statements to space. The shapes of the theorems are identical - only $\mathbf{u}$ now has three components, and "curl" means the full 3-vector $\nabla \times \mathbf{u}$ instead of a single scalar.

Throughout, $\mathbf{u} = L\,\mathbf{i} + M\,\mathbf{j} + N\,\mathbf{k}$ is a vector field with continuous partials on a domain $D \subseteq \mathbb{R}^3$.

Before we re-state them: what do you expect changes in 3D, and what stays the same? Most of the structure transfers verbatim - same iff chains, same direction of implication. But one hypothesis gets sharper teeth in space than it had in the plane. Watch for which one.

Theorem I - same idea, more dimensions. Path independence is equivalent to the integrand being an exact differential.

Theorem I. $\displaystyle\int_C L\,dx + M\,dy + N\,dz$ is independent of path in $D$ if and only if there is a function $f(x,y,z)$ on $D$ with $$\frac{\partial f}{\partial x} = L,\quad \frac{\partial f}{\partial y} = M,\quad \frac{\partial f}{\partial z} = N,$$ i.e. $\mathbf{u} = \nabla f$. Equivalently, $L\,dx + M\,dy + N\,dz$ is the exact differential $df$, and $$\int_A^B \mathbf{u}\cdot d\mathbf{r} = f(B) - f(A).$$

Theorem II - closed loops are the test. Path independence is the same as every closed-loop integral vanishing.

Theorem II. The integral is independent of path in $D$ if and only if $$\oint_C L\,dx + M\,dy + N\,dz = 0$$ for every piecewise smooth simple closed curve $C \subseteq D$.

Theorem III - the cheap necessary check. If a potential exists, the curl must be zero. (Three component equations now, instead of one.)

Theorem III (necessary). If the integral is independent of path in $D$, then $\nabla \times \mathbf{u} = \mathbf{0}$ on $D$. Written out, the three component equations are $$\frac{\partial M}{\partial z} = \frac{\partial N}{\partial y},\qquad \frac{\partial N}{\partial x} = \frac{\partial L}{\partial z},\qquad \frac{\partial L}{\partial y} = \frac{\partial M}{\partial x}.$$

Theorem IV - the converse, and the one with sharper teeth. Curl-free plus simply connected forces a potential to exist. This is where 3D differs from 2D in a real way.

Theorem IV (converse, with extra hypothesis). If $D$ is simply connected and $\nabla \times \mathbf{u} = \mathbf{0}$ on $D$, then the integral is independent of path in $D$ - so a potential $f$ exists with $\mathbf{u} = \nabla f$.

The proofs of I, II, III carry over from the plane with no essential change - Kaplan says so explicitly. The new content is in simply connected, and in the proof of Theorem IV, which now has to use Stokes's theorem in place of Green's. That's where the chapter's punchline lives.

What's genuinely new - holes have a dimension now

In the plane, "simply connected" basically meant "no holes": every closed curve bounds a disk that lies inside the domain. Removing a single point from $\mathbb{R}^2$ destroys simple connectivity - the unit circle around the missing origin can't be contracted to a point without sliding over it.

In space we have a third dimension to slide through, and that changes everything.

$\mathbb{R}^3 \setminus \{\text{point}\}$ - still simply connected

missing loop slides "up" past the point

Any loop that "encircles" a missing point can drift sideways in the third dimension and shrink to a point. There's no obstruction. Theorem IV applies.

$\mathbb{R}^3 \setminus \{\text{line}\}$ - NOT simply connected

removed line loop encircles line - cannot escape sideways

A loop linked through the missing line is stuck. There's no third dimension to slide along - the line blocks every direction. Theorem IV does not apply.

The pattern generalizes. In $\mathbb{R}^n$, the question is the codimension of what we removed: codimension means $n - (\text{dim of removed set})$. Loops are 1-dimensional, so they get pinned by obstructions of codimension 2 or higher.

  • In $\mathbb{R}^2$, a missing point has codimension $2 - 0 = 2$ - it pins loops. Missing a line (codimension 1) typically just disconnects the plane.
  • In $\mathbb{R}^3$, a missing point has codimension $3 - 0 = 3$ - too high to pin a loop, so it slides off. A missing line (codimension $3 - 1 = 2$) is the dangerous one. A missing surface (codimension 1) typically just disconnects space.

This is why the magnetic field around an infinite wire is the canonical 3D analogue of the plane vortex - the wire is a line, codimension 2, exactly the obstruction that blocks loops.

Theorem IV in 3D - the proof goes through Stokes

In the plane, Theorem IV used Green's theorem to convert "loop integral" into "double integral over the enclosed region." In space, the natural replacement is Stokes's theorem: a loop integral becomes a flux integral of the curl through any spanning surface.

That's the structural reason simple connectivity matters here. Kaplan's working definition of simply connected in 3D is exactly the property we need: every simple closed curve $C$ in $D$ is the boundary of a smooth orientable surface $S \subseteq D$. The interior of a sphere is simply connected; the interior of a torus is not. The interior of a sphere with finitely many points removed is still simply connected - because each missing point can be slid past, just as in card 2.

Proof sketch of Theorem IV. Suppose $D$ is simply connected and $\nabla \times \mathbf{u} = \mathbf{0}$ on $D$. Let $C$ be any simple closed curve in $D$. By the simply-connected hypothesis, there's a smooth orientable surface $S \subseteq D$ with boundary $C$. It turns out the entire proof is then one line of Stokes:

$$\oint_C \mathbf{u} \cdot d\mathbf{r} \;=\; \iint_S (\nabla \times \mathbf{u}) \cdot \mathbf{n}\,dS \;=\; \iint_S \mathbf{0} \cdot \mathbf{n}\,dS \;=\; 0.$$

Every closed-curve integral in $D$ vanishes. By Theorem II this is path independence, and by Theorem I we get a potential $f$ with $\mathbf{u} = \nabla f$. Done.

Look at where the simply-connected hypothesis is doing its work. The whole proof is one line of Stokes - but Stokes only fires once we've produced the surface $S$ inside $D$. Drop simple connectivity, and we may still have curl-free $\mathbf{u}$ and a closed loop $C$, but no surface in $D$ for $C$ to bound. The integral equation still holds for any surface that does stay in $D$ - but if no such surface exists, we have nothing to say.

Why "irrotational"? Kaplan calls a vector field with $\nabla \times \mathbf{u} = \mathbf{0}$ on $D$ irrotational in $D$. The four-theorem package then says: in a simply connected domain, irrotational, path-independent, zero on closed loops, and "is a gradient" are all the same property. On a domain that isn't simply connected, irrotational is the weakest of the four - it's local; the others are global.

Two physical fields, two topologies

Let's make the codimension story concrete with the two fields from the hook.

Gravity - point singularity, no obstruction

A point mass at the origin produces the field

$$\mathbf{u} \;=\; -\,GM\,\frac{\hat{\mathbf{r}}}{r^2} \;=\; -\,GM\,\frac{x\,\mathbf{i} + y\,\mathbf{j} + z\,\mathbf{k}}{(x^2+y^2+z^2)^{3/2}}$$

defined on $D = \mathbb{R}^3 \setminus \{0\}$. We're missing one point; codimension 3; loops slide off; $D$ is simply connected. A direct calculation gives $\nabla \times \mathbf{u} = \mathbf{0}$. By Theorem IV, $\mathbf{u}$ is conservative and we can write it as a gradient. Sure enough,

$$f(x,y,z) \;=\; \frac{GM}{r} \;=\; \frac{GM}{\sqrt{x^2+y^2+z^2}} \quad\Longrightarrow\quad \nabla f = \mathbf{u}.$$

The lift work from $A$ to $B$ depends only on $r_A$ and $r_B$. Energy conservation in classical mechanics rests on exactly this fact.

Magnetic field around a wire - line singularity, real obstruction

An infinite straight wire along the $z$-axis carrying steady current produces a magnetic field of the form

$$\mathbf{u} \;=\; \frac{1}{x^2+y^2}\bigl(-y\,\mathbf{i} + x\,\mathbf{j}\bigr)$$

(times physical constants we suppress) defined on $D = \mathbb{R}^3 \setminus \{z\text{-axis}\}$. We're missing a line; codimension 2; loops can be pinned around it; $D$ is not simply connected.

One can compute $\nabla \times \mathbf{u} = \mathbf{0}$ at every point of $D$ (the field is the plane vortex copied along $z$). So Theorem III's necessary condition is satisfied. But Theorem IV does not apply - and indeed for the unit circle $C: x = \cos t,\, y = \sin t,\, z = 0$,

$$\oint_C \mathbf{u}\cdot d\mathbf{r} \;=\; \int_0^{2\pi}\!\!\frac{(-\sin t)(-\sin t) + (\cos t)(\cos t)}{1}\,dt \;=\; 2\pi \;\neq\; 0.$$

By Theorem II, the field is not path-independent on $D$. There is no single-valued potential. Ampère's law - the working tool of every electrical engineer - is exactly the statement that this integral is not zero: the line integral of $\mathbf{B}$ around any loop encircling the wire equals $\mu_0 I$, regardless of the loop's shape. The non-zero answer carries the current.

Same algebraic test ($\nabla \times \mathbf{u} = \mathbf{0}$). Different topology of $D$. Different verdict on whether a potential exists. This is the punchline of §5.13.

Finding a potential in 3D - one worked example

Suppose we've checked $\nabla \times \mathbf{u} = \mathbf{0}$ and $D$ is simply connected. Theorem IV guarantees a potential $f$ exists; we want to find it explicitly. We drilled the recipe in detail on topics/finding-potentials.html - here we focus on what's specific to 3D: a third integration, a third sanity check, three cancellations chained instead of two. Roughly speaking, every cancellation in the chain is one of the curl-zero equations cashing in.

Worked example. Let $$\mathbf{u} \;=\; (2xy - z^2)\,\mathbf{i} \;+\; (x^2 + 2z)\,\mathbf{j} \;+\; (2y - 2xz)\,\mathbf{k}.$$ Curl check: $M_z - N_y = 2 - 2 = 0$, $\;N_x - L_z = -2z - (-2z) = 0$, $\;L_y - M_x = 2x - 2x = 0$. Curl is zero on all of $\mathbb{R}^3$. Domain is simply connected. Theorem IV applies, so a potential exists.

Step 1. Integrate $L = 2xy - z^2$ in $x$:

$$f(x,y,z) \;=\; \int (2xy - z^2)\,dx \;=\; x^2 y - x z^2 \;+\; g(y, z).$$

Step 2. Compute $f_y = x^2 + g_y$. Set this equal to $M = x^2 + 2z$:

$$x^2 + g_y \;=\; x^2 + 2z \quad\Longrightarrow\quad g_y = 2z.$$

The $x^2$ cancels - exactly because $L_y = 2x = M_x$. Integrate in $y$: $g(y,z) = 2yz + h(z)$. Now

$$f(x,y,z) \;=\; x^2 y - x z^2 + 2yz + h(z).$$

Step 3. Compute $f_z = -2xz + 2y + h'(z)$. Set equal to $N = 2y - 2xz$:

$$-2xz + 2y + h'(z) \;=\; 2y - 2xz \quad\Longrightarrow\quad h'(z) = 0,\; h(z) = C.$$

So our potential is

$$\boxed{\;f(x,y,z) \;=\; x^2 y \;-\; x z^2 \;+\; 2 y z \;+\; C\;}$$

Step 4 - verify. Compute the gradient:

  • $f_x = 2xy - z^2 = L$ ✓
  • $f_y = x^2 + 2z = M$ ✓
  • $f_z = -2xz + 2y = 2y - 2xz = N$ ✓

Three checks, three matches. Done. Notice what happened: at step 2 the $x^2$ term cancelled (that was the $L_y = M_x$ equation), and at step 3 the $-2xz$ term cancelled (that was $L_z = N_x$). Curl-zero is the guarantee that those cancellations occur - no curl-zero, no recipe.

Summary - hypothesis traps

Reading off the four theorems is easy; the trap is forgetting which hypothesis applies on which side of the iff. Here's the punchlist.

SettingWhat "simply connected" meansExamples that work / break
2D ($\mathbb{R}^2$) No holes; every loop bounds a disk in $D$. Disk, half-plane, all of $\mathbb{R}^2$ work. Punctured plane $\mathbb{R}^2 \setminus \{0\}$ breaks - the plane vortex.
3D ($\mathbb{R}^3$) Every loop bounds a smooth orientable surface in $D$. Ball, half-space, $\mathbb{R}^3$, $\mathbb{R}^3$ minus finitely many points all work. $\mathbb{R}^3$ minus a line (or interior of a torus) breaks - the magnetic-wire field.

The codimension rule of thumb in one line: In $\mathbb{R}^n$, removing something of dimension $\le n - 2$ destroys simple connectivity for loops; removing a hyperplane (codimension 1) typically just disconnects the space. In 2D both points and lines are obstructions; in 3D only lines and higher-dimensional curves and surfaces of codimension $\ge 2$ are. That's the geometric content of why 3D is genuinely more permissive than 2D.

Beyond simply connected: when $D$ has holes (multiply connected), the four theorems fragment. Curl-free still holds locally, but the loop integrals around the holes ("periods") may be nonzero. The deformation principle from §5.7 handles 2D; the 3D analogue uses Stokes on a "tube" surface and reduces every loop integral to a sum of winding/linking numbers times the periods. (Beyond §5.13's official scope, but worth knowing exists.)

And the workflow if we're handed a field in 3D and asked "is it conservative?":

  1. Compute $\nabla \times \mathbf{u}$. Nonzero anywhere? Not conservative. Stop.
  2. Curl is zero everywhere. Look at the domain $D$. Simply connected (ball, half-space, all of $\mathbb{R}^3$, $\mathbb{R}^3$ minus a few points)? Theorem IV gives conservativeness. Find $f$ by the three-step recipe.
  3. Domain is not simply connected (missing a line, the interior of a torus, …)? Test one loop around each hole. Nonzero on any loop ⇒ not conservative on $D$. (Locally, on every simply-connected sub-region, $\mathbf{u}$ still has a local potential.)
  4. Got a potential $f$? Any line integral becomes $f(B) - f(A)$. The path drops out completely.

Practice Problems - §5.13

From Kaplan, problems following §5.13.

2(a) Show $yz\,dx + xz\,dy + xy\,dz$ is exact and evaluate the line integral on any path.
By showing that the integrand is an exact differential, evaluate $$\int_{(1,1,1)}^{(3,5,2)} yz\,dx + xz\,dy + xy\,dz$$ on any path.
Step 1 - Verify $\nabla \times \mathbf{u} = \mathbf{0}$. $L = yz$, $M = xz$, $N = xy$. Then $L_y = z = M_x$, $\;M_z = x = N_y$, $\;N_x = y = L_z$. All three components of curl vanish on all of $\mathbb{R}^3$.
Step 2 - Theorem IV applies. $\mathbb{R}^3$ is simply connected, so $\mathbf{u} = \nabla f$ for some $f$.
Step 3 - Spot the potential by inspection. Each component of $\mathbf{u}$ is a partial of $f = xyz$: $f_x = yz$, $f_y = xz$, $f_z = xy$. So $f(x,y,z) = xyz$ works, and the integrand equals $d(xyz)$.
Step 4 - Apply Theorem I. $$\int_{(1,1,1)}^{(3,5,2)} yz\,dx + xz\,dy + xy\,dz = f(3,5,2) - f(1,1,1) = 30 - 1 = 29.$$ The path is irrelevant.
2(b) Evaluate $\int \sin yz\,dx + xz\cos yz\,dy + xy\cos yz\,dz$ from $(1,0,0)$ to $(1,0,\pi)$ on the helix $x = \cos t,\, y = \sin t,\, z = t$.
By showing that the integrand is an exact differential, evaluate $$\int_{(1,0,0)}^{(1,0,\pi)} \sin yz\,dx + xz\cos yz\,dy + xy\cos yz\,dz$$ on the helix $x = \cos t,\, y = \sin t,\, z = t$.
Step 1 - Recognize the differential. Try $f = x \sin yz$. Then $f_x = \sin yz$, $f_y = xz\cos yz$, $f_z = xy\cos yz$. All three match $L, M, N$. So $\mathbf{u} = \nabla f$ and the integrand is $df$.
Step 2 - Confirm hypotheses (sanity check). Components are $C^\infty$ on all of $\mathbb{R}^3$ (simply connected). Curl is zero (we just exhibited a potential, and Theorem III is automatic in that direction). Theorem I gives $\int = f(B) - f(A)$.
Step 3 - Evaluate. $$f(1,0,\pi) - f(1,0,0) = 1 \cdot \sin(0\cdot\pi) - 1 \cdot \sin(0\cdot 0) = 0 - 0 = 0.$$ The helix never enters the calculation. (The endpoints both have $y = 0$, so $\sin yz = 0$ at each.)
4 Curl-free on a non-simply-connected 3D domain: $\mathbf{u} = \dfrac{-y\,\mathbf{i} + x\,\mathbf{j}}{x^2+y^2} + z\,\mathbf{k}$ on the interior of a torus around the $z$-axis. Find all values of $\oint_C u_T\,ds$.
Let $\mathbf{u} = \dfrac{-y}{x^2+y^2}\mathbf{i} + \dfrac{x}{x^2+y^2}\mathbf{j} + z\,\mathbf{k}$ and let $D$ be the interior of the torus obtained by rotating the circle $(x-2)^2 + z^2 = 1,\, y = 0$ about the $z$-axis. Show that $\nabla \times \mathbf{u} = \mathbf{0}$ in $D$, but that $\oint_C u_T\,ds$ is not zero when $C$ is the circle $x^2+y^2 = 4,\, z = 0$. Determine all possible values of $\oint u_T\,ds$ on a closed path in $D$.
Step 1 - Curl computation. $L = -y/(x^2+y^2)$, $M = x/(x^2+y^2)$, $N = z$.
  • $\mathbf{k}$-component: $L_y - M_x$. We have $L_y = (y^2 - x^2)/(x^2+y^2)^2$ and $M_x = (y^2 - x^2)/(x^2+y^2)^2$. Equal.
  • $\mathbf{i}$-component: $M_z - N_y = 0 - 0 = 0$.
  • $\mathbf{j}$-component: $N_x - L_z = 0 - 0 = 0$.
So $\nabla \times \mathbf{u} = \mathbf{0}$ on $D$ (in fact on all of $\mathbb{R}^3 \setminus \{z\text{-axis}\}$).
Step 2 - Spot the topology trap. The torus $D$ wraps around the $z$-axis. A loop like $C: x^2+y^2 = 4, z = 0$ threads the torus's hole and cannot be contracted to a point inside $D$ - contracting would require crossing the $z$-axis, which is not in $D$. So $D$ is not simply connected. Theorem IV does not apply, and curl-zero alone does not force path independence.
Step 3 - Compute on $C$. Parametrize $C$ by $x = 2\cos t, y = 2\sin t, z = 0$, $0 \le t \le 2\pi$. Then $dx = -2\sin t\,dt$, $dy = 2\cos t\,dt$, $dz = 0$, and $x^2+y^2 = 4$: $$\oint_C \mathbf{u}\cdot d\mathbf{r} = \int_0^{2\pi}\!\!\frac{(-2\sin t)(-2\sin t) + (2\cos t)(2\cos t)}{4}\,dt = \int_0^{2\pi} 1\,dt = 2\pi \neq 0.$$ So path independence fails on $D$, exactly as Theorem IV warned.
Step 4 - All possible values. On any simply connected sub-region of $D$ not threading the axis, $\mathbf{u}\cdot d\mathbf{r} = d\theta + d(z^2/2)$ where $\theta = \arctan(y/x)$ is the polar angle. Closed loops integrate $d(z^2/2)$ to zero; the polar-angle term picks up an integer number of full turns: $$\oint u_T\,ds \;\in\; \{\,2\pi n : n \in \mathbb{Z}\,\}.$$ Each loop's contribution equals $2\pi$ times its winding number around the $z$-axis. Loops that don't thread the torus give $0$; loops threading it once give $\pm 2\pi$; doubly-wound loops give $\pm 4\pi$; and so on. All values $= 2\pi n,\, n \in \mathbb{Z}$. This is the 3D twin of §5.7's vortex - same multi-valued structure, just wrapped around a line in space instead of a hole in the plane.