1 00:00:04,990 --> 00:00:06,350 PROFESSOR: Welcome back. 2 00:00:06,350 --> 00:00:08,510 So in this session, we're going to look 3 00:00:08,510 --> 00:00:11,070 at sinusoidal inputs for ordinary differential 4 00:00:11,070 --> 00:00:13,330 equations of order one. 5 00:00:13,330 --> 00:00:17,950 So here in question one, you're asked to use complex techniques 6 00:00:17,950 --> 00:00:22,400 to solve x dot plus k*x equals cosine of omega*t. 7 00:00:22,400 --> 00:00:24,730 Here k and omega are constants. 8 00:00:24,730 --> 00:00:27,560 This is of ODE of first order. 9 00:00:27,560 --> 00:00:31,460 And the sinusoidal input is referring 10 00:00:31,460 --> 00:00:33,230 to the right-hand side of the ODE 11 00:00:33,230 --> 00:00:35,360 where basically the we are forcing 12 00:00:35,360 --> 00:00:37,430 a system with a function, and it's 13 00:00:37,430 --> 00:00:42,470 sinusoidal of angular frequency omega, which means basically 14 00:00:42,470 --> 00:00:44,260 a period of 2pi over omega. 15 00:00:44,260 --> 00:00:46,910 So you're asked to use complex techniques 16 00:00:46,910 --> 00:00:49,920 to solve this in question a. 17 00:00:49,920 --> 00:00:54,210 In question b, we're asked to use what we had in question a 18 00:00:54,210 --> 00:00:56,790 to solve this modified function, where again, we 19 00:00:56,790 --> 00:00:58,930 have a sinusoidal input on the right-hand side 20 00:00:58,930 --> 00:01:02,130 with an additional amplitude F, which is now constant. 21 00:01:02,130 --> 00:01:05,230 In the third part, we're asked to use superposition principle 22 00:01:05,230 --> 00:01:07,940 to solve this combined equation, where now we're 23 00:01:07,940 --> 00:01:10,930 introducing a value for example for F, which is 3. 24 00:01:10,930 --> 00:01:13,250 And you can see also that the right-hand side is also 25 00:01:13,250 --> 00:01:15,890 a sinusoidal input, because it's a linear combination 26 00:01:15,890 --> 00:01:17,630 of sinusoidal functions. 27 00:01:17,630 --> 00:01:21,230 All these equations are linear with constant coefficients, 28 00:01:21,230 --> 00:01:24,170 and hence superposition principle would hold. 29 00:01:24,170 --> 00:01:26,500 So why don't you stop the video, take a few minutes, 30 00:01:26,500 --> 00:01:27,750 and work through the problems. 31 00:01:27,750 --> 00:01:28,613 And we'll be back. 32 00:01:40,710 --> 00:01:42,170 Welcome back. 33 00:01:42,170 --> 00:01:45,590 So what is it that we're asked to do here? 34 00:01:45,590 --> 00:01:47,950 We're asked to solve this using a trick that you learned 35 00:01:47,950 --> 00:01:51,260 in class to basically convert a real-valued ODE 36 00:01:51,260 --> 00:01:53,050 into a complex form. 37 00:01:53,050 --> 00:02:04,560 So the first thing to do is to realize that the cosine 38 00:02:04,560 --> 00:02:12,820 of omega*t is simply the real part of the imaginary complex 39 00:02:12,820 --> 00:02:14,920 exponential i*omega*t. 40 00:02:14,920 --> 00:02:17,820 So when we realize that, and we see 41 00:02:17,820 --> 00:02:21,410 that the ODE is real-valued linear, 42 00:02:21,410 --> 00:02:36,500 we can convert this real-value ODE 43 00:02:36,500 --> 00:02:38,538 into this complex-valued ODE. 44 00:02:55,040 --> 00:02:57,030 And we're going to label this equation star. 45 00:02:59,449 --> 00:03:01,490 From this point, we can go back to the techniques 46 00:03:01,490 --> 00:03:04,450 that we learned in class, namely the integrating factor, 47 00:03:04,450 --> 00:03:09,340 to realize that we can rewrite the right-hand side 48 00:03:09,340 --> 00:03:12,320 in this form, introducing a new function u, 49 00:03:12,320 --> 00:03:16,425 so that we need to seek a function 50 00:03:16,425 --> 00:03:19,885 u that will then recover this function, this equation. 51 00:03:22,400 --> 00:03:26,880 And from previous recitations and problem, 52 00:03:26,880 --> 00:03:29,590 we saw that clearly the u that we will need to pick is just 53 00:03:29,590 --> 00:03:32,160 exponential of k*t. 54 00:03:32,160 --> 00:03:45,770 So now from this, basically we're back to i*omega plus k, 55 00:03:45,770 --> 00:03:47,900 the whole thing t, on the right-hand side, 56 00:03:47,900 --> 00:03:52,910 and here z*u prime that we just need to integrate on both 57 00:03:52,910 --> 00:03:53,930 sides. 58 00:03:53,930 --> 00:04:00,381 So this is simply k*t*z on the left-hand side. 59 00:04:00,381 --> 00:04:02,630 And on the right-hand side, we're integrating-- again, 60 00:04:02,630 --> 00:04:07,550 it's still an exponential, even though it's complex. 61 00:04:14,690 --> 00:04:16,358 And we need to introduce, of course, 62 00:04:16,358 --> 00:04:17,357 constant of integration. 63 00:04:20,980 --> 00:04:25,640 So the solution for the equation star is then, 64 00:04:25,640 --> 00:04:28,500 I'm going to write it up here, so that we keep that 65 00:04:28,500 --> 00:04:37,170 for the rest of the problem, minus t minus k*t when I divide 66 00:04:37,170 --> 00:04:38,080 by this. 67 00:04:38,080 --> 00:04:42,070 And here, the minus k*t of this exponential is going to be 68 00:04:42,070 --> 00:04:44,770 canceled out by the integrating factor. 69 00:04:54,530 --> 00:04:58,020 So we need to keep that here. 70 00:04:58,020 --> 00:05:00,600 So here I gave the general solution 71 00:05:00,600 --> 00:05:03,130 with the solution that would come 72 00:05:03,130 --> 00:05:05,720 from the homogeneous equation, which we could refer 73 00:05:05,720 --> 00:05:08,090 to also as a transient here, because basically 74 00:05:08,090 --> 00:05:11,370 after a long time t, this exponential, if k is positive, 75 00:05:11,370 --> 00:05:12,940 would decay. 76 00:05:12,940 --> 00:05:15,370 And the part of the solution that 77 00:05:15,370 --> 00:05:18,750 comes from the sinusoidal input, or the forcing, which 78 00:05:18,750 --> 00:05:22,450 would be particular solution. 79 00:05:22,450 --> 00:05:24,770 So to go back to the original question, 80 00:05:24,770 --> 00:05:28,300 we were asked to solve this real-valued equation. 81 00:05:28,300 --> 00:05:30,490 So from what we noticed above, we 82 00:05:30,490 --> 00:05:31,990 saw that the right-hand side is just 83 00:05:31,990 --> 00:05:35,060 a real part of the right-hand side of the complex value 84 00:05:35,060 --> 00:05:36,390 equation star. 85 00:05:36,390 --> 00:05:42,400 And similarly then, we can do the same 86 00:05:42,400 --> 00:05:44,590 for the actual solutions themselves. 87 00:05:44,590 --> 00:05:48,210 x is also just the real value of this complex number. 88 00:05:48,210 --> 00:05:49,970 So here, for this general solution, 89 00:05:49,970 --> 00:05:55,210 I'm going to just use c bar for general complex constant here. 90 00:05:55,210 --> 00:05:57,420 And in this case, we will take the real value. 91 00:05:57,420 --> 00:06:00,430 So at this point, it doesn't really matter what t is. 92 00:06:00,430 --> 00:06:02,580 It's just we're going to keep it as a constant. 93 00:06:02,580 --> 00:06:06,290 And now it's just real valued. 94 00:06:06,290 --> 00:06:07,670 That's for the one part. 95 00:06:07,670 --> 00:06:15,640 And then we need to take the real part of this expression. 96 00:06:15,640 --> 00:06:17,360 Come back to the line here. 97 00:06:17,360 --> 00:06:21,614 So to take the real part of this expression, 98 00:06:21,614 --> 00:06:23,280 you learned that basically you just need 99 00:06:23,280 --> 00:06:26,630 to multiply the denominator or the numerator 100 00:06:26,630 --> 00:06:27,705 by the complex conjugate. 101 00:06:32,160 --> 00:06:49,320 And that will only give us-- so we have k minus i*omega over 102 00:06:49,320 --> 00:06:53,550 the squares, and then again, Euler formula that we saw 103 00:06:53,550 --> 00:06:55,590 in a previous recitation. 104 00:06:55,590 --> 00:06:58,040 So x, from this expression, is just 105 00:06:58,040 --> 00:06:59,556 the real part of all of this. 106 00:06:59,556 --> 00:07:00,805 So it's going to be this term. 107 00:07:05,950 --> 00:07:13,010 Let me factorize for a moment here, 108 00:07:13,010 --> 00:07:15,420 and then the result of multiplying the two 109 00:07:15,420 --> 00:07:17,920 complex parts as well, i to i, minus 1. 110 00:07:23,060 --> 00:07:30,540 And so that answers part a of the problem. 111 00:07:30,540 --> 00:07:32,710 So if we look at part b-- I'm just 112 00:07:32,710 --> 00:07:38,460 going to do it here-- part b we're 113 00:07:38,460 --> 00:07:41,020 asked to do to solve a very, very similar equation. 114 00:07:44,220 --> 00:07:50,720 And I'm just going to leave the F out for now. 115 00:07:50,720 --> 00:07:52,780 It's basically the same equation, 116 00:07:52,780 --> 00:07:56,250 except that the input now is a sine instead of a cosine. 117 00:07:56,250 --> 00:07:59,590 So we can use the same trick as we used for question a 118 00:07:59,590 --> 00:08:01,900 by realizing that now the sine is just 119 00:08:01,900 --> 00:08:10,432 an imaginary part of the exponential, 120 00:08:10,432 --> 00:08:13,940 the complex exponential. 121 00:08:13,940 --> 00:08:16,080 So we don't need to redo all the work. 122 00:08:16,080 --> 00:08:18,860 We only need to, if we were considering this equation, 123 00:08:18,860 --> 00:08:21,170 to just take the imaginary part of the solution 124 00:08:21,170 --> 00:08:22,920 that we just found here. 125 00:08:22,920 --> 00:08:26,850 And we can just read off the solution from this line. 126 00:08:29,950 --> 00:08:33,679 Note that in this expression, I left out 127 00:08:33,679 --> 00:08:40,520 the homogeneous part, which I should add here from here. 128 00:08:40,520 --> 00:08:42,330 And this was just a complex part. 129 00:08:42,330 --> 00:08:44,480 So to come back to what I was saying, 130 00:08:44,480 --> 00:08:46,070 the sine is just the imaginary part 131 00:08:46,070 --> 00:08:47,350 of the complex exponential. 132 00:08:47,350 --> 00:08:51,920 So we're just going to write down the solution 133 00:08:51,920 --> 00:08:54,000 by reading off here. 134 00:08:54,000 --> 00:08:57,610 So again, we have the homogeneous part, 135 00:08:57,610 --> 00:09:01,960 which would be another real-valued constant, 136 00:09:01,960 --> 00:09:10,320 and then the real part of this expression, 1 over k 137 00:09:10,320 --> 00:09:12,620 squared plus omega squared. 138 00:09:12,620 --> 00:09:21,880 And its imaginary part then would give us a k sine omega*t 139 00:09:21,880 --> 00:09:32,010 and a minus omega cos omega*t. 140 00:09:32,010 --> 00:09:34,060 So this would be the solution for part 141 00:09:34,060 --> 00:09:37,000 b, if we had this equation. 142 00:09:37,000 --> 00:09:41,100 But we actually have an equation with an additional amplitude F. 143 00:09:41,100 --> 00:09:43,890 And what this leads to do is just 144 00:09:43,890 --> 00:09:47,590 an additional constant that would appear then 145 00:09:47,590 --> 00:09:48,820 for this solution. 146 00:09:48,820 --> 00:09:51,090 And we could see that if we rewound the way 147 00:09:51,090 --> 00:09:54,740 we solved in part a, and saw that introducing 148 00:09:54,740 --> 00:09:57,400 constant F to the equation is equivalent to just multiplying 149 00:09:57,400 --> 00:09:59,310 the full equation with F. And then 150 00:09:59,310 --> 00:10:02,190 in the integrating factor part, we 151 00:10:02,190 --> 00:10:04,400 would end up with an F in front of our solution 152 00:10:04,400 --> 00:10:05,990 when we are doing the integration. 153 00:10:05,990 --> 00:10:07,950 And so basically, that amplitude could 154 00:10:07,950 --> 00:10:10,950 be absorbed in the constant of integration 155 00:10:10,950 --> 00:10:13,300 for the homogeneous part. 156 00:10:13,300 --> 00:10:19,310 And the F just remains in the particular solution here. 157 00:10:24,180 --> 00:10:29,630 So for the last part of the problem, 158 00:10:29,630 --> 00:10:33,500 we were now asked to use the superposition principle 159 00:10:33,500 --> 00:10:44,440 to combine solutions of two previous ODEs that we could 160 00:10:44,440 --> 00:10:54,740 split from this equation, cosine omega*t plus 3 sine omega*t. 161 00:10:54,740 --> 00:10:57,050 So you saw from previous recitations 162 00:10:57,050 --> 00:10:59,990 that superposition principle applies for linear equations. 163 00:10:59,990 --> 00:11:01,882 This is clearly a linear equation. 164 00:11:01,882 --> 00:11:03,340 And here on the right-hand side, we 165 00:11:03,340 --> 00:11:05,400 have two sinusoidal functions. 166 00:11:05,400 --> 00:11:09,270 Because it's linear we can look at this 167 00:11:09,270 --> 00:11:15,400 by splitting it into two equations. 168 00:11:15,400 --> 00:11:18,240 And I'm just introducing x_1, x_2 as notation 169 00:11:18,240 --> 00:11:19,670 to distinguish between the two. 170 00:11:26,250 --> 00:11:28,300 And here we can recognize that we already 171 00:11:28,300 --> 00:11:30,430 did this work that was in part a, 172 00:11:30,430 --> 00:11:32,850 and we already did this work in part 173 00:11:32,850 --> 00:11:35,770 b, where F now has a value of 3. 174 00:11:35,770 --> 00:11:39,390 And so what this is telling us, because it's a linear equation, 175 00:11:39,390 --> 00:11:41,280 we can use superposition principle, 176 00:11:41,280 --> 00:11:52,550 the solution, if you were to do the addition of these two 177 00:11:52,550 --> 00:12:01,520 equations, would just be the sum of the previous solutions 178 00:12:01,520 --> 00:12:02,620 that we found. 179 00:12:02,620 --> 00:12:09,670 So this would be our x_3, if I had labeled this with a 3. 180 00:12:09,670 --> 00:12:13,520 And so basically, the solution is simply the sum 181 00:12:13,520 --> 00:12:15,300 of the two previous forms. 182 00:12:15,300 --> 00:12:19,424 And so we would end up still with our c minus k*t, 183 00:12:19,424 --> 00:12:21,590 which is this basically the homogeneous part that we 184 00:12:21,590 --> 00:12:23,950 obtained in the two previous parts, which is common. 185 00:12:23,950 --> 00:12:29,390 And then we just need to add each particular solution 186 00:12:29,390 --> 00:12:32,590 introduced in part a and part b. 187 00:12:32,590 --> 00:12:34,755 So if I have room I will write it all out. 188 00:12:39,870 --> 00:12:47,990 So we would have k cos omega*t plus omega sine omega*t from 189 00:12:47,990 --> 00:12:50,760 the first part of the cosine. 190 00:12:50,760 --> 00:13:05,200 And then we're introducing a 3k sine omega*t minus 3 omega 191 00:13:05,200 --> 00:13:05,900 cosine omega*t. 192 00:13:12,490 --> 00:13:16,680 And that would be then the solution of the combined two 193 00:13:16,680 --> 00:13:17,860 equations. 194 00:13:17,860 --> 00:13:20,180 And so you don't need to redo the full work, by using 195 00:13:20,180 --> 00:13:22,000 the superposition principle. 196 00:13:22,000 --> 00:13:25,310 So here the key was just to recognize that the cosines 197 00:13:25,310 --> 00:13:27,940 and the sines are basically real parts and imaginary parts 198 00:13:27,940 --> 00:13:31,520 of the complex number, of the exponential of i*omega*t. 199 00:13:31,520 --> 00:13:33,580 Again, it's just Euler formula. 200 00:13:33,580 --> 00:13:36,070 And using that as a shortcut to be 201 00:13:36,070 --> 00:13:38,330 able to kill two birds with one stone 202 00:13:38,330 --> 00:13:42,320 and solve the two equations by using only one approach, which 203 00:13:42,320 --> 00:13:44,020 is just the integrating factor. 204 00:13:44,020 --> 00:13:46,930 And this ends the session for today.