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