WEBVTT

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

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

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

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

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

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

00:00:23.000 --> 00:00:25.000
Let me start by basically
listing the main things we have

00:00:25.000 --> 00:00:28.000
learned over the past three
weeks or so.

00:00:28.000 --> 00:00:31.000
And I will add a few
complements of information about

00:00:31.000 --> 00:00:34.000
that because there are a few
small details that I didn't

00:00:34.000 --> 00:00:38.000
quite clarify and that I should
probably make a bit clearer,

00:00:38.000 --> 00:00:48.000
especially what happened at the
very end of yesterday's class.

00:00:48.000 --> 00:00:56.000
Here is a list of things that
should be on your review sheet

00:00:56.000 --> 00:01:01.000
for the exam.
The first thing we learned

00:01:01.000 --> 00:01:08.000
about, the main topic of this
unit is about functions of

00:01:08.000 --> 00:01:12.000
several variables.
We have learned how to think of

00:01:12.000 --> 00:01:16.000
functions of two or three
variables in terms of plotting

00:01:16.000 --> 00:01:17.000
them.
In particular,

00:01:17.000 --> 00:01:19.000
well, not only the graph but
also the contour plot and how to

00:01:19.000 --> 00:01:27.000
read a contour plot.
And we have learned how to

00:01:27.000 --> 00:01:38.000
study variations of these
functions using partial

00:01:38.000 --> 00:01:44.000
derivatives.
Remember, we have defined the

00:01:44.000 --> 00:01:47.000
partial of f with respect to
some variable,

00:01:47.000 --> 00:01:52.000
say, x to be the rate of change
with respect to x when we hold

00:01:52.000 --> 00:01:55.000
all the other variables
constant.

00:01:55.000 --> 00:02:01.000
If you have a function of x and
y, this symbol means you

00:02:01.000 --> 00:02:07.000
differentiate with respect to x
treating y as a constant.

00:02:07.000 --> 00:02:15.000
And we have learned how to
package partial derivatives into

00:02:15.000 --> 00:02:20.000
a vector,the gradient vector.
For example,

00:02:20.000 --> 00:02:24.000
if we have a function of three
variables, the vector whose

00:02:24.000 --> 00:02:26.000
components are the partial
derivatives.

00:02:26.000 --> 00:02:33.000
And we have seen how to use the
gradient vector or the partial

00:02:33.000 --> 00:02:39.000
derivatives to derive various
things such as approximation

00:02:39.000 --> 00:02:43.000
formulas.
The change in f,

00:02:43.000 --> 00:02:48.000
when we change x,
y, z slightly,

00:02:48.000 --> 00:02:57.000
is approximately equal to,
well, there are several terms.

00:02:57.000 --> 00:03:03.000
And I can rewrite this in
vector form as the gradient dot

00:03:03.000 --> 00:03:08.000
product the amount by which the
position vector has changed.

00:03:08.000 --> 00:03:11.000
Basically, what causes f to
change is that I am changing x,

00:03:11.000 --> 00:03:16.000
y and z by small amounts and
how sensitive f is to each

00:03:16.000 --> 00:03:22.000
variable is precisely what the
partial derivatives measure.

00:03:22.000 --> 00:03:26.000
And, in particular,
this approximation is called

00:03:26.000 --> 00:03:30.000
the tangent plane approximation
because it tells us,

00:03:30.000 --> 00:03:35.000
in fact,
it amounts to identifying the

00:03:35.000 --> 00:03:38.000
graph of the function with its
tangent plane.

00:03:38.000 --> 00:03:43.000
It means that we assume that
the function depends more or

00:03:43.000 --> 00:03:45.000
less linearly on x,
y and z.

00:03:45.000 --> 00:03:48.000
And, if we set these things
equal, what we get is actually,

00:03:48.000 --> 00:03:52.000
we are replacing the function
by its linear approximation.

00:03:52.000 --> 00:03:56.000
We are replacing the graph by
its tangent plane.

00:03:56.000 --> 00:03:58.000
Except, of course,
we haven't see the graph of a

00:03:58.000 --> 00:04:00.000
function of three variables
because that would live in

00:04:00.000 --> 00:04:04.000
4-dimensional space.
So, when we think of a graph,

00:04:04.000 --> 00:04:08.000
really, it is a function of two
variables.

00:04:08.000 --> 00:04:12.000
That also tells us how to find
tangent planes to level

00:04:12.000 --> 00:04:12.000
surfaces.

00:04:22.000 --> 00:04:30.000
Recall that the tangent plane
to a surface,

00:04:30.000 --> 00:04:37.000
given by the equation f of x,
y, z equals z,

00:04:37.000 --> 00:04:43.000
at a given point can be found
by looking first for its normal

00:04:43.000 --> 00:04:47.000
vector.
And we know that the normal

00:04:47.000 --> 00:04:49.000
vector is actually,
well,

00:04:49.000 --> 00:04:53.000
one normal vector is given by
the gradient of a function

00:04:53.000 --> 00:04:56.000
because we know that the
gradient is actually pointing

00:04:56.000 --> 00:05:01.000
perpendicularly to the level
sets towards higher values of a

00:05:01.000 --> 00:05:05.000
function.
And it gives us the direction

00:05:05.000 --> 00:05:08.000
of fastest increase of a
function.

00:05:08.000 --> 00:05:13.000
OK.
Any questions about these

00:05:13.000 --> 00:05:18.000
topics?
No.

00:05:18.000 --> 00:05:20.000
OK.
Let me add, actually,

00:05:20.000 --> 00:05:23.000
a cultural note to what we have
seen so far about partial

00:05:23.000 --> 00:05:28.000
derivatives and how to use them,
which is maybe something I

00:05:28.000 --> 00:05:32.000
should have mentioned a couple
of weeks ago.

00:05:32.000 --> 00:05:33.000
Why do we like partial
derivatives?

00:05:33.000 --> 00:05:37.000
Well, one obvious reason is we
can do all these things.

00:05:37.000 --> 00:05:39.000
But another reason is that,
really,

00:05:39.000 --> 00:05:42.000
you need partial derivatives to
do physics and to understand

00:05:42.000 --> 00:05:46.000
much of the world that is around
you because a lot of things

00:05:46.000 --> 00:05:50.000
actually are governed by what is
called partial differentiation

00:05:50.000 --> 00:05:51.000
equations.

00:05:59.000 --> 00:06:07.000
So if you want a cultural
remark about what this is good

00:06:07.000 --> 00:06:09.000
for.
A partial differential equation

00:06:09.000 --> 00:06:13.000
is an equation that involves the
partial derivatives of a

00:06:13.000 --> 00:06:15.000
function.
So you have some function that

00:06:15.000 --> 00:06:18.000
is unknown that depends on a
bunch of variables.

00:06:18.000 --> 00:06:23.000
And a partial differential
equation is some relation

00:06:23.000 --> 00:06:28.000
between its partial derivatives.
Let me see.

00:06:28.000 --> 00:06:45.000
These are equations involving
the partial derivatives -- -- of

00:06:45.000 --> 00:06:54.000
an unknown function.
Let me give you an example to

00:06:54.000 --> 00:06:57.000
see how that works.
For example,

00:06:57.000 --> 00:07:02.000
the heat equation is one
example of a partial

00:07:02.000 --> 00:07:09.000
differential equation.
It is the equation -- Well,

00:07:09.000 --> 00:07:15.000
let me write for you the space
version of it.

00:07:15.000 --> 00:07:21.000
It is the equation partial f
over partial t equals some

00:07:21.000 --> 00:07:27.000
constant times the sum of the
second partials with respect to

00:07:27.000 --> 00:07:32.000
x, y and z.
So this is an equation where we

00:07:32.000 --> 00:07:38.000
are trying to solve for a
function f that depends,

00:07:38.000 --> 00:07:42.000
actually, on four variables,
x, y, z, t.

00:07:42.000 --> 00:07:47.000
And what should you have in
mind?

00:07:47.000 --> 00:07:50.000
Well, this equation governs
temperature.

00:07:50.000 --> 00:07:55.000
If you think that f of x, y, z,
t will be the temperature at a

00:07:55.000 --> 00:07:59.000
point in space at position x,
y, z and at time t,

00:07:59.000 --> 00:08:04.000
then this tells you how
temperature changes over time.

00:08:04.000 --> 00:08:07.000
It tells you that at any given
point,

00:08:07.000 --> 00:08:10.000
the rate of change of
temperature over time is given

00:08:10.000 --> 00:08:15.000
by this complicated expression
in the partial derivatives in

00:08:15.000 --> 00:08:18.000
terms of the space coordinates
x, y, z.

00:08:18.000 --> 00:08:21.000
If you know, for example,
the initial distribution of

00:08:21.000 --> 00:08:24.000
temperature in this room,
and if you assume that nothing

00:08:24.000 --> 00:08:26.000
is generating heat or taking
heat away,

00:08:26.000 --> 00:08:29.000
so if you don't have any air
conditioning or heating going

00:08:29.000 --> 00:08:31.000
on,
then it will tell you how the

00:08:31.000 --> 00:08:35.000
temperature will change over
time and eventually stabilize to

00:08:35.000 --> 00:08:41.000
some final value.
Yes?

00:08:41.000 --> 00:08:43.000
Why do we take the partial
derivative twice?

00:08:43.000 --> 00:08:45.000
Well, that is a question,
I would say,

00:08:45.000 --> 00:08:48.000
for a physics person.
But in a few weeks we will

00:08:48.000 --> 00:08:52.000
actually see a derivation of
where this equation comes from

00:08:52.000 --> 00:08:55.000
and try to justify it.
But, really,

00:08:55.000 --> 00:08:57.000
that is something you will see
in a physics class.

00:08:57.000 --> 00:09:02.000
The reason for that is
basically physics of how heat is

00:09:02.000 --> 00:09:09.000
transported between particles in
fluid, or actually any medium.

00:09:09.000 --> 00:09:12.000
This constant k actually is
called the heat conductivity.

00:09:12.000 --> 00:09:17.000
It tells you how well the heat
flows through the material that

00:09:17.000 --> 00:09:20.000
you are looking at.
Anyway, I am giving it to you

00:09:20.000 --> 00:09:23.000
just to show you an example of a
real life problem where,

00:09:23.000 --> 00:09:26.000
in fact, you have to solve one
of these things.

00:09:26.000 --> 00:09:29.000
Now, how to solve partial
differential equations is not a

00:09:29.000 --> 00:09:32.000
topic for this class.
It is not even a topic for

00:09:32.000 --> 00:09:34.000
18.03 which is called
Differential Equations,

00:09:34.000 --> 00:09:38.000
without partial,
which means there actually you

00:09:38.000 --> 00:09:41.000
will learn tools to study and
solve these equations but when

00:09:41.000 --> 00:09:43.000
there is only one variable
involved.

00:09:43.000 --> 00:09:47.000
And you will see it is already
quite hard.

00:09:47.000 --> 00:09:50.000
And, if you want more on that
one, we have many fine classes

00:09:50.000 --> 00:09:52.000
about partial differential
equations.

00:09:52.000 --> 00:09:58.000
But one thing at a time.
I wanted to point out to you

00:09:58.000 --> 00:10:03.000
that very often functions that
you see in real life satisfy

00:10:03.000 --> 00:10:08.000
many nice relations between the
partial derivatives.

00:10:08.000 --> 00:10:10.000
That was in case you were
wondering why on the syllabus

00:10:10.000 --> 00:10:13.000
for today it said partial
differential equations.

00:10:13.000 --> 00:10:15.000
Now we have officially covered
the topic.

00:10:15.000 --> 00:10:20.000
That is basically all we need
to know about it.

00:10:20.000 --> 00:10:22.000
But we will come back to that a
bit later.

00:10:22.000 --> 00:10:27.000
You will see.
OK.

00:10:27.000 --> 00:10:30.000
If there are no further
questions, let me continue and

00:10:30.000 --> 00:10:33.000
go back to my list of topics.
Oh, sorry.

00:10:33.000 --> 00:10:42.000
I should have written down that
this equation is solved by

00:10:42.000 --> 00:10:48.000
temperature for point x,
y, z at time t.

00:10:48.000 --> 00:10:52.000
OK.
And there are, actually,

00:10:52.000 --> 00:10:56.000
many other interesting partial
differential equations you will

00:10:56.000 --> 00:10:59.000
maybe sometimes learn about the
wave equation that governs how

00:10:59.000 --> 00:11:02.000
waves propagate in space,
about the diffusion equation,

00:11:02.000 --> 00:11:07.000
when you have maybe a mixture
of two fluids,

00:11:07.000 --> 00:11:11.000
how they somehow mix over time
and so on.

00:11:11.000 --> 00:11:16.000
Basically, to every problem you
might want to consider there is

00:11:16.000 --> 00:11:19.000
a partial differential equation
to solve.

00:11:19.000 --> 00:11:23.000
OK. Anyway. Sorry.
Back to my list of topics.

00:11:23.000 --> 00:11:27.000
One important application we
have seen of partial derivatives

00:11:27.000 --> 00:11:30.000
is to try to optimize things,
try to solve minimum/maximum

00:11:30.000 --> 00:11:31.000
problems.

00:11:42.000 --> 00:11:47.000
Remember that we have
introduced the notion of

00:11:47.000 --> 00:11:56.000
critical points of a function.
A critical point is when all

00:11:56.000 --> 00:12:03.000
the partial derivatives are
zero.

00:12:03.000 --> 00:12:05.000
And then there are various
kinds of critical points.

00:12:05.000 --> 00:12:09.000
There is maxima and there is
minimum, but there is also

00:12:09.000 --> 00:12:15.000
saddle points.
And we have seen a method using

00:12:15.000 --> 00:12:24.000
second derivatives -- -- to
decide which kind of critical

00:12:24.000 --> 00:12:29.000
point we have.
I should say that is for a

00:12:29.000 --> 00:12:35.000
function of two variables to try
to decide whether a given

00:12:35.000 --> 00:12:41.000
critical point is a minimum,
a maximum or a saddle point.

00:12:41.000 --> 00:12:44.000
And we have also seen that
actually that is not enough to

00:12:44.000 --> 00:12:48.000
find the minimum of a maximum of
a function because the minimum

00:12:48.000 --> 00:12:50.000
of a maximum could occur on the
boundary.

00:12:50.000 --> 00:12:53.000
Just to give you a small
reminder,

00:12:53.000 --> 00:12:55.000
when you have a function of one
variables,

00:12:55.000 --> 00:13:00.000
if you are trying to find the
minimum and the maximum of a

00:13:00.000 --> 00:13:03.000
function whose graph looks like
this,

00:13:03.000 --> 00:13:05.000
well, you are going to tell me,
quite obviously,

00:13:05.000 --> 00:13:07.000
that the maximum is this point
up here.

00:13:07.000 --> 00:13:11.000
And that is a point where the
first derivative is zero.

00:13:11.000 --> 00:13:14.000
That is a critical point.
And we used the second

00:13:14.000 --> 00:13:18.000
derivative to see that this
critical point is a local

00:13:18.000 --> 00:13:20.000
maximum.
But then, when we are looking

00:13:20.000 --> 00:13:23.000
for the minimum of a function,
well, it is not at a critical

00:13:23.000 --> 00:13:26.000
point.
It is actually here at the

00:13:26.000 --> 00:13:30.000
boundary of the domain,
you know, the range of values

00:13:30.000 --> 00:13:38.000
that we are going to consider.
Here the minimum is at the

00:13:38.000 --> 00:13:44.000
boundary.
And the maximum is at a

00:13:44.000 --> 00:13:50.000
critical point.
Similarly, when you have a

00:13:50.000 --> 00:13:53.000
function of several variables,
say of two variables,

00:13:53.000 --> 00:13:55.000
for example,
then the minimum and the

00:13:55.000 --> 00:13:58.000
maximum will be achieved either
at a critical point.

00:13:58.000 --> 00:14:01.000
And then we can use these
methods to find where they are.

00:14:01.000 --> 00:14:06.000
Or, somewhere on the boundary
of a set of values that are

00:14:06.000 --> 00:14:09.000
allowed.
It could be that we actually

00:14:09.000 --> 00:14:13.000
achieve a minimum by making x
and y as small as possible.

00:14:13.000 --> 00:14:16.000
Maybe letting them go to zero
if they had to be positive or

00:14:16.000 --> 00:14:19.000
maybe by making them go to
infinity.

00:14:19.000 --> 00:14:23.000
So, we have to keep our minds
open and look at various

00:14:23.000 --> 00:14:26.000
possibilities.
We are going to do a problem

00:14:26.000 --> 00:14:29.000
like that.
We are going to go over a

00:14:29.000 --> 00:14:34.000
practice problem from the
practice test to clarify this.

00:14:34.000 --> 00:14:38.000
Another important cultural
application of minimum/maximum

00:14:38.000 --> 00:14:42.000
problems in two variables that
we have seen in class is the

00:14:42.000 --> 00:14:45.000
least squared method to find the
best fit line,

00:14:45.000 --> 00:14:49.000
or the best fit anything,
really,

00:14:49.000 --> 00:14:56.000
to find when you have a set of
data points what is the best

00:14:56.000 --> 00:15:01.000
linear approximately for these
data points.

00:15:01.000 --> 00:15:03.000
And here I have some good news
for you.

00:15:03.000 --> 00:15:07.000
While you should definitely
know what this is about,

00:15:07.000 --> 00:15:09.000
it will not be on the test.

00:15:30.000 --> 00:15:35.000
[APPLAUSE]
That doesn't mean that you

00:15:35.000 --> 00:15:41.000
should forget everything we have
seen about it,

00:15:41.000 --> 00:15:51.000
OK?
Now what is next on my list of

00:15:51.000 --> 00:15:58.000
topics?
We have seen differentials.

00:15:58.000 --> 00:16:03.000
Remember the differential of f,
by definition,

00:16:03.000 --> 00:16:09.000
would be this kind of quantity.
At first it looks just like a

00:16:09.000 --> 00:16:12.000
new way to package partial
derivatives together into some

00:16:12.000 --> 00:16:15.000
new kind of object.
Now, what is this good for?

00:16:15.000 --> 00:16:18.000
Well, it is a good way to
remember approximation formulas.

00:16:18.000 --> 00:16:22.000
It is a good way to also study
how variations in x,

00:16:22.000 --> 00:16:26.000
y, z relate to variations in f.
In particular,

00:16:26.000 --> 00:16:30.000
we can divide this by
variations,

00:16:30.000 --> 00:16:34.000
actually, by dx or by dy or by
dz in any situation that we

00:16:34.000 --> 00:16:40.000
want,
or by d of some other variable

00:16:40.000 --> 00:16:46.000
to get chain rules.
The chain rule says,

00:16:46.000 --> 00:16:50.000
for example,
there are many situations.

00:16:50.000 --> 00:16:56.000
But, for example,
if x, y and z depend on some

00:16:56.000 --> 00:17:04.000
other variable,
say of variables maybe even u

00:17:04.000 --> 00:17:08.000
and v,
then that means that f becomes

00:17:08.000 --> 00:17:13.000
a function of u and v.
And then we can ask ourselves,

00:17:13.000 --> 00:17:18.000
how sensitive is f to a value
of u?

00:17:18.000 --> 00:17:25.000
Well, we can answer that.
The chain rule is something

00:17:25.000 --> 00:17:33.000
like this.
And let me explain to you again

00:17:33.000 --> 00:17:41.000
where this comes from.
Basically, what this quantity

00:17:41.000 --> 00:17:46.000
means is if we change u and keep
v constant, what happens to the

00:17:46.000 --> 00:17:48.000
value of f?
Well, why would the value of f

00:17:48.000 --> 00:17:51.000
change in the first place when f
is just a function of x,

00:17:51.000 --> 00:17:55.000
y, z and not directly of you?
Well, it changes because x,

00:17:55.000 --> 00:17:59.000
y and z depend on u.
First we have to figure out how

00:17:59.000 --> 00:18:02.000
quickly x, y and z change when
we change u.

00:18:02.000 --> 00:18:05.000
Well, how quickly they do that
is precisely partial x over

00:18:05.000 --> 00:18:08.000
partial u, partial y over
partial u, partial z over

00:18:08.000 --> 00:18:10.000
partial u.
These are the rates of change

00:18:10.000 --> 00:18:14.000
of x, y, z when we change u.
And now, when we change x,

00:18:14.000 --> 00:18:17.000
y and z, that causes f to
change.

00:18:17.000 --> 00:18:21.000
How much does f change?
Well, partial f over partial x

00:18:21.000 --> 00:18:25.000
tells us how quickly f changes
if I just change x.

00:18:25.000 --> 00:18:29.000
I get this.
That is the change in f caused

00:18:29.000 --> 00:18:33.000
just by the fact that x changes
when u changes.

00:18:33.000 --> 00:18:36.000
But then y also changes.
y changes at this rate.

00:18:36.000 --> 00:18:39.000
And that causes f to change at
that rate.

00:18:39.000 --> 00:18:42.000
And z changes as well,
and that causes f to change at

00:18:42.000 --> 00:18:45.000
that rate.
And the effects add up together.

00:18:45.000 --> 00:18:57.000
Does that make sense?
OK.

00:18:57.000 --> 00:19:00.000
And so, in particular,
we can use the chain rule to do

00:19:00.000 --> 00:19:03.000
changes of variables.
If we have, say,

00:19:03.000 --> 00:19:08.000
a function in terms of polar
coordinates on theta and we like

00:19:08.000 --> 00:19:14.000
to switch it to rectangular
coordinates x and y then we can

00:19:14.000 --> 00:19:19.000
use chain rules to relate the
partial derivatives.

00:19:19.000 --> 00:19:23.000
And finally,
last but not least,

00:19:23.000 --> 00:19:31.000
we have seen how to deal with
non-independent variables.

00:19:31.000 --> 00:19:37.000
When our variables say x,
y, z related by some equation.

00:19:37.000 --> 00:19:41.000
One way we can deal with this
is to solve for one of the

00:19:41.000 --> 00:19:44.000
variables and go back to two
independent variables,

00:19:44.000 --> 00:19:47.000
but we cannot always do that.
Of course, on the exam,

00:19:47.000 --> 00:19:50.000
you can be sure that I will
make sure that you cannot solve

00:19:50.000 --> 00:19:53.000
for a variable you want to
remove because that would be too

00:19:53.000 --> 00:19:56.000
easy.
Then when we have to look at

00:19:56.000 --> 00:20:02.000
all of them, we will have to
take into account this relation,

00:20:02.000 --> 00:20:05.000
we have seen two useful
methods.

00:20:05.000 --> 00:20:09.000
One of them is to find the
minimum of a maximum of a

00:20:09.000 --> 00:20:13.000
function when the variables are
not independent,

00:20:13.000 --> 00:20:17.000
and that is the method of
Lagrange multipliers.

00:20:33.000 --> 00:20:39.000
Remember, to find the minimum
or the maximum of the function

00:20:39.000 --> 00:20:45.000
f,
subject to the constraint g

00:20:45.000 --> 00:20:52.000
equals constant,
well, we write down equations

00:20:52.000 --> 00:20:59.000
that say that the gradient of f
is actually proportional to the

00:20:59.000 --> 00:21:04.000
gradient of g.
There is a new variable here,

00:21:04.000 --> 00:21:08.000
lambda, the multiplier.
And so, for example,

00:21:08.000 --> 00:21:12.000
well, I guess here I had
functions of three variables,

00:21:12.000 --> 00:21:14.000
so this becomes three
equations.

00:21:14.000 --> 00:21:21.000
f sub x equals lambda g sub x,
f sub y equals lambda g sub y,

00:21:21.000 --> 00:21:25.000
and f sub z equals lambda g sub
z.

00:21:25.000 --> 00:21:27.000
And, when we plug in the
formulas for f and g,

00:21:27.000 --> 00:21:31.000
well, we are left with three
equations involving the four

00:21:31.000 --> 00:21:33.000
variables, x,
y, z and lambda.

00:21:33.000 --> 00:21:36.000
What is wrong?
Well, we don't have actually

00:21:36.000 --> 00:21:41.000
four independent variables.
We also have this relation,

00:21:41.000 --> 00:21:48.000
whatever the constraint was
relating x, y and z together.

00:21:48.000 --> 00:21:51.000
Then we can try to solve this.
And, depending on the

00:21:51.000 --> 00:21:56.000
situation, it is sometimes easy.
And it sometimes it is very

00:21:56.000 --> 00:22:01.000
hard or even impossible.
But on the test,

00:22:01.000 --> 00:22:03.000
I haven't decided yet,
but it could well be that the

00:22:03.000 --> 00:22:06.000
problem about Lagrange
multipliers just asks you to

00:22:06.000 --> 00:22:08.000
write the equations and not to
solve them.

00:22:08.000 --> 00:22:14.000
[APPLAUSE]
Well, I don't know yet.

00:22:14.000 --> 00:22:18.000
I am not promising anything.
But, before you start solving,

00:22:18.000 --> 00:22:23.000
check whether the problem asks
you to solve them or not.

00:22:23.000 --> 00:22:26.000
If it doesn't then probably you
shouldn't.

00:23:02.000 --> 00:23:09.000
Another topic that we solved
just yesterday is constrained

00:23:09.000 --> 00:23:13.000
partial derivatives.
And I guess I have to

00:23:13.000 --> 00:23:19.000
re-explain a little bit because
my guess is that things were not

00:23:19.000 --> 00:23:23.000
extremely clear at the end of
class yesterday.

00:23:23.000 --> 00:23:25.000
Now we are in the same
situation.

00:23:25.000 --> 00:23:29.000
We have a function,
let's say, f of x,

00:23:29.000 --> 00:23:34.000
y, z where variables x,
y and z are not independent but

00:23:34.000 --> 00:23:39.000
are constrained by some relation
of this form.

00:23:39.000 --> 00:23:43.000
Some quantity involving x,
y and z is equal to maybe zero

00:23:43.000 --> 00:23:47.000
or some other constant.
And then, what we want to know,

00:23:47.000 --> 00:23:51.000
is what is the rate of change
of f with respect to one of the

00:23:51.000 --> 00:23:57.000
variables,
say, x, y or z when I keep the

00:23:57.000 --> 00:24:02.000
others constant?
Well, I cannot keep all the

00:24:02.000 --> 00:24:07.000
other constant because that
would not be compatible with

00:24:07.000 --> 00:24:11.000
this condition.
I mean that would be the usual

00:24:11.000 --> 00:24:15.000
or so-called formal partial
derivative of f ignoring the

00:24:15.000 --> 00:24:18.000
constraint.
To take this into account means

00:24:18.000 --> 00:24:23.000
that if we vary one variable
while keeping another one fixed

00:24:23.000 --> 00:24:26.000
then the third one,
since it depends on them,

00:24:26.000 --> 00:24:31.000
must also change somehow.
And we must take that into

00:24:31.000 --> 00:24:34.000
account.
Let's say, for example,

00:24:34.000 --> 00:24:39.000
we want to find -- I am going
to do a different example from

00:24:39.000 --> 00:24:42.000
yesterday.
So, if you really didn't like

00:24:42.000 --> 00:24:46.000
that one, you don't have to see
it again.

00:24:46.000 --> 00:24:51.000
Let's say that we want to find
the partial derivative of f with

00:24:51.000 --> 00:24:56.000
respect to z keeping y constant.
What does that mean?

00:24:56.000 --> 00:25:03.000
That means y is constant,
z varies and x somehow is

00:25:03.000 --> 00:25:11.000
mysteriously a function of y and
z for this equation.

00:25:11.000 --> 00:25:14.000
And then, of course because it
depends on y,

00:25:14.000 --> 00:25:19.000
that means x will vary.
Sorry, depends on y and z and z

00:25:19.000 --> 00:25:21.000
varies.
Now we are asking ourselves

00:25:21.000 --> 00:25:25.000
what is the rate of change of f
with respect to z in this

00:25:25.000 --> 00:25:26.000
situation?

00:25:42.000 --> 00:25:47.000
And so we have two methods to
do that.

00:25:47.000 --> 00:25:55.000
Let me start with the one with
differentials that hopefully you

00:25:55.000 --> 00:26:02.000
kind of understood yesterday,
but if not here is a second

00:26:02.000 --> 00:26:06.000
chance.
Using differentials means that

00:26:06.000 --> 00:26:10.000
we will try to express df in
terms of dz in this particular

00:26:10.000 --> 00:26:14.000
situation.
What do we know about df in

00:26:14.000 --> 00:26:19.000
general?
Well, we know that df is f sub

00:26:19.000 --> 00:26:25.000
x dx plus f sub y dy plus f sub
z dz.

00:26:25.000 --> 00:26:28.000
That is the general statement.
But, of course,

00:26:28.000 --> 00:26:31.000
we are in a special case.
We are in a special case where

00:26:31.000 --> 00:26:41.000
first y is constant.
y is constant means that we can

00:26:41.000 --> 00:26:50.000
set dy to be zero.
This goes away and becomes zero.

00:26:50.000 --> 00:26:53.000
The second thing is actually we
don't care about x.

00:26:53.000 --> 00:26:57.000
We would like to get rid of x
because it is this dependent

00:26:57.000 --> 00:27:00.000
variable.
What we really want to do is

00:27:00.000 --> 00:27:12.000
express df only in terms of dz.
What we need is to relate dx

00:27:12.000 --> 00:27:16.000
with dz.
Well, to do that,

00:27:16.000 --> 00:27:20.000
we need to look at how the
variables are related so we need

00:27:20.000 --> 00:27:24.000
to look at the constraint g.
Well, how do we do that?

00:27:24.000 --> 00:27:31.000
We look at the differential g.
So dg is g sub x dx plus g sub

00:27:31.000 --> 00:27:37.000
y dy plus g sub z dz.
And that is zero because we are

00:27:37.000 --> 00:27:40.000
setting g to always stay
constant.

00:27:40.000 --> 00:27:44.000
So, g doesn't change.
If g doesn't change then we

00:27:44.000 --> 00:27:48.000
have a relation between dx,
dy and dz.

00:27:48.000 --> 00:27:50.000
Well, in fact,
we say we are going to look

00:27:50.000 --> 00:27:52.000
only at the case where y is
constant.

00:27:52.000 --> 00:27:56.000
y doesn't change and this
becomes zero.

00:27:56.000 --> 00:27:59.000
Well, now we have a relation
between dx and dz.

00:27:59.000 --> 00:28:05.000
We know how x depends on z.
And when we know how x depends

00:28:05.000 --> 00:28:10.000
on z, we can plug that into here
and get how f depends on z.

00:28:10.000 --> 00:28:11.000
Let's do that.

00:28:28.000 --> 00:28:33.000
Again, saying that g cannot
change and keeping y constant

00:28:33.000 --> 00:28:39.000
tells us g sub x dx plus g sub z
dz is zero and we would like to

00:28:39.000 --> 00:28:46.000
solve for dx in terms of dz.
That tells us dx should be

00:28:46.000 --> 00:28:53.000
minus g sub z dz divided by g
sub x.

00:28:53.000 --> 00:28:57.000
If you want,
this is the rate of change of x

00:28:57.000 --> 00:29:00.000
with respect to z when we keep y
constant.

00:29:00.000 --> 00:29:13.000
In our new terminology this is
partial x over partial z with y

00:29:13.000 --> 00:29:18.000
held constant.
This is the rate of change of x

00:29:18.000 --> 00:29:23.000
with respect to z.
Now, when we know that,

00:29:23.000 --> 00:29:30.000
we are going to plug that into
this equation.

00:29:30.000 --> 00:29:37.000
And that will tell us that df
is f sub x times dx.

00:29:37.000 --> 00:29:43.000
Well, what is dx?
dx is now minus g sub z over g

00:29:43.000 --> 00:29:51.000
sub x dz plus f sub z dz.
So that will be minus fx g sub

00:29:51.000 --> 00:29:56.000
z over g sub x plus f sub z
times dz.

00:29:56.000 --> 00:30:02.000
And so this coefficient here is
the rate of change of f with

00:30:02.000 --> 00:30:06.000
respect to z in the situation we
are considering.

00:30:06.000 --> 00:30:13.000
This quantity is what we call
partial f over partial z with y

00:30:13.000 --> 00:30:21.000
held constant.
That is what we wanted to find.

00:30:21.000 --> 00:30:25.000
Now, let's see another way to
do the same calculation and then

00:30:25.000 --> 00:30:28.000
you can choose which one you
prefer.

00:30:57.000 --> 00:31:09.000
The other method is using the
chain rule.

00:31:09.000 --> 00:31:14.000
We use the chain rule to
understand how f depends on z

00:31:14.000 --> 00:31:19.000
when y is held constant.
Let me first try the chain rule

00:31:19.000 --> 00:31:24.000
brutally and then we will try to
analyze what is going on.

00:31:24.000 --> 00:31:29.000
You can just use the version
that I have up there as a

00:31:29.000 --> 00:31:35.000
template to see what is going
on, but I am going to explain it

00:31:35.000 --> 00:31:37.000
more carefully again.

00:31:50.000 --> 00:31:57.000
That is the most mechanical and
mindless way of writing down the

00:31:57.000 --> 00:32:01.000
chain rule.
I am just saying here that I am

00:32:01.000 --> 00:32:04.000
varying z, keeping y constant,
and I want to know how f

00:32:04.000 --> 00:32:07.000
changes.
Well, f might change because x

00:32:07.000 --> 00:32:10.000
might change,
y might change and z might

00:32:10.000 --> 00:32:14.000
change.
Now, how quickly does x change?

00:32:14.000 --> 00:32:18.000
Well, the rate of change of x
in this situation is partial x,

00:32:18.000 --> 00:32:24.000
partial z with y held constant.
If I change x at this rate then

00:32:24.000 --> 00:32:29.000
f will change at that rate.
Now, y might change,

00:32:29.000 --> 00:32:32.000
so the rate of change of y
would be the rate of change of y

00:32:32.000 --> 00:32:35.000
with respect to z holding y
constant.

00:32:35.000 --> 00:32:38.000
Wait a second.
If y is held constant then y

00:32:38.000 --> 00:32:40.000
doesn't change.
So, actually,

00:32:40.000 --> 00:32:43.000
this guy is zero and you didn't
really have to write that term.

00:32:43.000 --> 00:32:47.000
But I wrote it just to be
systematic.

00:32:47.000 --> 00:32:51.000
If y had been somehow able to
change at a certain rate then

00:32:51.000 --> 00:32:54.000
that would have caused f to
change at that rate.

00:32:54.000 --> 00:32:57.000
And, of course,
if y is held constant then

00:32:57.000 --> 00:33:01.000
nothing happens here.
Finally, while z is changing at

00:33:01.000 --> 00:33:05.000
a certain rate,
this rate is this one and that

00:33:05.000 --> 00:33:10.000
causes f to change at that rate.
And then we add the effects

00:33:10.000 --> 00:33:12.000
together.
See, it is nothing but the

00:33:12.000 --> 00:33:16.000
good-old chain rule.
Just I have put these extra

00:33:16.000 --> 00:33:22.000
subscripts to tell us what is
held constant and what isn't.

00:33:22.000 --> 00:33:23.000
Now, of course we can simplify
it a little bit more.

00:33:23.000 --> 00:33:27.000
Because, here,
how quickly does z change if I

00:33:27.000 --> 00:33:32.000
am changing z?
Well, the rate of change of z,

00:33:32.000 --> 00:33:37.000
with respect to itself,
is just one.

00:33:37.000 --> 00:33:41.000
In fact, the really mysterious
part of this is the one here,

00:33:41.000 --> 00:33:45.000
which is the rate of change of
x with respect to z.

00:33:45.000 --> 00:33:49.000
And, to find that,
we have to understand the

00:33:49.000 --> 00:33:52.000
constraint.
How can we find the rate of

00:33:52.000 --> 00:33:54.000
change of x with respect to z?
Well, we could use

00:33:54.000 --> 00:33:56.000
differentials,
like we did here,

00:33:56.000 --> 00:33:58.000
but we can also keep using the
chain rule.

00:34:17.000 --> 00:34:20.000
How can I do that?
Well, I can just look at how g

00:34:20.000 --> 00:34:24.000
would change with respect to z
when y is held constant.

00:34:24.000 --> 00:34:33.000
I just do the same calculation
with g instead of f.

00:34:33.000 --> 00:34:37.000
But, before I do it,
let's ask ourselves first what

00:34:37.000 --> 00:34:40.000
is this equal to.
Well, if g is held constant

00:34:40.000 --> 00:34:44.000
then, when we vary z keeping y
constant and changing x,

00:34:44.000 --> 00:34:53.000
well, g still doesn't change.
It is held constant.

00:34:53.000 --> 00:34:58.000
In fact, that should be zero.
But, if we just say that,

00:34:58.000 --> 00:35:01.000
we are not going to get to
that.

00:35:01.000 --> 00:35:04.000
Let's see how we can compute
that using the chain rule.

00:35:04.000 --> 00:35:09.000
Well, the chain rule tells us g
changes because x,

00:35:09.000 --> 00:35:12.000
y and z change.
How does it change because of x?

00:35:12.000 --> 00:35:18.000
Well, partial g over partial x
times the rate of change of x.

00:35:18.000 --> 00:35:21.000
How does it change because of y?
Well, partial g over partial y

00:35:21.000 --> 00:35:24.000
times the rate of change of y.
But, of course,

00:35:24.000 --> 00:35:28.000
if you are smarter than me then
you don't need to actually write

00:35:28.000 --> 00:35:31.000
this one because y is held
constant.

00:35:31.000 --> 00:35:38.000
And then there is the rate of
change because z changes.

00:35:38.000 --> 00:35:45.000
And how quickly z changes here,
of course, is one.

00:35:45.000 --> 00:35:50.000
Out of this you get,
well, I am tired of writing

00:35:50.000 --> 00:35:58.000
partial g over partial x.
We can just write g sub x times

00:35:58.000 --> 00:36:05.000
partial x over partial z y
constant plus g sub z.

00:36:05.000 --> 00:36:11.000
And now we found how x depends
on z.

00:36:11.000 --> 00:36:17.000
Partial x over partial z with y
held constant is negative g sub

00:36:17.000 --> 00:36:24.000
z over g sub x.
Now we plug that into that and

00:36:24.000 --> 00:36:32.000
we get our answer.
It goes all the way up here.

00:36:32.000 --> 00:36:34.000
And then we get the answer.
I am not going to,

00:36:34.000 --> 00:36:35.000
well, I guess I can write it
again.

00:36:47.000 --> 00:36:52.000
There was partial f over
partial x times this guy,

00:36:52.000 --> 00:36:59.000
minus g sub z over g sub x,
plus partial f over partial z.

00:36:59.000 --> 00:37:03.000
And you can observe that this
is exactly the same formula that

00:37:03.000 --> 00:37:07.000
we had over here.
In fact, let's compare this to

00:37:07.000 --> 00:37:10.000
make it side by side.
I claim we did exactly the same

00:37:10.000 --> 00:37:13.000
thing, just with different
notations.

00:37:13.000 --> 00:37:17.000
If you take the differential of
f and you divide it by dz in

00:37:17.000 --> 00:37:20.000
this situation where y is held
constant and so on,

00:37:20.000 --> 00:37:23.000
you get exactly this chain rule
up there.

00:37:23.000 --> 00:37:28.000
That chain rule up there is
this guy, df,

00:37:28.000 --> 00:37:33.000
divided by dz with y held
constant.

00:37:33.000 --> 00:37:38.000
And the term involving dy was
replaced by zero on both sides

00:37:38.000 --> 00:37:41.000
because we knew,
actually, that y is held

00:37:41.000 --> 00:37:44.000
constant.
Now, the real difficulty in

00:37:44.000 --> 00:37:48.000
both cases comes from dx.
And what we do about dx is we

00:37:48.000 --> 00:37:52.000
use the constant.
Here we use it by writing dg

00:37:52.000 --> 00:37:55.000
equals zero.
Here we write the chain rule

00:37:55.000 --> 00:38:00.000
for g, which is the same thing,
just divided by dz with y held

00:38:00.000 --> 00:38:03.000
constant.
This formula or that formula

00:38:03.000 --> 00:38:07.000
are the same,
just divided by dz with y held

00:38:07.000 --> 00:38:11.000
constant.
And then, in both cases,

00:38:11.000 --> 00:38:16.000
we used that to solve for dx.
And then we plugged into the

00:38:16.000 --> 00:38:21.000
formula of df to express df over
dz, or partial f,

00:38:21.000 --> 00:38:26.000
partial z with y held constant.
So, the two methods are pretty

00:38:26.000 --> 00:38:27.000
much the same.
Quick poll.

00:38:27.000 --> 00:38:33.000
Who prefers this one?
Who prefers that one?

00:38:33.000 --> 00:38:34.000
OK.
Majority vote seems to be for

00:38:34.000 --> 00:38:36.000
differentials,
but it doesn't mean that it is

00:38:36.000 --> 00:38:39.000
better.
Both are fine.

00:38:39.000 --> 00:38:42.000
You can use whichever one you
want.

00:38:42.000 --> 00:38:50.000
But you should give both a try.
OK. Any questions?

00:38:50.000 --> 00:38:58.000
Yes?
Yes. Thank you.

00:38:58.000 --> 00:39:02.000
I forgot to mention it.
Where did that go?

00:39:02.000 --> 00:39:11.000
I think I erased that part.
We need to know -- --

00:39:11.000 --> 00:39:20.000
directional derivatives.
Pretty much the only thing to

00:39:20.000 --> 00:39:23.000
remember about them is that df
over ds,

00:39:23.000 --> 00:39:25.000
in the direction of some unit
vector u,

00:39:25.000 --> 00:39:30.000
is just the gradient f dot
product with u.

00:39:30.000 --> 00:39:35.000
That is pretty much all we know
about them.

00:39:35.000 --> 00:39:39.000
Any other topics that I forgot
to list?

00:39:39.000 --> 00:39:45.000
No.
Yes?

00:39:45.000 --> 00:39:46.000
Can I erase three boards at a
time?

00:39:46.000 --> 00:39:47.000
No, I would need three hands to
do that.

00:40:03.000 --> 00:40:07.000
I think what we should do now
is look quickly at the practice

00:40:07.000 --> 00:40:10.000
test.
I mean, given the time,

00:40:10.000 --> 00:40:15.000
you will mostly have to think
about it yourselves.

00:40:15.000 --> 00:40:23.000
Hopefully you have a copy of
the practice exam.

00:40:23.000 --> 00:40:26.000
The first problem is a simple
problem.

00:40:26.000 --> 00:40:28.000
Find the gradient.
Find an approximation formula.

00:40:28.000 --> 00:40:30.000
Hopefully you know how to do
that.

00:40:30.000 --> 00:40:33.000
The second problem is one about
writing a contour plot.

00:40:33.000 --> 00:40:41.000
And so, before I let you go for
the weekend, I want to make sure

00:40:41.000 --> 00:40:47.000
that you actually know how to
read a contour plot.

00:40:47.000 --> 00:40:51.000
One thing I should mention is
this problem asks you to

00:40:51.000 --> 00:40:55.000
estimate partial derivatives by
writing a contour plot.

00:40:55.000 --> 00:40:57.000
We have not done that,
so that will not actually be on

00:40:57.000 --> 00:40:59.000
the test.
We will be doing qualitative

00:40:59.000 --> 00:41:01.000
questions like what is the sine
of a partial derivative.

00:41:01.000 --> 00:41:04.000
Is it zero, less than zero or
more than zero?

00:41:04.000 --> 00:41:07.000
You don't need to bring a ruler
to estimate partial derivatives

00:41:07.000 --> 00:41:09.000
the way that this problem asks
you to.

00:41:35.000 --> 00:41:38.000
[APPLAUSE]
Let's look at problem 2B.

00:41:38.000 --> 00:41:43.000
Problem 2B is asking you to
find the point at which h equals

00:41:43.000 --> 00:41:46.000
2200,
partial h over partial x equals

00:41:46.000 --> 00:41:49.000
zero and partial h over partial
y is less than zero.

00:41:49.000 --> 00:41:53.000
Let's try and see what is going
on here.

00:41:53.000 --> 00:41:57.000
A point where f equals 2200,
well, that should be probably

00:41:57.000 --> 00:41:59.000
on the level curve that says
2200.

00:41:59.000 --> 00:42:09.000
We can actually zoom in.
Here is the level 2200.

00:42:09.000 --> 00:42:12.000
Now I want partial h over
partial x to be zero.

00:42:12.000 --> 00:42:17.000
That means if I change x,
keeping y constant,

00:42:17.000 --> 00:42:24.000
the value of h doesn't change.
Which points on the level curve

00:42:24.000 --> 00:42:30.000
satisfy that property?
It is the top and the bottom.

00:42:30.000 --> 00:42:34.000
If you are here, for example,
and you move in the x

00:42:34.000 --> 00:42:36.000
direction,
well, you see,

00:42:36.000 --> 00:42:38.000
as you get to there from the
left,

00:42:38.000 --> 00:42:41.000
the height first increases and
then decreases.

00:42:41.000 --> 00:42:44.000
It goes for a maximum at that
point.

00:42:44.000 --> 00:42:47.000
So, at that point,
the partial derivative is zero

00:42:47.000 --> 00:42:53.000
with respect to x.
And the same here.

00:42:53.000 --> 00:42:59.000
Now, let's find partial h over
partial y less than zero.

00:42:59.000 --> 00:43:03.000
That means if we go north we
should go down.

00:43:03.000 --> 00:43:07.000
Well, which one is it,
top or bottom?

00:43:07.000 --> 00:43:11.000
Top. Yes.
Here, if you go north,

00:43:11.000 --> 00:43:16.000
then you go from 2200 down to
2100.

00:43:16.000 --> 00:43:23.000
This is where the point is.
Now, the problem here was also

00:43:23.000 --> 00:43:25.000
asking you to estimate partial h
over partial y.

00:43:25.000 --> 00:43:28.000
And if you were curious how you
would do that,

00:43:28.000 --> 00:43:33.000
well, you would try to figure
out how long it takes before you

00:43:33.000 --> 00:43:42.000
reach the next level curve.
To go from here to here,

00:43:42.000 --> 00:43:47.000
to go from Q to this new point,
say Q prime,

00:43:47.000 --> 00:43:49.000
the change in y,
well, you would have to read

00:43:49.000 --> 00:43:56.000
the scale,
which was down here,

00:43:56.000 --> 00:44:00.000
would be about something like
300.

00:44:00.000 --> 00:44:04.000
What is the change in height
when you go from Q to Q prime?

00:44:04.000 --> 00:44:07.000
Well, you go down from 2200 to
2100.

00:44:07.000 --> 00:44:14.000
That is actually minus 100
exactly.

00:44:14.000 --> 00:44:19.000
OK?
And so delta h over delta y is

00:44:19.000 --> 00:44:27.000
about minus one-third,
well, minus 100 over 300 which

00:44:27.000 --> 00:44:35.000
is minus one-third.
And that is an approximation

00:44:35.000 --> 00:44:43.000
for partial derivative.
So, that is how you would do it.

00:44:43.000 --> 00:44:48.000
Now, let me go back to other
things.

00:44:48.000 --> 00:44:52.000
If you look at this practice
exam, basically there is a bit

00:44:52.000 --> 00:44:56.000
of everything and it is kind of
fairly representative of what

00:44:56.000 --> 00:45:00.000
might happen on Tuesday.
There will be a mix of easy

00:45:00.000 --> 00:45:03.000
problems and of harder problems.
Expect something about

00:45:03.000 --> 00:45:05.000
computing gradients,
approximations,

00:45:05.000 --> 00:45:08.000
rate of change.
Expect a problem about reading

00:45:08.000 --> 00:45:13.000
a contour plot.
Expect one about a min/max

00:45:13.000 --> 00:45:15.000
problem,
something about Lagrange

00:45:15.000 --> 00:45:17.000
multipliers,
something about the chain rule

00:45:17.000 --> 00:45:20.000
and something about constrained
partial derivatives.

00:45:20.000 --> 00:45:22.000
I mean pretty much all the
topics are going to be there.