Main content

## Multivariable calculus

### Course: Multivariable calculus > Unit 5

Lesson 7: 3D divergence theorem# 3D divergence theorem intuition

Intuition behind the Divergence Theorem in three dimensions. Created by Sal Khan.

## Want to join the conversation?

- Is there such a thing a 4D or even 5D?(5 votes)
- Sure, a lot of mathematics has been generalised into higher dimensions (often n dimensions, meaning you can have as many as you want/need).

We live in three spatial dimensions (space) and one temporal dimension (time): spacetime, so it's also 4D in a sense (except we can't really control our movement in the time dimension).(6 votes)

- So is divergence theorem the same as Gauss' theorem? Also, we have been taught in my multivariable class that Gauss' theorem only relates the Flux over a surface to the divergence over the volume it bounds and if you had for example a path in three dimensions you would apply Green's theorem and the line integral would be equivalent to the Curl of the vector field integrated over the surface it bounds - not the divergence - so I guess I don't understand how its being "generalized to more dimensions"?(2 votes)
- Gauss Theorem is just another name for the divergence theorem.

It relates the flux of a vector field through a surface to the divergence of vector field inside that volume. So the surface has to be closed! Otherwise the surface would not include a volume.

So you can rewrite a surface integral to a volume integral and the other way round.

On the other hand the Stokes Theorem relates a line integral along a closed loop through a vector field to the the surface integral of the curl of the vector field. Here the closed lopp has to beed the boundary of the surface over which you take to surface integral.

In other words you can turn a line integral to an surface integral and the other way round.

The Greens theorem is just a 2D version of the Stokes Theorem. Just remember Stokes theorem and set the z demension to zero and you can forget about Greens theorem :-)

So in general Stokes and Gauss are not related to each other. They are NOT the same thing in an other dimenson.(5 votes)

- i dont understand how the normal vector is inward facing and outward facing(2 votes)
- Imagine a piece of paper with a pencil stuck halfway through it. Both sides of the pencil are perpendicular to the paper. One side points to the inside, if you start from the center of the pencil. The other points to the outside. Since both sides are perpendicular to the paper, they both model a normal vector to the paper's surface.

Vectors have components that describe which way they face from the origin. So a vector with components (2, 5) would point up and to the right, into the first quadrant, while a vector with components (-2, -5), even though it has exactly the same length, would point down and to the left, into the third quadrant. If you imagine a vector that is normal to this surface, on the outside top right part of the surface like where Sal first drew the normal vector, then the first vector would be pointing out of the surface, and the second vector would be pointing into it. Both could be normal to the surface (perpendicular to the surface's tangent line).(2 votes)

- Is this considered Calculus 3?(1 vote)
- Yep. Multivariable calculus.

Pretty much every playlist after the practice AP Calc tutorials are Calc III,(8 votes)

- I AM GONE CRAZY. SOMEBODY HELP ME! ok my question is Why is that normal unit vector ñ perpendicular to do curve, not the vector field F, since ñ is multiplied by F, the unit normal vector ñ should be perpendicular to the F vectors, so why ?(2 votes)
- N is perpendicular to the curve because it is the cross product of the tangential functions of the curve. The vector field F is not multiplied by n but dotted by n which shows how much of the vector field at each point is in the direction of n. This is necessary to determine the magnitude of the flux traveling out (or into) the curve/surface at every point along it.(2 votes)

- Can you calculate the field of g?(2 votes)
- is F.n dr as stated in this video the same as F.n dS?

I remember in past videos on 2-D Divergence Theorem it is stated as F.n dS.(2 votes) - Thank you for clear explanation!!

And I have a question about application of div theorem.

How about this case?

When vector field is offered for 3 dimension(x,y,z),

I'd like to calculate 'out amount(out let)' in 2 dimension(x,y).

Namely, If given vector field is 3D, and given domain is 2D,

can I use the 2D or 3D div theorem??

I'd like to extend appreciate!!(2 votes) - There is a very similar operation, just using curl instead of divergence. What is the difference between the two operations? What is the one giving us versus the other?(2 votes)
- Such an intuitive video, thank you so much Sal! I have a question though, at0:55, shouldn't it be a unit normal vector? Since if not, the magnitude of the resulting dot product would vary depending on the magnitude of the normal vector? (Don't we purely want the component of the vector field going in the perpendicular direction to the boundary, cos(theta) * |F||1| (|unit normal vector| = 1))? Thanks.(2 votes)
- yeah, i was thinking same. pro'lly a typo - since at6:30he has used correct symbol i.e. hat or cap instead of arrow. Though still didnt mention the term "unit" but yeah - error, rather than intentional i'd assume.(1 vote)

## Video transcript

We've already explored a
two-dimensional version of the divergence theorem. If I have some region-- so this
is my region right over here. We'll call it R. And let's
call the boundary of my region, let's call that C. And
if I have some vector field in this region, so let me
draw a vector field like this. If I draw a vector
field just like that, our two-dimensional
divergence theorem, which we really derived
from Green's theorem, told us that the flux across
our boundary of this region-- so let me write that out. The flux across the
boundary, so the flux is essentially going
to be the vector field. It's going to be
our vector field F dotted with the normal
outward-facing vector. So the normal
vector at any point is this outward-facing
vector, So our vector field, dotted with the normal-facing
vector at our boundary times our little chunk
of the boundary. If we were to sum them all
up over the entire boundary-- let me write that a
little bit neater-- that's the same thing as summing
up over the entire region. So let's sum up over
the entire region. So summing up over this entire
region, each little chunk of area, dA-- we could call
that dx dy if we wanted to if we're dealing
in the xy domain right over here, but each
little chunk of area times the divergence of F,
which is really saying, how much is that vector
field pulling apart? So it's times the
divergence of F. And hopefully, it
made intuitive sense. The way that I drew this
vector field right over here, you see everything's
kind of coming out. You could almost call
this a source right here, where the vector field seems
like it's popping out of there. This has positive
divergence right over here. And so because of
this, you actually see that the vector
field at the boundary is actually going in the
direction of the normal vector, pretty close to the direction
of the normal vector, so it makes sense. You have positive
divergence, and this is going to be a positive value. The vector field is
going, for the most part, in the direction of
the normal vector. So the larger this is,
the larger that is. So hopefully, some
intuitive sense. If you had another
vector field-- so let me draw another region--
that looked like this, so I could draw a
couple situations. So one where there's
very limited divergence, maybe it's just a constant. The vector field
doesn't really change as you go in any
given direction. Over here you'll
get positive fluxes. I don't know what the
plural of flux is. You'll get positive fluxes,
because the vector field seems to be going in roughly the same
direction as our normal vector. But here, you'll
get a negative flux. So stuff is coming in here. If you imagine your vector
field is essentially some type of mass
density times volume, and we've thought
about that before, this is showing how
much stuff is coming in, and then stuff is coming out. So your net flux will
be close to zero. Stuff is coming in, and
stuff is coming out. Here, you're just
saying, hey, stuff is constantly coming
out of this surface. So hopefully, this
gives you a sense that here you have
very low divergence, and you would have a low
flux, total aggregate flux, going through your boundary. Here you have a high
divergence, and you would have a high
aggregate flux. I could draw another situation. So this is my region
R. And let's say that we have
negative divergence, or we could even
call it convergence. Convergence isn't an
actual technical term, but you could imagine if the
vector field is converging within R, well,
the divergence is going to be negative
in this situation. It's actually converging, which
is the opposite of diverging. So the divergence is
negative in this situation. And also the flux
across the boundary is going to be negative. Because as we see
here, the way I drew it, across most
of this boundary, the vector field is going
in the opposite direction. It's going in the opposite
direction as our normal vector at any point. So hopefully, this
gives you a sense of why there's this connection
between the divergence over the region and the
flux across the boundary. Well, now we're just
going to extend this to three dimensions, and it's
the exact same reasoning. If we have a-- and I'll
define it a little bit more precisely in future videos--
a simple, solid region. So let me just draw it. And I'm going to try to
draw it in three dimensions. So let's say it looks
something like that. And one way to think
about it is this is going to be a region that
doesn't bend back on itself. And if you have a region that
bends back on itself-- well, we'll think about
it in multiple ways. But out of all the volumes
of three dimensions that you can imagine,
these are the ones that don't bend
back on themselves. And there are some
that you might not be able to imagine that
would also not make the case. But even if you had ones
that bent back on themselves, you could separate them out
into other ones that don't. So here is just a simple
solid region over here. I'll make it look
three dimensional. So maybe if it was transparent,
you would see it like that. And then you see the
front of it like that. So it's this kind of elliptical,
circular, blob-looking thing. So that could be the back of it. And then if you go
to the front, it could look something like that. So this is our
simple solid region. I'll call it-- well,
I'll call it R still. But we're dealing with
a three dimensional. We are now dealing with a
three-dimensional region. And now the boundary of
this is no longer a line. We're now in three dimensions. The boundary is a surface. So I'll call that S. S
is the boundary of R. And now let's throw on
a vector field here. Now, this is a vector
field in three dimensions. And now let's imagine
that we actually have positive divergence
of our vector field within this region
right over here. So we have positive divergence. So you can imagine that
it's kind of-- the vector field within the region, it's
a source of the vector field, or the vector field
is diverging out. That's just the case I
drew right over here. And the other thing we want
to say about vector field S, it's oriented in a way that
its normal vector is outward facing, so outward
normal vector. So the normal, it's oriented
so that the surface-- the normal vector is like that. The other option
is that you have an inward-facing normal vector. But we're assuming it's
an outward-facing N. Well, then we just extrapolate
this to three dimensions. We essentially say the
flux across the surface. So the flux across the surface,
you would take your vector field, dot it with the
normal vector at the surface, and then multiply that times
a little chunk of surface, so multiply that times a
little chunk of surface, and then sum it up along the
whole surface, so sum it up. So it's going to be
a surface integral. So this is flux
across the surface. It's going to be equal
to-- if we were to sum up the divergence, if we were to
sum up across the whole volume, so now if we're
summing up things on every little chunk of volume
over here in three dimensions, we're going to have to take
integrals along each dimension. So it's going to be
a triple integral over the region of
the divergence of F. So we're going to
say, how much is F? What is the divergence
at F at each point? And then multiply it times the
volume of that little chunk to sense of how much
is it totally diverging in that volume. And then you sum it up. That should be
equal to the flux. It's completely
analogous to what's here. Here we had a flux
across the line. We had essentially
a two-dimensional-- or I guess we could say it's
a one-dimensional boundary, so flux across the curve. And here we have the
flux across a surface. Here we were summing the
divergence in the region. Here we're summing
it in the volume. But it's the exact same logic. If you had a vector
field like this that was fairly constant
going through the surface, on one side you would
have a negative flux. On the other side, you
would have a positive flux, and they would
roughly cancel out. And that makes
sense, because there would be no diverging going on. If you had a converging vector
field, where it's coming in, the flux would be
negative, because it's going in the opposite
direction of the normal vector. And so the divergence
would be negative as well, because essentially the vector
field would be converging. So hopefully this
gives you an intuition of what the divergence theorem
is actually saying something very, very, very, very-- almost
common sense or intuitive. And now in the
next few videos, we can do some worked
examples, just so you feel comfortable computing or
manipulating these integrals. And then we'll do a couple of
proof videos, where we actually prove the divergence theorem.