1 00:00:00,750 --> 00:00:02,550 GILBERT STRANG: OK. 2 00:00:02,550 --> 00:00:05,950 We're still talking about first order differential equations 3 00:00:05,950 --> 00:00:08,290 with a dy dt. 4 00:00:08,290 --> 00:00:16,070 And there is still a gross term proportional to the balance. 5 00:00:16,070 --> 00:00:21,410 This might be the interest that's added on to y. 6 00:00:21,410 --> 00:00:26,525 And then there is input, a source term, 7 00:00:26,525 --> 00:00:30,610 of deposits being made all the time. 8 00:00:30,610 --> 00:00:33,380 So I'm looking to solve that differential equation. 9 00:00:33,380 --> 00:00:35,830 And this is the best possible function 10 00:00:35,830 --> 00:00:37,190 for differential equations. 11 00:00:37,190 --> 00:00:38,650 Exponentials. 12 00:00:38,650 --> 00:00:42,590 Because the derivative of exponential is exponential. 13 00:00:42,590 --> 00:00:45,960 It's just easiest to work with. 14 00:00:45,960 --> 00:00:50,310 And the output, the solution is called 15 00:00:50,310 --> 00:00:52,170 the exponential response. 16 00:00:52,170 --> 00:00:56,840 That word response says what comes out when e to the st 17 00:00:56,840 --> 00:00:57,880 goes in. 18 00:00:57,880 --> 00:01:04,310 And as before, we have some starting deposit, y of 0. 19 00:01:04,310 --> 00:01:06,920 Initial condition at time 0. 20 00:01:06,920 --> 00:01:07,710 OK. 21 00:01:07,710 --> 00:01:13,600 Here is the key point, that with this nice source function, 22 00:01:13,600 --> 00:01:18,570 the solution, or one solution, a particular solution, 23 00:01:18,570 --> 00:01:24,040 will be just a multiple of e to the st. So all I have to do 24 00:01:24,040 --> 00:01:28,250 is find that number, capital Y, and I've got a solution 25 00:01:28,250 --> 00:01:29,560 to that equation. 26 00:01:29,560 --> 00:01:30,460 How do I do it? 27 00:01:30,460 --> 00:01:33,770 Substitute this into the equation 28 00:01:33,770 --> 00:01:37,450 and solve for Y. So let's do that. 29 00:01:37,450 --> 00:01:41,180 The derivative of this, the derivative of exponential 30 00:01:41,180 --> 00:01:43,250 will bring down a factor s. 31 00:01:43,250 --> 00:01:49,210 So there'll be a ys e to the st from the derivative. 32 00:01:49,210 --> 00:01:52,365 And that will have to equal a times Y 33 00:01:52,365 --> 00:01:59,300 e to the st, plus the source term e to the st. good? 34 00:01:59,300 --> 00:02:01,280 I just substituted it in. 35 00:02:01,280 --> 00:02:06,220 Now, the nice thing, I cancel, I divide by e 36 00:02:06,220 --> 00:02:08,660 to the st, which is never 0. 37 00:02:08,660 --> 00:02:12,970 So I divide by-- factor out e to the st, factor that out. 38 00:02:12,970 --> 00:02:15,140 It just leaves me with a 1. 39 00:02:15,140 --> 00:02:19,950 So I have Y times s, Y times a, plus 1. 40 00:02:19,950 --> 00:02:22,700 So let me write that equation so you see it. 41 00:02:22,700 --> 00:02:29,070 That's just s minus a times Y is 1. 42 00:02:29,070 --> 00:02:29,810 Right? 43 00:02:29,810 --> 00:02:34,050 I took a times Y and put it on the left side of the equation. 44 00:02:34,050 --> 00:02:37,250 So I've discovered the exponential response. 45 00:02:37,250 --> 00:02:41,180 1 over s minus a. 46 00:02:41,180 --> 00:02:41,900 OK. 47 00:02:41,900 --> 00:02:45,050 So I have a solution to the equation. 48 00:02:45,050 --> 00:02:47,840 That's not the end, because that solution won't 49 00:02:47,840 --> 00:02:51,250 match the initial condition. 50 00:02:51,250 --> 00:02:53,300 So how do I match an initial condition? 51 00:02:53,300 --> 00:02:56,110 What I've found is a particular solution, 52 00:02:56,110 --> 00:03:00,620 and I need also the null solution, the homogeneous 53 00:03:00,620 --> 00:03:01,490 solution. 54 00:03:01,490 --> 00:03:11,490 So the full solution, y of t, is this Y particular. 55 00:03:11,490 --> 00:03:14,350 So capital Y, I now know is that. 56 00:03:14,350 --> 00:03:18,610 So I have an e to the st over-- I'm 57 00:03:18,610 --> 00:03:23,520 putting in Y, the right value of Y. 58 00:03:23,520 --> 00:03:27,150 So that's the particular solution that I've found. 59 00:03:27,150 --> 00:03:31,200 Plus any null solution. 60 00:03:31,200 --> 00:03:35,220 So remember, the null solutions, that term is gone. 61 00:03:35,220 --> 00:03:36,920 So the source is 0. 62 00:03:36,920 --> 00:03:38,600 That's why the word null. 63 00:03:38,600 --> 00:03:43,320 So I'm looking for the solution to dy dt equal ay. 64 00:03:43,320 --> 00:03:46,595 And the solutions to dy dt equal ay 65 00:03:46,595 --> 00:03:52,930 are e to the at, times any number. 66 00:03:52,930 --> 00:03:55,680 Because the right-hand side is 0 now. 67 00:03:55,680 --> 00:03:59,100 This is y particular. 68 00:03:59,100 --> 00:04:00,370 And let me write that. 69 00:04:00,370 --> 00:04:07,540 This is y particular, and this is y null, or y homogeneous. 70 00:04:07,540 --> 00:04:09,180 So that's the general solution. 71 00:04:09,180 --> 00:04:13,400 The complete solution has that form. 72 00:04:13,400 --> 00:04:17,940 And now I can match y equal y of 0 at t equal 0. 73 00:04:17,940 --> 00:04:25,770 I put in t equal 0, I get y of 0 equals-- t equals 0, this is 1. 74 00:04:25,770 --> 00:04:28,770 So 1 over s minus a. 75 00:04:28,770 --> 00:04:34,360 And when t is 0, this is 1, so plus C. 76 00:04:34,360 --> 00:04:36,120 So now I know what C is. 77 00:04:36,120 --> 00:04:42,880 And notice, C is not just y of 0, as sometimes in the past. 78 00:04:42,880 --> 00:04:46,750 C is y of 0 minus this. 79 00:04:46,750 --> 00:04:49,930 Are you ready now for the complete solution 80 00:04:49,930 --> 00:04:53,200 with satisfying the initial conditions? 81 00:04:53,200 --> 00:04:57,930 So now I'm going to-- this in the correct form. 82 00:04:57,930 --> 00:05:01,520 This tells me what C has to be. 83 00:05:01,520 --> 00:05:04,050 So I put it in and I have this solution. 84 00:05:04,050 --> 00:05:13,820 y of t is e the st over s minus a, the easy one, plus C. Now, 85 00:05:13,820 --> 00:05:20,330 C is y of 0 minus 1 over s minus a. 86 00:05:20,330 --> 00:05:22,380 That's what we needed. 87 00:05:22,380 --> 00:05:25,520 Times e to the at. 88 00:05:25,520 --> 00:05:27,550 That's our answer. 89 00:05:27,550 --> 00:05:28,890 That's our answer. 90 00:05:28,890 --> 00:05:31,800 I can make it look a little nicer. 91 00:05:31,800 --> 00:05:32,990 I want to. 92 00:05:32,990 --> 00:05:37,460 I want to separate out the y of 0 part, the part that's just 93 00:05:37,460 --> 00:05:40,950 growing from the initial condition, 94 00:05:40,950 --> 00:05:45,650 from the part that is coming from the source term. 95 00:05:45,650 --> 00:05:49,980 So I just want to put that together with this. 96 00:05:49,980 --> 00:05:54,640 So I have the same s minus a below. 97 00:05:54,640 --> 00:05:57,830 Here is an e to the st above. 98 00:05:57,830 --> 00:06:05,260 And I have a minus, that 1 over s minus a, times e to the at. 99 00:06:05,260 --> 00:06:11,400 And then I have this term, which is growing. 100 00:06:14,150 --> 00:06:16,120 Well, this is really good. 101 00:06:16,120 --> 00:06:20,540 This is the part growing out of the initial deposit. 102 00:06:20,540 --> 00:06:28,470 I'm using, again, money in a bank with additional deposits, 103 00:06:28,470 --> 00:06:32,500 e to the st. And this is the part coming 104 00:06:32,500 --> 00:06:35,160 from those later deposits. 105 00:06:35,160 --> 00:06:38,770 Initial part, and the part coming from there. 106 00:06:38,770 --> 00:06:43,260 So this is, again, a null solution. 107 00:06:43,260 --> 00:06:45,110 A multiple of e to the at. 108 00:06:45,110 --> 00:06:47,400 This is another particular solution. 109 00:06:47,400 --> 00:06:50,370 Remember, there isn't just one particular solution. 110 00:06:50,370 --> 00:06:53,000 Any solution is a particular solution. 111 00:06:53,000 --> 00:06:57,470 And this is, I call that the very particular solution. 112 00:06:57,470 --> 00:07:04,080 Because it has the nice property that it starts from 0. 113 00:07:04,080 --> 00:07:08,440 So a t equals 0, that's 1 minus 1, I'm getting 0. 114 00:07:08,440 --> 00:07:12,500 So I would call that y vp. 115 00:07:12,500 --> 00:07:17,800 I'll introduce those letters, not standard, for that part. 116 00:07:17,800 --> 00:07:23,080 And then y homogeneous, or y null, is this part. 117 00:07:23,080 --> 00:07:24,420 OK. 118 00:07:24,420 --> 00:07:26,550 Problem solved. 119 00:07:26,550 --> 00:07:32,010 The exponential grows in this way, 120 00:07:32,010 --> 00:07:36,800 and the initial condition grows directly that way. 121 00:07:36,800 --> 00:07:37,300 OK. 122 00:07:39,960 --> 00:07:42,960 The problem is solved with one exception. 123 00:07:42,960 --> 00:07:46,430 And now I have to take a minute with that exception. 124 00:07:46,430 --> 00:07:52,920 The exception is the formula breaks down if s equals a. 125 00:07:52,920 --> 00:07:56,370 If s equals a, I'm dividing by 0. 126 00:07:56,370 --> 00:07:59,310 My formula is falling apart. 127 00:07:59,310 --> 00:08:01,530 And that's the case of resonance. 128 00:08:01,530 --> 00:08:11,470 So let me put over here, s equal a. 129 00:08:11,470 --> 00:08:14,010 That resonance. 130 00:08:14,010 --> 00:08:18,160 And we always have to expect that that's 131 00:08:18,160 --> 00:08:22,450 a possibility, that we're putting money 132 00:08:22,450 --> 00:08:28,570 with the same exponential as the natural growth of the money, 133 00:08:28,570 --> 00:08:31,380 or whatever we're growing. 134 00:08:31,380 --> 00:08:35,970 And our formula has to change. 135 00:08:35,970 --> 00:08:37,640 You what you might say it's infinite, 136 00:08:37,640 --> 00:08:40,240 because I'm dividing by 0. 137 00:08:40,240 --> 00:08:45,680 But notice the part above is also 0. 138 00:08:45,680 --> 00:08:52,230 If s equals a, this is e to the st minus e to the at. 139 00:08:52,230 --> 00:08:53,930 Those are the same. 140 00:08:53,930 --> 00:08:57,680 So I have a 0/0 situation. 141 00:08:57,680 --> 00:09:01,980 My formula is breaking down, but it isn't dying. 142 00:09:01,980 --> 00:09:04,240 It needs more thinking. 143 00:09:04,240 --> 00:09:07,850 The case of resonance needs to-- I 144 00:09:07,850 --> 00:09:14,030 have to understand what this is when s equals a. 145 00:09:14,030 --> 00:09:16,370 Let me tell you what it is. 146 00:09:16,370 --> 00:09:19,780 And then show you why. 147 00:09:19,780 --> 00:09:22,530 So this is the case s equal a. 148 00:09:22,530 --> 00:09:33,810 So if s equal a, then y very particular plus y null space. 149 00:09:33,810 --> 00:09:37,610 So it's this very particular solution that 150 00:09:37,610 --> 00:09:39,580 has to have a different form. 151 00:09:39,580 --> 00:09:41,620 And here's the form it gets. 152 00:09:41,620 --> 00:09:43,670 A factor t appears. 153 00:09:43,670 --> 00:09:48,090 You just learn to recognize resonance by that factor t. 154 00:09:48,090 --> 00:09:52,700 So it'll be a t e to the at. 155 00:09:52,700 --> 00:09:55,950 a is the same as s now, so s doesn't appear. 156 00:09:55,950 --> 00:10:00,510 So that's the solution which starts from 0, 157 00:10:00,510 --> 00:10:04,040 and it comes from the input. 158 00:10:04,040 --> 00:10:13,330 And this is the part that starts from y of 0 and grows. 159 00:10:13,330 --> 00:10:17,330 So you see, eventually, this is going to be the bigger one. 160 00:10:17,330 --> 00:10:20,880 The resonant case, it grows like e 161 00:10:20,880 --> 00:10:25,950 to the at, with that little bit extra growth of t. 162 00:10:25,950 --> 00:10:26,920 OK. 163 00:10:26,920 --> 00:10:30,490 So now I have a solution in that special case 164 00:10:30,490 --> 00:10:33,264 also, when s equals a. 165 00:10:33,264 --> 00:10:34,530 All right. 166 00:10:34,530 --> 00:10:39,820 Do you want to know how this comes out of this 167 00:10:39,820 --> 00:10:43,390 as s approaches a? 168 00:10:43,390 --> 00:10:46,500 Let me take three minutes to tell you about that. 169 00:10:46,500 --> 00:10:48,410 It's L'Hopital's rule. 170 00:10:48,410 --> 00:10:51,380 Do you remember from calculus, 0/0, 171 00:10:51,380 --> 00:10:55,200 the way to deal with that was called by this guy's name, 172 00:10:55,200 --> 00:10:55,700 L'Hopital? 173 00:10:58,980 --> 00:11:00,460 Hospital, I guess. 174 00:11:00,460 --> 00:11:04,350 Probably hospital in French. 175 00:11:04,350 --> 00:11:10,820 And you this 0/0 expression. 176 00:11:10,820 --> 00:11:12,520 It's a ratio of two things. 177 00:11:12,520 --> 00:11:17,160 The top going to 0 when s goes to a, 178 00:11:17,160 --> 00:11:18,770 because these become the same. 179 00:11:18,770 --> 00:11:22,190 The bottom going to 0 when s goes to a. 180 00:11:22,190 --> 00:11:25,000 And the right-- L'Hopital's cool idea 181 00:11:25,000 --> 00:11:28,830 was you get the same answer if you take 182 00:11:28,830 --> 00:11:32,640 the ratio of the derivatives. 183 00:11:32,640 --> 00:11:35,570 So L'Hopital says, take the ratio 184 00:11:35,570 --> 00:11:46,050 of the derivatives of the top minus the derivative-- oh, 185 00:11:46,050 --> 00:11:50,170 divided by the derivative of the bottom. 186 00:11:50,170 --> 00:11:54,401 And then let s go to a in the end. 187 00:11:54,401 --> 00:11:54,900 OK. 188 00:11:54,900 --> 00:11:56,750 So I have to take this derivative, 189 00:11:56,750 --> 00:12:00,230 I have to take that derivative with respect to s. 190 00:12:00,230 --> 00:12:03,880 Often in calculus, it was an x. 191 00:12:03,880 --> 00:12:04,800 Here it's an s. 192 00:12:04,800 --> 00:12:06,070 No big deal. 193 00:12:06,070 --> 00:12:09,960 So that derivative is-- You take the derivative 194 00:12:09,960 --> 00:12:11,190 with respect to s. 195 00:12:11,190 --> 00:12:14,240 We'll bring down-- ah, here comes the t. 196 00:12:14,240 --> 00:12:20,310 The derivative of s is t e to the st. 197 00:12:20,310 --> 00:12:24,680 And the derivative of this thing is 1. 198 00:12:24,680 --> 00:12:27,540 And now I let s go to a. 199 00:12:27,540 --> 00:12:30,740 Well, it's easy to let s go to a now. 200 00:12:30,740 --> 00:12:36,390 This thing approaches that. 201 00:12:36,390 --> 00:12:39,890 I have the t e of the at in the limit. 202 00:12:39,890 --> 00:12:43,660 So L'Hopital's rule was the reason 203 00:12:43,660 --> 00:12:47,390 behind this formula for resonance. 204 00:12:47,390 --> 00:12:52,720 But again, I emphasize that expect a factor t 205 00:12:52,720 --> 00:12:55,620 when you have this resonance. 206 00:12:55,620 --> 00:12:56,170 OK. 207 00:12:56,170 --> 00:13:00,880 So that's the solution for the best possible right-hand side 208 00:13:00,880 --> 00:13:04,480 e to the st. Well, maybe the best is a constant. 209 00:13:04,480 --> 00:13:07,110 Second simplest is an exponential. 210 00:13:07,110 --> 00:13:10,910 Next, will come sines and cosigns. 211 00:13:10,910 --> 00:13:12,660 That's the next lecture. 212 00:13:12,660 --> 00:13:14,210 Thanks.