1 00:00:00,000 --> 00:00:07,040 2 00:00:07,040 --> 00:00:09,140 DAVID JORDAN: Hello, and welcome back to recitation. 3 00:00:09,140 --> 00:00:12,300 So today, the problem I'd like to work with you is about 4 00:00:12,300 --> 00:00:15,120 taking partial derivatives in the presence of constraints. 5 00:00:15,120 --> 00:00:20,160 So this is a pretty subtle business. 6 00:00:20,160 --> 00:00:23,440 So take your time when you work these problems. 7 00:00:23,440 --> 00:00:26,260 So what we have is we have this function w, and it's a 8 00:00:26,260 --> 00:00:31,020 function of four variables: x, y, z, and t. 9 00:00:31,020 --> 00:00:31,490 OK? 10 00:00:31,490 --> 00:00:34,230 But it's not really a function of these four variables 11 00:00:34,230 --> 00:00:36,890 because we have a constraint. 12 00:00:36,890 --> 00:00:43,380 So we want to study how w changes as we vary the 13 00:00:43,380 --> 00:00:46,190 parameters, except that we have imposed 14 00:00:46,190 --> 00:00:47,260 this constraint here. 15 00:00:47,260 --> 00:00:51,190 So that really we kind of only have three variables, because 16 00:00:51,190 --> 00:00:53,960 we have four variables and one constraint. 17 00:00:53,960 --> 00:00:58,630 So that's what partial derivatives with constraints 18 00:00:58,630 --> 00:01:00,240 help us do. 19 00:01:00,240 --> 00:01:02,260 So let's explain first the notation. 20 00:01:02,260 --> 00:01:02,810 OK? 21 00:01:02,810 --> 00:01:07,450 So it says partial w partial z, and then we have the 22 00:01:07,450 --> 00:01:08,790 subscripts x and y. 23 00:01:08,790 --> 00:01:12,320 So what's important about this notation is not what you see 24 00:01:12,320 --> 00:01:13,480 as much as what you don't see. 25 00:01:13,480 --> 00:01:15,950 What you don't see is the variable t. 26 00:01:15,950 --> 00:01:16,660 OK? 27 00:01:16,660 --> 00:01:21,340 So what this notation means is, as always, the denominator 28 00:01:21,340 --> 00:01:22,990 in our derivative expression-- 29 00:01:22,990 --> 00:01:27,045 partial z here-- that means that we want to vary z. 30 00:01:27,045 --> 00:01:30,620 And we want to see how w changes as we vary z. 31 00:01:30,620 --> 00:01:35,810 And the x and y here mean that we want to keep x and y fixed. 32 00:01:35,810 --> 00:01:39,970 So if we didn't have a constraint, this x and y here 33 00:01:39,970 --> 00:01:40,770 would be superfluous. 34 00:01:40,770 --> 00:01:43,410 Because by partial derivative, we always mean to keep the 35 00:01:43,410 --> 00:01:47,510 other unlisted variables unchanged. 36 00:01:47,510 --> 00:01:51,790 However, the fact that t is missing here, it means that-- 37 00:01:51,790 --> 00:01:55,960 so if you think about it-- if we vary z, and we keep x and y 38 00:01:55,960 --> 00:01:58,820 fixed, then t also is varying. 39 00:01:58,820 --> 00:01:59,070 Right? 40 00:01:59,070 --> 00:02:00,690 Because we have this constraint here. 41 00:02:00,690 --> 00:02:04,995 And so it wouldn't make sense for me to ask you to compute 42 00:02:04,995 --> 00:02:07,593 the partial derivative of w in z varying x, y and t because-- 43 00:02:07,593 --> 00:02:08,843 excuse me-- 44 00:02:08,843 --> 00:02:10,640 45 00:02:10,640 --> 00:02:12,680 keeping x, y, and t fixed, because then there would be no 46 00:02:12,680 --> 00:02:13,880 room for z to vary. 47 00:02:13,880 --> 00:02:14,070 OK? 48 00:02:14,070 --> 00:02:18,880 So this notation means that z is going to be allowed to 49 00:02:18,880 --> 00:02:21,020 vary, but it's going to vary in a way that we're 50 00:02:21,020 --> 00:02:21,840 just going to ignore. 51 00:02:21,840 --> 00:02:23,780 So you will see how this works out in the problem. 52 00:02:23,780 --> 00:02:25,550 So what we're really interested in is making sure 53 00:02:25,550 --> 00:02:30,810 that x and y stay fixed and that z varies. 54 00:02:30,810 --> 00:02:33,540 And then we're going to need to, when we do some algebra, 55 00:02:33,540 --> 00:02:35,470 we're going to need to get rid of any mention of 56 00:02:35,470 --> 00:02:37,250 the variable t. 57 00:02:37,250 --> 00:02:38,930 OK. 58 00:02:38,930 --> 00:02:41,380 So the first way that we're going to work this out is 59 00:02:41,380 --> 00:02:42,930 using total differentials. 60 00:02:42,930 --> 00:02:46,040 And I like to use total differentials when I'm on new 61 00:02:46,040 --> 00:02:50,830 ground because they're not the most computationally 62 00:02:50,830 --> 00:02:52,940 effective, because they involve computing all the 63 00:02:52,940 --> 00:02:55,900 derivatives that we might possibly need in sight. 64 00:02:55,900 --> 00:02:58,750 So they're not the most efficient computationally. 65 00:02:58,750 --> 00:03:03,180 But if you go ahead and compute the total 66 00:03:03,180 --> 00:03:06,660 differentials, then all the other computations that you 67 00:03:06,660 --> 00:03:08,260 have to do are just substitution. 68 00:03:08,260 --> 00:03:10,300 So it really just becomes linear algebra, and that's 69 00:03:10,300 --> 00:03:12,100 what I like about it. 70 00:03:12,100 --> 00:03:15,600 In part b, we'll see a shortcut using implicit 71 00:03:15,600 --> 00:03:18,340 differentiation and the chain rule. 72 00:03:18,340 --> 00:03:20,810 And this is going to be a little bit tricky. 73 00:03:20,810 --> 00:03:23,950 So we have these two equations, we need to turn 74 00:03:23,950 --> 00:03:27,480 them both into differential equations. 75 00:03:27,480 --> 00:03:29,800 And so we'll do that using a combination of implicit 76 00:03:29,800 --> 00:03:32,300 differentiation and the chain rule. 77 00:03:32,300 --> 00:03:36,440 So I'll let you pause the video and get started on these 78 00:03:36,440 --> 00:03:38,710 problems. And you can check back and 79 00:03:38,710 --> 00:03:39,960 we'll work it out together. 80 00:03:39,960 --> 00:03:46,640 81 00:03:46,640 --> 00:03:47,990 OK, welcome back. 82 00:03:47,990 --> 00:03:53,260 So let's start by doing a, let's start with problem a. 83 00:03:53,260 --> 00:03:56,590 84 00:03:56,590 --> 00:04:00,520 So we have total differentials is the suggested 85 00:04:00,520 --> 00:04:01,290 way to attack this. 86 00:04:01,290 --> 00:04:03,230 So why don't we just start computing the total 87 00:04:03,230 --> 00:04:04,630 differentials that we know. 88 00:04:04,630 --> 00:04:06,590 So we have two equations. 89 00:04:06,590 --> 00:04:09,630 w in relation to the other variables and 90 00:04:09,630 --> 00:04:10,830 the constraint equation. 91 00:04:10,830 --> 00:04:12,570 And what we first want to do is just take the total 92 00:04:12,570 --> 00:04:15,080 differential of both of those equations to get started. 93 00:04:15,080 --> 00:04:17,600 So we can take the first one and it tells us 94 00:04:17,600 --> 00:04:22,363 that dw is equal to-- 95 00:04:22,363 --> 00:04:24,560 OK so we have-- 96 00:04:24,560 --> 00:04:46,450 3x squared y dx, plus x cubed dy, minus 2zt dz, minus z 97 00:04:46,450 --> 00:04:51,820 squared dt. 98 00:04:51,820 --> 00:04:52,790 OK. 99 00:04:52,790 --> 00:04:56,280 Now right away, we can simplify this equation. 100 00:04:56,280 --> 00:04:58,330 So this is the total differential, but we have to 101 00:04:58,330 --> 00:05:01,860 remember that in the setting we're interested in, x and y 102 00:05:01,860 --> 00:05:03,280 are held fixed. 103 00:05:03,280 --> 00:05:07,440 And so holding x and y fixed means that the differentials 104 00:05:07,440 --> 00:05:11,070 dx and dy are both set to 0. 105 00:05:11,070 --> 00:05:15,760 So that lets us rewrite this first differential equation is 106 00:05:15,760 --> 00:05:29,670 just dw equals minus 2zt dz minus z squared dt. 107 00:05:29,670 --> 00:05:31,050 So that's our first equation that we get. 108 00:05:31,050 --> 00:05:32,645 Let me just check with my notes to make sure. 109 00:05:32,645 --> 00:05:39,640 110 00:05:39,640 --> 00:05:41,510 That's right. 111 00:05:41,510 --> 00:05:42,330 OK. 112 00:05:42,330 --> 00:05:46,050 And so now, we have the constraint equation from the 113 00:05:46,050 --> 00:05:47,390 original statement of the problem. 114 00:05:47,390 --> 00:05:48,640 And we need to take its differential. 115 00:05:48,640 --> 00:05:52,110 116 00:05:52,110 --> 00:05:58,530 So on the one hand, we get x dy plus y dx. 117 00:05:58,530 --> 00:06:01,940 That's the total differential of the left-hand side. 118 00:06:01,940 --> 00:06:11,110 And then on the right-hand side, we have t dz plus z dt. 119 00:06:11,110 --> 00:06:11,750 OK? 120 00:06:11,750 --> 00:06:15,020 And now we notice that now the left-hand side of this 121 00:06:15,020 --> 00:06:18,910 equation is just 0 for the same reason. 122 00:06:18,910 --> 00:06:22,100 dy and dx are being held fixed. 123 00:06:22,100 --> 00:06:28,260 So the relation that we end up getting is we get that dt is 124 00:06:28,260 --> 00:06:37,560 equal to minus t over z dz by just doing 125 00:06:37,560 --> 00:06:40,830 straightforward algebra. 126 00:06:40,830 --> 00:06:42,080 OK. 127 00:06:42,080 --> 00:06:51,400 128 00:06:51,400 --> 00:06:51,532 So with that in hand now we can-- so remember I mentioned 129 00:06:51,532 --> 00:06:52,120 in the beginning our goal was-- so from the very 130 00:06:52,120 --> 00:06:54,700 beginning, we knew that if we varied z, because of our 131 00:06:54,700 --> 00:06:57,950 constraint, we're going to be forced to be varying t. 132 00:06:57,950 --> 00:07:00,850 And that's exactly what this equation says, doesn't it? 133 00:07:00,850 --> 00:07:02,840 We got this by just taking the differential of the 134 00:07:02,840 --> 00:07:03,140 constraint. 135 00:07:03,140 --> 00:07:07,840 And it says if you vary z, you have to vary t in an 136 00:07:07,840 --> 00:07:09,230 appropriate way, and that's what this 137 00:07:09,230 --> 00:07:11,340 coefficient tells us. 138 00:07:11,340 --> 00:07:15,870 So what we're really interested in is how does w 139 00:07:15,870 --> 00:07:18,460 vary in terms of z here. 140 00:07:18,460 --> 00:07:21,010 And so we want to get rid of this dt here. 141 00:07:21,010 --> 00:07:25,060 And in fact, we can by using the constraint. 142 00:07:25,060 --> 00:07:33,880 So combining this equation with this equation, we get 143 00:07:33,880 --> 00:07:41,453 that dw here is equal to-- 144 00:07:41,453 --> 00:07:42,820 OK, so we have-- 145 00:07:42,820 --> 00:07:48,085 minus 2zt dz. 146 00:07:48,085 --> 00:07:50,750 147 00:07:50,750 --> 00:07:51,820 And then we have-- 148 00:07:51,820 --> 00:07:52,035 minus-- 149 00:07:52,035 --> 00:07:53,420 OK-- 150 00:07:53,420 --> 00:07:56,640 z squared times another minus times t over 151 00:07:56,640 --> 00:07:58,290 z, so this all becomes-- 152 00:07:58,290 --> 00:08:04,000 plus zt dz. 153 00:08:04,000 --> 00:08:08,250 So all I did is I plugged in for dt using our formula here. 154 00:08:08,250 --> 00:08:18,840 And so this altogether is equal to just minus zt dz. 155 00:08:18,840 --> 00:08:22,920 And that tells us that the partial derivative that we're 156 00:08:22,920 --> 00:08:31,520 after is just this coefficient, right? 157 00:08:31,520 --> 00:08:34,780 The partial derivative is just defined to be the coefficient 158 00:08:34,780 --> 00:08:37,220 of the differential once you work everything out. 159 00:08:37,220 --> 00:08:39,300 And so this is minus zt. 160 00:08:39,300 --> 00:08:45,250 161 00:08:45,250 --> 00:08:47,350 OK, so that's a. 162 00:08:47,350 --> 00:08:53,080 So now let's see if we can use some tricks to make the 163 00:08:53,080 --> 00:08:54,075 computation a bit shorter. 164 00:08:54,075 --> 00:08:56,790 So the tricks that we're going to use are implicit 165 00:08:56,790 --> 00:08:58,880 differentiation and the chain rule. 166 00:08:58,880 --> 00:09:09,500 167 00:09:09,500 --> 00:09:10,650 So at the end of the day-- excuse me-- 168 00:09:10,650 --> 00:09:13,330 we're interested in partial w partial z. 169 00:09:13,330 --> 00:09:16,240 170 00:09:16,240 --> 00:09:18,930 And what we're going to do is use the chain rule to just 171 00:09:18,930 --> 00:09:21,950 take a straightforward partial derivative of our original 172 00:09:21,950 --> 00:09:22,590 expression. 173 00:09:22,590 --> 00:09:27,450 So remember, w was x cubed y minus zt squared. 174 00:09:27,450 --> 00:09:30,400 And so let's just take a partial derivative of that in 175 00:09:30,400 --> 00:09:31,650 the z-direction. 176 00:09:31,650 --> 00:09:33,890 177 00:09:33,890 --> 00:09:37,095 So the partial derivative in the z-direction of x 178 00:09:37,095 --> 00:09:38,450 cubed y is just 0. 179 00:09:38,450 --> 00:09:39,830 So that will go away. 180 00:09:39,830 --> 00:09:48,210 And so we only have minus, we have a 2zt component. 181 00:09:48,210 --> 00:09:49,870 That's just because the partial derivative of z 182 00:09:49,870 --> 00:09:52,820 squared is 2z. 183 00:09:52,820 --> 00:09:58,060 And then we have another term which is minus z squared, and 184 00:09:58,060 --> 00:10:01,270 now we need to take the partial derivative of t in the 185 00:10:01,270 --> 00:10:02,520 z-direction. 186 00:10:02,520 --> 00:10:11,720 187 00:10:11,720 --> 00:10:14,530 So, you know, often times when we take partial derivatives of 188 00:10:14,530 --> 00:10:27,240 one variable in terms of the other, it's common to think 189 00:10:27,240 --> 00:10:29,780 that the partial derivative of one variable in terms of the 190 00:10:29,780 --> 00:10:30,630 other is just 0. 191 00:10:30,630 --> 00:10:32,610 Because usually our variables are independent. 192 00:10:32,610 --> 00:10:34,270 They don't vary in terms of one another. 193 00:10:34,270 --> 00:10:37,950 But this is exactly a situation where t does vary 194 00:10:37,950 --> 00:10:39,630 depending on z, and so we had to include 195 00:10:39,630 --> 00:10:41,450 that into our notation. 196 00:10:41,450 --> 00:10:43,460 OK. 197 00:10:43,460 --> 00:10:46,290 So now this is almost what we want, except we have this 198 00:10:46,290 --> 00:10:47,400 mystery component here. 199 00:10:47,400 --> 00:10:49,160 And of course, there's only one way we can solve this 200 00:10:49,160 --> 00:10:52,100 mystery, which is the same way we solved it in part a. 201 00:10:52,100 --> 00:10:53,350 We have to use the constraint. 202 00:10:53,350 --> 00:10:58,250 203 00:10:58,250 --> 00:11:04,220 So let's take partial z of our constraint equation. 204 00:11:04,220 --> 00:11:08,672 And remember, our constraint equation was xy equals zt. 205 00:11:08,672 --> 00:11:11,860 206 00:11:11,860 --> 00:11:13,880 OK. 207 00:11:13,880 --> 00:11:16,178 So if we take the partial derivative of this equation, 208 00:11:16,178 --> 00:11:22,290 so if I take the partial derivative x and y in terms of 209 00:11:22,290 --> 00:11:28,210 z, then I do get 0, because x and y are genuinely 210 00:11:28,210 --> 00:11:31,790 independent from z. 211 00:11:31,790 --> 00:11:34,230 It's only t that depends on z. 212 00:11:34,230 --> 00:11:37,080 So on this side we get 0. 213 00:11:37,080 --> 00:11:40,370 Now, on the other side I just need to use the product rule. 214 00:11:40,370 --> 00:11:55,590 So I get t, plus z partial t partial z. 215 00:11:55,590 --> 00:11:59,180 216 00:11:59,180 --> 00:12:00,730 OK? 217 00:12:00,730 --> 00:12:08,060 So we can rewrite this as saying that partial t partial 218 00:12:08,060 --> 00:12:11,790 z is minus t over z. 219 00:12:11,790 --> 00:12:15,090 220 00:12:15,090 --> 00:12:15,670 OK? 221 00:12:15,670 --> 00:12:18,640 Now, you might notice that, you know, this is formally 222 00:12:18,640 --> 00:12:21,820 very similar to what we did in part a, and of course, that's 223 00:12:21,820 --> 00:12:23,290 no surprise. 224 00:12:23,290 --> 00:12:27,880 When we are manipulating using implicit differentiation and 225 00:12:27,880 --> 00:12:31,223 the chain rule, it's just a compact way of doing what we 226 00:12:31,223 --> 00:12:32,740 were doing with the total differentials. 227 00:12:32,740 --> 00:12:37,930 I mean, to me, the chain rule is a computation which you 228 00:12:37,930 --> 00:12:42,750 could prove by doing the corresponding thing with total 229 00:12:42,750 --> 00:12:43,720 differentials. 230 00:12:43,720 --> 00:12:46,920 And so we get this same coefficient negative t over z, 231 00:12:46,920 --> 00:12:50,880 which you recall that we got in part a. 232 00:12:50,880 --> 00:12:51,390 OK. 233 00:12:51,390 --> 00:12:59,990 So now we have, once again we have this, two equations and 234 00:12:59,990 --> 00:13:01,880 we just can do substitution. 235 00:13:01,880 --> 00:13:08,780 So we get that partial w partial z is 236 00:13:08,780 --> 00:13:15,592 equal to minus 2zt. 237 00:13:15,592 --> 00:13:21,500 And now again, we get minus another minus, and z here 238 00:13:21,500 --> 00:13:26,490 cancels the z squared, so we get plus zt. 239 00:13:26,490 --> 00:13:29,400 And so we get minus zt. 240 00:13:29,400 --> 00:13:32,540 241 00:13:32,540 --> 00:13:36,530 OK, and finally, if we remember our assumptions, our 242 00:13:36,530 --> 00:13:40,390 assumptions were that x and y were independent of z. 243 00:13:40,390 --> 00:13:41,810 That was our notation. 244 00:13:41,810 --> 00:13:45,070 And we use that assumption at this step right here. 245 00:13:45,070 --> 00:13:47,870 So in fact, we don't just have the partial derivative of w 246 00:13:47,870 --> 00:13:49,780 with respect to z. 247 00:13:49,780 --> 00:13:54,140 We need to specify that we held x and y fixed. 248 00:13:54,140 --> 00:13:56,150 OK. 249 00:13:56,150 --> 00:14:01,750 So just to review again, if we look now at what we did in 250 00:14:01,750 --> 00:14:06,900 part b, you know, the meat of the argument was the exact 251 00:14:06,900 --> 00:14:08,880 same as what we did in part a. 252 00:14:08,880 --> 00:14:11,300 The meat of the argument was right here. 253 00:14:11,300 --> 00:14:15,420 We took some derivative and then this was an unknown. 254 00:14:15,420 --> 00:14:18,050 The definition of w doesn't know how t and z 255 00:14:18,050 --> 00:14:18,800 depend on one another. 256 00:14:18,800 --> 00:14:21,230 That you can only find by looking at the constraint. 257 00:14:21,230 --> 00:14:27,690 And so we just went through the problem and we took 258 00:14:27,690 --> 00:14:30,590 derivatives of the constraint, and that gave us an equation 259 00:14:30,590 --> 00:14:31,840 that we were looking for. 260 00:14:31,840 --> 00:14:35,270 261 00:14:35,270 --> 00:14:39,140 Now if we go back now to part a over here. 262 00:14:39,140 --> 00:14:46,540 263 00:14:46,540 --> 00:14:48,530 So as you can see, there's a lot more work 264 00:14:48,530 --> 00:14:49,510 involved in part a. 265 00:14:49,510 --> 00:14:51,670 On the other hand, to me it was more straightforward. 266 00:14:51,670 --> 00:14:55,240 We just had to compute the total differentials and then 267 00:14:55,240 --> 00:14:58,630 do some linear algebra with cancellations. 268 00:14:58,630 --> 00:15:00,980 And somehow, when you do total differentials, you just 269 00:15:00,980 --> 00:15:03,340 compute everything that could possibly come up, and then you 270 00:15:03,340 --> 00:15:04,860 just substitute it in. 271 00:15:04,860 --> 00:15:09,950 And indeed, we got the same answer: partial w partial z as 272 00:15:09,950 --> 00:15:12,690 being minus zt. 273 00:15:12,690 --> 00:15:14,980 OK, and I think I'll stop there. 274 00:15:14,980 --> 00:15:15,115