1 00:00:00,660 --> 00:00:03,570 Welcome to week five of modeling complex systems. 2 00:00:03,570 --> 00:00:05,160 Today we'll start in my living room. 3 00:00:05,160 --> 00:00:08,880 As usual, we'll revisit the Lotka-Volterra model 4 00:00:08,880 --> 00:00:11,250 of species interactions that we looked at 5 00:00:11,250 --> 00:00:12,989 in discussion groups. 6 00:00:12,989 --> 00:00:16,560 We're gonna look at different mechanisms for reproduction, 7 00:00:16,560 --> 00:00:19,770 different ways to write down interaction terms 8 00:00:19,770 --> 00:00:22,650 between species, and we'll look at how we can use 9 00:00:22,650 --> 00:00:27,650 some of the tools we learned to analyze, with simply our pen 10 00:00:27,780 --> 00:00:30,480 and paper, the properties of these models. 11 00:00:30,480 --> 00:00:31,860 Then I'll move up to my office, 12 00:00:31,860 --> 00:00:33,720 where I'll show you in practice how do I use 13 00:00:33,720 --> 00:00:37,110 numerical integrators to solve for the time series 14 00:00:37,110 --> 00:00:38,160 and to look at the behavior 15 00:00:38,160 --> 00:00:40,353 of these models in greater detail. 16 00:00:41,190 --> 00:00:44,433 So first, let me just share my notes. 17 00:00:50,640 --> 00:00:54,726 Okay, so in discussion rooms, we focused 18 00:00:54,726 --> 00:00:59,190 on this question of sharks in Italian waters 19 00:00:59,190 --> 00:01:02,520 during World War I, and we used F dot and S dot to follow 20 00:01:02,520 --> 00:01:07,500 the density of sharks and fish in the sea. 21 00:01:07,500 --> 00:01:10,053 Here, I'd like to make it a little more general, 22 00:01:11,640 --> 00:01:16,290 and simply use N1 dot for the time derivative. 23 00:01:16,290 --> 00:01:18,540 Remember, that's what the dot means, 24 00:01:18,540 --> 00:01:22,200 and N2 dot for the time derivative respectively 25 00:01:22,200 --> 00:01:23,610 of species one and two, 26 00:01:23,610 --> 00:01:27,300 so the number of species one and the number of species two. 27 00:01:27,300 --> 00:01:29,160 In the discussion groups, I think 28 00:01:29,160 --> 00:01:33,423 almost all groups came up with something that looks like, 29 00:01:37,680 --> 00:01:40,290 so you have a linear reproduction term. 30 00:01:40,290 --> 00:01:41,850 I call it a linear term, 31 00:01:41,850 --> 00:01:44,100 because it's the rate times the quantity, 32 00:01:44,100 --> 00:01:48,210 but really what this is, a growth rate 33 00:01:48,210 --> 00:01:51,150 that is linearly proportional to the population, 34 00:01:51,150 --> 00:01:54,180 that's exponential growth, right? 35 00:01:54,180 --> 00:01:56,760 So the bigger N is, the faster it's gonna grow, 36 00:01:56,760 --> 00:01:59,073 and the growth is gonna keep getting faster, 37 00:02:01,920 --> 00:02:03,663 so we have exponential growth, 38 00:02:09,647 --> 00:02:12,993 and we'll focus on N1 for now, so let me erase that. 39 00:02:15,060 --> 00:02:19,290 We had something like minus D times N1, 40 00:02:19,290 --> 00:02:24,290 that was death rate, 41 00:02:31,380 --> 00:02:33,180 and then we had some interaction term, 42 00:02:33,180 --> 00:02:36,690 and depending on whether that was a prey or a predator, 43 00:02:36,690 --> 00:02:39,300 this could be positive or negative. 44 00:02:39,300 --> 00:02:42,720 Here, let me just write it as some interaction term. 45 00:02:42,720 --> 00:02:45,603 I'm just gonna use A N1 N2, 46 00:02:49,890 --> 00:02:53,703 and that was species interaction. 47 00:02:58,590 --> 00:03:01,890 And there's a lot of flavors of the Lotka-Volterra model. 48 00:03:01,890 --> 00:03:04,980 So if you're looking at a predation model, 49 00:03:04,980 --> 00:03:08,700 often you'll have one positive term for one species, 50 00:03:08,700 --> 00:03:10,110 and one negative term for the other, 51 00:03:10,110 --> 00:03:11,730 so what's good for me is bad for you 52 00:03:11,730 --> 00:03:14,520 if I'm the predator and you are the prey. 53 00:03:14,520 --> 00:03:18,120 You can also have Lotka-Volterra systems of competition, 54 00:03:18,120 --> 00:03:20,940 where both interaction terms will be negative. 55 00:03:20,940 --> 00:03:23,430 We're sort of competing for the same resources, 56 00:03:23,430 --> 00:03:26,193 and we would both be happier if the other wasn't there. 57 00:03:27,690 --> 00:03:30,000 Okay, so it's good to write it 58 00:03:30,000 --> 00:03:32,880 with this general notation plus A, and just acknowledge 59 00:03:32,880 --> 00:03:36,063 that this constant A can be either positive or negative. 60 00:03:37,260 --> 00:03:39,830 Now, often, one big thing, and it did came up 61 00:03:39,830 --> 00:03:43,470 in one discussion group, is the idea 62 00:03:43,470 --> 00:03:47,340 that exponential growth is not a realistic mechanism 63 00:03:47,340 --> 00:03:50,370 for animal reproduction. 64 00:03:50,370 --> 00:03:54,720 The ecosystem itself only has a certain capacity. 65 00:03:54,720 --> 00:03:57,330 It can't contain infinitely many fish. 66 00:03:57,330 --> 00:03:59,340 The sea is just not big enough, there's not enough food 67 00:03:59,340 --> 00:04:02,310 for them, and we're not modeling food explicitly, 68 00:04:02,310 --> 00:04:07,310 so often, you'll see a Lotka-Volterra system written as, 69 00:04:23,180 --> 00:04:27,210 so now my reproduction right now has two parameters, 70 00:04:27,210 --> 00:04:29,253 this R, which is the reproduction rate, 71 00:04:30,090 --> 00:04:32,943 but the reproduction term also has this K1. 72 00:04:34,711 --> 00:04:36,270 And I'm getting a little ahead of myself here, 73 00:04:36,270 --> 00:04:38,640 so let's say that I mark everything that has to do 74 00:04:38,640 --> 00:04:43,530 with species one with a one, and I'm marking A as A one two, 75 00:04:43,530 --> 00:04:46,800 because it's the interaction of one with two. 76 00:04:46,800 --> 00:04:49,983 Okay, so what did I do with this reproduction term? 77 00:04:51,600 --> 00:04:54,453 This term is what we call logistic growth, 78 00:04:55,890 --> 00:04:58,740 and it did come up, and it came up under that name 79 00:04:58,740 --> 00:05:00,153 during the discussions. 80 00:05:02,880 --> 00:05:05,970 The novelty here is this K term, 81 00:05:05,970 --> 00:05:08,070 which we will call the carrying capacity 82 00:05:08,070 --> 00:05:10,113 of the environment for species one. 83 00:05:14,250 --> 00:05:15,750 So the same environment could have 84 00:05:15,750 --> 00:05:18,210 different carrying capacity for species one and two, 85 00:05:18,210 --> 00:05:21,930 so we could have a K1 and a K2 in both of our equations. 86 00:05:21,930 --> 00:05:23,680 Really what this means is that 87 00:05:25,650 --> 00:05:27,750 the environment can only take so many fish 88 00:05:27,750 --> 00:05:30,933 or so many rabbits, so in time, 89 00:05:35,070 --> 00:05:38,943 if I look at the log of N1, 90 00:05:39,990 --> 00:05:44,580 I still get an exponential growth at early time, 91 00:05:47,550 --> 00:05:51,243 because if K is very large or N is very small, 92 00:05:52,710 --> 00:05:56,190 essentially, you can ignore this K1 minus N1 over K1. 93 00:05:56,190 --> 00:05:59,670 It's gonna be, if K1 is very large, this is gonna be one. 94 00:05:59,670 --> 00:06:04,020 So the system is gonna behave as a normal exponential growth 95 00:06:04,020 --> 00:06:08,460 because of this R1 N1 term in front of it. 96 00:06:08,460 --> 00:06:13,050 But as K1 minus N1, as N1 approaches the carrying capacity, 97 00:06:13,050 --> 00:06:16,170 this is gonna be the factor in parent is gonna be 98 00:06:16,170 --> 00:06:20,310 smaller than one, and what we're gonna get is a regime 99 00:06:20,310 --> 00:06:24,160 where it slows, growth slows, and this sort of saturates 100 00:06:27,120 --> 00:06:30,423 until it reaches the carrying capacity asymptotically, 101 00:06:33,447 --> 00:06:34,800 and you can't go over that, right? 102 00:06:34,800 --> 00:06:38,910 Because if N1 reaches K1, then we get this zero term, 103 00:06:38,910 --> 00:06:40,470 and it just kills reproduction. 104 00:06:40,470 --> 00:06:42,170 Essentially, there's no more food. 105 00:06:43,080 --> 00:06:44,100 And depending on the system, 106 00:06:44,100 --> 00:06:46,410 sometimes you can overshoot, really. 107 00:06:46,410 --> 00:06:48,780 You would need like, other dimensions, 108 00:06:48,780 --> 00:06:53,010 but here, it's a simple logistic growth. 109 00:06:53,010 --> 00:06:53,880 This is what it looks like, 110 00:06:53,880 --> 00:06:56,043 exponential growth then saturation. 111 00:06:59,010 --> 00:07:01,203 Sometimes we won't even have death rates, 112 00:07:04,560 --> 00:07:07,410 because especially if deaths are due to predation, 113 00:07:07,410 --> 00:07:08,790 like when we were looking at the fish, 114 00:07:08,790 --> 00:07:12,030 I would often put the natural death rate of fish to zero, 115 00:07:12,030 --> 00:07:15,483 because essentially, no fish gets to die of old age. 116 00:07:18,810 --> 00:07:23,320 And so let me add a new page here to this notebook, 117 00:07:26,400 --> 00:07:29,040 and so we can propose a slightly more general, 118 00:07:29,040 --> 00:07:31,026 and when I say general, it's that it's really the one 119 00:07:31,026 --> 00:07:35,700 you're likely to see in practice, 120 00:07:35,700 --> 00:07:39,370 a slightly more general model of species interaction 121 00:07:40,980 --> 00:07:42,300 with logistic growth. 122 00:07:42,300 --> 00:07:45,683 So we would've N1 equal to R1 N1. 123 00:07:58,167 --> 00:08:00,863 I'm just gonna introduce here, this, 124 00:08:07,890 --> 00:08:10,140 so A one two was kind of nice, right? 125 00:08:10,140 --> 00:08:14,130 It was the interaction of of species one with species two, 126 00:08:14,130 --> 00:08:15,690 I'm gonna write this as alpha two. 127 00:08:15,690 --> 00:08:18,453 I just don't want too many labels here. 128 00:08:25,080 --> 00:08:29,460 And essentially, I've also factorized the reproduction rate 129 00:08:29,460 --> 00:08:34,443 and the carrying capacity in here. 130 00:08:35,550 --> 00:08:38,970 I'm just trying to write it in sort of a simpler form, 131 00:08:38,970 --> 00:08:42,076 where I have, what these species really want to do is this, 132 00:08:42,076 --> 00:08:44,283 the exponential growth, 133 00:08:51,512 --> 00:08:54,012 so this is what species wants, 134 00:09:03,060 --> 00:09:06,647 and then this, all of this is actually sort of a factor 135 00:09:14,280 --> 00:09:16,800 that says no, you're actually gonna get this, right? 136 00:09:16,800 --> 00:09:18,630 Because yeah, you want your exponential growth, 137 00:09:18,630 --> 00:09:20,100 but the environment can't take it. 138 00:09:20,100 --> 00:09:24,240 Carrying capacity kills you, or the other species 139 00:09:24,240 --> 00:09:28,143 with this alpha two equal N2 term kills you. 140 00:09:33,229 --> 00:09:36,150 Okay, and then the more of N2 I have, 141 00:09:36,150 --> 00:09:37,980 the more of this interaction I get. 142 00:09:37,980 --> 00:09:41,460 This is, with the exception of the little factorization 143 00:09:41,460 --> 00:09:45,480 I did up here, this is the same as what we discussed 144 00:09:45,480 --> 00:09:50,480 in class where we still get a N1 times N2 term 145 00:09:51,600 --> 00:09:52,600 for the interaction. 146 00:09:55,110 --> 00:09:56,643 And then I could write N2 dot, 147 00:09:59,580 --> 00:10:02,130 and just replace my labels, really, 148 00:10:02,130 --> 00:10:05,250 different carrying capacity, because if I'm thinking 149 00:10:05,250 --> 00:10:10,250 about fish and sharks, the sea can sustain a lot more fish 150 00:10:11,400 --> 00:10:12,750 than it can sustain sharks. 151 00:10:12,750 --> 00:10:14,910 It's just a question of size, 152 00:10:14,910 --> 00:10:16,953 resource consumption, and so on. 153 00:10:18,960 --> 00:10:22,200 Okay, so I have two symmetric equation, and here, 154 00:10:22,200 --> 00:10:25,560 I've written them explicitly as negative in both cases, 155 00:10:25,560 --> 00:10:28,140 minus alpha two N2, minus alpha one N1, 156 00:10:28,140 --> 00:10:29,383 'cause what I want to look at is 157 00:10:29,383 --> 00:10:31,440 a Lotka-Volterra competition model. 158 00:10:31,440 --> 00:10:34,023 So nobody likes being close to the other species. 159 00:10:38,730 --> 00:10:40,533 Okay, so I have a competition. 160 00:10:42,300 --> 00:10:45,360 These are my system, my system of equations, 161 00:10:45,360 --> 00:10:48,720 and I want to know what's gonna happen in the long term, 162 00:10:48,720 --> 00:10:51,870 where if you remember our discussions and the readings, 163 00:10:51,870 --> 00:10:54,150 I wanna know where are the fixed points, if any? 164 00:10:54,150 --> 00:10:57,300 What are the nullclines and isoclines? 165 00:10:57,300 --> 00:10:59,700 You'll see both terms, they mean the same thing, right? 166 00:10:59,700 --> 00:11:04,560 Null, because at least one derivative is zero, 167 00:11:04,560 --> 00:11:07,620 so null along these lines, or iso, 168 00:11:07,620 --> 00:11:10,320 because when a derivative is null, that means 169 00:11:10,320 --> 00:11:13,920 that the associated quantity doesn't change, 170 00:11:13,920 --> 00:11:17,587 and therefore, that quantity remains the same, so iso 171 00:11:17,587 --> 00:11:22,380 among that line, so either nullclines and isoclines. 172 00:11:24,177 --> 00:11:26,700 And to get both fixed points in all those lines, 173 00:11:26,700 --> 00:11:29,620 the first step is in solving 174 00:11:35,820 --> 00:11:40,820 N1 dot equals zero and N2 dot equals zero. 175 00:11:45,000 --> 00:11:48,573 I'll let you do some of the math. 176 00:11:50,010 --> 00:11:53,703 We'll see like, very quickly that we have, 177 00:11:55,800 --> 00:12:00,510 thinking about how to write this, but we have if N1, 178 00:12:00,510 --> 00:12:02,253 let me put it like this. 179 00:12:05,100 --> 00:12:05,933 I don't like it. 180 00:12:08,490 --> 00:12:11,340 Let's call it N1 star for the first equilibrium. 181 00:12:11,340 --> 00:12:14,940 If I have N1 equals zero, N1 dot is equal to zero. 182 00:12:14,940 --> 00:12:17,400 If there are no fish in the sea, nothing can happen to fish. 183 00:12:17,400 --> 00:12:18,450 They're not gonna reproduce, 184 00:12:18,450 --> 00:12:21,120 and they're not gonna die, right? 185 00:12:21,120 --> 00:12:24,123 Similarly, N2 star is equal to zero, 186 00:12:26,550 --> 00:12:29,850 but we also have N1 star star. 187 00:12:29,850 --> 00:12:33,690 Let's just call it that for the the second solution, 188 00:12:33,690 --> 00:12:36,753 which is K1 minus alpha two N2, 189 00:12:39,300 --> 00:12:42,270 and similarly, since our system is so symmetric, really, 190 00:12:42,270 --> 00:12:44,400 we know we don't even have to do the math, 191 00:12:44,400 --> 00:12:49,080 that K2 minus alpha one N1 is also gonna be the solution 192 00:12:49,080 --> 00:12:51,663 for the N2 dots equation. 193 00:12:56,130 --> 00:12:59,446 And here really, what we want to do is some more algebra, 194 00:12:59,446 --> 00:13:02,463 because we have, and I should highlight it, 195 00:13:04,205 --> 00:13:07,857 N1 is a function of N2, and N2 is a function of N1, right? 196 00:13:10,350 --> 00:13:12,270 And here, the tricks will always be the same. 197 00:13:12,270 --> 00:13:15,963 I mean, you've solved system of equations before in algebra, 198 00:13:18,180 --> 00:13:20,130 but it might have been a long time ago. 199 00:13:21,840 --> 00:13:25,710 So the key trick to remember, essentially, you want to take 200 00:13:25,710 --> 00:13:28,710 either the solution for N1 or N2 201 00:13:28,710 --> 00:13:30,270 and inject it into the other. 202 00:13:30,270 --> 00:13:35,010 So I can take this whole expression here, and replace N1 203 00:13:35,010 --> 00:13:37,530 by the right hand side of the equation for N1, 204 00:13:37,530 --> 00:13:40,431 and then solve for N2, that's gonna give me N2, 205 00:13:40,431 --> 00:13:42,420 and I can do the same with N2 and solve for N1, 206 00:13:42,420 --> 00:13:46,680 and that's gonna give me sort of the solutions, 207 00:13:46,680 --> 00:13:48,090 not as a function of each other, 208 00:13:48,090 --> 00:13:51,063 but as a function of my parameters only. 209 00:13:55,440 --> 00:14:00,440 So I can do a very quick example. 210 00:14:01,590 --> 00:14:06,590 So we have N1 star star equal to K1 minus alpha two N2, 211 00:14:10,950 --> 00:14:15,950 and then if I go and replace my expression for N2, 212 00:14:19,350 --> 00:14:23,310 I get minus alpha two K2, two minuses, 213 00:14:23,310 --> 00:14:28,310 so I get plus alpha one or alpha two alpha one N2. 214 00:14:41,827 --> 00:14:43,350 I'm confused. 215 00:14:43,350 --> 00:14:45,993 I had alpha two times alpha one N1, okay. 216 00:14:47,280 --> 00:14:51,300 So now you see I have an N1 on the left hand side 217 00:14:51,300 --> 00:14:52,313 and N1 on the rightmost hand side, 218 00:14:53,870 --> 00:14:55,140 so I can put them together, 219 00:14:55,140 --> 00:15:00,140 N1 one minus alpha two alpha one equal 220 00:15:01,890 --> 00:15:06,890 to K1 minus alpha two K2, and that gives me 221 00:15:07,320 --> 00:15:12,320 N1 star star equals K1 minus alpha two K2 222 00:15:13,860 --> 00:15:17,583 over one minus alpha two alpha one. 223 00:15:18,420 --> 00:15:20,820 All right, then the key part here, 224 00:15:20,820 --> 00:15:25,780 and what I'm circling is that we now have the solution 225 00:15:27,000 --> 00:15:30,300 for N1 an equilibrium point, 226 00:15:30,300 --> 00:15:35,300 or N1 star star as a function of only the parameters. 227 00:15:37,560 --> 00:15:40,200 Now, what's a little tricky with this solution is that 228 00:15:40,200 --> 00:15:42,960 it doesn't have to be physical, 229 00:15:42,960 --> 00:15:45,000 it doesn't have to be real, in a way, 230 00:15:45,000 --> 00:15:50,000 because there's nothing stopping these parameters 231 00:15:51,622 --> 00:15:54,000 from being negative, for example. 232 00:15:54,000 --> 00:15:57,540 Alpha two times K2 can be bigger than K1. 233 00:15:57,540 --> 00:16:00,630 So this equilibrium point can be outside 234 00:16:00,630 --> 00:16:03,360 of the physical reality of my model. 235 00:16:03,360 --> 00:16:05,520 N1 star star could be minus 20, 236 00:16:05,520 --> 00:16:06,870 and that doesn't make any sense, 237 00:16:06,870 --> 00:16:09,423 because I can't have minus 20 fish in the sea. 238 00:16:12,150 --> 00:16:13,080 So that's why, you know, 239 00:16:13,080 --> 00:16:16,500 equilibrium point alone really don't tell us 240 00:16:16,500 --> 00:16:17,853 the whole story. 241 00:16:22,110 --> 00:16:25,320 We have to look at what their value is, 242 00:16:25,320 --> 00:16:28,533 and we also have to look at the flows around them, 243 00:16:31,020 --> 00:16:32,640 and we did do a little bit of that 244 00:16:32,640 --> 00:16:35,550 in the case of discrete system, right? 245 00:16:35,550 --> 00:16:37,833 Looking at flow diagrams, 246 00:16:40,350 --> 00:16:43,053 and I'd like to do the same thing here. 247 00:16:46,230 --> 00:16:50,400 So I'll draw three things that can happen here, right? 248 00:16:50,400 --> 00:16:54,913 So the space in which our model happens is, 249 00:17:01,170 --> 00:17:03,570 this is gonna get messy, so I'm gonna use two colors 250 00:17:03,570 --> 00:17:05,790 for the two dimensions of my space. 251 00:17:05,790 --> 00:17:09,693 So I'm gonna have N2 and N1, 252 00:17:15,420 --> 00:17:18,300 so they both have to be greater than zero, right? 253 00:17:18,300 --> 00:17:22,943 And I also know that N1 will never be greater than K1, 254 00:17:24,900 --> 00:17:27,363 and N2 shouldn't be greater than K2, 255 00:17:28,980 --> 00:17:30,780 but really, at least they should be positive, 256 00:17:30,780 --> 00:17:33,183 so I can draw my space in this way. 257 00:17:34,560 --> 00:17:37,443 Then what my solutions are giving me, 258 00:17:38,820 --> 00:17:43,050 especially if you go back, so the N1 star star N2 star star, 259 00:17:43,050 --> 00:17:45,150 what they're giving you are the fixed points. 260 00:17:45,150 --> 00:17:50,150 The previous solution, these equation here, 261 00:17:51,540 --> 00:17:53,820 what they're giving you are lines, right? 262 00:17:53,820 --> 00:17:58,820 So for each of these equation, if you know the value of N1, 263 00:18:00,240 --> 00:18:04,320 then you know the value of N2 264 00:18:04,320 --> 00:18:07,620 such that the derivative of N2 is zero. 265 00:18:07,620 --> 00:18:12,607 So these really are your nullclines or isoclines, 266 00:18:23,052 --> 00:18:26,469 and then these here are our fixed points, 267 00:18:31,200 --> 00:18:33,300 'cause we also have, remember we also have 268 00:18:33,300 --> 00:18:37,233 N1 equal to zero, N2 equal to zero as a fixed point. 269 00:18:41,730 --> 00:18:46,730 Okay, so we can go ahead and draw some of these lines. 270 00:18:53,280 --> 00:18:55,530 So I wish I had them all on the same page, 271 00:18:55,530 --> 00:19:00,530 so let me just copy that, and while I'll do that, 272 00:19:00,900 --> 00:19:02,460 I'll just highlight if you are getting 273 00:19:02,460 --> 00:19:06,873 a little confused here, hopefully it's because of me. 274 00:19:08,880 --> 00:19:11,333 This is nothing magical, right? 275 00:19:16,740 --> 00:19:19,710 Like, the two lines I just copied pasted here are 276 00:19:19,710 --> 00:19:24,710 really just, you know, Y equal or X equal, or no, 277 00:19:24,780 --> 00:19:28,683 Y equal A times X plus B, like, equations for lines, 278 00:19:31,890 --> 00:19:35,010 and that's what we want to draw in this space. 279 00:19:35,010 --> 00:19:38,010 So here, I'm just gonna highlight for myself 280 00:19:38,010 --> 00:19:39,873 this is the form of my fixed point, 281 00:19:45,450 --> 00:19:47,760 and then this is my nullclines. 282 00:19:54,256 --> 00:19:59,256 Okay, so when N1 is equal to zero, I'm looking at here, 283 00:20:01,380 --> 00:20:04,440 let's say N2 is gonna be equal to K2, 284 00:20:04,440 --> 00:20:08,083 so my nullcline is gonna start here at K2. 285 00:20:12,000 --> 00:20:17,000 And then when N1 is equal to K2 over alpha one, 286 00:20:17,940 --> 00:20:20,640 if I replace that here, the alpha one cancel out, 287 00:20:20,640 --> 00:20:25,020 I get K2 minus K2, that's gonna give me zero as well, 288 00:20:25,020 --> 00:20:29,973 so here, I'm gonna go down to K2 over alpha one. 289 00:20:31,050 --> 00:20:32,160 And I know I have a line, 290 00:20:32,160 --> 00:20:37,160 because it's a simple A times X plus B sort of equation, 291 00:20:38,130 --> 00:20:39,080 so I get this line. 292 00:20:40,890 --> 00:20:42,480 Then you can look at your derivative. 293 00:20:42,480 --> 00:20:46,473 What happens if N2 is just below this value, 294 00:20:48,030 --> 00:20:52,260 and here, I'll plug it in, we get positive value. 295 00:20:52,260 --> 00:20:57,260 So we're not at zero if we're below this line, 296 00:20:57,300 --> 00:20:59,640 'cause this line is where we're at zero, and then we can ask 297 00:20:59,640 --> 00:21:03,960 if I'm below it, was my derivative positive or negative? 298 00:21:03,960 --> 00:21:05,733 And it's positive if we're below, 299 00:21:07,290 --> 00:21:09,213 and it's negative if we're above. 300 00:21:10,410 --> 00:21:12,120 So this is just a matter of like, 301 00:21:12,120 --> 00:21:14,460 putting the values back in the differential equation 302 00:21:14,460 --> 00:21:16,910 and looking at whether it's positive or negative. 303 00:21:18,924 --> 00:21:21,673 Then we can do the same thing for N1, 304 00:21:24,120 --> 00:21:26,400 we're gonna get a K1 here. 305 00:21:26,400 --> 00:21:31,400 If N2 is equal to zero, we're gonna get a K1 over alpha two, 306 00:21:38,730 --> 00:21:40,413 and then we get a line like this. 307 00:21:47,580 --> 00:21:50,583 And again, we can look at our derivative, and we'll see N1, 308 00:21:51,630 --> 00:21:55,593 so we're now gonna look at horizontal derivative, 309 00:21:59,490 --> 00:22:02,160 'cause as one is our horizontal dimension, 310 00:22:02,160 --> 00:22:04,653 and it's gonna be positive if we're to the left, 311 00:22:05,910 --> 00:22:09,617 and negative if we're to the right, right? 312 00:22:11,190 --> 00:22:14,940 So I'm drawing my arrows, when I'm drawing arrows 313 00:22:14,940 --> 00:22:16,440 for the N2 in that equations, 314 00:22:16,440 --> 00:22:18,090 I know I'm looking at up down, 315 00:22:18,090 --> 00:22:19,920 because that's my vertical dimension. 316 00:22:19,920 --> 00:22:21,393 That's the choice I've made. 317 00:22:24,810 --> 00:22:27,360 And when I'm looking at N1 dot, whether it's positive 318 00:22:27,360 --> 00:22:29,670 or negative, I'm drawing an arrow that's gonna be 319 00:22:29,670 --> 00:22:33,003 to the right or to the left, and that's my flow, right? 320 00:22:35,370 --> 00:22:38,640 So often what I like to do is just draw 321 00:22:38,640 --> 00:22:41,313 the resulting general flow like this. 322 00:22:45,180 --> 00:22:50,180 And so if I start, the question then is like, 323 00:22:51,780 --> 00:22:54,480 if I start anywhere in this flow map, right? 324 00:22:54,480 --> 00:22:56,450 I could start here, I could start here, 325 00:22:56,450 --> 00:22:59,850 I could start here, and so on, I sort of then have an idea 326 00:22:59,850 --> 00:23:02,130 that if I start in the top right regions, 327 00:23:02,130 --> 00:23:06,000 I'll start by going to the left and down, 328 00:23:06,000 --> 00:23:10,500 so both species are overpopulated, and they both decrease. 329 00:23:10,500 --> 00:23:15,120 If I'm in this middle region, species N2 is overpopulated, 330 00:23:15,120 --> 00:23:18,090 and it's gonna decrease, but species N1 is underpopulated 331 00:23:18,090 --> 00:23:19,860 and it's gonna increase, and if I start 332 00:23:19,860 --> 00:23:23,070 in the bottom left corner, they both increase. 333 00:23:23,070 --> 00:23:26,490 But overall, I'm just gonna get trajectories, 334 00:23:26,490 --> 00:23:30,330 and let me try to do dotted lines that are gonna go 335 00:23:30,330 --> 00:23:33,243 through this middle region, or want to. 336 00:23:35,760 --> 00:23:38,410 That's actually not quite right in this case, whoops. 337 00:23:42,390 --> 00:23:44,823 Oops, having a hard time here. 338 00:23:52,500 --> 00:23:57,380 And then where I'm actually gonna end up in this case is 339 00:23:58,830 --> 00:24:02,230 something, is really that 340 00:24:03,240 --> 00:24:07,050 the red arrow is only gonna decrease in size 341 00:24:07,050 --> 00:24:10,140 and get closer to zero as you get closer to the red line. 342 00:24:10,140 --> 00:24:12,303 So even if I start here, let's say, 343 00:24:13,680 --> 00:24:17,403 and both of my species decrease, and I go in this direction, 344 00:24:19,140 --> 00:24:21,667 the blue arrow, and I might be tempted to say like, 345 00:24:21,667 --> 00:24:24,120 "Can I get in a situation where N2 wins?" 346 00:24:24,120 --> 00:24:25,470 And I'm not gonna draw a circle, 347 00:24:25,470 --> 00:24:27,753 because I actually won't get there. 348 00:24:31,179 --> 00:24:35,790 Can I get to a situation where N2 wins and N1 goes to zero? 349 00:24:35,790 --> 00:24:38,790 Well, the red line is so far below, so as I get closer here, 350 00:24:38,790 --> 00:24:41,250 my blue arrow is gonna start slowing down, 351 00:24:41,250 --> 00:24:45,990 so the decrease in N1 is gonna get slower and slower, 352 00:24:45,990 --> 00:24:50,073 so eventually, I know that the red arrow is gonna dominate, 353 00:24:51,030 --> 00:24:52,590 and I'm gonna start going down 354 00:24:52,590 --> 00:24:54,903 in this regime where now I end up here. 355 00:24:58,770 --> 00:25:00,420 So you can play these games. 356 00:25:00,420 --> 00:25:03,390 Here, the key point is really that the blue line is on top, 357 00:25:03,390 --> 00:25:07,050 which, you know, tells us that K1 is greater than K2, 358 00:25:07,050 --> 00:25:09,480 for example, or that K1 over alpha two, 359 00:25:09,480 --> 00:25:12,180 which is the key thing, is greater than K2. 360 00:25:12,180 --> 00:25:14,683 So if the blue line is on top in this case, 361 00:25:14,683 --> 00:25:19,050 we will end up in our fixed point over here where N1 wins. 362 00:25:19,050 --> 00:25:21,210 So this is, I've made my flow chart messy now, 363 00:25:21,210 --> 00:25:23,520 but this is a winner take call situation 364 00:25:23,520 --> 00:25:24,760 where N1 is gonna win 365 00:25:26,460 --> 00:25:28,500 But that's not like a property of the system. 366 00:25:28,500 --> 00:25:31,050 That's a property of how I drew my lines. 367 00:25:31,050 --> 00:25:34,920 I chose a K2 when I drew this here, and I chose a K1 368 00:25:34,920 --> 00:25:37,920 and an alpha two when I put this point here. 369 00:25:37,920 --> 00:25:39,360 You can switch your parameters 370 00:25:39,360 --> 00:25:42,060 such that those lines are not the same, right? 371 00:25:42,060 --> 00:25:45,600 And that's the key point is that you look at your solution 372 00:25:45,600 --> 00:25:49,740 for your fixed points, for example, and you see that this, 373 00:25:49,740 --> 00:25:53,610 I'm gonna circle it in red, or highlight it actually, 374 00:25:53,610 --> 00:25:56,700 you see that this combination of parameter is important. 375 00:25:56,700 --> 00:26:00,723 Is K1 greater than alpha two times K2, 376 00:26:01,710 --> 00:26:03,753 or is it smaller, right? 377 00:26:05,221 --> 00:26:08,520 Or you look at some solutions for the nullclines, 378 00:26:08,520 --> 00:26:10,740 and eventually, you get an intuition 379 00:26:10,740 --> 00:26:12,750 for what are the important parameters, 380 00:26:12,750 --> 00:26:15,420 'cause when I drew those line, I had to decide, right? 381 00:26:15,420 --> 00:26:17,280 As soon as I put my second line in, 382 00:26:17,280 --> 00:26:21,033 I had to decide is K1 greater than K2 over alpha one? 383 00:26:23,430 --> 00:26:27,633 And I made a decision, so I can make the different decision. 384 00:26:38,319 --> 00:26:41,370 So my first line is still gonna be the same. 385 00:26:41,370 --> 00:26:45,123 When nothing else is in the full diagram, it doesn't matter. 386 00:26:46,110 --> 00:26:49,413 My first line, which still there, 387 00:26:51,780 --> 00:26:53,400 but I could have made a different decision, 388 00:26:53,400 --> 00:26:56,550 and I could have said actually, 389 00:26:56,550 --> 00:27:01,550 I'm gonna put my K1 smaller than K2 over alpha one, 390 00:27:06,030 --> 00:27:09,003 then my K1 over alpha two is gonna end up somewhere here, 391 00:27:14,790 --> 00:27:17,883 and then I can look at my derivatives again. 392 00:27:19,920 --> 00:27:23,880 I still have a regime where everyone is underpopulated, 393 00:27:23,880 --> 00:27:25,083 and everything goes up. 394 00:27:30,630 --> 00:27:32,220 So here, like, the flows are the same. 395 00:27:32,220 --> 00:27:37,220 If I'm below the red line, I go up. 396 00:27:38,310 --> 00:27:40,290 If I'm to the left of the blue line, I go right. 397 00:27:40,290 --> 00:27:42,480 If I'm to the right of the blue line, I go left. 398 00:27:42,480 --> 00:27:44,910 That's the definition of the line, right? 399 00:27:44,910 --> 00:27:46,620 It's like, where the derivative is zero, 400 00:27:46,620 --> 00:27:49,083 so that's where it switches sign. 401 00:27:50,070 --> 00:27:53,223 So here, I'm just redrawing the same thing I did before, 402 00:27:55,885 --> 00:27:58,980 but the flow is combined in a different way now, 403 00:27:58,980 --> 00:28:03,720 where I can like, imagine what my trajectories would be, 404 00:28:03,720 --> 00:28:05,220 and now I'm gonna end up here, 405 00:28:06,450 --> 00:28:08,450 so my fixed point is gonna be over here. 406 00:28:17,209 --> 00:28:18,570 So I'm still in a winner takes all, 407 00:28:18,570 --> 00:28:20,460 but now species two is winning. 408 00:28:20,460 --> 00:28:22,200 I'll do a last case. 409 00:28:22,200 --> 00:28:25,350 So there are fourth ways to draw this diagram, 410 00:28:25,350 --> 00:28:28,233 one of them is that for you in assignment. 411 00:28:31,763 --> 00:28:33,780 So the other decision that I made, 412 00:28:33,780 --> 00:28:35,343 and you might have noticed it, 413 00:28:37,650 --> 00:28:41,330 so when I have N2 here, and I have N1 here, 414 00:28:46,800 --> 00:28:49,200 so I still have my first line, 415 00:28:49,200 --> 00:28:52,233 which was from K2 to K2 over alpha one, 416 00:28:55,110 --> 00:28:58,943 so I'm drawing something similar to the last case, right? 417 00:29:04,650 --> 00:29:07,233 And I have a K1 that's here, 418 00:29:08,850 --> 00:29:11,103 and then I have a K1 over alpha two. 419 00:29:12,090 --> 00:29:15,210 Because K1 was small, I sort of decided earlier, 420 00:29:15,210 --> 00:29:18,240 well, K1 over alpha two is gonna be like, somewhere here. 421 00:29:18,240 --> 00:29:19,073 It doesn't have to be. 422 00:29:19,073 --> 00:29:24,020 Alpha one, or alpha two, keep getting confused, 423 00:29:26,820 --> 00:29:29,220 can itself be small, 424 00:29:29,220 --> 00:29:33,243 so my K1 over alpha two might actually be higher than K2, 425 00:29:35,370 --> 00:29:36,963 and all my lines cross. 426 00:29:38,910 --> 00:29:40,530 Now, I still have the same thing. 427 00:29:40,530 --> 00:29:42,870 If I'm below the red line, I go up. 428 00:29:42,870 --> 00:29:46,100 If I'm to the left of the blue line, I go right. 429 00:29:46,100 --> 00:29:48,603 So I get a total flow here, that's good. 430 00:29:50,580 --> 00:29:54,870 Here, I go down still, right? 431 00:29:54,870 --> 00:29:56,103 So I go here. 432 00:29:58,500 --> 00:30:03,087 Here, I go down, oops, terrible arrow, and left, 433 00:30:05,250 --> 00:30:09,833 so I go here, and here, I go up, oops, 434 00:30:13,980 --> 00:30:17,973 up and right, so I go here. 435 00:30:19,380 --> 00:30:21,270 This one is kind of an easy one. 436 00:30:21,270 --> 00:30:25,710 All my flows here, my black arrows, all roads lead to Rome, 437 00:30:28,121 --> 00:30:31,473 (speaking foreign language), as we say in French. (chuckles) 438 00:30:32,640 --> 00:30:35,310 And we get this fixed point in the middle, 439 00:30:35,310 --> 00:30:38,343 where now we can get coexistence of those species, 440 00:30:39,240 --> 00:30:42,513 and our general fixed point is gonna work now, 441 00:30:43,500 --> 00:30:45,753 and give us this value here. 442 00:30:47,790 --> 00:30:50,610 And there's a fourth case that I'm not gonna draw, 443 00:30:50,610 --> 00:30:53,160 but that you can draw, which is a little more interesting. 444 00:30:53,160 --> 00:30:54,090 So I'm sorry to leave 445 00:30:54,090 --> 00:30:56,580 the more interesting one to assignment, 446 00:30:56,580 --> 00:31:00,513 but it's good to to go through these flow charts and.