19 Divergence and Curl
Vector fields are complicated objects as they can vary in both magnitude and direction at each point. We wish now to use calculus to help us get a better understanding of them: specifically by using derivatives to help us understand how a vector field can affect objects it pushes on.
When we look at a vector field we can qualitatively distinguish different types of behavior going on: for example, in the field below there are regions where it looks like the field is swirling, as well as regions that look like the field is flowing at a constant speed / direction, and yet other regions where it looks to be expanding, or flowing away from a point.
It’s helpful sometimes to think about the behavior of a vector field by imagining it representing a fluid flow: then we can try to quantify these different ways the fluid can be changing: is it spreading out, or is it spinning. We formalize these below using partial derivatives into the concept of divergence and curl.
19.1 Divergence
The divergence of a vector field is a scalar quantity which measures how much the vector field is spreading out or contracting at a point. Imagine a small cloud of particles being blown around by the vector field. If that cloud expands over time, the divergence of the vector field is positive where the cloud is. If its volume contracts, the divergence is negative, and if it stays the same volume the divergence is zero. Here are some motivating examples
Vector fields with positive divergence (left) and negative divergence (right).
A vector field with zero divergence.
How do we come up with an equation that could measure this, for a vector field
PICTURE
The total flow is then the sum of these, and in the limit as the size of the box decreases to zero, these differences become derivatives, giving
This quantity is the divergence, and can be given an easy-to-remember notation in terms of
Definition 19.1 (Divergence) The divergence of a vector field
Computing the divergence is no more difficult than computing partial derivatives
Example 19.1 Compute the divergence of the following vector fields:
Now with a formula in hand, we can make sure we understand cases that might not match our initial intuition. Importantly, for a vector field to have divergence it doesn’t have to look like its spreading out: it just has to have more net outflow than inflow.
The vector field on the left has positive divergence: more fluid leaves each small box than enters.
The vector field on the right has zero divergence: even though the vectors are spreading out they are getting shorter, so the net flow through each small box is zero.
Finally its of note that the definition of divergence generalizes directly to higher dimensions, so for 3D we have
and in
19.2 Curl
Let’s return to imagining little balls flowing around in a vector field again. We’ve found a way to quantify if they spread out from eachother or not, and our next goal is to capture their rotational motion. Here its helpful to think just of a single ball at a time flowing along with the fluid flow. For a 2 dimensional vector field we can imagine three possible cases: the flow could cause the ball to start to spin counterclockwise, spin clockwise, or glide along the flow without spinning. We will call these positive curl, negative curl and zero curl respectively.
Vector fields with positive curl (left) and negative curl (right)
A vector field with zero curl.
While seeing a vector field ‘look like its spinning’ can sometimes be a good indicator of curl, its important to remember this isnt exactly what we are looking for. Curl is about the local properties of a vector field: if it causes a small object to spin, not if its spinning itself. Indeed, consider the following vector field
this vector field consists solely of unit vectors, and if you drop a ball in the field the ball will travel in a circle, but it will not rotate about its own axis as the vectors pushing it on each side are contributing equally. That is, even though the vectors are going around in a circle, it has zero curl.
A vector field on the other hand that does cause something to spin even though it does not go in a circle is
With a clear qualitative picture in mind, we need to get quantitative about this. What sort of derivative measures rotational motion? Here, we find a use for our old friend the cross product
Definition 19.2 (2 Dimensional Curl) If
Example 19.2 Compute the divergence of the following vector fields:
This definition also generalizes to 3 dimensions, but not as easily as divergence. Recall that the cross product behaved quite differently between two and three dimensions: in 2d it was simply a number (the signed area of the paralleogram spanned by the input vectors) whereas in 3 dimensions it was a vector (whose length was that area, and whose direction was orthogonal to the two inputs). Likewise, the three dimensional curl is no longer a scalar but a vector: its magnitude gives the rate of rotation and its direction gives the axis.
Definition 19.3 (3 Dimensional Curl) If
This definition actually fits together nicely with our 2D definition: given a two dimensional vector field
That is, repeating a 2D vector field vertically gives a vector field whose curl points in the
Beyond three dimensions, curl becomes a much more complicated object to describe: already in four dimensional space the curl turns out to be a six dimensional vector! To be able to understand the curl in dimensions greater than three requires the more sophisticated langauge of differential forms, and is beyond the scope of our course. However, luckily most interesting applications of vector fields to the everyday world around us occur only in 2 and 3 dimensions, and so we will find plenty to discuss staying within this restricted realm.
19.3 Potentials and Antiderivatives
We now have three types of derivative that relate scalar and vector fields:
- The Gradient
, which takes a scalar field and outputs a vector field. - The Divergence
which takes a vector field and outputs a scalar field. - The Curl Which takes in a vector field and outputs a scalar (2D) or a vector (3D).
We are on our way to study integrals of vector fields, so it probably comes as no surprise that we might be interested in antiderivatives. Recall from calculus 1 that a function
Note to anyone feeling a bit overwhelmed with everything towards the end of a semester: the only one of these we are actually going to need to do often is to find an antiderivative for the gradient; so if you understand the first case well you should be fine.
19.3.1 The Gradient & Conservative Vector Fields
Let’s start with the gradient:
Definition 19.4 (Potential (for Gradient)) A function
For example, since we know
How can we find potentials more systematically? For a vector field
Example 19.3 Find a potential for the vector field
If there is such an
Thus, in the one case we have found
Sometimes we have to be a bit more careful with the constants:
Example 19.4 Find a potential for the vector field
Applying the same trick we integrate
Here at first our two expressions for
So far, finding potentials seems to fit well within our general framework of to do something in multivariable calculus, you just have to do a Calculus I problem multiple times: instead of just finding one integral we now have
The reason for this is actually pretty intuitive, so long as we recall the geometrical meaning of the gradient, which points in the direction of steepest increase of
If there were a potential
Let’s try this example mathematically, and see where things go wrong. A circular vector field is
Thus
Definition 19.5 (Conservative Vector Fields) A vector field
It would be nice to have a means of determining when a vector field has an antiderivative, and when it does not. Luckily there is an easy calculation to do so.
Theorem 19.1 (Curl of the Gradient is Zero) If
We check this with a quick calculation:
Where the final equality is true because the order of partial derivatives does not matter!
Exercise 19.1 Check this still holds true in three dimensions, for
This is useful to us because it gives us a definite check for when a potential cannot possibly exist: if
Theorem 19.2 (Existence of a Potential) Let
One must be careful in applying this theorem however: its crucial that the vector field actually be defined everywhere: check for yourself that the vector field of rotating unit vectors below has zero curl, even though we can see it is not a gradient (as it goes in a circle!) This does not contradict our theorem because this vector field is not defined everywhere: it has a division - by - zero problem at the origin!
19.3.2 OPTIONAL: Undoing Divergence
Lets turn to investigate a similar question for the divergence: this type of derivative takes a vector field to a scalar field, so the question we should be asking is given a scalar field
Definition 19.6 (Potential for Divergence) Given a scalar field
Again we begin with a simple example: say
Indeed this second trick shows one way we can always find a vector field whose divergence is
In stark contrast to the case of the gradient, its very easy to find an antiderivaive for divergence! Its of note that the non-uniqueness here is pretty interesting; we found two vector fields whose divergence is
19.3.3 OPTIONAL: The Curl and Vector Potentials
Last but certainly not least, we can consider the same type of question for curl. This one does have a standard name due to its use in physics, and is simply called the Vector Potential (though note this term could have equally well applied to the divergence, so one may wish to call it the Curl Potential or Vector Potential for Curl to avoid confusion).
Definition 19.7 (Vector Potential (For Curl)) In two dimensions, given a scalar field
In three dimensions, since curl returns a vector field, we have to consider antiderivaties of vector fields instead: given a vector field
The existence of a vector potential in this case depends on the dimension. For 2D vector fields (where the curl is a scalar), one can always find a vector potential using the same trick we did for the divergence.
Example 19.5 Find a vector potential
A potential would be a vector field
In 3D, we have to contend with curl being a vector, which gives a system of three equations that need to simultaneously be solved:
Exercise 19.2 Find a vector potential
Its easy to imagine that this may no longer always be possible, and indeed its not: a computation with divergence and curl provides an obstruction:
Theorem 19.3 Let
Exercise 19.3 Check this, for an arbitrary vector field
We can use this just like the identity for curl and the gradient, to give a strict constraint on when a vector field
Theorem 19.4 Let