1 00:00:00,500 --> 00:00:04,580 GILBERT STRANG: OK, this is my second video on the Laplace 2 00:00:04,580 --> 00:00:08,740 transform, and this one will be about solving second order 3 00:00:08,740 --> 00:00:10,050 equations. 4 00:00:10,050 --> 00:00:15,260 So let me remember the plan. 5 00:00:15,260 --> 00:00:17,450 So there's our second order equation. 6 00:00:17,450 --> 00:00:20,200 And I'm taking this example first, 7 00:00:20,200 --> 00:00:23,540 with the delta function on the right-hand side. 8 00:00:23,540 --> 00:00:26,260 You remember, that's a key example. 9 00:00:26,260 --> 00:00:30,690 And actually, we have a special letter for the solution. 10 00:00:30,690 --> 00:00:32,080 This is an impulse. 11 00:00:32,080 --> 00:00:35,780 And the solution is the impulse response. 12 00:00:35,780 --> 00:00:37,750 And I use a little g. 13 00:00:37,750 --> 00:00:43,610 So I should have turned this y into a g. 14 00:00:43,610 --> 00:00:46,970 So that g is the solution, starting 15 00:00:46,970 --> 00:00:51,030 from 0 initial conditions, with a delta. 16 00:00:51,030 --> 00:00:52,550 So what's the plan? 17 00:00:52,550 --> 00:00:55,780 We want to take the transform of every term. 18 00:00:55,780 --> 00:00:59,160 We have to check, what is the transform, the Laplace 19 00:00:59,160 --> 00:01:01,280 transform of the delta function? 20 00:01:01,280 --> 00:01:04,569 You remember the definition of the transform. 21 00:01:04,569 --> 00:01:05,800 It's this integral. 22 00:01:05,800 --> 00:01:08,100 You take your function-- whatever 23 00:01:08,100 --> 00:01:13,420 it is, here delta-- multiply by e to the minus st, 24 00:01:13,420 --> 00:01:15,030 and integrate. 25 00:01:15,030 --> 00:01:19,180 s equals 0 to infinity. 26 00:01:19,180 --> 00:01:22,950 Well, easy to integrate with a delta function there. 27 00:01:22,950 --> 00:01:29,530 It's 0, except where the impulse is, at t equals 0. 28 00:01:29,530 --> 00:01:31,710 And at t equals 0, this is 1. 29 00:01:31,710 --> 00:01:33,520 So the answer is 1. 30 00:01:33,520 --> 00:01:40,400 That's the nice Laplace transform of the impulse. 31 00:01:40,400 --> 00:01:44,770 And now I want the transform of the impulse response. 32 00:01:44,770 --> 00:01:48,310 So the impulse response comes from this equation. 33 00:01:48,310 --> 00:01:50,300 So now, transform every term. 34 00:01:52,850 --> 00:01:56,730 So the transform of g will be called capital G. 35 00:01:56,730 --> 00:02:00,220 And the transform of the delta function is 1. 36 00:02:00,220 --> 00:02:03,890 And the derivative, you remember, 37 00:02:03,890 --> 00:02:05,535 has an extra factor, s. 38 00:02:08,050 --> 00:02:11,580 The transform of the derivative from the first Laplace 39 00:02:11,580 --> 00:02:16,020 transform video was s times g of s. 40 00:02:16,020 --> 00:02:18,640 And the second derivative, another s. 41 00:02:18,640 --> 00:02:20,670 So s squared, times g of s. 42 00:02:20,670 --> 00:02:26,420 We're not surprised to see the very familiar quadratic, whose 43 00:02:26,420 --> 00:02:33,140 roots are the two exponents s1 and s2, showing up here. 44 00:02:33,140 --> 00:02:35,640 We've seen this every time, because we 45 00:02:35,640 --> 00:02:37,520 have constant coefficients. 46 00:02:37,520 --> 00:02:40,000 We always see this quantity. 47 00:02:40,000 --> 00:02:46,170 And now we see that, look, the transform, capital G. 48 00:02:46,170 --> 00:02:47,410 I divide by that. 49 00:02:47,410 --> 00:02:50,700 It's exactly the transfer function. 50 00:02:50,700 --> 00:02:56,450 So that's connecting in the idea of the transfer function 51 00:02:56,450 --> 00:03:01,150 to the Laplace transform of the impulse response, 52 00:03:01,150 --> 00:03:03,340 because I have this in the denominator. 53 00:03:03,340 --> 00:03:10,600 OK, so I want now-- I've taken the transform of the equation. 54 00:03:10,600 --> 00:03:15,530 I've got the transform of little g, the impulse response. 55 00:03:15,530 --> 00:03:20,770 So now I'm ready to find G, the impulse response by invert 56 00:03:20,770 --> 00:03:21,990 Laplace transform. 57 00:03:21,990 --> 00:03:26,750 How do I find the function with that Laplace transform? 58 00:03:26,750 --> 00:03:30,130 Right now, it's 1 over a quadratic. 59 00:03:30,130 --> 00:03:32,250 The whole idea of partial fractions 60 00:03:32,250 --> 00:03:38,840 is, split this so this G of s, final step. 61 00:03:38,840 --> 00:03:40,500 It's G of s. 62 00:03:40,500 --> 00:03:44,440 Well, you remember that this is the polynomial that 63 00:03:44,440 --> 00:03:48,440 has the two roots, s1 and s2. 64 00:03:48,440 --> 00:03:55,180 I'm going to write that as 1 over s minus s1, 65 00:03:55,180 --> 00:03:57,060 and s minus s2. 66 00:04:00,070 --> 00:04:03,510 Those are the two roots from the quadratic formula-- 67 00:04:03,510 --> 00:04:07,940 the two poles, we could say, poles of G of s. 68 00:04:07,940 --> 00:04:12,090 And now I want to use partial fractions. 69 00:04:12,090 --> 00:04:17,089 So I want to separate this into two fractions. 70 00:04:17,089 --> 00:04:24,660 And it turns out that they are 1 over s minus s1, 71 00:04:24,660 --> 00:04:28,450 minus 1 over s minus s2. 72 00:04:28,450 --> 00:04:35,740 And it turns out there's a factor 73 00:04:35,740 --> 00:04:37,010 there to make it correct. 74 00:04:37,010 --> 00:04:38,060 You could check. 75 00:04:38,060 --> 00:04:41,570 When you put these, this over a common denominator, 76 00:04:41,570 --> 00:04:43,350 you get this. 77 00:04:43,350 --> 00:04:46,120 And when you put that over a common denominator, 78 00:04:46,120 --> 00:04:54,090 you'll get a numerator, which you have to cancel. 79 00:04:54,090 --> 00:04:55,140 OK. 80 00:04:55,140 --> 00:05:01,760 So then, now I have two simple poles. 81 00:05:01,760 --> 00:05:09,900 And I could write here what I know, what g of t is. 82 00:05:09,900 --> 00:05:14,420 Remember, the function with that transform 83 00:05:14,420 --> 00:05:16,800 is just e to the s1 t. 84 00:05:16,800 --> 00:05:20,090 The one most important of all transforms 85 00:05:20,090 --> 00:05:22,880 is the transform of the exponential, 86 00:05:22,880 --> 00:05:24,460 is that simple pole. 87 00:05:24,460 --> 00:05:29,750 So now I invert the Laplace transform. 88 00:05:29,750 --> 00:05:35,340 So this gives me an e to the s1 t, 89 00:05:35,340 --> 00:05:43,550 minus the function with that transform, is e to the s2 t. 90 00:05:43,550 --> 00:05:50,550 And I still have this constant, s1 minus s2. 91 00:05:50,550 --> 00:05:56,710 I've re-discovered the impulse response. 92 00:05:56,710 --> 00:06:03,520 It's a solution to my equation with impulse force. 93 00:06:03,520 --> 00:06:08,700 And it's that particular function 94 00:06:08,700 --> 00:06:11,050 that plays such an important part 95 00:06:11,050 --> 00:06:18,130 in the whole subject of constant coefficient differential 96 00:06:18,130 --> 00:06:18,670 equations. 97 00:06:18,670 --> 00:06:22,720 Because you see it's the critical thing here. 98 00:06:22,720 --> 00:06:25,330 Here's the critical transfer function, 99 00:06:25,330 --> 00:06:30,000 and here is the inverse Laplace transform. 100 00:06:30,000 --> 00:06:32,340 The Laplace transform of that is that. 101 00:06:32,340 --> 00:06:33,810 Good. 102 00:06:33,810 --> 00:06:35,750 That's that example. 103 00:06:35,750 --> 00:06:40,970 And now I just want to take another function than delta. 104 00:06:40,970 --> 00:06:43,050 OK. 105 00:06:43,050 --> 00:06:47,790 I could go all the way to take f of t, any f of t. 106 00:06:47,790 --> 00:06:50,910 But let me stay with examples. 107 00:06:53,720 --> 00:07:01,620 So now I'm going to do y double prime, plus b y prime, plus cy. 108 00:07:01,620 --> 00:07:03,750 They're all the most important example. 109 00:07:03,750 --> 00:07:10,760 The best one we could do would be cosine of omega t. 110 00:07:10,760 --> 00:07:14,050 An oscillating problem, with an oscillating force, 111 00:07:14,050 --> 00:07:19,420 at a frequency different from the natural frequency, 112 00:07:19,420 --> 00:07:21,870 and we also have damping there. 113 00:07:21,870 --> 00:07:25,350 So this is the standard, spring mass dashpot 114 00:07:25,350 --> 00:07:28,970 problem, or RLC circuit problem, certainly 115 00:07:28,970 --> 00:07:32,390 RLC circuits, highly important. 116 00:07:32,390 --> 00:07:38,290 And you might remember the solution gets a little messy. 117 00:07:38,290 --> 00:07:40,230 A solution gets a little messy. 118 00:07:40,230 --> 00:07:45,160 It's highly important, but-- so I'll 119 00:07:45,160 --> 00:07:50,240 carry it through to the last step. 120 00:07:50,240 --> 00:07:53,040 But I probably won't take that final step. 121 00:07:53,040 --> 00:07:58,400 Just, what I want you to see is another example 122 00:07:58,400 --> 00:08:00,320 of the inverse Laplace transform. 123 00:08:00,320 --> 00:08:01,596 So what do we need? 124 00:08:01,596 --> 00:08:03,970 We need the Laplace transform of that. 125 00:08:03,970 --> 00:08:07,030 I plan to take the Laplace transform of every term. 126 00:08:07,030 --> 00:08:11,430 s squared plus bs plus c. 127 00:08:11,430 --> 00:08:13,530 We'll multiply. 128 00:08:13,530 --> 00:08:15,580 I'm transforming everything. 129 00:08:15,580 --> 00:08:20,840 And here I have to put the transform of that. 130 00:08:20,840 --> 00:08:22,360 OK. 131 00:08:22,360 --> 00:08:25,740 So how will I get that? 132 00:08:25,740 --> 00:08:29,560 And of course, there might be a sine omega t in there. 133 00:08:29,560 --> 00:08:32,380 I would really like to get them both at once. 134 00:08:32,380 --> 00:08:36,059 So let me put down them both at once. 135 00:08:36,059 --> 00:08:43,620 The cosine and the sine are the real and imaginary parts of e 136 00:08:43,620 --> 00:08:45,732 to the i omega t, right? 137 00:08:48,624 --> 00:08:50,700 Euler's great formula. 138 00:08:50,700 --> 00:08:54,560 e to the i omega t is cosine omega t, the real part, 139 00:08:54,560 --> 00:08:58,050 plus i sine omega t, the imaginary part. 140 00:08:58,050 --> 00:09:05,880 But now I know the transform of e to the a t, e to the i omega 141 00:09:05,880 --> 00:09:06,490 t. 142 00:09:06,490 --> 00:09:10,130 So that transforms to-- so I want 143 00:09:10,130 --> 00:09:15,590 the real and the imaginary parts of 1 over, 144 00:09:15,590 --> 00:09:16,780 you remember what it is. 145 00:09:16,780 --> 00:09:18,880 It's just that simple pole again, 146 00:09:18,880 --> 00:09:23,220 s minus the exponent i omega. 147 00:09:27,650 --> 00:09:31,450 So I'm going to get the cosine and the sine at the same time, 148 00:09:31,450 --> 00:09:35,050 from one calculation, finding the real and imaginary parts 149 00:09:35,050 --> 00:09:41,120 of this, 1 over s plus s minus i omega. 150 00:09:41,120 --> 00:09:46,840 How do you deal with a pole, when 151 00:09:46,840 --> 00:09:52,080 if you want the real and imaginary parts, 152 00:09:52,080 --> 00:09:56,370 you're happy to get a real number in the denominator 153 00:09:56,370 --> 00:10:00,480 and see the real and imaginary parts up above. 154 00:10:00,480 --> 00:10:02,820 I don't like it when it's down there. 155 00:10:02,820 --> 00:10:07,840 So what I'm going to do is, real and imaginary parts of, 156 00:10:07,840 --> 00:10:12,680 I'll multiply s minus i omega. 157 00:10:12,680 --> 00:10:15,970 This is the key trick with complex numbers. 158 00:10:15,970 --> 00:10:19,330 It comes up enough, so it's good to learn. 159 00:10:19,330 --> 00:10:23,910 I multiply that by its conjugate, s plus i omega 160 00:10:23,910 --> 00:10:26,422 over s plus i omega. 161 00:10:26,422 --> 00:10:29,470 So I multiplied by 1. 162 00:10:29,470 --> 00:10:33,580 But you see, what's happened now is, 163 00:10:33,580 --> 00:10:37,170 real and imaginary parts of-- I've got what I want, 164 00:10:37,170 --> 00:10:44,710 s plus i omega is now up in the numerator, where I can see it. 165 00:10:44,710 --> 00:10:46,560 And what do I have down below? 166 00:10:46,560 --> 00:10:50,570 s minus i omega times s plus i omega, 167 00:10:50,570 --> 00:10:52,990 the very important quantity. 168 00:10:52,990 --> 00:11:01,040 S squared minus i omega s, plus i omega s, minus i squared, 169 00:11:01,040 --> 00:11:05,950 that's plus 1 omega squared plus omega squared. 170 00:11:05,950 --> 00:11:06,980 OK. 171 00:11:06,980 --> 00:11:09,570 We've done it. 172 00:11:09,570 --> 00:11:12,950 I've transformed the cosine and the sine 173 00:11:12,950 --> 00:11:18,290 into s over this, and omega over this. 174 00:11:18,290 --> 00:11:21,810 So two at once, two transforms. 175 00:11:21,810 --> 00:11:28,340 And of course, as always, we're able to do, and recognize, 176 00:11:28,340 --> 00:11:32,000 and work with the transforms of a special group 177 00:11:32,000 --> 00:11:35,990 of nice functions, exponentials above all, 178 00:11:35,990 --> 00:11:40,810 sines and cosines coming from exponentials, delta functions. 179 00:11:40,810 --> 00:11:43,290 It's a short list. 180 00:11:43,290 --> 00:11:46,880 Those are the ones we can do, and fortunately those 181 00:11:46,880 --> 00:11:48,860 are the ones that we need to do. 182 00:11:48,860 --> 00:11:58,700 OK, so I'm now ready to put in the right-- what 183 00:11:58,700 --> 00:11:59,890 did that turn out to be? 184 00:11:59,890 --> 00:12:03,130 It turned out to be s from the cosine, 185 00:12:03,130 --> 00:12:05,960 I'm not doing the sine now, the cosine. 186 00:12:05,960 --> 00:12:07,330 I'm taking the real part. 187 00:12:07,330 --> 00:12:13,910 It's s over that positive s squared plus omega squared. 188 00:12:13,910 --> 00:12:16,790 Are you with me? 189 00:12:16,790 --> 00:12:18,960 Left-hand side, all normal. 190 00:12:18,960 --> 00:12:21,570 I'm starting from 0 initial conditions, 191 00:12:21,570 --> 00:12:27,900 otherwise I would see the initial values in here. 192 00:12:27,900 --> 00:12:30,930 But I don't, because they're 0. 193 00:12:30,930 --> 00:12:35,010 And over here, I've got the transform 194 00:12:35,010 --> 00:12:37,360 of the right-hand side. 195 00:12:37,360 --> 00:12:38,520 OK? 196 00:12:38,520 --> 00:12:41,450 Then I just bring that down there. 197 00:12:41,450 --> 00:12:53,110 So finally, I know y of s is s over this all-important 198 00:12:53,110 --> 00:12:59,610 quadratic, and then I have the s squared plus omega squared. 199 00:13:02,800 --> 00:13:05,150 OK. 200 00:13:05,150 --> 00:13:07,800 Well, you see it did get harder. 201 00:13:07,800 --> 00:13:10,190 We have s squared from a quadratic there. 202 00:13:10,190 --> 00:13:11,320 We have two quadratics. 203 00:13:11,320 --> 00:13:14,490 We have a fourth-degree polynomial down there. 204 00:13:14,490 --> 00:13:16,220 Partial fractions will work. 205 00:13:16,220 --> 00:13:25,050 Partial fractions can simplify this, for any polynomials, 206 00:13:25,050 --> 00:13:29,260 but the algebra gets quickly worse 207 00:13:29,260 --> 00:13:31,540 when you get up to degree four. 208 00:13:31,540 --> 00:13:36,470 But actually, this can be, it could be done. 209 00:13:36,470 --> 00:13:38,880 And I don't plan to do it. 210 00:13:38,880 --> 00:13:43,480 To me, this would eventually give the solution 211 00:13:43,480 --> 00:13:44,750 to this example. 212 00:13:48,490 --> 00:13:50,770 But we have other ways to get that solution. 213 00:13:50,770 --> 00:13:54,480 And I believe, for me at least, the other ways are simpler. 214 00:13:54,480 --> 00:13:58,580 I know that the solution is a combination of cos omega 215 00:13:58,580 --> 00:14:01,280 t and sine omega t. 216 00:14:01,280 --> 00:14:04,730 And this is the particular solution I'm talking about. 217 00:14:04,730 --> 00:14:07,680 And I can figure out what those combinations are, 218 00:14:07,680 --> 00:14:09,790 because I know the right form. 219 00:14:09,790 --> 00:14:14,940 Here, I have to deal with partial fractions and degree 220 00:14:14,940 --> 00:14:16,450 four, down there. 221 00:14:16,450 --> 00:14:20,930 I'm going to chicken out on that one. 222 00:14:20,930 --> 00:14:23,040 I won't completely chicken out. 223 00:14:23,040 --> 00:14:27,070 I'll say what the pieces look like. 224 00:14:27,070 --> 00:14:29,990 But I won't figure out all the numbers. 225 00:14:29,990 --> 00:14:30,730 OK. 226 00:14:30,730 --> 00:14:39,140 So all this thing, I see as some constant over-- well, 227 00:14:39,140 --> 00:14:45,320 this factors into s minus s1 s minus s2. 228 00:14:45,320 --> 00:14:49,305 Those are the two roots, as we saw above. 229 00:14:51,950 --> 00:14:54,880 So I have a linear, a linear, and a quadratic. 230 00:14:54,880 --> 00:14:59,580 And partial fraction says that I can separate out 231 00:14:59,580 --> 00:15:04,650 the first linear, the second linear, 232 00:15:04,650 --> 00:15:11,390 and the third quadratic, which I could factor too, 233 00:15:11,390 --> 00:15:15,200 but-- I could factor s squared plus omega 234 00:15:15,200 --> 00:15:17,840 squared into that times that, but it 235 00:15:17,840 --> 00:15:20,050 brings in imaginary numbers. 236 00:15:20,050 --> 00:15:24,950 So I'll put a cs and a d. 237 00:15:24,950 --> 00:15:27,240 OK. 238 00:15:27,240 --> 00:15:32,570 Four numbers to be determined, or rather not to be determined. 239 00:15:32,570 --> 00:15:34,480 Because I'm going to stop there. 240 00:15:34,480 --> 00:15:41,800 What I've discovered is this part 241 00:15:41,800 --> 00:15:45,390 would be the null solution, would 242 00:15:45,390 --> 00:15:49,540 be a null solution because it's involves e to the s1 t 243 00:15:49,540 --> 00:15:51,325 and e to the s2 t. 244 00:15:51,325 --> 00:15:58,100 This part, when I find the inverse transform, 245 00:15:58,100 --> 00:16:03,490 it must be the combination of cos omega t and sine omega t. 246 00:16:03,490 --> 00:16:06,770 So that's some combination, when I find 247 00:16:06,770 --> 00:16:08,460 that it's the transform of-- 248 00:16:08,460 --> 00:16:10,010 [AUDIO OUT]