WEBVTT

00:00:00.035 --> 00:00:04.180
Vector calculus ends with the
divergence theorem and Stokes' theorem.

00:00:04.377 --> 00:00:06.920
They make the same startling promise:

00:00:07.117 --> 00:00:09.427
what a field does throughout
a region can be recovered

00:00:09.427 --> 00:00:11.355
from what it does on the boundary.

00:00:12.752 --> 00:00:16.965
The divergence theorem turns total
divergence inside a solid into flux

00:00:17.048 --> 00:00:19.023
through its closed surface.

00:00:19.219 --> 00:00:24.212
Stokes' theorem turns total curl through a
surface into circulation around its edge.

00:00:24.525 --> 00:00:28.206
Both replace an interior measurement
with a boundary measurement.

00:00:29.603 --> 00:00:32.157
Here is a vector field in the plane.

00:00:32.354 --> 00:00:34.302
At every point there's an arrow,

00:00:34.385 --> 00:00:37.962
and the honest way to read it
is as the velocity of a fluid.

00:00:38.159 --> 00:00:42.499
Put a speck of dust down somewhere, and
the arrow tells you which way it drifts,

00:00:42.582 --> 00:00:44.034
and how fast.

00:00:44.738 --> 00:00:49.104
Now draw a little closed loop around
the origin and ask one simple question.

00:00:49.208 --> 00:00:52.088
Is more fluid leaving
this loop than entering it?

00:00:52.284 --> 00:00:56.708
Here, obviously yes. Every single
arrow crosses it on the way out.

00:00:56.905 --> 00:00:59.216
Something inside is making fluid.

00:01:00.013 --> 00:01:02.196
Compare that with this second field.

00:01:02.393 --> 00:01:05.319
Same plane, but now the fluid is turning.

00:01:05.423 --> 00:01:09.731
It goes round and round the origin, and it
moves faster the further out you look.

00:01:10.783 --> 00:01:12.325
Draw the same loop on it.

00:01:12.408 --> 00:01:14.487
And now nothing crosses.

00:01:14.684 --> 00:01:17.727
The arrows run along
the loop, never through it.

00:01:17.923 --> 00:01:21.477
There is plenty of motion
here, and no outflow at all.

00:01:22.273 --> 00:01:26.649
That contrast is what divergence
measures. Not how fast the field is,

00:01:26.732 --> 00:01:30.715
not which way it points, but how
much of it is flowing out of a point.

00:01:30.818 --> 00:01:33.431
Positive divergence means a source.

00:01:33.628 --> 00:01:35.486
Negative means a sink.

00:01:35.590 --> 00:01:38.644
Zero means whatever
comes in goes out again.

00:01:39.441 --> 00:01:43.180
Hold on to that picture, because both
of today's theorems are built out of it.

00:01:43.377 --> 00:01:45.653
Now let's turn it into a formula.

00:01:46.708 --> 00:01:49.229
So let's turn that into a formula.

00:01:49.332 --> 00:01:50.598
If our field is F,

00:01:50.598 --> 00:01:56.253
then its divergence is written div
F, or nabla dot F, and here it is.

00:01:56.449 --> 00:02:01.245
The components P, Q and R
are functions of x, y and z.

00:02:02.041 --> 00:02:05.897
Take the first component
and differentiate it with respect to x.

00:02:06.093 --> 00:02:09.647
Take the second,
and differentiate with respect to y.

00:02:09.843 --> 00:02:12.224
Take the third with respect to z.

00:02:12.537 --> 00:02:14.616
Then add the three numbers up.

00:02:15.413 --> 00:02:19.834
That is genuinely all it is:
one derivative from each component,

00:02:19.917 --> 00:02:22.147
each matched to its own variable.

00:02:22.251 --> 00:02:24.875
And notice what kind of object comes out.

00:02:25.072 --> 00:02:28.602
F is a vector field,
an arrow at every point.

00:02:28.706 --> 00:02:31.632
Div F is a number at every point.

00:02:32.936 --> 00:02:34.469
Let's compute one.

00:02:34.666 --> 00:02:37.787
Our spreading field was F equals x, y.

00:02:37.870 --> 00:02:41.480
The first component is x,
so its x derivative is one.

00:02:41.563 --> 00:02:45.032
The second is y,
so its y derivative is one.

00:02:45.115 --> 00:02:46.184
Add them.

00:02:47.399 --> 00:02:51.440
Two, and positive,
which is exactly what the picture said.

00:02:51.636 --> 00:02:54.049
Fluid is being created at every point,

00:02:54.132 --> 00:02:57.593
so any loop you draw has more
coming out of it than going in.

00:02:57.790 --> 00:02:59.102
Here the divergence happens

00:02:59.102 --> 00:03:02.887
to be constant, but in general
it is a function of position.

00:03:04.284 --> 00:03:05.817
Now the swirl.

00:03:06.014 --> 00:03:08.508
F equals minus y, x.

00:03:08.591 --> 00:03:13.584
The first component is minus y,
and we differentiate it with respect to x.

00:03:13.781 --> 00:03:18.795
There is no x in it, so that derivative
is nothing. The second component is x,

00:03:18.878 --> 00:03:22.501
differentiated with respect
to y, and that is nothing too.

00:03:23.042 --> 00:03:25.966
So the divergence is zero, everywhere.

00:03:26.049 --> 00:03:27.777
And again the picture agrees.

00:03:27.860 --> 00:03:32.238
The fluid is moving, quite fast
in places, but none of it ever leaves.

00:03:32.434 --> 00:03:36.173
Motion and divergence are two different
questions, and this field is the cleanest

00:03:36.173 --> 00:03:37.834
reminder of that I know.

00:03:38.909 --> 00:03:40.162
Now the first theorem.

00:03:40.245 --> 00:03:45.061
Take a solid region in space, call it
E, and a vector field F living on it.

00:03:45.144 --> 00:03:49.766
The skin of that region, the closed
surface wrapping it up, is written del E.

00:03:50.376 --> 00:03:54.960
There are two completely different things
you could measure here. First, go inside.

00:03:55.043 --> 00:03:59.639
Compute the divergence at every point
of E and add it all up over the volume.

00:03:59.722 --> 00:04:03.252
That is the total rate
at which fluid is being produced in there.

00:04:04.049 --> 00:04:06.927
Second, forget the inside completely.

00:04:07.010 --> 00:04:11.072
Stand on the surface, and at each point
take the part of F pointing straight out,

00:04:11.155 --> 00:04:12.746
F dot n hat.

00:04:12.942 --> 00:04:15.323
Add that up over the whole skin.

00:04:15.520 --> 00:04:20.269
That is the flux, the net rate
at which fluid crosses the boundary.

00:04:21.066 --> 00:04:24.747
The divergence theorem says
those two numbers are equal.

00:04:24.944 --> 00:04:26.047
Always.

00:04:26.244 --> 00:04:29.655
Total production inside equals
total flow across the boundary,

00:04:29.738 --> 00:04:33.965
which, once you say it out loud,
is really just conservation of stuff.

00:04:35.269 --> 00:04:36.895
So why is it true?

00:04:37.092 --> 00:04:40.898
Keep the solid in view
and take one flat slice through it.

00:04:40.981 --> 00:04:44.488
The slice stands for a layer
of tiny cells filling the volume.

00:04:44.685 --> 00:04:48.587
We can understand the whole solid by
inspecting two neighbours in that layer.

00:04:49.383 --> 00:04:51.683
Here are those two neighbours enlarged.

00:04:51.880 --> 00:04:56.605
For each cell, the flux across its
boundary is its divergence contribution.

00:04:56.709 --> 00:05:01.365
When all the cells are added, the question
is what happens along every shared wall.

00:05:01.906 --> 00:05:05.796
The cell on the left counts that shared
wall with its outward normal pointing

00:05:05.796 --> 00:05:10.719
into the cell on the right. That direction
sets the sign of its flux contribution.

00:05:11.423 --> 00:05:15.173
The cell on the right counts the same
wall with its outward normal pointing back

00:05:15.173 --> 00:05:16.785
into the cell on the left.

00:05:16.868 --> 00:05:18.480
The two directions are opposite,

00:05:18.563 --> 00:05:21.827
so the two flux
contributions have opposite signs.

00:05:22.368 --> 00:05:27.474
Equal and opposite. Every interior wall
cancels against its partner, in pairs,

00:05:27.557 --> 00:05:29.358
all the way through the solid.

00:05:29.461 --> 00:05:34.513
Remove those interior boundaries and
what survives is only the outside skin.

00:05:35.565 --> 00:05:38.270
That is the entire proof, in spirit.

00:05:38.722 --> 00:05:41.788
The divergence theorem
is a bookkeeping identity.

00:05:41.892 --> 00:05:45.375
Interior faces cancel;
boundary faces don't.

00:05:46.428 --> 00:05:49.030
The second theorem needs
a different measurement.

00:05:49.133 --> 00:05:52.444
Divergence asked how much
of a field flows out of a point.

00:05:52.756 --> 00:05:54.766
Curl asks something else:

00:05:54.870 --> 00:05:57.424
how much the field turns around a point.

00:05:58.220 --> 00:06:00.459
Drop a tiny paddle wheel into the fluid,

00:06:00.542 --> 00:06:03.714
pinned at its centre
so that it can only spin.

00:06:03.910 --> 00:06:06.928
If the flow turns it,
the field has curl there.

00:06:07.242 --> 00:06:11.164
Curl is a vector: it points along
the axis the wheel spins about,

00:06:11.248 --> 00:06:13.628
and its length says how fast.

00:06:14.540 --> 00:06:15.432
In the plane,

00:06:15.516 --> 00:06:20.266
that axis is always straight up out
of the page, so only one number survives.

00:06:20.880 --> 00:06:24.082
For our swirling field, minus y and x,

00:06:24.166 --> 00:06:29.390
it comes out as two k hat, a constant
amount of spin at every single point.

00:06:31.206 --> 00:06:33.098
Now Stokes' theorem.

00:06:33.294 --> 00:06:36.938
Take a surface in space,
and this time not a closed one.

00:06:37.022 --> 00:06:39.542
A piece of one, like a butterfly net.

00:06:39.645 --> 00:06:42.712
Then del S is the curve
running round its rim.

00:06:43.252 --> 00:06:47.709
Choose a normal direction for the surface,
and walk that rim the matching way:

00:06:47.792 --> 00:06:51.590
the way that keeps the surface on your
left when your head points along n hat.

00:06:51.692 --> 00:06:55.466
Pairing those two directions up is the
only fiddly part of the whole theorem.

00:06:55.950 --> 00:06:58.178
And Stokes says this. The total

00:06:58.178 --> 00:07:02.906
curl passing through the surface equals
the circulation of F once around its rim.

00:07:03.702 --> 00:07:06.335
The left-hand side is a surface integral:

00:07:06.418 --> 00:07:09.307
at each point of S,
how much curl is aimed through it.

00:07:09.390 --> 00:07:13.350
The right-hand side is a line
integral: F dotted with the direction

00:07:13.350 --> 00:07:17.078
you are travelling, added up all
the way round the closed loop.

00:07:18.102 --> 00:07:20.634
And the reason
is the same trick as before.

00:07:20.739 --> 00:07:25.113
Chop the surface into little tiles, and
walk round the edge of every single tile,

00:07:25.196 --> 00:07:27.694
in the direction the normal tells you to.

00:07:28.490 --> 00:07:31.100
Every interior edge belongs to two tiles,

00:07:31.184 --> 00:07:34.354
and those two tiles walk
it in opposite directions.

00:07:34.667 --> 00:07:38.592
So it cancels, exactly
as the shared walls did a moment ago.

00:07:38.696 --> 00:07:40.829
All the little circulations collapse,

00:07:40.912 --> 00:07:43.862
and what is left
is the walk round the outer rim.

00:07:44.914 --> 00:07:49.942
Meanwhile each tiny loop's circulation
is its own curl times its own area.

00:07:50.047 --> 00:07:50.848
Add them all up

00:07:50.848 --> 00:07:55.214
and you get the surface integral on one
side and the boundary loop on the other.

00:07:55.410 --> 00:07:58.047
Same bookkeeping, one dimension down.

00:07:59.133 --> 00:08:01.407
Let's put the two
theorems one above the other,

00:08:01.490 --> 00:08:03.859
because the resemblance
is the whole point.

00:08:04.474 --> 00:08:09.685
First the divergence theorem: a triple
integral of div F over a solid region,

00:08:09.768 --> 00:08:13.635
equal to the flux of F out
through the closed surface around it.

00:08:14.431 --> 00:08:20.351
And then Stokes: a surface integral
of curl F over a piece of surface,

00:08:20.434 --> 00:08:24.417
equal to the circulation of F
once round the curve that bounds it.

00:08:25.329 --> 00:08:27.176
Now look at the shape of them.

00:08:27.791 --> 00:08:32.668
On the left of each one, a derivative
of F, integrated over a region.

00:08:32.865 --> 00:08:34.361
On the right of each one,

00:08:34.444 --> 00:08:38.554
F itself, integrated
over the boundary of that region.

00:08:38.751 --> 00:08:41.245
Div and curl are different derivatives,

00:08:41.328 --> 00:08:44.812
and a solid and a surface
are different regions.

00:08:45.516 --> 00:08:47.827
And you have met that sentence before.

00:08:48.024 --> 00:08:50.660
The fundamental theorem of calculus:

00:08:50.857 --> 00:08:56.581
integrate f prime across an interval,
and the answer is f at the two endpoints.

00:08:57.033 --> 00:09:00.587
The boundary of an interval
is just its two ends.

00:09:01.197 --> 00:09:03.427
Same sentence, every time.

00:09:03.624 --> 00:09:09.047
Integrate a derivative over a region, and
the answer is already written on the edge.

00:09:09.243 --> 00:09:11.250
That is what these theorems buy you:

00:09:11.333 --> 00:09:16.617
a hard integral over something fat,
traded for an easier one over its skin.

00:09:17.413 --> 00:09:18.377
So.

00:09:18.690 --> 00:09:24.505
Divergence measures outflow, curl measures
spin, and each of them has a theorem

00:09:24.588 --> 00:09:29.558
saying that the inside tells you
nothing the boundary has not already said.