$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# 16.5: Divergence and Curl

In this section, we examine two important operations on a vector field: divergence and curl. They are important to the field of calculus for several reasons, including the use of curl and divergence to develop some higher-dimensional versions of the Fundamental Theorem of Calculus. In addition, curl and divergence appear in mathematical descriptions of fluid mechanics, electromagnetism, and elasticity theory, which are important concepts in physics and engineering. We can also apply curl and divergence to other concepts we already explored. For example, under certain conditions, a vector field is conservative if and only if its curl is zero.

In addition to defining curl and divergence, we look at some physical interpretations of them, and show their relationship to conservative and source-free vector fields.

# Divergence

Divergence is an operation on a vector field that tells us how the field behaves toward or away from a point. Locally, the divergence of a vector field F in $$\mathbb{R}^2$$ or $$\mathbb{R}^3$$ at a particular point P is a measure of the “outflowing-ness” of the vector field at P. If F represents the velocity of a fluid, then the divergence of F at P measures the net rate of change with respect to time of the amount of fluid flowing away from P (the tendency of the fluid to flow “out of” P). In particular, if the amount of fluid flowing into P is the same as the amount flowing out, then the divergence at P is zero.

Definition: divergence in $$\mathbb{R}^3$$

If $$F = \langle P,Q,R \rangle$$ is a vector field in $$\mathbb{R}^3$$ and $$P_x, \, Q_y,$$ and $$R_z$$ all exist, then the divergence of F is defined by

\begin{align} div \, F &= P_x + Q_y + R_z \\[5pt] &= \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z}. \end{align}

Note the divergence of a vector field is not a vector field, but a scalar function. In terms of the gradient operator

$\nabla = \langle \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z} \rangle$

divergence can be written symbolically as the dot product

$div \, F = \nabla \cdot F.$

Note this is merely helpful notation, because the dot product of a vector of operators and a vector of functions is not meaningfully defined given our current definition of dot product.

If $$F = \langle P,Q \rangle$$ is a vector field in $$\mathbb{R}^2$$, and $$P_x$$ and $$Q_y$$ both exist, then the divergence of F is defined similarly as

\begin{align} div \, F &= P_x + Q_y \\[5pt] &= \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} \\[5pt] &= \nabla \cdot F. \end{align}

To illustrate this point, consider the two vector fields in Figure $$\PageIndex{1}$$. At any particular point, the amount flowing in is the same as the amount flowing out, so at every point the “outflowing-ness” of the field is zero. Therefore, we expect the divergence of both fields to be zero, and this is indeed the case, as

$div (\langle 1,2 \rangle ) = \frac{\partial}{\partial x} (1) + \frac{\partial}{\partial y}(2) = 0$

and

$div (\langle -y,x \rangle ) = \frac{\partial}{\partial x} (-y) + \frac{\partial}{\partial y} (x) = 0.$

Figure $$\PageIndex{1}$$: (a) Vector field $$\langle 1,2 \rangle$$ has zero divergence. (b) Vector field $$\langle -y,x \rangle$$ also has zero divergence.

By contrast, consider radial vector field $$R (x,y) = \langle -x, -y \rangle$$ in Figure $$\PageIndex{2}$$. At any given point, more fluid is flowing in than is flowing out, and therefore the “outgoingness” of the field is negative. We expect the divergence of this field to be negative, and this is indeed the case, as

$div (R) = \frac{\partial}{\partial x} (-x) + \frac{\partial}{\partial y} (-y) = -2.$

Figure $$\PageIndex{2}$$: This vector field has negative divergence.

To get a global sense of what divergence is telling us, suppose that a vector field in $$\mathbb{R}^2$$ represents the velocity of a fluid. Imagine taking an elastic circle (a circle with a shape that can be changed by the vector field) and dropping it into a fluid. If the circle maintains its exact area as it flows through the fluid, then the divergence is zero. This would occur for both vector fields in Figure $$\PageIndex{1}$$. On the other hand, if the circle’s shape is distorted so that its area shrinks or expands, then the divergence is not zero. Imagine dropping such an elastic circle into the radial vector field in Figure $$\PageIndex{2}$$ so that the center of the circle lands at point $$(3, 3)$$. The circle would flow toward the origin, and as it did so the front of the circle would travel more slowly than the back, causing the circle to “scrunch” and lose area. This is how you can see a negative divergence.

Example $$\PageIndex{1}$$: Calculating Divergence at a Point

If $$F(x,y,z) = e^x\hat{i} + yz \hat{j} - y^2 \hat{k}$$, then find the divergence of F at $$(0,2,-1)$$.

Solution

The divergence of F is

$\frac{\partial}{\partial x} (e^x) + \frac{\partial}{\partial y}(yz) - \frac{\partial}{\partial z} (y z^2) = e^x + z - 2yz. \nonumber$

Therefore, the divergence at $$(0,2,-1)$$ is $$e^0 - 1 + 4 = 4$$. If F represents the velocity of a fluid, then more fluid is flowing out than flowing in at point $$(0,2,-1)$$.

Exercise $$\PageIndex{1}$$

Find $$div \, F$$ for

$F(x,y,z) = \langle xy, \, 5-z^2, \, x^2 + y^2 \rangle \nonumber.$

Hint

Follow Example $$\PageIndex{1}$$.

$$y - z^2$$

One application for divergence occurs in physics, when working with magnetic fields. A magnetic field is a vector field that models the influence of electric currents and magnetic materials. Physicists use divergence in Gauss’s law for magnetism, which states that if B is a magnetic field, then $$\nabla \cdot B = 0$$; in other words, the divergence of a magnetic field is zero.

Example $$\PageIndex{2}$$: Determining Whether a Field Is Magnetic

Is it possible for $$F (x,y) = \langle x^2 y, \, y - xy^2 \rangle$$ to be a magnetic field?

Solution

If F were magnetic, then its divergence would be zero. The divergence of F is

$\frac{\partial}{\partial x} (x^2y) + \frac{\partial}{\partial y} (y - xy^2) = 2 xy + 1 - 2 xy = 1 \nonumber$

and therefore F cannot model a magnetic field (Figure $$\PageIndex{3}$$).

Figure $$\PageIndex{3}$$: The divergence of vector field $$F (x,y) = \langle x^2 y, \, y - xy^2 \rangle$$ is one, so it cannot model a magnetic field.

​​​​​Another application for divergence is detecting whether a field is source free. Recall that a source-free field is a vector field that has a stream function; equivalently, a source-free field is a field with a flux that is zero along any closed curve. The next two theorems say that, under certain conditions, source-free vector fields are precisely the vector fields with zero divergence.

Theorem: Divergence of a Source-Free Vector Field

If $$F = \langle P,Q \rangle$$ is a source-free continuous vector field with differentiable component functions, then $$div \, F = 0$$.

Proof

Since F is source free, there is a function $$g(x,y)$$ with $$g_y = P$$ and $$-g_x = Q$$. Therefore, $$F = \langle g_y, -g_x \rangle$$ and $$div \, F = g_{yx} - g_{xy} = 0$$ by Clairaut’s theorem.

$$\square$$

The converse of Divergence of a Source-Free Vector Field is true on simply connected regions, but the proof is too technical to include here. Thus, we have the following theorem, which can test whether a vector field in $$\mathbb{R}^2$$ is source free.

Theorem: Divergence Test for Source-Free Vector Fields

Let $$F = \langle P,Q \rangle$$ be a continuous vector field with differentiable component functions with a domain that is simply connected. Then, $$div \, F = 0$$ if and only if F is source free.

Example $$\PageIndex{3}$$: Determining Whether a Field Is Source Free

Is field $$F (x,y) = \langle x^2 y, \, 5 - xy^2 \rangle$$ source free?

Solution

Note the domain of F is $$\mathbb{R}^2$$ which is simply connected. Furthermore, F is continuous with differentiable component functions. Therefore, we can use the Divergence Test for Source-Free Vector Fields to analyze F. The divergence of F is

$\frac{\partial}{\partial x} (x^2 y) + \frac{\partial}{\partial y} (5 - xy^2 ) = 2xy - 2xy = 0. \nonumber$

Therefore, F is source free by the Divergence Test for Source-Free Vector Fields.

Exercise $$\PageIndex{2}$$

Let $$F (x,y) = \langle -ay, bx \rangle$$ be a rotational field where $$a$$ and $$b$$ are positive constants. Is F source free?

Hint

Calculate the divergence.

Yes

Recall that the flux form of Green’s theorem says that

$\oint_C F \cdot N ds = \iint_D P_x + Q_y dA,$

where C is a simple closed curve and D is the region enclosed by C. Since $$P_x + Q_y = div \, F$$, Green’s theorem is sometimes written as

$\oint_C F \cdot Nds = \iint_D div \, F dA.$

Therefore, Green’s theorem can be written in terms of divergence. If we think of divergence as a derivative of sorts, then Green’s theorem says the “derivative” of F on a region can be translated into a line integral of F along the boundary of the region. This is analogous to the Fundamental Theorem of Calculus, in which the derivative of a function $$f$$ on a line segment $$[a,b]$$ can be translated into a statement about $$f$$ on the boundary of $$[a,b]$$. Using divergence, we can see that Green’s theorem is a higher-dimensional analog of the Fundamental Theorem of Calculus.

We can use all of what we have learned in the application of divergence. Let v be a vector field modeling the velocity of a fluid. Since the divergence of v at point P measures the “outflowing-ness” of the fluid at P, $$div \, v(P) > 0$$ implies that more fluid is flowing out of P than flowing in. Similarly, $$div \, v(P) < 0$$ implies the more fluid is flowing in to P than is flowing out, and $$div \, v(P) = 0$$ implies the same amount of fluid is flowing in as flowing out.

Example $$\PageIndex{4}$$: Determining Flow of a Fluid

Suppose $$v(x,y) = \langle -xy,y \rangle, \, y > 0$$ models the flow of a fluid. Is more fluid flowing into point $$(1,4)$$ than flowing out?

Solution

To determine whether more fluid is flowing into $$(1,4)$$ than is flowing out, we calculate the divergence of v at $$(1,4)$$:

$div(v) = \frac{\partial}{\partial x} (-xy) + \frac{\partial}{\partial y} (y) = -y + 1. \nonumber$

To find the divergence at $$(1,4)$$ substitute the point into the divergence: $$-4 + 1 = -3$$. Since the divergence of v at $$(1,4)$$ is negative, more fluid is flowing in than flowing out (Figure $$\PageIndex{4}$$).

Figure $$\PageIndex{4}$$: Vector field $$v(x,y) = \langle -xy, y \rangle$$ has negative divergence at $$(1,4)$$

Exercise $$\PageIndex{3}$$

For vector field $$v(x,y) = \langle -xy, y \rangle , \, y > 0$$, find all points P such that the amount of fluid flowing in to P equals the amount of fluid flowing out of P.

Hint

Find where the divergence is zero.

All points on line $$y = 1$$.

# Curl

The second operation on a vector field that we examine is the curl, which measures the extent of rotation of the field about a point. Suppose that F represents the velocity field of a fluid. Then, the curl of F at point P is a vector that measures the tendency of particles near P to rotate about the axis that points in the direction of this vector. The magnitude of the curl vector at P measures how quickly the particles rotate around this axis. In other words, the curl at a point is a measure of the vector field’s “spin” at that point. Visually, imagine placing a paddlewheel into a fluid at P, with the axis of the paddlewheel aligned with the curl vector (Figure $$\PageIndex{5}$$). The curl measures the tendency of the paddlewheel to rotate.

Figure $$\PageIndex{5}$$: To visualize curl at a point, imagine placing a small paddlewheel into the vector field at a point.

Consider the vector fields in Figure $$\PageIndex{1}$$. In part (a), the vector field is constant and there is no spin at any point. Therefore, we expect the curl of the field to be zero, and this is indeed the case. Part (b) shows a rotational field, so the field has spin. In particular, if you place a paddlewheel into a field at any point so that the axis of the wheel is perpendicular to a plane, the wheel rotates counterclockwise. Therefore, we expect the curl of the field to be nonzero, and this is indeed the case (the curl is $$2k$$).

To see what curl is measuring globally, imagine dropping a leaf into the fluid. As the leaf moves along with the fluid flow, the curl measures the tendency of the leaf to rotate. If the curl is zero, then the leaf doesn’t rotate as it moves through the fluid.

Definition: Curl

If $$F = \langle P,Q,R \rangle$$ is a vector field in $$\mathbb{R}^3$$, and $$P_x, \, Q_y$$, and $$R_z$$ all exist, then the curl of F is defined by

\begin{align} curl \, F &= (R_y - Q_z) i + (P_z - R_x) j + (Q_x - P_y) k\\ &= \left( \frac{\partial R}{\partial y} - \frac{\partial Q}{\partial z} \right) i + \left( \frac{\partial P}{\partial z} - \frac{\partial R}{\partial x} \right) j + \left( \frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y} \right) k. \end{align}

Note that the curl of a vector field is a vector field, in contrast to divergence.

The definition of curl can be difficult to remember. To help with remembering, we use the notation $$\nabla \times F$$ to stand for a “determinant” that gives the curl formula:

$\begin{vmatrix} i & j & k \nonumber \\ \frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \nonumber \\ P & Q & R \end{vmatrix}.$

The determinant of this matrix is

$(R_y - Q_z)i - (R_x - P_z)j + (Q_x - P_y)k = (R_y - Q_z)i + (P_z - R_x)j + (Q_x - P_y)k = curl \, F.$

Thus, this matrix is a way to help remember the formula for curl. Keep in mind, though, that the word determinant is used very loosely. A determinant is not really defined on a matrix with entries that are three vectors, three operators, and three functions.

If $$F = \langle P,Q \rangle$$ is a vector field in $$\mathbb{R}^2$$, then the curl of F, by definition, is

$curl \, F = (Q_x - P_y)k = \left(\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y} \right)k.$

Example $$\PageIndex{5}$$: Finding the Curl of a Three-Dimensional Vector Field

Find the curl of $$F(P,Q,R) = \langle x^2 z, e^y + xz, xyz \rangle$$.

Solution

The curl is

\begin{align*} curl \, f &= \nabla \times F \\&= \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \nonumber \\ \partial/\partial x & \partial/\partial y & \partial / \partial z \nonumber \\ P & Q & R \end{vmatrix} \\ &= (R_y - Q_z)\hat{i} + (P_z - R_x)\hat{j} + (Q_x - P_y)\hat{k} \\ &= (xz - x)\hat{i} + (x^2 - yz)\hat{j} + z \hat{k}. \end{align*}

Exercise $$\PageIndex{4}$$

Find the curl of $$F = \langle \sin x \, \cos z, \, \sin y \, \sin z, \, \cos x \, \cos y \rangle$$ at point $$\left(0, \frac{\pi}{2}, \frac{\pi}{2} \right)$$.

Hint

Find the determinant of matrix $$\nabla \times F$$.

$$-\hat{i}$$

Example $$\PageIndex{6}$$: Finding the Curl of a Two-Dimensional Vector Field

Find the curl of $$F = \langle P,Q \rangle = \langle y,0\rangle$$.

Solution

Notice that this vector field consists of vectors that are all parallel. In fact, each vector in the field is parallel to the x-axis. This fact might lead us to the conclusion that the field has no spin and that the curl is zero. To test this theory, note that

$curl \, F = (Q_x - P_y)k = -k \neq 0.$

Therefore, this vector field does have spin. To see why, imagine placing a paddlewheel at any point in the first quadrant (Figure $$\PageIndex{6}$$). The larger magnitudes of the vectors at the top of the wheel cause the wheel to rotate. The wheel rotates in the clockwise (negative) direction, causing the coefficient of the curl to be negative.

Figure $$\PageIndex61}$$: Vector field $$F(x,y) = \langle y,0\rangle$$ consists of vectors that are all parallel.

Note that if $$F = \langle P,Q\rangle$$ is a vector field in a plane, then $$curl \, F \cdot k = (Q_x - P_y)k \cdot k = Q_x - P_y$$. Therefore, the circulation form of Green’s theorem is sometimes written as

$\oint_C F \cdot dr = \iint_D curl \, F \cdot kdA,$

where C is a simple closed curve and D is the region enclosed by C. Therefore, the circulation form of Green’s theorem can be written in terms of the curl. If we think of curl as a derivative of sorts, then Green’s theorem says that the “derivative” of F on a region can be translated into a line integral of F along the boundary of the region. This is analogous to the Fundamental Theorem of Calculus, in which the derivative of a function $$f$$ on line segment $$[a,b]$$ can be translated into a statement about $$f$$ on the boundary of $$[a,b]$$. Using curl, we can see the circulation form of Green’s theorem is a higher-dimensional analog of the Fundamental Theorem of Calculus.

We can now use what we have learned about curl to show that gravitational fields have no “spin.” Suppose there is an object at the origin with mass $$m_1$$ at the origin and an object with mass $$m_2$$. Recall that the gravitational force that object 1 exerts on object 2 is given by field

$[F(x,y,z) = - Gm_1m_2 \left\langle \frac{x}{(x^2 + y^2 + z^2 )^{3/2}}, \frac{y}{(x^2 + y^2 + z^2 )^{3/2}}, \frac{z}{(x^2 + y^2 + z^2 )^{3/2}}\right\rangle.$

Example $$\PageIndex{7}$$: Determining the Spin of a Gravitational Field

Show that a gravitational field has no spin.

Solution

To show that F has no spin, we calculate its curl. Let $$P(x,y,z) = \frac{x}{(x^2 + y^2 + z^2 )^{3/2}}$$, $$Q(x,y,z) = \frac{y}{(x^2 + y^2 + z^2 )^{3/2}}$$, and $$R(x,y,z) = \frac{z}{(x^2 + y^2 + z^2 )^{3/2}}$$. Then,

\begin{align*} curl \, F &= - Gm_1m_2 [(R_y - Q_z)i + (P_z - R_x)j + (Q_x - P_y)k] \\ &= - Gm_1m_2 \begin{pmatrix} \left(\frac{-3yz}{(x^2 + y^2 + z^2 )^{5/2}} - \left(\frac{-3yz}{(x^2 + y^2 + z^2 )^{5/2}} \right) \right) \hat{i} \nonumber \\[5pt] + \left(\frac{-3xz}{(x^2 + y^2 + z^2 )^{5/2}} - \left(\frac{-3xz}{(x^2 + y^2 + z^2 )^{5/2}} \right) \right) \hat{j} \nonumber \\[5pt] + \left(\frac{-3xy}{(x^2 + y^2 + z^2 )^{5/2}} - \left(\frac{-3xy}{(x^2 + y^2 + z^2 )^{5/2}} \right) \right) \hat{k} \end{pmatrix} \\ &= 0. \end{align*}

Since the curl of the gravitational field is zero, the field has no spin.

Exercise $$\PageIndex{7}$$

Field $$v(x,y) = \langle - \frac{y}{x^2+y^2}, \frac{x}{x^2+y^2} \rangle$$ models the flow of a fluid. Show that if you drop a leaf into this fluid, as the leaf moves over time, the leaf does not rotate.

Hint

Calculate the curl.

$$curl \, v = 0$$

# Using Divergence and Curl

Now that we understand the basic concepts of divergence and curl, we can discuss their properties and establish relationships between them and conservative vector fields.

If F is a vector field in $$\mathbb{R}^3$$ then the curl of F is also a vector field in $$\mathbb{R}^3$$. Therefore, we can take the divergence of a curl. The next theorem says that the result is always zero. This result is useful because it gives us a way to show that some vector fields are not the curl of any other field. To give this result a physical interpretation, recall that divergence of a velocity field v at point P measures the tendency of the corresponding fluid to flow out of P. Since $$div \, curl \, (v) = 0$$, the net rate of flow in vector field curl(v) at any point is zero. Taking the curl of vector field F eliminates whatever divergence was present in F.

Theorem: Divergence of the Curl

Let $$F = \langle P,Q,R \rangle$$ be a vector field in $$\mathbb{R}^3$$ such that the component functions all have continuous second-order partial derivatives. Then,

$div \, curl \, (F) = \nabla \cdot (\nabla \times F) = 0.$

Proof

By the definitions of divergence and curl, and by Clairaut’s theorem,

\begin{align*} div \, curl \, F &= div [(R_y - Q_z)i + (P_z - R_x)j + (Q_x - P_y)k] \\ &= R_{yx} - Q_{xz} + P_{yz} - R_{yx} + Q_{zx} - P_{zy}\\ &= 0. \end{align*}

$$\Box$$

Example $$\PageIndex{8}$$: Showing That a Vector Field Is Not the Curl of Another

Show that $$F(x,y,z) = e^xi + yzj + xz^2k$$ is not the curl of another vector field. That is, show that there is no other vector G with $$curl \, G = F$$.

Solution

Notice that the domain of F is all of $$\mathbb{R}^3$$ and the second-order partials of F are all continuous. Therefore, we can apply the previous theorem to F.

The divergence of F is $$e^x + z + 2xz$$. If F were the curl of vector field G, then $$div \, F = div \, curl G = 0$$. But, the divergence of F is not zero, and therefore F is not the curl of any other vector field.

Exercise $$\PageIndex{8}$$

Is it possible for $$G(x,y,z) = \langle \sin x, \, \cos y, \, \sin (xyz)\rangle$$ to be the curl of a vector field?

Hint

Find the divergence of G.

No.

With the next two theorems, we show that if F is a conservative vector field then its curl is zero, and if the domain of F is simply connected then the converse is also true. This gives us another way to test whether a vector field is conservative.

Theorem: Curl of a Conservative Vector Field

If $$F = \langle P,Q,R\rangle$$ is conservative, then $$curl \, F = 0$$.

Proof

Since conservative vector fields satisfy the cross-partials property, all the cross-partials of F are equal. Therefore,

\begin{align*} curl \, F &= (R_y - Q_z)i + (P_z - R_x)j + (Q_x - P_y)k \\[5pt] &= 0. \end{align*}

$$\Box$$

The same theorem is true for vector fields in a plane.

Since a conservative vector field is the gradient of a scalar function, the previous theorem says that $$curl \, (\nabla f) = 0$$ for any scalar function $$f$$. In terms of our curl notation, $$\nabla \times \nabla (f) = 0$$. This equation makes sense because the cross product of a vector with itself is always the zero vector. Sometimes equation $$\nabla \times \nabla (f) = 0$$ is simplified as $$\nabla \times \nabla = 0$$.

Theorem: Curl Test for a Conservative Field

Let $$F = \langle P,Q,R\rangle$$ be a vector field in space on a simply connected domain. If $$curl \, F = 0$$, then F is conservative.

Proof

Since $$curl \, F = 0$$, we have that $$R_y = Q_z, \, P_z = R_x$$, and $$Q_x = P_y$$. Therefore, F satisfies the cross-partials property on a simply connected domain, and the Cross-Partial Property of Conservative Fields implies that F is conservative.

$$\Box$$

The same theorem is also true in a plane. Therefore, if F is a vector field in a plane or in space and the domain is simply connected, then F is conservative if and only if $$curl \, F = 0$$.

Example $$\PageIndex{9}$$: Testing Whether a Vector Field Is Conservative

Use the curl to determine whether $$F(x,y,z) = \langle yz, xz, xy\rangle$$ is conservative.

Solution

Note that the domain of F is all of $$\mathbb{R}^3$$ which is simply connected (Figure $$\Pageindex{7}$$). Therefore, we can test whether F is conservative by calculating its curl.

Figure $$\PageIndex{7}$$: The curl of vector field $$F(x,y,z) = \langle yz, xz, xy\rangle$$ is zero.

The curl of F is

$\left(\frac{\partial}{\partial y}xy - \frac{\partial}{\partial z} xz \right) i + \left(\frac{\partial}{\partial y}yz - \frac{\partial}{\partial z} xy \right) j + \left(\frac{\partial}{\partial y}xz - \frac{\partial}{\partial z} yz \right)k= (x - x)i + (y - y)j + (z - z)k = 0.$

Thus, F is conservative.

We have seen that the curl of a gradient is zero. What is the divergence of a gradient? If $$f$$ is a function of two variables, then $$div (\nabla f) = \nabla \cdot (\nabla f) = f_{xx} + f_{yy}$$. We abbreviate this “double dot product” as $$\nabla^2$$. This operator is called the Laplace operator, and in this notation Laplace’s equation becomes $$\nabla^2 f = 0$$. Therefore, a harmonic function is a function that becomes zero after taking the divergence of a gradient.

Similarly, if $$f$$ is a function of three variables then

$div (\nabla f) = \nabla \cdot (\nabla f) = f_{xx} + f_{yy} + f_{zz}.$

Using this notation we get Laplace’s equation for harmonic functions of three variables:

$\nabla^2 f = 0.$

Harmonic functions arise in many applications. For example, the potential function of an electrostatic field in a region of space that has no static charge is harmonic.

Example $$\PageIndex{10}$$: Finding a Potential Function

Is it possible for $$f(x,y) = x^2 + x - y$$ to be the potential function of an electrostatic field that is located in a region of $$\mathbb{R}^2$$ free of static charge?

Solution

If $$f$$ were such a potential function, then $$f$$ would be harmonic. Note that $$f_{xx} = 2$$ and $$f_{yy} = 0$$, and so $$f_{xx} + f_{yy} \neq 0$$. Therefore, $$f$$ is not harmonic and $$f$$ cannot represent an electrostatic potential.

Exercise $$\PageIndex{10}$$

Is it possible for function $$f(x,y) = x^2 - y^2 + x$$ to be the potential function of an electrostatic field located in a region of $$\mathbb{R}^2$$ free of static charge?

Hint

Determine whether the function is harmonic.

Yes.

# Key Concepts

• The divergence of a vector field is a scalar function. Divergence measures the “outflowing-ness” of a vector field. If v is the velocity field of a fluid, then the divergence of v at a point is the outflow of the fluid less the inflow at the point.
• The curl of a vector field is a vector field. The curl of a vector field at point P measures the tendency of particles at P to rotate about the axis that points in the direction of the curl at P.
• A vector field with a simply connected domain is conservative if and only if its curl is zero.

# Key Equations

• Curl

$$\nabla \times F = (R_y - Q_z)i + (P_z - R_x)j + (Q_x - P_y)k$$

• Divergence

$$\nabla \cdot F = P_x + Q_y + R_z$$

• Divergence of curl is zero

$$\nabla \cdot (\nabla \times F) = 0$$

• Curl of a gradient is the zero vector

$$\nabla \times (\nabla f) = 0$$

### Glossary

curl
the curl of vector field $$F=⟨P,Q,R⟩$$, denoted $$∇×F$$ is the “determinant” of the matrix ∣∣∣∣∣i∂∂xPj∂∂yQk∂∂zR∣∣∣∣∣|ijk∂∂x∂∂y∂∂zPQR| and is given by the expression $$(R_y−Q_z)i+(P_z−R_x)j+(Q_x−P_y)k$$; it measures the tendency of particles at a point to rotate about the axis that points in the direction of the curl at the point
divergence
the divergence of a vector field $$F=⟨P,Q,R⟩$$, denoted $$∇×F$$, is $$P_x+Q_y+R_z$$; it measures the “outflowing-ness” of a vector field