4  Integral theorems

4.1 Fundamental Theorem of Line Integrals

Recall the following important result from Calculus I.

Theorem 4.1: Fundamental Theorem of Calculus
If \(f'(x)\) is continuous on \([a,b]\) then \[ \int_a^b f'(t)\,dt = f(b) - f(a). \]

This is summed up as the total change is the sum of all the little changes.

Just as there were several generalisations of the product rule to vector calculus, there are several different generalisations of Theorem 4.1. The first concerns line integrals.

Theorem 4.2: Fundamental Theorem of Line Integrals
If \(f:\Real^n\to\Real\) is a \(C^1\) scalar field and \(C\) is an oriented curve with parametrisation \(\xb(t)\) for \(t\in[t_0,t_1]\), then \[ \int_C\grad f\cdot\hat{\tb}\,d\ell = f(\xb(t_1)) - f(\xb(t_0)). \]

The curve C.

Notice that if we take \(f=f(x)\) and \(C\) to be an interval on the \(x\)-axis, then Theorem 4.2 reduces to Theorem 4.1.

Proof. Evaluating the line integral gives \[\begin{align*} \int_C\grad f\cdot\hat{\tb}\,d\ell &= \int_{t_0}^{t_1}\grad f\cdot\ddt{\xb}\,dt\\ &= \int_{t_0}^{t_1}\left(\ddy{f}{x}\eb_1 + \ddy{f}{y}\eb_2 + \ddy{f}{z}\eb_3\right)\cdot\left(\ddt{x}\eb_1 + \ddt{y}\eb_2 + \ddt{z}\eb_3\right)\,dt\\ &= \int_{t_0}^{t_1}\left(\ddy{f}{x}\ddt{x} + \ddy{f}{y}\ddt{y} + \ddy{f}{z}\ddt{z} \right)\,dt\\ &= \int_{t_0}^{t_1}\ddt{f}\,dt \quad \textrm{[by the Chain Rule]}\\ &= f(\xb(t_1)) - f(\xb(t_0)) \end{align*}\] where the last line used Theorem 4.1.


A vector field \(\fb:\Real^n\to\Real^n\) is conservative if it can be written as \(\fb=\grad g\) for some \(C^1\) scalar field \(g:\Real^n\to\Real\) called a (scalar) potential.

Example 4.1: Show that \(\fb(\xb)=-\xb\) in \(\Real^2\) is conservative by finding a suitable scalar potential.
We need to find \(g\) satisfying simultaneously \[ \ddy{g}{x} = -x, \qquad \ddy{g}{y}=-y. \] Integrating the first equation with respect to \(x\) gives \[ g(x,y) = -\frac{x^2}{2} + h(y) \] for some arbitrary function \(h(y)\). But then the second equation requires that \[ \frac{\mathrm{d}h}{\mathrm{d}y} = -y \quad \implies h = -\frac{y^2}{2} + c. \] So we have \(\fb=\grad g\) with \[ g(x,y) = -\frac{x^2 + y^2}{2} + c. \]

The conservative vector field.

[Note that \(\fb=\grad g\) only defines \(g\) up to a constant \(c\in\Real\), because \(\grad c = \bfzero\).]

Proposition 4.1: Path independence
A vector field is conservative if and only if it has path independent line integrals between every pair of points.

Proof. Firstly, assume \(\fb\) is conservative, so \(\fb=\grad g\). Let \(C_1, C_2\) be two curves sharing both endpoints \(\xb_a\), \(\xb_b\).

Two curves with the same endpoints.

Then by Theorem 4.2, \[ \int_{C_1}\fb\cdot\hat{\tb}\,d\ell = g(\xb_b)-g(\xb_a)=\int_{C_2}\fb\cdot\hat{\tb}\,d\ell. \] So the integral depends only on the endpoints, not the path.

Conversely suppose that \(\fb\) has path independent line integrals. We claim that a suitable scalar field is \[ g(\xb) = \int_{C(\xb)}\fb\cdot\hat{\tb}\,d\ell, \] where \(C(\xb)\) is (any) curve connecting \(\bfzero\) to \(\xb\). To see that \(\grad g=\fb\), consider one component: \[ \ddy{g}{x} = \lim_{\delta\to 0}\frac{1}{\delta}\left[\int_{C(\xb+\delta\eb_1)}\fb\cdot\hat{\tb}\,d\ell - \int_{C(\xb)}\fb\cdot\hat{\tb}\,d\ell\right]. \] By path independence, this is the same as integrating along the straight-line segment \(C_1\):

An infinitesimal path.

So \[\begin{align*} \ddy{g}{x} &= \lim_{\delta\to 0}\frac{1}{\delta}\int_0^\delta f_1(\xb + t\eb_1)\,dt\\ &= \lim_{\delta\to 0}\frac{1}{\delta}\delta f_1(\xb+t_*\eb_1) \quad \textrm{for some $t_*\in[0,\delta]$ by Mean Value Thm for Integrals}\\ &= f_1(\xb). \end{align*}\]


Example 4.2: Compute \(\displaystyle\int_C\fb\cdot\hat{\tb}\,d\ell\) where \(\fb=-\xb\) and \(C\) is the straight line from \((1,0)\) to \((2,0)\).
From Example 4.1 we have \(\fb=-\displaystyle\grad\left(\frac{x^2+y^2}{2}\right)\). So by Theorem 4.2 we have \[ \int_C\fb\cdot\hat{\tb}\,d\ell = \left.-\left(\frac{x^2+y^2}{2}\right)\right|_{(2,0)} + \left.\left(\frac{x^2+y^2}{2}\right)\right|_{(1,0)} = -2 + \frac12 = -\frac32. \]

This agrees with Example 1.12 where we evaluated the line integral using a parametrisation. Note that any curve with the same start and end points would give the same answer (the extra parts “cancel out”):

Possible curves with the same endpoints.

The name conservative comes from Theorem 4.2 – if you integrate along a closed path, then there is no net change in \(f\).

Force fields in nature have this property. For example, the gravitational field around a planet of mass \(M\) has the form \[ \Fb(\xb) = \grad\left(\frac{GM}{|\xb|}\right), \] where \(G\) is the gravitational constant. If you move up then come back down to the same height, the net work done against gravity is zero (i.e., you don’t gain or lose any energy).

4.2 Divergence Theorem

Our next generalisation of the Fundamental Theorem of Calculus concerns the divergence of a vector field.

Theorem 4.3: Divergence Theorem
If \(\fb:\Real^3\to\Real^3\) is a \(C^1\) vector field and \(S\) is a closed surface with outward normal \(\hat{\nb}\) bounding a region \(V\), then \[ \oint_S\fb\cdot\hat{\nb}\,dS = \int_V(\grad\cdot\fb)\,dV. \]

Theorem 4.3 is also known as Gauss’ Theorem or sometimes Ostrogradsky’s Theorem.

Like the definition of \(\grad\cdot\fb\), Theorem 4.3 generalises to \(n\neq 3\) if we view \(V\) as a subset of \(\Real^n\) and its boundary \(S\) as an \((n-1)\)-dimensional hypersurface.

In particular, if \(n=1\) then \(V\) becomes an interval \([a,b]\), whose boundary comprises the two distinct points \(x=a\) and \(x=b\). Moreover, \[ \fb = f(x)\eb_1, \qquad \grad\cdot\fb = \ddy{f}{x} = f'(x), \qquad \hat{\nb}=\begin{cases} -\eb_1 & x=a,\\ \eb_1 & x=b, \end{cases} \] so Theorem 4.3 just reduces to \(\displaystyle f(b)-f(a)=\int_a^bf'(x)\,dx\), which is the Fundamental Theorem of Calculus (Theorem 4.1)!

Proof. The idea is to subdivide \(V\) into a disjoint union of small domains \(V_i\) for \(i=1,\ldots,m\), whose boundaries \(S_i\) have normal vectors \(\hat{\nb}_i\).

Idea of the Divergence Theorem.

Then observe that each segment of interior boundary is shared by two neighbouring domains with equal and opposite normals. So these interior surface integrals all cancel and we can write \[\begin{align*} \oint_S\fb\cdot\hat{\nb}\,dS &= \sum_{i=1}^m\oint_{S_i}\fb\cdot\hat{\nb}_i\,dS\\ &= \sum_{i=1}^m\left(\frac{1}{|V_i|}\oint_{S_i}\fb\cdot\hat{\nb}_i\,dS\right)|V_i|\\ &= \lim_{m\to\infty}\sum_{i=1}^m\left(\frac{1}{|V_i|}\oint_{S_i}\fb\cdot\hat{\nb}_i\,dS\right)|V_i|\\ &= \int_V(\grad\cdot\fb)\,dV. \end{align*}\] [The assumption of continuous partial derivatives is needed to ensure the limit giving \(\grad\cdot\fb\) is well defined.]


Example 4.3: Verify the Divergence Theorem by computing both sides for the vector field \(\fb=r^2\cos^2\theta\eb_r\) in spherical coordinates, where \(S\) is the sphere \(x^2+y^2+z^2=a^2\).
First consider the surface integral. The outward unit normal is \(\hat{\nb}=\eb_r\), so \[\begin{align*} \oint_S\fb\cdot\hat{\nb}\,dS &= \int_0^{2\pi}\left(\int_0^{\pi}f_r h_\theta h_\phi\,d\theta\right)\,d\phi\\ &= \int_0^{2\pi}\left(\int_0^{\pi}a^2\cos^2\theta a^2\sin\theta\,d\theta\right)\,d\phi\\ &= a^4\int_0^{2\pi}\left(\int_0^{\pi}\cos^2\theta\sin\theta\,d\theta\right)\,d\phi = a^4\int_0^{2\pi}\left[-\frac13\cos^3\theta\right]_0^\pi\,d\phi= \frac{2a^4}{3}\int_0^{2\pi}\,d\phi = \frac43\pi a^4. \end{align*}\]

For the volume integral, we first compute the divergence: \[ \grad\cdot\fb = \frac{1}{h_rh_\theta h_\phi}\ddy{}{r}(h_\theta h_\phi f_r) = \frac{1}{r^2\sin\theta}\ddy{}{r}(r^2\sin\theta f_r) = \frac{1}{r^2}\ddy{}{r}(r^4\cos^2\theta) = 4r\cos^2\theta. \] Integrating then gives \[\begin{align*} \int_V(\grad\cdot\fb)\,dV &= \int_0^{2\pi}\left(\int_0^\pi\left(\int_0^a4r\cos^2\theta h_r h_\theta h_\phi\,dr\right)\,d\theta\right)\,d\phi\\ &= \int_0^{2\pi}\left(\int_0^\pi\left(\int_0^a4r\cos^2\theta r^2\sin\theta\,dr\right)\,d\theta\right)\,d\phi\\ &= \int_0^{2\pi}\left(\int_0^\pi\cos^2\theta\sin\theta\left(\int_0^a4r^3\,dr\right)\,d\theta\right)\,d\phi\\ &= \int_0^{2\pi}\left(\int_0^\pi\cos^2\theta\sin\theta\Big[r^4\Big]_0^a\,d\theta\right)\,d\phi = a^4\int_0^{2\pi}\left(\int_0^\pi\cos^2\theta\sin\theta\,d\theta\right)\,d\phi \end{align*}\] This is now the same integral as before.

It is clear from the proof that Theorem 4.3 applies even when the boundary surface \(S\) is not connected – for example, when it consists of two concentric spheres:

Spherical shell.

In applications, Theorem 4.3 plays a fundamental role in converting between integral and differential forms of conservation laws.

For example, the (integral) conservation law for electric charge says that the total electric charge in a region changes only by flux of electric current through the boundary: \[ \ddt{}{}\int_Vq\,dV = -\oint_S\jb\cdot\hat{\nb}\,dS. \] Using Theorem 4.3 on the right-hand side, and assuming \(\displaystyle\ddy{q}{t}\) is continuous, \[ \int_V\ddy{q}{t}\,dV = -\int_V(\grad\cdot\jb)\,dV. \] Since this holds for an arbitary volume \(V\), we see that the charge density \(q(\xb)\) obeys the differential form of this conservation law, called the continuity equation \[ \ddy{q}{t} + \grad\cdot\jb = 0. \] The electric current density \(\jb\) is the “flux” associated to the conserved quantity \(q\).

4.3 Stokes’ Theorem

Our final generalisation of the Fundamental Theorem of Calculus applies to the curl of a vector field.

Theorem 4.4: Stokes’ Theorem
If \(\fb:\Real^3\to\Real^3\) is a \(C^1\) vector field and \(C\) is an oriented closed curve bounding a surface \(S\), then \[ \oint_C\fb\cdot\hat{\tb}\,d\ell = \int_S(\grad\times\fb)\cdot\hat{\nb}\,dS, \] where \(\hat{\nb}\) is chosen such that \(\hat{\tb}\times\hat{\nb}\) on \(C\) is outward.

Proof. Deferred to next lecture.

Example 4.4: Verify Stokes’ Theorem by computing both sides for the vector field \(\fb(\xb)=z\eb_1 + x\eb_2 - x\eb_3\) with \(S\) the unit disk \(\{x^2+y^2 \leq 1, \; z=0\}\).
The disk.

For the left-hand side, we can parametrise \(C\) as \(\xb(t)=\cos{t}\eb_1 + \sin{t}\eb_2\) for \(t\in[0,2\pi]\). Then \[\begin{align*} \oint_C\fb\cdot\hat{\tb}\,d\ell &= \int_0^{2\pi}\fb\cdot\ddt{\xb}\,dt= \int_0^{2\pi}(\cos{t}\eb_2 - \cos{t}\eb_3)\cdot(-\sin{t}\eb_1 + \cos{t}\eb_2)\,dt = \int_0^{2\pi}\cos^2{t}\,dt = \pi. \end{align*}\]

For the right-hand side, we have \[ \grad\times\fb = \begin{vmatrix} \eb_1 & \eb_2 & \eb_3\\ \displaystyle\ddy{}{x} & \displaystyle\ddy{}{y} & \displaystyle\ddy{}{z}\\ z & x & -x \end{vmatrix} = 2\eb_2 + \eb_3. \] The disk has unit normal \(\hat{\nb}=\eb_3\), so that \(\hat{\tb}\times\hat{\nb} = \cos{t}\eb_1 + \sin{t}\eb_2\) which is outward. Then \[ \int_S(\grad\times\fb)\cdot\hat{\nb}\,dS = \int_S\,dS = \pi(1)^2 = \pi. \] So indeed Stokes’ Theorem works for this example.

In particular, Theorem 4.4 says that the flux of \(\grad\times\fb\) must be the same through every possible \(S\) sharing the boundary \(C\).

The surfaces in Theorem 4.4 are sometimes called capping surfaces for the curve \(C\).

Three surfaces with the same boundary.

Example 4.5: Repeat the surface integral in Example 4.4 but with \(S\) the hemisphere \(\{x^2+y^2+z^2=1, \; z\geq 0\}\).
The hemisphere.

This time the outward normal is \(\hat{\nb}=\eb_r = (x\eb_1 + y\eb_2 + z\eb_3)/r\), so parametrising with spherical coordinates and noting that \(r=1\) gives \[\begin{align*} \int_S(\grad\times\fb)\cdot\hat{\nb}\,dS &= \int_0^{2\pi}\left(\int_0^{\pi/2}(2\eb_2 + \eb_3)\cdot\frac{(x\eb_1 + y\eb_2 + z\eb_3)}{1}(1)^2\sin\theta\,d\theta\right)\,d\phi\\ &= \int_0^{2\pi}\left(\int_0^{\pi/2} (2y+z)\sin\theta\,d\theta\right)\,d\phi\\ &= \int_0^{2\pi}\left(\int_0^{\pi/2} (2\sin^2\theta\sin\phi + \sin\theta\cos\theta)\,d\theta\right)\,d\phi\\ &= \int_0^{2\pi}\left(\int_0^{\pi/2} \sin\theta\cos\theta\,d\theta\right)\,d\phi= \frac12\int_0^{2\pi}\Big[\sin^2{\theta}\Big]_0^{\pi/2}\,d\phi = \pi. \end{align*}\] We get the same answer as predicted by Theorem 4.4, because the boundary of \(S\) is still the unit circle on \(z=0\).

The special case where \(S\subset\Real^2\) has a name.

Corollary 4.1: Green’s Theorem
If \(\fb:\Real^2\to\Real^2\) is a \(C^1\) vector field and \(C\) is a closed curve in \(\Real^2\) oriented anti-clockwise bounding a region \(A\), then \[ \oint_C\fb\cdot\hat{\tb}\,d\ell = \int_A\left(\ddy{f_2}{x} - \ddy{f_1}{y}\right)\,dx\,dy. \]

Traditionally, Corollary 4.1 can be used to calculate the area of the region \(A\) by doing a line integral: if you choose (for example) \(\fb=x\eb_2\) then the right-hand side reduces to \(|A|\), like in Example 4.4. This is how a planimeter works.

Theorem 4.4 gives us a partial converse to Corollary 3.1 (ii), which was the fact that conservative vector fields have zero curl.

Corollary 4.2
If \(\fb:\Real^3\to\Real^3\) is a \(C^1\) vector field with \(\grad\times\fb=\bfzero\) throughout a simply connected region \(V\subset\Real^3\), then \(\fb\) is conservative in \(V\).

Chart of implications for conservative vector fields.

A region \(V\subset \Real^3\) is simply connected if any closed curve in \(V\) can be continuously shrunk to a point in \(V.\) A ball (the interior of a sphere) is simply connected, but a toroid (interior of a torus) is not:

Meaning of simply connected.

Proof. Recall from Proposition 4.1 that \(\fb=\grad g\) if and only if \(\fb\) has path independent line integrals. So consider two arbitrary curves \(C_1\), \(C_2\) between two arbitrary endpoints \(\xb_a, \xb_b\in V\), and define \(C=C_1-C_2\) as in the picture:

Definition of C.

Since \(V\) is simply connected, we can always find a surface \(S\) with boundary \(C\) that lies wholly within \(V\). Then \(\grad\times\fb=\bfzero\) everywhere on that surface so Theorem 4.4 gives \[ \oint_C\fb\cdot\hat{\tb}\,d\ell = 0 \quad \implies \int_{C_1}\fb\cdot\hat{\tb}\,d\ell = \int_{C_2}\fb\cdot\hat{\tb}\,d\ell. \]


This result shows that there is a deep relation between the topology of a domain and the types of vector field that can exist on that domain, owing to the constraints of continuity.

4.4 Proof of Stokes’ Theorem

To prove Theorem 4.4 we will use the following.

Lemma 4.1
Let \(C\) be a curve in the plane having unit normal \(\hat{\nb}\), with diameter \(\mathrm{d}(C)\), enclosed area \(|A|\), and containing the point \(\xb\). For any \(C^1\) vector field \(\fb:\Real^3\to\Real^3\), \[ \hat{\nb}\cdot(\grad\times\fb)\Big|_{\xb} = \lim_{\mathrm{d}(C)\to 0}\frac{1}{|A|}\oint_C\fb\cdot\hat{\tb}\,d\ell, \] where \(C\) is parametrised such that \(\hat{\tb}=\hat{\nb}\times\hat{\nb}_c\), with \(\hat{\nb}_c\) being the outward normal to the curve.

Geometry for Lemma \ref{lemcurlcirc}.

Lemma 4.1 says that projecting \(\grad\times\fb\) on some direction \(\hat{\nb}\) gives the circulation per unit area around that particular axis. [Some authors take this formula as the definition of curl.]

Proof. (of Lemma 4.1).
We defined \(\grad\times\fb\) as a surface integral, so extrude \(C\) by a (small) distance \(h\) in the \(\hat{\nb}\)-direction to form a thin “pill” surface \(S\) with normal \(\hat{\nb}_s\).

The extruded volume.

By definition of curl, \[ \hat{\nb}\cdot(\grad\times\fb)\Big|_{\xb} = \lim_{\mathrm{d}(S)\to 0}\frac{1}{|V|}\oint_S\hat{\nb}\cdot(\hat{\nb}_s\times\fb)\,dS = \lim_{|A|,h \to 0}\frac{1}{|A|h}\int_{\widetilde{S}}\hat{\fb}\cdot(\hat{\nb}\times\hat{\nb}_s)\,dS. \qquad (*) \] The integrals on the top and bottom surfaces vanish because \(\hat{\nb}\times\hat{\nb}_s=\bfzero\), leaving only the side “ribbon” surface \(\widetilde{S}\), on which \(\hat{\nb}_s\equiv\hat{\nb}_c\).

We can parametrise \(\widetilde{S}\) by \(\widetilde{\xb}(t,v) = \xb_c(t) + v\hat{\nb}\) for \(v\in[0,h]\) and \(t\in[t_0,t_1]\), where \(\xb_c(t)\) is a parametrisation of \(C\). The corresponding Jacobian is \[ \left|\ddy{\widetilde{\xb}}{t}\times\ddy{\widetilde{\xb}}{v}\right| = \left|\ddt{\xb_c}\times\hat{\nb}\right| = \left|\ddt{\xb_c}\right|, \] since the tangent vector \(\displaystyle \ddt{\xb_c}\) is perpendicular to \(\hat{\nb}\). Evaluating the surface integral then gives \[\begin{align*} \int_{\widetilde{S}}\hat{\fb}\cdot(\hat{\nb}\times\hat{\nb}_c)\,dS &= \int_{t_0}^{t_1}(\hat{\nb}\times\hat{\nb}_c)\cdot\left(\int_0^h\fb\,dv\right)\left|\ddt{\xb_c}\right|\,dt\\ &= h\int_{t_0}^{t_1}(\hat{\nb}\times\hat{\nb}_c)\cdot\fb(t,v_*(t))\left|\ddt{\xb_c}\right|\,dt, \end{align*}\] where we used the (1-d) Mean Value Theorem for Integrals for each \(t\), with all of the \(v_*(t)\in[0,h]\).

When we take the limit \(h\to 0\), we have \(v_*(t)\to 0\) for all \(t\), so \((*)\) gives \[ \hat{\nb}\cdot(\grad\times\fb)\Big|_{\xb} = \lim_{|A|\to 0}\frac{1}{|A|}\int_{t_0}^{t_1}(\hat{\nb}\times\hat{\nb}_c)\cdot\fb(t,0)\left|\ddt{\xb_c}\right|\,dt = \lim_{\mathrm{d}(C)\to 0}\frac{1}{|A|}\oint_C\hat{\tb}\cdot\fb\,d\ell, \] where the tangent vector is \(\hat{\tb}=\hat{\nb}\times\hat{\nb}_c\).


Proof. (of Theorem 4.4).

This is similar to Theorem 4.3. We subdivide \(S\) into a disjoint union of small regions \(S_i\) for \(i=1,\ldots,m\), whose boundary curves have unit tangent vectors \(\hat{\tb}_i\).

Proof of Stokes' Theorem.

Then observe that each interior boundary segment is shared by two neighbouring regions with equal and opposite tangents. So these interior line integrals all cancel and we can write \[\begin{align*} \oint_C\fb\cdot\hat{\tb}\,d\ell &= \sum_{i=1}^m\oint_{S_i}\fb\cdot\hat{\tb}_i\,d\ell\\ &= \sum_{i=1}^m\left(\frac{1}{|A_i|}\oint_{S_i}\fb\cdot\hat{\tb}_i\,d\ell\right)|A_i|\\ &= \lim_{m\to\infty}\sum_{i=1}^m\left(\frac{1}{|A_i|}\oint_{S_i}\fb\cdot\hat{\tb}_i\,d\ell\right)|A_i|\\ &= \int_S(\grad\times\fb)\cdot\hat{\nb}\,dS, \end{align*}\] where in the last step we used Lemma 4.1.


There is a much more general form of Stokes’ Theorem in Differential Geometry, written elegantly as \[ \int_\Omega\mathrm{d}\omega = \int_{\partial\Omega}\omega. \] Here \(\Omega\) is a manifold, the operator \(\mathrm{d}\) is the exterior derivative, and the object \(\omega\) is a differential form. In fact, the Divergence Theorem and our Stokes’ Theorem are both special cases of this result.