Divergence 2

WEBVTT
Kind: captions
Language: en

00:00:00.680 --> 00:00:03.240
So where we left off I was
attempting to give you the

00:00:03.240 --> 00:00:05.420
intuition of divergence and
then I ran out of time.

00:00:05.420 --> 00:00:09.330
But anyway, I had defined this
fairly straightforward vector

00:00:09.330 --> 00:00:12.460
field that tells us the
velocity of particles in a

00:00:12.460 --> 00:00:13.755
fluid at any given point.

00:00:13.755 --> 00:00:15.580
And let me clean it
up a little bit.

00:00:15.580 --> 00:00:17.900
This one half I had all
these scratch offs.

00:00:17.900 --> 00:00:23.100
The velocity, I'm just going to
rewrite it, is equal to 1/2xi.

00:00:23.100 --> 00:00:25.750
So at any given point
has no y component.

00:00:25.750 --> 00:00:28.720
So all of the velocity is only
in the x direction -- there is

00:00:28.720 --> 00:00:31.340
no upwards movement
in the xy plane.

00:00:31.340 --> 00:00:32.530
And I was drawing it out.

00:00:32.530 --> 00:00:35.360
I said OK, when x is equal
to 1, the magnitude of the

00:00:35.360 --> 00:00:39.690
velocity is 1/2 maybe meters
per second, if that's our unit.

00:00:39.690 --> 00:00:42.430
When x is equal to 2, the
velocity to the right will

00:00:42.430 --> 00:00:45.250
be 1 meter per second,
right -- 1/2 times 2.

00:00:45.250 --> 00:00:48.580
So the further we go to the
right, or the more we go to the

00:00:48.580 --> 00:00:52.730
right, the faster the particles
are moving to the right.

00:00:52.730 --> 00:00:54.230
So now let's try to get
our handle on what

00:00:54.230 --> 00:00:55.130
divergence means.

00:00:55.130 --> 00:00:58.250
So first of all, let's
take that the divergence

00:00:58.250 --> 00:01:01.200
of this function.

00:01:01.200 --> 00:01:09.550
So that divergence of v, of our
velocity vector field -- you

00:01:09.550 --> 00:01:12.860
could also view that if you
want to abuse some notation,

00:01:12.860 --> 00:01:18.340
is our del vector, dot v.

00:01:18.340 --> 00:01:19.940
But if we only have one
dimension, so it's the

00:01:19.940 --> 00:01:26.390
partial derivative of the x
magnitude with respect to x.

00:01:26.390 --> 00:01:27.400
So what's the
partial derivative?

00:01:27.400 --> 00:01:30.470
So it's equal to the
partial derivative with

00:01:30.470 --> 00:01:31.860
respect to x, of 1/2x.

00:01:34.540 --> 00:01:36.460
So it's equal to -- well the
derivative of this with respect

00:01:36.460 --> 00:01:38.140
to x is just equal to 1/2 .

00:01:38.140 --> 00:01:40.000
So that divergence of
this vector field at

00:01:40.000 --> 00:01:42.300
any point is 1/2.

00:01:42.300 --> 00:01:44.600
Now what does that tell us?

00:01:44.600 --> 00:01:48.030
Well, if you just look at the
definition, right, we

00:01:48.030 --> 00:01:51.460
essentially just took the --
how much does the magnitude

00:01:51.460 --> 00:01:53.690
of the field increase
in the x direction?

00:01:53.690 --> 00:01:54.530
And we see it visually.

00:01:54.530 --> 00:01:57.550
As we go, increase in the x
direction, the field gets

00:01:57.550 --> 00:01:58.510
stronger and stronger.

00:01:58.510 --> 00:02:01.130
Or since we know that this is
the velocity of particles, as

00:02:01.130 --> 00:02:03.910
we go in the x direction, the
particles go faster and

00:02:03.910 --> 00:02:05.230
faster to the right.

00:02:05.230 --> 00:02:07.690
Now what this tells us, what
this positive divergence tells

00:02:07.690 --> 00:02:09.610
us is if we were to take
-- let's just take an

00:02:09.610 --> 00:02:12.500
arbitrarily small circle.

00:02:12.500 --> 00:02:15.310
I think it'll start to make
sense once I draw the circle.

00:02:15.310 --> 00:02:17.850
If I take an arbitrarily -- I'm
going to draw it in a different

00:02:17.850 --> 00:02:20.620
color -- and this circle could
be arbitrarily small, but I'm

00:02:20.620 --> 00:02:24.430
drawing it pretty large so
it can include some of our

00:02:24.430 --> 00:02:26.410
vectors that I've drawn.

00:02:26.410 --> 00:02:27.030
What's happening?

00:02:30.600 --> 00:02:33.640
On the right hand side, I have
particles exiting really,

00:02:33.640 --> 00:02:34.640
really fast, right?

00:02:34.640 --> 00:02:41.660
And let's say in a given amount
of time, let's say in one

00:02:41.660 --> 00:02:44.420
second, in one second out of
the right side, since the

00:02:44.420 --> 00:02:46.450
particles are moving really
fast, I'm going to have a

00:02:46.450 --> 00:02:49.630
bunch of particles leave
the right hand side, right?

00:02:49.630 --> 00:02:51.820
And in the same amount of time,
I will have some particles

00:02:51.820 --> 00:02:53.860
come in through the left hand
side, but it's going to be a

00:02:53.860 --> 00:02:55.470
fewer number of particles.

00:02:55.470 --> 00:02:58.290
So the way you could think
about it is in any given amount

00:02:58.290 --> 00:03:00.290
of time, what's happening?

00:03:00.290 --> 00:03:03.060
In this space, I have a few
particles entering in through

00:03:03.060 --> 00:03:05.990
the left, and I have a much
larger number of particle

00:03:05.990 --> 00:03:07.500
leaving through the right.

00:03:07.500 --> 00:03:10.110
So what's going to
happen in this space?

00:03:10.110 --> 00:03:12.660
It's going to become
less dense, right?

00:03:12.660 --> 00:03:14.850
Because in that space is going
to be fewer particles after

00:03:14.850 --> 00:03:15.750
a certain amount of time.

00:03:15.750 --> 00:03:18.200
More are leaving
than are coming in.

00:03:18.200 --> 00:03:22.700
So this positive divergence
tells us that at that point, or

00:03:22.700 --> 00:03:24.480
really at any point in this
vector field since the

00:03:24.480 --> 00:03:28.640
divergence is 1/2 everywhere,
at any point in this vector

00:03:28.640 --> 00:03:31.440
field, the field is
becoming less dense.

00:03:31.440 --> 00:03:34.100
Or you could say that more
is flowing out of any

00:03:34.100 --> 00:03:36.630
point than flowing in.

00:03:36.630 --> 00:03:37.530
It makes sense, right?

00:03:37.530 --> 00:03:39.990
Because if as we move to the
right, and it kind of gets

00:03:39.990 --> 00:03:43.950
funky if you go into the other
quadrant, so we'll stick to the

00:03:43.950 --> 00:03:46.320
first quadrant while we're
trying to get our intuition.

00:03:46.320 --> 00:03:49.140
But it makes sense, because
as we move to the right

00:03:49.140 --> 00:03:52.240
our particles are getting
faster and faster.

00:03:52.240 --> 00:03:56.630
And that kind of just falls out
of the fact that our derivative

00:03:56.630 --> 00:03:58.390
with respect to x is positive.

00:03:58.390 --> 00:04:04.520
The slope of how much
our x component is

00:04:04.520 --> 00:04:05.660
increasing is positive.

00:04:05.660 --> 00:04:09.190
So as we go to the right, our
velocities are going getting

00:04:09.190 --> 00:04:11.270
faster and faster, which means
if we were to draw a circle

00:04:11.270 --> 00:04:15.210
anywhere, we're always going to
have more exiting the right

00:04:15.210 --> 00:04:17.420
than entering through the left.

00:04:17.420 --> 00:04:19.750
So we're going to be getting
less dense at any given point.

00:04:19.750 --> 00:04:23.500
Or you could almost view it as
any given point is almost a

00:04:23.500 --> 00:04:26.790
source of particles, or if you
have a sphere, more particles

00:04:26.790 --> 00:04:29.000
are going to be coming out of
the sphere through the right,

00:04:29.000 --> 00:04:31.070
than coming in through
the sphere to the left.

00:04:31.070 --> 00:04:34.960
So you could view a positive
divergence as you could kind of

00:04:34.960 --> 00:04:40.130
say well, the field is becoming
less dense at that point, or

00:04:40.130 --> 00:04:45.270
the point is a source of the
field, or it's a source of

00:04:45.270 --> 00:04:49.130
particles, depending on what
model you want to use.

00:04:49.130 --> 00:04:51.956
Now, with that said, let's
take the opposite situation.

00:04:57.200 --> 00:05:00.650
Let's say that the vector
field is equal to is

00:05:00.650 --> 00:05:06.170
minus 1/2x times i.

00:05:06.170 --> 00:05:10.120
And so the divergence -- I'll
use this notation -- the

00:05:10.120 --> 00:05:13.190
divergence of our vector field
is just a partial derivative

00:05:13.190 --> 00:05:16.570
with respect to x, which
is just minus 1/2.

00:05:16.570 --> 00:05:21.242
If I were to graph it
-- this is my y-axis,

00:05:21.242 --> 00:05:22.170
this is my x-axis.

00:05:29.250 --> 00:05:32.620
So here at like, say, the
point 1, my velocity is

00:05:32.620 --> 00:05:35.320
going to be the left 1/2.

00:05:35.320 --> 00:05:39.390
At the point 2, my velocity
is going to be the left

00:05:39.390 --> 00:05:42.080
1 meter per second.

00:05:42.080 --> 00:05:47.960
At the velocity 3,
it's going to be 3/2.

00:05:47.960 --> 00:05:49.930
You know it doesn't
depend on y.

00:05:49.930 --> 00:05:50.660
It only depends on x.

00:05:53.770 --> 00:05:56.830
So now let's draw a
little circle and see

00:05:56.830 --> 00:05:58.050
what's happening.

00:05:58.050 --> 00:05:58.945
Let's draw it here.

00:05:58.945 --> 00:05:59.820
It could be anywhere.

00:05:59.820 --> 00:06:01.540
It's infinitely small,
but we're just trying

00:06:01.540 --> 00:06:02.840
to get some intuition.

00:06:02.840 --> 00:06:05.610
So after a certain amount
of time what's happening?

00:06:05.610 --> 00:06:06.850
Let's say after a second.

00:06:06.850 --> 00:06:10.520
Well, I'm having a few
particles leave through the

00:06:10.520 --> 00:06:13.350
left hand side, right, but I
have many more particles

00:06:13.350 --> 00:06:15.790
entering this little region
that I've defined, this little

00:06:15.790 --> 00:06:18.130
circle, I'm having many more
particles enter through the

00:06:18.130 --> 00:06:19.950
right in a given
amount of time.

00:06:19.950 --> 00:06:24.690
So in any given amount of time,
in my defined space, it's going

00:06:24.690 --> 00:06:25.640
to get denser and denser.

00:06:25.640 --> 00:06:27.180
There's going to be more
and more particles in

00:06:27.180 --> 00:06:30.180
that space over time.

00:06:30.180 --> 00:06:33.690
So it's getting denser or you
could almost view it as this

00:06:33.690 --> 00:06:35.125
space is sucking up particles.

00:06:37.920 --> 00:06:40.580
In the previous example it was
a source of particles -- more

00:06:40.580 --> 00:06:42.420
were coming out than going in.

00:06:42.420 --> 00:06:46.170
Now more going in through
the right than coming out.

00:06:46.170 --> 00:06:48.570
And that's what a
negative divergence.

00:06:48.570 --> 00:06:52.000
You could almost say --
let's think about the

00:06:52.000 --> 00:06:53.140
word, divergence.

00:06:53.140 --> 00:06:55.520
When it's positive, if I have
a positive divergence, the

00:06:55.520 --> 00:06:58.880
particles or the field is
diverting out of that point.

00:06:58.880 --> 00:07:01.240
If I have a negative
divergence -- maybe

00:07:01.240 --> 00:07:02.140
let's define a new term.

00:07:02.140 --> 00:07:04.210
I've never actually heard it
this way, but maybe a negative

00:07:04.210 --> 00:07:06.340
divergence we view as
a convergence, right?

00:07:06.340 --> 00:07:08.500
Converge is the
opposite of diverge.

00:07:08.500 --> 00:07:11.370
So here, even though some
particles are leaving through

00:07:11.370 --> 00:07:14.480
the left, many more particles
are coming through the

00:07:14.480 --> 00:07:17.340
right, so it's getting
denser and denser.

00:07:17.340 --> 00:07:19.040
And that's this example here.

00:07:19.040 --> 00:07:21.470
And actually at every point
in this field we have

00:07:21.470 --> 00:07:22.470
a negative divergence.

00:07:22.470 --> 00:07:25.660
So every point is getting
denser and denser actually

00:07:25.660 --> 00:07:27.370
everywhere in this field.

00:07:27.370 --> 00:07:29.880
And then the classic example of
a divergence, although I wanted

00:07:29.880 --> 00:07:32.750
to show you that what matters
is the net that's coming

00:07:32.750 --> 00:07:34.060
in to a certain area.

00:07:34.060 --> 00:07:36.790
But the classic example of a
divergence is a field that

00:07:36.790 --> 00:07:38.860
looks something like this.

00:07:38.860 --> 00:07:41.955
Where maybe that's the x --
that's the y, this is the x.

00:07:45.280 --> 00:07:50.150
If you have a field that looks
something like this, this is

00:07:50.150 --> 00:07:55.170
the classical example of a
negative divergence, right?

00:07:55.170 --> 00:07:57.210
Where from every direction
you have particles entering,

00:07:57.210 --> 00:07:58.020
nothing's leaving.

00:07:58.020 --> 00:08:01.980
So obviously, in any given
amount of time, that point is

00:08:01.980 --> 00:08:04.140
getting more and more dense.

00:08:04.140 --> 00:08:12.120
And the classic example of a
positive divergence is a point

00:08:12.120 --> 00:08:16.970
where from every direction
things are leaving it.

00:08:16.970 --> 00:08:20.160
So clearly this area is
going to become less dense.

00:08:20.160 --> 00:08:23.660
If we're talking about velocity
of particles, after any moment

00:08:23.660 --> 00:08:26.690
in time, more particles are
leaving than coming in because

00:08:26.690 --> 00:08:29.500
no particles are coming in.

00:08:29.500 --> 00:08:36.580
Now what does it mean if
we have a 0 divergence?

00:08:36.580 --> 00:08:43.500
So let's try to create a vector
field that has a 0 divergence.

00:08:43.500 --> 00:08:45.210
And we'll just stay at
a one-dimension just

00:08:45.210 --> 00:08:45.890
for the intuition.

00:08:45.890 --> 00:08:47.270
So that means that the
partial derivative with

00:08:47.270 --> 00:08:48.960
respect to x is 0.

00:08:48.960 --> 00:08:51.880
So let's say my
vector field is 5i.

00:08:51.880 --> 00:08:54.350
So the magnitude is always
5 in the i direction.

00:08:54.350 --> 00:08:55.420
So let me draw that.

00:09:02.490 --> 00:09:04.660
Vector field is always 5.

00:09:07.170 --> 00:09:08.750
Another way to think of it
if you have a constant

00:09:08.750 --> 00:09:10.580
vector field.

00:09:10.580 --> 00:09:13.230
So the magnitude of the
vectors, no matter what

00:09:13.230 --> 00:09:17.140
my value of x, is always
going to be the same.

00:09:17.140 --> 00:09:18.330
It's always going to be 5.

00:09:30.510 --> 00:09:36.590
So if I were to draw a region,
what's happening here?

00:09:36.590 --> 00:09:39.150
Are more particles
entering than leaving or

00:09:39.150 --> 00:09:40.010
leaving than entering?

00:09:40.010 --> 00:09:40.270
No.

00:09:40.270 --> 00:09:43.220
For any amount that's coming
in, an equal amount are coming

00:09:43.220 --> 00:09:45.820
out in a certain amount of
time, if we use velocity

00:09:45.820 --> 00:09:47.010
as our example.

00:09:47.010 --> 00:09:49.960
So when you have a divergence
of 0, that means that that part

00:09:49.960 --> 00:09:54.950
of the field is not becoming
any more or less dense.

00:09:54.950 --> 00:09:56.930
And you could have done it
-- let me show you another.

00:09:56.930 --> 00:10:03.580
If my function was, let's
say it equals 2i plus 2j.

00:10:03.580 --> 00:10:04.910
It's still a constant, right?

00:10:04.910 --> 00:10:08.370
So this velocity field or
vector field will look

00:10:08.370 --> 00:10:10.270
something like this.

00:10:10.270 --> 00:10:14.020
All the points would
be, the vectors would

00:10:14.020 --> 00:10:15.050
have a slope of 1.

00:10:15.050 --> 00:10:17.770
But I just wanted you to see
something in two dimensions.

00:10:17.770 --> 00:10:21.680
I'll do a fancier example
in the next video.

00:10:21.680 --> 00:10:25.270
But even here, if I were to
draw some region, the same

00:10:25.270 --> 00:10:27.650
amount is entering as exiting.

00:10:27.650 --> 00:10:29.690
So it's not getting any
denser at any point.

00:10:29.690 --> 00:10:33.510
And that makes sense because
the divergence of this vector

00:10:33.510 --> 00:10:36.980
field -- well, both of them
actually, the divergence

00:10:36.980 --> 00:10:37.820
of that vector field.

00:10:37.820 --> 00:10:39.685
The partial derivative
of 2 with respect to

00:10:39.685 --> 00:10:41.320
x, well that's 0.

00:10:41.320 --> 00:10:44.120
Plus the partial derivative
of 2 with respect to y.

00:10:44.120 --> 00:10:46.500
Well, that's also 0.

00:10:46.500 --> 00:10:48.180
Anyway, I've run
out of time again.

00:10:48.180 --> 00:10:51.170
I will see you in
the next video.


Divergence 3

WEBVTT
Kind: captions
Language: en

00:00:00.870 --> 00:00:03.490
Now let's do a slightly fancier
example, then we'll try to

00:00:03.490 --> 00:00:04.610
analyze the vector field.

00:00:04.610 --> 00:00:07.780
And hopefully this will
make everything a little

00:00:07.780 --> 00:00:08.580
bit more tangible.

00:00:08.580 --> 00:00:12.710
So let's say that the velocity
of the fluid, or the particles

00:00:12.710 --> 00:00:18.150
in the fluid, at any given
point in the x-y plane, let's

00:00:18.150 --> 00:00:28.490
say in the x-direction, it is x
squared, x squared minus 3x

00:00:28.490 --> 00:00:38.170
plus 2 in the x-direction, plus
y squared minus 3y plus

00:00:38.170 --> 00:00:39.770
2 in the y-direction.

00:00:39.770 --> 00:00:44.250
Make it simple so that we only
have one thing to factor.

00:00:44.250 --> 00:00:45.910
So let's just do
the math first.

00:00:45.910 --> 00:00:51.730
Let's figure out the divergence
of our vector field, the

00:00:51.730 --> 00:00:54.050
divergence of our field.

00:00:54.050 --> 00:00:56.280
And going to show you a graph
of this field soon, so we'll

00:00:56.280 --> 00:00:58.270
get an intuition of what it
actually looks like, instead of

00:00:58.270 --> 00:01:01.870
my not-so-accurate drawings.

00:01:01.870 --> 00:01:02.880
So what's the divergence?

00:01:02.880 --> 00:01:05.200
We take the partial derivative
of the x-component

00:01:05.200 --> 00:01:06.940
with respect to x.

00:01:06.940 --> 00:01:09.430
So that's just, there's only an
x-variable here, so we don't

00:01:09.430 --> 00:01:11.645
really have to worry about
keeping y or z constant.

00:01:11.645 --> 00:01:13.650
It's really just a derivative
of this expression

00:01:13.650 --> 00:01:15.150
with respect to x.

00:01:15.150 --> 00:01:19.820
So it's 2x minus 3.

00:01:19.820 --> 00:01:22.520
And then we add that to the
partial derivative of the

00:01:22.520 --> 00:01:25.290
y-component, or the y-function,
with respect to y.

00:01:25.290 --> 00:01:27.800
There's only y's in the
y-component, so we just

00:01:27.800 --> 00:01:29.000
take the derivative
with respect to y.

00:01:29.000 --> 00:01:34.910
So it's plus 2y minus 3.

00:01:34.910 --> 00:01:39.300
Or we could just say that the
divergence of v, at any point

00:01:39.300 --> 00:01:48.120
xy, so this is a function of x
and y, is 2x plus 2y minus 3.

00:01:48.120 --> 00:01:52.750
Now before I show you the
graph, let's analyze this

00:01:52.750 --> 00:01:54.010
function a little bit.

00:01:54.010 --> 00:01:56.270
First of all, let's just look
at the original vector field,

00:01:56.270 --> 00:02:01.750
and think about when does that
vector field have some

00:02:01.750 --> 00:02:03.400
interesting points?

00:02:03.400 --> 00:02:06.120
Well, I think some interesting
points are when either the x-

00:02:06.120 --> 00:02:08.020
or the y-components
are equal to 0.

00:02:08.020 --> 00:02:10.590
So when is the
x-component equal to 0?

00:02:10.590 --> 00:02:13.480
Well, if we factor the
x-component, that's the

00:02:13.480 --> 00:02:17.420
same thing as, we could
rewrite our vector field.

00:02:17.420 --> 00:02:23.010
If we just factored that,
that's x minus 1 times x minus

00:02:23.010 --> 00:02:29.910
2i plus, and it's the same
polynomial, just with y, for

00:02:29.910 --> 00:02:38.500
the y-component, so y minus
1 times y minus 2 times j.

00:02:38.500 --> 00:02:43.130
So the x-component is 0 when x
is equal to 1, these are just

00:02:43.130 --> 00:02:45.060
the roots of this polynomial,
when x is equal to

00:02:45.060 --> 00:02:47.050
1 or 2, right?

00:02:47.050 --> 00:02:51.980
And the y-component is 0
when y is equal to 1 or 2.

00:02:51.980 --> 00:02:54.790
And they're both equal to 0
if we have any combination

00:02:54.790 --> 00:02:55.420
of these points.

00:02:55.420 --> 00:03:02.240
So the points where they're
both equal to 0 are 1, 1, x's

00:03:02.240 --> 00:03:04.690
is 1, y is 2, right, because
then both components

00:03:04.690 --> 00:03:10.340
are 0, 2, 1, or 2, 2.

00:03:10.340 --> 00:03:15.090
So these are the points where
the magnitude of the velocity

00:03:15.090 --> 00:03:17.490
of our fluid, or the particles
of the fluid, are 0.

00:03:17.490 --> 00:03:20.200
And we'll see that on
our graph in a second.

00:03:20.200 --> 00:03:21.670
And let me ask
another question.

00:03:21.670 --> 00:03:26.960
At what points are, well, let's
first decide, what point is

00:03:26.960 --> 00:03:29.290
the divergence equal to 0?

00:03:29.290 --> 00:03:31.500
Let's say, at what point is
a divergence equal to 0.

00:03:31.500 --> 00:03:34.460
Let me click clear
up some space.

00:03:34.460 --> 00:03:35.570
I think I can delete this.

00:03:35.570 --> 00:03:40.140
We got our points, we figured
out what coordinates are the

00:03:40.140 --> 00:03:43.072
magnitude of the
vector field 0.

00:03:43.072 --> 00:03:47.790
So let's try to figure out,
when is the divergence

00:03:47.790 --> 00:03:49.870
equal to 0?

00:03:49.870 --> 00:03:50.940
So this is divergence.

00:03:50.940 --> 00:03:57.610
So if we set that equal
to 0, 2x plus 2y, 2x

00:03:57.610 --> 00:03:59.250
plus 2y, oh, sorry.

00:03:59.250 --> 00:04:01.330
You know what, this is 2x
minus 3 plus 2y minus 3.

00:04:01.330 --> 00:04:03.640
So this is minus 6, right?

00:04:03.640 --> 00:04:06.480
Minus 3 minus 3,
that's minus 6.

00:04:06.480 --> 00:04:09.880
That's my major flaw,
adding and subtracting.

00:04:09.880 --> 00:04:11.560
Anyway, so the divergence.

00:04:11.560 --> 00:04:14.710
2x plus 2y, minus 6.

00:04:14.710 --> 00:04:16.860
And we want to know,
when does that equal 0?

00:04:16.860 --> 00:04:19.950
So let's set it equal to 0.

00:04:19.950 --> 00:04:22.090
And we can simplify
this a little bit.

00:04:22.090 --> 00:04:25.760
We can divide both sides of the
equation by 2, and you get x

00:04:25.760 --> 00:04:28.940
plus y minus 3 is equal to 0.

00:04:28.940 --> 00:04:32.640
You get x plus y is equal to 3.

00:04:32.640 --> 00:04:35.190
We could be finished there, or
we could just put it in our

00:04:35.190 --> 00:04:39.690
traditional mx plus b form,
that's the way I find it

00:04:39.690 --> 00:04:41.330
easier to visualize a line.

00:04:41.330 --> 00:04:45.930
We could say y is
equal to 3 minus x.

00:04:45.930 --> 00:04:50.960
So along this line, the
divergence of the vector fields

00:04:50.960 --> 00:04:55.830
b is equal to 0, along the line
y is equal to 3 minus x.

00:04:55.830 --> 00:04:58.990
And if we're above that line,
the divergence is going to be

00:04:58.990 --> 00:05:02.210
positive, right, because if you
just made this a greater than

00:05:02.210 --> 00:05:03.520
sign, that would carry over.

00:05:03.520 --> 00:05:05.890
You'd have y is
greater than 3-x.

00:05:05.890 --> 00:05:13.640
So y greater than 3-x, the
divergence is positive.

00:05:13.640 --> 00:05:19.420
And y is less than 3 minus x,
the divergence is negative.

00:05:19.420 --> 00:05:21.880
And you could just make this a
less than sign then solve, and

00:05:21.880 --> 00:05:24.310
you'll get y is less than 3-x,
you want to know when the

00:05:24.310 --> 00:05:25.640
divergence is negative.

00:05:25.640 --> 00:05:28.510
So I think we've done all of
the analyzing we can do.

00:05:28.510 --> 00:05:31.020
So let's take a look at the
graph and see if it if it's

00:05:31.020 --> 00:05:33.760
consistent with our intuition
of what a divergence is,

00:05:33.760 --> 00:05:34.755
and the numbers we found.

00:05:37.480 --> 00:05:39.280
I hope you can see this.

00:05:39.280 --> 00:05:41.450
So this is the vector field.

00:05:41.450 --> 00:05:45.630
I don't have space to show it,
but I think you remember, this

00:05:45.630 --> 00:05:47.620
is, you know, x squared
minus 3x plus 2.

00:05:47.620 --> 00:05:50.370
This is the definition
of our vector field.

00:05:50.370 --> 00:05:51.590
Have it graphed here.

00:05:51.590 --> 00:05:55.040
And we figured out, we just
figured out when the

00:05:55.040 --> 00:05:57.130
x-components and the
y-components are equal to 0,

00:05:57.130 --> 00:05:58.980
and then we said, when are
both of them equal to 0?

00:05:58.980 --> 00:06:01.370
And we said, oh, well
at the point 1, 1.

00:06:01.370 --> 00:06:04.290
Well, this is the point 1, 1,
and we that the magnitudes of

00:06:04.290 --> 00:06:06.210
the vectors are 0
at that point.

00:06:06.210 --> 00:06:09.600
And actually, I could
zoom in a little bit.

00:06:09.600 --> 00:06:11.750
Right around here, they're all
pointing inwards,, but they get

00:06:11.750 --> 00:06:16.130
smaller and smaller as you
approach the point 1, 1, right?

00:06:16.130 --> 00:06:19.690
We also said at the point
1, 2. x is 1, y is 2.

00:06:19.690 --> 00:06:22.290
And here, too, we see that
the magnitude of the vectors

00:06:22.290 --> 00:06:24.680
get very, very, very small.

00:06:24.680 --> 00:06:26.480
We could zoom in again.

00:06:26.480 --> 00:06:29.020
And we see, the magnitude
gets very small.

00:06:29.020 --> 00:06:31.460
The other point, 2, 1, once
again, we see the magnitude

00:06:31.460 --> 00:06:33.060
get small, and then 2, 2.

00:06:33.060 --> 00:06:35.590
So that's consistent with what
we found out, that the vector

00:06:35.590 --> 00:06:37.980
field gets very small
at this point.

00:06:37.980 --> 00:06:39.900
And the other interesting
thing we said, OK, when does

00:06:39.900 --> 00:06:41.500
the divergence equal 0?

00:06:41.500 --> 00:06:46.160
Well, the divergence equaled
0 along the line y is

00:06:46.160 --> 00:06:48.800
equal to 3 minus x.

00:06:48.800 --> 00:06:52.250
So the line y is equal to 3
minus x starts, the y-intercept

00:06:52.250 --> 00:06:55.640
is going to be 3, and it's
going to come down like this.

00:06:55.640 --> 00:06:56.020
Right?

00:06:56.020 --> 00:06:58.730
So anything along, at any
point along that line,

00:06:58.730 --> 00:07:00.270
the divergence is 0.

00:07:00.270 --> 00:07:03.310
And if we actually look at
the graph, it makes sense.

00:07:03.310 --> 00:07:06.570
Because I can't draw on this
graph, but if we drew a circle

00:07:06.570 --> 00:07:11.450
right there, let's assume that
that's on that, the line y is

00:07:11.450 --> 00:07:14.920
equal to 3 minus x, we would
see that in a given amount of

00:07:14.920 --> 00:07:18.000
time, just as many particles
are entering through the top

00:07:18.000 --> 00:07:20.990
right as leaving through
the bottom left, right?

00:07:20.990 --> 00:07:23.670
A lot of entering through the
top right and a lot of leaving

00:07:23.670 --> 00:07:24.340
through the bottom left.

00:07:24.340 --> 00:07:26.740
And the vectors, though,
are about the same.

00:07:26.740 --> 00:07:32.030
And if we go to the bottom, if
we go here on the line, it

00:07:32.030 --> 00:07:35.860
looks like maybe there are less
entering, but there's

00:07:35.860 --> 00:07:36.970
also less leaving.

00:07:36.970 --> 00:07:39.520
I know it's hard to see, but
anywhere along the line,

00:07:39.520 --> 00:07:41.450
you see just as much
entering as leaving.

00:07:41.450 --> 00:07:45.240
And that's why the
divergence is 0.

00:07:45.240 --> 00:07:47.650
Now, let's look at some
of the other points.

00:07:47.650 --> 00:07:50.630
Up here, we figure the
diverge is positive.

00:07:50.630 --> 00:07:51.740
And does that make
[UNINTELLIGIBLE]

00:07:51.740 --> 00:07:53.310
an arbitrary point.

00:07:53.310 --> 00:07:57.150
If we were to draw a circle
around here, we see the vectors

00:07:57.150 --> 00:08:00.080
on the left-hand side of that
circle that you can't see,

00:08:00.080 --> 00:08:02.050
because I can't draw
on this graph.

00:08:02.050 --> 00:08:04.790
But actually, let's
just say the square.

00:08:04.790 --> 00:08:07.690
Let's say the square
is my region, right?

00:08:07.690 --> 00:08:09.210
This one right here.

00:08:09.210 --> 00:08:12.320
If that square is my region,
we see the vectors on the

00:08:12.320 --> 00:08:15.980
left-hand side are larger, than
factors leaving are larger than

00:08:15.980 --> 00:08:18.830
the vectors entering it, right?

00:08:18.830 --> 00:08:22.540
So if, in a given amount of
time, more is leaving than

00:08:22.540 --> 00:08:27.180
entering, then I'm becoming
less dense, or you could say

00:08:27.180 --> 00:08:28.860
that the particles
are diverging.

00:08:28.860 --> 00:08:32.070
And that makes sense, because
I have a positive divergence.

00:08:32.070 --> 00:08:35.210
And if we go here, where the
divergence is negative, let's

00:08:35.210 --> 00:08:36.880
pick an arbitrary spot.

00:08:36.880 --> 00:08:39.600
Let's say this
square right here.

00:08:39.600 --> 00:08:43.710
We see that the vectors
entering it, the magnitude of

00:08:43.710 --> 00:08:47.470
the vectors entering it, are
larger than the magnitude of

00:08:47.470 --> 00:08:48.800
the vectors exiting it.

00:08:48.800 --> 00:08:51.390
So in any given amount of time,
more is coming in than leaving.

00:08:51.390 --> 00:08:53.850
So it's getting denser,
or it's converging.

00:08:53.850 --> 00:08:56.600
So negative divergence, you can
view it as getting denser,

00:08:56.600 --> 00:08:58.610
or it's actually converging.

00:08:58.610 --> 00:09:00.770
Actually, something
interesting is happening

00:09:00.770 --> 00:09:04.240
at these two points.

00:09:04.240 --> 00:09:09.220
So we said that at the point
2, 1, we see that in the

00:09:09.220 --> 00:09:13.580
y-direction it's actually
converging, right?

00:09:13.580 --> 00:09:18.030
Above y is equal to 1, the
arrows are pointing down,

00:09:18.030 --> 00:09:20.630
and below it the arrows
are pointing up, right?

00:09:20.630 --> 00:09:23.310
So in the y-direction, we're
actually converging, or we

00:09:23.310 --> 00:09:24.490
have a negative divergence.

00:09:24.490 --> 00:09:26.990
Things are entering
any given spot.

00:09:26.990 --> 00:09:30.690
But in the x-direction, things
are getting pushed out, right?

00:09:30.690 --> 00:09:33.890
So the reason why the
divergence is 0 here, you might

00:09:33.890 --> 00:09:38.020
have particles entering above
and below a certain space, but

00:09:38.020 --> 00:09:41.090
you have just as many particles
exiting to the left

00:09:41.090 --> 00:09:41.650
and the right.

00:09:41.650 --> 00:09:44.160
So it's kind of like particles
are getting deflected out.

00:09:44.160 --> 00:09:48.710
So on a net basis, between both
dimensions, you have no

00:09:48.710 --> 00:09:52.030
increase or decrease in density
along that line y is

00:09:52.030 --> 00:09:53.680
equal to 3 minus x.

00:09:53.680 --> 00:09:56.180
And before I run out of time, I
just want to give you that core

00:09:56.180 --> 00:10:00.880
intuition again, of why the
divergence is positive, and why

00:10:00.880 --> 00:10:04.930
that means that things are
flowing out, when the rate

00:10:04.930 --> 00:10:06.300
of change is positive.

00:10:06.300 --> 00:10:07.590
So we said the
divergence is positive.

00:10:07.590 --> 00:10:09.420
Let's say at the spot, right?

00:10:09.420 --> 00:10:12.350
So it makes sense, if our
partial derivatives are

00:10:12.350 --> 00:10:15.710
positive, that means that the
magnitude of our vector is

00:10:15.710 --> 00:10:18.690
getting larger and larger for
larger values of our

00:10:18.690 --> 00:10:20.510
x's and y's, right?

00:10:20.510 --> 00:10:22.760
So if the magnitude of our
vectors are getting larger and

00:10:22.760 --> 00:10:26.120
larger for larger values of x
and y, the vectors on the

00:10:26.120 --> 00:10:28.310
right are going to have
a larger magnitude than

00:10:28.310 --> 00:10:29.290
the factors on the left.

00:10:29.290 --> 00:10:31.190
They're increasing
in magnitude.

00:10:31.190 --> 00:10:34.390
And so if I were to draw a
boundary, more is going to

00:10:34.390 --> 00:10:36.290
be coming out of the right
than entering to the left.

00:10:36.290 --> 00:10:39.220
And so you have a positive
diverge, or you're

00:10:39.220 --> 00:10:40.520
getting less dense.

00:10:40.520 --> 00:10:43.840
Anyway, I hope I haven't
confused you too much,

00:10:43.840 --> 00:10:45.690
but I have run out
of time once again.

00:10:45.690 --> 00:10:48.080
I'll see you in the next video.


Divergence 1

WEBVTT
Kind: captions
Language: en

00:00:01.960 --> 00:00:05.700
Let's try to get our heads
around the idea of divergence.

00:00:05.700 --> 00:00:07.890
So first, like I did with
gradients, I'll show you the

00:00:07.890 --> 00:00:10.050
mechanics, which are actually
pretty straightforward.

00:00:10.050 --> 00:00:12.280
And then I'll try to
give you the intuition.

00:00:12.280 --> 00:00:14.036
And once you have the
intuition, at first it

00:00:14.036 --> 00:00:16.820
will seemed very, I don't
know, unintuitive, maybe.

00:00:16.820 --> 00:00:18.610
But it once you get it,
you're like oh, that's it.

00:00:18.610 --> 00:00:21.380
So let's see what
divergence is.

00:00:21.380 --> 00:00:24.870
Let's say I have
a vector field.

00:00:24.870 --> 00:00:26.920
And let's say this vector
field, just for the purposes

00:00:26.920 --> 00:00:29.320
of visualization it could be
anything, but let's say it

00:00:29.320 --> 00:00:34.130
represents the velocity of
particles of fluid of any

00:00:34.130 --> 00:00:36.650
point in two dimensions.

00:00:36.650 --> 00:00:39.690
So it's going to be a
two-dimensional vector field.

00:00:39.690 --> 00:00:44.860
It's going to be a function of
x and y, so the velocity at any

00:00:44.860 --> 00:00:50.140
point-- it's a vector field --
let's say it is, and I'm just

00:00:50.140 --> 00:00:51.880
going to make up something.

00:00:51.880 --> 00:00:57.670
Let's say it's x squared, yi.

00:01:00.760 --> 00:01:03.710
So at any point in the
x-direction, at any point x

00:01:03.710 --> 00:01:06.730
comma y, its velocity in the
x-direction will

00:01:06.730 --> 00:01:07.860
be x squared, y.

00:01:07.860 --> 00:01:11.230
And then its velocity in the
y-direction, I don't know

00:01:11.230 --> 00:01:14.080
maybe it's just 3y, j.

00:01:17.920 --> 00:01:19.240
That's its velocity
in the x-direction.

00:01:19.240 --> 00:01:20.310
So its velocity in the
x-direction is actually

00:01:20.310 --> 00:01:21.680
a function of x and y.

00:01:21.680 --> 00:01:26.475
its velocity in the y-direction
is just a function of y.

00:01:26.475 --> 00:01:29.030
So what is the divergence?

00:01:29.030 --> 00:01:31.090
So a couple of ways
we can write it.

00:01:31.090 --> 00:01:35.560
The correct way to write
it is the divergence of

00:01:35.560 --> 00:01:38.170
our vector field, v.

00:01:38.170 --> 00:01:42.610
But a common mnemonic to
remember the operation of

00:01:42.610 --> 00:01:48.820
diverge and is to write the
upside down triangle, which was

00:01:48.820 --> 00:01:52.270
the same notation we used for
gradient, but take the dot

00:01:52.270 --> 00:01:55.630
product of that and the vector.

00:01:55.630 --> 00:01:59.980
And if you remember from the
gradient discussion, we said

00:01:59.980 --> 00:02:04.240
that you can view, although
it's kind of an abuse of

00:02:04.240 --> 00:02:09.440
notation, but you could view
this upside down triangle as

00:02:09.440 --> 00:02:16.070
being equal to the partial
derivative with respect to x in

00:02:16.070 --> 00:02:20.330
the x-direction plus the
partial derivative with respect

00:02:20.330 --> 00:02:25.320
to y in the y-direction,
which is the j-unit vector.

00:02:25.320 --> 00:02:27.180
And then if we went to three
dimensions, the partial

00:02:27.180 --> 00:02:29.170
derivative with respect to
z and the k-direction,

00:02:29.170 --> 00:02:29.870
et cetera, et cetera.

00:02:29.870 --> 00:02:32.590
But we're dealing with a
two-dimensional vector here,

00:02:32.590 --> 00:02:36.700
so let's just stick with
two dimensions, x and y.

00:02:36.700 --> 00:02:38.720
So what would this
turn out to be?

00:02:38.720 --> 00:02:45.520
If you took the dot product of
this, which is this upside down

00:02:45.520 --> 00:02:48.720
triangle, with this vector
field, what would you get?

00:02:48.720 --> 00:02:51.650
Well, you would just get the
partial derivative of the x

00:02:51.650 --> 00:02:56.150
dimension with respect to x, so
you would get-- it's actually

00:02:56.150 --> 00:02:57.950
pretty straight forward to
memorize; you might not even

00:02:57.950 --> 00:03:01.360
need this mnemonic right here,
this abuse of notation; you

00:03:01.360 --> 00:03:04.990
might just know it off hand
--the x component, you take the

00:03:04.990 --> 00:03:07.683
partial derivative with respect
to x, and the y component, you

00:03:07.683 --> 00:03:09.470
take the partial derivative
with respect to y.

00:03:09.470 --> 00:03:11.430
But I'll show you why it
looks like the dot product.

00:03:11.430 --> 00:03:13.790
So if you took the dot product
of that and that, it would be

00:03:13.790 --> 00:03:18.310
the partial derivative with
respect to x of that

00:03:18.310 --> 00:03:26.500
expression, of x squared, y and
then plus the partial

00:03:26.500 --> 00:03:33.170
derivative with respect to y of
that second expression, the y

00:03:33.170 --> 00:03:39.930
component of 3y, and then
you would evaluate it.

00:03:39.930 --> 00:03:42.950
What's the partial derivative
of this with respect to x?

00:03:42.950 --> 00:03:46.410
We just pretended y is a
constant, just a number, so

00:03:46.410 --> 00:03:48.670
the derivative of this with
respect to x, would be

00:03:48.670 --> 00:03:50.340
2x times the constant.

00:03:50.340 --> 00:03:58.810
So it'll be 2xy plus-- what's
the partial derivative

00:03:58.810 --> 00:04:00.460
of 3y with respect to y?

00:04:00.460 --> 00:04:02.295
Well, there's nothing else to
hold constant, so it's just

00:04:02.295 --> 00:04:03.930
like taking the derivative
with respect to y

00:04:03.930 --> 00:04:06.340
--so it's 2y plus 3.

00:04:06.340 --> 00:04:11.070
So this is the divergence
at a point x, y.

00:04:11.070 --> 00:04:13.290
You could almost view it
as a function of x and y.

00:04:13.290 --> 00:04:16.170
So you could almost say you
know, that the divergence of

00:04:16.170 --> 00:04:20.310
v-- I'm going to make up some
notation here --as long as you

00:04:20.310 --> 00:04:22.870
get the point across, you can
say that the divergence

00:04:22.870 --> 00:04:25.470
of v, that this is a
function of x and y.

00:04:25.470 --> 00:04:28.760
That we just have an expression
that if you give me a point

00:04:28.760 --> 00:04:31.290
anywhere in this vector
field, I can tell you the

00:04:31.290 --> 00:04:33.430
divergence at that point.

00:04:33.430 --> 00:04:36.640
So I think you'll find that
the computation of divergence

00:04:36.640 --> 00:04:37.910
isn't too difficult.

00:04:37.910 --> 00:04:41.260
You just take the partial
derivative of the x component

00:04:41.260 --> 00:04:44.550
with respect to x, and you add
that to the partial derivative

00:04:44.550 --> 00:04:46.480
to the y component
with respect to y.

00:04:46.480 --> 00:04:48.450
And if you had the z, you
would do the same thing,

00:04:48.450 --> 00:04:50.580
so on and so forth.

00:04:50.580 --> 00:04:53.130
Actually, let me do just do one
more just hit the point home,

00:04:53.130 --> 00:04:54.375
and then we'll work
on intuition.

00:04:57.650 --> 00:05:02.170
So if I said that I had, I
don't know, let's say, my

00:05:02.170 --> 00:05:10.455
vector field is cosine of yi
plus-- so it's interesting; my

00:05:10.455 --> 00:05:14.980
x-direction is dependent on
my y-coordinate --plus, I

00:05:14.980 --> 00:05:20.040
don't know, e to the xyj.

00:05:24.780 --> 00:05:27.820
So then oh, that's difficult
because I have these

00:05:27.820 --> 00:05:28.210
e's and these cosines.

00:05:28.210 --> 00:05:29.770
But we'll see; if you just
keep your head straight on

00:05:29.770 --> 00:05:32.150
what's constant and what's
not, it's not too bad.

00:05:32.150 --> 00:05:41.230
So the divergence of v is equal
to the partial derivative

00:05:41.230 --> 00:05:44.080
of this expression
with respect to x.

00:05:44.080 --> 00:05:46.050
Well, what's the derivative
of this with respect to x?

00:05:46.050 --> 00:05:49.200
If y is just a constant,
cosine of y is just a number.

00:05:49.200 --> 00:05:54.670
So the derivative of this with
respect to x is just 0 plus--

00:05:54.670 --> 00:05:57.110
what's the derivative of
this with respect to y?

00:05:57.110 --> 00:05:59.660
Well, you could just do x,
since it's a constant,

00:05:59.660 --> 00:06:01.130
as the coefficient on y.

00:06:01.130 --> 00:06:05.590
So the derivative of x, y
with respect to y is just x.

00:06:05.590 --> 00:06:09.830
And then the derivative of e
to anything is e to anything.

00:06:09.830 --> 00:06:11.670
I just did the chain rule.

00:06:11.670 --> 00:06:13.430
e to the x, y.

00:06:13.430 --> 00:06:15.100
And so that is the divergence.

00:06:15.100 --> 00:06:16.130
So you could just ignore this.

00:06:16.130 --> 00:06:18.490
It's x, e to the x, y.

00:06:18.490 --> 00:06:21.360
One thing to immediately
realize, even before we work on

00:06:21.360 --> 00:06:28.400
the intuition, is when we did
gradient I gave you a surface

00:06:28.400 --> 00:06:31.980
and it gave us a vector field.

00:06:31.980 --> 00:06:36.700
Or I gave you a scalar field
and you got a vector field.

00:06:36.700 --> 00:06:39.250
When you take the divergence of
something, you're going in the

00:06:39.250 --> 00:06:41.310
opposite direction,
in some ways.

00:06:41.310 --> 00:06:43.420
You start with the
vector field, right?

00:06:43.420 --> 00:06:44.170
And what's a factor field?

00:06:44.170 --> 00:06:46.770
It's something that if you
give me any point x and y,

00:06:46.770 --> 00:06:47.810
I'll give you a vector.

00:06:47.810 --> 00:06:50.830
So if you wanted to graph it,
in the x, y plane you'd have a

00:06:50.830 --> 00:06:53.120
bunch of vectors, and I'll show
you how that looks in a second

00:06:53.120 --> 00:06:55.200
when we go over to intuition.

00:06:55.200 --> 00:06:57.040
Well, when you take the
divergence of it, you get a

00:06:57.040 --> 00:06:59.000
value for any point x, y.

00:06:59.000 --> 00:07:02.080
So even though a vector field
has all these vectors on it,

00:07:02.080 --> 00:07:05.180
the divergence tells you an
actual scalar number at

00:07:05.180 --> 00:07:08.180
any point in the field.

00:07:08.180 --> 00:07:11.950
So let's get a little bit
of intuition of what a

00:07:11.950 --> 00:07:16.050
divergence actually is.

00:07:16.050 --> 00:07:19.040
Let me do it in one dimension.

00:07:19.040 --> 00:07:20.770
Or we can even, let's do it
in two dimensions, but I'll

00:07:20.770 --> 00:07:22.600
make it constant in the y.

00:07:22.600 --> 00:07:25.010
So let's say that my-- let me
erase this; I'll probably

00:07:25.010 --> 00:07:28.270
need some space.

00:07:28.270 --> 00:07:30.270
OK, oh, I didn't want
to do that dot.

00:07:30.270 --> 00:07:35.250
OK let's say the velocity of
fluid, or the particles in

00:07:35.250 --> 00:07:40.180
fluid, at any point in the x, y
plane, let's say it is equal to

00:07:40.180 --> 00:07:51.140
5xi plus, I don't know, 0y--
there's never any, sorry --0j,

00:07:51.140 --> 00:07:53.510
right? j is the unit vector
in the y-direction.

00:07:53.510 --> 00:07:56.190
So there's never a y component
to the velocity vector.

00:07:56.190 --> 00:07:57.250
So what would that look like?

00:07:57.250 --> 00:07:59.570
I don't need a computer
to draw this.

00:07:59.570 --> 00:08:03.480
I can handle this
one myself I think.

00:08:03.480 --> 00:08:07.250
So if that's the y-axis,
that's my x-axis.

00:08:10.400 --> 00:08:13.200
So when x is equal-- I'll just
sample some points and draw

00:08:13.200 --> 00:08:19.740
some vectors --when x is equal
to 1-- let's say x is 1 there

00:08:19.740 --> 00:08:22.580
--what's the magnitude
of this vector?

00:08:22.580 --> 00:08:26.740
It'll be 5, right?

00:08:26.740 --> 00:08:29.730
Actually, let me make this a
different number, because

00:08:29.730 --> 00:08:30.620
it'll make it hard to do.

00:08:30.620 --> 00:08:33.070
Let's make this 1/2 x.

00:08:33.070 --> 00:08:36.980
So when x is 1, the magnitude
of my vector is 1/2.

00:08:36.980 --> 00:08:37.850
Only in the x-direction.

00:08:37.850 --> 00:08:40.480
It has no y component;
ignore this right here.

00:08:40.480 --> 00:08:42.460
It's 1/2xi plus 0j.

00:08:42.460 --> 00:08:45.000
Or you could just say 1/2xi.

00:08:45.000 --> 00:08:47.180
And when x is equal to 2-- I
could have picked any points,

00:08:47.180 --> 00:08:48.600
but I'm just picking the
numbers that's easy to

00:08:48.600 --> 00:08:52.020
calculate --when x is equal to
2, what is the magnitude

00:08:52.020 --> 00:08:52.650
of the vector?

00:08:52.650 --> 00:08:55.420
It's 1/2 times 2, which is 1.

00:08:55.420 --> 00:08:56.870
So it's going to
be twice as big.

00:09:03.350 --> 00:09:07.160
And remember, if I have a
particle right here in my

00:09:07.160 --> 00:09:10.680
fluid, if this is a particle,
its velocity in the x-direction

00:09:10.680 --> 00:09:14.010
is going to be 1 meter
per second to the right.

00:09:14.010 --> 00:09:17.850
If I have a particle here, it's
velocity in the x-direction

00:09:17.850 --> 00:09:20.160
is going to be 1/2 a meter
per second to the right.

00:09:20.160 --> 00:09:21.720
Let's just do one more point.

00:09:21.720 --> 00:09:26.820
So let's say that
x is equal to 3.

00:09:26.820 --> 00:09:29.740
What's my velocity
to the right?

00:09:29.740 --> 00:09:31.210
I'll do it in a different
color just so that you

00:09:31.210 --> 00:09:32.310
don't get confused.

00:09:32.310 --> 00:09:34.440
There's going to be 3/2; it's
going to be even longer.

00:09:40.600 --> 00:09:43.550
But the general idea here,
and as we move up in x it

00:09:43.550 --> 00:09:44.710
doesn't change much, right?

00:09:44.710 --> 00:09:47.340
It doesn't change at all.

00:09:47.340 --> 00:09:48.786
Our x value doesn't--

00:09:48.786 --> 00:09:49.660
[COUGHS].

00:09:49.660 --> 00:09:54.280
So for any y, the magnitude
of the vector doesn't

00:09:54.280 --> 00:09:54.760
change, right?

00:09:54.760 --> 00:09:58.090
It's only dependent on x.

00:09:58.090 --> 00:10:01.000
And then for example, here,
it'll be even longer.

00:10:01.000 --> 00:10:03.950
If we draw the vector here
it'll be even longer, right?

00:10:03.950 --> 00:10:05.150
If you do it here.

00:10:05.150 --> 00:10:05.990
I think you get the point.

00:10:05.990 --> 00:10:08.830
The further you go to the
right, the faster the particles

00:10:08.830 --> 00:10:11.260
are moving towards the right.

00:10:11.260 --> 00:10:14.030
So now let's try to get a
little bit of intuition.

00:10:14.030 --> 00:10:16.870
Oh, I just realized that I ran
out of time, so I will continue

00:10:16.870 --> 00:10:19.370
this in the next video.


Gradient of a scalar field

WEBVTT
Kind: captions
Language: en

00:00:00.710 --> 00:00:04.270
In the last video we had a
three-dimensional surface,

00:00:04.270 --> 00:00:08.170
where the height z was
a function of x and y.

00:00:08.170 --> 00:00:10.760
And it gave us surface in
three-dimensional space.

00:00:10.760 --> 00:00:14.700
Now let's try to get our heads
around what the gradient

00:00:14.700 --> 00:00:19.340
of a function of three
variables looks like.

00:00:19.340 --> 00:00:22.920
So the easiest one for me to
imagine is a scalar field.

00:00:22.920 --> 00:00:24.440
So what's a scalar field?

00:00:24.440 --> 00:00:27.920
One that I find fairly
intuitive is temperature in

00:00:27.920 --> 00:00:29.140
a three-dimensional room.

00:00:29.140 --> 00:00:34.140
So let's say the temperature
in a room is a function of

00:00:34.140 --> 00:00:35.700
where I am in the room.

00:00:35.700 --> 00:00:42.670
So let's say it's a function of
my x, y, and z coordinates.

00:00:42.670 --> 00:00:45.340
And I don't know, I have never
actually modeled temperature.

00:00:45.340 --> 00:00:50.330
But let's say I have, I don't
know, a 20 kelvin-- actually,

00:00:50.330 --> 00:00:52.290
let me make it so that our
vector field works out right.

00:00:52.290 --> 00:00:54.460
Let's say we have a 10
kelvin heat force in

00:00:54.460 --> 00:00:57.950
the center of our room.

00:00:57.950 --> 00:01:00.650
I can imagine as you go further
and further away from that

00:01:00.650 --> 00:01:02.600
heat source it's going to
get colder and colder.

00:01:02.600 --> 00:01:04.940
So let's say that the
temperature function.

00:01:04.940 --> 00:01:07.810
And let's say that center of
the room is at the coordinates

00:01:07.810 --> 00:01:09.240
x, y, and z is equal to 0.

00:01:09.240 --> 00:01:11.170
So let's say our temperature
function-- I'm just making this

00:01:11.170 --> 00:01:23.880
up, I don't know if this is an
accurate model of temperature--

00:01:23.880 --> 00:01:31.700
it's equal to 10 times e
to the minus r squared.

00:01:31.700 --> 00:01:32.940
Now why did I say r?

00:01:32.940 --> 00:01:34.260
I said it's a function
of x, y, and z.

00:01:34.260 --> 00:01:39.350
Well I'm just saying that it
exponentially decays as you

00:01:39.350 --> 00:01:41.560
get further and further
away from that source.

00:01:41.560 --> 00:01:44.200
Kind of radially further and
further away from that source.

00:01:44.200 --> 00:01:46.440
So what's the radial
distance away?

00:01:46.440 --> 00:01:48.310
And this actually isn't that
relevant to learning gradients,

00:01:48.310 --> 00:01:50.320
but let's get a little
intuition about what that

00:01:50.320 --> 00:01:54.230
actual temperature function--
how it actually changes as

00:01:54.230 --> 00:01:56.210
you go through the room.

00:01:56.210 --> 00:02:01.030
So the radius away from the
center, that's just going to be

00:02:01.030 --> 00:02:06.030
r squared is just x squared
plus y squared plus z squared.

00:02:06.030 --> 00:02:09.070
That's just the Pythagorean
theorem in three dimensions.

00:02:09.070 --> 00:02:10.550
So let's write our
temperature function.

00:02:10.550 --> 00:02:18.840
So let's write temperature as
a function of x, y, and z is

00:02:18.840 --> 00:02:29.990
equal to 10 e to the minus x
squared plus y squared plus z

00:02:29.990 --> 00:02:33.370
squared-- which is exactly
what I wrote up here.

00:02:33.370 --> 00:02:35.790
Instead of x squared plus y
squared plus z squared, I wrote

00:02:35.790 --> 00:02:38.130
r squared, just to kind of give
you the intuition that this

00:02:38.130 --> 00:02:41.220
expression is just saying the
square of the distance as we

00:02:41.220 --> 00:02:45.010
get away from the center of
our room, or from the

00:02:45.010 --> 00:02:46.990
coordinate 0, 0, 0.

00:02:46.990 --> 00:02:48.310
But that's not what
we're learning here.

00:02:48.310 --> 00:02:50.880
But I want you to understand,
at least conceptualize this,

00:02:50.880 --> 00:02:53.350
it's hard to draw
a scalar field.

00:02:53.350 --> 00:02:57.460
All a scalar field means is
that in any point in this

00:02:57.460 --> 00:02:59.970
base-- and in this case we're
dealing with three-dimensional

00:02:59.970 --> 00:03:05.040
space-- at any point in that
space we can associate a value.

00:03:05.040 --> 00:03:05.840
And that makes sense.

00:03:05.840 --> 00:03:08.400
If you were to take a
thermometer and measure any

00:03:08.400 --> 00:03:11.180
point in space in the room
that you're in right now,

00:03:11.180 --> 00:03:12.540
you would get a temperature.

00:03:12.540 --> 00:03:14.590
You wouldn't get a temperature
and a direction, so it's

00:03:14.590 --> 00:03:16.250
not a vector field.

00:03:16.250 --> 00:03:17.530
You would just get
a temperature.

00:03:17.530 --> 00:03:19.510
And that's why it's
called a scalar field.

00:03:19.510 --> 00:03:21.090
Associated with every
coordinate is just

00:03:21.090 --> 00:03:22.610
a temperature.

00:03:22.610 --> 00:03:27.890
So how would we view the
gradient of this function?

00:03:27.890 --> 00:03:30.720
Well the gradient of this
function is going to tell us in

00:03:30.720 --> 00:03:33.290
which direction-- and actually,
the gradient of this function

00:03:33.290 --> 00:03:36.210
is going to generate a vector
field, because it's going to

00:03:36.210 --> 00:03:39.990
tell us in which direction
do we have the largest

00:03:39.990 --> 00:03:41.580
increase in temperature.

00:03:41.580 --> 00:03:44.660
And also, the magnitude of
those vectors in that vector

00:03:44.660 --> 00:03:47.230
field will tell us how large
of an increase in temperature

00:03:47.230 --> 00:03:48.320
we are looking at.

00:03:48.320 --> 00:03:52.910
Or you can kind of
view it as almost a

00:03:52.910 --> 00:03:55.220
three-dimensional slope.

00:03:55.220 --> 00:03:56.190
Hope that doesn't confuse you.

00:03:56.190 --> 00:03:59.260
So let's compute the gradient,
and then I'll show you a

00:03:59.260 --> 00:04:02.630
diagram that might make things
a little bit more intuitive.

00:04:02.630 --> 00:04:07.210
Let me erase this
thing down here.

00:04:07.210 --> 00:04:09.480
And I'm going to switch from
this blue color, because

00:04:09.480 --> 00:04:14.590
it's a little nauseating.

00:04:14.590 --> 00:04:22.540
So the gradient of T is going
to be equal to the partial

00:04:22.540 --> 00:04:28.490
derivative T with respect to x
times the unit vector in the x

00:04:28.490 --> 00:04:33.550
direction, plus the partial
derivative of the temperature

00:04:33.550 --> 00:04:38.940
function with respect to y
times the unit vector in the y

00:04:38.940 --> 00:04:43.740
direction, plus the partial
derivative of the temperature

00:04:43.740 --> 00:04:48.830
function with respect to z
times the unit vector

00:04:48.830 --> 00:04:50.080
in the z direction.

00:04:50.080 --> 00:04:52.180
And now we just plug and
chug and figure out the

00:04:52.180 --> 00:04:54.130
partial derivatives.

00:04:54.130 --> 00:05:00.470
So the gradient of T is equal
to-- now you might be daunted.

00:05:00.470 --> 00:05:05.250
Oh, I have an e to this three
variable function, how do I

00:05:05.250 --> 00:05:06.050
take the partial derivative?

00:05:06.050 --> 00:05:08.500
Remember, if you're taking the
partial derivative with respect

00:05:08.500 --> 00:05:12.140
to x you just pretend like the
y's and the z's are constants.

00:05:12.140 --> 00:05:14.360
So let's do that.

00:05:14.360 --> 00:05:19.500
So let's take the derivative
of the inside function.

00:05:19.500 --> 00:05:20.090
That's the way I view it.

00:05:20.090 --> 00:05:22.870
So minus x squared plus y
squared plus z squared,

00:05:22.870 --> 00:05:24.440
with respect to x.

00:05:24.440 --> 00:05:26.810
So you could distribute
this minus if you like.

00:05:26.810 --> 00:05:28.980
So it'd be minus x
squared minus y squared

00:05:28.980 --> 00:05:30.850
minus z squared.

00:05:30.850 --> 00:05:33.890
So the derivative of that with
respect to x is just going to

00:05:33.890 --> 00:05:36.715
be-- these are just constants,
so the derivative with

00:05:36.715 --> 00:05:38.180
respect to x is just 0.

00:05:38.180 --> 00:05:40.590
So the derivative is minus 2x.

00:05:40.590 --> 00:05:41.860
Right?

00:05:41.860 --> 00:05:45.670
Minus 2x is the derivative
of minus x squared.

00:05:45.670 --> 00:05:50.330
Minus 2x times the
derivative of the outside.

00:05:50.330 --> 00:05:52.510
Well, what's the
derivative of e to the x?

00:05:52.510 --> 00:05:55.100
The derivative of e to
the x is e to the x.

00:05:55.100 --> 00:05:57.990
That's why e is such
an amazing number.

00:05:57.990 --> 00:06:00.810
And this 10 here, this is just
a constant that when you take

00:06:00.810 --> 00:06:05.320
the derivative of a constant
times something the

00:06:05.320 --> 00:06:06.700
constant carries over.

00:06:06.700 --> 00:06:11.370
So the derivative of the
outside expression, the way I

00:06:11.370 --> 00:06:17.810
imagine it, is equal to 10 e
to the minus x squared plus

00:06:17.810 --> 00:06:21.860
y squared plus z squared.

00:06:21.860 --> 00:06:27.280
And then all of that times the
unit vector in the i direction.

00:06:27.280 --> 00:06:29.600
Right?

00:06:29.600 --> 00:06:34.040
And now we can do the same
thing for the y direction.

00:06:34.040 --> 00:06:35.790
So plus-- what's the
partial derivative of

00:06:35.790 --> 00:06:36.760
this with respect to y?

00:06:36.760 --> 00:06:37.820
Well it's going to
look very similar.

00:06:37.820 --> 00:06:39.803
The partial derivative of this
inner function with respect

00:06:39.803 --> 00:06:42.500
to y, it's minus y squared.

00:06:42.500 --> 00:06:43.250
So it's minus 2y.

00:06:46.670 --> 00:06:48.320
And then the derivative
of the whole thing is

00:06:48.320 --> 00:06:50.680
just itself again.

00:06:50.680 --> 00:06:55.680
So times 10 e to the
minus x squared plus y

00:06:55.680 --> 00:06:58.180
squared plus z squared.

00:06:58.180 --> 00:07:01.660
And then all of that times
the unit vector in the

00:07:01.660 --> 00:07:04.920
y direction times j.

00:07:04.920 --> 00:07:10.370
And then finally, the partial
derivative of the temperature

00:07:10.370 --> 00:07:12.140
function with respect to z.

00:07:12.140 --> 00:07:23.350
And that's just minus 2z times
10 e to the minus x squared

00:07:23.350 --> 00:07:25.500
plus y squared plus z squared.

00:07:25.500 --> 00:07:26.620
This is just the chain rule.

00:07:26.620 --> 00:07:28.690
And I'm treating the other two
variables that I'm not taking

00:07:28.690 --> 00:07:31.870
the partial derivative with
respect to, as constants.

00:07:31.870 --> 00:07:37.430
And then all of that times the
unit vector in the k direction.

00:07:37.430 --> 00:07:39.800
And we could simplify
this a little bit.

00:07:39.800 --> 00:07:42.040
You could have
minus 2x times 10.

00:07:42.040 --> 00:07:43.910
That's minus 20x.

00:07:43.910 --> 00:07:44.750
Let me write it up here.

00:07:44.750 --> 00:07:49.740
So the gradient of the
temperature function is equal

00:07:49.740 --> 00:07:58.120
to minus 20 e to the minus x
squared plus y squared-- you

00:07:58.120 --> 00:08:07.970
probably can't read this-- plus
z squared, times i minus 20y.

00:08:07.970 --> 00:08:09.860
And actually, I'm not going to
go into that, because I realize

00:08:09.860 --> 00:08:10.820
I'm running out of time.

00:08:10.820 --> 00:08:14.880
I think you can simplify
this algebraically.

00:08:14.880 --> 00:08:18.370
But anyway, the more important
thing is I always find with

00:08:18.370 --> 00:08:19.980
gradients it's easy to
calculate them, but the

00:08:19.980 --> 00:08:20.800
intuition-- oh sorry.

00:08:20.800 --> 00:08:21.680
This is also included.

00:08:21.680 --> 00:08:23.180
This is a k right here.

00:08:23.180 --> 00:08:25.520
The harder part is
the intuition.

00:08:25.520 --> 00:08:27.920
So let's get an intuition of
what this gradient function

00:08:27.920 --> 00:08:29.130
will actually look like.

00:08:29.130 --> 00:08:29.880
So what would happen.

00:08:29.880 --> 00:08:33.220
If you wanted to know the
gradient at any point in space,

00:08:33.220 --> 00:08:35.170
you would substitute an
x, y, and z in here.

00:08:35.170 --> 00:08:40.560
So you could write it as
the gradient function is a

00:08:40.560 --> 00:08:44.160
function of x, y, and z.

00:08:44.160 --> 00:08:48.170
Remember, T, the temperature at
any point, was a scalar field.

00:08:48.170 --> 00:08:49.820
At any point in three
dimensions it just

00:08:49.820 --> 00:08:50.890
gave you a number.

00:08:50.890 --> 00:08:53.040
Now when you have the gradient,
at any point in three

00:08:53.040 --> 00:08:55.100
dimensions it gives
you a vector.

00:08:55.100 --> 00:08:55.380
Right?

00:08:55.380 --> 00:08:57.950
Because it has i, j,
and k components.

00:08:57.950 --> 00:09:00.330
Where the magnitude are the
partial derivatives, and

00:09:00.330 --> 00:09:02.850
then the direction is
given by i, j, and k.

00:09:02.850 --> 00:09:06.990
So we've gone from having a
scalar field to a vector field.

00:09:06.990 --> 00:09:08.070
And let's see what
it looks like.

00:09:11.570 --> 00:09:14.120
And let me make it bigger so we
can explore it a little bit.

00:09:17.370 --> 00:09:19.480
I think that's pretty good.

00:09:19.480 --> 00:09:22.600
So this is the vector field.

00:09:22.600 --> 00:09:26.220
This is actually the gradient
of the function that

00:09:26.220 --> 00:09:29.220
we just solved for.

00:09:29.220 --> 00:09:34.170
And as you can see, at any
point-- and when this graphing

00:09:34.170 --> 00:09:36.780
program that did it, it just
picked different points and it

00:09:36.780 --> 00:09:38.620
calculated the gradients at
that point, and then it

00:09:38.620 --> 00:09:40.230
graphed them as vectors.

00:09:40.230 --> 00:09:44.550
So the length of the vectors
are just the magnitudes of

00:09:44.550 --> 00:09:46.170
the x, y, and z components.

00:09:46.170 --> 00:09:50.260
And then you add them together
like you would add any vectors.

00:09:50.260 --> 00:09:53.880
And then the direction is given
by the relative weighting of

00:09:53.880 --> 00:09:55.880
the i, j, and k components.

00:09:55.880 --> 00:09:58.440
And as you can see, the
intuition is pretty

00:09:58.440 --> 00:09:59.950
interesting.

00:09:59.950 --> 00:10:03.850
As you get closer and closer to
our heat source, the rate at

00:10:03.850 --> 00:10:07.440
which the temperature
increases, increases!

00:10:07.440 --> 00:10:07.720
Right?

00:10:07.720 --> 00:10:10.680
The vectors as you get closer,
get bigger and bigger.

00:10:10.680 --> 00:10:11.390
And let me zoom in.

00:10:11.390 --> 00:10:14.875
Let's actually fly in
to the vector field.

00:10:18.740 --> 00:10:20.620
So we're now within
the vector field.

00:10:20.620 --> 00:10:23.840
And you can see as we get
closer and closer to the center

00:10:23.840 --> 00:10:27.980
of our heat source, the
vectors, the rate at which the

00:10:27.980 --> 00:10:31.860
temperature increases, gets
bigger and bigger and bigger.

00:10:31.860 --> 00:10:34.450
Anyway, I hope I
didn't confuse you.

00:10:34.450 --> 00:10:36.950
When I first learned gradients,
I think the computation is

00:10:36.950 --> 00:10:37.840
relatively straightforward.

00:10:37.840 --> 00:10:39.130
It's just partial derivatives.

00:10:39.130 --> 00:10:41.660
But the intuition is always
the interesting thing.

00:10:41.660 --> 00:10:44.440
And hopefully this temperature
analogy-- and not even

00:10:44.440 --> 00:10:48.515
analogy-- this temperature
model will make a

00:10:48.515 --> 00:10:49.020
little sense to you.

00:10:49.020 --> 00:10:51.360
But it applies to pretty
much any scalar field.

00:10:51.360 --> 00:10:54.100
Anyway, I'll see you
in the next video.


Gradient 1

WEBVTT
Kind: captions
Language: en

00:00:00.850 --> 00:00:02.670
Let's learn a little bit about
the gradient, and we'll use the

00:00:02.670 --> 00:00:05.200
same function we've been using
since we're pretty familiar

00:00:05.200 --> 00:00:08.960
with it's graph and it's
partial derivatives.

00:00:08.960 --> 00:00:18.120
So let's say that f of x y is
equal to x squared plus x

00:00:18.120 --> 00:00:23.840
times y plus y squared.

00:00:23.840 --> 00:00:25.730
Now we're going to take the
gradient of this, and then I'll

00:00:25.730 --> 00:00:26.960
give you a little bit of
intuition on what

00:00:26.960 --> 00:00:27.800
a gradient is.

00:00:27.800 --> 00:00:32.310
We're going to take the
gradient in two-dimensional

00:00:32.310 --> 00:00:34.790
space, and you'll see what
that means in a second.

00:00:34.790 --> 00:00:38.350
You can extend this
to any dimension.

00:00:38.350 --> 00:00:41.810
So the gradient that we use
this vector differential

00:00:41.810 --> 00:00:47.820
operator-- this upside down
triangle-- the gradient of f is

00:00:47.820 --> 00:00:54.670
equal to the partial of f in
the x direction times the unit

00:00:54.670 --> 00:00:58.180
vector i-- which is the unit
vector in the x direction so it

00:00:58.180 --> 00:01:02.960
gives the magnitude of the
slope and the x direction, and

00:01:02.960 --> 00:01:06.720
then it points the vector in
that direction-- plus the

00:01:06.720 --> 00:01:11.000
partial with respect to
y in the j direction.

00:01:11.000 --> 00:01:12.860
And obviously if there's a
function of more variables you

00:01:12.860 --> 00:01:16.480
could keep going and you'd
multiply the magnitude of the

00:01:16.480 --> 00:01:20.630
derivative in each of those
dimension's directions times

00:01:20.630 --> 00:01:22.780
the unit vector in
that dimension.

00:01:22.780 --> 00:01:23.690
Well what does this mean?

00:01:23.690 --> 00:01:28.280
And another way to view it, you
could have also written this as

00:01:28.280 --> 00:01:33.910
the gradient of f is equal to
the partial with respect to x

00:01:33.910 --> 00:01:39.830
of f of x y and then all of
that in the i direction.

00:01:39.830 --> 00:01:41.320
This is just
different notation.

00:01:41.320 --> 00:01:48.740
Plus the partial with respect
to y times f of x y.

00:01:48.740 --> 00:01:50.550
Not times, operated
on f of x y.

00:01:50.550 --> 00:01:54.870
So the partial of f of x y
with respect to y times

00:01:54.870 --> 00:01:57.180
the j unit vector.

00:01:57.180 --> 00:02:01.960
And because of this notation, a
lot of people view this delta

00:02:01.960 --> 00:02:04.430
operator-- and actually it's
pretty consistent when we learn

00:02:04.430 --> 00:02:07.080
about the divergence and the
curl-- a lot of people view

00:02:07.080 --> 00:02:09.210
this delta operator, they
actually define it.

00:02:09.210 --> 00:02:14.300
They say that is equal to the
partial with respect to x in

00:02:14.300 --> 00:02:19.120
the i direction plus the
partial with respect to

00:02:19.120 --> 00:02:21.940
y in the j direction.

00:02:21.940 --> 00:02:26.200
And then if you wanted to do it
into three space-- that's not

00:02:26.200 --> 00:02:28.190
going to apply to our problem
because we only care about

00:02:28.190 --> 00:02:29.080
two dimensions right now.

00:02:29.080 --> 00:02:29.700
And you'll see what I mean.

00:02:29.700 --> 00:02:30.740
Because even though we're
applying it to a

00:02:30.740 --> 00:02:33.210
three-dimensional surface, but
then you can do the partial

00:02:33.210 --> 00:02:36.240
with respect to z
times the k vector.

00:02:36.240 --> 00:02:40.030
And then you could extend it to
n dimensions, but it becomes

00:02:40.030 --> 00:02:40.970
very hard to visualize.

00:02:40.970 --> 00:02:42.920
Actually it becomes hard
to visualize beyond what

00:02:42.920 --> 00:02:44.920
we're doing right now.

00:02:44.920 --> 00:02:48.250
So what does this mean?

00:02:48.250 --> 00:02:50.150
Well before I go into what it
means, let's actually calculate

00:02:50.150 --> 00:02:53.170
it for this and then I'll
show you what it means.

00:02:58.700 --> 00:03:01.620
Let's actually calculate
the gradient of f.

00:03:01.620 --> 00:03:05.790
So the gradient of our
particular function, it's a

00:03:05.790 --> 00:03:08.020
partial with respect to x.

00:03:08.020 --> 00:03:08.850
So we figure that out.

00:03:08.850 --> 00:03:12.050
That's 2x plus y, and then
that doesn't matter anymore.

00:03:12.050 --> 00:03:15.160
So it's 2x plus y.

00:03:15.160 --> 00:03:19.100
That's the partial of this
function with respect to x.

00:03:19.100 --> 00:03:22.195
And we multiply that in
the i direction, or

00:03:22.195 --> 00:03:23.750
in the x direction.

00:03:23.750 --> 00:03:28.705
Plus the partial with respect
to y, and this is 2y plus x.

00:03:31.540 --> 00:03:34.450
And we calculated this in
the two videos on the

00:03:34.450 --> 00:03:36.540
partial derivatives.

00:03:36.540 --> 00:03:40.090
And we multiply that
in the j direction.

00:03:40.090 --> 00:03:41.460
So what does that look like?

00:03:41.460 --> 00:03:45.030
Well what are each of the
components of this vector?

00:03:45.030 --> 00:03:48.110
What is 2x plus y in
the i direction?

00:03:48.110 --> 00:03:49.170
What does that
vector look like?

00:03:49.170 --> 00:03:52.240
What is 2y plus x in the
j direction look like?

00:03:52.240 --> 00:03:53.645
And this I have graphed.

00:03:57.010 --> 00:03:59.180
So this is the same surface
we've been working with, but

00:03:59.180 --> 00:04:01.330
now I've plotted these
points right here.

00:04:01.330 --> 00:04:05.300
These are just points that the
software has picked to actually

00:04:05.300 --> 00:04:07.740
display these vectors.

00:04:07.740 --> 00:04:10.880
And if you look at it,
this is the x-axis.

00:04:10.880 --> 00:04:12.630
And I can rotate this.

00:04:12.630 --> 00:04:14.130
I can pull it down
a little bit.

00:04:14.130 --> 00:04:16.620
And then I can spin it around.

00:04:16.620 --> 00:04:18.870
I think that's pretty neat.

00:04:18.870 --> 00:04:20.030
But anyway.

00:04:20.030 --> 00:04:22.200
This parallel to this
line is the vector in

00:04:22.200 --> 00:04:23.640
the x-axis, right?

00:04:23.640 --> 00:04:26.690
So at this point I've actually
calculated the gradient.

00:04:26.690 --> 00:04:30.750
This vector says, what is the
magnitude of this vector is the

00:04:30.750 --> 00:04:34.140
partial derivative of the
function, or the partial

00:04:34.140 --> 00:04:37.070
derivative of the surface,
or the partial derivative

00:04:37.070 --> 00:04:40.540
of z with respect to x.

00:04:40.540 --> 00:04:44.790
And it's direction, it just
goes in the x direction,

00:04:44.790 --> 00:04:47.950
because it's that times
the i unit vector.

00:04:47.950 --> 00:04:50.775
So this vector is the partial
derivative of z with respect

00:04:50.775 --> 00:04:54.550
to x times the i unit
vector at that point.

00:04:54.550 --> 00:04:56.110
So we just calculated
the partial derivative

00:04:56.110 --> 00:04:56.970
at that point.

00:04:56.970 --> 00:04:58.800
It gave this length.

00:04:58.800 --> 00:05:02.480
And then the direction is just
the i unit vector, or in the

00:05:02.480 --> 00:05:05.060
direction of increasing x.

00:05:05.060 --> 00:05:09.490
Similarly, this vector right
here-- I hope you can see it.

00:05:09.490 --> 00:05:13.950
Let me see if I can actually
zoom in a little bit.

00:05:13.950 --> 00:05:17.100
That might be useful.

00:05:17.100 --> 00:05:18.590
Zoom in, there you go.

00:05:22.110 --> 00:05:25.390
And I wanted to see the axes,
which you can't see now that

00:05:25.390 --> 00:05:28.650
I'm zoomed in, but you took my
word this was the x direction.

00:05:28.650 --> 00:05:31.040
Now this is the y direction,
or the same direction

00:05:31.040 --> 00:05:34.580
as the j unit vector.

00:05:34.580 --> 00:05:36.870
The j unit vector goes in
the same direction as y.

00:05:36.870 --> 00:05:40.390
And the magnitude is determined
by the partial derivative of z

00:05:40.390 --> 00:05:43.420
with respect to y
at that point.

00:05:43.420 --> 00:05:44.280
And that's the magnitude.

00:05:44.280 --> 00:05:46.130
And we saw there was some
symmetry, so the magnitude of

00:05:46.130 --> 00:05:48.590
this vector is the same as the
magnitude of this vector.

00:05:48.590 --> 00:05:50.660
And then when you add the
two vectors together,

00:05:50.660 --> 00:05:52.280
you get this vector.

00:05:52.280 --> 00:05:56.580
And notice that none of these
vectors have any dimensions

00:05:56.580 --> 00:05:59.120
in the z dimension.

00:05:59.120 --> 00:06:02.540
They're all kind of giving you
directions in the x y plane.

00:06:02.540 --> 00:06:03.930
And why is that interesting?

00:06:03.930 --> 00:06:07.160
Well the gradient-- and this is
the intuition-- the gradient

00:06:07.160 --> 00:06:12.400
tells you the direction in the
x y plane you should travel

00:06:12.400 --> 00:06:16.330
in order to get the maximum
slope in the z dimension.

00:06:16.330 --> 00:06:17.750
Or another way to view it.

00:06:17.750 --> 00:06:20.990
Remember the partial derivative
with respect to x said what is

00:06:20.990 --> 00:06:23.520
the slope in the x direction.

00:06:23.520 --> 00:06:25.675
The partial derivative with
respect to y said what is the

00:06:25.675 --> 00:06:26.710
slope in the y direction.

00:06:26.710 --> 00:06:29.000
But you could take the partial
derivative with respect to any

00:06:29.000 --> 00:06:32.420
direction, and the gradient
gives you the direction in

00:06:32.420 --> 00:06:35.000
which the slope is the largest.

00:06:35.000 --> 00:06:41.940
So let me zoom out a little bit
because I want you to see the

00:06:41.940 --> 00:06:50.970
actual axes There's the axes So
all this says if I were to

00:06:50.970 --> 00:06:53.800
go in this direction, I
get the maximum slope.

00:06:53.800 --> 00:06:57.620
So if I go in this direction,
my z goes up like that.

00:06:57.620 --> 00:07:02.060
Let me see if I can rotate
this a little bit.

00:07:02.060 --> 00:07:03.570
I don't want to
scale it anymore.

00:07:03.570 --> 00:07:04.495
Let me do the rotated.

00:07:07.550 --> 00:07:09.430
See if I can show that to you.

00:07:09.430 --> 00:07:17.440
So if I go in that direction in
the x y plane, I get maximum z.

00:07:17.440 --> 00:07:21.670
If I go in that direction I
get a maximum upward slope.

00:07:21.670 --> 00:07:24.740
That's what the gradient tells
you, how do you get the

00:07:24.740 --> 00:07:26.700
maximum upward slope.

00:07:26.700 --> 00:07:32.920
And if you were to take any
closed line where the z is

00:07:32.920 --> 00:07:35.410
constant-- well actually I
don't want to get into that too

00:07:35.410 --> 00:07:40.085
much, but this gradient will
actually be normal to any, or

00:07:40.085 --> 00:07:43.870
it'll be perpendicular to any
curve where z is constant.

00:07:43.870 --> 00:07:45.820
I don't want to get too
involved with that right

00:07:45.820 --> 00:07:47.750
now, so let's go back here.

00:07:47.750 --> 00:07:51.880
Maybe it's more clear if we
look from below the graph.

00:07:51.880 --> 00:07:54.020
So if you go to this point
right here, this is the

00:07:54.020 --> 00:07:57.160
magnitude of this vector,
shows what is the slope

00:07:57.160 --> 00:07:58.000
in the x direction.

00:07:58.000 --> 00:07:59.740
The magnitude of this vector
is what is the slope

00:07:59.740 --> 00:08:00.770
in the y direction.

00:08:00.770 --> 00:08:03.760
And then when you add them
together, you get the gradient.

00:08:03.760 --> 00:08:06.220
And the gradient says, well, if
I travel in this direction in

00:08:06.220 --> 00:08:11.150
the x y plane-- notice that
none of these have any z's.

00:08:11.150 --> 00:08:13.270
The plane defined by all
of these vectors is all

00:08:13.270 --> 00:08:16.950
flat in the z dimension.

00:08:16.950 --> 00:08:19.960
But if I would have traveled
this direction in the x y

00:08:19.960 --> 00:08:23.780
plane, then I will get the
maximum increase in z

00:08:23.780 --> 00:08:24.950
per unit that I travel.

00:08:24.950 --> 00:08:26.980
And let's actually show
you what it looks like

00:08:26.980 --> 00:08:27.700
in the x y plane.

00:08:27.700 --> 00:08:31.200
So if I just go head on-- so
I'm above the graph looking

00:08:31.200 --> 00:08:34.580
straight down at the graph, and
then the colors just show kind

00:08:34.580 --> 00:08:40.120
of you know where we are-- if I
travel in this direction in

00:08:40.120 --> 00:08:43.750
the x y plane, I get my
maximum increase in z.

00:08:43.750 --> 00:08:51.160
If I'm here-- notice here the x
component of the gradient is

00:08:51.160 --> 00:08:52.415
much larger than
the y component.

00:08:52.415 --> 00:08:54.970
So I need to travel a little
bit more in the x direction,

00:08:54.970 --> 00:08:58.470
and I'll get the maximum change
in z if I travel there.

00:08:58.470 --> 00:09:00.320
Another way to think about it.

00:09:00.320 --> 00:09:07.010
If I'm on a hill, the gradient
of that surface will tell you

00:09:07.010 --> 00:09:12.300
at any point what direction you
need to travel in to go

00:09:12.300 --> 00:09:13.450
up the hill fastest.

00:09:13.450 --> 00:09:16.600
Or the direction which
the steepness of the

00:09:16.600 --> 00:09:17.980
hill is maximum.

00:09:17.980 --> 00:09:23.210
This is more of a bowl as
opposed to a hill, but anyway.

00:09:23.210 --> 00:09:24.280
I'll just rotate it around.

00:09:24.280 --> 00:09:25.780
Hopefully that
makes some sense.

00:09:25.780 --> 00:09:27.320
And I want you to think
about it a little bit more.

00:09:27.320 --> 00:09:29.840
And we'll do a few more
problems where we just

00:09:29.840 --> 00:09:32.210
calculate gradients, just
because I think it's useful

00:09:32.210 --> 00:09:33.280
to get the mechanics.

00:09:33.280 --> 00:09:36.530
But in my opinion at least the
intuition is a little bit

00:09:36.530 --> 00:09:38.765
harder to get your head around
than the actual mechanics,

00:09:38.765 --> 00:09:41.130
but once you get it, it
makes a lot of sense.

00:09:41.130 --> 00:09:42.950
I will see you in
the next video.


Partial derivatives 2

WEBVTT
Kind: captions
Language: en

00:00:00.000 --> 00:00:03.440
Before we move on to other
functions, let's also take the

00:00:03.440 --> 00:00:08.090
partial derivative of our
function here, f of xy, or the

00:00:08.090 --> 00:00:11.000
partial derivative of
z with respect to y.

00:00:11.000 --> 00:00:13.520
So let's do it in magenta.

00:00:13.520 --> 00:00:20.310
So the partial derivative
of z with respect to y.

00:00:20.310 --> 00:00:23.220
Well, now we're saying how much
does z change with respect

00:00:23.220 --> 00:00:25.570
y if x is constant.

00:00:25.570 --> 00:00:28.560
So this x squared we
treat as a constant now.

00:00:28.560 --> 00:00:30.513
So the derivative of a
constant with respect to

00:00:30.513 --> 00:00:32.500
y is 0, so ignore it.

00:00:32.500 --> 00:00:34.650
Now this xy term.

00:00:34.650 --> 00:00:37.140
The way we're doing it
now is, y is a variable,

00:00:37.140 --> 00:00:38.520
x is a constant.

00:00:38.520 --> 00:00:41.040
So what is the derivative
of, I don't know, 5y

00:00:41.040 --> 00:00:41.920
with respect to y?

00:00:41.920 --> 00:00:42.680
Well it's 5.

00:00:42.680 --> 00:00:46.930
So the derivative of xy with
respect to y is just x.

00:00:46.930 --> 00:00:49.650
And what's the derivative of
y squared with respect to y?

00:00:49.650 --> 00:00:52.430
Well it's just 2y.

00:00:52.430 --> 00:00:54.520
So you can see it's
quite symmetric.

00:00:54.520 --> 00:00:58.900
The partial of z with respect
to x is 2x plus y, the

00:00:58.900 --> 00:01:01.380
partial of z with respect
to y is x plus 2y.

00:01:01.380 --> 00:01:03.280
That's because this equation
is pretty symmetric.

00:01:03.280 --> 00:01:06.330
The x's and the y's kind
of do the same thing.

00:01:06.330 --> 00:01:11.900
Now, we picked the point x is
equal to 0.2 y is equal to 0.3.

00:01:11.900 --> 00:01:16.140
Actually let me erase this,
because I picked a different

00:01:16.140 --> 00:01:18.110
point where I graph, and I
graphed it ahead of time

00:01:18.110 --> 00:01:21.600
just to save time.

00:01:21.600 --> 00:01:25.870
So I don't think I have
to include this anymore.

00:01:25.870 --> 00:01:35.560
So what I did, I picked
the point x is equal to

00:01:35.560 --> 00:01:39.760
0.3, y is equal to 0.3.

00:01:39.760 --> 00:01:42.510
And when x is equal to
0.3, y is equal to 0.3,

00:01:42.510 --> 00:01:44.310
what is z equal to?

00:01:44.310 --> 00:01:48.970
Let's see, 0.3 squared is
0.09, 0.3 times 0.3 0.09.

00:01:48.970 --> 00:01:52.130
So it's z is equal
to 0.27, right?

00:01:52.130 --> 00:01:54.860
Just substitute 0.3
in for x and y.

00:01:54.860 --> 00:01:57.020
z is equal to 0.27.

00:01:57.020 --> 00:01:59.700
So what is the partial
of z with respect

00:01:59.700 --> 00:02:01.080
to x at that point?

00:02:01.080 --> 00:02:06.190
Or we could write, f
sub x at the point y.

00:02:06.190 --> 00:02:08.990
x is equal to 0.3,
y is equal to 0.3.

00:02:08.990 --> 00:02:12.450
It equals, we figured that,
let's see 2 times 0.3 is 0.6,

00:02:12.450 --> 00:02:15.870
plus 0.3, that's equal to 0.9.

00:02:15.870 --> 00:02:19.720
So the slope in the x direction
at that point is 0.9.

00:02:19.720 --> 00:02:23.300
And if we take the partial with
respect to y at that same

00:02:23.300 --> 00:02:29.440
point, 0.3 plus 0.6,
that's also equal to 0.9.

00:02:29.440 --> 00:02:32.160
Let's see if we can
visualize this.

00:02:32.160 --> 00:02:33.330
Let me bring in my graph.

00:02:36.340 --> 00:02:36.880
There we go.

00:02:36.880 --> 00:02:41.880
So this is, this surface once
again is the surface of z is

00:02:41.880 --> 00:02:46.430
equal to x squared plus
xy plus y squared.

00:02:46.430 --> 00:02:50.320
And this box is kind of the
domain, and the x and y

00:02:50.320 --> 00:02:51.590
dimensions that I define.

00:02:51.590 --> 00:02:54.040
Kind of, I bounded it because
it starts to increase really

00:02:54.040 --> 00:02:57.130
fast, and you wouldn't be able
to see all this interesting

00:02:57.130 --> 00:02:59.100
stuff that happens closer in.

00:02:59.100 --> 00:03:02.190
But this, what I did, so this
vertical line, I just wanted

00:03:02.190 --> 00:03:06.160
to show you that when x is
equal to 0.3, y is equal

00:03:06.160 --> 00:03:08.770
to 0.3, z is equal to 0.7.

00:03:08.770 --> 00:03:12.740
So that just kind of helps show
you that, ok, that shows what

00:03:12.740 --> 00:03:14.950
point we're working with.

00:03:14.950 --> 00:03:18.620
And then these two lines, this
is, if you think about it, this

00:03:18.620 --> 00:03:23.080
is the line where y
is constant, right?

00:03:23.080 --> 00:03:28.810
So this is the slope in the
z, or as the surface changes

00:03:28.810 --> 00:03:31.580
with respect to x at
this point, right?

00:03:31.580 --> 00:03:35.005
This is the tangent
line relative to x.

00:03:35.005 --> 00:03:37.520
So you could kind of view
it as, if you hold y

00:03:37.520 --> 00:03:40.220
constant, here's a tangent
line at that point.

00:03:40.220 --> 00:03:43.420
And if you hold x constant,
here's a tangent

00:03:43.420 --> 00:03:44.510
line at that point.

00:03:44.510 --> 00:03:46.870
And like I said in the last
video, you can actually have

00:03:46.870 --> 00:03:47.980
infinite tangent lines.

00:03:47.980 --> 00:03:51.300
You have to pick the direction
that you want to go in the xy

00:03:51.300 --> 00:03:54.390
plane, and then you could
plot a tangent line.

00:03:54.390 --> 00:03:56.790
And so that's why we did
partial derivatives

00:03:56.790 --> 00:03:57.440
to begin with.

00:03:57.440 --> 00:03:59.470
Actually, this is pretty cool.

00:03:59.470 --> 00:04:08.890
We can actually take, we can
actually zoom in on this.

00:04:08.890 --> 00:04:10.230
Zoom it a little bit more.

00:04:10.230 --> 00:04:13.460
I want to zoom in on the
part that is interesting,

00:04:13.460 --> 00:04:14.660
let me translate this.

00:04:17.170 --> 00:04:19.960
So that's the part
that's interesting.

00:04:19.960 --> 00:04:21.830
And now let me rotate it.

00:04:21.830 --> 00:04:23.120
So you can actually rotate.

00:04:23.120 --> 00:04:24.652
So this is the tangent.

00:04:24.652 --> 00:04:28.140
This shows that the partial
of the function with respect

00:04:28.140 --> 00:04:30.790
to y, the slope is 0.9.

00:04:30.790 --> 00:04:34.640
And this line shows that the
partial of the slope, or the

00:04:34.640 --> 00:04:38.135
partial the function, sorry the
partial of z, or the partial of

00:04:38.135 --> 00:04:41.560
the function with respect to
x is 0.9, at this point.

00:04:41.560 --> 00:04:47.790
At the point x is 0.3, y is
0.3, right? x is 0.3, y is

00:04:47.790 --> 00:04:51.830
0.3, z is equal to 0.27.

00:04:51.830 --> 00:04:55.960
And we can rotate it just
to get more intuition.

00:04:55.960 --> 00:04:58.690
I think it's, the graphing
thing looks a little

00:04:58.690 --> 00:04:59.460
bit funny sometimes.

00:04:59.460 --> 00:05:00.810
But you see that both
of those lines are

00:05:00.810 --> 00:05:01.960
tangent at that point.

00:05:01.960 --> 00:05:05.807
And in fact, two lines define a
plane, and the plane that's

00:05:05.807 --> 00:05:09.960
defined by those two lines, or
any of the two tangent lines to

00:05:09.960 --> 00:05:13.230
that point, defines a tangent
plane to the surface.

00:05:13.230 --> 00:05:17.290
So a does have only one tangent
plane, but within a tangent

00:05:17.290 --> 00:05:20.990
plane, there are an infinite
number of tangent lines.

00:05:20.990 --> 00:05:23.380
Well anyway, that's the
fun with graphing.

00:05:23.380 --> 00:05:26.500
Now let's just chug through a
bunch of partial derivative

00:05:26.500 --> 00:05:31.680
problems just so that you get
used to the mathematics of it.

00:05:31.680 --> 00:05:32.420
Delete that.

00:05:35.120 --> 00:05:38.340
Let's do some that might
confuse you, so you

00:05:38.340 --> 00:05:39.720
see how to do them.

00:05:39.720 --> 00:05:44.040
Let's say that f of xy,
and I'm confining it

00:05:44.040 --> 00:05:44.630
to three dimensions.

00:05:44.630 --> 00:05:45.360
Although we can do it more.

00:05:45.360 --> 00:05:47.700
Actually, maybe I'll do it more
dimensions now that we're not

00:05:47.700 --> 00:05:49.180
going to try to visualize it.

00:05:49.180 --> 00:05:59.550
Let's say it's x sine
of x, cosine of y.

00:05:59.550 --> 00:06:03.160
So let's take the partial
of f with respect to x.

00:06:03.160 --> 00:06:07.080
This is still going to be
a function of x and y.

00:06:07.080 --> 00:06:11.200
So we treat y like a constant
So cosine of a constant, this

00:06:11.200 --> 00:06:12.820
is just going to be a constant.

00:06:12.820 --> 00:06:14.110
So we can almost ignore that.

00:06:14.110 --> 00:06:15.220
We could put that out front.

00:06:15.220 --> 00:06:18.740
We could say that it's going
to be cosine of y times the

00:06:18.740 --> 00:06:20.930
derivative of this
with respect to x.

00:06:20.930 --> 00:06:23.690
So you could say, cosine
of y, it's just a number.

00:06:23.690 --> 00:06:25.725
This cosine of y could
just be, I don't know,

00:06:25.725 --> 00:06:28.200
5 or pi, or whatever.

00:06:28.200 --> 00:06:29.380
Cosine of y.

00:06:29.380 --> 00:06:31.680
And then, because when you take
the derivative the constant

00:06:31.680 --> 00:06:33.140
just comes out of
the derivative.

00:06:33.140 --> 00:06:34.940
And then we would take the
derivative of the x's.

00:06:34.940 --> 00:06:36.410
So the derivative of the
first term with respect

00:06:36.410 --> 00:06:38.780
to x, well that's just 1.

00:06:38.780 --> 00:06:39.795
Times the second expression.

00:06:39.795 --> 00:06:44.250
So sine of x, I'm just doing
the product rule here.

00:06:44.250 --> 00:06:47.820
Plus the derivative of
the second expression,

00:06:47.820 --> 00:06:49.000
that's cosine of x.

00:06:53.710 --> 00:06:56.720
Cosine of x is the derivative
of the second expression, times

00:06:56.720 --> 00:06:59.460
the first expression, times x.

00:06:59.460 --> 00:07:03.570
So If we wanted to expand it
all out, the partial of f

00:07:03.570 --> 00:07:07.380
with respect to x, this is
the function of x and y.

00:07:07.380 --> 00:07:17.910
It equals sine of x, cosine of
y, plus, let's put this x out

00:07:17.910 --> 00:07:22.690
front, just so we change the
order. x, cosine of

00:07:22.690 --> 00:07:26.270
x, cosine of y.

00:07:26.270 --> 00:07:27.120
Not too difficult.

00:07:27.120 --> 00:07:28.740
You just have to realize
that anything with

00:07:28.740 --> 00:07:30.890
the y is a constant.

00:07:30.890 --> 00:07:32.540
So let's reverse it.

00:07:32.540 --> 00:07:33.260
Well, not reverse it.

00:07:33.260 --> 00:07:35.080
Let's take the partial
now in the y direction.

00:07:35.080 --> 00:07:37.760
How much does f change
in the y direction if

00:07:37.760 --> 00:07:39.350
we hold x constant.

00:07:39.350 --> 00:07:44.170
So the partial of f with
respect to y, still a

00:07:44.170 --> 00:07:46.080
function of x and y.

00:07:46.080 --> 00:07:47.790
The derivative in
that direction is a

00:07:47.790 --> 00:07:49.930
function of x and y.

00:07:49.930 --> 00:07:51.550
So now x is a constant.

00:07:51.550 --> 00:07:52.560
So this actually becomes
pretty straightforward.

00:07:52.560 --> 00:07:56.170
This whole x, sine of x,
if x is some number, 5,

00:07:56.170 --> 00:07:57.080
this is just a constant.

00:07:57.080 --> 00:07:59.750
So we can just write
that out front.

00:07:59.750 --> 00:08:02.420
So that's just x, sine of x.

00:08:02.420 --> 00:08:06.770
I know it's hard for you to get
used to saying that, oh, x sine

00:08:06.770 --> 00:08:08.020
of x, that's just a
constant number.

00:08:08.020 --> 00:08:09.240
Because you're so used to
taking the derivative

00:08:09.240 --> 00:08:09.950
with respect to x.

00:08:09.950 --> 00:08:11.290
And that's the hardest
part about doing these

00:08:11.290 --> 00:08:12.430
partial derivatives.

00:08:12.430 --> 00:08:13.950
But anyway, this is
just a constant term.

00:08:13.950 --> 00:08:15.290
And now we just take
the derivative of this

00:08:15.290 --> 00:08:16.690
with respect to y.

00:08:16.690 --> 00:08:18.610
The derivative of cosine
of y with respect to

00:08:18.610 --> 00:08:21.190
y is minus sine of y.

00:08:21.190 --> 00:08:21.950
I'll do that in yellow.

00:08:21.950 --> 00:08:23.730
Minus sine of y.

00:08:23.730 --> 00:08:26.770
I just want to put
the minus out front.

00:08:26.770 --> 00:08:29.000
Minus sine of y.

00:08:29.000 --> 00:08:30.030
There you have it.

00:08:30.030 --> 00:08:33.260
Let's do another one.

00:08:33.260 --> 00:08:35.050
And actually I'm going
to add more variables.

00:08:37.680 --> 00:08:41.200
Let's say that, I don't know,
just so you get used to

00:08:41.200 --> 00:08:42.260
the different notation.

00:08:42.260 --> 00:08:54.780
x is equal to a squared times,
I don't know, a squared times b

00:08:54.780 --> 00:09:00.360
to the third, times
c to the 1/2 power.

00:09:00.360 --> 00:09:03.250
Now what is the partial
derivative of x

00:09:03.250 --> 00:09:07.560
with respect to a?

00:09:07.560 --> 00:09:09.300
Well everything else
is just a constant.

00:09:09.300 --> 00:09:12.440
What's the partial of a
squared with respect to a?

00:09:12.440 --> 00:09:13.050
Well it's 2a.

00:09:13.050 --> 00:09:16.060
So it'll just be 2a
times the constants.

00:09:16.060 --> 00:09:19.580
Times b to the third,
c to the 1/2.

00:09:19.580 --> 00:09:22.010
I can actually get rid of
my parentheses there.

00:09:22.010 --> 00:09:26.420
What's the partial derivative
with respect to b?

00:09:26.420 --> 00:09:31.260
Ah, sorry, what's the partial
of x with respect to b?

00:09:31.260 --> 00:09:35.360
Well now, a squared and c to
the 1/2 are just constants.

00:09:35.360 --> 00:09:39.170
We can just write that. a
squared, c to the 1/2.

00:09:39.170 --> 00:09:40.710
And now we just take the
derivative with respect to b.

00:09:40.710 --> 00:09:41.850
Well that's 3b squared.

00:09:41.850 --> 00:09:44.160
Times 3b squared.

00:09:44.160 --> 00:09:48.390
If I just want to rearrange
it, that's 3a squared, b

00:09:48.390 --> 00:09:51.410
squared, c to the 1/2 power.

00:09:51.410 --> 00:09:52.160
Not too difficult.

00:09:52.160 --> 00:09:54.640
You just have to keep in mind
what's constant and what's not.

00:09:54.640 --> 00:10:00.290
And then finally, the partial
of x with respect to c.

00:10:00.290 --> 00:10:02.480
a squared, b to the third,
those are both constants.

00:10:02.480 --> 00:10:07.560
a squared, b to the third
times derivative of

00:10:07.560 --> 00:10:08.960
this with respect to c.

00:10:08.960 --> 00:10:12.120
1/2 c to the minus 1/2.

00:10:12.120 --> 00:10:17.510
Or we could rewrite this as
a squared, b to the third,

00:10:17.510 --> 00:10:19.710
over 2 square root of c.

00:10:19.710 --> 00:10:21.770
Just a little bit of
algebraic manipulation.

00:10:21.770 --> 00:10:25.560
Anyway, I will see you
in the next video.