1 00:00:01,000 --> 00:00:03,000 The following content is provided under a Creative 2 00:00:03,000 --> 00:00:05,000 Commons license. Your support will help MIT 3 00:00:05,000 --> 00:00:08,000 OpenCourseWare continue to offer high quality educational 4 00:00:08,000 --> 00:00:13,000 resources for free. To make a donation or to view 5 00:00:13,000 --> 00:00:18,000 additional materials from hundreds of MIT courses, 6 00:00:18,000 --> 00:00:23,000 visit MIT OpenCourseWare at ocw.mit.edu. 7 00:00:23,000 --> 00:00:29,000 OK, so remember we left things with this statement of the 8 00:00:29,000 --> 00:00:33,000 divergence theorem. So, the divergence theorem 9 00:00:33,000 --> 00:00:36,000 gives us a way to compute the flux of a vector field for a 10 00:00:36,000 --> 00:00:41,000 closed surface. OK, it says if I have a closed 11 00:00:41,000 --> 00:00:47,000 surface, s, bounding some region, D, 12 00:00:47,000 --> 00:00:54,000 and I have a vector field defined in space, 13 00:00:54,000 --> 00:00:59,000 so that I can try to compute the flux of my vector field 14 00:00:59,000 --> 00:01:04,000 through my surface. Double integral of F.dS or 15 00:01:04,000 --> 00:01:08,000 F.ndS if you want, and to set this up, 16 00:01:08,000 --> 00:01:11,000 of course, I need to use the geometry of the surface 17 00:01:11,000 --> 00:01:13,000 depending on what the surface is. 18 00:01:13,000 --> 00:01:17,000 We've seen various formulas for how to set up the double 19 00:01:17,000 --> 00:01:20,000 integral. But, we've also seen that if 20 00:01:20,000 --> 00:01:24,000 it's a closed surface, and if a vector field is 21 00:01:24,000 --> 00:01:29,000 defined everywhere inside, then we can actually reduce 22 00:01:29,000 --> 00:01:34,000 that to a calculation of the triple integral of the 23 00:01:34,000 --> 00:01:38,000 divergence of F inside, OK? 24 00:01:38,000 --> 00:01:40,000 So, concretely, if I use 25 00:01:40,000 --> 00:01:43,000 coordinates, let's say that the coordinates 26 00:01:43,000 --> 00:01:48,000 of my vector field are, sorry, the components are P, 27 00:01:48,000 --> 00:01:52,000 Q, and R dot ndS, then that will become the 28 00:01:52,000 --> 00:02:00,000 triple integral of, well, so, divergence is P sub x 29 00:02:00,000 --> 00:02:07,000 plus Q sub y plus R sub z. OK, so by the way, 30 00:02:07,000 --> 00:02:10,000 how to remember this formula for divergence, 31 00:02:10,000 --> 00:02:14,000 and other formulas for other things as well. 32 00:02:14,000 --> 00:02:22,000 Let me just tell you quickly about the del notation. 33 00:02:22,000 --> 00:02:27,000 So, this guy usually pronounced as 34 00:02:27,000 --> 00:02:29,000 del, rather than as pointy triangle 35 00:02:29,000 --> 00:02:32,000 going downwards or something like that, 36 00:02:32,000 --> 00:02:37,000 it's a symbolic notation for an operator. 37 00:02:37,000 --> 00:02:42,000 So, you're probably going to complain about putting these 38 00:02:42,000 --> 00:02:46,000 guys into a vector. But, let's think of partial 39 00:02:46,000 --> 00:02:48,000 with respect to x, with respect to y, 40 00:02:48,000 --> 00:02:51,000 and with respect to z as the components of some formal 41 00:02:51,000 --> 00:02:53,000 vector. Of course, it's not a real 42 00:02:53,000 --> 00:02:55,000 vector. These are not like anything. 43 00:02:55,000 --> 00:03:02,000 These are just symbols. But, so see for example, 44 00:03:02,000 --> 00:03:06,000 the gradient of function, well, if you multiply this 45 00:03:06,000 --> 00:03:09,000 vector by scalar, which is a function, 46 00:03:09,000 --> 00:03:14,000 then you will get partial, partial x of f, 47 00:03:14,000 --> 00:03:20,000 partial, partial y of f, partial, partial z, f, 48 00:03:20,000 --> 00:03:25,000 well, that's the gradient. That seems to work. 49 00:03:25,000 --> 00:03:29,000 So now, the interesting thing about divergence is I can think 50 00:03:29,000 --> 00:03:33,000 of divergence as del dot a vector field. 51 00:03:33,000 --> 00:03:42,000 See, if I do the dot product between this guy and my vector 52 00:03:42,000 --> 00:03:46,000 field P, Q, R, well, it looks like I will 53 00:03:46,000 --> 00:03:51,000 indeed get partial, partial x of P plus partial Q 54 00:03:51,000 --> 00:03:56,000 partial y plus partial R partial z. 55 00:03:56,000 --> 00:04:06,000 That's the divergence. and of course, similarly, 56 00:04:06,000 --> 00:04:08,000 when we have two variables only, x and y, 57 00:04:08,000 --> 00:04:11,000 we could have thought of the same notation, 58 00:04:11,000 --> 00:04:13,000 just with a two component vector, 59 00:04:13,000 --> 00:04:16,000 partial, partial x, partial, partial y. 60 00:04:16,000 --> 00:04:20,000 So, now, this is like of slightly limited usefulness so 61 00:04:20,000 --> 00:04:22,000 far. It's going to become very handy 62 00:04:22,000 --> 00:04:25,000 pretty soon because we are going to see curl. 63 00:04:25,000 --> 00:04:28,000 And, the formula for curl in the plane was kind of 64 00:04:28,000 --> 00:04:31,000 complicated. But, if you thought about it in 65 00:04:31,000 --> 00:04:34,000 terms of this, it was actually the determinant 66 00:04:34,000 --> 00:04:36,000 of del and f. And now, in space, 67 00:04:36,000 --> 00:04:39,000 we are actually going to do del cross f. 68 00:04:39,000 --> 00:04:40,000 But, I'm getting ahead of things. 69 00:04:40,000 --> 00:04:44,000 So, let's not do anything with that. 70 00:04:44,000 --> 00:04:52,000 Curl will be for next week. Just getting you used to the 71 00:04:52,000 --> 00:04:54,000 notation, especially since you might be using it in physics 72 00:04:54,000 --> 00:04:59,000 already. So, it might be worth doing. 73 00:04:59,000 --> 00:05:03,000 OK, so the other thing I wanted to say is, what does this 74 00:05:03,000 --> 00:05:06,000 theorem say physically? How should I think of this 75 00:05:06,000 --> 00:05:09,000 statement? So, I think I said that very 76 00:05:09,000 --> 00:05:13,000 quickly at the end of last time, but not very carefully. 77 00:05:13,000 --> 00:05:22,000 So, what's the physical interpretation of a divergence 78 00:05:22,000 --> 00:05:26,000 field? So, 79 00:05:26,000 --> 00:05:30,000 I want to claim that the divergence of a vector field 80 00:05:30,000 --> 00:05:35,000 corresponds to what I'm going to call the source rate, 81 00:05:35,000 --> 00:05:52,000 which is somehow the amount of flux generated per unit volume. 82 00:05:52,000 --> 00:05:56,000 So, to understand what that means, let's think of what's 83 00:05:56,000 --> 00:06:00,000 called an incompressible fluid. OK, so an incompressible fluid 84 00:06:00,000 --> 00:06:02,000 is something like water, for example, 85 00:06:02,000 --> 00:06:06,000 where a fixed mass of it always occupies the same amount of 86 00:06:06,000 --> 00:06:09,000 volume. So, guesses are compressible. 87 00:06:09,000 --> 00:06:13,000 Liquids are incompressible, basically. 88 00:06:13,000 --> 00:06:24,000 So, if you have an incompressible fluid flow -- -- 89 00:06:24,000 --> 00:06:34,000 well, so, again, what that means is really, 90 00:06:34,000 --> 00:06:44,000 given mass occupies always a fixed volume. 91 00:06:44,000 --> 00:06:51,000 Then, well, let's say that we have such a fluid with velocity 92 00:06:51,000 --> 00:06:57,000 given by our vector field. OK, so we're thinking of F as 93 00:06:57,000 --> 00:07:03,000 the velocity and maybe something containing water, 94 00:07:03,000 --> 00:07:08,000 a pipe, or something. So, what does the divergence 95 00:07:08,000 --> 00:07:14,000 theorem say? It says that if I take a region 96 00:07:14,000 --> 00:07:18,000 in space, let's call it D, 97 00:07:18,000 --> 00:07:23,000 sorry, D is the inside, and S is the surface around it, 98 00:07:23,000 --> 00:07:27,000 well, so if I sum the divergence in D, 99 00:07:27,000 --> 00:07:35,000 well, I'm going to get the flux going out through this surface, 100 00:07:35,000 --> 00:07:37,000 S. I should have mentioned it 101 00:07:37,000 --> 00:07:39,000 earlier. The convention in the 102 00:07:39,000 --> 00:07:43,000 divergence theorem is that we orient the surface with a normal 103 00:07:43,000 --> 00:07:47,000 vector pointing always outwards. OK, so now, we know what flux 104 00:07:47,000 --> 00:07:49,000 means. Remember, we've been 105 00:07:49,000 --> 00:07:53,000 describing, flux means how much fluid is passing through this 106 00:07:53,000 --> 00:08:00,000 surface. So, that's the amount of fluid 107 00:08:00,000 --> 00:08:11,000 that's leaving the region, D, per unit time. 108 00:08:11,000 --> 00:08:13,000 And, of course, when I'm saying that, 109 00:08:13,000 --> 00:08:16,000 it means I'm counting everything that's going out of D 110 00:08:16,000 --> 00:08:18,000 minus everything that's coming into D. 111 00:08:18,000 --> 00:08:22,000 That's what the flux measures. So, now, if there is stuff 112 00:08:22,000 --> 00:08:26,000 coming into D or going out of D, well, it must come from 113 00:08:26,000 --> 00:08:28,000 somewhere. So, one possibility would be 114 00:08:28,000 --> 00:08:32,000 that your fluid is actually being compressed or expanded. 115 00:08:32,000 --> 00:08:34,000 But, I've said, no, I'm looking at something 116 00:08:34,000 --> 00:08:37,000 like water that you cannot squish into smaller volume. 117 00:08:37,000 --> 00:08:40,000 So, in that case, the only explanation is that 118 00:08:40,000 --> 00:08:44,000 there is something it here that actually is sucking up water or 119 00:08:44,000 --> 00:08:47,000 producing more water. And so, integrating the 120 00:08:47,000 --> 00:08:52,000 divergence gives you the total amount of sources minus the 121 00:08:52,000 --> 00:08:56,000 amount of syncs that are inside this region. 122 00:08:56,000 --> 00:09:01,000 So, the divergence itself measures basically the amount of 123 00:09:01,000 --> 00:09:06,000 sources or syncs per unit volume in a given place. 124 00:09:06,000 --> 00:09:07,000 And now, if you think about it that way, 125 00:09:07,000 --> 00:09:12,000 well, it's basically the divergence 126 00:09:12,000 --> 00:09:17,000 theorem is just stating something completely obvious 127 00:09:17,000 --> 00:09:23,000 about all the matter that is leaving this region must come 128 00:09:23,000 --> 00:09:28,000 from somewhere. So, that's basically how we 129 00:09:28,000 --> 00:09:30,000 think about it. Now, of course, 130 00:09:30,000 --> 00:09:33,000 if you're doing 8.02, then you might actually have 131 00:09:33,000 --> 00:09:35,000 seen the divergence theorem already being used for things 132 00:09:35,000 --> 00:09:39,000 that are more like force fields, say, electric fields and so on. 133 00:09:39,000 --> 00:09:42,000 Well, I'll try to say a few things about that during the 134 00:09:42,000 --> 00:09:45,000 last week of classes. But, then this kind of 135 00:09:45,000 --> 00:09:48,000 interpretation doesn't quite work. 136 00:09:48,000 --> 00:09:51,000 OK, any questions, generally speaking, 137 00:09:51,000 --> 00:09:56,000 before we move on to the proof and other applications? 138 00:09:56,000 --> 00:10:05,000 Yes? Oh, not the gradient. 139 00:10:05,000 --> 00:10:09,000 So, yeah, the divergence of F measures the amount of sources 140 00:10:09,000 --> 00:10:11,000 or syncs in there. Well, what makes it happen? 141 00:10:11,000 --> 00:10:13,000 If you want, in a way, it's this theorem. 142 00:10:13,000 --> 00:10:16,000 Or, in another way, if you think about it, 143 00:10:16,000 --> 00:10:20,000 try to look at your favorite vector fields and compute their 144 00:10:20,000 --> 00:10:23,000 divergence. And, if you take a vector field 145 00:10:23,000 --> 00:10:25,000 where maybe everything is rotating, 146 00:10:25,000 --> 00:10:29,000 a flow that's just rotating about some axis, 147 00:10:29,000 --> 00:10:31,000 then you'll find that its divergence is zero. 148 00:10:31,000 --> 00:10:37,000 If you, sorry? No, divergence is not equal to 149 00:10:37,000 --> 00:10:39,000 the gradient. Sorry, there's a dot here that 150 00:10:39,000 --> 00:10:42,000 maybe is not very big, but it's very important. 151 00:10:42,000 --> 00:10:44,000 OK, so you take the divergence of a vector field. 152 00:10:44,000 --> 00:10:46,000 Well, you take the gradient of a function. 153 00:10:46,000 --> 00:10:49,000 So, if the gradient of a function is a vector, 154 00:10:49,000 --> 00:10:52,000 the divergence of a vector field is a function. 155 00:10:52,000 --> 00:10:56,000 So, somehow these guys go back and forth between. 156 00:10:56,000 --> 00:10:59,000 So, I should have said, with new notations comes new 157 00:10:59,000 --> 00:11:04,000 responsibility. I mean, 158 00:11:04,000 --> 00:11:07,000 now that we have this nice, nifty notation that will let us 159 00:11:07,000 --> 00:11:10,000 do gradient divergence and later curl in a unified way, 160 00:11:10,000 --> 00:11:12,000 if you choose this notation you have to be really, 161 00:11:12,000 --> 00:11:17,000 really careful what you put after it because otherwise it's 162 00:11:17,000 --> 00:11:21,000 easy to get completely confused. OK, so divergence and gradients 163 00:11:21,000 --> 00:11:24,000 are completely different things. The only thing they have in 164 00:11:24,000 --> 00:11:26,000 common is that both are what's called a first order 165 00:11:26,000 --> 00:11:29,000 differential operator. That means it involves the 166 00:11:29,000 --> 00:11:33,000 first partial derivatives of whatever you put into it. 167 00:11:33,000 --> 00:11:35,000 But, one of them goes from functions to vectors. 168 00:11:35,000 --> 00:11:38,000 That's gradient. The other one goes from vectors 169 00:11:38,000 --> 00:11:41,000 to functions. That's divergence. 170 00:11:41,000 --> 00:11:43,000 And, curl later will go from vectors to vectors. 171 00:11:43,000 --> 00:11:57,000 But, that will be later. Let's see, more questions? 172 00:11:57,000 --> 00:12:03,000 No? OK, so let's see, 173 00:12:03,000 --> 00:12:12,000 so how are we going to actually prove this theorem? 174 00:12:12,000 --> 00:12:15,000 Well, if you remember how we prove Green's theorem a while 175 00:12:15,000 --> 00:12:18,000 ago, the answer is we're going to do it exactly the same way. 176 00:12:18,000 --> 00:12:22,000 So, if you don't remember, then I'm going to explain. 177 00:12:22,000 --> 00:12:24,000 OK, so the first thing we need to do is actually a 178 00:12:24,000 --> 00:12:28,000 simplification. So, instead of proving the 179 00:12:28,000 --> 00:12:33,000 divergence theorem, namely, the equality up there, 180 00:12:33,000 --> 00:12:38,000 I'm going to actually prove something easier. 181 00:12:38,000 --> 00:12:44,000 I'm going to prove that the flux of a vector field that has 182 00:12:44,000 --> 00:12:52,000 only a z component is actually equal to the triple integral of, 183 00:12:52,000 --> 00:12:58,000 well, the divergence of this is just R sub z dV. 184 00:12:58,000 --> 00:13:00,000 OK, now, how do I go back to the general case? 185 00:13:00,000 --> 00:13:03,000 Well, I will just prove the same thing for a vector field 186 00:13:03,000 --> 00:13:07,000 that has only an x component or only a y component. 187 00:13:07,000 --> 00:13:10,000 And then, I will add these things together. 188 00:13:10,000 --> 00:13:12,000 So, if you think carefully about what happens when you 189 00:13:12,000 --> 00:13:15,000 evaluate this, you will have some formula for 190 00:13:15,000 --> 00:13:16,000 ndS, and when you do the dot 191 00:13:16,000 --> 00:13:18,000 product, you'll end up with the sum, 192 00:13:18,000 --> 00:13:21,000 P times something plus Q times something plus R times 193 00:13:21,000 --> 00:13:22,000 something. And basically, 194 00:13:22,000 --> 00:13:26,000 we are just dealing with the last term, R times something, 195 00:13:26,000 --> 00:13:28,000 and showing that it's equal to what it should be. 196 00:13:28,000 --> 00:13:30,000 And then, we the three such terms together. 197 00:13:30,000 --> 00:13:44,000 We'll get the general case. OK, so then we get the general 198 00:13:44,000 --> 00:14:01,000 case by summing one such identity for each component. 199 00:14:01,000 --> 00:14:08,000 I should say three such identities, one for each 200 00:14:08,000 --> 00:14:13,000 component, whatever. Now, let's make a second 201 00:14:13,000 --> 00:14:17,000 simplification because I'm still not feeling confident I can 202 00:14:17,000 --> 00:14:19,000 prove this right away for any surface. 203 00:14:19,000 --> 00:14:23,000 I'm going to do it first or what's called a vertically 204 00:14:23,000 --> 00:14:26,000 simple region. OK, so vertically simple means 205 00:14:26,000 --> 00:14:30,000 it will be something which I can setup an integral over the z 206 00:14:30,000 --> 00:14:36,000 variable first easily. So, it's something that has a 207 00:14:36,000 --> 00:14:44,000 bottom face, and a top face, and then some vertical sides. 208 00:14:44,000 --> 00:14:53,000 OK, so let's say first what happens if the given region, 209 00:14:53,000 --> 00:15:02,000 D, is vertically simple. So, vertically simple means it 210 00:15:02,000 --> 00:15:09,000 looks like this. It has top. 211 00:15:09,000 --> 00:15:16,000 It has a bottom. And, it has some vertical sides. 212 00:15:16,000 --> 00:15:20,000 So, if you want, if I look at it from above, 213 00:15:20,000 --> 00:15:25,000 it projects to some region in the xy plane. 214 00:15:25,000 --> 00:15:30,000 Let's call that R. And, it lives between the top 215 00:15:30,000 --> 00:15:34,000 face and the bottom face. Let's say the top face is z 216 00:15:34,000 --> 00:15:37,000 equals z2 of (x, y). 217 00:15:37,000 --> 00:15:42,000 Let's say the bottom face is z equals z1(x, y). 218 00:15:42,000 --> 00:15:44,000 OK, and I don't need to know actual formulas. 219 00:15:44,000 --> 00:15:47,000 I'm just going to work with these and prove things 220 00:15:47,000 --> 00:15:50,000 independently of what the formulas will be for these 221 00:15:50,000 --> 00:15:52,000 functions. OK, so anyway, 222 00:15:52,000 --> 00:15:56,000 a vertically simple region is something that lives above a 223 00:15:56,000 --> 00:15:59,000 part of the xy plane, and is between two graphs of 224 00:15:59,000 --> 00:16:03,000 two functions. So, let's see what we can do in 225 00:16:03,000 --> 00:16:10,000 that case. So, the right-hand side of this 226 00:16:10,000 --> 00:16:20,000 equality, so that's the triple integral, let's start computing 227 00:16:20,000 --> 00:16:23,000 it. OK, so of course we will not be 228 00:16:23,000 --> 00:16:26,000 able to get a number out of it because we don't know, 229 00:16:26,000 --> 00:16:28,000 actually, formulas for anything. 230 00:16:28,000 --> 00:16:32,000 But at least we can start simplifying because the way this 231 00:16:32,000 --> 00:16:36,000 region looks like, I should say this is D, 232 00:16:36,000 --> 00:16:40,000 tells me that I can start setting up the triple integral 233 00:16:40,000 --> 00:16:45,000 at least in the order where I integrate first over z. 234 00:16:45,000 --> 00:16:53,000 OK, so I can actually do it as a triple integral with Rz dz 235 00:16:53,000 --> 00:16:57,000 dxdy or dydx, doesn't matter. 236 00:16:57,000 --> 00:17:01,000 So, what are the bounds on z? See, this is actually good 237 00:17:01,000 --> 00:17:04,000 practice to remember how we set up triple integrals. 238 00:17:04,000 --> 00:17:06,000 So, remember, when we did it first over z, 239 00:17:06,000 --> 00:17:09,000 we start by fixing a point, x and y, 240 00:17:09,000 --> 00:17:12,000 and for that value of x and y, we look at a small vertical 241 00:17:12,000 --> 00:17:16,000 slice and see from where to where we have to go. 242 00:17:16,000 --> 00:17:21,000 Well, we start at z equals whatever the value is at the 243 00:17:21,000 --> 00:17:28,000 bottom, so, z1 of x and y. And, we go up to the top face, 244 00:17:28,000 --> 00:17:32,000 z2 of x and y. Now, for x and y, 245 00:17:32,000 --> 00:17:37,000 I'm not going to actually set up bounds because I've already 246 00:17:37,000 --> 00:17:41,000 called R the quantity that I'm integrating. 247 00:17:41,000 --> 00:17:45,000 So let me change this to, let's say, U or something like 248 00:17:45,000 --> 00:17:47,000 that. If you already have an R, 249 00:17:47,000 --> 00:17:49,000 I mean, there's not much risk for confusion, 250 00:17:49,000 --> 00:17:53,000 but still. OK, so we're going to call U 251 00:17:53,000 --> 00:17:59,000 the shadow of my region instead. So, now I want to integrate 252 00:17:59,000 --> 00:18:01,000 over all values of x and y that are in the shadow of my region. 253 00:18:01,000 --> 00:18:04,000 That means it's a double integral over this region, 254 00:18:04,000 --> 00:18:06,000 U, which I haven't described to you. 255 00:18:06,000 --> 00:18:09,000 So, I can't actually set up bounds for x and y. 256 00:18:09,000 --> 00:18:12,000 But, I'm going to just leave it like this. 257 00:18:12,000 --> 00:18:16,000 OK, now you see, 258 00:18:16,000 --> 00:18:19,000 if you look at how you would start evaluating this, 259 00:18:19,000 --> 00:18:22,000 well, the inner integral certainly is not scary because 260 00:18:22,000 --> 00:18:25,000 you're integrating the derivative of R with respect to 261 00:18:25,000 --> 00:18:27,000 z, integrating that with respect 262 00:18:27,000 --> 00:18:33,000 to z. So, you should get R back. 263 00:18:33,000 --> 00:18:39,000 OK, so triple integral over D of Rz dV becomes, 264 00:18:39,000 --> 00:18:42,000 well, we'll have a double integral over U of, 265 00:18:42,000 --> 00:18:49,000 so, the inner integral becomes R at the point on the top. 266 00:18:49,000 --> 00:18:53,000 So, that means, remember, R is a function of x, 267 00:18:53,000 --> 00:18:56,000 y, and z. And, in fact, 268 00:18:56,000 --> 00:19:03,000 I will plug into it the value of z at the top, 269 00:19:03,000 --> 00:19:13,000 so, z of xy minus the value of R at the point on the bottom, 270 00:19:13,000 --> 00:19:16,000 x, y, z1 of x, y. 271 00:19:16,000 --> 00:19:26,000 OK, any questions about this? No? 272 00:19:26,000 --> 00:19:29,000 Is it looking vaguely believable? 273 00:19:29,000 --> 00:19:32,000 Yeah? OK. So, now, let's compute the 274 00:19:32,000 --> 00:19:34,000 other side because here we are stuck. 275 00:19:34,000 --> 00:19:36,000 We won't be able to do anything else. 276 00:19:36,000 --> 00:19:39,000 So, let's look at the flux integral. 277 00:19:39,000 --> 00:19:43,000 OK, we have to look at the flux of this vector field through the 278 00:19:43,000 --> 00:19:46,000 entire surface, S, which is the whole boundary 279 00:19:46,000 --> 00:19:51,000 of D. So, that consists of a lot of 280 00:19:51,000 --> 00:19:56,000 pieces, namely the top, bottom, and the sides. 281 00:19:56,000 --> 00:20:04,000 OK, so the other side -- So, let me just remind you, 282 00:20:04,000 --> 00:20:12,000 S is bottom plus top plus side of this vector field, 283 00:20:12,000 --> 00:20:19,000 dot ndS equals, OK, so what do we have? 284 00:20:19,000 --> 00:20:21,000 So first, we have to look at the bottom. 285 00:20:21,000 --> 00:20:23,000 No, let's start with the top actually. 286 00:20:23,000 --> 00:20:35,000 Sorry. OK, so let's start with the top. 287 00:20:35,000 --> 00:20:43,000 So, just remind you, let's do all of them. 288 00:20:43,000 --> 00:20:50,000 So, let's look at the top first. So, we need to set up the flux 289 00:20:50,000 --> 00:20:52,000 integral for a vector field dot ndS. 290 00:20:52,000 --> 00:20:56,000 We need to know what ndS is. Well, fortunately for us, 291 00:20:56,000 --> 00:20:59,000 we know that the top face is going to be the graph of some 292 00:20:59,000 --> 00:21:03,000 function of x and y. So, we've seen a formula for 293 00:21:03,000 --> 00:21:06,000 ndS in this kind of situation, OK? 294 00:21:06,000 --> 00:21:11,000 We have seen that ndS, sorry, so, just to remind you 295 00:21:11,000 --> 00:21:16,000 this is the graph of a function z equals z2 of x, 296 00:21:16,000 --> 00:21:21,000 y. So, we've seen ndS for that is 297 00:21:21,000 --> 00:21:30,000 negative partial derivative of this function with respect to x, 298 00:21:30,000 --> 00:21:35,000 negative partial z2 with respect to y, 299 00:21:35,000 --> 00:21:38,000 one, dxdy. OK, and, well, 300 00:21:38,000 --> 00:21:44,000 we can't compute these guys, but it's not a big deal because 301 00:21:44,000 --> 00:21:47,000 if we do the dot product with 302 00:21:48,000 --> 00:21:51,000 dot ndS, that will give us, 303 00:21:51,000 --> 00:21:53,000 well, if you dot this with zero, zero, R, 304 00:21:53,000 --> 00:22:03,000 these terms go away. You just have R dxdy. 305 00:22:03,000 --> 00:22:11,000 So, that means that the double integral for flux through the 306 00:22:11,000 --> 00:22:19,000 top of R vector field dot ndS becomes double integral of the 307 00:22:19,000 --> 00:22:23,000 top of R dxdy. Now, how do we evaluate that, 308 00:22:23,000 --> 00:22:28,000 actually? Well, so R is a function of x, 309 00:22:28,000 --> 00:22:29,000 y, z. But we said, 310 00:22:29,000 --> 00:22:32,000 we have only two variables that we're going to use. 311 00:22:32,000 --> 00:22:35,000 We're going to use x and y. We're going to get rid of z. 312 00:22:35,000 --> 00:22:38,000 How do we get rid of z? Well, if we are on the top 313 00:22:38,000 --> 00:22:41,000 surface, z is given by this formula, z2 of x, 314 00:22:41,000 --> 00:22:45,000 y. So, I plug z equals z2 of x, 315 00:22:45,000 --> 00:22:50,000 y into the formula for R, whatever it may be. 316 00:22:50,000 --> 00:22:54,000 Then, I integrate dxdy. And, what's the range for x and 317 00:22:54,000 --> 00:22:57,000 y? Well, my surface sits exactly 318 00:22:57,000 --> 00:23:01,000 above this region U in the xy plane. 319 00:23:01,000 --> 00:23:08,000 So, it's double integral over U, OK? 320 00:23:08,000 --> 00:23:17,000 Any questions about how I set up this flux integral? 321 00:23:17,000 --> 00:23:21,000 No? OK, let me close the door, 322 00:23:21,000 --> 00:23:26,000 actually. OK, so we've got one of the two 323 00:23:26,000 --> 00:23:31,000 terms that we had over there. Let's try to get the others. 324 00:23:44,000 --> 00:23:49,000 [LAUGHTER] No comment. OK, so, we need to look, 325 00:23:49,000 --> 00:23:56,000 also, at the other parts of our surface for the flux integral. 326 00:23:56,000 --> 00:24:00,000 So, the bottom, well, it will work pretty much 327 00:24:00,000 --> 00:24:03,000 the same way, right, because it's the graph 328 00:24:03,000 --> 00:24:06,000 of a function, z equals z1 of x, 329 00:24:06,000 --> 00:24:10,000 y. So, we should be able to get 330 00:24:10,000 --> 00:24:17,000 ndS using the same method, negative partial with respect 331 00:24:17,000 --> 00:24:23,000 to x, negative partial with respect to y, 332 00:24:23,000 --> 00:24:26,000 one dxdy. Now, there's a small catch. 333 00:24:26,000 --> 00:24:30,000 OK, we have to think of it carefully about orientations. 334 00:24:30,000 --> 00:24:34,000 So, remember, when we set up the 335 00:24:34,000 --> 00:24:38,000 divergence theorem, we need the normal vectors to 336 00:24:38,000 --> 00:24:42,000 point out of our region, which means that on the top 337 00:24:42,000 --> 00:24:46,000 surface, we want n pointing up. 338 00:24:46,000 --> 00:24:50,000 But, on the bottom face, we want n pointing down. 339 00:24:50,000 --> 00:24:52,000 So, in fact, we shouldn't use this formula 340 00:24:52,000 --> 00:24:55,000 here because that one corresponds to the other 341 00:24:55,000 --> 00:24:58,000 orientation. Well, we could use it and then 342 00:24:58,000 --> 00:25:02,000 subtract, but I was just going to say that ndS is actually the 343 00:25:02,000 --> 00:25:06,000 opposite of this. So, I'm going to switch all my 344 00:25:06,000 --> 00:25:09,000 signs. OK, that's the other side of 345 00:25:09,000 --> 00:25:13,000 the formula when you orient your graph with n pointing downwards. 346 00:25:13,000 --> 00:25:18,000 Now, if I do things the same way as before, 347 00:25:18,000 --> 00:25:24,000 I will get that <0,0, R> dot ndS will be negative 348 00:25:24,000 --> 00:25:27,000 R dxdy. And so, 349 00:25:27,000 --> 00:25:34,000 when I do the double integral over the bottom, 350 00:25:34,000 --> 00:25:39,000 I'm going to get the double integral over the bottom of 351 00:25:39,000 --> 00:25:42,000 negative R dxdy, which, if I try to evaluate 352 00:25:42,000 --> 00:25:46,000 that, well, I actually will have to 353 00:25:46,000 --> 00:25:48,000 integrate. Sorry, first I'll have to 354 00:25:48,000 --> 00:25:53,000 substitute the value of z. The value of z that I will want 355 00:25:53,000 --> 00:25:57,000 to plug into R will be given by, now, z1 of x, 356 00:25:57,000 --> 00:26:00,000 y. And, the bounds of integration 357 00:26:00,000 --> 00:26:04,000 will be given, again, by the shadow of our 358 00:26:04,000 --> 00:26:07,000 surface, which is, again, this guy, 359 00:26:07,000 --> 00:26:09,000 U. OK, so we seem to be all set, 360 00:26:09,000 --> 00:26:12,000 except we are still missing one part of our surface, 361 00:26:12,000 --> 00:26:14,000 S, because we also need to look at the sides. 362 00:26:14,000 --> 00:26:20,000 Well, what about the sides? Well, our vector field, 363 00:26:20,000 --> 00:26:23,000 , is actually vertical. 364 00:26:23,000 --> 00:26:29,000 It's parallel to the z axis. OK, so my vector field does 365 00:26:29,000 --> 00:26:35,000 something like this everywhere. And, why that makes it very 366 00:26:35,000 --> 00:26:38,000 interesting on the top and bottom, that means that on the 367 00:26:38,000 --> 00:26:40,000 sides, really not much is going on. 368 00:26:40,000 --> 00:26:45,000 No matter is passing through the vertical sides. 369 00:26:45,000 --> 00:26:57,000 So, the side -- The sides are vertical. 370 00:26:57,000 --> 00:27:05,000 So, <0,0, R> is tangent to the side, 371 00:27:05,000 --> 00:27:14,000 and therefore, the flux through the sides is 372 00:27:14,000 --> 00:27:23,000 just going to be zero. OK, no calculation needed. 373 00:27:23,000 --> 00:27:26,000 That's because, of course, that's the reason why a 374 00:27:26,000 --> 00:27:31,000 simplified first things so that my vector field would only have 375 00:27:31,000 --> 00:27:35,000 a z component, well, not just that but that's 376 00:27:35,000 --> 00:27:39,000 the main place where it becomes very useful. 377 00:27:39,000 --> 00:27:42,000 So, now, if I compare my double integral and, 378 00:27:42,000 --> 00:27:45,000 sorry, my triple integral and my flux integral, 379 00:27:45,000 --> 00:27:47,000 I get that they are, indeed, the same. 380 00:28:03,000 --> 00:28:05,000 Well, that's the statement of the theorem we are trying to 381 00:28:05,000 --> 00:28:17,000 prove. I shouldn't erase it, OK? 382 00:28:17,000 --> 00:28:22,000 [LAUGHTER] So, just to recap, 383 00:28:22,000 --> 00:28:32,000 we've got a formula for the triple integral of R sub z dV. 384 00:28:32,000 --> 00:28:36,000 It's up there at the very top. And, we got formulas for the 385 00:28:36,000 --> 00:28:39,000 flux through the top and the bottom, and the sides. 386 00:28:39,000 --> 00:28:41,000 And, when you add them together, 387 00:28:41,000 --> 00:28:47,000 you get indeed the same formula, 388 00:28:47,000 --> 00:29:03,000 top plus bottom -- -- plus sides of, 389 00:29:03,000 --> 00:29:08,000 OK, and so we have, actually, completed the proof for this 390 00:29:08,000 --> 00:29:11,000 part. Now, well, that's only for a 391 00:29:11,000 --> 00:29:14,000 vertically simple region, OK? 392 00:29:14,000 --> 00:29:24,000 So, if D is not vertically simple, what do we do? 393 00:29:24,000 --> 00:29:39,000 Well, we cut it into vertically simple pieces. 394 00:29:39,000 --> 00:29:44,000 OK so, concretely, I wanted to integrate over a 395 00:29:44,000 --> 00:29:48,000 solid doughnut. Then, that's not vertically 396 00:29:48,000 --> 00:29:52,000 simple because here in the middle, I have not only does top 397 00:29:52,000 --> 00:29:56,000 in this bottom, but I have this middle face. 398 00:29:56,000 --> 00:29:59,000 So, the way I would cut my doughnut would be probably I 399 00:29:59,000 --> 00:30:03,000 would slice it not in the way that you'd usually slice the 400 00:30:03,000 --> 00:30:06,000 doughnut or a bagel, but at it's probably more 401 00:30:06,000 --> 00:30:09,000 spectacular if you think that it's a bagel. 402 00:30:09,000 --> 00:30:15,000 Then, a mathematician's way of slicing it is like this into 403 00:30:15,000 --> 00:30:17,000 five pieces, OK? And, that's not very convenient 404 00:30:17,000 --> 00:30:20,000 for eating, but that's convenient for 405 00:30:20,000 --> 00:30:24,000 integrating over it because now each of these pieces has a 406 00:30:24,000 --> 00:30:26,000 well-defined top and bottom face, 407 00:30:26,000 --> 00:30:32,000 and of course you've introduced some vertical sides for two 408 00:30:32,000 --> 00:30:35,000 reasons. One is that we've said the flux 409 00:30:35,000 --> 00:30:40,000 through them is zero anyway. So, who cares? 410 00:30:40,000 --> 00:30:43,000 Why bother? But, also, if you sum the flux 411 00:30:43,000 --> 00:30:47,000 through the surface of each little piece, 412 00:30:47,000 --> 00:30:50,000 well, you will see that you will be integrating twice over 413 00:30:50,000 --> 00:30:52,000 each of these vertical cuts. Once, when you do this piece, 414 00:30:52,000 --> 00:30:56,000 you will be taking the flux through this red guy with normal 415 00:30:56,000 --> 00:31:00,000 vector pointing to the right, and once, when you take this 416 00:31:00,000 --> 00:31:03,000 middle little piece, you will be taking the flux 417 00:31:03,000 --> 00:31:07,000 through that cut surface again, but now with normal vector 418 00:31:07,000 --> 00:31:09,000 pointing the other way around. So, in fact, 419 00:31:09,000 --> 00:31:12,000 you'll be summing the flux through these guys twice with 420 00:31:12,000 --> 00:31:15,000 opposite orientations. They cancel out. 421 00:31:15,000 --> 00:31:18,000 Well, and again, because of what you are doing 422 00:31:18,000 --> 00:31:20,000 actually, the integral was just zero anyway. 423 00:31:20,000 --> 00:31:25,000 So, it didn't matter. But, even if it hadn't 424 00:31:25,000 --> 00:31:30,000 simplified, that would do it for us. 425 00:31:30,000 --> 00:31:32,000 OK, so that's how we do it with the general region. 426 00:31:32,000 --> 00:31:34,000 And then, as I said at the beginning, 427 00:31:34,000 --> 00:31:37,000 when we can do it for a vector field that has only a z 428 00:31:37,000 --> 00:31:39,000 component, well, we can also do it for a 429 00:31:39,000 --> 00:31:42,000 vector field that has only an x or only a y component. 430 00:31:42,000 --> 00:31:45,000 And then, we sum together and we get the general case. 431 00:31:45,000 --> 00:31:52,000 So, that's the end of the proof. OK, so you see, 432 00:31:52,000 --> 00:31:55,000 the idea is really the same as for Green's theorem. 433 00:31:55,000 --> 00:32:00,000 Yes? Oh, there's only four pieces, 434 00:32:00,000 --> 00:32:05,000 thank you. Yes, there's three kinds of 435 00:32:05,000 --> 00:32:13,000 mathematicians: those who know how to count, 436 00:32:13,000 --> 00:32:30,000 and those who don't. Well, OK. 437 00:32:30,000 --> 00:32:34,000 So, OK, now I hope that you can see already the interest of this 438 00:32:34,000 --> 00:32:38,000 theorem for the divergence theorem for computing flux 439 00:32:38,000 --> 00:32:42,000 integrals just for the sake of computing flux integrals like 440 00:32:42,000 --> 00:32:46,000 might happen on the problem set or on the next test. 441 00:32:46,000 --> 00:32:49,000 But let me tell you also why it's important physically to 442 00:32:49,000 --> 00:32:54,000 understand equations that had been observed empirically well 443 00:32:54,000 --> 00:32:57,000 before they were actually understood in terms of how 444 00:32:57,000 --> 00:33:03,000 things go. So, let's look at something 445 00:33:03,000 --> 00:33:10,000 called the diffusion equation. So, let me explain to you what 446 00:33:10,000 --> 00:33:13,000 it does. So, the diffusion equation is 447 00:33:13,000 --> 00:33:16,000 something that governs, well, what's called diffusion. 448 00:33:16,000 --> 00:33:19,000 Diffusion is when you have a fluid in which you are 449 00:33:19,000 --> 00:33:24,000 introducing some substance, and you want to figure out how 450 00:33:24,000 --> 00:33:27,000 that thing is going to spread out, 451 00:33:27,000 --> 00:33:30,000 the technical term is diffuse, into the ambient fluid. 452 00:33:30,000 --> 00:33:36,000 So, for example, that governs the motion of, 453 00:33:36,000 --> 00:33:43,000 say, smoke in the air, or if you put dye in the 454 00:33:43,000 --> 00:33:49,000 solution or things like that. That will tell you, 455 00:33:49,000 --> 00:33:53,000 say that you drop some ink into a glass of water. 456 00:33:53,000 --> 00:33:57,000 Well, you can imagine that obviously it will get diluted 457 00:33:57,000 --> 00:33:59,000 into there. And, that equation will tell 458 00:33:59,000 --> 00:34:04,000 you how exactly over time this thing is going to spread out and 459 00:34:04,000 --> 00:34:09,000 start filling the entire glass. So, what's the equation? 460 00:34:09,000 --> 00:34:12,000 Well, we need, first, to know what the unknown 461 00:34:12,000 --> 00:34:13,000 will be. So, it's a partial differential 462 00:34:13,000 --> 00:34:16,000 equation, OK? So the unknown is a function, 463 00:34:16,000 --> 00:34:20,000 and the equation will relate the partial derivatives of that 464 00:34:20,000 --> 00:34:26,000 function to each other. So, u, the unknown, 465 00:34:26,000 --> 00:34:36,000 will be the concentration at a given point. 466 00:34:36,000 --> 00:34:38,000 And, of course, that depends on the point where 467 00:34:38,000 --> 00:34:40,000 you are. So, that depends on x, 468 00:34:40,000 --> 00:34:42,000 y, z, the location where you are. 469 00:34:42,000 --> 00:34:45,000 But, since the goal is also to understand how things spread 470 00:34:45,000 --> 00:34:47,000 over time, it should also depend on time. 471 00:34:47,000 --> 00:34:51,000 Otherwise, we're not going to get very far. 472 00:34:51,000 --> 00:34:53,000 And, in fact, what the equation will give us 473 00:34:53,000 --> 00:34:55,000 is the derivative of u with respect to t. 474 00:34:55,000 --> 00:34:59,000 It will tell us how the concentration at a given point 475 00:34:59,000 --> 00:35:03,000 varies over time in terms of how the concentration varied in 476 00:35:03,000 --> 00:35:06,000 space. So, it will relate partial u 477 00:35:06,000 --> 00:35:10,000 partial t to partial derivatives with respect to x, 478 00:35:10,000 --> 00:35:11,000 y, and z. 479 00:35:42,000 --> 00:35:43,000 [APPLAUSE] OK, [LAUGHTER] 480 00:35:43,000 --> 00:35:48,000 so what's the equation? The equation is partial u 481 00:35:48,000 --> 00:35:55,000 partial t equals some constant. Let me call it constant k times 482 00:35:55,000 --> 00:36:01,000 something I will call del squared u, which is also called 483 00:36:01,000 --> 00:36:05,000 the Laplacian of u, and what is that? 484 00:36:05,000 --> 00:36:09,000 Well, that means, 485 00:36:09,000 --> 00:36:14,000 OK, so just to scare you, del squared is this, 486 00:36:14,000 --> 00:36:20,000 which means it's the divergence of gradient u that we've used 487 00:36:20,000 --> 00:36:25,000 this notation for gradient. OK, so if you actually expand 488 00:36:25,000 --> 00:36:29,000 it in terms of variables, that becomes partial u over 489 00:36:29,000 --> 00:36:35,000 partial x squared plus partial squared u over partial y squared 490 00:36:35,000 --> 00:36:40,000 plus partial squared u over partial z squared. 491 00:36:40,000 --> 00:36:48,000 OK, so the equation is this equals that. 492 00:36:48,000 --> 00:36:51,000 OK, so that's a weird looking equation. 493 00:36:51,000 --> 00:36:54,000 And, I'm going to have to explain to you, 494 00:36:54,000 --> 00:36:57,000 where does it come from? OK, but before I do that, 495 00:36:57,000 --> 00:37:02,000 well, let me point out actually that the equation is not just 496 00:37:02,000 --> 00:37:10,000 the diffusion equation. It's also known as the heat 497 00:37:10,000 --> 00:37:15,000 equation. And, that's because exactly the 498 00:37:15,000 --> 00:37:21,000 same equation governs how temperature changes over time 499 00:37:21,000 --> 00:37:25,000 when you have, again, so, sorry I should have 500 00:37:25,000 --> 00:37:28,000 been actually more careful. I should have said this is in 501 00:37:28,000 --> 00:37:31,000 air that's not moving, OK? 502 00:37:31,000 --> 00:37:32,000 OK, and same thing with the solution. 503 00:37:32,000 --> 00:37:35,000 If you drop some ink into your glass of water, 504 00:37:35,000 --> 00:37:38,000 well, if you start stirring, obviously it will mix much 505 00:37:38,000 --> 00:37:40,000 faster than if you don't do anything. 506 00:37:40,000 --> 00:37:43,000 OK, so that's the case where we don't actually, 507 00:37:43,000 --> 00:37:47,000 the fluid is not moving. And, the heat equation now does 508 00:37:47,000 --> 00:37:51,000 the same, but for temperature in a fluid that's at rest, 509 00:37:51,000 --> 00:37:55,000 that's not moving. It tells you how the heat goes 510 00:37:55,000 --> 00:37:58,000 from the warmest parts to the coldest parts, 511 00:37:58,000 --> 00:38:03,000 and eventually temperatures should somehow even out. 512 00:38:03,000 --> 00:38:08,000 So, in the heat equation, that would just be, 513 00:38:08,000 --> 00:38:15,000 this u would just measure the temperature for temperature of 514 00:38:15,000 --> 00:38:19,000 your fluid at a given point. Actually, it doesn't have to be 515 00:38:19,000 --> 00:38:23,000 a fluid. It could be a solid for that 516 00:38:23,000 --> 00:38:26,000 heat equation. So, for example, 517 00:38:26,000 --> 00:38:31,000 say that you have a big box made of metal or something, 518 00:38:31,000 --> 00:38:34,000 and you do some heating at one side. 519 00:38:34,000 --> 00:38:38,000 You want to know how quickly is the other side going to get hot? 520 00:38:38,000 --> 00:38:40,000 Well, you can use the equation to figure out, 521 00:38:40,000 --> 00:38:44,000 you know, say that you have a metal bar, and you keep one side 522 00:38:44,000 --> 00:38:46,000 at 400� because it's in your oven. 523 00:38:46,000 --> 00:38:52,000 How quickly will the other side get warm? 524 00:38:52,000 --> 00:38:57,000 OK, so it's the same equation for both phenomena even though 525 00:38:57,000 --> 00:39:00,000 they are, of course, different phenomena. 526 00:39:00,000 --> 00:39:02,000 Well, the physical reason why they're the same is actually 527 00:39:02,000 --> 00:39:05,000 that phenomena are different, but not all that much. 528 00:39:05,000 --> 00:39:07,000 They involve, actually, how the atoms and 529 00:39:07,000 --> 00:39:11,000 molecules are actually moving, and hitting each other inside 530 00:39:11,000 --> 00:39:14,000 this medium. OK, so anyway, 531 00:39:14,000 --> 00:39:17,000 what's the explanation for this? 532 00:39:17,000 --> 00:39:20,000 So, to understand the explanation, and given what 533 00:39:20,000 --> 00:39:22,000 we've been doing, we should have a vector field 534 00:39:22,000 --> 00:39:26,000 in there. So, I'm going to think of the 535 00:39:26,000 --> 00:39:30,000 flow of, well, let's imagine that we are doing 536 00:39:30,000 --> 00:39:35,000 motion of smoke in air. So, that's the flow of the 537 00:39:35,000 --> 00:39:39,000 smoke: that means at every point, it's a vector whose 538 00:39:39,000 --> 00:39:43,000 direction tells me in which direction the smoke is actually 539 00:39:43,000 --> 00:39:47,000 moving. And, its magnitude tells me how 540 00:39:47,000 --> 00:39:52,000 fast it's moving, and also what amount of smoke 541 00:39:52,000 --> 00:39:56,000 is moving. So, there's two things to 542 00:39:56,000 --> 00:40:01,000 understand. One is how the disparities in 543 00:40:01,000 --> 00:40:06,000 the concentration between different points causes the flow 544 00:40:06,000 --> 00:40:10,000 to be there, how smoke will flow from the 545 00:40:10,000 --> 00:40:14,000 regions where there's more smoke to the regions where there's 546 00:40:14,000 --> 00:40:17,000 less smoke. And, that's actually physics. 547 00:40:17,000 --> 00:40:24,000 But, in a way, it's also common sense. 548 00:40:24,000 --> 00:40:40,000 So, physics and common sense tell us that the smoke will flow 549 00:40:40,000 --> 00:40:56,000 from high concentration towards low concentration regions. 550 00:40:56,000 --> 00:41:01,000 OK, so if we think of this function, U, 551 00:41:01,000 --> 00:41:04,000 that measures concentration, that means we are always going 552 00:41:04,000 --> 00:41:07,000 to go in the direction where the concentration decreases the 553 00:41:07,000 --> 00:41:09,000 fastest. Well, what's that? 554 00:41:09,000 --> 00:41:25,000 That's negative the gradient. So, F is directed along minus 555 00:41:25,000 --> 00:41:32,000 gradient u. Now, how big is F going to be? 556 00:41:32,000 --> 00:41:35,000 Well, they are, you have to come up with some 557 00:41:35,000 --> 00:41:39,000 intuition for how the two are related. 558 00:41:39,000 --> 00:41:42,000 And, the easiest relation I can think of is that they might be 559 00:41:42,000 --> 00:41:44,000 just proportional. So, the steeper the differences 560 00:41:44,000 --> 00:41:47,000 in concentration, the faster the flow will be, 561 00:41:47,000 --> 00:41:50,000 or the more there will be flow. And, if you try to think about 562 00:41:50,000 --> 00:41:53,000 it as molecules moving in random directions, you will see it 563 00:41:53,000 --> 00:41:56,000 makes actually complete sense. Anyway, it should be part of 564 00:41:56,000 --> 00:42:00,000 your physics class, not part of what I'm telling 565 00:42:00,000 --> 00:42:04,000 you. So, I'm just going to accept 566 00:42:04,000 --> 00:42:12,000 that the flow is just proportional to the gradient of 567 00:42:12,000 --> 00:42:13,000 u. So, if you want, 568 00:42:13,000 --> 00:42:16,000 the differences between concentrations of different 569 00:42:16,000 --> 00:42:18,000 points are very small, then the flow will be very 570 00:42:18,000 --> 00:42:22,000 gentle. And, if on the other hand you 571 00:42:22,000 --> 00:42:26,000 have huge disparities, then things will try to even 572 00:42:26,000 --> 00:42:31,000 out faster. OK, so that's the first part. 573 00:42:31,000 --> 00:42:35,000 Now, we need to understand the second part, which is once we 574 00:42:35,000 --> 00:42:38,000 know how flow is going, how does that affect the 575 00:42:38,000 --> 00:42:40,000 concentration? If smoke is going that way, 576 00:42:40,000 --> 00:42:43,000 then it means the concentration here should be decreasing. 577 00:42:43,000 --> 00:42:45,000 And there, it should be increasing. 578 00:42:45,000 --> 00:42:58,000 So, that's the relation between F and partial u partial t. 579 00:42:58,000 --> 00:43:07,000 At that part is actually math, namely, the divergence theorem. 580 00:43:07,000 --> 00:43:19,000 So, let's try to understand that part more carefully. 581 00:43:19,000 --> 00:43:25,000 So, let's take a small piece of a small region in space, 582 00:43:25,000 --> 00:43:28,000 D, bounded by a surface, S. 583 00:43:28,000 --> 00:43:33,000 So, I want to figure out what's going on in here. 584 00:43:33,000 --> 00:43:42,000 So, let's look at the flux out of D through S. 585 00:43:42,000 --> 00:43:49,000 Well, we said that this flux would be given by double 586 00:43:49,000 --> 00:43:58,000 integral on S of F dot n dS. So, this flux measures how much 587 00:43:58,000 --> 00:44:05,000 smoke is passing through S per unit time. 588 00:44:05,000 --> 00:44:14,000 That's the amount of smoke through S per unit time. 589 00:44:14,000 --> 00:44:19,000 But now, how can I compute that differently? 590 00:44:19,000 --> 00:44:23,000 Well, I can compute it just by looking at the total amount of 591 00:44:23,000 --> 00:44:26,000 smoke in this region, and seeing how much it changes. 592 00:44:26,000 --> 00:44:29,000 If I'm gaining or losing smoke, it means it must be going up 593 00:44:29,000 --> 00:44:32,000 there. Well, unless I have a smoker in 594 00:44:32,000 --> 00:44:35,000 here, but that's not part of the data. 595 00:44:35,000 --> 00:44:41,000 So, that should be, sorry, 596 00:44:41,000 --> 00:44:44,000 that's the same thing as the derivative with respect to t of 597 00:44:44,000 --> 00:44:47,000 the total amount of smoke in the region, 598 00:44:47,000 --> 00:44:50,000 which is given by the triple integral of u. 599 00:44:50,000 --> 00:44:52,000 If I integrate the concentration of smoke, 600 00:44:52,000 --> 00:44:56,000 which means the amount of smoke per unit volume over d, 601 00:44:56,000 --> 00:44:59,000 I will get the total amount of smoke in d, 602 00:44:59,000 --> 00:45:02,000 except, well, 603 00:45:02,000 --> 00:45:05,000 let's see. This flux is counted positively 604 00:45:05,000 --> 00:45:07,000 if we go out of d. So, actually, 605 00:45:07,000 --> 00:45:12,000 it's minus the derivative. This is the amount of smoke 606 00:45:12,000 --> 00:45:16,000 that we are losing per unit time. 607 00:45:16,000 --> 00:45:33,000 OK, so now we are almost there. Well, let me actually -- 608 00:45:33,000 --> 00:45:42,000 Because we know yet another way to compute this guy using the 609 00:45:42,000 --> 00:45:48,000 divergence theorem. Right, so this part here is 610 00:45:48,000 --> 00:45:53,000 just common sense and thinking about what it means. 611 00:45:53,000 --> 00:46:00,000 The divergence theorem tells me this is also equal to the triple 612 00:46:00,000 --> 00:46:06,000 integral, d, of div f dV. So, what I got is that the 613 00:46:06,000 --> 00:46:15,000 triple integral over d of div F dV equals this derivative. 614 00:46:15,000 --> 00:46:18,000 Well, let's think a bit about this derivative so, 615 00:46:18,000 --> 00:46:20,000 see, you are integrating function over x, 616 00:46:20,000 --> 00:46:22,000 y, and z. And then, you are 617 00:46:22,000 --> 00:46:24,000 differentiating with respect to t. 618 00:46:24,000 --> 00:46:28,000 I claim that you can actually switch the order in which you do 619 00:46:28,000 --> 00:46:30,000 things. So, when we think about it, 620 00:46:30,000 --> 00:46:33,000 is, here, you are taking the total amount of smoke and then 621 00:46:33,000 --> 00:46:37,000 see how that changes over time. So, you're taking the 622 00:46:37,000 --> 00:46:40,000 derivative of the sum of all the small amounts of smoke 623 00:46:40,000 --> 00:46:42,000 everywhere. Well, that will be the sum of 624 00:46:42,000 --> 00:46:47,000 the derivatives of the amounts of smoke inside each little box. 625 00:46:47,000 --> 00:46:55,000 So, we can actually move the derivatives into the integral. 626 00:46:55,000 --> 00:47:00,000 So, let's see, I said minus d dt of triple 627 00:47:00,000 --> 00:47:07,000 integral over d udV. And, now I'm saying this is the 628 00:47:07,000 --> 00:47:14,000 same as the triple integral in d of du dt dv. 629 00:47:14,000 --> 00:47:19,000 And the reason why this is going to work is you should 630 00:47:19,000 --> 00:47:24,000 think of it as d dt of a sum of u of some values. 631 00:47:24,000 --> 00:47:30,000 You plug in the values of your points at that given time times 632 00:47:30,000 --> 00:47:32,000 the small volume. You sum them, 633 00:47:32,000 --> 00:47:33,000 and then you take the derivative. 634 00:47:33,000 --> 00:47:42,000 And now, you see, the derivative of this sum is 635 00:47:42,000 --> 00:47:49,000 the sum of the derivatives. yi, zi, t, so, 636 00:47:49,000 --> 00:47:53,000 if you think about what the integral measures, 637 00:47:53,000 --> 00:47:58,000 that's actually pretty easy. And it's because this variable 638 00:47:58,000 --> 00:48:01,000 here is not the same as the variables on which we are 639 00:48:01,000 --> 00:48:03,000 integrating. That's why we can do it. 640 00:48:03,000 --> 00:48:13,000 OK, so now, if we have this for any region, d. 641 00:48:13,000 --> 00:48:18,000 So, we have a function of x, y, z, t, and we have another 642 00:48:18,000 --> 00:48:21,000 function here. And whenever we integrate them 643 00:48:21,000 --> 00:48:23,000 anywhere, we get the same answer. 644 00:48:23,000 --> 00:48:26,000 Well, that must mean they're the same. 645 00:48:26,000 --> 00:48:29,000 Just think of what happens if you just take d to be a tiny 646 00:48:29,000 --> 00:48:31,000 little box. You will get roughly the value 647 00:48:31,000 --> 00:48:33,000 of div f at that point times the volume of the box. 648 00:48:33,000 --> 00:48:36,000 Or, you will get roughly the value of du dt at that point 649 00:48:36,000 --> 00:48:41,000 times the value of a little box. So, the values must be the same. 650 00:48:41,000 --> 00:48:46,000 Well, let me actually explain that a tiny bit better. 651 00:48:46,000 --> 00:48:50,000 So, what I get is that one over, let me divide by the 652 00:48:50,000 --> 00:49:00,000 volume of D, sorry. I promise, I'm done in a minute. 653 00:49:00,000 --> 00:49:08,000 Is the same thing as one over volume D of negative du dt, 654 00:49:08,000 --> 00:49:10,000 dV. So, that means the average 655 00:49:10,000 --> 00:49:12,000 value, OK, maybe that's the best way 656 00:49:12,000 --> 00:49:17,000 of telling it, the average of div f in D is 657 00:49:17,000 --> 00:49:27,000 equal to the average of minus partial u partial t in D. 658 00:49:27,000 --> 00:49:30,000 And, that's true for any region, D, not just for some 659 00:49:30,000 --> 00:49:33,000 regions, but for, really, any region I can think 660 00:49:33,000 --> 00:49:37,000 of. So, the outcome is that 661 00:49:37,000 --> 00:49:43,000 actually the divergence of f is equal to minus du dt. 662 00:49:43,000 --> 00:49:47,000 And, that's another way to think about what divergence 663 00:49:47,000 --> 00:49:48,000 means. The divergence, 664 00:49:48,000 --> 00:49:50,000 we said, is how much stuff is actually expanding, 665 00:49:50,000 --> 00:49:54,000 flowing out. That's how much we're losing. 666 00:49:54,000 --> 00:49:58,000 And so, now, if you combine this with that, 667 00:49:58,000 --> 00:50:02,000 you will get that du dt is minus divergence f, 668 00:50:02,000 --> 00:50:08,000 which is plus K del squared u. OK, so you combine this guy 669 00:50:08,000 --> 00:50:10,000 with that guy, and you get the diffusion 670 00:50:10,000 --> 00:50:13,000 equation.