1 00:00:01,009 --> 00:00:01,800 GILBERT STRANG: OK. 2 00:00:01,800 --> 00:00:06,540 I'm concentrating now on the key question of stability. 3 00:00:06,540 --> 00:00:14,320 Do the solutions approach 0 in the case of linear equations? 4 00:00:14,320 --> 00:00:19,570 Do they approach some constant, some steady state in the case 5 00:00:19,570 --> 00:00:22,120 of non-linear equations? 6 00:00:22,120 --> 00:00:25,550 So today is the beginning of non-linear. 7 00:00:25,550 --> 00:00:28,360 I'll start with one equation. 8 00:00:28,360 --> 00:00:34,810 dy dt is some function of y, not a linear function probably. 9 00:00:34,810 --> 00:00:41,300 And first question, what is a steady state or critical point? 10 00:00:41,300 --> 00:00:43,430 Easy question. 11 00:00:43,430 --> 00:00:47,020 I'm looking at special points capital 12 00:00:47,020 --> 00:00:54,380 Y, where the right-hand side is 0, special points where 13 00:00:54,380 --> 00:00:57,340 the function is 0. 14 00:00:57,340 --> 00:01:04,000 And I'll call those critical points or steady states. 15 00:01:04,000 --> 00:01:04,930 What's the point? 16 00:01:04,930 --> 00:01:10,020 At a critical point, here is the solution. 17 00:01:10,020 --> 00:01:10,950 It's a constant. 18 00:01:10,950 --> 00:01:11,515 It's steady. 19 00:01:15,520 --> 00:01:19,430 I'm just checking here that the equation is satisfied. 20 00:01:19,430 --> 00:01:23,950 The derivative is 0 because it's constant, 21 00:01:23,950 --> 00:01:27,930 and f is 0 because it's a critical point. 22 00:01:27,930 --> 00:01:29,640 So I have 0 equals 0. 23 00:01:29,640 --> 00:01:33,170 The differential equation is perfectly good. 24 00:01:33,170 --> 00:01:39,970 So if I start at a critical point, I stay there. 25 00:01:39,970 --> 00:01:42,770 That's not our central question. 26 00:01:42,770 --> 00:01:46,950 Our key question is, if I start at other points, 27 00:01:46,950 --> 00:01:52,685 do I approach a critical point, or do I go away from it? 28 00:01:52,685 --> 00:01:56,320 Is the critical point stable and attractive, 29 00:01:56,320 --> 00:02:00,840 or is it unstable and repulsive? 30 00:02:00,840 --> 00:02:04,280 So the way to answer that question 31 00:02:04,280 --> 00:02:07,530 is to look at the equation when you're 32 00:02:07,530 --> 00:02:10,199 very near the critical point. 33 00:02:10,199 --> 00:02:14,350 Very near the critical point, we could make the equation linear. 34 00:02:14,350 --> 00:02:18,680 We can linearize the equation, and that's the whole trick. 35 00:02:18,680 --> 00:02:21,870 And I've spoken before, and I'll do it again now 36 00:02:21,870 --> 00:02:23,530 for one equation. 37 00:02:23,530 --> 00:02:27,240 But the real message, the real content 38 00:02:27,240 --> 00:02:32,010 comes with two or three equations. 39 00:02:32,010 --> 00:02:34,780 That's what we see in nature very often, 40 00:02:34,780 --> 00:02:40,990 and we want to know, is the problem stable? 41 00:02:40,990 --> 00:02:41,490 OK. 42 00:02:41,490 --> 00:02:45,250 So what does linearize mean? 43 00:02:45,250 --> 00:02:47,740 Every function is linear if you look at it 44 00:02:47,740 --> 00:02:49,516 through a microscope. 45 00:02:54,570 --> 00:02:58,980 Maybe I should say if you blow it up near y equal Y, 46 00:02:58,980 --> 00:03:00,885 every function is linear. 47 00:03:00,885 --> 00:03:02,015 Here is f of y. 48 00:03:06,040 --> 00:03:08,320 Here it's coming through-- it's a graph 49 00:03:08,320 --> 00:03:10,622 of f of y, whatever it is. 50 00:03:10,622 --> 00:03:14,640 If this we recognize as the point capital Y, 51 00:03:14,640 --> 00:03:17,410 right, that's where the function is 0. 52 00:03:17,410 --> 00:03:24,900 And near that point, my function is almost a straight line. 53 00:03:24,900 --> 00:03:30,500 And the slope of that tangent is the coefficient, 54 00:03:30,500 --> 00:03:33,630 and everything depends on that. 55 00:03:33,630 --> 00:03:37,440 Everything depends on whether the slope is going up like 56 00:03:37,440 --> 00:03:43,650 that-- probably that's going to be unstable-- or coming down. 57 00:03:43,650 --> 00:03:46,330 If it were coming down, then the slope 58 00:03:46,330 --> 00:03:49,240 would be negative at the critical point, 59 00:03:49,240 --> 00:03:51,360 and probably that will be stable. 60 00:03:51,360 --> 00:03:52,040 OK. 61 00:03:52,040 --> 00:03:55,410 So I just have to do a little calculus. 62 00:03:55,410 --> 00:04:00,260 The whole idea of linearizing is the central idea of calculus. 63 00:04:00,260 --> 00:04:04,750 That we have curves, but near a point, 64 00:04:04,750 --> 00:04:10,690 we can pretend-- they are essentially straight if we 65 00:04:10,690 --> 00:04:12,710 focus in, if we zoom in. 66 00:04:12,710 --> 00:04:16,390 So this is a zooming-in problem, linearization. 67 00:04:16,390 --> 00:04:16,980 OK. 68 00:04:16,980 --> 00:04:25,850 So if I zoom in the function at some y. 69 00:04:25,850 --> 00:04:30,850 I'm zooming in around the point capital Y. 70 00:04:30,850 --> 00:04:33,710 But you remember the tangent line 71 00:04:33,710 --> 00:04:40,910 stuff is the function at Y. So little y is 72 00:04:40,910 --> 00:04:43,180 some point close by. 73 00:04:43,180 --> 00:04:46,610 Capital Y is the crossing point. 74 00:04:46,610 --> 00:04:56,870 And this is the y minus Y times the slope-- that's the slope-- 75 00:04:56,870 --> 00:05:06,720 the slope at the critical point there is all that's-- you see 76 00:05:06,720 --> 00:05:09,860 that the right-hand side is linear. 77 00:05:09,860 --> 00:05:12,110 And actually, f of Y is 0. 78 00:05:12,110 --> 00:05:15,100 That's the point. 79 00:05:15,100 --> 00:05:18,810 So that I have just a linear approximation 80 00:05:18,810 --> 00:05:22,180 with that slope and a simple function. 81 00:05:22,180 --> 00:05:23,490 OK. 82 00:05:23,490 --> 00:05:27,590 So I'll use this approximation. 83 00:05:27,590 --> 00:05:31,370 I'll put that into the equation, and then I'll 84 00:05:31,370 --> 00:05:34,620 have a linear equation, which I can easily solve. 85 00:05:34,620 --> 00:05:35,760 Can I do that? 86 00:05:35,760 --> 00:05:41,090 So my plan is, take my differential equation, 87 00:05:41,090 --> 00:05:43,690 look, focus near the steady state, 88 00:05:43,690 --> 00:05:48,060 near the critical point capital Y. Near that point, 89 00:05:48,060 --> 00:05:55,570 this is my good approximation to f, and I'll just use it. 90 00:05:55,570 --> 00:05:58,130 So I plan to use that right away. 91 00:05:58,130 --> 00:05:59,580 So now here's the linearized. 92 00:06:05,820 --> 00:06:13,790 So d by dt of y equals f of y. 93 00:06:13,790 --> 00:06:20,630 But I'm going to do approximately equals this y 94 00:06:20,630 --> 00:06:26,530 minus capital Y times the slope. 95 00:06:26,530 --> 00:06:31,220 So the slope is my coefficient little a 96 00:06:31,220 --> 00:06:34,045 in my first-order linear equation. 97 00:06:34,045 --> 00:06:40,610 So I'm going back to chapter 1 for this linearization 98 00:06:40,610 --> 00:06:42,530 for one equation. 99 00:06:42,530 --> 00:06:48,770 But then the next video is the real thing 100 00:06:48,770 --> 00:06:52,640 by allowing two equations or even three equations. 101 00:06:52,640 --> 00:06:54,570 So we'll make a small start on that, 102 00:06:54,570 --> 00:06:56,530 but it's really the next video. 103 00:06:56,530 --> 00:06:57,260 OK. 104 00:06:57,260 --> 00:06:58,860 So that's the equation. 105 00:06:58,860 --> 00:07:02,620 Now, notice that I could put dy dt 106 00:07:02,620 --> 00:07:05,710 as-- the derivative of that constant 107 00:07:05,710 --> 00:07:08,150 is 0, so I could safely put it there. 108 00:07:08,150 --> 00:07:10,085 So what does this tell me? 109 00:07:10,085 --> 00:07:12,070 Let me call that number a. 110 00:07:14,980 --> 00:07:20,300 So I can solve that equation, and the solution 111 00:07:20,300 --> 00:07:24,740 will be y minus capital Y. It's just linear. 112 00:07:24,740 --> 00:07:28,070 The derivative is the thing itself times a. 113 00:07:28,070 --> 00:07:34,850 It's the pure model of steady growth or steady decay. 114 00:07:34,850 --> 00:07:43,810 y minus Y is, let's say, some e to the at. 115 00:07:43,810 --> 00:07:45,200 Right? 116 00:07:45,200 --> 00:07:50,610 When I have a coefficient in the linear equation ay, 117 00:07:50,610 --> 00:07:52,870 I see it in the exponential. 118 00:07:52,870 --> 00:07:57,840 So a less than 0 is stable. 119 00:08:03,840 --> 00:08:08,840 Because a less than 0, that's negative, 120 00:08:08,840 --> 00:08:12,210 and the exponential drops to 0. 121 00:08:12,210 --> 00:08:15,430 And that tells me that y approaches capital 122 00:08:15,430 --> 00:08:20,200 Y. It goes to the critical point, to the steady state, 123 00:08:20,200 --> 00:08:21,110 and not away. 124 00:08:21,110 --> 00:08:22,520 Example, example. 125 00:08:22,520 --> 00:08:24,880 Let me just take an example that you've 126 00:08:24,880 --> 00:08:33,640 seen before, the logistic equation, where the right side 127 00:08:33,640 --> 00:08:38,020 is, say, 3y minus y squared. 128 00:08:38,020 --> 00:08:38,520 OK. 129 00:08:38,520 --> 00:08:40,659 Not linear. 130 00:08:40,659 --> 00:08:44,470 So I plan to linearize after I find the critical points. 131 00:08:44,470 --> 00:08:47,450 Critical points, this is 0. 132 00:08:47,450 --> 00:08:49,960 That equals 0 at-- I guess there will 133 00:08:49,960 --> 00:08:56,930 be two critical points because I have a second-degree equation. 134 00:08:56,930 --> 00:09:05,900 When that is 0, it could be 0 at y equals 0 or at y equals 3. 135 00:09:05,900 --> 00:09:09,340 So two critical points, and each critical point 136 00:09:09,340 --> 00:09:15,040 has its own linearization, its slope at that critical point. 137 00:09:15,040 --> 00:09:20,670 So you see, if I graph f of y here, 138 00:09:20,670 --> 00:09:29,700 this 3y minus y squared has-- there is 3y minus y squared. 139 00:09:29,700 --> 00:09:32,090 There is one critical point, 0. 140 00:09:32,090 --> 00:09:34,550 There is the other critical point at 3. 141 00:09:34,550 --> 00:09:38,240 Here the slope is positive-- unstable. 142 00:09:38,240 --> 00:09:41,030 Here the slope is negative-- stable. 143 00:09:41,030 --> 00:09:45,060 So this is stable, unstable. 144 00:09:45,060 --> 00:09:49,730 And let me just push through the numbers here. 145 00:09:52,260 --> 00:09:57,790 So the df dy, that's the slope. 146 00:09:57,790 --> 00:10:00,440 So I have to take the derivative of that. 147 00:10:00,440 --> 00:10:02,830 Notice this is not my differential equation. 148 00:10:02,830 --> 00:10:04,880 There is my differential equation. 149 00:10:04,880 --> 00:10:09,530 Here is my linearization step, my computation 150 00:10:09,530 --> 00:10:12,390 of the derivative, the slope. 151 00:10:12,390 --> 00:10:17,570 So the derivative of that is 3 minus 2y, 152 00:10:17,570 --> 00:10:20,690 and I've got two critical points. 153 00:10:20,690 --> 00:10:24,180 At capital Y equal 0, that's 3. 154 00:10:24,180 --> 00:10:29,580 And at capital Y equals 3, it's 3 minus 6, it's minus 3. 155 00:10:29,580 --> 00:10:32,340 Those are the slopes we saw on the picture. 156 00:10:32,340 --> 00:10:35,500 Slope up, the parabola is going up. 157 00:10:35,500 --> 00:10:36,700 Slope down. 158 00:10:36,700 --> 00:10:39,093 So this will correspond to unstable. 159 00:10:43,165 --> 00:10:46,450 So what does it mean for this to be unstable? 160 00:10:46,450 --> 00:10:52,000 It means that the solution Y equals 0, constant 0, 161 00:10:52,000 --> 00:10:55,020 solves the equation, no problem. 162 00:10:55,020 --> 00:10:59,590 If Y stays at 0, it's a perfectly OK solution. 163 00:10:59,590 --> 00:11:00,710 The derivative is 0. 164 00:11:00,710 --> 00:11:02,670 Everything's 0. 165 00:11:02,670 --> 00:11:04,990 But if I move a little away from 0, 166 00:11:04,990 --> 00:11:10,080 if I move a little way from 0, then the 3y minus y 167 00:11:10,080 --> 00:11:12,700 squared, what does it look like? 168 00:11:12,700 --> 00:11:15,320 If I'm moving just a little away from Y 169 00:11:15,320 --> 00:11:18,900 equals 0, away from this unstable point, 170 00:11:18,900 --> 00:11:22,420 y squared will be extremely small. 171 00:11:22,420 --> 00:11:23,690 So it's really 3y. 172 00:11:26,860 --> 00:11:29,920 The y squared will be small near Y equals 0. 173 00:11:29,920 --> 00:11:31,040 Forget that. 174 00:11:31,040 --> 00:11:33,635 We have exponential growth, e to the 3t. 175 00:11:38,930 --> 00:11:43,640 We leave the 0 steady state, and we move on. 176 00:11:43,640 --> 00:11:46,530 Now, eventually we'll move somewhere 177 00:11:46,530 --> 00:11:50,485 near the other steady state. 178 00:11:50,485 --> 00:11:57,510 At capital Y equals 3, the slope of this thing is minus 3, 179 00:11:57,510 --> 00:12:02,090 and the negative one will be the stable point. 180 00:12:02,090 --> 00:12:14,000 So where y minus 3, the distance to the steady state, 181 00:12:14,000 --> 00:12:19,620 the critical point will grow like e to the mi-- well, 182 00:12:19,620 --> 00:12:23,380 will decay, sorry, I said grow, I meant decay-- will decay 183 00:12:23,380 --> 00:12:29,040 like e to the minus 3t because the minus 3 in the slope 184 00:12:29,040 --> 00:12:31,180 is the minus 3 in the exponent. 185 00:12:34,070 --> 00:12:34,710 OK. 186 00:12:34,710 --> 00:12:38,270 That's not rocket science, although it's 187 00:12:38,270 --> 00:12:41,440 pretty important for rockets. 188 00:12:41,440 --> 00:12:43,570 Let me just say what's coming next 189 00:12:43,570 --> 00:12:47,590 and then do it in the follow-up video. 190 00:12:47,590 --> 00:12:59,960 So what's coming next will be two equations, dy dt and dz dt. 191 00:13:03,120 --> 00:13:04,910 I have two things. 192 00:13:04,910 --> 00:13:06,990 y and z, they depend on each other. 193 00:13:06,990 --> 00:13:16,440 So the growth or decay of y is given by some function f, 194 00:13:16,440 --> 00:13:24,330 and this is given by some different function g, so 195 00:13:24,330 --> 00:13:25,050 f and g. 196 00:13:25,050 --> 00:13:29,180 Now, when do I have steady state? 197 00:13:29,180 --> 00:13:30,480 When this is 0. 198 00:13:30,480 --> 00:13:31,520 When they're both 0. 199 00:13:31,520 --> 00:13:33,180 They both have to be 0. 200 00:13:33,180 --> 00:13:36,860 And then dy dt is 0, so y is steady. 201 00:13:36,860 --> 00:13:39,540 dz dt is 0, so z is steady. 202 00:13:39,540 --> 00:13:44,290 So I'm looking for-- I've got two numbers to look for. 203 00:13:44,290 --> 00:13:48,150 And I've got two equations, f of y-- oh, 204 00:13:48,150 --> 00:13:52,370 let me call that capital Y, capital Z-- so those 205 00:13:52,370 --> 00:13:54,740 are numbers now-- equals 0. 206 00:13:54,740 --> 00:14:03,200 So I want to solve-- equals 0, and g of capital Y, capital Z 207 00:14:03,200 --> 00:14:05,630 equals 0. 208 00:14:05,630 --> 00:14:07,170 Yeah, yeah. 209 00:14:07,170 --> 00:14:14,000 So both right-hand sides should be 0, 210 00:14:14,000 --> 00:14:17,080 and then I'm in a steady state. 211 00:14:17,080 --> 00:14:21,360 But this is going to be like more interesting to linearize. 212 00:14:21,360 --> 00:14:25,210 That's really the next video, is how do you linearize? 213 00:14:25,210 --> 00:14:27,560 What does the linearized thing look 214 00:14:27,560 --> 00:14:32,090 like when you have two functions depending on two variables 215 00:14:32,090 --> 00:14:33,490 Y and Z? 216 00:14:33,490 --> 00:14:39,080 You're going to have, we'll see, [? for ?] slopes-- well, 217 00:14:39,080 --> 00:14:40,300 you'll see it. 218 00:14:40,300 --> 00:14:43,340 So this is what's coming. 219 00:14:43,340 --> 00:14:46,970 And we end up with a two-by-two matrix 220 00:14:46,970 --> 00:14:52,990 because we have two equations, two unknowns, and a little more 221 00:14:52,990 --> 00:14:58,960 excitement than the classical single equation, 222 00:14:58,960 --> 00:15:00,920 like a logistic equation. 223 00:15:00,920 --> 00:15:01,420 OK. 224 00:15:01,420 --> 00:15:03,650 Onward to two.