1 00:00:00,832 --> 00:00:02,990 GILBERT STRANG: So complex numbers 2 00:00:02,990 --> 00:00:08,528 are going to come in to today's video, and let me show you why. 3 00:00:08,528 --> 00:00:10,648 So I'm going to solve the problem. 4 00:00:10,648 --> 00:00:14,280 The differential equation we know-- first order, 5 00:00:14,280 --> 00:00:19,640 linear with a source term, but now the source term 6 00:00:19,640 --> 00:00:22,390 has both the cosine and the sine. 7 00:00:22,390 --> 00:00:25,500 And the sine, you notice, has this imaginary square root 8 00:00:25,500 --> 00:00:27,480 of minus 1 involved. 9 00:00:27,480 --> 00:00:32,940 So I'll call this y complex with a little c, 10 00:00:32,940 --> 00:00:35,930 because the answer is going to come out 11 00:00:35,930 --> 00:00:38,600 a complex number instead of a real number. 12 00:00:38,600 --> 00:00:42,450 So the previous lecture solved it with the cosine, 13 00:00:42,450 --> 00:00:45,390 and now we're going to solve it with that combination, 14 00:00:45,390 --> 00:00:47,610 and you may wonder why. 15 00:00:47,610 --> 00:00:53,790 The reason is that Euler left behind a fantastic formula 16 00:00:53,790 --> 00:00:58,620 for that the cosine plus i times the sine of an angle 17 00:00:58,620 --> 00:01:03,710 equals the exponential of the angle, e to the i omega t. 18 00:01:03,710 --> 00:01:06,620 And the good part about that is-- 19 00:01:06,620 --> 00:01:09,740 which we saw earlier for exponentials-- 20 00:01:09,740 --> 00:01:13,300 that when the source term is an exponential 21 00:01:13,300 --> 00:01:15,520 the solution is an exponential. 22 00:01:15,520 --> 00:01:19,120 So I look for a solution of this with that same e 23 00:01:19,120 --> 00:01:25,220 to the i omega t, and it's got some factor capital Y 24 00:01:25,220 --> 00:01:27,080 that we have to find. 25 00:01:27,080 --> 00:01:31,500 And we find that by substituting this into the equation, 26 00:01:31,500 --> 00:01:35,930 and then we learn what this capital Y is. 27 00:01:35,930 --> 00:01:37,460 So let me put that in. 28 00:01:37,460 --> 00:01:40,730 The derivative, the left side, is-- 29 00:01:40,730 --> 00:01:44,030 so this is the still going to be our complex solution. 30 00:01:44,030 --> 00:01:46,570 It's still complex. 31 00:01:46,570 --> 00:01:50,180 So I put this into the equation. 32 00:01:50,180 --> 00:01:54,470 The derivative will be i omega-- of course, 33 00:01:54,470 --> 00:01:56,110 the derivative of the exponential 34 00:01:56,110 --> 00:02:00,620 brings down the number there, whatever it is. 35 00:02:00,620 --> 00:02:05,170 i omega y e to the i omega t. 36 00:02:05,170 --> 00:02:07,810 That's what we get for the derivative of this, 37 00:02:07,810 --> 00:02:10,860 and now that should equal a times 38 00:02:10,860 --> 00:02:18,360 the function plus the source, e to the i omega t. 39 00:02:21,550 --> 00:02:26,090 Just as we did before with a real, e to the st, now 40 00:02:26,090 --> 00:02:28,960 it's s is i omega. 41 00:02:28,960 --> 00:02:33,140 And the beauty is we divide everything by e 42 00:02:33,140 --> 00:02:37,280 to the i omega t, and then we get a simple equation. 43 00:02:37,280 --> 00:02:46,392 i omega-- bring the a on the other side-- times y is what? 44 00:02:46,392 --> 00:02:48,180 Good. 45 00:02:48,180 --> 00:02:56,890 So y we now know is 1 over i omega minus a. 46 00:02:56,890 --> 00:03:00,850 It involves the frequency omega in the source term, 47 00:03:00,850 --> 00:03:05,300 and it involves the rate of growth, the constant, 48 00:03:05,300 --> 00:03:10,510 in the 0 order term. 49 00:03:10,510 --> 00:03:11,140 Good. 50 00:03:11,140 --> 00:03:15,260 That's our expression for capital Y, 51 00:03:15,260 --> 00:03:20,710 and if I put that in here, I have the complex solution, 52 00:03:20,710 --> 00:03:27,090 but my idea is to use this complex solution to find two 53 00:03:27,090 --> 00:03:32,760 real solutions-- that's really why I'm-- this video is about-- 54 00:03:32,760 --> 00:03:38,460 using this complex source term to find the solutions for both 55 00:03:38,460 --> 00:03:42,130 that one and sine omega t. 56 00:03:42,130 --> 00:03:44,560 And the trick will be-- the way to do 57 00:03:44,560 --> 00:03:49,130 it will be I will take-- here's my complex solution. 58 00:03:49,130 --> 00:03:56,730 I'll take the real part of this complex solution. 59 00:03:56,730 --> 00:03:59,240 It will be the results. 60 00:03:59,240 --> 00:04:00,300 Match the cosine. 61 00:04:03,570 --> 00:04:08,770 That's the real part of this expression, which I now know, 62 00:04:08,770 --> 00:04:12,830 and the imaginary part of this same expression 63 00:04:12,830 --> 00:04:16,250 will give me the sine, the output, 64 00:04:16,250 --> 00:04:19,010 the response to the sine term. 65 00:04:19,010 --> 00:04:25,430 So to problem solve one method, but there's a step 66 00:04:25,430 --> 00:04:27,810 that I have to take. 67 00:04:27,810 --> 00:04:32,840 How do I find the real part of this expression? 68 00:04:32,840 --> 00:04:34,970 The real part is easy if the complex number 69 00:04:34,970 --> 00:04:38,240 is written a plus ib. 70 00:04:38,240 --> 00:04:39,175 Real part is a. 71 00:04:39,175 --> 00:04:43,665 The imaginary part is b, but I don't have it a plus side ib. 72 00:04:43,665 --> 00:04:48,390 I have it in this form, and in a way, it's a better form. 73 00:04:48,390 --> 00:04:52,900 So now I have to think about-- and y itself has 74 00:04:52,900 --> 00:04:56,440 this thing in the denominator. 75 00:04:56,440 --> 00:05:05,840 So can I practice by looking at this number i omega-- i omega 76 00:05:05,840 --> 00:05:09,040 minus a? 77 00:05:09,040 --> 00:05:12,820 That's really the awkward quantity 78 00:05:12,820 --> 00:05:15,980 that I have to get into a good form, 79 00:05:15,980 --> 00:05:19,860 and the form you want for complex numbers 80 00:05:19,860 --> 00:05:23,800 when you're going to multiply them is the polar form. 81 00:05:23,800 --> 00:05:30,800 I want to put this in the form re to the i alpha. 82 00:05:30,800 --> 00:05:36,710 So a positive number, the magnitude of this, 83 00:05:36,710 --> 00:05:40,720 and the angle-- so I have to draw the complex plane. 84 00:05:40,720 --> 00:05:44,910 I guess this is the first time in these lectures. 85 00:05:44,910 --> 00:05:47,920 So there is the real axis. 86 00:05:47,920 --> 00:05:51,720 Here's the imaginary axis, and here's a complex number, 87 00:05:51,720 --> 00:05:53,510 i omega minus a. 88 00:05:53,510 --> 00:05:57,280 So in the imaginary direction, I go up omega, 89 00:05:57,280 --> 00:06:00,310 and in the real direction, I go minus a. 90 00:06:00,310 --> 00:06:02,180 So here's my number. 91 00:06:02,180 --> 00:06:07,070 This is up to i omega and back to minus a, 92 00:06:07,070 --> 00:06:12,865 and there is the number I omega minus a. 93 00:06:12,865 --> 00:06:19,190 And there is the angle alpha, and the length 94 00:06:19,190 --> 00:06:22,040 of that is the r. 95 00:06:22,040 --> 00:06:23,800 So I have those two things to find. 96 00:06:23,800 --> 00:06:28,490 That's called putting the number into its polar form. 97 00:06:28,490 --> 00:06:33,670 This is its rectangular form, real, imaginary. 98 00:06:33,670 --> 00:06:38,320 This is its magnitude, and now what is the magnitude of that? 99 00:06:38,320 --> 00:06:39,340 Easy. 100 00:06:39,340 --> 00:06:45,820 | a right triangle with height with that side is omega. 101 00:06:45,820 --> 00:06:48,940 This side is minus a. 102 00:06:48,940 --> 00:06:53,360 I use Pythagoras to know that this r is 103 00:06:53,360 --> 00:07:00,510 the square root of a squared plus omega squared. 104 00:07:00,510 --> 00:07:04,020 That length squared-- the minus sign disappears. 105 00:07:04,020 --> 00:07:07,870 That length squared, omega squared-- so that's the r. 106 00:07:07,870 --> 00:07:10,680 Now, what about e to the i alpha? 107 00:07:10,680 --> 00:07:14,140 What's the angle-- e to the i alpha? 108 00:07:14,140 --> 00:07:20,280 The best I can say is I know what that angle is. 109 00:07:20,280 --> 00:07:22,510 I can only tell you its tangent, but let 110 00:07:22,510 --> 00:07:24,590 me just leave it as alpha. 111 00:07:24,590 --> 00:07:26,470 Alpha is the angle. 112 00:07:26,470 --> 00:07:29,440 The tangent of this angle will be 113 00:07:29,440 --> 00:07:32,780 that number over that number. 114 00:07:32,780 --> 00:07:36,190 I'll leave it that way. 115 00:07:36,190 --> 00:07:40,300 So that's a key step, a first step with complex numbers, 116 00:07:40,300 --> 00:07:43,980 and in a later video, we'll be devoted entirely 117 00:07:43,980 --> 00:07:46,760 to working with complex numbers. 118 00:07:46,760 --> 00:07:49,470 Here you're getting a first look at it, 119 00:07:49,470 --> 00:07:52,360 or you may have seen it before. 120 00:07:52,360 --> 00:07:57,020 So now I had to divide by that. 121 00:07:57,020 --> 00:07:59,300 That's why I like this form. 122 00:07:59,300 --> 00:08:02,120 Dividing by it-- so now I'm ready for-- I'm 123 00:08:02,120 --> 00:08:04,760 ready to put in my complex. 124 00:08:04,760 --> 00:08:13,790 y complex was this y, which was 1 over i omega minus a, 125 00:08:13,790 --> 00:08:16,470 and e to the i omega t. 126 00:08:16,470 --> 00:08:19,890 That's what we have, but now i omega minus 127 00:08:19,890 --> 00:08:24,060 a we have in this nicer form. 128 00:08:24,060 --> 00:08:26,320 I can divide by that. 129 00:08:26,320 --> 00:08:30,290 If I divide by that, it'll be 1 over the square root 130 00:08:30,290 --> 00:08:40,700 of a squared plus omega squared times e to the i alpha-- 131 00:08:40,700 --> 00:08:42,730 e to the minus i alpha. 132 00:08:42,730 --> 00:08:48,610 When I divide by an exponent-- that exponent-- exponential-- 133 00:08:48,610 --> 00:08:52,780 that exponent changes sign-- times e to the i omega t. 134 00:08:55,760 --> 00:08:58,670 Are you good with that? 135 00:08:58,670 --> 00:09:03,130 So this number produced both of those terms, the magnitude 136 00:09:03,130 --> 00:09:07,760 part and the angle part, and then this part was pure angle. 137 00:09:07,760 --> 00:09:11,250 And that's my answer in a nicer form, 138 00:09:11,250 --> 00:09:13,060 and here is even better form. 139 00:09:13,060 --> 00:09:15,490 I combine these two. 140 00:09:15,490 --> 00:09:18,120 e to the i something times-- when 141 00:09:18,120 --> 00:09:22,890 I multiply two exponentials, I can put that as e 142 00:09:22,890 --> 00:09:28,290 to the i omega t minus alpha. 143 00:09:28,290 --> 00:09:32,970 You see that it has that factor e to the minus i alpha as well 144 00:09:32,970 --> 00:09:35,000 as the e to the i omega t. 145 00:09:35,000 --> 00:09:42,150 Now I'm ready to take the real part and the imaginary part, 146 00:09:42,150 --> 00:09:45,060 and that will give me my two solutions-- 147 00:09:45,060 --> 00:09:48,360 my two real solutions to the real equation. 148 00:09:48,360 --> 00:09:54,580 So take the real part, and that's 149 00:09:54,580 --> 00:09:58,010 why I'll concentrate on the real part 150 00:09:58,010 --> 00:10:04,020 is the original y of t-- y real coming from the cosine. 151 00:10:04,020 --> 00:10:08,810 The cosine of omega t is the case 152 00:10:08,810 --> 00:10:13,080 I'm redoing from what I had in an earlier 153 00:10:13,080 --> 00:10:17,100 lecture as a combination of sines and cosines. 154 00:10:17,100 --> 00:10:22,090 Now we're going to see it more beautifully. 155 00:10:22,090 --> 00:10:26,000 So I'm ready to take the real part of that. 156 00:10:26,000 --> 00:10:30,680 Well, this is a real number-- 1 over the square root 157 00:10:30,680 --> 00:10:33,505 of a squared plus omega squared. 158 00:10:36,420 --> 00:10:41,360 And what is the real part of e to the i times an angle? 159 00:10:41,360 --> 00:10:46,440 The real part of e to the i theta is the cosine of theta. 160 00:10:46,440 --> 00:10:47,860 The real part is the cosine. 161 00:10:47,860 --> 00:10:51,010 That's where using Euler-- always using Euler. 162 00:10:51,010 --> 00:10:59,240 So it's just the cosine of omega t minus alpha, 163 00:10:59,240 --> 00:11:00,970 and that's exactly what we ended up 164 00:11:00,970 --> 00:11:06,010 with with more work in the previous lecture. 165 00:11:06,010 --> 00:11:08,570 The magnitude-- this was called the gain. 166 00:11:08,570 --> 00:11:10,590 This was the G part. 167 00:11:10,590 --> 00:11:14,430 This is the G, the gain. 168 00:11:14,430 --> 00:11:22,180 The input was the size of cosine was size one. 169 00:11:22,180 --> 00:11:25,580 It's increased or decreased by this factor, 170 00:11:25,580 --> 00:11:29,280 and then the cosine is still here. 171 00:11:34,190 --> 00:11:36,720 And alpha, you remember, is the time lag. 172 00:11:39,380 --> 00:11:43,540 The input is a pure cosine, but the output 173 00:11:43,540 --> 00:11:48,960 is a shifted cosine, which is also a combination of cosine 174 00:11:48,960 --> 00:11:50,420 and sine. 175 00:11:50,420 --> 00:11:55,540 So there you've used complex numbers-- maybe the first time, 176 00:11:55,540 --> 00:12:00,620 maybe not-- to get the nice form for the answer. 177 00:12:00,620 --> 00:12:05,350 And of course, if the input was the sine of omega t, 178 00:12:05,350 --> 00:12:08,150 then I would have the same thing. 179 00:12:08,150 --> 00:12:10,340 That would be a sine. 180 00:12:10,340 --> 00:12:14,920 So it's really the physically important quantity 181 00:12:14,920 --> 00:12:18,420 is the gain and the phase lag. 182 00:12:18,420 --> 00:12:18,920 Good. 183 00:12:18,920 --> 00:12:21,390 So that's the first use of complex numbers 184 00:12:21,390 --> 00:12:28,050 to get us back to an exponential, after which 185 00:12:28,050 --> 00:12:31,840 the solution is easy. 186 00:12:31,840 --> 00:12:36,270 I'll have more source terms-- a few more-- 187 00:12:36,270 --> 00:12:40,470 and then I'll look for a formula that 188 00:12:40,470 --> 00:12:44,170 applies for any source term. 189 00:12:44,170 --> 00:12:45,990 Thank you.