Chapter 2 · Vector Calculus

2.1 Gradient, Divergence, Curl and Line Integrals

Three ways to differentiate a field — gradient, divergence and curl — and one way to integrate it along a curve. The central question: when does the work $\int_C\mathbf{F}\cdot d\mathbf{r}$ depend only on the end points?

A field attaches a quantity to every point of a region: a temperature to every point of a room, a velocity to every drop of a flowing river, a force to every position of a satellite. Chapter 1 differentiated and integrated functions of several variables; vector calculus does the same for fields, and asks questions that only make sense for them. Which way does heat flow? Does the river spread out from a spring, or swirl round a drain? How much work does gravity do on a rocket that travels from one orbit to another — and does the answer depend on the route? Three derivatives answer the first questions: the gradient of a scalar field points uphill, the divergence of a vector field measures how much it spreads out, and the curl measures how much it swirls. The integral that answers the last one is the line integral.

The heart of the section is the answer to the route question. Work is independent of the route exactly when the field is the gradient of a potential, and then it equals the change in potential — the fundamental theorem for line integrals. A gradient field always has zero curl, and on a domain without holes the converse holds; on a domain with a hole it fails, and the vortex field $\left(-y,x\right)/(x^2+y^2)$ is the counterexample every examiner knows. GATE MA asks for divergences, curls, gradients and directional derivatives as quick NAT computations, for line integrals that collapse once a potential is spotted, and for MSQs of the form "which of these fields are conservative on which domain". By the end of this section you will handle all of them.

Scalar and Vector Fields; the Gradient

Throughout, $U$ is an open subset of $\mathbb{R}^2$ or $\mathbb{R}^3$. Points of $\mathbb{R}^3$ are written $(x,y,z)$; the position vector is $\mathbf{r}=(x,y,z)=x\mathbf{i}+y\mathbf{j}+z\mathbf{k}$ and $r=|\mathbf{r}|=\sqrt{x^2+y^2+z^2}$. Differentiability, the chain rule and the fact that $C^1$ functions are differentiable are in §1.1 (Partial, Directional and Total Derivatives); we use them freely.

📘 Definition 2.1 — Scalar and vector fields

A scalar field on $U$ is a function $f:U\to\mathbb{R}$. A vector field on $U\subseteq\mathbb{R}^3$ is a function $\mathbf{F}:U\to\mathbb{R}^3$, written

$$\mathbf{F}=(P,Q,R)=P\,\mathbf{i}+Q\,\mathbf{j}+R\,\mathbf{k},$$

with scalar component functions $P,Q,R$; in the plane $\mathbf{F}=(P,Q)$. The field is of class $C^k$ if every component has continuous partial derivatives of all orders $\le k$. A field line (streamline) of $\mathbf{F}$ is a curve $\mathbf{r}(t)$ that is everywhere tangent to the field: $\mathbf{r}'(t)=\mathbf{F}(\mathbf{r}(t))$.

Examples: the gravitational field $-GM\,\mathbf{r}/r^3$ of a point mass at the origin (on $\mathbb{R}^3\setminus\{0\}$); the velocity field $\mathbf{w}\times\mathbf{r}=\omega(-y,x,0)$ of a rigid rotation about the $z$-axis with angular velocity vector $\mathbf{w}=\omega\mathbf{k}$; the temperature in a room.

📘 Definition 2.2 — The gradient and the operator $\nabla$

For a differentiable scalar field $f$ on $U\subseteq\mathbb{R}^3$, the gradient of $f$ is the vector field

$$\nabla f=\operatorname{grad}f=\left(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y},\frac{\partial f}{\partial z}\right).$$

It is convenient to treat del, $\nabla=\mathbf{i}\,\dfrac{\partial}{\partial x}+\mathbf{j}\,\dfrac{\partial}{\partial y}+\mathbf{k}\,\dfrac{\partial}{\partial z}$, as a formal vector: $\nabla f$ is "$\nabla$ times the scalar $f$", and below $\nabla\cdot\mathbf{F}$ and $\nabla\times\mathbf{F}$ are its dot and cross products with $\mathbf{F}$. In the plane, $\nabla f=(f_x,f_y)$. A vector field of the form $\nabla f$ is called a gradient field.

📐 Theorem 2.1 — The geometry of the gradient

Let $f$ be differentiable at $\mathbf{p}\in U$.

  1. Directional derivatives. For every unit vector $\mathbf{u}$, $\ D_{\mathbf{u}}f(\mathbf{p})=\nabla f(\mathbf{p})\cdot\mathbf{u}$.
  2. Steepest ascent. If $\nabla f(\mathbf{p})\ne\mathbf{0}$, then $-|\nabla f(\mathbf{p})|\le D_{\mathbf{u}}f(\mathbf{p})\le|\nabla f(\mathbf{p})|$; the maximum is attained only for $\mathbf{u}=\nabla f(\mathbf{p})/|\nabla f(\mathbf{p})|$, the minimum only for the opposite vector, and $D_{\mathbf{u}}f(\mathbf{p})=0$ exactly for the unit vectors $\mathbf{u}\perp\nabla f(\mathbf{p})$.
  3. Normal to level sets. Suppose $f$ is $C^1$ near $\mathbf{p}$, let $c=f(\mathbf{p})$, and let $\gamma$ be a differentiable curve lying in the level set $\{f=c\}$ with $\gamma(0)=\mathbf{p}$. Then $\nabla f(\mathbf{p})\cdot\gamma'(0)=0$. Hence, when $\nabla f(\mathbf{p})\ne\mathbf{0}$, the gradient is a normal vector to the level surface (level curve) through $\mathbf{p}$, whose tangent plane is $\nabla f(\mathbf{p})\cdot(\mathbf{x}-\mathbf{p})=0$.

Proof. (1) Differentiability at $\mathbf{p}$ means $f(\mathbf{p}+\mathbf{h})=f(\mathbf{p})+\nabla f(\mathbf{p})\cdot\mathbf{h}+\varepsilon(\mathbf{h})|\mathbf{h}|$ with $\varepsilon(\mathbf{h})\to0$ as $\mathbf{h}\to\mathbf{0}$. Put $\mathbf{h}=t\mathbf{u}$ ($t\ne0$, $|\mathbf{u}|=1$):

$$\frac{f(\mathbf{p}+t\mathbf{u})-f(\mathbf{p})}{t}=\nabla f(\mathbf{p})\cdot\mathbf{u}+\varepsilon(t\mathbf{u})\frac{|t|}{t}\longrightarrow\nabla f(\mathbf{p})\cdot\mathbf{u}\quad(t\to0).$$

(2) By the Cauchy–Schwarz inequality $|\nabla f\cdot\mathbf{u}|\le|\nabla f|\,|\mathbf{u}|=|\nabla f|$, with equality only when $\mathbf{u}$ is parallel to $\nabla f$; the sign of $\nabla f\cdot\mathbf{u}$ is then $+$ for the positive multiple and $-$ for the negative one. Also $\nabla f\cdot\mathbf{u}=0$ is the definition of $\mathbf{u}\perp\nabla f$.

(3) The function $g(t)=f(\gamma(t))$ is constant ($=c$), so $g'(0)=0$; by the chain rule $g'(0)=\nabla f(\gamma(0))\cdot\gamma'(0)=\nabla f(\mathbf{p})\cdot\gamma'(0)$. So $\nabla f(\mathbf{p})$ is orthogonal to the velocity of every curve in the level set through $\mathbf{p}$; when $\nabla f(\mathbf{p})\ne\mathbf{0}$ the implicit function theorem (§1.1) makes the level set a smooth surface near $\mathbf{p}$, whose tangent vectors are exactly these velocities. ∎

The hypothesis $\nabla f(\mathbf{p})\ne\mathbf{0}$ in (3) is not decoration: for $f=x^2+y^2-z^2$ the level set $f=0$ is a double cone, $\nabla f(\mathbf{0})=\mathbf{0}$, and the cone has no tangent plane at its vertex.

✏️ Example 1 — Heat flow in a room
The temperature (in °C, distances in metres) is $T(x,y,z)=100-x^2-2y^2-3z^2$. At $P=(1,1,1)$ find (a) the rate of change of $T$ in the direction of the origin; (b) the direction of fastest increase and the maximum rate; (c) the tangent plane to the isothermal surface through $P$; (d) a direction in which $T$ is momentarily constant.
Gradient $\nabla T=(-2x,-4y,-6z)$, so $\nabla T(P)=(-2,-4,-6)$.
(a) The unit vector from $P$ towards the origin is $\mathbf{u}=-\tfrac{1}{\sqrt3}(1,1,1)$, and $$D_{\mathbf{u}}T(P)=\frac{2+4+6}{\sqrt3}=4\sqrt3\approx6.93\ ^\circ\text{C/m}.$$
(b) Fastest increase along $\nabla T(P)/|\nabla T(P)|=-\tfrac{1}{\sqrt{14}}(1,2,3)$, at the rate $|\nabla T(P)|=\sqrt{56}=2\sqrt{14}\approx7.48\ ^\circ\text{C/m}$. The steepest direction is not the straight line to the hottest point $(0,0,0)$: the temperature falls faster in $z$ than in $x$, so the gradient leans towards the $z$-direction.
(c) $T(P)=94$. The isothermal surface $T=94$ has normal $\nabla T(P)\parallel(1,2,3)$ at $P$, so its tangent plane is $(x-1)+2(y-1)+3(z-1)=0$, i.e. $x+2y+3z=6$.
(d) Any unit vector orthogonal to $(1,2,3)$, e.g. $\mathbf{u}=\tfrac1{\sqrt5}(2,-1,0)$: $D_{\mathbf{u}}T(P)=\tfrac{1}{\sqrt5}(-4+4+0)=0$. Such directions are tangent to the isothermal surface.
Check $4\sqrt3\approx6.93\lt7.48\approx2\sqrt{14}$, as Theorem 2.1(2) demands.

Divergence and Curl

A vector field can be differentiated in two essentially different ways, and both are written with $\nabla$.

📘 Definition 2.3 — Divergence and curl

Let $\mathbf{F}=(P,Q,R)$ be a $C^1$ vector field on $U\subseteq\mathbb{R}^3$. Its divergence is the scalar field

$$\operatorname{div}\mathbf{F}=\nabla\cdot\mathbf{F}=\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial z},$$

and its curl is the vector field

$$\operatorname{curl}\mathbf{F}=\nabla\times\mathbf{F}=\begin{vmatrix}\mathbf{i}&\mathbf{j}&\mathbf{k}\\ \partial_x&\partial_y&\partial_z\\ P&Q&R\end{vmatrix},$$ $$\nabla\times\mathbf{F}=\left(R_y-Q_z,\ P_z-R_x,\ Q_x-P_y\right).$$

For a planar field $\mathbf{F}=(P,Q)$ we use $\operatorname{div}\mathbf{F}=P_x+Q_y$ and the scalar curl $Q_x-P_y$, the $\mathbf{k}$-component of the curl of $(P,Q,0)$.

What they measure. The divergence at $\mathbf{p}$ is the net rate at which the field flows out of a tiny region around $\mathbf{p}$, per unit volume (per unit area in the plane): positive at a source, negative at a sink. The component $(\operatorname{curl}\mathbf{F})\cdot\mathbf{n}$ is the circulation of $\mathbf{F}$ around a tiny circle perpendicular to $\mathbf{n}$, per unit area. Precisely,

$$\operatorname{div}\mathbf{F}(\mathbf{p})=\lim_{\varepsilon\to0}\frac{1}{\operatorname{vol}(B_\varepsilon)}\iint_{\partial B_\varepsilon}\mathbf{F}\cdot\mathbf{n}\,dS,$$ $$(\operatorname{curl}\mathbf{F})(\mathbf{p})\cdot\mathbf{n}=\lim_{\varepsilon\to0}\frac{1}{\pi\varepsilon^2}\oint_{C_\varepsilon}\mathbf{F}\cdot d\mathbf{r},$$

where $B_\varepsilon$ is the ball of radius $\varepsilon$ about $\mathbf{p}$ and $C_\varepsilon$ the circle of radius $\varepsilon$ about $\mathbf{p}$ in the plane normal to $\mathbf{n}$. These are consequences of the divergence theorem and Stokes' theorem, proved in §2.2 (Surface Integrals; Green, Stokes and Gauss Theorems); Interactive 1 below lets you watch the planar versions converge. For a rigid rotation $\mathbf{v}=\mathbf{w}\times\mathbf{r}$ with constant angular velocity vector $\mathbf{w}$ one computes $\nabla\times\mathbf{v}=2\mathbf{w}$ (Exercise II.3): the curl is twice the local angular velocity, which is why a tiny paddle wheel placed in a flow spins at the rate $\tfrac12|\nabla\times\mathbf{v}|$.

📘 Definition 2.4 — Solenoidal and irrotational fields; the Laplacian

A $C^1$ field $\mathbf{F}$ on $U$ is solenoidal (divergence-free) if $\nabla\cdot\mathbf{F}=0$ on $U$, and irrotational (curl-free) if $\nabla\times\mathbf{F}=\mathbf{0}$ on $U$. For a $C^2$ scalar field $f$, the Laplacian is

$$\Delta f=\nabla^2f=\nabla\cdot\nabla f=f_{xx}+f_{yy}+f_{zz},$$

and $f$ is harmonic if $\Delta f=0$. For a vector field, $\Delta\mathbf{F}=(\Delta P,\Delta Q,\Delta R)$ componentwise.

📐 Theorem 2.2 — Second-order identities

Let $f$ be a $C^2$ scalar field and $\mathbf{F}$ a $C^2$ vector field on an open set $U\subseteq\mathbb{R}^3$. Then

(a) curl grad = 0$\nabla\times(\nabla f)=\mathbf{0}$
(b) div curl = 0$\nabla\cdot(\nabla\times\mathbf{F})=0$
(c) div grad = Laplacian$\nabla\cdot(\nabla f)=\Delta f$
(d) curl curl$\nabla\times(\nabla\times\mathbf{F})=\nabla(\nabla\cdot\mathbf{F})-\Delta\mathbf{F}$

Proof. All four rest on Schwarz's theorem (§1.1): for a $C^2$ function the mixed partial derivatives agree, $f_{xy}=f_{yx}$ and so on. (a) The first component of $\nabla\times\nabla f$ is $\partial_y(f_z)-\partial_z(f_y)=f_{zy}-f_{yz}=0$; the other two components are the same computation with the variables permuted. (b) With $\nabla\times\mathbf{F}=(R_y-Q_z,\,P_z-R_x,\,Q_x-P_y)$,

$$\nabla\cdot(\nabla\times\mathbf{F})=(R_{yx}-R_{xy})+(P_{zy}-P_{yz})+(Q_{xz}-Q_{zx})=0.$$

(c) is the definition of $\Delta$. (d) Let $\mathbf{G}=\nabla\times\mathbf{F}$. The first component of $\nabla\times\mathbf{G}$ is

$$\partial_yG_3-\partial_zG_2=(Q_{xy}-P_{yy})-(P_{zz}-R_{xz}).$$

Adding and subtracting $P_{xx}$ gives $\partial_x(P_x+Q_y+R_z)-(P_{xx}+P_{yy}+P_{zz})$, the first component of $\nabla(\nabla\cdot\mathbf{F})-\Delta\mathbf{F}$. The other components follow by cyclic symmetry. ∎

📐 Theorem 2.3 — Product rules

Let $f,g$ be $C^1$ scalar fields and $\mathbf{F},\mathbf{G}$ $C^1$ vector fields on $U\subseteq\mathbb{R}^3$. Writing $(\mathbf{F}\cdot\nabla)\mathbf{G}=F_1\mathbf{G}_x+F_2\mathbf{G}_y+F_3\mathbf{G}_z$ (the derivative of $\mathbf{G}$ along $\mathbf{F}$):

  1. $\nabla(fg)=f\nabla g+g\nabla f$;
  2. $\nabla\cdot(f\mathbf{F})=f\,\nabla\cdot\mathbf{F}+\nabla f\cdot\mathbf{F}$;
  3. $\nabla\times(f\mathbf{F})=f\,\nabla\times\mathbf{F}+\nabla f\times\mathbf{F}$;
  4. $\nabla\cdot(\mathbf{F}\times\mathbf{G})=\mathbf{G}\cdot(\nabla\times\mathbf{F})-\mathbf{F}\cdot(\nabla\times\mathbf{G})$;
  5. $\nabla\times(\mathbf{F}\times\mathbf{G})=\mathbf{F}\,(\nabla\cdot\mathbf{G})-\mathbf{G}\,(\nabla\cdot\mathbf{F})+(\mathbf{G}\cdot\nabla)\mathbf{F}-(\mathbf{F}\cdot\nabla)\mathbf{G}$;
  6. $\nabla(\mathbf{F}\cdot\mathbf{G})=(\mathbf{F}\cdot\nabla)\mathbf{G}+(\mathbf{G}\cdot\nabla)\mathbf{F}+\mathbf{F}\times(\nabla\times\mathbf{G})+\mathbf{G}\times(\nabla\times\mathbf{F})$.

Proof. (1) is the one-variable product rule applied to each partial derivative. (2) $\sum_i\partial_i(fF_i)=\sum_i\left(f\,\partial_iF_i+F_i\,\partial_if\right)$. (3) The first component of $\nabla\times(f\mathbf{F})$ is

$$\partial_y(fR)-\partial_z(fQ)=f\,(R_y-Q_z)+(f_yR-f_zQ),$$

and $f_yR-f_zQ$ is the first component of $\nabla f\times\mathbf{F}$; the other components follow by cyclic symmetry. (4) The components of $\mathbf{F}\times\mathbf{G}$ are $F_2G_3-F_3G_2$, $\ F_3G_1-F_1G_3$ and $F_1G_2-F_2G_1$. In $\nabla\cdot(\mathbf{F}\times\mathbf{G})$, collect the terms in which $\mathbf{F}$ is differentiated:

$$G_1(\partial_yF_3-\partial_zF_2)+G_2(\partial_zF_1-\partial_xF_3)+G_3(\partial_xF_2-\partial_yF_1)=\mathbf{G}\cdot(\nabla\times\mathbf{F});$$

the terms in which $\mathbf{G}$ is differentiated give, in the same way, $-\mathbf{F}\cdot(\nabla\times\mathbf{G})$. (5) and (6) are proved the same way — expand one component, regroup, and use cyclic symmetry; they are needed far less often. ∎

Notice the order in (3): $\nabla f\times\mathbf{F}=-\mathbf{F}\times\nabla f$. Getting it backwards is the most common sign error in these computations.

📐 Theorem 2.4 — Radial fields

On $\mathbb{R}^3\setminus\{0\}$ let $\mathbf{r}=(x,y,z)$, $r=|\mathbf{r}|$, and let $\varphi$ be differentiable on $(0,\infty)$. Then

  1. $\nabla r=\mathbf{r}/r$ and $\nabla\varphi(r)=\varphi'(r)\,\mathbf{r}/r$;
  2. $\nabla\cdot\mathbf{r}=3$ and $\nabla\times\mathbf{r}=\mathbf{0}$;
  3. $\nabla\cdot\big(\varphi(r)\mathbf{r}\big)=3\varphi(r)+r\varphi'(r)$ and $\nabla\times\big(\varphi(r)\mathbf{r}\big)=\mathbf{0}$;
  4. in particular, for every real $n$: $\ \nabla(r^n)=nr^{n-2}\mathbf{r}$, $\ \nabla\cdot(r^n\mathbf{r})=(n+3)r^n$ and $\Delta(r^n)=n(n+1)r^{n-2}$. Hence $1/r$ is harmonic on $\mathbb{R}^3\setminus\{0\}$, and $\mathbf{r}/r^3$ is both solenoidal and irrotational there.

Proof. (1) Differentiating $r^2=x^2+y^2+z^2$ gives $2r\,r_x=2x$, so $r_x=x/r$, and similarly for $y,z$: $\nabla r=\mathbf{r}/r$. The chain rule gives $\nabla\varphi(r)=\varphi'(r)\nabla r$. (2) $\nabla\cdot\mathbf{r}=1+1+1$, and every entry of $\nabla\times\mathbf{r}$ is of the form $\partial_yx-\partial_xy=0$. (3) By Theorem 2.3(2),

$$\nabla\cdot(\varphi\,\mathbf{r})=\varphi\,(\nabla\cdot\mathbf{r})+\nabla\varphi\cdot\mathbf{r}=3\varphi+\frac{\varphi'(r)}{r}\,\mathbf{r}\cdot\mathbf{r}=3\varphi+r\varphi'.$$

By Theorem 2.3(3), $\nabla\times(\varphi\,\mathbf{r})=\varphi\,\nabla\times\mathbf{r}+\frac{\varphi'(r)}{r}\,\mathbf{r}\times\mathbf{r}=\mathbf{0}$. (4) Take $\varphi(r)=r^n$: $\nabla\cdot(r^n\mathbf{r})=3r^n+nr^n$. Then $\Delta(r^n)=\nabla\cdot\left(nr^{n-2}\mathbf{r}\right)$, which by (3) is $n\big((n-2)+3\big)r^{n-2}=n(n+1)r^{n-2}$; this vanishes for $n=-1$; and $\nabla\cdot(r^{-3}\mathbf{r})=0$. ∎

In the plane, with $\mathbf{r}=(x,y)$, the same argument gives $\nabla\cdot\mathbf{r}=2$, $\nabla\cdot(r^n\mathbf{r})=(n+2)r^n$ and $\Delta(r^n)=n^2r^{n-2}$; the planar harmonic radial function is $\log r$ (since $\nabla\log r=\mathbf{r}/r^2$ has divergence $(-2+2)r^{-2}=0$).

✏️ Example 2 — Divergence and curl: a polynomial field and a radial field
(a) For $\mathbf{F}=(x^2y,\,-2xz,\,2yz)$ compute $\nabla\cdot\mathbf{F}$ and $\nabla\times\mathbf{F}$, check that $\nabla\cdot(\nabla\times\mathbf{F})=0$, and decide whether $\mathbf{F}$ is a gradient field. (b) For which $n$ is $r^n\mathbf{r}$ solenoidal on $\mathbb{R}^3\setminus\{0\}$? (c) Compute $\Delta(r^4)$ and $\Delta(r^{-2})$. (d) Show that $\mathbf{G}=\dfrac{(x,y,z)}{x^2+y^2+z^2}$ is irrotational, find its divergence, and find a potential for it.
(a) div $\nabla\cdot\mathbf{F}=\partial_x(x^2y)+\partial_y(-2xz)+\partial_z(2yz)=2xy+0+2y=2y(x+1)$.
(a) curl $R_y-Q_z=2z-(-2x)=2x+2z$; $\ P_z-R_x=0-0=0$; $\ Q_x-P_y=-2z-x^2$. So $$\nabla\times\mathbf{F}=\left(2x+2z,\ 0,\ -x^2-2z\right).$$
(a) check $\nabla\cdot(\nabla\times\mathbf{F})=\partial_x(2x+2z)+0+\partial_z(-x^2-2z)=2-2=0$. Since $\nabla\times\mathbf{F}\ne\mathbf{0}$ (e.g. it is $(2,0,-1)$ at $(1,0,0)$), $\mathbf{F}$ is not the gradient of any $C^2$ function, by Theorem 2.2(a).
(b) $\nabla\cdot(r^n\mathbf{r})=(n+3)r^n$ (Theorem 2.4), which vanishes identically iff $n=-3$: the inverse-square field $\mathbf{r}/r^3$.
(c) $\Delta(r^n)=n(n+1)r^{n-2}$: $\ \Delta(r^4)=4\cdot5\,r^2=20r^2$ and $\Delta(r^{-2})=(-2)(-1)r^{-4}=2/r^4$.
(d) $\mathbf{G}=\varphi(r)\mathbf{r}$ with $\varphi=r^{-2}$, so $\nabla\times\mathbf{G}=\mathbf{0}$ and $\nabla\cdot\mathbf{G}=(-2+3)r^{-2}=1/r^2$ (Theorem 2.4). A potential: $\nabla(\log r)=\tfrac1r\cdot\tfrac{\mathbf{r}}{r}=\mathbf{G}$, so $f=\log r=\tfrac12\log(x^2+y^2+z^2)$.
✏️ Example 3 — Prove or disprove
Decide whether each statement is true for all $C^2$ fields on $\mathbb{R}^3$. (a) If $\nabla\cdot\mathbf{F}=0$ and $\nabla\times\mathbf{F}=\mathbf{0}$, then $\mathbf{F}$ is constant. (b) $\nabla f\times\nabla g$ is solenoidal. (c) $\nabla\times(f\mathbf{F})=f\,\nabla\times\mathbf{F}$. (d) If $\mathbf{F}$ is irrotational, so is $f\mathbf{F}$ for every scalar field $f$.
(a) False $\mathbf{F}=(x,-y,0)=\nabla\big(\tfrac{x^2-y^2}{2}\big)$ has divergence $1-1+0=0$ and is a gradient, so its curl is $\mathbf{0}$; it is not constant. Another: $(yz,zx,xy)=\nabla(xyz)$. (What is true: each component of such a field is harmonic, by Theorem 2.2(d).)
(b) True By Theorem 2.3(4), $\nabla\cdot(\nabla f\times\nabla g)=\nabla g\cdot(\nabla\times\nabla f)-\nabla f\cdot(\nabla\times\nabla g)=0-0$, using Theorem 2.2(a) twice.
(c) False Take $\mathbf{F}=\mathbf{k}$ (constant, curl $\mathbf{0}$) and $f=x$. Then $\nabla\times(x\mathbf{k})=x\cdot\mathbf{0}+\nabla x\times\mathbf{k}=\mathbf{i}\times\mathbf{k}=-\mathbf{j}\ne\mathbf{0}$. The missing term is $\nabla f\times\mathbf{F}$.
(d) False The same example: $\mathbf{k}$ is irrotational but $x\mathbf{k}$ is not. It is true when $\nabla f\parallel\mathbf{F}$ everywhere — e.g. for radial $f(r)$ and $\mathbf{F}=\mathbf{r}$, which is Theorem 2.4(3).
Interactive 1 — Divergence and Curl as Flux and Circulation per Unit Area

Blue dots drift with the field. The red circle of radius $\rho$ is a probe: the lab computes the flux out of it and the circulation around it numerically and divides both by its area $\pi\rho^2$. Shrink $\rho$ and watch the two ratios settle on $\nabla\cdot\mathbf{F}$ and the scalar curl $Q_x-P_y$ at the centre. Click the plot to park the probe; press ↻ Moving probe to set it free again. Try the shear field — straight stream lines, yet nonzero curl — and the point vortex with the probe around the origin.

0.50
centre c—
flux ÷ area—
div F(c)—
circulation ÷ area—
curl F(c)—

Line Integrals

To integrate a field along a curve we first fix what a curve is. The definitions are chosen so that broken lines and the boundaries of squares are allowed.

📘 Definition 2.5 — Paths and oriented curves

A path is a continuous map $\mathbf{r}:[a,b]\to\mathbb{R}^n$ that is piecewise $C^1$: for some partition $a=t_0\lt t_1\lt\dots\lt t_m=b$, $\mathbf{r}$ is $C^1$ on each $[t_{k-1},t_k]$ (with one-sided derivatives at the ends). It is smooth if $\mathbf{r}'$ is continuous and never $\mathbf{0}$; closed if $\mathbf{r}(a)=\mathbf{r}(b)$; simple if it does not cross itself ($\mathbf{r}$ injective on $[a,b]$, or on $[a,b)$ for a closed path).

The image $C=\mathbf{r}([a,b])$, traversed in the direction of increasing $t$, is an oriented curve; $-C$ denotes the same set traversed backwards, $\mathbf{r}^-(t)=\mathbf{r}(a+b-t)$. The length of $C$ is $L=\int_a^b|\mathbf{r}'(t)|\,dt$, and $ds=|\mathbf{r}'(t)|\,dt$ is the element of arc length. If $C_1$ ends where $C_2$ begins, $C_1+C_2$ is the path "first $C_1$, then $C_2$".

📘 Definition 2.6 — Line integral of a scalar field (with respect to arc length)
For $f$ continuous on the curve $C$ parametrised by the path $\mathbf{r}$, $$\int_Cf\,ds=\int_a^bf\big(\mathbf{r}(t)\big)\,|\mathbf{r}'(t)|\,dt.$$ If $f$ is the linear density of a wire, $\int_Cf\,ds$ is its mass; $\int_C1\,ds=L$; and the centre of mass is $\bar{\mathbf{x}}=\frac{1}{M}\int_C\mathbf{x}\,f\,ds$.
📘 Definition 2.7 — Line integral of a vector field; work, circulation, flux across a curve

For a continuous vector field $\mathbf{F}=(P,Q,R)$ on $C$,

$$\int_C\mathbf{F}\cdot d\mathbf{r}=\int_a^b\mathbf{F}\big(\mathbf{r}(t)\big)\cdot\mathbf{r}'(t)\,dt,$$

also written $\int_CP\,dx+Q\,dy+R\,dz$. For a smooth path, with unit tangent $\mathbf{T}=\mathbf{r}'/|\mathbf{r}'|$, it equals $\int_C\mathbf{F}\cdot\mathbf{T}\,ds$: we integrate the tangential component of $\mathbf{F}$. If $\mathbf{F}$ is a force, $\int_C\mathbf{F}\cdot d\mathbf{r}$ is the work done by $\mathbf{F}$ on a particle moving along $C$; if $C$ is closed it is called the circulation of $\mathbf{F}$ around $C$ and written $\oint_C$.

For a planar path $\mathbf{r}=(x(t),y(t))$ and planar $\mathbf{F}=(P,Q)$, the flux of $\mathbf{F}$ across $C$ is $\int_C\mathbf{F}\cdot\mathbf{n}\,ds=\int_a^b\left(P\,y'(t)-Q\,x'(t)\right)dt=\int_CP\,dy-Q\,dx$, where $\mathbf{n}=(y',-x')/|\mathbf{r}'|$ is the unit normal pointing to the right of the direction of motion — outwards, for a counterclockwise closed curve.

📐 Theorem 2.5 — Basic properties of line integrals
  1. Linearity: $\int_C(\alpha\mathbf{F}+\beta\mathbf{G})\cdot d\mathbf{r}=\alpha\int_C\mathbf{F}\cdot d\mathbf{r}+\beta\int_C\mathbf{G}\cdot d\mathbf{r}$, and likewise for $\int f\,ds$.
  2. Additivity: $\int_{C_1+C_2}=\int_{C_1}+\int_{C_2}$.
  3. Reparametrisation: let $\varphi:[c,d]\to[a,b]$ be a $C^1$ bijection and $\tilde{\mathbf{r}}=\mathbf{r}\circ\varphi$. If $\varphi'\gt0$ (orientation kept), $\tilde{\mathbf{r}}$ gives the same $\int f\,ds$ and the same $\int\mathbf{F}\cdot d\mathbf{r}$. If $\varphi'\lt0$ (orientation reversed), $\int f\,ds$ is unchanged but $\int\mathbf{F}\cdot d\mathbf{r}$ changes sign. In particular $\int_{-C}\mathbf{F}\cdot d\mathbf{r}=-\int_C\mathbf{F}\cdot d\mathbf{r}$ and $\int_{-C}f\,ds=\int_Cf\,ds$.
  4. Estimate: $\left|\int_C\mathbf{F}\cdot d\mathbf{r}\right|\le M\,L$, where $M=\max_C|\mathbf{F}|$ and $L$ is the length of $C$.

Proof. (1) and (2) follow from linearity of the Riemann integral and from additivity over $[a,b]=[a,t_*]\cup[t_*,b]$ (and over the breakpoints of a piecewise $C^1$ path). (3) We have $\tilde{\mathbf{r}}'(\tau)=\mathbf{r}'(\varphi(\tau))\,\varphi'(\tau)$, so by the substitution $t=\varphi(\tau)$,

$$\int_c^d\mathbf{F}(\tilde{\mathbf{r}})\cdot\tilde{\mathbf{r}}'\,d\tau=\int_c^d\mathbf{F}\big(\mathbf{r}(\varphi(\tau))\big)\cdot\mathbf{r}'(\varphi(\tau))\,\varphi'(\tau)\,d\tau=\int_{\varphi(c)}^{\varphi(d)}\mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)\,dt.$$

If $\varphi'\gt0$ then $\varphi(c)=a$, $\varphi(d)=b$ and nothing changes; if $\varphi'\lt0$ then $\varphi(c)=b$, $\varphi(d)=a$ and the sign flips. For the scalar integral, $|\tilde{\mathbf{r}}'(\tau)|=|\mathbf{r}'(\varphi(\tau))|\,|\varphi'(\tau)|$; the absolute value $|\varphi'|=-\varphi'$ in the reversing case exactly compensates the reversal of the limits, so $\int f\,ds$ is the same in both cases. (4) $|\mathbf{F}(\mathbf{r})\cdot\mathbf{r}'|\le|\mathbf{F}(\mathbf{r})|\,|\mathbf{r}'|\le M|\mathbf{r}'|$; integrate over $[a,b]$. ∎

So a line integral depends on the oriented curve, not on how fast we run along it — provided we run along it once. Going round the unit circle twice ($t\in[0,4\pi]$) is not a reparametrisation of going round once, and doubles every line integral.

✏️ Example 4 — Scalar line integrals: an arc and a helical wire
(a) Compute $\int_Cxy\,ds$, where $C$ is the quarter of the circle $x^2+y^2=4$ in the first quadrant. (b) A wire has the shape of the helix $\mathbf{r}(t)=(\cos t,\sin t,t)$, $0\le t\le2\pi$, and linear density $\delta=z$. Find its mass and its centre of mass.
(a) $\mathbf{r}(t)=(2\cos t,2\sin t)$, $0\le t\le\tfrac\pi2$, $|\mathbf{r}'(t)|=2$: $$\int_Cxy\,ds=\int_0^{\pi/2}4\cos t\sin t\cdot2\,dt=8\cdot\tfrac12=4.$$ (Orientation is irrelevant for $ds$-integrals.)
(b) mass $\mathbf{r}'(t)=(-\sin t,\cos t,1)$, $|\mathbf{r}'|=\sqrt2$, so $$M=\int_0^{2\pi}t\sqrt2\,dt=2\sqrt2\,\pi^2\approx27.9.$$
(b) centre $\int_0^{2\pi}t\cos t\,dt=\big[t\sin t+\cos t\big]_0^{2\pi}=0$, $\int_0^{2\pi}t\sin t\,dt=\big[-t\cos t+\sin t\big]_0^{2\pi}=-2\pi$, $\int_0^{2\pi}t^2\,dt=\tfrac{8\pi^3}3$. Dividing $\sqrt2\times$ these by $M$: $$(\bar x,\bar y,\bar z)=\left(0,\ -\tfrac1\pi,\ \tfrac{4\pi}3\right).$$
Check $\bar z=4\pi/3\approx4.19$ lies above the midpoint height $\pi$ of the wire, as it should: the density $z$ makes the upper turns heavier.
✏️ Example 5 — Work along three paths
Let $\mathbf{F}=(y^2,x)$. Compute the work $\int_C\mathbf{F}\cdot d\mathbf{r}$ from $(0,0)$ to $(1,1)$ along (i) the segment $y=x$; (ii) the parabola $y=x^2$; (iii) the broken line $(0,0)\to(1,0)\to(1,1)$. Is $\mathbf{F}$ a gradient field?
(i) $\mathbf{r}=(t,t)$, $\mathbf{r}'=(1,1)$, $\mathbf{F}(\mathbf{r})=(t^2,t)$: $\int_0^1(t^2+t)\,dt=\tfrac13+\tfrac12=\tfrac56$.
(ii) $\mathbf{r}=(t,t^2)$, $\mathbf{r}'=(1,2t)$, $\mathbf{F}(\mathbf{r})=(t^4,t)$: $\int_0^1(t^4+2t^2)\,dt=\tfrac15+\tfrac23=\tfrac{13}{15}$.
(iii) On $(t,0)$: $\mathbf{F}=(0,t)$, $\mathbf{r}'=(1,0)$, integrand $0$. On $(1,t)$: $\mathbf{F}=(t^2,1)$, $\mathbf{r}'=(0,1)$, integrand $1$. Total $0+1=1$.
Verdict Three different answers, so the work depends on the path and $\mathbf{F}$ is not conservative (Theorem 2.7 below). The curl test agrees: $Q_x-P_y=1-2y\ne0$. The circulation around the closed loop "out along the parabola, back along the segment" is $\tfrac{13}{15}-\tfrac56=\tfrac1{30}$; Green's theorem (§2.2) will reproduce it as $\iint(1-2y)\,dA$ over the region between the two curves.

Conservative Fields and Path Independence

📘 Definition 2.8 — Domains, conservative fields and potentials
A domain is a nonempty, open, connected subset $D$ of $\mathbb{R}^n$. (For open sets, connected is the same as path-connected, and any two points can then be joined by a polygonal path inside $D$.) A continuous vector field $\mathbf{F}$ on $D$ is conservative if $\mathbf{F}=\nabla f$ for some $C^1$ function $f:D\to\mathbb{R}$, called a potential (scalar potential) of $\mathbf{F}$. (Physicists often use $-f$, the potential energy.)
📐 Theorem 2.6 — Fundamental theorem for line integrals
Let $f$ be $C^1$ on an open set $U$ and let $C$ be a path in $U$ from $A$ to $B$. Then $$\int_C\nabla f\cdot d\mathbf{r}=f(B)-f(A).$$ In particular $\oint_C\nabla f\cdot d\mathbf{r}=0$ for every closed path $C$ in $U$.

Proof. Let $a=t_0\lt\dots\lt t_m=b$ be a partition on whose pieces $\mathbf{r}$ is $C^1$. On $[t_{k-1},t_k]$ the function $g(t)=f(\mathbf{r}(t))$ is $C^1$, with $g'(t)=\nabla f(\mathbf{r}(t))\cdot\mathbf{r}'(t)$ by the chain rule. The fundamental theorem of calculus gives $\int_{t_{k-1}}^{t_k}\nabla f(\mathbf{r})\cdot\mathbf{r}'\,dt=g(t_k)-g(t_{k-1})$, and summing over $k$ the sum telescopes to $g(b)-g(a)=f(B)-f(A)$. ∎

For a force $\mathbf{F}=\nabla f$, Newton's law $m\mathbf{r}''=\mathbf{F}$ gives $\frac{d}{dt}\tfrac12m|\mathbf{r}'|^2=\mathbf{F}\cdot\mathbf{r}'$, so the work equals the gain in kinetic energy and also $f(B)-f(A)$: kinetic energy minus $f$ is conserved. That is the origin of the word "conservative".

📐 Theorem 2.7 — Path independence

Let $\mathbf{F}$ be continuous on a domain $D$. The following are equivalent:

  1. $\mathbf{F}$ is conservative on $D$;
  2. $\oint_C\mathbf{F}\cdot d\mathbf{r}=0$ for every closed path $C$ in $D$;
  3. $\int_C\mathbf{F}\cdot d\mathbf{r}$ is independent of path in $D$: it depends only on the end points of $C$.

When they hold, for any fixed $\mathbf{x}_0\in D$ the function $f(\mathbf{x})=\int_{\mathbf{x}_0}^{\mathbf{x}}\mathbf{F}\cdot d\mathbf{r}$ (along any path in $D$) is a potential, and any two potentials of $\mathbf{F}$ on $D$ differ by a constant.

Proof. (1)$\Rightarrow$(2) is Theorem 2.6 with $A=B$. (2)$\Rightarrow$(3): if $C_1$ and $C_2$ both run from $A$ to $B$, then $C_1+(-C_2)$ is a closed path, so by Theorem 2.5, $0=\int_{C_1}\mathbf{F}\cdot d\mathbf{r}-\int_{C_2}\mathbf{F}\cdot d\mathbf{r}$. (3)$\Rightarrow$(2): a closed path from $A$ to $A$ has the same integral as the constant path at $A$, namely $0$.

(3)$\Rightarrow$(1). Fix $\mathbf{x}_0\in D$. Since $D$ is connected, every $\mathbf{x}\in D$ can be joined to $\mathbf{x}_0$ by a path in $D$; define $f(\mathbf{x})$ as the integral of $\mathbf{F}$ along any such path — well defined by (3). Fix $\mathbf{x}$. As $D$ is open, a ball $B(\mathbf{x},\delta)$ lies in $D$. For $0\lt|h|\lt\delta$, follow a path from $\mathbf{x}_0$ to $\mathbf{x}$ by the segment $\mathbf{s}(t)=\mathbf{x}+th\,\mathbf{e}_1$, $t\in[0,1]$, which stays in the ball. Then

$$f(\mathbf{x}+h\mathbf{e}_1)-f(\mathbf{x})=\int_0^1\mathbf{F}(\mathbf{x}+th\mathbf{e}_1)\cdot h\mathbf{e}_1\,dt=h\int_0^1P(\mathbf{x}+th\mathbf{e}_1)\,dt.$$

Divide by $h$ and let $h\to0$: by continuity of $P$, $\frac{\partial f}{\partial x}(\mathbf{x})=P(\mathbf{x})$. In the same way $f_y=Q$ and $f_z=R$. The partial derivatives of $f$ are continuous, so $f$ is $C^1$ and $\nabla f=\mathbf{F}$.

Uniqueness: if $\nabla f=\nabla g$ on $D$, put $h=f-g$, so $\nabla h=\mathbf{0}$. For any $\mathbf{x}\in D$, Theorem 2.6 along a path in $D$ from $\mathbf{x}_0$ to $\mathbf{x}$ gives $h(\mathbf{x})-h(\mathbf{x}_0)=0$. Thus $h$ is constant — and this is exactly where connectedness is needed. ∎

📐 Theorem 2.8 — The curl test (a necessary condition)
If $\mathbf{F}$ is $C^1$ and conservative on an open set $U\subseteq\mathbb{R}^3$, then $\nabla\times\mathbf{F}=\mathbf{0}$ on $U$. In the plane: if $(P,Q)$ is $C^1$ and conservative, then $P_y=Q_x$.

Proof. If $\mathbf{F}=\nabla f$ with $\mathbf{F}$ of class $C^1$, then $f$ is $C^2$, and $\nabla\times\mathbf{F}=\nabla\times\nabla f=\mathbf{0}$ by Theorem 2.2(a). In the plane, $P_y=f_{xy}=f_{yx}=Q_x$. ∎

So one point where the curl is nonzero proves that a field is not conservative — that is how Example 5 could have been decided at once. The converse fails, and the reason is topological: it depends on the shape of the domain.

📘 Definition 2.9 — Star-shaped and simply connected domains

A set $D$ is star-shaped with respect to $\mathbf{p}\in D$ if the segment from $\mathbf{p}$ to $\mathbf{x}$ lies in $D$ for every $\mathbf{x}\in D$; every convex set is star-shaped with respect to each of its points. A domain $D$ is simply connected if every closed path in $D$ can be shrunk continuously to a point without leaving $D$: for every closed path $\gamma:[0,1]\to D$ there is a continuous $H:[0,1]\times[0,1]\to D$ with $H(t,0)=\gamma(t)$, $H(t,1)$ constant, and $H(0,s)=H(1,s)$ for all $s$. For a plane domain this means: it has no holes — the inside of every simple closed curve in $D$ lies in $D$.

Simply connected$\mathbb{R}^2$, $\mathbb{R}^3$, balls, convex and star-shaped sets; the slit plane $\mathbb{R}^2\setminus\{(x,0):x\le0\}$; $\mathbb{R}^3\setminus\{0\}$; $\mathbb{R}^3$ minus a ray; the spherical shell $1\lt|\mathbf{x}|\lt2$ in $\mathbb{R}^3$.
Not simply connected$\mathbb{R}^2\setminus\{0\}$; a plane annulus; $\mathbb{R}^3$ minus the $z$-axis (or any full line); a solid torus; $\mathbb{R}^3$ minus a circle.

The surprise is $\mathbb{R}^3\setminus\{0\}$: a loop around the missing point can be slid over it, the way a rubber band slips off a ball. A loop around a missing line cannot be removed.

📐 Theorem 2.9 — Poincaré lemma for star-shaped domains
Let $D\subseteq\mathbb{R}^3$ be open and star-shaped with respect to $\mathbf{p}$, and let $\mathbf{F}$ be $C^1$ on $D$ with $\nabla\times\mathbf{F}=\mathbf{0}$. Then $\mathbf{F}$ is conservative on $D$, and a potential is the work along the straight segment from $\mathbf{p}$: $$f(\mathbf{x})=\int_0^1\mathbf{F}\big(\mathbf{p}+t(\mathbf{x}-\mathbf{p})\big)\cdot(\mathbf{x}-\mathbf{p})\,dt.$$ The same holds in the plane with the condition $P_y=Q_x$.

Proof. Translating, we may assume $\mathbf{p}=\mathbf{0}$, so $f(\mathbf{x})=\int_0^1\sum_jF_j(t\mathbf{x})\,x_j\,dt$, and $t\mathbf{x}\in D$ for all $t\in[0,1]$, $\mathbf{x}\in D$. The integrand and its partial derivatives in $\mathbf{x}$ are continuous on $[0,1]\times D$, so we may differentiate under the integral sign (on $[0,1]\times K$ for a compact neighbourhood $K\subseteq D$ of the point in question):

$$\frac{\partial f}{\partial x_i}(\mathbf{x})=\int_0^1\Big[F_i(t\mathbf{x})+\sum_jt\,x_j\,(\partial_iF_j)(t\mathbf{x})\Big]dt.$$

The condition $\nabla\times\mathbf{F}=\mathbf{0}$ says exactly that $\partial_iF_j=\partial_jF_i$ for all $i,j$. Hence $\sum_jx_j(\partial_iF_j)(t\mathbf{x})$ equals $\sum_jx_j(\partial_jF_i)(t\mathbf{x})$, which is $\frac{d}{dt}\big[F_i(t\mathbf{x})\big]$ by the chain rule, and

$$\frac{\partial f}{\partial x_i}(\mathbf{x})=\int_0^1\Big[F_i(t\mathbf{x})+t\,\frac{d}{dt}F_i(t\mathbf{x})\Big]dt=\int_0^1\frac{d}{dt}\Big[t\,F_i(t\mathbf{x})\Big]dt=F_i(\mathbf{x}).$$

So $\nabla f=\mathbf{F}$, and $f$ is $C^1$ because $\mathbf{F}$ is continuous. ∎

📐 Theorem 2.10 — Curl-free fields on simply connected domains
Let $D\subseteq\mathbb{R}^2$ or $\mathbb{R}^3$ be a simply connected domain and $\mathbf{F}$ a $C^1$ field on $D$ with $\nabla\times\mathbf{F}=\mathbf{0}$ (in the plane, $P_y=Q_x$). Then $\mathbf{F}$ is conservative on $D$. Consequently, on a simply connected domain, a $C^1$ field is conservative if and only if it is irrotational.

Proof (sketch). By Theorem 2.7 it suffices to show $\oint_{\gamma}\mathbf{F}\cdot d\mathbf{r}=0$ for every closed path $\gamma$ in $D$. Let $H$ be a homotopy shrinking $\gamma$ to a point. Its domain $[0,1]^2$ is compact, so it can be cut into small squares, each mapped by $H$ into a ball contained in $D$ (uniform continuity and a Lebesgue-number argument). In each ball $\mathbf{F}$ is conservative by Theorem 2.9, so the integral of $\mathbf{F}$ around the image of each small square is $0$. Adding these over all the small squares, the contributions of interior edges cancel in pairs (each is traversed once in each direction), leaving the integral around the boundary of $[0,1]^2$: this is $\oint_{\gamma}$ minus the integral around the constant path, plus two side contributions that cancel because $H(0,s)=H(1,s)$. Hence $\oint_{\gamma}\mathbf{F}\cdot d\mathbf{r}=0$. (The technical point — that $H$ need only be continuous, not piecewise $C^1$ — is handled by replacing the image of each small square by a polygon; we omit it. For a simple closed curve in a plane domain without holes, Green's theorem in §2.2 gives a one-line proof: $\oint=\iint(Q_x-P_y)\,dA=0$.) The final statement combines this with Theorem 2.8. ∎

🧭 Problem-solving strategy — is $\mathbf{F}$ conservative, and what is the work?
  1. Curl first. Compute $\nabla\times\mathbf{F}$ (or $Q_x-P_y$). If it is nonzero anywhere, $\mathbf{F}$ is not conservative: compute the line integral from a parametrisation (or with Green/Stokes, §2.2).
  2. Then the domain. If the curl vanishes and $\mathbf{F}$ is $C^1$ on all of $\mathbb{R}^n$ (or on a convex, star-shaped or simply connected set containing the path), $\mathbf{F}$ is conservative. If $\mathbf{F}$ blows up on a point of the plane or on a line in space, compute the circulation around that hole: zero means conservative after all, nonzero means not.
  3. Find $f$ by successive integration: $f=\int P\,dx+g(y,z)$; differentiate in $y$ and match $Q$ to find $g$ up to a function $h(z)$; differentiate in $z$ and match $R$. (Or use the segment formula of Theorem 2.9.) Check by differentiating.
  4. Work $=f(B)-f(A)$; around any closed path in the domain, $0$. If $\mathbf{F}=\nabla f+\mathbf{G}$ with $\mathbf{G}$ simple, integrate only $\mathbf{G}$ along the path.
✏️ Example 6 — Finding a potential
Show that $\mathbf{F}=\left(2xy+z^3,\ x^2+2yz,\ y^2+3xz^2\right)$ is conservative on $\mathbb{R}^3$, find a potential, and compute the work done by $\mathbf{F}$ along the twisted path $\mathbf{r}(t)=(t,\,2t^2,\,-t^3)$, $0\le t\le1$.
Curl $R_y-Q_z=2y-2y=0$, $\ P_z-R_x=3z^2-3z^2=0$, $\ Q_x-P_y=2x-2x=0$. $\mathbf{F}$ is $C^1$ on the convex set $\mathbb{R}^3$, so it is conservative (Theorem 2.9).
Integrate $f=\int(2xy+z^3)\,dx=x^2y+xz^3+g(y,z)$. Then $f_y=x^2+g_y$ must equal $x^2+2yz$, so $g_y=2yz$ and $g=y^2z+h(z)$. Finally $f_z=3xz^2+y^2+h'(z)$ must equal $y^2+3xz^2$, so $h'=0$: $$f(x,y,z)=x^2y+xz^3+y^2z\quad(+\text{const}).$$
Work The path runs from $\mathbf{r}(0)=(0,0,0)$ to $\mathbf{r}(1)=(1,2,-1)$, so the work is $f(1,2,-1)-f(0,0,0)=2-1-4=-3$.
Check Directly, $\mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)$ is a polynomial in $t$; integrating it over $[0,1]$ (by machine) gives $-3$ as well — the potential saved a page of algebra.
✏️ Example 7 — The vortex field: curl-free but not conservative
Let $\mathbf{F}=\dfrac{(-y,\,x)}{x^2+y^2}$ on $D=\mathbb{R}^2\setminus\{0\}$. (a) Show that $P_y=Q_x$ on $D$. (b) Compute $\oint\mathbf{F}\cdot d\mathbf{r}$ around the unit circle, counterclockwise, and conclude that $\mathbf{F}$ is not conservative on $D$. (c) Show that $\mathbf{F}$ is conservative on the right half-plane $H=\{x\gt0\}$ and on the slit plane $D_0=\mathbb{R}^2\setminus\{(x,0):x\le0\}$. (d) What is the circulation around the circle $(x-3)^2+y^2=1$?
(a) By the quotient rule, $$P_y=\frac{-(x^2+y^2)+2y^2}{(x^2+y^2)^2}=\frac{y^2-x^2}{(x^2+y^2)^2},\qquad Q_x=\frac{(x^2+y^2)-2x^2}{(x^2+y^2)^2}=\frac{y^2-x^2}{(x^2+y^2)^2}.$$
(b) With $\mathbf{r}=(\cos t,\sin t)$: $\mathbf{F}(\mathbf{r})=(-\sin t,\cos t)=\mathbf{r}'(t)$, so the integrand is $\sin^2t+\cos^2t=1$ and $\oint=2\pi\ne0$. By Theorem 2.7, $\mathbf{F}$ is not conservative on $D$ — although its curl vanishes there. Theorem 2.10 is not contradicted: $D$ is not simply connected.
(c) $H$ is convex and $P_y=Q_x$, so Theorem 2.9 applies; explicitly $\nabla\arctan(y/x)=\left(\frac{-y/x^2}{1+y^2/x^2},\frac{1/x}{1+y^2/x^2}\right)=\mathbf{F}$. On the slit plane $D_0$ (simply connected) a potential is the polar angle $\theta(x,y)\in(-\pi,\pi)$, which is $C^1$ there and agrees with $\arctan(y/x)$ on $H$. The angle cannot be defined continuously on all of $D$: going once round the origin it increases by $2\pi$ — the circulation found in (b).
(d) The circle $(x-3)^2+y^2=1$ lies in $H$, where $\mathbf{F}$ is conservative, so the circulation is $0$. In general $\oint_C\mathbf{F}\cdot d\mathbf{r}=2\pi\times$(the number of times $C$ winds counterclockwise round the origin).
Interactive 2 — Work Along Different Paths from A to B

A particle travels from $A=(1,0)$ to $B=(-1,0)$ along four different paths while the lab adds up the work $W(s)=\int\mathbf{F}\cdot d\mathbf{r}$ done so far (graph on the right). For the gradient field every path ends at the same value $f(B)-f(A)$. For the rotation field the totals differ. For the vortex the curl is zero everywhere on the punctured plane, yet the paths above and below the origin disagree by $2\pi$ — the circulation around the hole.

path—
work so far—
total along this path—
curl test Q_x − P_y—
⚠️ Counterexamples and pitfalls
  1. Curl-free does not mean conservative. $(-y,x)/(x^2+y^2)$ on $\mathbb{R}^2\setminus\{0\}$ and $(-y,x,0)/(x^2+y^2)$ on $\mathbb{R}^3$ minus the $z$-axis have zero curl and circulation $2\pi$ round the hole.
  2. $\mathbb{R}^3\setminus\{0\}$ is simply connected, unlike $\mathbb{R}^2\setminus\{0\}$. So curl-free fields there are conservative: $\mathbf{r}/r^3=\nabla(-1/r)$, and its work around every closed path avoiding $0$ is $0$.
  3. Curl is not "curved stream lines". The shear flow $(y,0)$ has straight stream lines and curl $-1$; the vortex has circular stream lines and curl $0$.
  4. Divergence-free does not mean zero flux. $\mathbf{r}/r^3$ is solenoidal on $\mathbb{R}^3\setminus\{0\}$, yet its flux out of the unit sphere is $4\pi$ (§2.2): the source sits in the hole.
  5. Product rules have extra terms. $\nabla\times(f\mathbf{F})=f\,\nabla\times\mathbf{F}+\nabla f\times\mathbf{F}$ (in this order) and $\nabla\cdot(f\mathbf{F})=f\,\nabla\cdot\mathbf{F}+\nabla f\cdot\mathbf{F}$; e.g. $\nabla\times(x\mathbf{k})=-\mathbf{j}$ though $\nabla\times\mathbf{k}=\mathbf{0}$.
  6. The identities need $C^2$. For $f=\dfrac{xy(x^2-y^2)}{x^2+y^2}$ ($f(0,0)=0$), $f_{xy}(0,0)=-1\ne1=f_{yx}(0,0)$, so the "scalar curl" of $\nabla f$ is $2$ at the origin.
  7. $ds$ is not $dx$. Around the unit circle $\oint1\,ds=2\pi$ but $\oint1\,dx=0$; $\int_Cf\,ds$ ignores orientation, $\int_Cf\,dx$ does not.
  8. Orientation. Reversing $C$ changes the sign of $\int\mathbf{F}\cdot d\mathbf{r}$ but not of $\int f\,ds$.
  9. Traversing twice doubles. $t\in[0,4\pi]$ on the unit circle gives circulation $4\pi$ for the vortex: "the curve" in a problem means traversed once.
  10. Potentials are unique only up to a constant on connected sets. On two disjoint discs, $f=0$ on one and $f=1$ on the other has $\nabla f=\mathbf{0}$.
  11. $P_y=Q_x$ at a point, or along the path, proves nothing. It must hold throughout a simply connected domain containing the path.
  12. The gradient is normal to a level set only where it is nonzero. $x^2+y^2-z^2=0$ has no tangent plane at the origin, where $\nabla f=\mathbf{0}$.

Exercises

I
Gradient, divergence and curl.
  • 1 For $f=xe^{yz}$ find $\nabla f$, the directional derivative at $(1,0,2)$ in the direction of $(1,2,2)$, and the maximum rate of change of $f$ at that point.
  • 2 Find a unit normal and the tangent plane to the surface $x^2y+yz^2+z=5$ at $(1,2,1)$.
  • 3 Compute $\nabla\cdot\mathbf{F}$ and $\nabla\times\mathbf{F}$ for $\mathbf{F}=\left(x^2z,\ -2y^3z^2,\ xy^2z\right)$.
  • 4 Find the constants $a,b,c$ for which $\mathbf{F}=(x+2y+az,\ bx-3y-z,\ 4x+cy+2z)$ is irrotational; for these values show that $\mathbf{F}$ is also solenoidal and find a potential.
  • 5 Show that $\mathbf{F}=(yz,zx,xy)$ is both irrotational and solenoidal, find $f$ with $\mathbf{F}=\nabla f$, and check that $f$ is harmonic.
  • 6 Show that $\log(x^2+y^2)$ is harmonic on $\mathbb{R}^2\setminus\{0\}$, and compute $\Delta\left(\dfrac1{x^2+y^2+z^2}\right)$ on $\mathbb{R}^3\setminus\{0\}$.
  • 7 Find the directional derivative of $\varphi=x^2-y^2+2z^2$ at $P=(1,2,3)$ in the direction from $P$ towards $Q=(5,0,7)$.
  • 8 Find the angle between the surfaces $x^2+y^2+z^2=6$ and $z=x^2+y^2$ at their common point $(1,1,2)$ (the angle between their normals).
1 $\nabla f=\left(e^{yz},\,xze^{yz},\,xye^{yz}\right)=(1,2,0)$ at $(1,0,2)$. With $\mathbf{u}=\tfrac13(1,2,2)$: $D_{\mathbf{u}}f=\tfrac13(1+4+0)=\tfrac53$. Maximum rate $|\nabla f|=\sqrt5$, in the direction $\tfrac1{\sqrt5}(1,2,0)$.
2 $g=x^2y+yz^2+z$, $g(1,2,1)=5$; $\nabla g=(2xy,\,x^2+z^2,\,2yz+1)=(4,2,5)$. Unit normal $\tfrac{1}{3\sqrt5}(4,2,5)$; tangent plane $4(x-1)+2(y-2)+5(z-1)=0$, i.e. $4x+2y+5z=13$.
3 $\nabla\cdot\mathbf{F}=2xz-6y^2z^2+xy^2$. $\nabla\times\mathbf{F}=\left(2xyz+4y^3z,\ x^2-y^2z,\ 0\right)$: e.g. $R_y-Q_z=2xyz-(-4y^3z)$ and $P_z-R_x=x^2-y^2z$.
4 $\nabla\times\mathbf{F}=(c+1,\ a-4,\ b-2)$, so $a=4$, $b=2$, $c=-1$. Then $\nabla\cdot\mathbf{F}=1-3+2=0$. Potential: $f=\tfrac12x^2-\tfrac32y^2+z^2+2xy+4xz-yz$ (check: $f_x=x+2y+4z$, $f_y=2x-3y-z$, $f_z=4x-y+2z$).
5 $\nabla\times\mathbf{F}=(x-x,\,y-y,\,z-z)=\mathbf{0}$ and $\nabla\cdot\mathbf{F}=0+0+0=0$. $f=xyz$, and $\Delta f=0$ since each second derivative $f_{xx},f_{yy},f_{zz}$ vanishes — as it must: $\Delta f=\nabla\cdot\nabla f=\nabla\cdot\mathbf{F}$.
6 $\log(x^2+y^2)=2\log r$ and $\log r$ is harmonic in the plane (Theorem 2.4, planar version); directly, $\partial_{xx}=\frac{2(y^2-x^2)}{(x^2+y^2)^2}$ and $\partial_{yy}=\frac{2(x^2-y^2)}{(x^2+y^2)^2}$ add to $0$. In $\mathbb{R}^3$: $\Delta(r^{-2})=(-2)(-1)r^{-4}=\dfrac{2}{(x^2+y^2+z^2)^2}$.
7 $\nabla\varphi=(2x,-2y,4z)=(2,-4,12)$; $\overrightarrow{PQ}=(4,-2,4)$, $|\overrightarrow{PQ}|=6$, $\mathbf{u}=\tfrac13(2,-1,2)$. $D_{\mathbf{u}}\varphi=\tfrac13(4+4+24)=\tfrac{32}3$.
8 Normals $\nabla(x^2+y^2+z^2)=(2,2,4)$ and $\nabla(x^2+y^2-z)=(2,2,-1)$. $\cos\theta=\dfrac{4+4-4}{\sqrt{24}\cdot3}=\dfrac{\sqrt6}{9}\approx0.272$, so $\theta\approx74.2^\circ$.
II
Identities and radial fields. Here $\mathbf{r}=(x,y,z)$, $r=|\mathbf{r}|$, and $\mathbf{a}$ is a constant vector.
  • 1 Prove that $\nabla\cdot(f\nabla g-g\nabla f)=f\Delta g-g\Delta f$ for $C^2$ functions $f,g$.
  • 2 Prove that $\nabla\times(f\nabla g)=\nabla f\times\nabla g$, and deduce again that $\nabla f\times\nabla g$ is solenoidal.
  • 3 Show that $\nabla(\mathbf{a}\cdot\mathbf{r})=\mathbf{a}$, $\nabla\cdot(\mathbf{a}\times\mathbf{r})=0$ and $\nabla\times(\mathbf{a}\times\mathbf{r})=2\mathbf{a}$. Interpret the last identity for a rigid rotation.
  • 4 Find all $C^2$ functions $f(r)$ of $r$ alone that are harmonic on $\mathbb{R}^3\setminus\{0\}$; do the same on $\mathbb{R}^2\setminus\{0\}$.
  • 5 Show that $f(r)\mathbf{r}$ is irrotational for every differentiable $f$, and find all $f$ for which it is also solenoidal on $\mathbb{R}^3\setminus\{0\}$.
  • 6 For $\mathbf{F}=(x^2y,\ y^2z,\ z^2x)$ compute $\nabla\times(\nabla\times\mathbf{F})$ directly and via Theorem 2.2(d).
  • 7 Prove that the cross product of two irrotational $C^1$ fields is solenoidal.
  • 8 Compute $\nabla\cdot\left(\dfrac{\mathbf{r}}{r}\right)$, and show that $\nabla\cdot\left(\dfrac{\mathbf{a}\times\mathbf{r}}{r^3}\right)=0$ on $\mathbb{R}^3\setminus\{0\}$.
1 By Theorem 2.3(2), $\nabla\cdot(f\nabla g)=f\Delta g+\nabla f\cdot\nabla g$ and $\nabla\cdot(g\nabla f)=g\Delta f+\nabla g\cdot\nabla f$; subtract. (Integrated with the divergence theorem this becomes Green's second identity, §2.2.)
2 Theorem 2.3(3): $\nabla\times(f\nabla g)=f\,\nabla\times\nabla g+\nabla f\times\nabla g=\nabla f\times\nabla g$. A curl is always solenoidal (Theorem 2.2(b)), so $\nabla\cdot(\nabla f\times\nabla g)=0$.
3 $\mathbf{a}\cdot\mathbf{r}=a_1x+a_2y+a_3z$ has gradient $\mathbf{a}$. $\mathbf{a}\times\mathbf{r}=(a_2z-a_3y,\ a_3x-a_1z,\ a_1y-a_2x)$: its divergence is $0+0+0$ and its curl is $(a_1+a_1,\ a_2+a_2,\ a_3+a_3)=2\mathbf{a}$. A rigid rotation with angular velocity $\mathbf{w}$ has velocity $\mathbf{w}\times\mathbf{r}$, so its curl is $2\mathbf{w}$ and it is incompressible.
4 $\Delta f(r)=\nabla\cdot(f'(r)\mathbf{r}/r)=3\frac{f'}{r}+r\left(\frac{f'}{r}\right)'=f''+\frac2rf'$ in $\mathbb{R}^3$. $f''+\frac2rf'=0\iff(r^2f')'=0\iff f=A+\dfrac Br$. In the plane $\Delta f=f''+\frac1rf'$, so $(rf')'=0$ and $f=A+B\log r$.
5 Irrotational by Theorem 2.4(3). Solenoidal iff $3f+rf'=0\iff(r^3f)'=0\iff f=Cr^{-3}$: the only solenoidal radial fields are the multiples of $\mathbf{r}/r^3$.
6 $\nabla\times\mathbf{F}=(-y^2,-z^2,-x^2)$ and $\nabla\times(-y^2,-z^2,-x^2)=(2z,2x,2y)$. Via the identity: $\nabla\cdot\mathbf{F}=2xy+2yz+2zx$, $\nabla(\nabla\cdot\mathbf{F})=(2y+2z,\,2x+2z,\,2x+2y)$, $\Delta\mathbf{F}=(2y,2z,2x)$; the difference is $(2z,2x,2y)$. ✓
7 Theorem 2.3(4): $\nabla\cdot(\mathbf{F}\times\mathbf{G})=\mathbf{G}\cdot(\nabla\times\mathbf{F})-\mathbf{F}\cdot(\nabla\times\mathbf{G})=0-0$.
8 $\nabla\cdot(r^{-1}\mathbf{r})=(-1+3)r^{-1}=2/r$. For the second, $\dfrac{\mathbf{a}\times\mathbf{r}}{r^3}=\mathbf{a}\times\dfrac{\mathbf{r}}{r^3}$ is the cross product of the irrotational fields $\mathbf{a}$ (constant) and $\mathbf{r}/r^3$ (Theorem 2.4), hence solenoidal by part 7.
III
Line integrals.
  • 1 Compute $\int_C(x^2+y^2)\,ds$ along the segment from $(1,1)$ to $(4,5)$.
  • 2 Find the mass of the wire $\mathbf{r}(t)=(2\cos t,2\sin t,3t)$, $0\le t\le2\pi$, with density $\delta=z$.
  • 3 Compute $\int_Cy\,dx+x^2\,dy$ from $(0,0)$ to $(2,4)$ along (a) the segment; (b) the parabola $y=x^2$.
  • 4 Find the work done by $\mathbf{F}=(xy,\,yz,\,zx)$ along the twisted cubic $\mathbf{r}(t)=(t,t^2,t^3)$, $0\le t\le1$.
  • 5 For $\mathbf{F}=(x-y,\ x+y)$ compute the circulation around the circle $x^2+y^2=a^2$ (counterclockwise) and the outward flux $\oint\mathbf{F}\cdot\mathbf{n}\,ds$ across it.
  • 6 Show that $\left|\int_C\sin(xy)\,dx+\cos(xy)\,dy\right|\le5$ when $C$ is the segment from $(0,0)$ to $(3,4)$.
  • 7 For the graph $C:\ y=g(x)$, $a\le x\le b$ ($g\in C^1$), show that $\int_Cf\,ds=\int_a^bf(x,g(x))\sqrt{1+g'(x)^2}\,dx$, and compute $\int_Cx\,ds$ for $y=x^2$, $0\le x\le1$.
  • 8 Compute directly, side by side, the outward flux of $\mathbf{F}=(x^2,y^2)$ across the boundary of the unit square $[0,1]^2$.
1 $\mathbf{r}=(1+3t,1+4t)$, $|\mathbf{r}'|=5$: $5\int_0^1\left(2+14t+25t^2\right)dt=5\left(2+7+\tfrac{25}3\right)=\tfrac{260}3$.
2 $|\mathbf{r}'|=\sqrt{4+9}=\sqrt{13}$; $M=\int_0^{2\pi}3t\sqrt{13}\,dt=6\sqrt{13}\,\pi^2\approx213.5$.
3 (a) $\mathbf{r}=(t,2t)$, $0\le t\le2$: $\int_0^2(2t+2t^2)\,dt=4+\tfrac{16}3=\tfrac{28}3$. (b) $\mathbf{r}=(t,t^2)$: $\int_0^2(t^2+2t^3)\,dt=\tfrac83+8=\tfrac{32}3$. Different, as $Q_x-P_y=2x-1\ne0$.
4 $\mathbf{F}(\mathbf{r})=(t^3,t^5,t^4)$, $\mathbf{r}'=(1,2t,3t^2)$: $\int_0^1(t^3+2t^6+3t^6)\,dt=\tfrac14+\tfrac57=\tfrac{27}{28}$.
5 $\mathbf{r}=a(\cos t,\sin t)$: $\mathbf{F}\cdot\mathbf{r}'=a^2\left(-\cos t\sin t+\sin^2t+\cos^2t+\sin t\cos t\right)=a^2$, circulation $2\pi a^2$. Flux: $Py'-Qx'=a^2\left(\cos^2t-\sin t\cos t+\sin t\cos t+\sin^2t\right)=a^2$, flux $2\pi a^2$. (Both are $2\times$ the area, matching scalar curl $2$ and divergence $2$ — Green's theorem, §2.2.)
6 $|\mathbf{F}|=\sqrt{\sin^2(xy)+\cos^2(xy)}=1$ and the segment has length $5$; Theorem 2.5(4).
7 Parametrise by $\mathbf{r}(x)=(x,g(x))$: $|\mathbf{r}'|=\sqrt{1+g'^2}$. Then $\int_0^1x\sqrt{1+4x^2}\,dx=\tfrac1{12}\left[(1+4x^2)^{3/2}\right]_0^1=\dfrac{5\sqrt5-1}{12}\approx0.848$.
8 Right side $x=1$, $\mathbf{n}=\mathbf{i}$: $\int_0^11\,dy=1$. Top $y=1$, $\mathbf{n}=\mathbf{j}$: $\int_0^11\,dx=1$. Left $x=0$, $\mathbf{n}=-\mathbf{i}$: integrand $-0^2=0$. Bottom: $0$. Total outward flux $2$ (and $\iint_{[0,1]^2}(2x+2y)\,dA=2$, as the divergence form of Green's theorem predicts).
IV
Conservative fields, potentials and simply connected domains.
  • 1 Show that $\mathbf{F}=\left(2xy^3,\ 3x^2y^2+\cos y\right)$ is conservative on $\mathbb{R}^2$ and evaluate $\int_C\mathbf{F}\cdot d\mathbf{r}$ along any path from $(0,0)$ to $(1,\pi/2)$.
  • 2 Find a potential for $\mathbf{F}=\left(e^y+z,\ xe^y,\ x+2z\right)$ and the work done along any path from $(1,0,0)$ to $(2,\log3,1)$.
  • 3 Which of these fields are conservative on $\mathbb{R}^2$? (a) $(y,x)$; (b) $(y,-x)$; (c) $\dfrac{(x,y)}{1+x^2+y^2}$; (d) $(y^2,x^2)$.
  • 4 Find $a,b,c$ such that $\mathbf{F}=\left(y^2+axz,\ bxy+z^2,\ x^2+cyz\right)$ is conservative, and find a potential.
  • 5 For the vortex $\mathbf{F}=(-y,x)/(x^2+y^2)$, compute the circulation around the square with vertices $(\pm1,\pm1)$, counterclockwise, directly (one side, then symmetry).
  • 6 Let $D=\mathbb{R}^3$ minus the $z$-axis and $\mathbf{G}=\dfrac{(-y,\,x,\,0)}{x^2+y^2}$. Show that $\nabla\times\mathbf{G}=\mathbf{0}$ on $D$ but $\mathbf{G}$ is not conservative on $D$. Is $D$ simply connected?
  • 7 Use the segment formula of Theorem 2.9 (with $\mathbf{p}=\mathbf{0}$) to find a potential of $\mathbf{F}=(2xy+z,\ x^2,\ x)$.
  • 8 Show that $\mathbf{r}/r^3$ is conservative on $\mathbb{R}^3\setminus\{0\}$ and find a potential. Why does this not contradict Exercise 6?
  • 9 Give an example of a domain $D$ and a $C^1$ field on $D$ with zero curl whose circulation around some closed path is $6\pi$.
1 $Q_x=6xy^2=P_y$ on $\mathbb{R}^2$. Potential $f=x^2y^3+\sin y$; the integral is $f(1,\tfrac\pi2)-f(0,0)=\dfrac{\pi^3}8+1\approx4.876$.
2 $\nabla\times\mathbf{F}=(0-0,\ 1-1,\ e^y-e^y)=\mathbf{0}$. $f=xe^y+xz+z^2$. Work $=f(2,\log3,1)-f(1,0,0)=(6+2+1)-1=8$.
3 (a) Yes, $f=xy$. (b) No: $Q_x-P_y=-1-1=-2$. (c) Yes, $f=\tfrac12\log(1+x^2+y^2)$. (d) No: $Q_x-P_y=2x-2y$.
4 $\nabla\times\mathbf{F}=\left((c-2)z,\ (a-2)x,\ (b-2)y\right)$, so $a=b=c=2$, and then $f=xy^2+x^2z+yz^2$.
5 Right side $\mathbf{r}=(1,t)$, $-1\le t\le1$: integrand $\dfrac{x\,y'}{x^2+y^2}=\dfrac1{1+t^2}$, integral $\arctan1-\arctan(-1)=\tfrac\pi2$. By the rotational symmetry of $\mathbf{F}$ each side gives $\tfrac\pi2$: total $2\pi$, the same as for the circle (§2.2 explains why every curve round the origin once gives $2\pi$).
6 The first two components of $\nabla\times\mathbf{G}$ vanish because $\mathbf{G}$ does not depend on $z$ and has $R=0$; the third is $Q_x-P_y=0$ (Example 7). Around the circle $x^2+y^2=1$, $z=0$, the circulation is $2\pi\ne0$. $D$ is not simply connected: that circle cannot be shrunk to a point without crossing the $z$-axis.
7 $\mathbf{F}(t\mathbf{x})\cdot\mathbf{x}=(2t^2xy+tz)x+t^2x^2\,y+tx\,z=3t^2x^2y+2txz$; integrating over $t\in[0,1]$: $f=x^2y+xz$. (Check: $\nabla f=(2xy+z,x^2,x)$.)
8 $\nabla(-1/r)=r^{-3}\mathbf{r}$ by Theorem 2.4(4) with $n=-1$, so $f=-1/r$. No contradiction: the hole of $\mathbb{R}^3\setminus\{0\}$ is a point, which does not obstruct shrinking loops — the domain is simply connected — whereas the hole in Exercise 6 is a whole line.
9 The vortex on $\mathbb{R}^2\setminus\{0\}$, with the path $(\cos t,\sin t)$, $0\le t\le6\pi$ (three times round). Or the simple circle with the field $3(-y,x)/(x^2+y^2)$.
🎯 GATE corner GATE MA · MCQGATE MA · MSQGATE MA · NAT

E1. GATE MA · MCQ Let $\mathbf{r}=(x,y,z)$ and $r=|\mathbf{r}|$. The vector field $r^n\mathbf{r}$ is solenoidal on $\mathbb{R}^3\setminus\{0\}$ if and only if $n$ equals (A) $-1$; (B) $1$; (C) $-3$; (D) $3$.

Idea $\nabla\cdot(r^n\mathbf{r})=\nabla(r^n)\cdot\mathbf{r}+r^n\,\nabla\cdot\mathbf{r}=nr^{n-2}r^2+3r^n=(n+3)r^n$.
Options This vanishes identically only for $n=-3$; for $n=-1,1,3$ the divergence is $2r^{-1}$, $4r$, $6r^3$.
Answer (C).

E2. GATE MA · MCQ Let $\mathbf{F}=\left(yz,\ xz,\ xy+2z\right)$ and let $C$ be the helix $\mathbf{r}(t)=\left(\cos t,\ \sin t,\ t/\pi\right)$, $0\le t\le2\pi$. Then $\int_C\mathbf{F}\cdot d\mathbf{r}$ equals (A) $0$; (B) $2$; (C) $4$; (D) $4\pi$.

Idea Spot a potential: $f=xyz+z^2$ has $\nabla f=(yz,xz,xy+2z)=\mathbf{F}$.
Evaluate $C$ runs from $(1,0,0)$ to $(1,0,2)$, so the integral is $f(1,0,2)-f(1,0,0)=(0+4)-0=4$. (A) would be right for a closed path; (D) comes from integrating carelessly along the helix.
Answer (C).

E3. GATE MA · MSQ Which of the following subsets of $\mathbb{R}^2$ or $\mathbb{R}^3$ are simply connected? (One or more options may be correct.) (A) $\mathbb{R}^3\setminus\{(0,0,0)\}$; (B) $\mathbb{R}^2\setminus\{(0,0)\}$; (C) $\mathbb{R}^3$ minus the $z$-axis; (D) $\{\mathbf{x}\in\mathbb{R}^3:1\lt|\mathbf{x}|\lt2\}$.

(A) Yes A loop avoiding a single point of space can be slid off it and shrunk; equivalently, every curl-free field there is conservative (e.g. $\mathbf{r}/r^3=\nabla(-1/r)$).
(B) No The vortex $(-y,x)/(x^2+y^2)$ is curl-free with circulation $2\pi$ round the unit circle; if the domain were simply connected, Theorem 2.10 would force $0$.
(C) No The same argument with $(-y,x,0)/(x^2+y^2)$ and the circle $x^2+y^2=1$, $z=0$.
(D) Yes The shell is a thickened sphere; loops in it shrink just as in (A) (radially project a loop to the sphere $|\mathbf{x}|=1.5$, then shrink it there avoiding one point).
Answer (A) and (D).

E4. GATE MA · MSQ Let $\mathbf{F}=\left(2xy+z^3,\ x^2+\beta z,\ \alpha xz^2+y\right)$ on $\mathbb{R}^3$, with real constants $\alpha,\beta$. Which of the following are true? (One or more options may be correct.) (A) $\mathbf{F}$ is conservative if and only if $\alpha=3$ and $\beta=1$. (B) For $\alpha=3,\beta=1$, the function $x^2y+xz^3+yz$ is a potential of $\mathbf{F}$. (C) For $\alpha=3,\beta=1$, $\oint_C\mathbf{F}\cdot d\mathbf{r}=0$ for every closed path $C$. (D) For $\alpha=3,\beta=1$, the work done by $\mathbf{F}$ from $(0,0,0)$ to $(1,1,1)$ is $2$.

Curl $\nabla\times\mathbf{F}=\left(1-\beta,\ (3-\alpha)z^2,\ 2x-2x\right)$.
(A) True The curl vanishes identically iff $\beta=1$ and $\alpha=3$; on $\mathbb{R}^3$ (simply connected) that is equivalent to being conservative (Theorems 2.8 and 2.9).
(B) True $\nabla(x^2y+xz^3+yz)=(2xy+z^3,\ x^2+z,\ 3xz^2+y)$.
(C) True Theorem 2.6 for a conservative field.
(D) False The work is $f(1,1,1)-f(0,0,0)=1+1+1=3$.
Answer (A), (B) and (C).

E5. GATE MA · NAT Let $C$ be the helix $\mathbf{r}(t)=(\cos t,\sin t,t)$, $0\le t\le\pi$. The value of $\displaystyle\int_Cy\,dx-x\,dy+z\,dz$ is ______ (correct to two decimal places).

Substitute $y\,dx=\sin t(-\sin t)\,dt$, $-x\,dy=-\cos t\cos t\,dt$, $z\,dz=t\,dt$. The integrand is $-1+t$.
Integrate $\int_0^\pi(t-1)\,dt=\dfrac{\pi^2}{2}-\pi\approx4.9348-3.1416=1.7932$. (The field $(y,-x,z)$ is not conservative, so no shortcut through a potential is available.)
Answer $1.79$ (accept $1.78$ to $1.80$).

E6. GATE MA · NAT Let $f(x,y,z)=x^2y-3yz+z^3$. The directional derivative of $f$ at $P=(1,2,-1)$ in the direction from $P$ towards $Q=(2,4,0)$ is ______ (correct to two decimal places).

Gradient $\nabla f=\left(2xy,\ x^2-3z,\ -3y+3z^2\right)=(4,\ 4,\ -3)$ at $P$.
Direction $\overrightarrow{PQ}=(1,2,1)$, $|\overrightarrow{PQ}|=\sqrt6$, so $D_{\mathbf{u}}f=\dfrac{4+8-3}{\sqrt6}=\dfrac{9}{\sqrt6}=\dfrac{3\sqrt6}{2}\approx3.674$. (Not normalising the direction gives the wrong value $9$.)
Answer $3.67$ (accept $3.66$ to $3.68$).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Fields, gradient, divergence and curl. Definitions 2.1–2.3; Theorem 2.1 with Example 1 (draw the isothermal ellipsoid and the gradient at $P$). Project Interactive 1: source, rotation, then shear — ask the class to predict the sign of the curl before revealing it. Theorem 2.2 (proof of (a), (b) on the board), Theorem 2.3(2)–(4), Theorem 2.4, Example 2.
  2. Line integrals. Example 3 as a quick-fire class discussion. Definitions 2.5–2.7, Theorem 2.5 with the substitution proof, Examples 4 and 5. Ask: "the three answers in Example 5 differ — what property of $\mathbf{F}$ would make them agree?"
  3. Conservative fields. Theorems 2.6–2.8 (the construction of the potential in Theorem 2.7 carefully), the simply connected examples (bring a rubber band and a ball), Theorem 2.9 with its proof, the strategy box, Examples 6 and 7, Interactive 2 in vortex mode. Finish with GATE corner E3 and E4 done live.

Discussion questions. (1) A curl-free field on $\mathbb{R}^3$ minus the unit circle — must it be conservative? (No: think of the magnetic field of a current loop.) (2) Why does the potential in Theorem 2.7 need the domain to be open, and its uniqueness need it to be connected? (3) A river flows faster in the middle than at the banks. Where does a floating paddle wheel spin, and which way?

Misconceptions to watch for. "Curl measures how curved the stream lines are"; "$P_y=Q_x$ always means conservative"; "$\mathbb{R}^3\setminus\{0\}$ has a hole, so it is not simply connected"; writing $\mathbf{F}\times\nabla f$ for $\nabla f\times\mathbf{F}$; forgetting $|\mathbf{r}'(t)|$ in $\int f\,ds$; not normalising the direction vector in a directional derivative.

Suggested homework. I(1, 3, 4, 8), II(3, 4, 5), III(2, 3, 5, 7), IV(1, 4, 5, 6, 8); GATE corner E1, E2, E5, E6.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. A weather service measures winds at a ring of stations around a developing storm. How well does the circulation around the ring, divided by the enclosed area, estimate the storm's vorticity (the vertical component of the curl of the wind field)?

Why it matters. Relative vorticity $\zeta=\partial v/\partial x-\partial u/\partial y$ is the quantity forecasters watch when tropical cyclones form over the Bay of Bengal, the Caribbean or the western Pacific, and it is estimated from scattered observations exactly as the definition of curl suggests — circulation per unit area. The same calculation is used for ocean eddies from drifting buoys and for vortices behind wind turbines.

What to do.

  1. Model the storm as a Rankine vortex centred at the origin, with core radius $R=30$ km and maximum wind $V=50$ m/s at $r=R$: the velocity is the rigid rotation $\tfrac VR(-y,x)$ for $r\le R$ and the vortex $VR\,(-y,x)/r^2$ for $r\ge R$. Compute its scalar curl in both regions.
  2. Place $N$ stations at the vertices of a regular polygon inscribed in a circle of radius $\rho$ about a point $\mathbf{c}$. Estimate the circulation by the trapezoidal rule on each edge (average the tangential wind at the two end stations, times the edge length).
  3. Divide by (a) the area $\pi\rho^2$ of the circle and (b) the area of the polygon. Compare with the exact average vorticity over the polygon, for $N=4,6,12$ and several $\rho$, both with $\mathbf{c}$ inside the core and with the ring entirely outside it.
  4. Add $5\%$ random noise to each station's wind and repeat. Which design (small ring, many stations…) is most robust?

Tools: Python with numpy (or a spreadsheet); a plot of estimate against $\rho$.

Hand in: a one-page note with your table of estimates, a plot, and a recommendation for the station layout.

Going further. Read about Kelvin's circulation theorem (circulation round a loop moving with an ideal fluid is constant) and about why a ring of stations that encloses the core always measures the same circulation $2\pi VR$, whatever its radius.

Instructor note: inside the core the field is linear, so the trapezoidal rule is exact on each edge and the polygon circulation is $2\tfrac VR\times$(polygon area): dividing by the polygon area gives the exact vorticity $2V/R\approx3.3\times10^{-3}\ \text{s}^{-1}$, while dividing by the circle area underestimates it by the factor $\tfrac{N\sin(2\pi/N)}{2\pi}$ ($0.64$, $0.83$, $0.95$ for $N=4,6,12$). A ring enclosing the whole core measures (up to quadrature error) circulation $2\pi VR$ for every radius, because the field is curl-free outside the core; the "vorticity" estimate then falls like $1/\rho^2$ — the classic lesson that circulation is a property of the loop, curl a property of the point.

🧪 Self-check quiz

0/5 correct

Q1. For every $C^2$ scalar field $f$ on $\mathbb{R}^3$, $\nabla\times(\nabla f)$ is

Q2. For $\mathbf{r}=(x,y,z)$, the divergence $\nabla\cdot\mathbf{r}$ equals

Q3. Which of these domains is simply connected?

Q4. If $\mathbf{F}=\nabla f$ with $f\in C^1(\mathbb{R}^3)$ and $C$ is a closed path, then $\oint_C\mathbf{F}\cdot d\mathbf{r}$

Q5. For $\mathbf{F}=(-y,x)/(x^2+y^2)$, the circulation around the circle $x^2+y^2=25$, counterclockwise, is