1 00:00:01,570 --> 00:00:02,590 PROFESSOR: OK. 2 00:00:02,590 --> 00:00:07,790 Finally, I'm going to solve this first order linear differential 3 00:00:07,790 --> 00:00:15,490 equation with a formula that works for any source term. 4 00:00:15,490 --> 00:00:19,700 So we've solved it for specific, nice, special source terms 5 00:00:19,700 --> 00:00:21,870 I'll remember later. 6 00:00:21,870 --> 00:00:24,430 But now we want a formula for the solution 7 00:00:24,430 --> 00:00:27,130 to that equation, period. 8 00:00:27,130 --> 00:00:32,220 And we want to understand the formula. 9 00:00:32,220 --> 00:00:34,680 So now, write the formula down, and then 10 00:00:34,680 --> 00:00:37,140 let's see why it's right. 11 00:00:37,140 --> 00:00:39,610 And then of course, we could put it into the equation 12 00:00:39,610 --> 00:00:42,000 and confirm that it's right. 13 00:00:42,000 --> 00:00:44,240 OK the formula is going to be-- this 14 00:00:44,240 --> 00:00:49,140 is the big formula you could say, for first order 15 00:00:49,140 --> 00:00:51,170 linear equations. 16 00:00:51,170 --> 00:00:52,740 So y of t. 17 00:00:52,740 --> 00:00:59,960 First we have the result of the amount-- I'm 18 00:00:59,960 --> 00:01:04,040 thinking of this as balance. 19 00:01:04,040 --> 00:01:09,130 The money in the bank is why it's increasing at this rate, 20 00:01:09,130 --> 00:01:11,840 because of interest being added. 21 00:01:11,840 --> 00:01:15,620 And it's increasing at this rate because of new deposits 22 00:01:15,620 --> 00:01:16,930 being added. 23 00:01:16,930 --> 00:01:21,220 And oh, maybe I should say about those deposits, 24 00:01:21,220 --> 00:01:26,600 I'm not thinking of like deposit once a year, or once a month, 25 00:01:26,600 --> 00:01:30,170 or once a minute, even. 26 00:01:30,170 --> 00:01:31,710 Deposit continuously. 27 00:01:31,710 --> 00:01:33,990 We're talking differential equations here. 28 00:01:33,990 --> 00:01:37,770 Time is running all-- the clock is always running. 29 00:01:37,770 --> 00:01:40,700 So you're-- theoretically, at least-- 30 00:01:40,700 --> 00:01:46,490 you're depositing at a rate of so much per second, 31 00:01:46,490 --> 00:01:47,890 all the time. 32 00:01:47,890 --> 00:01:49,740 OK. 33 00:01:49,740 --> 00:01:54,380 So first, the y of 0, that's a once in a lifetime 34 00:01:54,380 --> 00:01:56,610 deposit to start the account. 35 00:01:56,610 --> 00:02:02,780 And it grows, as we know, with the interest rate 36 00:02:02,780 --> 00:02:05,570 as the exponent. 37 00:02:05,570 --> 00:02:10,720 The question is-- so that's the null solution that 38 00:02:10,720 --> 00:02:14,540 matches the initial condition. 39 00:02:14,540 --> 00:02:18,050 No solution, because there are no deposits here. 40 00:02:18,050 --> 00:02:22,160 This solves this part of the equation, the null part. 41 00:02:22,160 --> 00:02:26,140 But now I want to add in a particular solution, 42 00:02:26,140 --> 00:02:28,100 and it'll be the particular solution 43 00:02:28,100 --> 00:02:30,500 that matches the deposits. 44 00:02:30,500 --> 00:02:34,100 And I want to understand this formula. 45 00:02:34,100 --> 00:02:35,780 So here's the formula. 46 00:02:35,780 --> 00:02:41,870 I'm going to-- the deposits each deposit goes in at time T, 47 00:02:41,870 --> 00:02:46,000 goes in at some time, and then it grows. 48 00:02:46,000 --> 00:02:48,050 Once you've made the deposit, it's 49 00:02:48,050 --> 00:02:50,960 going to grow exponentially. 50 00:02:50,960 --> 00:02:53,980 With [INAUDIBLE], it will grow over the remaining time. 51 00:02:53,980 --> 00:02:55,500 So here's the formula. 52 00:02:55,500 --> 00:03:02,340 You make deposits at any time, s, between s equal 0 and s 53 00:03:02,340 --> 00:03:03,760 equal t. 54 00:03:03,760 --> 00:03:06,210 So s is the running clock. 55 00:03:06,210 --> 00:03:12,030 T is the-- we look at our account and see what's in it. 56 00:03:12,030 --> 00:03:15,360 And this deposit is made at time s, 57 00:03:15,360 --> 00:03:19,670 and then it grows over the remaining time, from s to t. 58 00:03:19,670 --> 00:03:27,410 So it grows by a factor e to the a, t minus s. 59 00:03:27,410 --> 00:03:29,190 That's the key. 60 00:03:29,190 --> 00:03:34,000 And now we add up all those deposits with their growth. 61 00:03:34,000 --> 00:03:40,800 So that addition for continuous time addition is integration. 62 00:03:40,800 --> 00:03:42,960 That's the whole idea of the integral, 63 00:03:42,960 --> 00:03:46,360 is add up continuously. 64 00:03:46,360 --> 00:03:50,105 So there's my formula that I'm hoping you will admire. 65 00:03:52,800 --> 00:03:58,290 The no solution that grows out of the initial condition. 66 00:03:58,290 --> 00:04:06,040 The particular solution that grows out of the source term, 67 00:04:06,040 --> 00:04:07,330 q. 68 00:04:07,330 --> 00:04:11,430 Of course I've used q of t all the way. 69 00:04:11,430 --> 00:04:13,110 Here I call it q of s. 70 00:04:13,110 --> 00:04:15,980 I have to introduce a integration variable 71 00:04:15,980 --> 00:04:21,019 s, which goes from the start of these deposits 72 00:04:21,019 --> 00:04:24,960 until the current time, and grows like that. 73 00:04:24,960 --> 00:04:27,020 So that's the formula. 74 00:04:27,020 --> 00:04:30,510 I could put a big box around it. 75 00:04:30,510 --> 00:04:34,110 Let me start a box anyway. 76 00:04:34,110 --> 00:04:36,840 I could check that it's correct. 77 00:04:36,840 --> 00:04:39,420 But I hope you see why it's right. 78 00:04:39,420 --> 00:04:47,510 And let me make some comment on the examples of q 79 00:04:47,510 --> 00:04:49,710 where we didn't have this formula. 80 00:04:49,710 --> 00:04:52,010 We just went for it directly. 81 00:04:52,010 --> 00:04:56,220 So we started with, these were special. 82 00:04:56,220 --> 00:05:00,340 Especially nice, you could say. 83 00:05:00,340 --> 00:05:05,910 Q of t equal a constant. 84 00:05:05,910 --> 00:05:08,860 That was the first video. 85 00:05:08,860 --> 00:05:14,500 Then we did q of t equal an exponential. 86 00:05:14,500 --> 00:05:16,840 That was the second one. 87 00:05:16,840 --> 00:05:21,340 Then we did-- so and then we found the exponential response. 88 00:05:21,340 --> 00:05:24,800 Then I did oscillation. 89 00:05:24,800 --> 00:05:33,610 Cosine-- well, let me put it over here-- cosine of omega t. 90 00:05:33,610 --> 00:05:35,830 Or plus sine of omega t. 91 00:05:35,830 --> 00:05:38,210 You remember, those two kind of had to come together. 92 00:05:38,210 --> 00:05:41,220 We couldn't stick with cosines alone, 93 00:05:41,220 --> 00:05:43,980 because the derivative of a cosine 94 00:05:43,980 --> 00:05:48,430 here would give us a sign, so signs got into the picture. 95 00:05:48,430 --> 00:05:49,965 So we found the formula for that, 96 00:05:49,965 --> 00:05:51,310 that took a little more work. 97 00:05:51,310 --> 00:05:55,570 And in fact we did it by a real method and a complex method. 98 00:05:55,570 --> 00:05:59,170 And, now are there any other nice functions in calculus? 99 00:05:59,170 --> 00:06:04,100 Well the next video, I'm going to tell you 100 00:06:04,100 --> 00:06:08,290 about two more functions that I think are very nice. 101 00:06:08,290 --> 00:06:09,185 Step function. 102 00:06:12,530 --> 00:06:16,370 So the deposit-- we don't make any deposits up 103 00:06:16,370 --> 00:06:18,780 until some time, and then we start, 104 00:06:18,780 --> 00:06:21,850 then we go change to constant. 105 00:06:21,850 --> 00:06:25,740 So the step function is 0 and then a constant. 106 00:06:25,740 --> 00:06:31,630 And also-- and this is the especially interesting one-- 107 00:06:31,630 --> 00:06:34,560 a delta function. 108 00:06:34,560 --> 00:06:37,350 And what is a delta function? 109 00:06:37,350 --> 00:06:41,540 Which doesn't always come into the basic differential 110 00:06:41,540 --> 00:06:44,000 equations, course, but it belongs there. 111 00:06:44,000 --> 00:06:48,540 Because in a model of reality, a delta function 112 00:06:48,540 --> 00:06:51,070 is like a golf club hitting a golf ball. 113 00:06:51,070 --> 00:06:53,340 In an instant something happened. 114 00:06:53,340 --> 00:06:56,730 Or a baseball bat hitting a baseball. 115 00:06:56,730 --> 00:06:59,730 It gives it an instant velocity. 116 00:06:59,730 --> 00:07:01,730 It's an impulse. 117 00:07:01,730 --> 00:07:07,310 So step function is like a light switch off and then on. 118 00:07:07,310 --> 00:07:11,680 Delta function is all in one instant, an impulse, 119 00:07:11,680 --> 00:07:13,620 and you'll see that coming. 120 00:07:13,620 --> 00:07:17,800 And then those are the-- oh, and maybe I 121 00:07:17,800 --> 00:07:22,080 could include-- let's see, if I've got a constant, 122 00:07:22,080 --> 00:07:26,410 maybe should include t, t squared, so on. 123 00:07:26,410 --> 00:07:28,830 Powers of t are not too bad. 124 00:07:28,830 --> 00:07:29,780 We could get-- 125 00:07:29,780 --> 00:07:34,610 So for all of these special ones that I call the nice functions. 126 00:07:34,610 --> 00:07:39,190 For all of those-- and we could multiply t times e to the st, 127 00:07:39,190 --> 00:07:40,360 that would still be nice. 128 00:07:40,360 --> 00:07:42,520 And we could have a simple formula. 129 00:07:42,520 --> 00:07:47,080 Those are the ones that give simple, direct, interesting, 130 00:07:47,080 --> 00:07:49,050 answers in themselves. 131 00:07:49,050 --> 00:07:52,960 And this is the one that gives the general answer. 132 00:07:52,960 --> 00:07:59,650 And if I put q be any one of those in this general formula, 133 00:07:59,650 --> 00:08:02,400 I'll get the special one. 134 00:08:02,400 --> 00:08:06,370 You can see how if I put a constant in there, 135 00:08:06,370 --> 00:08:09,960 that will be exactly what we found 136 00:08:09,960 --> 00:08:15,980 at the very, very beginning for the response to a constant. 137 00:08:15,980 --> 00:08:16,590 Right. 138 00:08:16,590 --> 00:08:18,765 So this is the general expression. 139 00:08:21,800 --> 00:08:25,890 I feel I should say more about it. 140 00:08:25,890 --> 00:08:29,550 I guess I should say, two more things I want to add 141 00:08:29,550 --> 00:08:31,240 about this general formula. 142 00:08:31,240 --> 00:08:34,610 One is, I should check that it's correct. 143 00:08:34,610 --> 00:08:37,450 But I hope you saw, it had to be right. 144 00:08:37,450 --> 00:08:42,059 This input went in, it grew, everything was linear. 145 00:08:42,059 --> 00:08:46,390 So I could just add the separate growth, separate results, 146 00:08:46,390 --> 00:08:52,780 to find out what the balance was at the final time, t. 147 00:08:52,780 --> 00:08:54,810 But still, I can check it. 148 00:08:54,810 --> 00:08:56,330 And I can derive it. 149 00:08:59,580 --> 00:09:03,770 That step is always often done by what's 150 00:09:03,770 --> 00:09:06,930 called an integrating factor. 151 00:09:06,930 --> 00:09:09,480 So there will be a quick video that 152 00:09:09,480 --> 00:09:14,950 shows you how an integrating factor leads to that formula. 153 00:09:14,950 --> 00:09:18,690 Right in this video, I'm just saying I 154 00:09:18,690 --> 00:09:22,080 was led to it by common sense. 155 00:09:22,080 --> 00:09:23,800 But I can check that it's correct. 156 00:09:23,800 --> 00:09:26,060 So let me check that it's correct. 157 00:09:26,060 --> 00:09:26,620 OK. 158 00:09:26,620 --> 00:09:28,460 This part I can see is correct. 159 00:09:28,460 --> 00:09:30,470 So I'd like to work with that one 160 00:09:30,470 --> 00:09:33,240 and show that that is a particular solution 161 00:09:33,240 --> 00:09:34,750 to the differential equation. 162 00:09:34,750 --> 00:09:36,100 Can I do that? 163 00:09:36,100 --> 00:09:44,070 I want to show that this-- I'm looking now 164 00:09:44,070 --> 00:09:51,155 at this y particular, and I'll factor out the e to the at, 165 00:09:51,155 --> 00:09:53,200 because it doesn't depend on s. 166 00:09:53,200 --> 00:09:55,730 It's not involved in the integration. 167 00:09:55,730 --> 00:10:01,990 So this is in the integral from s equals 0 to s equal t of e 168 00:10:01,990 --> 00:10:04,730 to the minus as, that has an s in it. 169 00:10:04,730 --> 00:10:08,150 Q of s, ds. 170 00:10:08,150 --> 00:10:11,980 This is all the stuff that depends on what time 171 00:10:11,980 --> 00:10:14,630 the deposit was made, time s. 172 00:10:14,630 --> 00:10:19,380 And what time we're looking at the balance, the later time, t. 173 00:10:19,380 --> 00:10:21,350 OK. 174 00:10:21,350 --> 00:10:25,670 This is a product of one term times another term. 175 00:10:25,670 --> 00:10:29,300 And when I put it into the differential equation, 176 00:10:29,300 --> 00:10:31,400 I'll use the product rule. 177 00:10:31,400 --> 00:10:33,900 So the derivative of that product 178 00:10:33,900 --> 00:10:36,690 will have two terms from the product rule. 179 00:10:36,690 --> 00:10:39,560 And those two terms will be-- if all 180 00:10:39,560 --> 00:10:42,580 goes well-- will be the two terms in the differential 181 00:10:42,580 --> 00:10:43,580 equation. 182 00:10:43,580 --> 00:10:47,140 So can I take the derivative of this by the product rule? 183 00:10:47,140 --> 00:10:49,990 So I take the derivative of the first thing, 184 00:10:49,990 --> 00:11:00,730 so now I'm computing dy, dt, by ordinary calculus. 185 00:11:00,730 --> 00:11:08,610 So the derivative of that is a e the at times the second term. 186 00:11:08,610 --> 00:11:11,580 That's just ay. 187 00:11:11,580 --> 00:11:14,310 That's a times the y that we had before. 188 00:11:14,310 --> 00:11:18,080 Because the derivative of e to the at, by the chain rule, 189 00:11:18,080 --> 00:11:20,440 brings down an a, and we have that. 190 00:11:20,440 --> 00:11:23,610 But now the product rule says also I 191 00:11:23,610 --> 00:11:32,040 must take that term times the derivative of this term. 192 00:11:32,040 --> 00:11:34,260 And that looks messier. 193 00:11:34,260 --> 00:11:39,740 What's the derivative of that function? 194 00:11:39,740 --> 00:11:42,290 It's a function of t. 195 00:11:42,290 --> 00:11:44,430 But it's an integral. 196 00:11:44,430 --> 00:11:45,480 It's a function of t. 197 00:11:45,480 --> 00:11:47,920 What's it's time derivative? 198 00:11:47,920 --> 00:11:51,760 That's the last piece of the product rule. 199 00:11:51,760 --> 00:11:54,460 Well, look what it is. 200 00:11:54,460 --> 00:11:58,440 It's the integral up to time t of some function. 201 00:11:58,440 --> 00:12:00,410 And the fundamental theorem of calculus 202 00:12:00,410 --> 00:12:05,380 says that the derivative of the integral 203 00:12:05,380 --> 00:12:08,320 is the original function, right? 204 00:12:08,320 --> 00:12:12,780 So the derivative of this integral 205 00:12:12,780 --> 00:12:16,870 is the original function that we integrated at time t. 206 00:12:16,870 --> 00:12:20,580 So it's e to the minus a t cubed t. 207 00:12:26,570 --> 00:12:29,870 That's the second term from the product rule. 208 00:12:29,870 --> 00:12:34,540 And OK, this was the ay, perfectly. 209 00:12:34,540 --> 00:12:36,030 And what do I have here? 210 00:12:36,030 --> 00:12:39,070 E to the at cancels e to the minus at, 211 00:12:39,070 --> 00:12:40,980 and it's the source term q of t. 212 00:12:40,980 --> 00:12:46,540 So I have ay plus q of t, the correct right hand side 213 00:12:46,540 --> 00:12:48,510 for the differential equation. 214 00:12:48,510 --> 00:12:55,320 So this, that formula, let me bring it down once more, 215 00:12:55,320 --> 00:13:02,740 is sort of the climax of this beginning of the videos 216 00:13:02,740 --> 00:13:06,740 to see first order linear differential equations. 217 00:13:06,740 --> 00:13:10,130 So what's coming now are step and delta function. 218 00:13:10,130 --> 00:13:12,930 I just want to speak about those. 219 00:13:12,930 --> 00:13:15,580 And that takes a few minutes separately. 220 00:13:15,580 --> 00:13:21,810 And then another step will be to allow the interest 221 00:13:21,810 --> 00:13:23,810 rate to change. 222 00:13:23,810 --> 00:13:26,940 We made our problem simple because we've 223 00:13:26,940 --> 00:13:29,110 kept a constant interest rate. 224 00:13:29,110 --> 00:13:31,350 So I'll let the interest rate change. 225 00:13:31,350 --> 00:13:34,380 And then after that comes the real step 226 00:13:34,380 --> 00:13:36,900 to non-linear equations. 227 00:13:36,900 --> 00:13:41,090 So delta functions, varying interest rate, 228 00:13:41,090 --> 00:13:46,080 and then non-linear equations. 229 00:13:46,080 --> 00:13:48,290 And then on to second order equations 230 00:13:48,290 --> 00:13:51,800 and all the rest of the theory of differential equations. 231 00:13:51,800 --> 00:13:52,300 Good. 232 00:13:52,300 --> 00:13:54,130 Thank you.