1 00:00:05,796 --> 00:00:06,970 PROFESSOR: Hi everyone. 2 00:00:06,970 --> 00:00:08,720 Welcome back. 3 00:00:08,720 --> 00:00:10,220 So today, we're going to take a look 4 00:00:10,220 --> 00:00:12,510 at first-order linear differential equations 5 00:00:12,510 --> 00:00:14,097 with constant coefficients. 6 00:00:14,097 --> 00:00:16,430 And specifically, we're going to use integrating factors 7 00:00:16,430 --> 00:00:18,220 to solve them. 8 00:00:18,220 --> 00:00:21,150 So the equation that we're going to solve today is x dot plus 9 00:00:21,150 --> 00:00:23,331 k*x equals 1. 10 00:00:23,331 --> 00:00:25,830 And then in part B we're going to change the right-hand side 11 00:00:25,830 --> 00:00:29,240 to e to the minus 5t. 12 00:00:29,240 --> 00:00:32,040 And then in part C, we're asked to use the superposition 13 00:00:32,040 --> 00:00:37,850 principle to solve x dot plus k*x equals 4 plus 7 e 14 00:00:37,850 --> 00:00:40,190 to the minus 5t. 15 00:00:40,190 --> 00:00:42,300 So I'll let you think about this for a moment, 16 00:00:42,300 --> 00:00:43,591 and I'll come back in a second. 17 00:00:56,415 --> 00:00:57,490 Hi, everyone. 18 00:00:57,490 --> 00:00:59,810 Welcome back. 19 00:00:59,810 --> 00:01:04,420 So I should mention that every first-order linear differential 20 00:01:04,420 --> 00:01:07,010 equation, whether it has constant coefficients or not, 21 00:01:07,010 --> 00:01:10,570 can always be solved using an integrating factor. 22 00:01:10,570 --> 00:01:12,820 However, in this case, we have a constant coefficient, 23 00:01:12,820 --> 00:01:14,145 which is particularly nice. 24 00:01:14,145 --> 00:01:15,520 And later on in the course, we're 25 00:01:15,520 --> 00:01:17,970 going to learn some even better ways, or quicker ways, 26 00:01:17,970 --> 00:01:20,600 to solve linear differential equations 27 00:01:20,600 --> 00:01:22,187 with constant coefficients. 28 00:01:22,187 --> 00:01:24,520 But for today, we're asked to use an integrating factor. 29 00:01:28,330 --> 00:01:36,390 So for part A, we have the equation x dot plus k*x equals 30 00:01:36,390 --> 00:01:37,390 1. 31 00:01:37,390 --> 00:01:41,970 And the first step is to compute the integrating factor. 32 00:01:41,970 --> 00:01:48,020 So the integrating factor, which I'll call g of t, 33 00:01:48,020 --> 00:01:50,970 it's always going to be an exponential 34 00:01:50,970 --> 00:01:55,130 of the integral of the function that appears in front of x. 35 00:01:57,720 --> 00:02:00,200 So in this case, the function is just a constant. 36 00:02:00,200 --> 00:02:00,750 It's k. 37 00:02:03,360 --> 00:02:10,860 So we have k*dt, which gives us e to the k*t. 38 00:02:14,640 --> 00:02:16,820 So once we have the integrating factor, 39 00:02:16,820 --> 00:02:20,000 we just multiply our equation through by g of t. 40 00:02:38,910 --> 00:02:44,920 And by construction, what the integrating factor does 41 00:02:44,920 --> 00:02:47,899 is it lets us combine these two terms on the left-hand side 42 00:02:47,899 --> 00:02:48,940 into an exact derivative. 43 00:02:53,840 --> 00:02:57,210 So these two terms are actually the time derivative 44 00:02:57,210 --> 00:03:04,256 of the product x times the integrating factor e 45 00:03:04,256 --> 00:03:04,755 to the k*t. 46 00:03:08,390 --> 00:03:11,819 And then on the right-hand side we just have e to the k*t. 47 00:03:11,819 --> 00:03:13,360 So we can just go ahead and integrate 48 00:03:13,360 --> 00:03:14,484 both sides of the equation. 49 00:03:22,100 --> 00:03:24,660 And when we do that, the right-hand side becomes 50 00:03:24,660 --> 00:03:33,892 the integral of k*t, which is 1 over k e to the k*t plus 51 00:03:33,892 --> 00:03:34,975 a constant of integration. 52 00:03:37,530 --> 00:03:42,140 And now, just to isolate x, I could divide through by e 53 00:03:42,140 --> 00:03:42,650 to the k*t. 54 00:03:49,860 --> 00:03:57,070 And I obtain 1 over k plus a constant e to the minus k*t. 55 00:04:01,810 --> 00:04:05,770 So here's the solution to the ODE. 56 00:04:05,770 --> 00:04:08,620 OK, so this concludes part A. 57 00:04:08,620 --> 00:04:19,500 For part B, we have the equation x dot plus k*x equals e 58 00:04:19,500 --> 00:04:22,000 to the negative 5t. 59 00:04:22,000 --> 00:04:23,820 So if we take a look at this equation, 60 00:04:23,820 --> 00:04:26,257 the only thing that we've changed is the right-hand side. 61 00:04:26,257 --> 00:04:27,840 We haven't changed the left-hand side. 62 00:04:31,080 --> 00:04:34,207 And again, if we compute the integrating factor, 63 00:04:34,207 --> 00:04:36,790 well, we know that it's the same integrating factor as in part 64 00:04:36,790 --> 00:04:42,740 A. And the reason is that the integrating factor only 65 00:04:42,740 --> 00:04:44,010 depends on the left-hand side. 66 00:04:44,010 --> 00:04:45,510 It only depends on the linear terms. 67 00:04:49,642 --> 00:04:51,350 So I can multiply the equation through by 68 00:04:51,350 --> 00:04:52,660 the integrating factor again. 69 00:05:00,110 --> 00:05:03,840 And when I do this, I'll just combine the terms 70 00:05:03,840 --> 00:05:07,260 on the right-hand side. 71 00:05:07,260 --> 00:05:10,385 So this is e to the k*t times e to the minus 5t. 72 00:05:14,780 --> 00:05:19,670 And again, by construction, the left-hand side is going to be 73 00:05:19,670 --> 00:05:26,470 the same as in part A, the time derivative of x times e to k*t. 74 00:05:34,614 --> 00:05:36,655 And now we can go ahead and integrate both sides. 75 00:05:51,680 --> 00:05:54,370 OK, so if we integrate this, we end up 76 00:05:54,370 --> 00:05:58,850 getting 1 over k minus 5, e to the k 77 00:05:58,850 --> 00:06:02,870 minus 5t, plus a constant c. 78 00:06:08,310 --> 00:06:10,920 And if we step back and take a look at this for a second, 79 00:06:10,920 --> 00:06:14,290 we see that when k equals 5, we have a problem. 80 00:06:14,290 --> 00:06:17,220 Particularly, the denominator vanishes, 81 00:06:17,220 --> 00:06:20,560 which would give us 1 over 0. 82 00:06:20,560 --> 00:06:23,230 So this equation, this right-hand side, 83 00:06:23,230 --> 00:06:27,030 actually only holds when k is not equal to 5. 84 00:06:27,030 --> 00:06:29,380 So this is only valid for k not equal to five. 85 00:06:33,960 --> 00:06:36,270 So the question is, what happens when k equals to five? 86 00:06:45,180 --> 00:06:53,000 And in this case, we would have x e to the k*t, 87 00:06:53,000 --> 00:06:59,600 times the integral of 1 dt, which would just give us t plus 88 00:06:59,600 --> 00:07:00,410 a constant c. 89 00:07:08,070 --> 00:07:14,920 So in this case, we would have t e to the minus k*t, 90 00:07:14,920 --> 00:07:18,950 plus c e to the minus k*t. 91 00:07:18,950 --> 00:07:20,540 And this is when k is equal to 5. 92 00:07:23,870 --> 00:07:30,870 Meanwhile, for k not equal to 5, well, we 93 00:07:30,870 --> 00:07:32,720 have the solution worked out already. 94 00:07:32,720 --> 00:07:40,055 So we can just isolate x, and divide through by e to the k*t. 95 00:07:44,660 --> 00:07:52,566 And we have 1 over k minus 5, e to the minus 5t, plus c, 96 00:07:52,566 --> 00:07:53,954 e to the minus k*t. 97 00:08:02,570 --> 00:08:05,310 And this concludes part B. 98 00:08:05,310 --> 00:08:11,580 So the solution for k equal to 5 is t, e to the minus k*t, 99 00:08:11,580 --> 00:08:13,920 which would be e to the minus 5t, 100 00:08:13,920 --> 00:08:19,560 plus a constant c times e to the minus 5t. 101 00:08:19,560 --> 00:08:22,770 And when k is not equal to 5, we have 1 over k minus 5, 102 00:08:22,770 --> 00:08:26,720 e to the minus 5t, plus c e to the minus k*t. 103 00:08:26,720 --> 00:08:29,580 So I'd just like to point out a few things between 104 00:08:29,580 --> 00:08:33,480 the solutions for part A and for part B. First off, 105 00:08:33,480 --> 00:08:39,100 we note that both part A and part B share a common solution 106 00:08:39,100 --> 00:08:43,539 of the form constant c times e to the minus k*t. 107 00:08:43,539 --> 00:08:46,720 So this is a term that appears in the solution for both part A 108 00:08:46,720 --> 00:08:49,760 and for part B. The reason is this 109 00:08:49,760 --> 00:08:52,060 can be thought of as the homogeneous solution 110 00:08:52,060 --> 00:08:53,890 to the differential equation. 111 00:08:53,890 --> 00:08:56,400 This is the term that solves the differential equation when 112 00:08:56,400 --> 00:08:57,860 the right-hand side is set to 0. 113 00:09:00,930 --> 00:09:06,610 Secondly, in part B, if we take a look, when k is not 114 00:09:06,610 --> 00:09:10,590 equal to 5, we have the term which is a constant times 115 00:09:10,590 --> 00:09:12,560 e to the minus 5t. 116 00:09:12,560 --> 00:09:22,500 However, when we have k equal to 5, what happens 117 00:09:22,500 --> 00:09:26,620 is we have a term which essentially occurs 118 00:09:26,620 --> 00:09:29,760 from forcing the differential equation on resonance, 119 00:09:29,760 --> 00:09:35,070 which gives us an extra factor of t times e to the minus 5t. 120 00:09:35,070 --> 00:09:38,450 And we'll see more about resonance in the future. 121 00:09:38,450 --> 00:09:43,035 OK, so for part C, we're asked to use superposition. 122 00:09:50,900 --> 00:09:57,500 To solve the differential equation x dot plus k*x equals 123 00:09:57,500 --> 00:10:01,615 4 plus 7 e to the minus 5t. 124 00:10:04,354 --> 00:10:06,520 Now if we take a look at this differential equation, 125 00:10:06,520 --> 00:10:09,700 we already know the solution when the right-hand side is 1 126 00:10:09,700 --> 00:10:13,184 and when the right-hand side is e to the minus 5t. 127 00:10:13,184 --> 00:10:14,850 So we've changed the right-hand side now 128 00:10:14,850 --> 00:10:20,490 so it's 4 times 1 plus 7 times e to the minus 5t. 129 00:10:20,490 --> 00:10:22,700 So what's the total solution going to be? 130 00:10:22,700 --> 00:10:26,230 Well, it's going to be four times our solution when 131 00:10:26,230 --> 00:10:31,180 the right-hand side was 1, plus seven times the solution 132 00:10:31,180 --> 00:10:33,725 when the right-hand side was e to the minus 5t. 133 00:10:33,725 --> 00:10:36,430 This is one of the beautiful things about linear equations. 134 00:10:36,430 --> 00:10:39,830 When we add two forcings to the right-hand side, 135 00:10:39,830 --> 00:10:41,680 our total solution is just going to be 136 00:10:41,680 --> 00:10:43,880 the sum of the solutions to the individual terms. 137 00:10:46,430 --> 00:10:48,520 OK. 138 00:10:48,520 --> 00:10:52,590 So what this means is our solution, x, 139 00:10:52,590 --> 00:10:56,780 is going to be 4 times the solution 140 00:10:56,780 --> 00:10:59,010 when the right-hand side was 1. 141 00:10:59,010 --> 00:11:09,850 And in that case, it was 1 over k plus c e to the minus k*t, 142 00:11:09,850 --> 00:11:16,230 plus 7 times the solution when the right-hand side was e 143 00:11:16,230 --> 00:11:19,100 to the minus 5t. 144 00:11:19,100 --> 00:11:23,940 And when k was not equal to 5, this becomes 1 over k minus 5, 145 00:11:23,940 --> 00:11:28,700 e to the minus 5t, plus c e to the minus kt. 146 00:11:32,550 --> 00:11:36,720 So if we take a look at the sum of these two terms, 147 00:11:36,720 --> 00:11:40,330 I'll denote the two constants as c_1 and c_2. 148 00:11:40,330 --> 00:11:45,480 We actually have 4 times c_1 plus 7 times c_2. 149 00:11:45,480 --> 00:11:48,920 That's just going to give us a new constant, c_3. 150 00:11:48,920 --> 00:11:58,861 So in general, this becomes 4 over k plus 1 over k minus 5, 151 00:11:58,861 --> 00:12:10,760 e to the minus 5t, plus a constant c e to the minus k*t. 152 00:12:10,760 --> 00:12:14,770 So I can just recombine the 4c e to the minus k*t, 153 00:12:14,770 --> 00:12:17,620 and the 7c e to the minus k*t. 154 00:12:17,620 --> 00:12:20,250 That together just gives me a new constant, c_3, 155 00:12:20,250 --> 00:12:22,670 times e to the minus k*t. 156 00:12:22,670 --> 00:12:26,790 And this is the solution when k is not equal to 5. 157 00:12:26,790 --> 00:12:31,280 When k equals to 5, what we do is we just replace this term 158 00:12:31,280 --> 00:12:34,720 with t e to the minus k*t. 159 00:12:34,720 --> 00:12:38,285 So this is when k is not equal to 5. 160 00:12:43,350 --> 00:12:45,350 It should be a 7 here. 161 00:12:50,640 --> 00:12:52,270 So I'll just conclude there. 162 00:12:52,270 --> 00:12:54,540 And for summary, we've taken a look 163 00:12:54,540 --> 00:12:57,070 at a first-order linear differential 164 00:12:57,070 --> 00:12:59,550 equation with a couple different right-hand sides. 165 00:12:59,550 --> 00:13:02,347 We've solved them using an integrating factor. 166 00:13:02,347 --> 00:13:04,680 And then what we've done is we've used the superposition 167 00:13:04,680 --> 00:13:08,700 principle to solve the same ODE for a right-hand side which 168 00:13:08,700 --> 00:13:12,010 is the superposition of multiples of the functions 169 00:13:12,010 --> 00:13:15,320 that we've had in part A and for part B. 170 00:13:15,320 --> 00:13:18,940 So I'd like to conclude here, and I'll see you next time.