Main content

## Multivariable calculus

# Divergence intuition, part 2

In preparation for finding the formula for divergence, we start getting an intuition for what points of positive, negative and zero divergence should look like. Created by Grant Sanderson.

## Want to join the conversation?

- In general, was the choice of defining this concept as "divergence" arbitrary? I mean, could it have been called "convergence" with positive and negative values corresponding to converging and diverging flow, respectively? Or was there a certain advantage for defining the concept as it is defined now?(11 votes)
- While any mathematical idea could have been defined arbitrarily, they all relate in a certain way that allows them to have certain properties. If it were called "convergence," then the formula would be backwards. The formula connects to other previously established ideas in mathematics, so there is an advantage to calling it "divergence" and not "convergence."

As shown in the next few videos, divergence uses the dot product, so if it were called "convergence," we would have to use the negative value of the dot product.(15 votes)

- Is there a unit for divergence?(1 vote)
- Not intrinsically. When you use a vector field to model something physical, its divergence could be assigned units according to the units of the field.(3 votes)

- Can we describe this problem solution by curl or divergence. Please guide me as I am not expert in mathmatics. Find the constants a, b, and c so that

F=(x+2y+az) i + (bx – 3y – z ) j + (4x + cy + 2 z) k

is irrotational and hence find the function ψ such that F = ∇ ψ(1 vote)- If anyone else was wondering how to solve this problem, you can check out how it's done below.

"Irrotational" means that the curl of**F**is**0**.

Remember that the curl of**F**roughly represents how much rotation there is in**F**, so you can see how "no rotation in**F**" or**F**being "irrotational" would mean that its curl =**0**.

Since we know what**F**is, we can find its curl. We know that the x-component of**F**is x + 2y + az, the y-component is bx - 3y - z, and the z-component is 4x + cy + 2z. We will call these components:

P(x, y, z) = x + 2y + az = x-component of**F**

Q(x, y, z) = bx - 3y - z = y-component of**F**

R(x, y, z) = 4x + cy + 2z = z-component of**F**

The formula for the curl of**F**is:

curl**F**= (∂R/∂y - ∂Q/∂z)**i**+ (∂P/∂z - ∂R/∂x)**j**+ (∂P/∂y - ∂Q/∂x)**k**

We can calculate the various partial derivatives of P, Q, and R by treating a, b, and c as constants:

∂P/∂y = 2, ∂Q/∂x = b, ∂R/∂x = 4

∂P/∂z = a, ∂Q/∂z = -1, ∂R/∂y = c

So, the curl of**F**should be:

curl**F**= (c - -1)**i**+ (a - 4)**j**+ (2 - b)**k**

Remember that the curl of**F**must be**0**. For a vector to be**0**,*all*of its x-, y-, and z-components must be 0 too. So,

c - -1 = 0 means that c is -1.

a - 4 = 0 means that a is 4.

2 - b = 0 means that b is 2.

Therefore,**F**must be:**F**(x, y, z) = (x + 2y + 4z)**i**+ (2x - 3y - z)**j**+ (4x - y + 2z)**k**.

The next step is to figure out what scalar-valued function ψ have the gradient**F**. This would mean that:

∂ψ/∂x = x + 2y + 4z = P

∂ψ/∂y = 2x - 3y - z = Q

∂ψ/∂z = 4x - y + 2z = R

Notice that ∂ψ/∂x only differentiates with respect to x while treating all other variables as constants.*Integrating*ψ dx will also treat other variables as constants. So, we can get hints at what ψ is like from integrating ψ with respect to x, y, and z separately.

∫ P dx = 1/2 x² + 2xy + 4xz + C

∫ Q dy = -3/2 y² + 2xy - yz + C

∫ R dz = z² + 4xz - yz + C

These antiderivatives don't seem to match, but the C helps us here. As an example, the +C from int ψ dx could include numbers like 2 and 5 but also functions like -yz and z² that don't have x in them. So, the +C allows us to*merge*what ψ looks like:

ψ(x, y, z) = 1/2 x² - 3/2 y² + z² + 2xy + 4xz - yz + C

The value of C here doesn't matter - it disappears when any derivative of ψ is taken. For convenience, we can let C be 0.

So, we first solved curl**F**=**0**. All components equaling 0 allowed us to solve for a, b, and c. Knowing**F**, we then integrated it by components to see what ψ should be like. We then concluded that:

ψ(x, y, z) = 1/2 x² - 3/2 y² + z² + 2xy + 4xz - yz(1 vote)

## Video transcript

- [Voiceover] Hey everyone. So, in the last video I was
talking about divergence and kind of laying down the
intuition that we need for it. Where you're imagining a
vector field as representing some kind of fluid flow
where particles move according to the vector
that they're attached to in that point in time and as they move to a different point the
vector they're attached to is different so their
velocity changes in some way. And the key question that
we want to think about is "If you have a given
point somewhere in space, "does fluid tend to
flow towards that point "or does it tend to
flow more away from it?" Does it diverge away from that point? And what I wanna do here
is start kinda closing our grasp on that intuition
a little bit more tightly, as if we are trying to
discover the formula for divergence ourselves, because
ultimately that's what I'm gonna get to, a
formula for divergence. But I want it to be
something that's not just plopped down in front of
you, but something that you actually, you know,
feel deep in your bones. So a vector field like the
one I have pictured above is given as a function, a
multi-variable function, with a two-dimensional input, since it's a two-dimensional vector field, and then some kinda
two-dimensional output. And it's common to write
P and Q as the functions for these, the components of the output. So P and Q are each just
scalar value functions and you think of them as the components of your vector valued output. And the divergence is
kinda like a derivative, where you might denote it by just div, and in the same way that your
derivative, you have this operator and what it does
is it takes in a function. And what you get is a whole new function. This div operator you
think of as taking in a vector field of some kind
and you get a new function. And the new function you
get will be scalar valued, it'll be something that just
takes in points in space and outputs a number,
because what you're thinking, the thing that it's trying to do is take in some specific
point with XY coordinates and just give you a
single number to tell you "Hey, does fluid tend
to diverge away from it? "How much, or does it tend to
flow towards it and how much?" So this is the kind of, the form of the thing that we're going for. So here what we're gonna
do is just start thinking about cases where this divergence
is positive, or negative, or zero and what that should look like. So for example, let's say we
want cases where the divergence of our vector field at a
specific point XY is positive. What might that look like? So one case would be where your
point, nothing is happening at that point and the vector
attached to it is zero, and everyone around it is going away. This is kinda the extreme
example of positive divergence. And I animated this in the
last video where we have you know, all of the vectors
pointing away from the origin and if you look at a
region around that origin, all the fluid particles
kinda go out of that region. And that's the quintessential
positive divergence example. But it doesn't have to look like that. It actually, I mean, you
could have something where there is a little bit of
movement at your point and then maybe there's
movement towards it as well from one side, and vectors
are kind of going towards it, but they're going away
from it even more rapidly on the other side, so if
you think of any kind of actual region around your
point, you're saying, "Sure, fluid is going into
that region a little bit, "but it's much more
counterbalanced by how quickly it's going out." So these are the kind of
situations you might see for positive divergence. Now negative divergence,
negative divergence. Let's think about what examples
of that might look like. Divergence of V at a given point and you know, really it's
something that takes in all points of the plane
but we're just looking at specific points, so if
the divergence is negative, well the quintessential
example here is that nothing happens at your
point, but all of the vectors around it are kind of
flowing in towards it. And this is the thing where I animated, where we took this and we
flipped all of the vectors. And said, "Ah, there, if you
start playing the fluid flow, "then the density in any
region around the origin "you know, increases a lot,
all of the fluid particles "tend to converge towards that center." But again, this isn't the only
example that you might have. You could have a little bit of
activity at your point itself and maybe it is the case that
things do flow away from it a little bit as you're going away. And some of the fluid
particles are going away, and it's just the case
that the fluid particles flowing in towards it
from another direction heavily counterbalance that. Cuz then if you're looking
at any kind of region around your point, you say
fluid particles are coming in quite rapidly, a lot
of particles per time, but they're not leaving too
rapidly round the other end. So kind of loosely,
intuitively, this is what a negative divergence case might look like. And finally, another case that
we wanna start thinking about as we're tightening our
grasp on this intuition is what happens, or
what does it look like, if the divergence of your
function at a specific point is zero, right, if it's
just absolutely zero? And one thing this could
look like is, you know, you have something going on
but nothing really changes and all of the fluid just kinda
flows in then it flows out and on the whole it balances. You know, if you take any kind of region the amount flowing in is balanced with the amount flowing out. But it could also look like
you have fluid flowing in kind of from one dimension,
but it's cancelled out by flowing away from the point in a manner that sort of perfectly balances
it in another direction. So these are the loose pictures
that I want you to have in the back of your
mind as we start looking for the actual formula for divergence. And what I'll do in the next video or two, is start looking at
these functions P and Q and thinking about the
partial derivative properties that they have that will
correspond with, you know, these positive divergence
images that you should have in your head, or the
negative divergence images that you should have in your head. So with that, I'll see you next video.