Tutorials › Calculus III › Why the Basic Curl and Divergence Identities Hold

Curl and Divergence · Tutorial 909 of 999

Why the Basic Curl and Divergence Identities Hold

Learn to prove the two basic curl and divergence identities by matching mixed partial derivatives, and to recognize when their smoothness assumptions apply.

Advanced 9 min read

What You'll Learn

  • Write the Cartesian component formulas for the gradient, curl, and divergence.
  • State the continuity hypotheses that allow mixed partial derivatives to commute.
  • Prove that the divergence of a curl is zero by grouping matching terms.
  • Prove that the curl of a gradient is zero component by component.
  • Verify both identities on explicit polynomial and smooth vector fields.
  • Identify a sign error that can hide the cancellation.

Why These Identities Are More Than a Calculation

Two useful identities in vector calculus say that the divergence of a curl is zero, and the curl of a gradient is zero. They are easy to remember as formulas, but their validity depends on a specific reason: after the operators are expanded into Cartesian components, the terms cancel in pairs because continuous mixed partial derivatives agree.

The continuity condition matters. If the required second partial derivatives are not continuous near the point under consideration, equality of the mixed partials is not guaranteed by the standard theorem. The identities are therefore statements about sufficiently smooth fields, not unrestricted algebraic rules.

Central result: If a vector field \(\mathbf{F}\) has continuous second-order partial derivatives on an open set, then \(\nabla\cdot(\nabla\times\mathbf{F})=0\) there. If a scalar function \(f\) has continuous second-order partial derivatives on an open set, then \(\nabla\times(\nabla f)=\mathbf{0}\) there.

Cartesian Component Formulas

Let \(U\) be an open subset of \(\mathbb{R}^3\), and let \(\mathbf{F}:U\to\mathbb{R}^3\) have components \(P,Q,R\), so \(\mathbf{F}=(P,Q,R)\). The divergence is the sum of the partial derivative of each component with respect to its corresponding coordinate. The curl is the vector field formed from the indicated cross-partial differences:

$$ \nabla\cdot\mathbf{F}=P_x+Q_y+R_z, \qquad \nabla\times\mathbf{F} = \left(R_y-Q_z,\;P_z-R_x,\;Q_x-P_y\right). $$

For a scalar function \(f:U\to\mathbb{R}\), its gradient is \(\nabla f=(f_x,f_y,f_z)\). Applying the curl to this vector field produces three differences of second partial derivatives. Subscripts denote partial differentiation; for example, \(R_{yx}\) means first differentiate \(R\) with respect to \(y\), then with respect to \(x\).

Definition: A function is \(C^2\) on an open set if all of its partial derivatives of orders one and two exist and are continuous there. A vector field is \(C^2\) if each of its component functions is \(C^2\).

The equality of mixed partial derivatives used below is Clairaut’s theorem: if the second partial derivatives in question are continuous near a point, then the two orders of differentiation agree at that point. In particular, for a \(C^2\) function \(g\), \(g_{xy}=g_{yx}\), and the same applies to any pair of coordinate variables.

Worked Example: A Polynomial Vector Field

Worked Example: A Polynomial Vector Field

Take \(\mathbf{F}=(x^2y+z,\;y^2z+x,\;z^2x+y)\). Its components are polynomials, so all their second partial derivatives are continuous. First compute the curl:

$$ \begin{aligned} \nabla\times\mathbf{F} &=\left(R_y-Q_z,\;P_z-R_x,\;Q_x-P_y\right)\\ &=\left(1-y^2,\;1-z^2,\;1-x^2\right). \end{aligned} $$

Here \(R_y=1\), \(Q_z=y^2\), \(P_z=1\), \(R_x=z^2\), \(Q_x=1\), and \(P_y=x^2\). Now take the divergence of this curl:

$$ \begin{aligned} \nabla\cdot(\nabla\times\mathbf{F}) &=\frac{\partial}{\partial x}(1-y^2) +\frac{\partial}{\partial y}(1-z^2) +\frac{\partial}{\partial z}(1-x^2)\\ &=0+0+0=0. \end{aligned} $$

The result agrees with the identity. Each component of the curl is independent of the coordinate used to differentiate it in the divergence.

Proof: The Divergence of a Curl

The example illustrates the result for one field. To prove it in general, write the curl in components and apply the definition of divergence. This exposes the six second partial derivatives and makes the cancellations visible.

Theorem: Suppose \(\mathbf{F}=(P,Q,R)\) is \(C^2\) on an open set \(U\subseteq\mathbb{R}^3\). Then \(\nabla\cdot(\nabla\times\mathbf{F})=0\) at every point of \(U\).
1
Write the curl.
Its components are \(R_y-Q_z\), \(P_z-R_x\), and \(Q_x-P_y\).
2
Apply the divergence.
Differentiate the first component in \(x\), the second in \(y\), and the third in \(z\).
3
Pair the mixed partials.
Use continuity of the second partial derivatives to cancel each pair.

In full, the computation is

$$ \begin{aligned} \nabla\cdot(\nabla\times\mathbf{F}) &=\frac{\partial}{\partial x}(R_y-Q_z) +\frac{\partial}{\partial y}(P_z-R_x) +\frac{\partial}{\partial z}(Q_x-P_y)\\ &=R_{yx}-Q_{zx}+P_{zy}-R_{xy}+Q_{xz}-P_{yz}\\ &=(R_{yx}-R_{xy})+(Q_{xz}-Q_{zx})+(P_{zy}-P_{yz})\\ &=0+0+0=0. \end{aligned} $$

The last equality uses \(R_{yx}=R_{xy}\), \(Q_{xz}=Q_{zx}\), and \(P_{zy}=P_{yz}\). Each equality follows from Clairaut’s theorem because \(P,Q,R\) have continuous second partial derivatives. Thus every term cancels with the derivative of the same component taken in the opposite order. This proves the identity at every point of \(U\).

Worked Example: A Smooth Trigonometric Field

Worked Example: A Smooth Trigonometric Field

Let \(\mathbf{F}=(e^x\sin y,\;e^y\sin z,\;e^z\sin x)\). The exponential and trigonometric functions have continuous derivatives of every order, so the theorem applies. Its curl is

$$ \begin{aligned} \nabla\times\mathbf{F} &=\left( \frac{\partial}{\partial y}(e^z\sin x)-\frac{\partial}{\partial z}(e^y\sin z),\; \frac{\partial}{\partial z}(e^x\sin y)-\frac{\partial}{\partial x}(e^z\sin x),\; \frac{\partial}{\partial x}(e^y\sin z)-\frac{\partial}{\partial y}(e^x\sin y) \right)\\ &=\left(-e^y\cos z,\;-e^z\cos x,\;-e^x\cos y\right). \end{aligned} $$

For example, the first component is \(0-e^y\cos z\), since \(e^z\sin x\) is independent of \(y\), while the derivative of \(e^y\sin z\) with respect to \(z\) is \(e^y\cos z\). Now take the divergence:

$$ \begin{aligned} \nabla\cdot(\nabla\times\mathbf{F}) &=\frac{\partial}{\partial x}(-e^y\cos z) +\frac{\partial}{\partial y}(-e^z\cos x) +\frac{\partial}{\partial z}(-e^x\cos y)\\ &=0+0+0=0. \end{aligned} $$

Each term is zero because the corresponding curl component does not depend on the variable differentiated in the divergence. Substituting the computed curl into the divergence therefore verifies the identity directly.

Proof: The Curl of a Gradient

For a scalar function, the same cancellation occurs in a different arrangement. The gradient places the first partial derivatives into a vector; taking its curl compares the mixed second derivatives in pairs.

Theorem: Suppose \(f:U\to\mathbb{R}\) is \(C^2\) on an open set \(U\subseteq\mathbb{R}^3\). Then \(\nabla\times(\nabla f)=\mathbf{0}\) at every point of \(U\).

Starting from \(\nabla f=(f_x,f_y,f_z)\), use the component definition of curl:

$$ \begin{aligned} \nabla\times(\nabla f) &=\left( \frac{\partial f_z}{\partial y}-\frac{\partial f_y}{\partial z},\; \frac{\partial f_x}{\partial z}-\frac{\partial f_z}{\partial x},\; \frac{\partial f_y}{\partial x}-\frac{\partial f_x}{\partial y} \right)\\ &=\left(f_{zy}-f_{yz},\;f_{xz}-f_{zx},\;f_{yx}-f_{xy}\right)\\ &=(0,0,0). \end{aligned} $$

Since \(f\) is \(C^2\), Clairaut’s theorem gives \(f_{zy}=f_{yz}\), \(f_{xz}=f_{zx}\), and \(f_{yx}=f_{xy}\). Each component is consequently a difference of equal quantities, proving the result.

Worked Example: The Curl of an Explicit Gradient

Worked Example: The Curl of an Explicit Gradient

Let \(f(x,y,z)=x^2y+y^2z+z^2x\). This polynomial is \(C^2\). Its gradient is

$$ \nabla f = \left(2xy+z^2,\;x^2+2yz,\;y^2+2zx\right). $$

To check its curl, calculate each component using the stated order:

$$ \begin{aligned} \nabla\times(\nabla f) &=\left( \frac{\partial}{\partial y}(y^2+2zx)-\frac{\partial}{\partial z}(x^2+2yz),\; \frac{\partial}{\partial z}(2xy+z^2)-\frac{\partial}{\partial x}(y^2+2zx),\; \frac{\partial}{\partial x}(x^2+2yz)-\frac{\partial}{\partial y}(2xy+z^2) \right)\\ &=(2y-2y,\;2z-2z,\;2x-2x)\\ &=(0,0,0). \end{aligned} $$

For instance, the first component compares the \(y\)-derivative of the third gradient component, \(2y\), with the \(z\)-derivative of the second, also \(2y\). The other two components likewise subtract equal values. Substitution into the curl formula confirms the identity.

What the Hypotheses Do—and a Common Sign Error

The identities are pointwise statements on the open set where the relevant functions are \(C^2\). The openness ensures that the partial derivatives are considered at interior points, and continuity of the second partials supplies the mixed-partial equalities used in the proofs. In particular, it is not enough to say that the symbols look like repeated derivatives: the two orders must be known to agree.

A frequent error is to write the second component of the curl as \(R_x-P_z\) instead of \(P_z-R_x\). That reverses a sign and disrupts the cancellation. For example, if this incorrect component is used when computing the divergence of a general curl, the \(P\)-terms become

$$ -P_{zy}-P_{yz}, $$

rather than the correct difference \(P_{zy}-P_{yz}\). Equal mixed partials would make the incorrect expression \(-2P_{yz}\), not zero. The correction is to use the Cartesian curl formula consistently:

$$ \nabla\times\mathbf{F} = \left(R_y-Q_z,\;P_z-R_x,\;Q_x-P_y\right). $$

The cancellation is between equal mixed derivatives with opposite signs. It is not a claim that each second derivative vanishes on its own.

Why the Identities Matter

These formulas provide a reliable structural check on vector-calculus work. If a sufficiently smooth field is computed as a curl, its divergence must be zero; if a sufficiently smooth scalar function is differentiated to form a gradient, that gradient must have zero curl. A nonzero result in either case signals an error in differentiation, component order, or signs.

The proofs also show exactly why smoothness is part of the result. The operator formulas alone do not force cancellation; cancellation follows because the relevant second partial derivatives exist, are continuous, and agree when their order is switched. Keeping that reason in view makes the identities easier to apply correctly.

Check Your Understanding

For each question, use the component definitions and state which mixed-partial equality is needed.

  1. For \(\mathbf{F}=(P,Q,R)\), write the three components of \(\nabla\times\mathbf{F}\).
  2. Expand \(\nabla\cdot(\nabla\times\mathbf{F})\) into six second partial derivatives, then group the terms that cancel.
  3. What continuity condition is sufficient to apply the mixed-partial equalities in the two identities?
  4. For \(\nabla f=(f_x,f_y,f_z)\), write the three components of \(\nabla\times(\nabla f)\).
  5. Explain why the incorrect curl component \(R_x-P_z\) can prevent the divergence-of-curl terms from cancelling.