WEBVTT

00:00:01.000 --> 00:00:03.000
The following content is
provided under a Creative

00:00:03.000 --> 00:00:05.000
Commons license.
Your support will help MIT

00:00:05.000 --> 00:00:08.000
OpenCourseWare continue to offer
high quality educational

00:00:08.000 --> 00:00:13.000
resources for free.
To make a donation or to view

00:00:13.000 --> 00:00:18.000
additional materials from
hundreds of MIT courses,

00:00:18.000 --> 00:00:23.000
visit MIT OpenCourseWare at
ocw.mit.edu.

00:00:23.000 --> 00:00:29.000
OK, so remember we left things
with this statement of the

00:00:29.000 --> 00:00:33.000
divergence theorem.
So, the divergence theorem

00:00:33.000 --> 00:00:36.000
gives us a way to compute the
flux of a vector field for a

00:00:36.000 --> 00:00:41.000
closed surface.
OK, it says if I have a closed

00:00:41.000 --> 00:00:47.000
surface, s,
bounding some region, D,

00:00:47.000 --> 00:00:54.000
and I have a vector field
defined in space,

00:00:54.000 --> 00:00:59.000
so that I can try to compute
the flux of my vector field

00:00:59.000 --> 00:01:04.000
through my surface.
Double integral of F.dS or

00:01:04.000 --> 00:01:08.000
F.ndS if you want,
and to set this up,

00:01:08.000 --> 00:01:11.000
of course, I need to use the
geometry of the surface

00:01:11.000 --> 00:01:13.000
depending on what the surface
is.

00:01:13.000 --> 00:01:17.000
We've seen various formulas for
how to set up the double

00:01:17.000 --> 00:01:20.000
integral.
But, we've also seen that if

00:01:20.000 --> 00:01:24.000
it's a closed surface,
and if a vector field is

00:01:24.000 --> 00:01:29.000
defined everywhere inside,
then we can actually reduce

00:01:29.000 --> 00:01:34.000
that to a calculation of the
triple integral of the

00:01:34.000 --> 00:01:38.000
divergence of F inside,
OK?

00:01:38.000 --> 00:01:40.000
So,
concretely, if I use

00:01:40.000 --> 00:01:43.000
coordinates,
let's say that the coordinates

00:01:43.000 --> 00:01:48.000
of my vector field are,
sorry, the components are P,

00:01:48.000 --> 00:01:52.000
Q, and R dot ndS,
then that will become the

00:01:52.000 --> 00:02:00.000
triple integral of,
well, so, divergence is P sub x

00:02:00.000 --> 00:02:07.000
plus Q sub y plus R sub z.
OK, so by the way,

00:02:07.000 --> 00:02:10.000
how to remember this formula
for divergence,

00:02:10.000 --> 00:02:14.000
and other formulas for other
things as well.

00:02:14.000 --> 00:02:22.000
Let me just tell you quickly
about the del notation.

00:02:22.000 --> 00:02:27.000
So,
this guy usually pronounced as

00:02:27.000 --> 00:02:29.000
del,
rather than as pointy triangle

00:02:29.000 --> 00:02:32.000
going downwards or something
like that,

00:02:32.000 --> 00:02:37.000
it's a symbolic notation for an
operator.

00:02:37.000 --> 00:02:42.000
So, you're probably going to
complain about putting these

00:02:42.000 --> 00:02:46.000
guys into a vector.
But, let's think of partial

00:02:46.000 --> 00:02:48.000
with respect to x,
with respect to y,

00:02:48.000 --> 00:02:51.000
and with respect to z as the
components of some formal

00:02:51.000 --> 00:02:53.000
vector.
Of course, it's not a real

00:02:53.000 --> 00:02:55.000
vector.
These are not like anything.

00:02:55.000 --> 00:03:02.000
These are just symbols.
But, so see for example,

00:03:02.000 --> 00:03:06.000
the gradient of function,
well, if you multiply this

00:03:06.000 --> 00:03:09.000
vector by scalar,
which is a function,

00:03:09.000 --> 00:03:14.000
then you will get partial,
partial x of f,

00:03:14.000 --> 00:03:20.000
partial, partial y of f,
partial, partial z, f,

00:03:20.000 --> 00:03:25.000
well, that's the gradient.
That seems to work.

00:03:25.000 --> 00:03:29.000
So now, the interesting thing
about divergence is I can think

00:03:29.000 --> 00:03:33.000
of divergence as del dot a
vector field.

00:03:33.000 --> 00:03:42.000
See, if I do the dot product
between this guy and my vector

00:03:42.000 --> 00:03:46.000
field P, Q, R,
well, it looks like I will

00:03:46.000 --> 00:03:51.000
indeed get partial,
partial x of P plus partial Q

00:03:51.000 --> 00:03:56.000
partial y plus partial R partial
z.

00:03:56.000 --> 00:04:06.000
That's the divergence.
and of course, similarly,

00:04:06.000 --> 00:04:08.000
when we have two variables
only, x and y,

00:04:08.000 --> 00:04:11.000
we could have thought of the
same notation,

00:04:11.000 --> 00:04:13.000
just with a two component
vector,

00:04:13.000 --> 00:04:16.000
partial, partial x,
partial, partial y.

00:04:16.000 --> 00:04:20.000
So, now, this is like of
slightly limited usefulness so

00:04:20.000 --> 00:04:22.000
far.
It's going to become very handy

00:04:22.000 --> 00:04:25.000
pretty soon because we are going
to see curl.

00:04:25.000 --> 00:04:28.000
And, the formula for curl in
the plane was kind of

00:04:28.000 --> 00:04:31.000
complicated.
But, if you thought about it in

00:04:31.000 --> 00:04:34.000
terms of this,
it was actually the determinant

00:04:34.000 --> 00:04:36.000
of del and f.
And now, in space,

00:04:36.000 --> 00:04:39.000
we are actually going to do del
cross f.

00:04:39.000 --> 00:04:40.000
But, I'm getting ahead of
things.

00:04:40.000 --> 00:04:44.000
So, let's not do anything with
that.

00:04:44.000 --> 00:04:52.000
Curl will be for next week.
Just getting you used to the

00:04:52.000 --> 00:04:54.000
notation, especially since you
might be using it in physics

00:04:54.000 --> 00:04:59.000
already.
So, it might be worth doing.

00:04:59.000 --> 00:05:03.000
OK, so the other thing I wanted
to say is, what does this

00:05:03.000 --> 00:05:06.000
theorem say physically?
How should I think of this

00:05:06.000 --> 00:05:09.000
statement?
So, I think I said that very

00:05:09.000 --> 00:05:13.000
quickly at the end of last time,
but not very carefully.

00:05:13.000 --> 00:05:22.000
So, what's the physical
interpretation of a divergence

00:05:22.000 --> 00:05:26.000
field?
So,

00:05:26.000 --> 00:05:30.000
I want to claim that the
divergence of a vector field

00:05:30.000 --> 00:05:35.000
corresponds to what I'm going to
call the source rate,

00:05:35.000 --> 00:05:52.000
which is somehow the amount of
flux generated per unit volume.

00:05:52.000 --> 00:05:56.000
So, to understand what that
means, let's think of what's

00:05:56.000 --> 00:06:00.000
called an incompressible fluid.
OK, so an incompressible fluid

00:06:00.000 --> 00:06:02.000
is something like water,
for example,

00:06:02.000 --> 00:06:06.000
where a fixed mass of it always
occupies the same amount of

00:06:06.000 --> 00:06:09.000
volume.
So, guesses are compressible.

00:06:09.000 --> 00:06:13.000
Liquids are incompressible,
basically.

00:06:13.000 --> 00:06:24.000
So, if you have an
incompressible fluid flow -- --

00:06:24.000 --> 00:06:34.000
well, so, again,
what that means is really,

00:06:34.000 --> 00:06:44.000
given mass occupies always a
fixed volume.

00:06:44.000 --> 00:06:51.000
Then, well, let's say that we
have such a fluid with velocity

00:06:51.000 --> 00:06:57.000
given by our vector field.
OK, so we're thinking of F as

00:06:57.000 --> 00:07:03.000
the velocity and maybe something
containing water,

00:07:03.000 --> 00:07:08.000
a pipe, or something.
So, what does the divergence

00:07:08.000 --> 00:07:14.000
theorem say?
It says that if I take a region

00:07:14.000 --> 00:07:18.000
in space,
let's call it D,

00:07:18.000 --> 00:07:23.000
sorry, D is the inside,
and S is the surface around it,

00:07:23.000 --> 00:07:27.000
well, so if I sum the
divergence in D,

00:07:27.000 --> 00:07:35.000
well, I'm going to get the flux
going out through this surface,

00:07:35.000 --> 00:07:37.000
S.
I should have mentioned it

00:07:37.000 --> 00:07:39.000
earlier.
The convention in the

00:07:39.000 --> 00:07:43.000
divergence theorem is that we
orient the surface with a normal

00:07:43.000 --> 00:07:47.000
vector pointing always outwards.
OK, so now, we know what flux

00:07:47.000 --> 00:07:49.000
means.
Remember, we've been

00:07:49.000 --> 00:07:53.000
describing, flux means how much
fluid is passing through this

00:07:53.000 --> 00:08:00.000
surface.
So, that's the amount of fluid

00:08:00.000 --> 00:08:11.000
that's leaving the region,
D, per unit time.

00:08:11.000 --> 00:08:13.000
And, of course,
when I'm saying that,

00:08:13.000 --> 00:08:16.000
it means I'm counting
everything that's going out of D

00:08:16.000 --> 00:08:18.000
minus everything that's coming
into D.

00:08:18.000 --> 00:08:22.000
That's what the flux measures.
So, now, if there is stuff

00:08:22.000 --> 00:08:26.000
coming into D or going out of D,
well, it must come from

00:08:26.000 --> 00:08:28.000
somewhere.
So, one possibility would be

00:08:28.000 --> 00:08:32.000
that your fluid is actually
being compressed or expanded.

00:08:32.000 --> 00:08:34.000
But, I've said,
no, I'm looking at something

00:08:34.000 --> 00:08:37.000
like water that you cannot
squish into smaller volume.

00:08:37.000 --> 00:08:40.000
So, in that case,
the only explanation is that

00:08:40.000 --> 00:08:44.000
there is something it here that
actually is sucking up water or

00:08:44.000 --> 00:08:47.000
producing more water.
And so, integrating the

00:08:47.000 --> 00:08:52.000
divergence gives you the total
amount of sources minus the

00:08:52.000 --> 00:08:56.000
amount of syncs that are inside
this region.

00:08:56.000 --> 00:09:01.000
So, the divergence itself
measures basically the amount of

00:09:01.000 --> 00:09:06.000
sources or syncs per unit volume
in a given place.

00:09:06.000 --> 00:09:07.000
And now, if you think about it
that way,

00:09:07.000 --> 00:09:12.000
well,
it's basically the divergence

00:09:12.000 --> 00:09:17.000
theorem is just stating
something completely obvious

00:09:17.000 --> 00:09:23.000
about all the matter that is
leaving this region must come

00:09:23.000 --> 00:09:28.000
from somewhere.
So, that's basically how we

00:09:28.000 --> 00:09:30.000
think about it.
Now, of course,

00:09:30.000 --> 00:09:33.000
if you're doing 8.02,
then you might actually have

00:09:33.000 --> 00:09:35.000
seen the divergence theorem
already being used for things

00:09:35.000 --> 00:09:39.000
that are more like force fields,
say, electric fields and so on.

00:09:39.000 --> 00:09:42.000
Well, I'll try to say a few
things about that during the

00:09:42.000 --> 00:09:45.000
last week of classes.
But, then this kind of

00:09:45.000 --> 00:09:48.000
interpretation doesn't quite
work.

00:09:48.000 --> 00:09:51.000
OK, any questions,
generally speaking,

00:09:51.000 --> 00:09:56.000
before we move on to the proof
and other applications?

00:09:56.000 --> 00:10:05.000
Yes?
Oh, not the gradient.

00:10:05.000 --> 00:10:09.000
So, yeah, the divergence of F
measures the amount of sources

00:10:09.000 --> 00:10:11.000
or syncs in there.
Well, what makes it happen?

00:10:11.000 --> 00:10:13.000
If you want,
in a way, it's this theorem.

00:10:13.000 --> 00:10:16.000
Or, in another way,
if you think about it,

00:10:16.000 --> 00:10:20.000
try to look at your favorite
vector fields and compute their

00:10:20.000 --> 00:10:23.000
divergence.
And, if you take a vector field

00:10:23.000 --> 00:10:25.000
where maybe everything is
rotating,

00:10:25.000 --> 00:10:29.000
a flow that's just rotating
about some axis,

00:10:29.000 --> 00:10:31.000
then you'll find that its
divergence is zero.

00:10:31.000 --> 00:10:37.000
If you, sorry?
No, divergence is not equal to

00:10:37.000 --> 00:10:39.000
the gradient.
Sorry, there's a dot here that

00:10:39.000 --> 00:10:42.000
maybe is not very big,
but it's very important.

00:10:42.000 --> 00:10:44.000
OK, so you take the divergence
of a vector field.

00:10:44.000 --> 00:10:46.000
Well, you take the gradient of
a function.

00:10:46.000 --> 00:10:49.000
So, if the gradient of a
function is a vector,

00:10:49.000 --> 00:10:52.000
the divergence of a vector
field is a function.

00:10:52.000 --> 00:10:56.000
So, somehow these guys go back
and forth between.

00:10:56.000 --> 00:10:59.000
So, I should have said,
with new notations comes new

00:10:59.000 --> 00:11:04.000
responsibility.
I mean,

00:11:04.000 --> 00:11:07.000
now that we have this nice,
nifty notation that will let us

00:11:07.000 --> 00:11:10.000
do gradient divergence and later
curl in a unified way,

00:11:10.000 --> 00:11:12.000
if you choose this notation you
have to be really,

00:11:12.000 --> 00:11:17.000
really careful what you put
after it because otherwise it's

00:11:17.000 --> 00:11:21.000
easy to get completely confused.
OK, so divergence and gradients

00:11:21.000 --> 00:11:24.000
are completely different things.
The only thing they have in

00:11:24.000 --> 00:11:26.000
common is that both are what's
called a first order

00:11:26.000 --> 00:11:29.000
differential operator.
That means it involves the

00:11:29.000 --> 00:11:33.000
first partial derivatives of
whatever you put into it.

00:11:33.000 --> 00:11:35.000
But, one of them goes from
functions to vectors.

00:11:35.000 --> 00:11:38.000
That's gradient.
The other one goes from vectors

00:11:38.000 --> 00:11:41.000
to functions.
That's divergence.

00:11:41.000 --> 00:11:43.000
And, curl later will go from
vectors to vectors.

00:11:43.000 --> 00:11:57.000
But, that will be later.
Let's see, more questions?

00:11:57.000 --> 00:12:03.000
No?
OK, so let's see,

00:12:03.000 --> 00:12:12.000
so how are we going to actually
prove this theorem?

00:12:12.000 --> 00:12:15.000
Well, if you remember how we
prove Green's theorem a while

00:12:15.000 --> 00:12:18.000
ago, the answer is we're going
to do it exactly the same way.

00:12:18.000 --> 00:12:22.000
So, if you don't remember,
then I'm going to explain.

00:12:22.000 --> 00:12:24.000
OK, so the first thing we need
to do is actually a

00:12:24.000 --> 00:12:28.000
simplification.
So, instead of proving the

00:12:28.000 --> 00:12:33.000
divergence theorem,
namely, the equality up there,

00:12:33.000 --> 00:12:38.000
I'm going to actually prove
something easier.

00:12:38.000 --> 00:12:44.000
I'm going to prove that the
flux of a vector field that has

00:12:44.000 --> 00:12:52.000
only a z component is actually
equal to the triple integral of,

00:12:52.000 --> 00:12:58.000
well, the divergence of this is
just R sub z dV.

00:12:58.000 --> 00:13:00.000
OK, now, how do I go back to
the general case?

00:13:00.000 --> 00:13:03.000
Well, I will just prove the
same thing for a vector field

00:13:03.000 --> 00:13:07.000
that has only an x component or
only a y component.

00:13:07.000 --> 00:13:10.000
And then, I will add these
things together.

00:13:10.000 --> 00:13:12.000
So, if you think carefully
about what happens when you

00:13:12.000 --> 00:13:15.000
evaluate this,
you will have some formula for

00:13:15.000 --> 00:13:16.000
ndS,
and when you do the dot

00:13:16.000 --> 00:13:18.000
product,
you'll end up with the sum,

00:13:18.000 --> 00:13:21.000
P times something plus Q times
something plus R times

00:13:21.000 --> 00:13:22.000
something.
And basically,

00:13:22.000 --> 00:13:26.000
we are just dealing with the
last term, R times something,

00:13:26.000 --> 00:13:28.000
and showing that it's equal to
what it should be.

00:13:28.000 --> 00:13:30.000
And then, we the three such
terms together.

00:13:30.000 --> 00:13:44.000
We'll get the general case.
OK, so then we get the general

00:13:44.000 --> 00:14:01.000
case by summing one such
identity for each component.

00:14:01.000 --> 00:14:08.000
I should say three such
identities, one for each

00:14:08.000 --> 00:14:13.000
component, whatever.
Now, let's make a second

00:14:13.000 --> 00:14:17.000
simplification because I'm still
not feeling confident I can

00:14:17.000 --> 00:14:19.000
prove this right away for any
surface.

00:14:19.000 --> 00:14:23.000
I'm going to do it first or
what's called a vertically

00:14:23.000 --> 00:14:26.000
simple region.
OK, so vertically simple means

00:14:26.000 --> 00:14:30.000
it will be something which I can
setup an integral over the z

00:14:30.000 --> 00:14:36.000
variable first easily.
So, it's something that has a

00:14:36.000 --> 00:14:44.000
bottom face, and a top face,
and then some vertical sides.

00:14:44.000 --> 00:14:53.000
OK, so let's say first what
happens if the given region,

00:14:53.000 --> 00:15:02.000
D, is vertically simple.
So, vertically simple means it

00:15:02.000 --> 00:15:09.000
looks like this.
It has top.

00:15:09.000 --> 00:15:16.000
It has a bottom.
And, it has some vertical sides.

00:15:16.000 --> 00:15:20.000
So, if you want,
if I look at it from above,

00:15:20.000 --> 00:15:25.000
it projects to some region in
the xy plane.

00:15:25.000 --> 00:15:30.000
Let's call that R.
And, it lives between the top

00:15:30.000 --> 00:15:34.000
face and the bottom face.
Let's say the top face is z

00:15:34.000 --> 00:15:37.000
equals z2 of (x,
y).

00:15:37.000 --> 00:15:42.000
Let's say the bottom face is z
equals z1(x, y).

00:15:42.000 --> 00:15:44.000
OK, and I don't need to know
actual formulas.

00:15:44.000 --> 00:15:47.000
I'm just going to work with
these and prove things

00:15:47.000 --> 00:15:50.000
independently of what the
formulas will be for these

00:15:50.000 --> 00:15:52.000
functions.
OK, so anyway,

00:15:52.000 --> 00:15:56.000
a vertically simple region is
something that lives above a

00:15:56.000 --> 00:15:59.000
part of the xy plane,
and is between two graphs of

00:15:59.000 --> 00:16:03.000
two functions.
So, let's see what we can do in

00:16:03.000 --> 00:16:10.000
that case.
So, the right-hand side of this

00:16:10.000 --> 00:16:20.000
equality, so that's the triple
integral, let's start computing

00:16:20.000 --> 00:16:23.000
it.
OK, so of course we will not be

00:16:23.000 --> 00:16:26.000
able to get a number out of it
because we don't know,

00:16:26.000 --> 00:16:28.000
actually, formulas for
anything.

00:16:28.000 --> 00:16:32.000
But at least we can start
simplifying because the way this

00:16:32.000 --> 00:16:36.000
region looks like,
I should say this is D,

00:16:36.000 --> 00:16:40.000
tells me that I can start
setting up the triple integral

00:16:40.000 --> 00:16:45.000
at least in the order where I
integrate first over z.

00:16:45.000 --> 00:16:53.000
OK, so I can actually do it as
a triple integral with Rz dz

00:16:53.000 --> 00:16:57.000
dxdy or dydx,
doesn't matter.

00:16:57.000 --> 00:17:01.000
So, what are the bounds on z?
See, this is actually good

00:17:01.000 --> 00:17:04.000
practice to remember how we set
up triple integrals.

00:17:04.000 --> 00:17:06.000
So, remember,
when we did it first over z,

00:17:06.000 --> 00:17:09.000
we start by fixing a point,
x and y,

00:17:09.000 --> 00:17:12.000
and for that value of x and y,
we look at a small vertical

00:17:12.000 --> 00:17:16.000
slice and see from where to
where we have to go.

00:17:16.000 --> 00:17:21.000
Well, we start at z equals
whatever the value is at the

00:17:21.000 --> 00:17:28.000
bottom, so, z1 of x and y.
And, we go up to the top face,

00:17:28.000 --> 00:17:32.000
z2 of x and y.
Now, for x and y,

00:17:32.000 --> 00:17:37.000
I'm not going to actually set
up bounds because I've already

00:17:37.000 --> 00:17:41.000
called R the quantity that I'm
integrating.

00:17:41.000 --> 00:17:45.000
So let me change this to,
let's say, U or something like

00:17:45.000 --> 00:17:47.000
that.
If you already have an R,

00:17:47.000 --> 00:17:49.000
I mean, there's not much risk
for confusion,

00:17:49.000 --> 00:17:53.000
but still.
OK, so we're going to call U

00:17:53.000 --> 00:17:59.000
the shadow of my region instead.
So, now I want to integrate

00:17:59.000 --> 00:18:01.000
over all values of x and y that
are in the shadow of my region.

00:18:01.000 --> 00:18:04.000
That means it's a double
integral over this region,

00:18:04.000 --> 00:18:06.000
U, which I haven't described to
you.

00:18:06.000 --> 00:18:09.000
So, I can't actually set up
bounds for x and y.

00:18:09.000 --> 00:18:12.000
But, I'm going to just leave it
like this.

00:18:12.000 --> 00:18:16.000
OK,
now you see,

00:18:16.000 --> 00:18:19.000
if you look at how you would
start evaluating this,

00:18:19.000 --> 00:18:22.000
well, the inner integral
certainly is not scary because

00:18:22.000 --> 00:18:25.000
you're integrating the
derivative of R with respect to

00:18:25.000 --> 00:18:27.000
z,
integrating that with respect

00:18:27.000 --> 00:18:33.000
to z.
So, you should get R back.

00:18:33.000 --> 00:18:39.000
OK, so triple integral over D
of Rz dV becomes,

00:18:39.000 --> 00:18:42.000
well, we'll have a double
integral over U of,

00:18:42.000 --> 00:18:49.000
so, the inner integral becomes
R at the point on the top.

00:18:49.000 --> 00:18:53.000
So, that means,
remember, R is a function of x,

00:18:53.000 --> 00:18:56.000
y, and z.
And, in fact,

00:18:56.000 --> 00:19:03.000
I will plug into it the value
of z at the top,

00:19:03.000 --> 00:19:13.000
so, z of xy minus the value of
R at the point on the bottom,

00:19:13.000 --> 00:19:16.000
x, y, z1 of x,
y.

00:19:16.000 --> 00:19:26.000
OK, any questions about this?
No?

00:19:26.000 --> 00:19:29.000
Is it looking vaguely
believable?

00:19:29.000 --> 00:19:32.000
Yeah? OK.
So, now, let's compute the

00:19:32.000 --> 00:19:34.000
other side because here we are
stuck.

00:19:34.000 --> 00:19:36.000
We won't be able to do anything
else.

00:19:36.000 --> 00:19:39.000
So, let's look at the flux
integral.

00:19:39.000 --> 00:19:43.000
OK, we have to look at the flux
of this vector field through the

00:19:43.000 --> 00:19:46.000
entire surface,
S, which is the whole boundary

00:19:46.000 --> 00:19:51.000
of D.
So, that consists of a lot of

00:19:51.000 --> 00:19:56.000
pieces, namely the top,
bottom, and the sides.

00:19:56.000 --> 00:20:04.000
OK, so the other side -- So,
let me just remind you,

00:20:04.000 --> 00:20:12.000
S is bottom plus top plus side
of this vector field,

00:20:12.000 --> 00:20:19.000
dot ndS equals,
OK, so what do we have?

00:20:19.000 --> 00:20:21.000
So first, we have to look at
the bottom.

00:20:21.000 --> 00:20:23.000
No, let's start with the top
actually.

00:20:23.000 --> 00:20:35.000
Sorry.
OK, so let's start with the top.

00:20:35.000 --> 00:20:43.000
So, just remind you,
let's do all of them.

00:20:43.000 --> 00:20:50.000
So, let's look at the top first.
So, we need to set up the flux

00:20:50.000 --> 00:20:52.000
integral for a vector field dot
ndS.

00:20:52.000 --> 00:20:56.000
We need to know what ndS is.
Well, fortunately for us,

00:20:56.000 --> 00:20:59.000
we know that the top face is
going to be the graph of some

00:20:59.000 --> 00:21:03.000
function of x and y.
So, we've seen a formula for

00:21:03.000 --> 00:21:06.000
ndS in this kind of situation,
OK?

00:21:06.000 --> 00:21:11.000
We have seen that ndS,
sorry, so, just to remind you

00:21:11.000 --> 00:21:16.000
this is the graph of a function
z equals z2 of x,

00:21:16.000 --> 00:21:21.000
y.
So, we've seen ndS for that is

00:21:21.000 --> 00:21:30.000
negative partial derivative of
this function with respect to x,

00:21:30.000 --> 00:21:35.000
negative partial z2 with
respect to y,

00:21:35.000 --> 00:21:38.000
one, dxdy.
OK, and, well,

00:21:38.000 --> 00:21:44.000
we can't compute these guys,
but it's not a big deal because

00:21:44.000 --> 00:21:47.000
if we do the dot product with

00:21:48.000 --> 00:21:51.000
dot ndS,
that will give us,

00:21:51.000 --> 00:21:53.000
well, if you dot this with
zero, zero, R,

00:21:53.000 --> 00:22:03.000
these terms go away.
You just have R dxdy.

00:22:03.000 --> 00:22:11.000
So, that means that the double
integral for flux through the

00:22:11.000 --> 00:22:19.000
top of R vector field dot ndS
becomes double integral of the

00:22:19.000 --> 00:22:23.000
top of R dxdy.
Now, how do we evaluate that,

00:22:23.000 --> 00:22:28.000
actually?
Well, so R is a function of x,

00:22:28.000 --> 00:22:29.000
y, z.
But we said,

00:22:29.000 --> 00:22:32.000
we have only two variables that
we're going to use.

00:22:32.000 --> 00:22:35.000
We're going to use x and y.
We're going to get rid of z.

00:22:35.000 --> 00:22:38.000
How do we get rid of z?
Well, if we are on the top

00:22:38.000 --> 00:22:41.000
surface, z is given by this
formula, z2 of x,

00:22:41.000 --> 00:22:45.000
y.
So, I plug z equals z2 of x,

00:22:45.000 --> 00:22:50.000
y into the formula for R,
whatever it may be.

00:22:50.000 --> 00:22:54.000
Then, I integrate dxdy.
And, what's the range for x and

00:22:54.000 --> 00:22:57.000
y?
Well, my surface sits exactly

00:22:57.000 --> 00:23:01.000
above this region U in the xy
plane.

00:23:01.000 --> 00:23:08.000
So, it's double integral over
U, OK?

00:23:08.000 --> 00:23:17.000
Any questions about how I set
up this flux integral?

00:23:17.000 --> 00:23:21.000
No?
OK, let me close the door,

00:23:21.000 --> 00:23:26.000
actually.
OK, so we've got one of the two

00:23:26.000 --> 00:23:31.000
terms that we had over there.
Let's try to get the others.

00:23:44.000 --> 00:23:49.000
[LAUGHTER] No comment.
OK, so, we need to look,

00:23:49.000 --> 00:23:56.000
also, at the other parts of our
surface for the flux integral.

00:23:56.000 --> 00:24:00.000
So, the bottom,
well, it will work pretty much

00:24:00.000 --> 00:24:03.000
the same way,
right, because it's the graph

00:24:03.000 --> 00:24:06.000
of a function,
z equals z1 of x,

00:24:06.000 --> 00:24:10.000
y.
So, we should be able to get

00:24:10.000 --> 00:24:17.000
ndS using the same method,
negative partial with respect

00:24:17.000 --> 00:24:23.000
to x, negative partial with
respect to y,

00:24:23.000 --> 00:24:26.000
one dxdy.
Now, there's a small catch.

00:24:26.000 --> 00:24:30.000
OK, we have to think of it
carefully about orientations.

00:24:30.000 --> 00:24:34.000
So,
remember, when we set up the

00:24:34.000 --> 00:24:38.000
divergence theorem,
we need the normal vectors to

00:24:38.000 --> 00:24:42.000
point out of our region,
which means that on the top

00:24:42.000 --> 00:24:46.000
surface,
we want n pointing up.

00:24:46.000 --> 00:24:50.000
But, on the bottom face,
we want n pointing down.

00:24:50.000 --> 00:24:52.000
So, in fact,
we shouldn't use this formula

00:24:52.000 --> 00:24:55.000
here because that one
corresponds to the other

00:24:55.000 --> 00:24:58.000
orientation.
Well, we could use it and then

00:24:58.000 --> 00:25:02.000
subtract, but I was just going
to say that ndS is actually the

00:25:02.000 --> 00:25:06.000
opposite of this.
So, I'm going to switch all my

00:25:06.000 --> 00:25:09.000
signs.
OK, that's the other side of

00:25:09.000 --> 00:25:13.000
the formula when you orient your
graph with n pointing downwards.

00:25:13.000 --> 00:25:18.000
Now, if I do things the same
way as before,

00:25:18.000 --> 00:25:24.000
I will get that <0,0,
R> dot ndS will be negative

00:25:24.000 --> 00:25:27.000
R dxdy.
And so,

00:25:27.000 --> 00:25:34.000
when I do the double integral
over the bottom,

00:25:34.000 --> 00:25:39.000
I'm going to get the double
integral over the bottom of

00:25:39.000 --> 00:25:42.000
negative R dxdy,
which, if I try to evaluate

00:25:42.000 --> 00:25:46.000
that,
well, I actually will have to

00:25:46.000 --> 00:25:48.000
integrate.
Sorry, first I'll have to

00:25:48.000 --> 00:25:53.000
substitute the value of z.
The value of z that I will want

00:25:53.000 --> 00:25:57.000
to plug into R will be given by,
now, z1 of x,

00:25:57.000 --> 00:26:00.000
y.
And, the bounds of integration

00:26:00.000 --> 00:26:04.000
will be given,
again, by the shadow of our

00:26:04.000 --> 00:26:07.000
surface, which is,
again, this guy,

00:26:07.000 --> 00:26:09.000
U.
OK, so we seem to be all set,

00:26:09.000 --> 00:26:12.000
except we are still missing one
part of our surface,

00:26:12.000 --> 00:26:14.000
S, because we also need to look
at the sides.

00:26:14.000 --> 00:26:20.000
Well, what about the sides?
Well, our vector field,

00:26:20.000 --> 00:26:23.000
,
is actually vertical.

00:26:23.000 --> 00:26:29.000
It's parallel to the z axis.
OK, so my vector field does

00:26:29.000 --> 00:26:35.000
something like this everywhere.
And, why that makes it very

00:26:35.000 --> 00:26:38.000
interesting on the top and
bottom, that means that on the

00:26:38.000 --> 00:26:40.000
sides, really not much is going
on.

00:26:40.000 --> 00:26:45.000
No matter is passing through
the vertical sides.

00:26:45.000 --> 00:26:57.000
So, the side -- The sides are
vertical.

00:26:57.000 --> 00:27:05.000
So, <0,0,
R> is tangent to the side,

00:27:05.000 --> 00:27:14.000
and therefore,
the flux through the sides is

00:27:14.000 --> 00:27:23.000
just going to be zero.
OK, no calculation needed.

00:27:23.000 --> 00:27:26.000
That's because, of course,
that's the reason why a

00:27:26.000 --> 00:27:31.000
simplified first things so that
my vector field would only have

00:27:31.000 --> 00:27:35.000
a z component,
well, not just that but that's

00:27:35.000 --> 00:27:39.000
the main place where it becomes
very useful.

00:27:39.000 --> 00:27:42.000
So, now, if I compare my double
integral and,

00:27:42.000 --> 00:27:45.000
sorry, my triple integral and
my flux integral,

00:27:45.000 --> 00:27:47.000
I get that they are,
indeed, the same.

00:28:03.000 --> 00:28:05.000
Well, that's the statement of
the theorem we are trying to

00:28:05.000 --> 00:28:17.000
prove.
I shouldn't erase it, OK?

00:28:17.000 --> 00:28:22.000
[LAUGHTER]
So, just to recap,

00:28:22.000 --> 00:28:32.000
we've got a formula for the
triple integral of R sub z dV.

00:28:32.000 --> 00:28:36.000
It's up there at the very top.
And, we got formulas for the

00:28:36.000 --> 00:28:39.000
flux through the top and the
bottom, and the sides.

00:28:39.000 --> 00:28:41.000
And, when you add them
together,

00:28:41.000 --> 00:28:47.000
you get indeed the same
formula,

00:28:47.000 --> 00:29:03.000
top plus bottom -- -- plus
sides of,

00:29:03.000 --> 00:29:08.000
OK, and so we have, actually,
completed the proof for this

00:29:08.000 --> 00:29:11.000
part.
Now, well, that's only for a

00:29:11.000 --> 00:29:14.000
vertically simple region,
OK?

00:29:14.000 --> 00:29:24.000
So, if D is not vertically
simple, what do we do?

00:29:24.000 --> 00:29:39.000
Well, we cut it into vertically
simple pieces.

00:29:39.000 --> 00:29:44.000
OK so, concretely,
I wanted to integrate over a

00:29:44.000 --> 00:29:48.000
solid doughnut.
Then, that's not vertically

00:29:48.000 --> 00:29:52.000
simple because here in the
middle, I have not only does top

00:29:52.000 --> 00:29:56.000
in this bottom,
but I have this middle face.

00:29:56.000 --> 00:29:59.000
So, the way I would cut my
doughnut would be probably I

00:29:59.000 --> 00:30:03.000
would slice it not in the way
that you'd usually slice the

00:30:03.000 --> 00:30:06.000
doughnut or a bagel,
but at it's probably more

00:30:06.000 --> 00:30:09.000
spectacular if you think that
it's a bagel.

00:30:09.000 --> 00:30:15.000
Then, a mathematician's way of
slicing it is like this into

00:30:15.000 --> 00:30:17.000
five pieces, OK?
And, that's not very convenient

00:30:17.000 --> 00:30:20.000
for eating,
but that's convenient for

00:30:20.000 --> 00:30:24.000
integrating over it because now
each of these pieces has a

00:30:24.000 --> 00:30:26.000
well-defined top and bottom
face,

00:30:26.000 --> 00:30:32.000
and of course you've introduced
some vertical sides for two

00:30:32.000 --> 00:30:35.000
reasons.
One is that we've said the flux

00:30:35.000 --> 00:30:40.000
through them is zero anyway.
So, who cares?

00:30:40.000 --> 00:30:43.000
Why bother?
But, also, if you sum the flux

00:30:43.000 --> 00:30:47.000
through the surface of each
little piece,

00:30:47.000 --> 00:30:50.000
well, you will see that you
will be integrating twice over

00:30:50.000 --> 00:30:52.000
each of these vertical cuts.
Once, when you do this piece,

00:30:52.000 --> 00:30:56.000
you will be taking the flux
through this red guy with normal

00:30:56.000 --> 00:31:00.000
vector pointing to the right,
and once, when you take this

00:31:00.000 --> 00:31:03.000
middle little piece,
you will be taking the flux

00:31:03.000 --> 00:31:07.000
through that cut surface again,
but now with normal vector

00:31:07.000 --> 00:31:09.000
pointing the other way around.
So, in fact,

00:31:09.000 --> 00:31:12.000
you'll be summing the flux
through these guys twice with

00:31:12.000 --> 00:31:15.000
opposite orientations.
They cancel out.

00:31:15.000 --> 00:31:18.000
Well, and again,
because of what you are doing

00:31:18.000 --> 00:31:20.000
actually, the integral was just
zero anyway.

00:31:20.000 --> 00:31:25.000
So, it didn't matter.
But, even if it hadn't

00:31:25.000 --> 00:31:30.000
simplified, that would do it for
us.

00:31:30.000 --> 00:31:32.000
OK, so that's how we do it with
the general region.

00:31:32.000 --> 00:31:34.000
And then, as I said at the
beginning,

00:31:34.000 --> 00:31:37.000
when we can do it for a vector
field that has only a z

00:31:37.000 --> 00:31:39.000
component,
well, we can also do it for a

00:31:39.000 --> 00:31:42.000
vector field that has only an x
or only a y component.

00:31:42.000 --> 00:31:45.000
And then, we sum together and
we get the general case.

00:31:45.000 --> 00:31:52.000
So, that's the end of the proof.
OK, so you see,

00:31:52.000 --> 00:31:55.000
the idea is really the same as
for Green's theorem.

00:31:55.000 --> 00:32:00.000
Yes?
Oh, there's only four pieces,

00:32:00.000 --> 00:32:05.000
thank you.
Yes, there's three kinds of

00:32:05.000 --> 00:32:13.000
mathematicians:
those who know how to count,

00:32:13.000 --> 00:32:30.000
and those who don't.
Well, OK.

00:32:30.000 --> 00:32:34.000
So, OK, now I hope that you can
see already the interest of this

00:32:34.000 --> 00:32:38.000
theorem for the divergence
theorem for computing flux

00:32:38.000 --> 00:32:42.000
integrals just for the sake of
computing flux integrals like

00:32:42.000 --> 00:32:46.000
might happen on the problem set
or on the next test.

00:32:46.000 --> 00:32:49.000
But let me tell you also why
it's important physically to

00:32:49.000 --> 00:32:54.000
understand equations that had
been observed empirically well

00:32:54.000 --> 00:32:57.000
before they were actually
understood in terms of how

00:32:57.000 --> 00:33:03.000
things go.
So, let's look at something

00:33:03.000 --> 00:33:10.000
called the diffusion equation.
So, let me explain to you what

00:33:10.000 --> 00:33:13.000
it does.
So, the diffusion equation is

00:33:13.000 --> 00:33:16.000
something that governs,
well, what's called diffusion.

00:33:16.000 --> 00:33:19.000
Diffusion is when you have a
fluid in which you are

00:33:19.000 --> 00:33:24.000
introducing some substance,
and you want to figure out how

00:33:24.000 --> 00:33:27.000
that thing is going to spread
out,

00:33:27.000 --> 00:33:30.000
the technical term is diffuse,
into the ambient fluid.

00:33:30.000 --> 00:33:36.000
So, for example,
that governs the motion of,

00:33:36.000 --> 00:33:43.000
say, smoke in the air,
or if you put dye in the

00:33:43.000 --> 00:33:49.000
solution or things like that.
That will tell you,

00:33:49.000 --> 00:33:53.000
say that you drop some ink into
a glass of water.

00:33:53.000 --> 00:33:57.000
Well, you can imagine that
obviously it will get diluted

00:33:57.000 --> 00:33:59.000
into there.
And, that equation will tell

00:33:59.000 --> 00:34:04.000
you how exactly over time this
thing is going to spread out and

00:34:04.000 --> 00:34:09.000
start filling the entire glass.
So, what's the equation?

00:34:09.000 --> 00:34:12.000
Well, we need,
first, to know what the unknown

00:34:12.000 --> 00:34:13.000
will be.
So, it's a partial differential

00:34:13.000 --> 00:34:16.000
equation, OK?
So the unknown is a function,

00:34:16.000 --> 00:34:20.000
and the equation will relate
the partial derivatives of that

00:34:20.000 --> 00:34:26.000
function to each other.
So, u, the unknown,

00:34:26.000 --> 00:34:36.000
will be the concentration at a
given point.

00:34:36.000 --> 00:34:38.000
And, of course,
that depends on the point where

00:34:38.000 --> 00:34:40.000
you are.
So, that depends on x,

00:34:40.000 --> 00:34:42.000
y, z, the location where you
are.

00:34:42.000 --> 00:34:45.000
But, since the goal is also to
understand how things spread

00:34:45.000 --> 00:34:47.000
over time, it should also depend
on time.

00:34:47.000 --> 00:34:51.000
Otherwise, we're not going to
get very far.

00:34:51.000 --> 00:34:53.000
And, in fact,
what the equation will give us

00:34:53.000 --> 00:34:55.000
is the derivative of u with
respect to t.

00:34:55.000 --> 00:34:59.000
It will tell us how the
concentration at a given point

00:34:59.000 --> 00:35:03.000
varies over time in terms of how
the concentration varied in

00:35:03.000 --> 00:35:06.000
space.
So, it will relate partial u

00:35:06.000 --> 00:35:10.000
partial t to partial derivatives
with respect to x,

00:35:10.000 --> 00:35:11.000
y, and z.

00:35:42.000 --> 00:35:43.000
[APPLAUSE]
OK, [LAUGHTER]

00:35:43.000 --> 00:35:48.000
so what's the equation?
The equation is partial u

00:35:48.000 --> 00:35:55.000
partial t equals some constant.
Let me call it constant k times

00:35:55.000 --> 00:36:01.000
something I will call del
squared u, which is also called

00:36:01.000 --> 00:36:05.000
the Laplacian of u,
and what is that?

00:36:05.000 --> 00:36:09.000
Well,
that means,

00:36:09.000 --> 00:36:14.000
OK, so just to scare you,
del squared is this,

00:36:14.000 --> 00:36:20.000
which means it's the divergence
of gradient u that we've used

00:36:20.000 --> 00:36:25.000
this notation for gradient.
OK, so if you actually expand

00:36:25.000 --> 00:36:29.000
it in terms of variables,
that becomes partial u over

00:36:29.000 --> 00:36:35.000
partial x squared plus partial
squared u over partial y squared

00:36:35.000 --> 00:36:40.000
plus partial squared u over
partial z squared.

00:36:40.000 --> 00:36:48.000
OK, so the equation is this
equals that.

00:36:48.000 --> 00:36:51.000
OK, so that's a weird looking
equation.

00:36:51.000 --> 00:36:54.000
And, I'm going to have to
explain to you,

00:36:54.000 --> 00:36:57.000
where does it come from?
OK, but before I do that,

00:36:57.000 --> 00:37:02.000
well, let me point out actually
that the equation is not just

00:37:02.000 --> 00:37:10.000
the diffusion equation.
It's also known as the heat

00:37:10.000 --> 00:37:15.000
equation.
And, that's because exactly the

00:37:15.000 --> 00:37:21.000
same equation governs how
temperature changes over time

00:37:21.000 --> 00:37:25.000
when you have,
again, so, sorry I should have

00:37:25.000 --> 00:37:28.000
been actually more careful.
I should have said this is in

00:37:28.000 --> 00:37:31.000
air that's not moving,
OK?

00:37:31.000 --> 00:37:32.000
OK, and same thing with the
solution.

00:37:32.000 --> 00:37:35.000
If you drop some ink into your
glass of water,

00:37:35.000 --> 00:37:38.000
well, if you start stirring,
obviously it will mix much

00:37:38.000 --> 00:37:40.000
faster than if you don't do
anything.

00:37:40.000 --> 00:37:43.000
OK, so that's the case where we
don't actually,

00:37:43.000 --> 00:37:47.000
the fluid is not moving.
And, the heat equation now does

00:37:47.000 --> 00:37:51.000
the same, but for temperature in
a fluid that's at rest,

00:37:51.000 --> 00:37:55.000
that's not moving.
It tells you how the heat goes

00:37:55.000 --> 00:37:58.000
from the warmest parts to the
coldest parts,

00:37:58.000 --> 00:38:03.000
and eventually temperatures
should somehow even out.

00:38:03.000 --> 00:38:08.000
So, in the heat equation,
that would just be,

00:38:08.000 --> 00:38:15.000
this u would just measure the
temperature for temperature of

00:38:15.000 --> 00:38:19.000
your fluid at a given point.
Actually, it doesn't have to be

00:38:19.000 --> 00:38:23.000
a fluid.
It could be a solid for that

00:38:23.000 --> 00:38:26.000
heat equation.
So, for example,

00:38:26.000 --> 00:38:31.000
say that you have a big box
made of metal or something,

00:38:31.000 --> 00:38:34.000
and you do some heating at one
side.

00:38:34.000 --> 00:38:38.000
You want to know how quickly is
the other side going to get hot?

00:38:38.000 --> 00:38:40.000
Well, you can use the equation
to figure out,

00:38:40.000 --> 00:38:44.000
you know, say that you have a
metal bar, and you keep one side

00:38:44.000 --> 00:38:46.000
at 400� because it's in your
oven.

00:38:46.000 --> 00:38:52.000
How quickly will the other side
get warm?

00:38:52.000 --> 00:38:57.000
OK, so it's the same equation
for both phenomena even though

00:38:57.000 --> 00:39:00.000
they are, of course,
different phenomena.

00:39:00.000 --> 00:39:02.000
Well, the physical reason why
they're the same is actually

00:39:02.000 --> 00:39:05.000
that phenomena are different,
but not all that much.

00:39:05.000 --> 00:39:07.000
They involve,
actually, how the atoms and

00:39:07.000 --> 00:39:11.000
molecules are actually moving,
and hitting each other inside

00:39:11.000 --> 00:39:14.000
this medium.
OK, so anyway,

00:39:14.000 --> 00:39:17.000
what's the explanation for
this?

00:39:17.000 --> 00:39:20.000
So, to understand the
explanation, and given what

00:39:20.000 --> 00:39:22.000
we've been doing,
we should have a vector field

00:39:22.000 --> 00:39:26.000
in there.
So, I'm going to think of the

00:39:26.000 --> 00:39:30.000
flow of, well,
let's imagine that we are doing

00:39:30.000 --> 00:39:35.000
motion of smoke in air.
So, that's the flow of the

00:39:35.000 --> 00:39:39.000
smoke: that means at every
point, it's a vector whose

00:39:39.000 --> 00:39:43.000
direction tells me in which
direction the smoke is actually

00:39:43.000 --> 00:39:47.000
moving.
And, its magnitude tells me how

00:39:47.000 --> 00:39:52.000
fast it's moving,
and also what amount of smoke

00:39:52.000 --> 00:39:56.000
is moving.
So, there's two things to

00:39:56.000 --> 00:40:01.000
understand.
One is how the disparities in

00:40:01.000 --> 00:40:06.000
the concentration between
different points causes the flow

00:40:06.000 --> 00:40:10.000
to be there,
how smoke will flow from the

00:40:10.000 --> 00:40:14.000
regions where there's more smoke
to the regions where there's

00:40:14.000 --> 00:40:17.000
less smoke.
And, that's actually physics.

00:40:17.000 --> 00:40:24.000
But, in a way,
it's also common sense.

00:40:24.000 --> 00:40:40.000
So, physics and common sense
tell us that the smoke will flow

00:40:40.000 --> 00:40:56.000
from high concentration towards
low concentration regions.

00:40:56.000 --> 00:41:01.000
OK, so if we think of this
function, U,

00:41:01.000 --> 00:41:04.000
that measures concentration,
that means we are always going

00:41:04.000 --> 00:41:07.000
to go in the direction where the
concentration decreases the

00:41:07.000 --> 00:41:09.000
fastest.
Well, what's that?

00:41:09.000 --> 00:41:25.000
That's negative the gradient.
So, F is directed along minus

00:41:25.000 --> 00:41:32.000
gradient u.
Now, how big is F going to be?

00:41:32.000 --> 00:41:35.000
Well, they are,
you have to come up with some

00:41:35.000 --> 00:41:39.000
intuition for how the two are
related.

00:41:39.000 --> 00:41:42.000
And, the easiest relation I can
think of is that they might be

00:41:42.000 --> 00:41:44.000
just proportional.
So, the steeper the differences

00:41:44.000 --> 00:41:47.000
in concentration,
the faster the flow will be,

00:41:47.000 --> 00:41:50.000
or the more there will be flow.
And, if you try to think about

00:41:50.000 --> 00:41:53.000
it as molecules moving in random
directions, you will see it

00:41:53.000 --> 00:41:56.000
makes actually complete sense.
Anyway, it should be part of

00:41:56.000 --> 00:42:00.000
your physics class,
not part of what I'm telling

00:42:00.000 --> 00:42:04.000
you.
So, I'm just going to accept

00:42:04.000 --> 00:42:12.000
that the flow is just
proportional to the gradient of

00:42:12.000 --> 00:42:13.000
u.
So, if you want,

00:42:13.000 --> 00:42:16.000
the differences between
concentrations of different

00:42:16.000 --> 00:42:18.000
points are very small,
then the flow will be very

00:42:18.000 --> 00:42:22.000
gentle.
And, if on the other hand you

00:42:22.000 --> 00:42:26.000
have huge disparities,
then things will try to even

00:42:26.000 --> 00:42:31.000
out faster.
OK, so that's the first part.

00:42:31.000 --> 00:42:35.000
Now, we need to understand the
second part, which is once we

00:42:35.000 --> 00:42:38.000
know how flow is going,
how does that affect the

00:42:38.000 --> 00:42:40.000
concentration?
If smoke is going that way,

00:42:40.000 --> 00:42:43.000
then it means the concentration
here should be decreasing.

00:42:43.000 --> 00:42:45.000
And there, it should be
increasing.

00:42:45.000 --> 00:42:58.000
So, that's the relation between
F and partial u partial t.

00:42:58.000 --> 00:43:07.000
At that part is actually math,
namely, the divergence theorem.

00:43:07.000 --> 00:43:19.000
So, let's try to understand
that part more carefully.

00:43:19.000 --> 00:43:25.000
So, let's take a small piece of
a small region in space,

00:43:25.000 --> 00:43:28.000
D, bounded by a surface,
S.

00:43:28.000 --> 00:43:33.000
So, I want to figure out what's
going on in here.

00:43:33.000 --> 00:43:42.000
So, let's look at the flux out
of D through S.

00:43:42.000 --> 00:43:49.000
Well, we said that this flux
would be given by double

00:43:49.000 --> 00:43:58.000
integral on S of F dot n dS.
So, this flux measures how much

00:43:58.000 --> 00:44:05.000
smoke is passing through S per
unit time.

00:44:05.000 --> 00:44:14.000
That's the amount of smoke
through S per unit time.

00:44:14.000 --> 00:44:19.000
But now, how can I compute that
differently?

00:44:19.000 --> 00:44:23.000
Well, I can compute it just by
looking at the total amount of

00:44:23.000 --> 00:44:26.000
smoke in this region,
and seeing how much it changes.

00:44:26.000 --> 00:44:29.000
If I'm gaining or losing smoke,
it means it must be going up

00:44:29.000 --> 00:44:32.000
there.
Well, unless I have a smoker in

00:44:32.000 --> 00:44:35.000
here, but that's not part of the
data.

00:44:35.000 --> 00:44:41.000
So,
that should be, sorry,

00:44:41.000 --> 00:44:44.000
that's the same thing as the
derivative with respect to t of

00:44:44.000 --> 00:44:47.000
the total amount of smoke in the
region,

00:44:47.000 --> 00:44:50.000
which is given by the triple
integral of u.

00:44:50.000 --> 00:44:52.000
If I integrate the
concentration of smoke,

00:44:52.000 --> 00:44:56.000
which means the amount of smoke
per unit volume over d,

00:44:56.000 --> 00:44:59.000
I will get the total amount of
smoke in d,

00:44:59.000 --> 00:45:02.000
except,
well,

00:45:02.000 --> 00:45:05.000
let's see.
This flux is counted positively

00:45:05.000 --> 00:45:07.000
if we go out of d.
So, actually,

00:45:07.000 --> 00:45:12.000
it's minus the derivative.
This is the amount of smoke

00:45:12.000 --> 00:45:16.000
that we are losing per unit
time.

00:45:16.000 --> 00:45:33.000
OK, so now we are almost there.
Well, let me actually --

00:45:33.000 --> 00:45:42.000
Because we know yet another way
to compute this guy using the

00:45:42.000 --> 00:45:48.000
divergence theorem.
Right, so this part here is

00:45:48.000 --> 00:45:53.000
just common sense and thinking
about what it means.

00:45:53.000 --> 00:46:00.000
The divergence theorem tells me
this is also equal to the triple

00:46:00.000 --> 00:46:06.000
integral, d, of div f dV.
So, what I got is that the

00:46:06.000 --> 00:46:15.000
triple integral over d of div F
dV equals this derivative.

00:46:15.000 --> 00:46:18.000
Well, let's think a bit about
this derivative so,

00:46:18.000 --> 00:46:20.000
see, you are integrating
function over x,

00:46:20.000 --> 00:46:22.000
y, and z.
And then, you are

00:46:22.000 --> 00:46:24.000
differentiating with respect to
t.

00:46:24.000 --> 00:46:28.000
I claim that you can actually
switch the order in which you do

00:46:28.000 --> 00:46:30.000
things.
So, when we think about it,

00:46:30.000 --> 00:46:33.000
is, here, you are taking the
total amount of smoke and then

00:46:33.000 --> 00:46:37.000
see how that changes over time.
So, you're taking the

00:46:37.000 --> 00:46:40.000
derivative of the sum of all the
small amounts of smoke

00:46:40.000 --> 00:46:42.000
everywhere.
Well, that will be the sum of

00:46:42.000 --> 00:46:47.000
the derivatives of the amounts
of smoke inside each little box.

00:46:47.000 --> 00:46:55.000
So, we can actually move the
derivatives into the integral.

00:46:55.000 --> 00:47:00.000
So, let's see,
I said minus d dt of triple

00:47:00.000 --> 00:47:07.000
integral over d udV.
And, now I'm saying this is the

00:47:07.000 --> 00:47:14.000
same as the triple integral in d
of du dt dv.

00:47:14.000 --> 00:47:19.000
And the reason why this is
going to work is you should

00:47:19.000 --> 00:47:24.000
think of it as d dt of a sum of
u of some values.

00:47:24.000 --> 00:47:30.000
You plug in the values of your
points at that given time times

00:47:30.000 --> 00:47:32.000
the small volume.
You sum them,

00:47:32.000 --> 00:47:33.000
and then you take the
derivative.

00:47:33.000 --> 00:47:42.000
And now, you see,
the derivative of this sum is

00:47:42.000 --> 00:47:49.000
the sum of the derivatives.
yi, zi, t, so,

00:47:49.000 --> 00:47:53.000
if you think about what the
integral measures,

00:47:53.000 --> 00:47:58.000
that's actually pretty easy.
And it's because this variable

00:47:58.000 --> 00:48:01.000
here is not the same as the
variables on which we are

00:48:01.000 --> 00:48:03.000
integrating.
That's why we can do it.

00:48:03.000 --> 00:48:13.000
OK, so now, if we have this for
any region, d.

00:48:13.000 --> 00:48:18.000
So, we have a function of x,
y, z, t, and we have another

00:48:18.000 --> 00:48:21.000
function here.
And whenever we integrate them

00:48:21.000 --> 00:48:23.000
anywhere, we get the same
answer.

00:48:23.000 --> 00:48:26.000
Well, that must mean they're
the same.

00:48:26.000 --> 00:48:29.000
Just think of what happens if
you just take d to be a tiny

00:48:29.000 --> 00:48:31.000
little box.
You will get roughly the value

00:48:31.000 --> 00:48:33.000
of div f at that point times the
volume of the box.

00:48:33.000 --> 00:48:36.000
Or, you will get roughly the
value of du dt at that point

00:48:36.000 --> 00:48:41.000
times the value of a little box.
So, the values must be the same.

00:48:41.000 --> 00:48:46.000
Well, let me actually explain
that a tiny bit better.

00:48:46.000 --> 00:48:50.000
So, what I get is that one
over, let me divide by the

00:48:50.000 --> 00:49:00.000
volume of D, sorry.
I promise, I'm done in a minute.

00:49:00.000 --> 00:49:08.000
Is the same thing as one over
volume D of negative du dt,

00:49:08.000 --> 00:49:10.000
dV.
So, that means the average

00:49:10.000 --> 00:49:12.000
value,
OK, maybe that's the best way

00:49:12.000 --> 00:49:17.000
of telling it,
the average of div f in D is

00:49:17.000 --> 00:49:27.000
equal to the average of minus
partial u partial t in D.

00:49:27.000 --> 00:49:30.000
And, that's true for any
region, D, not just for some

00:49:30.000 --> 00:49:33.000
regions, but for,
really, any region I can think

00:49:33.000 --> 00:49:37.000
of.
So, the outcome is that

00:49:37.000 --> 00:49:43.000
actually the divergence of f is
equal to minus du dt.

00:49:43.000 --> 00:49:47.000
And, that's another way to
think about what divergence

00:49:47.000 --> 00:49:48.000
means.
The divergence,

00:49:48.000 --> 00:49:50.000
we said, is how much stuff is
actually expanding,

00:49:50.000 --> 00:49:54.000
flowing out.
That's how much we're losing.

00:49:54.000 --> 00:49:58.000
And so, now,
if you combine this with that,

00:49:58.000 --> 00:50:02.000
you will get that du dt is
minus divergence f,

00:50:02.000 --> 00:50:08.000
which is plus K del squared u.
OK, so you combine this guy

00:50:08.000 --> 00:50:10.000
with that guy,
and you get the diffusion

00:50:10.000 --> 00:50:13.000
equation.