1 00:00:00,000 --> 00:00:00,680 2 00:00:00,680 --> 00:00:03,240 So where we left off I was attempting to give you the 3 00:00:03,240 --> 00:00:05,419 intuition of divergence and then I ran out of time. 4 00:00:05,419 --> 00:00:09,330 But anyway, I had defined this fairly straightforward vector 5 00:00:09,330 --> 00:00:12,460 field that tells us the velocity of particles in a 6 00:00:12,460 --> 00:00:13,755 fluid at any given point. 7 00:00:13,755 --> 00:00:15,580 And let me clean it up a little bit. 8 00:00:15,580 --> 00:00:17,899 This one half I had all these scratch offs. 9 00:00:17,899 --> 00:00:23,099 The velocity, I'm just going to rewrite it, is equal to 1/2xi. 10 00:00:23,100 --> 00:00:25,750 So at any given point has no y component. 11 00:00:25,750 --> 00:00:28,719 So all of the velocity is only in the x direction -- there is 12 00:00:28,719 --> 00:00:31,339 no upwards movement in the xy plane. 13 00:00:31,339 --> 00:00:32,530 And I was drawing it out. 14 00:00:32,530 --> 00:00:35,359 I said OK, when x is equal to 1, the magnitude of the 15 00:00:35,359 --> 00:00:39,689 velocity is 1/2 maybe meters per second, if that's our unit. 16 00:00:39,689 --> 00:00:42,429 When x is equal to 2, the velocity to the right will 17 00:00:42,429 --> 00:00:45,250 be 1 meter per second, right -- 1/2 times 2. 18 00:00:45,250 --> 00:00:48,579 So the further we go to the right, or the more we go to the 19 00:00:48,579 --> 00:00:52,729 right, the faster the particles are moving to the right. 20 00:00:52,729 --> 00:00:54,229 So now let's try to get our handle on what 21 00:00:54,229 --> 00:00:55,129 divergence means. 22 00:00:55,130 --> 00:00:58,250 So first of all, let's take that the divergence 23 00:00:58,250 --> 00:01:01,200 of this function. 24 00:01:01,200 --> 00:01:09,549 So that divergence of v, of our velocity vector field -- you 25 00:01:09,549 --> 00:01:12,859 could also view that if you want to abuse some notation, 26 00:01:12,859 --> 00:01:18,340 is our del vector, dot v. 27 00:01:18,340 --> 00:01:19,939 But if we only have one dimension, so it's the 28 00:01:19,939 --> 00:01:26,390 partial derivative of the x magnitude with respect to x. 29 00:01:26,390 --> 00:01:27,400 So what's the partial derivative? 30 00:01:27,400 --> 00:01:30,469 So it's equal to the partial derivative with 31 00:01:30,469 --> 00:01:31,859 respect to x, of 1/2x. 32 00:01:31,859 --> 00:01:34,540 33 00:01:34,540 --> 00:01:36,460 So it's equal to -- well the derivative of this with respect 34 00:01:36,459 --> 00:01:38,140 to x is just equal to 1/2 . 35 00:01:38,140 --> 00:01:40,000 So that divergence of this vector field at 36 00:01:40,000 --> 00:01:42,299 any point is 1/2. 37 00:01:42,299 --> 00:01:44,599 Now what does that tell us? 38 00:01:44,599 --> 00:01:48,030 Well, if you just look at the definition, right, we 39 00:01:48,030 --> 00:01:51,460 essentially just took the -- how much does the magnitude 40 00:01:51,459 --> 00:01:53,689 of the field increase in the x direction? 41 00:01:53,689 --> 00:01:54,530 And we see it visually. 42 00:01:54,530 --> 00:01:57,549 As we go, increase in the x direction, the field gets 43 00:01:57,549 --> 00:01:58,509 stronger and stronger. 44 00:01:58,510 --> 00:02:01,130 Or since we know that this is the velocity of particles, as 45 00:02:01,129 --> 00:02:03,909 we go in the x direction, the particles go faster and 46 00:02:03,909 --> 00:02:05,229 faster to the right. 47 00:02:05,230 --> 00:02:07,689 Now what this tells us, what this positive divergence tells 48 00:02:07,689 --> 00:02:09,609 us is if we were to take -- let's just take an 49 00:02:09,610 --> 00:02:12,500 arbitrarily small circle. 50 00:02:12,500 --> 00:02:15,310 I think it'll start to make sense once I draw the circle. 51 00:02:15,310 --> 00:02:17,849 If I take an arbitrarily -- I'm going to draw it in a different 52 00:02:17,849 --> 00:02:20,620 color -- and this circle could be arbitrarily small, but I'm 53 00:02:20,620 --> 00:02:24,430 drawing it pretty large so it can include some of our 54 00:02:24,430 --> 00:02:26,409 vectors that I've drawn. 55 00:02:26,409 --> 00:02:27,030 What's happening? 56 00:02:27,030 --> 00:02:30,599 57 00:02:30,599 --> 00:02:33,639 On the right hand side, I have particles exiting really, 58 00:02:33,639 --> 00:02:34,639 really fast, right? 59 00:02:34,639 --> 00:02:41,659 And let's say in a given amount of time, let's say in one 60 00:02:41,659 --> 00:02:44,419 second, in one second out of the right side, since the 61 00:02:44,419 --> 00:02:46,449 particles are moving really fast, I'm going to have a 62 00:02:46,449 --> 00:02:49,629 bunch of particles leave the right hand side, right? 63 00:02:49,629 --> 00:02:51,819 And in the same amount of time, I will have some particles 64 00:02:51,819 --> 00:02:53,859 come in through the left hand side, but it's going to be a 65 00:02:53,860 --> 00:02:55,470 fewer number of particles. 66 00:02:55,469 --> 00:02:58,289 So the way you could think about it is in any given amount 67 00:02:58,289 --> 00:03:00,289 of time, what's happening? 68 00:03:00,289 --> 00:03:03,060 In this space, I have a few particles entering in through 69 00:03:03,060 --> 00:03:05,990 the left, and I have a much larger number of particle 70 00:03:05,990 --> 00:03:07,500 leaving through the right. 71 00:03:07,500 --> 00:03:10,110 So what's going to happen in this space? 72 00:03:10,110 --> 00:03:12,660 It's going to become less dense, right? 73 00:03:12,659 --> 00:03:14,849 Because in that space is going to be fewer particles after 74 00:03:14,849 --> 00:03:15,750 a certain amount of time. 75 00:03:15,750 --> 00:03:18,199 More are leaving than are coming in. 76 00:03:18,199 --> 00:03:22,699 So this positive divergence tells us that at that point, or 77 00:03:22,699 --> 00:03:24,479 really at any point in this vector field since the 78 00:03:24,479 --> 00:03:28,639 divergence is 1/2 everywhere, at any point in this vector 79 00:03:28,639 --> 00:03:31,439 field, the field is becoming less dense. 80 00:03:31,439 --> 00:03:34,099 Or you could say that more is flowing out of any 81 00:03:34,099 --> 00:03:36,629 point than flowing in. 82 00:03:36,629 --> 00:03:37,530 It makes sense, right? 83 00:03:37,530 --> 00:03:39,990 Because if as we move to the right, and it kind of gets 84 00:03:39,990 --> 00:03:43,950 funky if you go into the other quadrant, so we'll stick to the 85 00:03:43,949 --> 00:03:46,319 first quadrant while we're trying to get our intuition. 86 00:03:46,319 --> 00:03:49,139 But it makes sense, because as we move to the right 87 00:03:49,139 --> 00:03:52,239 our particles are getting faster and faster. 88 00:03:52,240 --> 00:03:56,629 And that kind of just falls out of the fact that our derivative 89 00:03:56,629 --> 00:03:58,389 with respect to x is positive. 90 00:03:58,389 --> 00:04:04,519 The slope of how much our x component is 91 00:04:04,520 --> 00:04:05,659 increasing is positive. 92 00:04:05,659 --> 00:04:09,189 So as we go to the right, our velocities are going getting 93 00:04:09,189 --> 00:04:11,270 faster and faster, which means if we were to draw a circle 94 00:04:11,270 --> 00:04:15,210 anywhere, we're always going to have more exiting the right 95 00:04:15,210 --> 00:04:17,420 than entering through the left. 96 00:04:17,420 --> 00:04:19,750 So we're going to be getting less dense at any given point. 97 00:04:19,750 --> 00:04:23,500 Or you could almost view it as any given point is almost a 98 00:04:23,500 --> 00:04:26,790 source of particles, or if you have a sphere, more particles 99 00:04:26,790 --> 00:04:29,000 are going to be coming out of the sphere through the right, 100 00:04:29,000 --> 00:04:31,069 than coming in through the sphere to the left. 101 00:04:31,069 --> 00:04:34,959 So you could view a positive divergence as you could kind of 102 00:04:34,959 --> 00:04:40,129 say well, the field is becoming less dense at that point, or 103 00:04:40,129 --> 00:04:45,269 the point is a source of the field, or it's a source of 104 00:04:45,269 --> 00:04:49,129 particles, depending on what model you want to use. 105 00:04:49,129 --> 00:04:51,956 Now, with that said, let's take the opposite situation. 106 00:04:51,956 --> 00:04:57,200 107 00:04:57,199 --> 00:05:00,649 Let's say that the vector field is equal to is 108 00:05:00,649 --> 00:05:06,169 minus 1/2x times i. 109 00:05:06,170 --> 00:05:10,120 And so the divergence -- I'll use this notation -- the 110 00:05:10,120 --> 00:05:13,189 divergence of our vector field is just a partial derivative 111 00:05:13,189 --> 00:05:16,569 with respect to x, which is just minus 1/2. 112 00:05:16,569 --> 00:05:21,242 If I were to graph it -- this is my y-axis, 113 00:05:21,242 --> 00:05:22,170 this is my x-axis. 114 00:05:22,170 --> 00:05:29,250 115 00:05:29,250 --> 00:05:32,620 So here at like, say, the point 1, my velocity is 116 00:05:32,620 --> 00:05:35,319 going to be the left 1/2. 117 00:05:35,319 --> 00:05:39,389 At the point 2, my velocity is going to be the left 118 00:05:39,389 --> 00:05:42,079 1 meter per second. 119 00:05:42,079 --> 00:05:47,959 At the velocity 3, it's going to be 3/2. 120 00:05:47,959 --> 00:05:49,930 You know it doesn't depend on y. 121 00:05:49,930 --> 00:05:50,660 It only depends on x. 122 00:05:50,660 --> 00:05:53,770 123 00:05:53,769 --> 00:05:56,829 So now let's draw a little circle and see 124 00:05:56,829 --> 00:05:58,050 what's happening. 125 00:05:58,050 --> 00:05:58,944 Let's draw it here. 126 00:05:58,944 --> 00:05:59,819 It could be anywhere. 127 00:05:59,819 --> 00:06:01,540 It's infinitely small, but we're just trying 128 00:06:01,540 --> 00:06:02,840 to get some intuition. 129 00:06:02,839 --> 00:06:05,609 So after a certain amount of time what's happening? 130 00:06:05,610 --> 00:06:06,850 Let's say after a second. 131 00:06:06,850 --> 00:06:10,520 Well, I'm having a few particles leave through the 132 00:06:10,519 --> 00:06:13,349 left hand side, right, but I have many more particles 133 00:06:13,350 --> 00:06:15,790 entering this little region that I've defined, this little 134 00:06:15,790 --> 00:06:18,129 circle, I'm having many more particles enter through the 135 00:06:18,129 --> 00:06:19,949 right in a given amount of time. 136 00:06:19,949 --> 00:06:24,689 So in any given amount of time, in my defined space, it's going 137 00:06:24,689 --> 00:06:25,639 to get denser and denser. 138 00:06:25,639 --> 00:06:27,180 There's going to be more and more particles in 139 00:06:27,180 --> 00:06:30,180 that space over time. 140 00:06:30,180 --> 00:06:33,689 So it's getting denser or you could almost view it as this 141 00:06:33,689 --> 00:06:35,125 space is sucking up particles. 142 00:06:35,125 --> 00:06:37,920 143 00:06:37,920 --> 00:06:40,580 In the previous example it was a source of particles -- more 144 00:06:40,579 --> 00:06:42,419 were coming out than going in. 145 00:06:42,420 --> 00:06:46,170 Now more going in through the right than coming out. 146 00:06:46,170 --> 00:06:48,569 And that's what a negative divergence. 147 00:06:48,569 --> 00:06:52,000 You could almost say -- let's think about the 148 00:06:52,000 --> 00:06:53,139 word, divergence. 149 00:06:53,139 --> 00:06:55,519 When it's positive, if I have a positive divergence, the 150 00:06:55,519 --> 00:06:58,879 particles or the field is diverting out of that point. 151 00:06:58,879 --> 00:07:01,240 If I have a negative divergence -- maybe 152 00:07:01,240 --> 00:07:02,139 let's define a new term. 153 00:07:02,139 --> 00:07:04,209 I've never actually heard it this way, but maybe a negative 154 00:07:04,209 --> 00:07:06,339 divergence we view as a convergence, right? 155 00:07:06,339 --> 00:07:08,500 Converge is the opposite of diverge. 156 00:07:08,500 --> 00:07:11,370 So here, even though some particles are leaving through 157 00:07:11,370 --> 00:07:14,480 the left, many more particles are coming through the 158 00:07:14,480 --> 00:07:17,340 right, so it's getting denser and denser. 159 00:07:17,339 --> 00:07:19,039 And that's this example here. 160 00:07:19,040 --> 00:07:21,470 And actually at every point in this field we have 161 00:07:21,470 --> 00:07:22,470 a negative divergence. 162 00:07:22,470 --> 00:07:25,660 So every point is getting denser and denser actually 163 00:07:25,660 --> 00:07:27,370 everywhere in this field. 164 00:07:27,370 --> 00:07:29,879 And then the classic example of a divergence, although I wanted 165 00:07:29,879 --> 00:07:32,750 to show you that what matters is the net that's coming 166 00:07:32,750 --> 00:07:34,060 in to a certain area. 167 00:07:34,060 --> 00:07:36,790 But the classic example of a divergence is a field that 168 00:07:36,790 --> 00:07:38,860 looks something like this. 169 00:07:38,860 --> 00:07:41,955 Where maybe that's the x -- that's the y, this is the x. 170 00:07:41,954 --> 00:07:45,279 171 00:07:45,279 --> 00:07:50,149 If you have a field that looks something like this, this is 172 00:07:50,149 --> 00:07:55,169 the classical example of a negative divergence, right? 173 00:07:55,170 --> 00:07:57,210 Where from every direction you have particles entering, 174 00:07:57,209 --> 00:07:58,019 nothing's leaving. 175 00:07:58,019 --> 00:08:01,979 So obviously, in any given amount of time, that point is 176 00:08:01,980 --> 00:08:04,140 getting more and more dense. 177 00:08:04,139 --> 00:08:12,120 And the classic example of a positive divergence is a point 178 00:08:12,120 --> 00:08:16,970 where from every direction things are leaving it. 179 00:08:16,970 --> 00:08:20,160 So clearly this area is going to become less dense. 180 00:08:20,160 --> 00:08:23,660 If we're talking about velocity of particles, after any moment 181 00:08:23,660 --> 00:08:26,689 in time, more particles are leaving than coming in because 182 00:08:26,689 --> 00:08:29,500 no particles are coming in. 183 00:08:29,500 --> 00:08:36,580 Now what does it mean if we have a 0 divergence? 184 00:08:36,580 --> 00:08:43,500 So let's try to create a vector field that has a 0 divergence. 185 00:08:43,500 --> 00:08:45,210 And we'll just stay at a one-dimension just 186 00:08:45,210 --> 00:08:45,889 for the intuition. 187 00:08:45,889 --> 00:08:47,269 So that means that the partial derivative with 188 00:08:47,269 --> 00:08:48,960 respect to x is 0. 189 00:08:48,960 --> 00:08:51,879 So let's say my vector field is 5i. 190 00:08:51,879 --> 00:08:54,350 So the magnitude is always 5 in the i direction. 191 00:08:54,350 --> 00:08:55,420 So let me draw that. 192 00:08:55,419 --> 00:09:02,490 193 00:09:02,490 --> 00:09:04,659 Vector field is always 5. 194 00:09:04,659 --> 00:09:07,169 195 00:09:07,169 --> 00:09:08,750 Another way to think of it if you have a constant 196 00:09:08,750 --> 00:09:10,580 vector field. 197 00:09:10,580 --> 00:09:13,230 So the magnitude of the vectors, no matter what 198 00:09:13,230 --> 00:09:17,139 my value of x, is always going to be the same. 199 00:09:17,139 --> 00:09:18,330 It's always going to be 5. 200 00:09:18,330 --> 00:09:30,509 201 00:09:30,509 --> 00:09:36,590 So if I were to draw a region, what's happening here? 202 00:09:36,590 --> 00:09:39,149 Are more particles entering than leaving or 203 00:09:39,149 --> 00:09:40,009 leaving than entering? 204 00:09:40,009 --> 00:09:40,269 No. 205 00:09:40,269 --> 00:09:43,220 For any amount that's coming in, an equal amount are coming 206 00:09:43,220 --> 00:09:45,820 out in a certain amount of time, if we use velocity 207 00:09:45,820 --> 00:09:47,010 as our example. 208 00:09:47,009 --> 00:09:49,960 So when you have a divergence of 0, that means that that part 209 00:09:49,960 --> 00:09:54,950 of the field is not becoming any more or less dense. 210 00:09:54,950 --> 00:09:56,930 And you could have done it -- let me show you another. 211 00:09:56,929 --> 00:10:03,579 If my function was, let's say it equals 2i plus 2j. 212 00:10:03,580 --> 00:10:04,910 It's still a constant, right? 213 00:10:04,909 --> 00:10:08,370 So this velocity field or vector field will look 214 00:10:08,370 --> 00:10:10,269 something like this. 215 00:10:10,269 --> 00:10:14,019 All the points would be, the vectors would 216 00:10:14,019 --> 00:10:15,049 have a slope of 1. 217 00:10:15,049 --> 00:10:17,769 But I just wanted you to see something in two dimensions. 218 00:10:17,769 --> 00:10:21,679 I'll do a fancier example in the next video. 219 00:10:21,679 --> 00:10:25,269 But even here, if I were to draw some region, the same 220 00:10:25,269 --> 00:10:27,649 amount is entering as exiting. 221 00:10:27,649 --> 00:10:29,689 So it's not getting any denser at any point. 222 00:10:29,690 --> 00:10:33,510 And that makes sense because the divergence of this vector 223 00:10:33,509 --> 00:10:36,980 field -- well, both of them actually, the divergence 224 00:10:36,980 --> 00:10:37,820 of that vector field. 225 00:10:37,820 --> 00:10:39,685 The partial derivative of 2 with respect to 226 00:10:39,684 --> 00:10:41,319 x, well that's 0. 227 00:10:41,320 --> 00:10:44,120 Plus the partial derivative of 2 with respect to y. 228 00:10:44,120 --> 00:10:46,500 Well, that's also 0. 229 00:10:46,500 --> 00:10:48,179 Anyway, I've run out of time again. 230 00:10:48,179 --> 00:10:51,169 I will see you in the next video. 231 00:10:51,169 --> 00:10:51,399