DAVID JORDAN: Hello, and welcome back to recitation.
So today, the problem I'd like to work with you
is about taking partial derivatives
in the presence of constraints.
So this is a pretty subtle business.
So take your time when you work these problems.
So what we have is we have this function w,
and it's a function of four variables: x, y, z, and t.
OK?
But it's not really a function of these four variables
because we have a constraint.
So we want to study how w changes
as we vary the parameters, except that we have imposed
this constraint here.
So that really we kind of only have three variables,
because we have four variables and one constraint.
So that's what partial derivatives with constraints
help us do.
So let's explain first the notation.
OK?
So it says partial w partial z, and then we
have the subscripts x and y.
So what's important about this notation
is not what you see as much as what you don't see.
What you don't see is the variable t.
OK?
So what this notation means is, as always,
the denominator in our derivative expression--
partial z here-- that means that we want to vary z.
And we want to see how w changes as we vary z.
And the x and y here mean that we want to keep x and y fixed.
So if we didn't have a constraint,
this x and y here would be superfluous.
Because by partial derivative, we always
mean to keep the other unlisted variables unchanged.
However, the fact that t is missing here,
it means that-- so if you think about it-- if we vary z,
and we keep x and y fixed, then t also is varying.
Right?
Because we have this constraint here.
And so it wouldn't make sense for me
to ask you to compute the partial derivative of w
in z varying x, y, and t because-- excuse me-- keeping
x, y, and t fixed, because then there
would be no room for z to vary.
OK?
So this notation means that z is going to be allowed to vary,
but it's going to vary in a way that we're just
going to ignore.
So you will see how this works out in the problem.
So what we're really interested in
is making sure that x and y stay fixed and that z varies.
And then we're going to need to-- when we do some algebra,
we're going to need to get rid of any mention
of the variable t.
OK.
So the first way that we're going to work this out
is using total differentials.
And I like to use total differentials
when I'm on new ground because-- they're not
the most computationally effective,
because they involve computing all the derivatives that we
might possibly need in sight.
So they're not the most efficient computationally.
But if you go ahead and compute the total differentials,
then all the other computations that you have
to do are just substitution.
So it really just becomes linear algebra,
and that's what I like about it.
In part b, we'll see a shortcut using implicit differentiation
and the chain rule.
And this is going to be a little bit tricky.
So we have these two equations, we
need to turn them both into differential equations.
And so we'll do that using a combination
of implicit differentiation and the chain rule.
So I'll let you pause the video and get
started on these problems.
And you can check back and we'll work it out together.
OK, welcome back.
So let's start by doing a, let's start with problem a.
So we have total differentials is the suggested way
to attack this.
So why don't we just start computing
the total differentials that we know.
So we have two equations.
w in relation to the other variables and the constraint
equation.
And what we first want to do is just
take the total differential of both of those equations
to get started.
So we can take the first one and it tells us that dw is equal
to-- OK, so we have 3 x squared y dx, plus x cubed dy,
minus 2z*t dz, minus z squared dt.
OK.
Now right away, we can simplify this equation.
So this is the total differential,
but we have to remember that in the setting we're
interested in, x and y are held fixed.
And so holding x and y fixed means that the differentials dx
and dy are both set to 0.
So that lets us rewrite this first differential equation is
just dw equals minus 2z*t dz minus z squared dt.
So that's our first equation that we get.
Let me just check with my notes to make sure.
That's right.
OK.
And so now, we have the constraint equation
from the original statement of the problem.
And we need to take its differential.
So on the one hand, we get x dy plus y dx.
That's the total differential of the left-hand side.
And then on the right-hand side, we have t dz plus z dt.
OK?
And now we notice that now the left-hand side of this equation
is just 0 for the same reason.
dy and dx are being held fixed.
So the relation that we end up getting
is we get that dt is equal to minus t over z dz by just
doing straightforward algebra.
OK.
So, with that in hand now, we can-- so
remember I mentioned in the beginning
that our goal was-- so from the very beginning,
we knew that if we varied z, because of our constraint,
we're going to be forced to be varying t.
And that's exactly what this equation says, doesn't it?
We got this by just taking the differential of the constraint.
And it says if you vary z, you have
to vary t in an appropriate way, and that's
what this coefficient tells us.
So what we're really interested in
is how does w vary in terms of z here.
And so we want to get rid of this dt here.
And in fact, we can by using the constraint.
So combining this equation with this equation,
we get that dw here is equal to-- OK,
so we have minus 2z*t dz.
And then we have minus-- OK-- z squared times another minus
times t over z, so this all becomes a plus z*t dz.
So all I did is I plugged in for dt using our formula here.
And so this altogether is equal to just minus z*t dz.
And that tells us that the partial derivative that we're
after is just this coefficient, right?
The partial derivative is just defined
to be the coefficient of the differential
once you work everything out.
And so this is minus z*t.
OK, so that's a.
So now let's see if we can use some tricks to make
the computation a bit shorter.
So the tricks that we're going to use
are implicit differentiation and the chain rule.
So at the end of the day-- excuse me--
we're interested in partial w partial z.
And what we're going to do is use the chain rule
to just take a straightforward partial derivative
of our original expression.
So remember, w was x cubed y minus z t squared.
And so let's just take a partial derivative
of that in the z-direction.
So the partial derivative in the z-direction of x cubed y
is just 0.
So that will go away.
And so we only have minus-- we have a 2z*t component.
That's just because the partial derivative of z squared is 2z.
And then we have another term which is minus z squared,
and now we need to take the partial derivative of t
in the z-direction.
So, you know, often times when we take partial derivatives
of one variable in terms of the other,
it's common to think that the partial derivative of one
variable in terms of the other is just 0.
Because usually our variables are independent.
They don't vary in terms of one another.
But this is exactly a situation where
t does vary depending on z, and so we had to include that
into our notation.
OK.
So now this is almost what we want,
except we have this mystery component here.
And of course, there's only one way
we can solve this mystery, which is the same way we solved it
in part a.
We have to use the constraint.
So let's take partial z of our constraint equation.
And remember, our constraint equation was x*y equals z*t.
OK.
So if we take the partial derivative of this equation--
so if I take the partial derivative of x and y
in terms of z, then I do get 0, because x and y are
genuinely independent from z.
It's only t that depends on z.
So on this side we get 0.
Now, on the other side I just need to use the product rule.
So I get t, plus z partial t partial z.
OK?
So we can rewrite this as saying that partial t partial z is
minus t over z.
OK?
Now, you might notice that, you know, this is formally
very similar to what we did in part a, and of course,
that's no surprise.
When we are manipulating using implicit differentiation
and the chain rule, it's just a compact way
of doing what we were doing with the total differentials.
I mean, to me, the chain rule is a computation
which you could prove by doing the corresponding thing
with total differentials.
And so we get this same coefficient negative t over z,
which you recall that we got in part a.
OK.
So now we have, once again we have this, two equations,
and we just can do substitution.
So we get that partial w partial z is equal to minus 2z*t.
And now again, we get minus another minus,
and z here cancels the z squared, so we get plus z*t.
And so we get minus z*t.
OK, and finally, if we remember our assumptions,
our assumptions were that x and y were independent of z.
That was our notation.
And we use that assumption at this step right here.
So in fact, we don't just have the partial derivative of w
with respect to z.
We need to specify that we held x and y fixed.
OK.
So just to review again, if we look now
at what we did in part b, you know, the meat of the argument
was the exact same as what we did in part a.
The meat of the argument was right here.
We took some derivative and then this was an unknown.
The definition of w doesn't know how
t and z depend on one another.
That you can only find by looking at the constraint.
And so we just went through the problem
and we took derivatives of the constraint,
and that gave us an equation that we were looking for.
Now if we go back now to part a over here.
So as you can see, there's a lot more work involved in part a.
On the other hand, to me it was more straightforward.
We just had to compute the total differentials
and then do some linear algebra with cancellations.
And somehow, when you do total differentials,
you just compute everything that could possibly come up,
and then you just substitute it in.
And indeed, we got the same answer:
partial w partial z as being minus z*t.
OK, and I think I'll stop there.