1 00:00:00,000 --> 00:00:07,680 2 00:00:07,680 --> 00:00:09,860 DAVID JORDAN: Hello, and welcome back to recitation. 3 00:00:09,860 --> 00:00:12,910 Today the problem I'd like to work with you is about 4 00:00:12,910 --> 00:00:16,930 computing partial derivatives and the total differential. 5 00:00:16,930 --> 00:00:20,760 So we have a function z which is x squared plus y squared. 6 00:00:20,760 --> 00:00:23,100 So it depends on the two variables x and y. 7 00:00:23,100 --> 00:00:26,920 Now the variables x and y themselves depend on two 8 00:00:26,920 --> 00:00:30,210 auxiliary variables, u and v. So that's the setup that we 9 00:00:30,210 --> 00:00:31,520 have. 10 00:00:31,520 --> 00:00:35,500 So in part a, we just want to compute the total differential 11 00:00:35,500 --> 00:00:38,420 dz in terms of dx and dy. 12 00:00:38,420 --> 00:00:41,220 So u and v aren't going to enter into the picture. 13 00:00:41,220 --> 00:00:45,220 And then in part b, we're going to compute the partial 14 00:00:45,220 --> 00:00:50,270 derivative partial z partial u in two different ways. 15 00:00:50,270 --> 00:00:53,270 First, we're going to compute it using the chain rule. 16 00:00:53,270 --> 00:00:55,540 And then we're going to compute it using total 17 00:00:55,540 --> 00:00:57,940 differentials. 18 00:00:57,940 --> 00:01:00,750 And so we'll substitute in some of the work that we had 19 00:01:00,750 --> 00:01:02,610 in a to solve that part. 20 00:01:02,610 --> 00:01:05,630 So why don't you pause the video now 21 00:01:05,630 --> 00:01:06,790 and work on the problem. 22 00:01:06,790 --> 00:01:08,440 We'll check back and we'll do it together. 23 00:01:08,440 --> 00:01:15,670 24 00:01:15,670 --> 00:01:16,480 Hi, and welcome back. 25 00:01:16,480 --> 00:01:17,730 Let's get started. 26 00:01:17,730 --> 00:01:20,550 27 00:01:20,550 --> 00:01:23,130 So first, computing a is not so bad. 28 00:01:23,130 --> 00:01:25,730 29 00:01:25,730 --> 00:01:27,670 So we just need to first remember, what does it mean to 30 00:01:27,670 --> 00:01:29,980 compute the total differential? 31 00:01:29,980 --> 00:01:36,380 So the total differential dz is just the partial derivative 32 00:01:36,380 --> 00:01:43,670 of z in the x-direction dx plus z in the y-direction dy. 33 00:01:43,670 --> 00:01:44,430 OK? 34 00:01:44,430 --> 00:01:48,250 So now, looking at our formula here for z. 35 00:01:48,250 --> 00:01:52,315 We have, so, the partial derivative of z in the 36 00:01:52,315 --> 00:01:58,020 x-direction is 2x, so this is 2x dx. 37 00:01:58,020 --> 00:02:01,466 And the partial derivative of z in the y is 2y, 38 00:02:01,466 --> 00:02:05,860 so we have 2y dy. 39 00:02:05,860 --> 00:02:09,310 OK, and that's all we have to do for a. 40 00:02:09,310 --> 00:02:16,650 Now for b, we want to compute this partial derivative in two 41 00:02:16,650 --> 00:02:17,510 different ways. 42 00:02:17,510 --> 00:02:18,780 First, using the chain rule. 43 00:02:18,780 --> 00:02:20,910 So let's remember what the chain rule says. 44 00:02:20,910 --> 00:02:24,000 So whenever I think about the chain rule, I like to draw 45 00:02:24,000 --> 00:02:30,830 this dependency graph. 46 00:02:30,830 --> 00:02:31,165 OK? 47 00:02:31,165 --> 00:02:33,950 And this is just a way for me to organize how the different 48 00:02:33,950 --> 00:02:36,150 variables depend on one another. 49 00:02:36,150 --> 00:02:39,270 So at the top, we have z. 50 00:02:39,270 --> 00:02:48,200 And z is a function of x and y, but x is itself a function 51 00:02:48,200 --> 00:02:56,330 of both u and v, and y is also a function of u and v. So z 52 00:02:56,330 --> 00:03:00,060 depends on x and y, and x and y each jointly depend on u and 53 00:03:00,060 --> 00:03:01,850 v. So it's a little bit complicated, the 54 00:03:01,850 --> 00:03:03,540 relationships here. 55 00:03:03,540 --> 00:03:07,260 So now, what the chain rule says is that if we take a 56 00:03:07,260 --> 00:03:08,510 partial derivative-- 57 00:03:08,510 --> 00:03:11,050 58 00:03:11,050 --> 00:03:12,880 partial z partial u-- 59 00:03:12,880 --> 00:03:16,250 we have to go through our dependency graph. 60 00:03:16,250 --> 00:03:21,960 Every way that we can get from z to u, we get a term in our 61 00:03:21,960 --> 00:03:23,980 summation for each one of those. 62 00:03:23,980 --> 00:03:27,240 So for instance, z goes to x goes to u. 63 00:03:27,240 --> 00:03:33,000 So that means that we have partial z, partial x, partial 64 00:03:33,000 --> 00:03:36,130 x, partial u. 65 00:03:36,130 --> 00:03:41,470 And then we can also go z goes to y goes to u. 66 00:03:41,470 --> 00:03:46,780 And that will give us partial z, partial y, 67 00:03:46,780 --> 00:03:51,000 partial y, partial u. 68 00:03:51,000 --> 00:03:54,930 And now these partials are ones that we can just compute 69 00:03:54,930 --> 00:03:56,590 from our formulas. 70 00:03:56,590 --> 00:03:59,490 So for instance, partial z partial x is 71 00:03:59,490 --> 00:04:00,820 2x, which we computed. 72 00:04:00,820 --> 00:04:03,990 73 00:04:03,990 --> 00:04:08,270 Now partial x, partial u, we have to remember that x is 74 00:04:08,270 --> 00:04:10,770 defined as u squared minus v squared. 75 00:04:10,770 --> 00:04:13,570 And so partial x, partial u, that's 2u. 76 00:04:13,570 --> 00:04:18,480 77 00:04:18,480 --> 00:04:25,280 Partial z, partial y, again, is this 2y that we computed. 78 00:04:25,280 --> 00:04:33,360 And partial y, partial u is v. This v is just because u was 79 00:04:33,360 --> 00:04:36,060 uv, and we take a partial in the u-direction. 80 00:04:36,060 --> 00:04:37,310 OK. 81 00:04:37,310 --> 00:04:39,590 82 00:04:39,590 --> 00:04:49,310 So altogether this is 4ux plus 2vy, and that's our partial 83 00:04:49,310 --> 00:04:51,410 derivative. 84 00:04:51,410 --> 00:04:56,900 So notice that, you know, x is a function of u and v. So if I 85 00:04:56,900 --> 00:04:59,950 really wanted to, I could substitute for x its formula 86 00:04:59,950 --> 00:05:02,191 for u and v, but that's not really necessary. 87 00:05:02,191 --> 00:05:06,400 You know, Wwat's interesting about these problems is how 88 00:05:06,400 --> 00:05:10,490 the differentials depend on one another, and I'm perfectly 89 00:05:10,490 --> 00:05:12,870 happy with an answer that has mixed variables like this. 90 00:05:12,870 --> 00:05:14,070 That's fine. 91 00:05:14,070 --> 00:05:21,900 So now, let's go over here and let's see if we can get the 92 00:05:21,900 --> 00:05:25,910 same answer by using total differentials. 93 00:05:25,910 --> 00:05:30,340 Now, I have to say that the chain rule that we used on the 94 00:05:30,340 --> 00:05:35,600 previous problem, it's the quickest way to do 95 00:05:35,600 --> 00:05:38,620 these sorts of things. 96 00:05:38,620 --> 00:05:42,420 I like to do total differentials if I have some 97 00:05:42,420 --> 00:05:44,130 time to actually explore the problem and get 98 00:05:44,130 --> 00:05:44,750 comfortable with it. 99 00:05:44,750 --> 00:05:47,190 I prefer to use total differentials because I think 100 00:05:47,190 --> 00:05:48,090 it's a little bit clearer. 101 00:05:48,090 --> 00:05:51,920 Somehow, this chain rule it's just, to me, it's just a 102 00:05:51,920 --> 00:05:55,090 prescription, it's not an explanation. 103 00:05:55,090 --> 00:05:57,325 So why don't we compute some total differentials. 104 00:05:57,325 --> 00:06:02,220 105 00:06:02,220 --> 00:06:04,060 So we already saw-- let me just repeat over here. 106 00:06:04,060 --> 00:06:09,630 We already saw that dz is 2x dx plus 2y dy. 107 00:06:09,630 --> 00:06:12,150 108 00:06:12,150 --> 00:06:14,600 OK. 109 00:06:14,600 --> 00:06:17,430 Now, we want to use the fact that x is itself a function of 110 00:06:17,430 --> 00:06:19,700 u and v. So that's what we need to do now. 111 00:06:19,700 --> 00:06:30,890 So that tells us that dx is 2u du minus 2v 112 00:06:30,890 --> 00:06:33,660 dv in the same way. 113 00:06:33,660 --> 00:06:36,630 And dy. 114 00:06:36,630 --> 00:06:43,640 So remember, y was uv. So taking d of uv, we get v du 115 00:06:43,640 --> 00:06:48,420 plus u dv. OK? 116 00:06:48,420 --> 00:06:52,700 So now, so what we've done is we've just listed out all of 117 00:06:52,700 --> 00:06:54,870 the total differentials. 118 00:06:54,870 --> 00:06:58,210 And the nice thing about this is once you've done these 119 00:06:58,210 --> 00:07:01,860 computations, now it's just substitution. 120 00:07:01,860 --> 00:07:07,160 So what we really want to know is how does z depend on u and 121 00:07:07,160 --> 00:07:10,870 v. And so all we need to do is substitute in our 122 00:07:10,870 --> 00:07:12,880 formulas for dx here. 123 00:07:12,880 --> 00:07:18,110 So this tells us that dz is, OK, so we have 2x-- 124 00:07:18,110 --> 00:07:20,680 125 00:07:20,680 --> 00:07:26,700 instead of dx, we just plug in here-- so we have 2u du minus 126 00:07:26,700 --> 00:07:32,830 2v dv. So that was this term. 127 00:07:32,830 --> 00:07:37,850 And now we have plus 2y-- 128 00:07:37,850 --> 00:07:41,940 and now we just plug in this-- 129 00:07:41,940 --> 00:07:48,290 so v du plus u dv. You see? 130 00:07:48,290 --> 00:07:51,010 It's just substitution. 131 00:07:51,010 --> 00:07:52,570 So then now, we just expand everything out. 132 00:07:52,570 --> 00:07:56,630 133 00:07:56,630 --> 00:07:57,020 And so we get-- 134 00:07:57,020 --> 00:08:01,020 OK, so let's collect all the things involving du. 135 00:08:01,020 --> 00:08:05,850 So if we collect all the things involving du we have-- 136 00:08:05,850 --> 00:08:07,480 2 times 2 times x times u-- 137 00:08:07,480 --> 00:08:17,240 4xu plus 2yv. This whole quantity times du. 138 00:08:17,240 --> 00:08:19,900 139 00:08:19,900 --> 00:08:25,720 And then if we collect the terms in dv, we have 2yu. 140 00:08:25,720 --> 00:08:33,760 So that's coming from here, and then we have 141 00:08:33,760 --> 00:08:42,142 a minus 4xv. OK? 142 00:08:42,142 --> 00:08:43,392 And now what that tells us is that-- 143 00:08:43,392 --> 00:08:47,180 144 00:08:47,180 --> 00:08:53,540 so let's just remember that one definition of the partial 145 00:08:53,540 --> 00:08:56,350 derivative partial z partial u is this coefficient. 146 00:08:56,350 --> 00:08:58,870 147 00:08:58,870 --> 00:09:02,740 So if I go over here, if we write the total differential 148 00:09:02,740 --> 00:09:12,650 dz, we can write that as partial z, partial u du plus 149 00:09:12,650 --> 00:09:20,280 partial z, partial v dv. Right? 150 00:09:20,280 --> 00:09:20,930 Well, look. 151 00:09:20,930 --> 00:09:24,710 What we have here on these two sides is essentially the same 152 00:09:24,710 --> 00:09:25,500 expression. 153 00:09:25,500 --> 00:09:30,540 So that means if we want to compute partial z partial u, 154 00:09:30,540 --> 00:09:34,300 then that's just equal to this coefficient here. 155 00:09:34,300 --> 00:09:41,150 So we get that partial z partial u is 4xu plus 2-- 156 00:09:41,150 --> 00:09:44,810 that should be v. One of those is an x. 157 00:09:44,810 --> 00:09:45,320 Let's see. 158 00:09:45,320 --> 00:09:47,650 So where did this come from. 159 00:09:47,650 --> 00:09:49,590 Yeah, one of those is an x, sorry-- 160 00:09:49,590 --> 00:09:50,570 SPEAKER 1: It's a y. 161 00:09:50,570 --> 00:09:53,110 DAVID JORDAN: --is a y. 162 00:09:53,110 --> 00:09:55,130 2vy, OK. 163 00:09:55,130 --> 00:09:59,470 Now just as a sanity check, why don't we go back to the 164 00:09:59,470 --> 00:10:02,350 middle of the board, and we'll see that we 165 00:10:02,350 --> 00:10:03,200 got the same thing. 166 00:10:03,200 --> 00:10:06,690 So 4xu plus 2vy, that's what we concluded for 167 00:10:06,690 --> 00:10:09,000 partial z partial u. 168 00:10:09,000 --> 00:10:11,740 And then going back to the middle of the board, that's we 169 00:10:11,740 --> 00:10:13,620 found again. 170 00:10:13,620 --> 00:10:16,700 So let's just go over the two different 171 00:10:16,700 --> 00:10:18,510 methods and compare them. 172 00:10:18,510 --> 00:10:22,190 So if I'm in a rush to do a computation-- 173 00:10:22,190 --> 00:10:23,970 maybe I'm taking an exam-- 174 00:10:23,970 --> 00:10:28,320 I definitely think it's the quickest to just compute, to 175 00:10:28,320 --> 00:10:30,990 figure out what the dependency of the variable is, and I use 176 00:10:30,990 --> 00:10:32,380 this dependency graph. 177 00:10:32,380 --> 00:10:36,870 And then I just trace all the paths from z to the 178 00:10:36,870 --> 00:10:40,260 independent variable u that I'm interested in. 179 00:10:40,260 --> 00:10:44,190 And then I multiply all the partial derivatives that 180 00:10:44,190 --> 00:10:48,570 correspond to each edge and I get an expression. 181 00:10:48,570 --> 00:10:53,440 Now if I have more time, then I really prefer to use the 182 00:10:53,440 --> 00:10:55,020 method of total differentials that we did 183 00:10:55,020 --> 00:10:57,290 on the third board. 184 00:10:57,290 --> 00:11:00,810 I like it, because once you do some simple calculus, and then 185 00:11:00,810 --> 00:11:02,765 after that it's just, it's basic algebra. 186 00:11:02,765 --> 00:11:07,900 187 00:11:07,900 --> 00:11:09,560 I find that I'm less likely to make a 188 00:11:09,560 --> 00:11:11,080 mistake doing that method. 189 00:11:11,080 --> 00:11:13,390 But as you saw, it involves computing a lot more 190 00:11:13,390 --> 00:11:14,810 derivatives that we didn't actually use 191 00:11:14,810 --> 00:11:15,800 in the final answer. 192 00:11:15,800 --> 00:11:20,620 For instance, when we computed total differentials, we got an 193 00:11:20,620 --> 00:11:23,570 expression for partial z partial v at the end of the 194 00:11:23,570 --> 00:11:25,120 day, even though we weren't asked to do that. 195 00:11:25,120 --> 00:11:29,140 So it's lengthier, but I think more conceptually 196 00:11:29,140 --> 00:11:30,360 straightforward. 197 00:11:30,360 --> 00:11:33,070 So I think I'll leave it at that. 198 00:11:33,070 --> 00:11:33,360