1 00:00:00,820 --> 00:00:02,250 GILBERT STRANG: OK? 2 00:00:02,250 --> 00:00:06,420 Now, finally, a nonlinear equation. 3 00:00:06,420 --> 00:00:11,470 Growth, but it's-- the growth is cut off by competition-- 4 00:00:11,470 --> 00:00:13,940 slowed down my competition. 5 00:00:13,940 --> 00:00:16,100 Let me show you the equation. 6 00:00:16,100 --> 00:00:19,960 In a way, it's the simplest nonlinear equation 7 00:00:19,960 --> 00:00:21,470 I could think of. 8 00:00:21,470 --> 00:00:24,420 We have the usual dy/dt equal ay. 9 00:00:24,420 --> 00:00:26,275 That would give exponential growth. 10 00:00:26,275 --> 00:00:28,760 The growth would go on forever. 11 00:00:28,760 --> 00:00:32,500 But then, as y gets large-- if we 12 00:00:32,500 --> 00:00:37,630 think of y as the population, so the growth is exponential 13 00:00:37,630 --> 00:00:41,130 when the birth rates higher than the death rate, and we grow. 14 00:00:41,130 --> 00:00:44,170 We have-- and that's what's happening. 15 00:00:44,170 --> 00:00:49,220 But our world population is not growing pure exponentially, 16 00:00:49,220 --> 00:00:50,550 forever. 17 00:00:50,550 --> 00:00:53,970 And this is a simple term, a simple model not, 18 00:00:53,970 --> 00:00:58,370 very accurate, but it's the right place to start. 19 00:00:58,370 --> 00:01:03,040 For competition, when you have too many people, 20 00:01:03,040 --> 00:01:07,560 somehow the multiplying y times y 21 00:01:07,560 --> 00:01:12,110 gives you a number of interactions of all the y 22 00:01:12,110 --> 00:01:14,740 people with themselves. 23 00:01:14,740 --> 00:01:19,270 And those interactions-- that competition slows down 24 00:01:19,270 --> 00:01:24,410 the growth, and so the coefficient there is negative. 25 00:01:24,410 --> 00:01:28,990 We want to solve that non-linear equation and learn from it. 26 00:01:31,900 --> 00:01:37,420 And it's called the logistic equation. 27 00:01:37,420 --> 00:01:41,520 That's-- it's got to be a famous example. 28 00:01:41,520 --> 00:01:49,850 And it has a neat trick that allows you to solve it easily. 29 00:01:49,850 --> 00:01:51,700 Let me show you that trick. 30 00:01:51,700 --> 00:01:58,250 The trick is to let z-- bring in a new z as 1/y. 31 00:02:02,810 --> 00:02:05,530 Then, if I write the equation for z, 32 00:02:05,530 --> 00:02:07,410 it will turn out to be linear. 33 00:02:07,410 --> 00:02:11,450 So you see, I'm always hoping, and here succeeding, 34 00:02:11,450 --> 00:02:16,120 to get back to a simple linear equation. 35 00:02:16,120 --> 00:02:21,120 And this device happens to work for this problem. 36 00:02:21,120 --> 00:02:25,490 We need, in the end, a more systematic way 37 00:02:25,490 --> 00:02:27,490 that would work for other problems, 38 00:02:27,490 --> 00:02:29,850 like there could be some constant term 39 00:02:29,850 --> 00:02:37,120 there from harvesting, from the changing the equation. 40 00:02:37,120 --> 00:02:38,990 Let me go with this one. 41 00:02:38,990 --> 00:02:42,610 So what's the equation for z then, dz/dt. 42 00:02:46,810 --> 00:02:50,730 The derivative of that, that's y to the minus 1 43 00:02:50,730 --> 00:02:58,400 is minus 1 y to the minus 2 times dy/dt, right? 44 00:03:02,010 --> 00:03:05,120 The derivative of y the minus 1 is minus 1, 45 00:03:05,120 --> 00:03:09,940 y to the minus 2 times the derivative of dy/dt. 46 00:03:09,940 --> 00:03:14,555 But now dy/dt is ay minus by squared. 47 00:03:21,880 --> 00:03:24,450 And what do I have? 48 00:03:24,450 --> 00:03:33,460 I've got a, with a minus, ay over y squared. 49 00:03:33,460 --> 00:03:35,520 That will be z. 50 00:03:35,520 --> 00:03:38,910 So that's minus az. 51 00:03:38,910 --> 00:03:41,916 Minus minus giving me a plus b. 52 00:03:41,916 --> 00:03:46,040 y squared over y squared is just a constant. 53 00:03:46,040 --> 00:03:49,170 Look at the equation for z now. 54 00:03:49,170 --> 00:03:51,260 Couldn't be better. 55 00:03:51,260 --> 00:03:58,170 dz/dt is minus az and plus a constant. 56 00:03:58,170 --> 00:04:01,290 And we know the solution to that equation. 57 00:04:01,290 --> 00:04:04,240 So I can write down the solution to that equation. 58 00:04:04,240 --> 00:04:06,160 And I will. 59 00:04:06,160 --> 00:04:11,240 Then, I just take y to be 1 over that solution. 60 00:04:11,240 --> 00:04:13,860 Maybe, I'll just write y straight ahead. 61 00:04:13,860 --> 00:04:21,470 I'll just write the answer y, which is 1/z. 62 00:04:21,470 --> 00:04:24,570 And z is the solution to this equation. 63 00:04:24,570 --> 00:04:25,600 And let me see. 64 00:04:25,600 --> 00:04:27,710 So I'm going to have an exponential, 65 00:04:27,710 --> 00:04:32,190 but it's going to be-- the exponential e to the minus at 66 00:04:32,190 --> 00:04:35,400 is going to show up in z. 67 00:04:38,337 --> 00:04:39,420 And they'll be more there. 68 00:04:42,450 --> 00:04:44,110 It will show up in z. 69 00:04:44,110 --> 00:04:48,030 And then when I do 1/z to get back to y, 70 00:04:48,030 --> 00:04:50,660 that exponential is going into the denominator. 71 00:04:50,660 --> 00:04:51,910 That's what's new. 72 00:04:51,910 --> 00:04:53,370 That's what's new. 73 00:04:53,370 --> 00:04:55,620 Let me get the whole thing correct. 74 00:04:55,620 --> 00:04:59,270 I have a a. 75 00:04:59,270 --> 00:05:04,390 Otherwise, these are constants d here and b goes there. 76 00:05:04,390 --> 00:05:10,155 And I just have to tell you what the d is there. 77 00:05:10,155 --> 00:05:13,665 d is going to involve the initial value, y of 0. 78 00:05:13,665 --> 00:05:18,680 At time 0, we start somewhere, y of 0. 79 00:05:18,680 --> 00:05:20,350 And we'll begin to grow. 80 00:05:24,850 --> 00:05:27,030 We'll grow. 81 00:05:27,030 --> 00:05:33,050 But with the slowing down term keeping us back. 82 00:05:33,050 --> 00:05:35,520 And, in the end, it can't grow forever 83 00:05:35,520 --> 00:05:39,470 because that term becomes bigger than that one. 84 00:05:39,470 --> 00:05:44,200 If y went on and on increasing, then it can't happen. 85 00:05:44,200 --> 00:05:47,360 So it really is-- it can only increase 86 00:05:47,360 --> 00:05:49,780 while this is positive, and that's 87 00:05:49,780 --> 00:05:52,170 only positive below that line. 88 00:05:52,170 --> 00:05:53,900 Here's what the curve does. 89 00:05:53,900 --> 00:05:57,740 It goes upward, but then it has to-- it 90 00:05:57,740 --> 00:06:02,780 can't cross that line because above that line, 91 00:06:02,780 --> 00:06:07,090 for big Y-- above that line for big Y 92 00:06:07,090 --> 00:06:12,950 this negative term means that the slope is negative. 93 00:06:12,950 --> 00:06:19,380 If I started with a big number, I'd have to come down. 94 00:06:19,380 --> 00:06:22,030 But can I just draw that picture? 95 00:06:22,030 --> 00:06:26,250 But it's really between here-- between these lines 96 00:06:26,250 --> 00:06:31,660 that I'm thinking the world population is. 97 00:06:31,660 --> 00:06:36,390 So it started way back at some time minus infinity. 98 00:06:36,390 --> 00:06:38,830 And it-- whatever. 99 00:06:38,830 --> 00:06:40,700 It came up to time 0. 100 00:06:40,700 --> 00:06:45,210 This is t equals 0, starting population. 101 00:06:45,210 --> 00:06:49,930 And, of course, t equals 0 could be the year 2000. 102 00:06:49,930 --> 00:06:53,500 We can move the time axis as we want. 103 00:06:53,500 --> 00:06:56,660 So t equals 0 might be the year 2000. 104 00:06:56,660 --> 00:06:59,240 Our population is still increasing, 105 00:06:59,240 --> 00:07:01,450 but it won't go on forever. 106 00:07:01,450 --> 00:07:06,050 And it will slow down and approach this limit a/b-- 107 00:07:06,050 --> 00:07:06,920 approaches a/b. 108 00:07:11,420 --> 00:07:16,220 So that number a/b is totally special for this equation. 109 00:07:16,220 --> 00:07:19,350 And let me think about that part. 110 00:07:21,940 --> 00:07:24,490 And we give a name to this curve. 111 00:07:24,490 --> 00:07:27,440 It's often called a logistic curve. 112 00:07:27,440 --> 00:07:29,270 That's OK. 113 00:07:29,270 --> 00:07:32,260 But I like the name S curve. 114 00:07:32,260 --> 00:07:34,810 It's an S curve. 115 00:07:34,810 --> 00:07:38,000 In some way-- or a Sigmoidal curve. 116 00:07:38,000 --> 00:07:45,540 In some way, it looks a bit like an S, a very stretched out S. 117 00:07:45,540 --> 00:07:50,490 So that-- and you see why-- do you-- just 118 00:07:50,490 --> 00:07:52,300 takes like-- look here. 119 00:07:52,300 --> 00:07:58,640 As t goes to infinity, this becomes 0. 120 00:07:58,640 --> 00:08:01,690 When t gets large, this exponential is gone. 121 00:08:01,690 --> 00:08:05,470 And I just have a or b at the limit. 122 00:08:05,470 --> 00:08:13,810 When t is minus infinity, way back at starting time-- 123 00:08:13,810 --> 00:08:17,220 when t is minus infinity, that's a giant number. 124 00:08:17,220 --> 00:08:19,470 This is-- I'm dividing by a giant number. 125 00:08:19,470 --> 00:08:20,740 I'm at 0. 126 00:08:20,740 --> 00:08:26,820 So way back at time minus infinity, it started from 0. 127 00:08:26,820 --> 00:08:32,020 Those two possibilities , y equals 0 and y equal a/b, 128 00:08:32,020 --> 00:08:37,340 are the key things to see for this equation. 129 00:08:37,340 --> 00:08:39,110 So I'm going to take a few minutes 130 00:08:39,110 --> 00:08:42,400 to see where do those come in. 131 00:08:42,400 --> 00:08:46,860 Those are steady states. 132 00:08:46,860 --> 00:08:50,480 Let me use that word and show you what I mean. 133 00:08:50,480 --> 00:09:01,250 Steady states, critical points, for my equation dy/dt. 134 00:09:01,250 --> 00:09:04,530 Let me write the logistic equation again. 135 00:09:07,480 --> 00:09:13,970 A steady state is a value of y where the derivative is 0. 136 00:09:13,970 --> 00:09:14,900 Nothing happens. 137 00:09:14,900 --> 00:09:16,520 It just sits there. 138 00:09:16,520 --> 00:09:19,250 So if that is 0-- so a steady state-- 139 00:09:19,250 --> 00:09:22,840 let me use those capital Y for a steady state. 140 00:09:22,840 --> 00:09:25,370 Those are just numbers. 141 00:09:25,370 --> 00:09:34,130 They are the numbers where this is 0, ay minus by squared is 0. 142 00:09:34,130 --> 00:09:40,670 You see that if I start out at y, 143 00:09:40,670 --> 00:09:44,350 at capital Y, a steady state, that is 0. 144 00:09:44,350 --> 00:09:45,490 The derivative is 0. 145 00:09:45,490 --> 00:09:47,540 I stay there. 146 00:09:47,540 --> 00:09:49,120 And there are two possibilities. 147 00:09:49,120 --> 00:09:54,330 If I start-- this gives me two possibilities, right? 148 00:09:54,330 --> 00:09:56,930 What are the solutions to this equation? 149 00:09:56,930 --> 00:10:02,160 This gives me y equals 0 is one solution clearly. 150 00:10:02,160 --> 00:10:07,150 Or y equals-- let's see. 151 00:10:07,150 --> 00:10:10,676 If this equals that, I could cancel a y. 152 00:10:10,676 --> 00:10:18,030 y would be a/b, exactly the two in the picture. 153 00:10:18,030 --> 00:10:20,740 If I start at 0, I stay at 0. 154 00:10:20,740 --> 00:10:21,690 No population. 155 00:10:21,690 --> 00:10:23,200 Nothing can happen. 156 00:10:23,200 --> 00:10:31,010 But if I move a little away, if I get two people, we grow. 157 00:10:31,010 --> 00:10:35,400 We grow exponentially for awhile, 158 00:10:35,400 --> 00:10:40,100 but then the by squared term takes it-- gets in there, 159 00:10:40,100 --> 00:10:41,570 slows us down. 160 00:10:41,570 --> 00:10:45,930 And we slow down, and we reach this a/b. 161 00:10:45,930 --> 00:10:50,180 If we had started at a/b, we would have stayed at a/b. 162 00:10:50,180 --> 00:10:56,700 So that S curve picture is really 163 00:10:56,700 --> 00:10:58,810 a nice graph of the solution. 164 00:10:58,810 --> 00:11:02,710 Here is the solution at steady state, going nowhere. 165 00:11:02,710 --> 00:11:09,220 There is a solution at steady state with population, 166 00:11:09,220 --> 00:11:13,720 competition, and cooperation are balanced, and nothing happens. 167 00:11:13,720 --> 00:11:22,010 Otherwise, whenever we have S curves, then they don't cross. 168 00:11:22,010 --> 00:11:26,350 Depending where we're-- depending on the initial value, 169 00:11:26,350 --> 00:11:28,710 we'll get beyond one or other of these curves. 170 00:11:28,710 --> 00:11:34,420 And they all go up to that carrying capacity, 171 00:11:34,420 --> 00:11:37,530 that limiting population, a/b. 172 00:11:37,530 --> 00:11:43,850 So the final take home message about this equation 173 00:11:43,850 --> 00:11:51,370 is, as an example of equations with steady states, 174 00:11:51,370 --> 00:11:57,900 this steady state is called unstable 175 00:11:57,900 --> 00:12:03,250 because if we start near y equals 0, we take off. 176 00:12:03,250 --> 00:12:06,120 If we start near y equals 0, we start growing. 177 00:12:06,120 --> 00:12:08,260 We leave that steady state. 178 00:12:08,260 --> 00:12:13,450 This steady state is called stable 179 00:12:13,450 --> 00:12:20,190 because if we're near a/b, we get closer and closer to a/b. 180 00:12:20,190 --> 00:12:22,260 I'll do the example. 181 00:12:25,650 --> 00:12:29,380 This will be one example of a general problem. 182 00:12:29,380 --> 00:12:37,480 dy/dt is some function of y. 183 00:12:37,480 --> 00:12:40,520 It's a right-hand side that depends on y. 184 00:12:40,520 --> 00:12:46,410 That will be our next video, to understand 185 00:12:46,410 --> 00:12:50,400 those equations dy/dt is f of y and notice 186 00:12:50,400 --> 00:12:53,030 that they're not linear. 187 00:12:53,030 --> 00:12:56,210 But we can solve for steady states. 188 00:12:56,210 --> 00:13:00,820 A steady state will be when f at y is 0. 189 00:13:00,820 --> 00:13:02,570 Then, nothing happens. 190 00:13:02,570 --> 00:13:05,140 But is that steady state stable? 191 00:13:05,140 --> 00:13:06,480 Or is it unstable? 192 00:13:06,480 --> 00:13:11,020 That's the crucial thing for all applications. 193 00:13:11,020 --> 00:13:15,480 Are we settling down to something acceptable? 194 00:13:15,480 --> 00:13:19,370 Or are we blowing up to something impossible? 195 00:13:19,370 --> 00:13:21,020 That's the next video. 196 00:13:21,020 --> 00:13:22,750 Thank you.