1 00:00:00,135 --> 00:00:02,490 The following content is provided under a Creative 2 00:00:02,490 --> 00:00:04,030 Commons license. 3 00:00:04,030 --> 00:00:06,330 Your support will help MIT OpenCourseWare 4 00:00:06,330 --> 00:00:10,690 continue to offer high quality educational resources for free. 5 00:00:10,690 --> 00:00:13,320 To make a donation or view additional materials 6 00:00:13,320 --> 00:00:17,270 from hundreds of MIT courses, visit MIT OpenCourseWare 7 00:00:17,270 --> 00:00:18,220 at ocw.mit.edu. 8 00:00:31,108 --> 00:00:32,049 HERBERT GROSS: Hi. 9 00:00:32,049 --> 00:00:35,330 Today we're going to discuss the technique known as variation 10 00:00:35,330 --> 00:00:39,410 of parameters, which is a sure fire method for finding 11 00:00:39,410 --> 00:00:42,320 a particular solution of a linear differential 12 00:00:42,320 --> 00:00:45,830 equation provided only, and I say only 13 00:00:45,830 --> 00:00:49,520 with a little bit of a shutter, provided only that we know 14 00:00:49,520 --> 00:00:53,240 the general solution of the homogeneous equation, 15 00:00:53,240 --> 00:00:55,140 and I'll talk about that in a minute. 16 00:00:55,140 --> 00:00:56,468 You see, the idea is this. 17 00:00:56,468 --> 00:00:58,010 Let's suppose, and again, we'll stick 18 00:00:58,010 --> 00:00:59,480 with our second order of equation 19 00:00:59,480 --> 00:01:02,390 for purposes of illustration, y double prime plus 20 00:01:02,390 --> 00:01:06,080 p of x y prime plus q of x y equals f of x. 21 00:01:06,080 --> 00:01:09,020 We're given that equation, not necessarily 22 00:01:09,020 --> 00:01:11,900 constant coefficients, and what we're assuming 23 00:01:11,900 --> 00:01:15,920 is that the solution of the homogeneous equation, L of y 24 00:01:15,920 --> 00:01:19,220 equals 0, is known in full. 25 00:01:19,220 --> 00:01:21,080 In other words, we know a general solution. 26 00:01:21,080 --> 00:01:24,380 By the way, let's keep in mind the following two things. 27 00:01:24,380 --> 00:01:26,990 One of which is by way of review and the other 28 00:01:26,990 --> 00:01:30,530 is a forecaster of what we'll be doing next time. 29 00:01:30,530 --> 00:01:32,390 This whole method is going to hinge 30 00:01:32,390 --> 00:01:35,510 on knowing the general solution of the homogeneous equation. 31 00:01:35,510 --> 00:01:38,690 Notice that in particular, the one kind of equation 32 00:01:38,690 --> 00:01:42,350 that we can certainly find the homogeneous solution of 33 00:01:42,350 --> 00:01:45,840 is the equation involving constant coefficients, you see? 34 00:01:45,840 --> 00:01:50,120 So obviously, then the method of variation of parameters, 35 00:01:50,120 --> 00:01:52,190 if I'm correct in what I just said, 36 00:01:52,190 --> 00:01:57,410 will apply to linear equations with constant coefficients. 37 00:01:57,410 --> 00:02:00,470 The hardship of using variation of parameters 38 00:02:00,470 --> 00:02:02,540 will center around the fact that what 39 00:02:02,540 --> 00:02:05,780 if we don't know how to find the general solution 40 00:02:05,780 --> 00:02:07,670 of the homogeneous equation? 41 00:02:07,670 --> 00:02:10,550 And that's what the lecture of next time will be all about. 42 00:02:10,550 --> 00:02:13,370 But for the time being, let's focus on this technique 43 00:02:13,370 --> 00:02:14,640 and what it means. 44 00:02:14,640 --> 00:02:17,960 We assume that we have the general solution 45 00:02:17,960 --> 00:02:19,350 of the homogeneous equation. 46 00:02:19,350 --> 00:02:25,830 In other words, y sub h is c1u1 of x plus c2u2 x, where again, 47 00:02:25,830 --> 00:02:31,820 by way of review, u1 and u2 are linearly independent solutions 48 00:02:31,820 --> 00:02:33,500 of the homogeneous equation. 49 00:02:33,500 --> 00:02:35,570 Meaning that u1 and u2 are solutions 50 00:02:35,570 --> 00:02:38,060 of the equation, the homogeneous equation, 51 00:02:38,060 --> 00:02:40,220 and they are not constant multiples of one another. 52 00:02:40,220 --> 00:02:41,928 That's going to play a very crucial role, 53 00:02:41,928 --> 00:02:44,540 that they not be constant multiples of one another, 54 00:02:44,540 --> 00:02:48,200 in our punch line in proving how the method of variation 55 00:02:48,200 --> 00:02:49,520 of parameters works. 56 00:02:49,520 --> 00:02:52,190 Anyway, what about this fancy name variation of parameters? 57 00:02:52,190 --> 00:02:53,670 Where does it come from? 58 00:02:53,670 --> 00:02:56,180 And it comes from the fact that we replace the arbitrary 59 00:02:56,180 --> 00:02:59,170 constants by arbitrary functions, 60 00:02:59,170 --> 00:03:03,030 so that we're really now having a variation of the parameter. 61 00:03:03,030 --> 00:03:08,000 See c1 and c2 are parameters, by writing them as functions of x, 62 00:03:08,000 --> 00:03:10,460 you see, I am now varying the parameters, 63 00:03:10,460 --> 00:03:12,650 you see, as I let x take on different values. 64 00:03:12,650 --> 00:03:14,270 So what I'm going to try now is this, 65 00:03:14,270 --> 00:03:17,060 knowing the general solution of this equation, the reduced 66 00:03:17,060 --> 00:03:19,550 equation, I try for a particular solution 67 00:03:19,550 --> 00:03:24,920 of the original equation in the form g1u1 plus g2u2, 68 00:03:24,920 --> 00:03:28,670 where g1 and g2 are now arbitrary functions rather than 69 00:03:28,670 --> 00:03:30,260 arbitrary constants. 70 00:03:30,260 --> 00:03:32,013 And I now go and I look to find out 71 00:03:32,013 --> 00:03:33,680 what the particular solution has to look 72 00:03:33,680 --> 00:03:36,260 like to be the right answer to my problem, 73 00:03:36,260 --> 00:03:40,130 and this is sort of a handwaving type thing only in the sense, 74 00:03:40,130 --> 00:03:41,780 not that the proof isn't rigorous, 75 00:03:41,780 --> 00:03:44,360 but I'm trying to motivate for you how 76 00:03:44,360 --> 00:03:46,280 without the proper hindsight I would have 77 00:03:46,280 --> 00:03:48,140 invented these steps by myself. 78 00:03:48,140 --> 00:03:50,570 Quite frankly, I never would have invented this proof 79 00:03:50,570 --> 00:03:53,870 by myself, but I think I can give you an insight as to how 80 00:03:53,870 --> 00:03:55,760 it comes about, and more importantly, 81 00:03:55,760 --> 00:03:58,250 for those of you who don't know how it comes about 82 00:03:58,250 --> 00:04:00,770 and for even more of you who don't even care how it comes 83 00:04:00,770 --> 00:04:04,580 about, we will have a resume of what the technique means 84 00:04:04,580 --> 00:04:06,650 after we've at least gone through showing what 85 00:04:06,650 --> 00:04:09,020 the proof of the technique is. 86 00:04:09,020 --> 00:04:12,650 What we do is is starting with g1, u1, g2, u2, 87 00:04:12,650 --> 00:04:15,950 where u1 and u2 now are known functions of x, 88 00:04:15,950 --> 00:04:20,570 and g1 and g2 are the undetermined functions of x. 89 00:04:20,570 --> 00:04:23,860 What we say is, OK, let's find yp prime. 90 00:04:23,860 --> 00:04:27,260 So notice that each term over here when we differentiate 91 00:04:27,260 --> 00:04:29,780 gives rise to two terms because we're 92 00:04:29,780 --> 00:04:30,865 differentiating a product. 93 00:04:30,865 --> 00:04:32,490 In other words, there will be one term, 94 00:04:32,490 --> 00:04:35,120 which will be g1 u1 prime, another term, which 95 00:04:35,120 --> 00:04:41,450 will be g1 prime u1, g2, u2 prime, g2 prime, u2, I'm 96 00:04:41,450 --> 00:04:44,608 going to group the terms sort of like this for the time being. 97 00:04:44,608 --> 00:04:46,150 In other words, I take the derivative 98 00:04:46,150 --> 00:04:48,140 and I'm going to group the terms this way. 99 00:04:48,140 --> 00:04:50,360 One reason I want to group the terms this way 100 00:04:50,360 --> 00:04:51,480 is the following. 101 00:04:51,480 --> 00:04:52,040 Look it. 102 00:04:52,040 --> 00:04:54,950 I have picked g1 and g2 completely at random. 103 00:04:54,950 --> 00:04:58,310 That means I have one degree of freedom at my disposal. 104 00:04:58,310 --> 00:05:00,920 In other words, I can still impose a condition 105 00:05:00,920 --> 00:05:05,540 on how g1 and g2 have to be related in order to facilitate 106 00:05:05,540 --> 00:05:08,330 how I can find a solution to this particular equation. 107 00:05:08,330 --> 00:05:09,710 My feeling is this. 108 00:05:09,710 --> 00:05:12,320 In trying to find g1 and g2, I don't 109 00:05:12,320 --> 00:05:17,510 want to have g1, g2, g1 prime, g2 prime, g1 double prime, g2 110 00:05:17,510 --> 00:05:19,490 double prime dangling all over the place. 111 00:05:19,490 --> 00:05:21,980 I would like to hold the number of places 112 00:05:21,980 --> 00:05:25,280 where g1 and g2 occur down to sort of a minimum. 113 00:05:25,280 --> 00:05:28,030 So I'm going to hold these two terms already involved 114 00:05:28,030 --> 00:05:29,600 in the first derivative off here, 115 00:05:29,600 --> 00:05:31,840 I'm going to hold them separately for a while. 116 00:05:31,840 --> 00:05:34,090 The worst that will happen is that this simplification 117 00:05:34,090 --> 00:05:36,070 won't help me at all, in which case 118 00:05:36,070 --> 00:05:37,990 I can look for a different simplification. 119 00:05:37,990 --> 00:05:41,945 At any rate, starting with this, I now find yp double prime. 120 00:05:41,945 --> 00:05:43,570 See, I need the second derivative here. 121 00:05:43,570 --> 00:05:45,040 And how do I differentiate? 122 00:05:45,040 --> 00:05:47,960 Well, each of these terms gives rise to two terms. 123 00:05:47,960 --> 00:05:50,830 Each of these gives rise to two terms because they're products. 124 00:05:50,830 --> 00:05:53,920 And this I'll just leave as symbolically 125 00:05:53,920 --> 00:05:55,810 being differentiated. 126 00:05:55,810 --> 00:05:58,090 In other words, yp double prime is simply 127 00:05:58,090 --> 00:06:01,810 going to be g1u1 double prime plus g1 prime u1 128 00:06:01,810 --> 00:06:06,310 prime plus g2u2 double prime plus g2 prime u2 prime. 129 00:06:06,310 --> 00:06:09,250 In other words, I've differentiated g1u1 prime plus 130 00:06:09,250 --> 00:06:10,780 g2u2 prime. 131 00:06:10,780 --> 00:06:13,120 And the term that I'm holding off separately, 132 00:06:13,120 --> 00:06:16,840 I'll just differentiate that and indicate that by a prime. 133 00:06:16,840 --> 00:06:18,400 Now here's what I'm leading up to. 134 00:06:18,400 --> 00:06:21,430 Notice, by the way, if I were to differentiate this term, 135 00:06:21,430 --> 00:06:24,250 yp double prime would have eight terms in it 136 00:06:24,250 --> 00:06:26,830 instead of just these four. 137 00:06:26,830 --> 00:06:29,380 Also notice a rather interesting thing. 138 00:06:29,380 --> 00:06:34,570 Ultimately, I'm going to take yp double prime, yp prime, and yp 139 00:06:34,570 --> 00:06:37,090 and substitute them into this equation 140 00:06:37,090 --> 00:06:40,070 in order to see what g1 and g2 must look like. 141 00:06:40,070 --> 00:06:43,790 Notice that yp double prime has a g1u1 double prime 142 00:06:43,790 --> 00:06:44,920 determinant. 143 00:06:44,920 --> 00:06:49,150 yp prime has a g1u1 prime terminate, 144 00:06:49,150 --> 00:06:52,420 and yp has a g1u1 terminate. 145 00:06:52,420 --> 00:06:56,950 Similarly for u2 prime, u2 double prime, et cetera. 146 00:06:56,950 --> 00:06:58,550 But the idea is this. 147 00:06:58,550 --> 00:07:01,480 If I now leave this term here out. 148 00:07:01,480 --> 00:07:03,430 In fact, what's the best way to leave it out? 149 00:07:03,430 --> 00:07:06,550 I will now invoke one of my only free choice. 150 00:07:06,550 --> 00:07:08,890 I will say, look it, I will now put a restriction 151 00:07:08,890 --> 00:07:10,960 on what g1 and g2 have to look like. 152 00:07:10,960 --> 00:07:13,150 They will no longer be completely arbitrary, 153 00:07:13,150 --> 00:07:16,750 but rather I will choose them as follows. 154 00:07:16,750 --> 00:07:19,500 Looking at the derivatives g1 prime and g2 prime, 155 00:07:19,500 --> 00:07:23,110 what I will do is I will pick one of these at random 156 00:07:23,110 --> 00:07:26,770 and then choose the other one, so that g1 prime u1 157 00:07:26,770 --> 00:07:29,470 plus g2 prime u2 will be 0. 158 00:07:29,470 --> 00:07:30,250 You see, look it. 159 00:07:30,250 --> 00:07:32,860 u1 and u2 are known functions. 160 00:07:32,860 --> 00:07:38,230 If I pick g2 prime at random, g2 prime is then known, 161 00:07:38,230 --> 00:07:40,930 u1 is then known, u2 two is known. 162 00:07:40,930 --> 00:07:44,530 If I set this equal to 0, I can solve for the g1 prime 163 00:07:44,530 --> 00:07:46,240 that satisfies that equation. 164 00:07:46,240 --> 00:07:49,190 So I am free to impose that particular condition. 165 00:07:49,190 --> 00:07:52,030 So I say, OK, I will set this equal to 0. 166 00:07:52,030 --> 00:07:54,370 Once I set this equal to 0, look what 167 00:07:54,370 --> 00:07:58,570 happens when I compute yp double prime plus p of xyp 168 00:07:58,570 --> 00:08:01,640 prime plus q of xyp in general. 169 00:08:01,640 --> 00:08:02,390 Look what happens. 170 00:08:02,390 --> 00:08:03,130 I get what? 171 00:08:03,130 --> 00:08:09,970 I get a g1 u1 double prime term, plus a g2 u2 double prime term 172 00:08:09,970 --> 00:08:14,980 plus a g1 prime u1 prime term plus a g2 prime u2 prime term. 173 00:08:14,980 --> 00:08:17,090 That all comes from yp double prime. 174 00:08:17,090 --> 00:08:18,715 I'm lining these things up judiciously, 175 00:08:18,715 --> 00:08:21,970 you see, to have you see more emphatically 176 00:08:21,970 --> 00:08:23,500 what's going on here. 177 00:08:23,500 --> 00:08:28,180 Now from the p of xyp prime term, this will give me what? 178 00:08:28,180 --> 00:08:33,309 pg1u1 prime plus pg2u2 prime. 179 00:08:33,309 --> 00:08:39,179 pg1u1 prime plus pg2u2 prime, and finally, the q times 180 00:08:39,179 --> 00:08:42,370 y sub p term, q times y sub p. 181 00:08:42,370 --> 00:08:43,870 Remember what y sub p is. 182 00:08:43,870 --> 00:08:45,990 q times that will give me what? 183 00:08:45,990 --> 00:08:51,400 qg1u1 plus qg2u2. 184 00:08:51,400 --> 00:08:54,790 qg1u1 plus qg2u2. 185 00:08:54,790 --> 00:08:56,920 There's my eight terms, but the beauty 186 00:08:56,920 --> 00:09:01,960 is that because u1 prime and u2 prime were solutions 187 00:09:01,960 --> 00:09:04,010 of the homogeneous equation. 188 00:09:04,010 --> 00:09:06,940 In other words, since L of u1 and L of u2 is 0, 189 00:09:06,940 --> 00:09:09,580 look at what these three terms add up to. 190 00:09:09,580 --> 00:09:12,730 I can factor out a g1 and what's left? 191 00:09:12,730 --> 00:09:19,930 u1 double prime plus pu1 prime plus qu1, 192 00:09:19,930 --> 00:09:25,540 and by definition of u1, that satisfies L of u1 equals 0. 193 00:09:25,540 --> 00:09:27,640 These three terms add up to 0. 194 00:09:27,640 --> 00:09:31,180 These three terms, in a similar way, factoring out the g2, 195 00:09:31,180 --> 00:09:34,420 I get u2 double prime plus pu2 prime plus 196 00:09:34,420 --> 00:09:37,870 qu2, which must be 0 because u2 satisfies 197 00:09:37,870 --> 00:09:39,310 the homogeneous equation. 198 00:09:39,310 --> 00:09:41,410 These add up to 0. 199 00:09:41,410 --> 00:09:44,020 All I have left are these two terms, namely 200 00:09:44,020 --> 00:09:47,680 g1 prime u1 prime plus g2 prime u2 prime, 201 00:09:47,680 --> 00:09:51,100 and since this must be identically equal to f of x, 202 00:09:51,100 --> 00:09:54,280 it must be that these two terms are 203 00:09:54,280 --> 00:09:56,530 identically equal to their sum. 204 00:09:56,530 --> 00:09:58,480 Is identically f of x. 205 00:09:58,480 --> 00:10:02,260 In other words, once I have imposed arbitrarily 206 00:10:02,260 --> 00:10:07,810 this condition, I am forced to accept this condition. 207 00:10:07,810 --> 00:10:10,450 At any rate, whether I'm forced to or not forced to, 208 00:10:10,450 --> 00:10:14,000 the two conditions I now have to fulfill 209 00:10:14,000 --> 00:10:17,470 are these two equations in, shall I say, two unknowns? 210 00:10:17,470 --> 00:10:21,340 Remember, the functions I'm looking for are g1 and g2. 211 00:10:21,340 --> 00:10:25,810 u1 and u2, consequently, u1 prime and u2 prime, 212 00:10:25,810 --> 00:10:27,280 are known functions. 213 00:10:27,280 --> 00:10:31,190 They were the functions that made up the general solution 214 00:10:31,190 --> 00:10:33,190 of the homogeneous equation. 215 00:10:33,190 --> 00:10:35,540 f of x is the given right hand side 216 00:10:35,540 --> 00:10:37,730 of the non-homogeneous equation. 217 00:10:37,730 --> 00:10:40,820 Consequently, all I don't know are g1 and g2. 218 00:10:40,820 --> 00:10:42,770 And by the way, notice, these equations 219 00:10:42,770 --> 00:10:45,230 are in terms of g1 prime and g2 prime. 220 00:10:45,230 --> 00:10:48,560 If I know g1 prime, and I know g2 prime, 221 00:10:48,560 --> 00:10:51,680 I can integrate to find g1 and g2. 222 00:10:51,680 --> 00:10:54,110 You see in other words, to find g1 and g2, 223 00:10:54,110 --> 00:10:58,070 it's efficient to find g1 prime and g2 prime, even, by the way, 224 00:10:58,070 --> 00:11:00,440 if it turns out I can't handle the integral. 225 00:11:00,440 --> 00:11:02,930 The mere fact that they function as integral means 226 00:11:02,930 --> 00:11:05,870 that we know that its integral exists, and we therefore, 227 00:11:05,870 --> 00:11:09,860 say we know what it is, even if we can't express it explicitly. 228 00:11:09,860 --> 00:11:11,420 But that's not the key point. 229 00:11:11,420 --> 00:11:14,600 The key point is that we must be able to solve 230 00:11:14,600 --> 00:11:17,060 this system of equations uniquely, 231 00:11:17,060 --> 00:11:19,850 hopefully-- not even uniquely, but we 232 00:11:19,850 --> 00:11:23,750 hope that we can solve these the g1 prime and g2 prime. 233 00:11:23,750 --> 00:11:26,510 And the only time that we can't solve these equations 234 00:11:26,510 --> 00:11:29,540 for g1 prime and g2 prime would be 235 00:11:29,540 --> 00:11:33,200 when the determinant of coefficients is equal to 0. 236 00:11:33,200 --> 00:11:34,970 In other words, we can solve uniquely 237 00:11:34,970 --> 00:11:37,610 for g1 prime and g2 prime provided 238 00:11:37,610 --> 00:11:40,550 only that this determinant, the terminate coefficients-- 239 00:11:40,550 --> 00:11:44,450 see, g1 prime and g2 prime are our knows, is not 0. 240 00:11:44,450 --> 00:11:45,950 But what is this determinant? 241 00:11:45,950 --> 00:11:49,880 It's u1u2 prime minus u1 prime u2. 242 00:11:49,880 --> 00:11:51,940 That must be unequal to 0. 243 00:11:51,940 --> 00:11:54,230 Look it, I hope by this time you see 244 00:11:54,230 --> 00:11:56,780 what's happening with this trick whenever it comes up. 245 00:11:56,780 --> 00:12:00,260 This seems to suggest the derivative of a quotient. 246 00:12:00,260 --> 00:12:03,440 This would be the derivative of u2 over u1, 247 00:12:03,440 --> 00:12:07,860 if u1 squared had been in the denominator here. 248 00:12:07,860 --> 00:12:09,950 But notice that I can divide through by u1 249 00:12:09,950 --> 00:12:13,770 squared because 0 divided by u1 squared is still 0. 250 00:12:13,770 --> 00:12:15,560 In other words, the left hand side 251 00:12:15,560 --> 00:12:17,600 with a u1 squared in the denominator 252 00:12:17,600 --> 00:12:20,870 is just a derivative of u2 over u1, 253 00:12:20,870 --> 00:12:23,510 and the condition that this not be 0 254 00:12:23,510 --> 00:12:27,720 is simply the condition that u2 over u1 not be a constant. 255 00:12:27,720 --> 00:12:29,280 And this is the key point. 256 00:12:29,280 --> 00:12:32,240 The fact that u1 and u2 were chosen 257 00:12:32,240 --> 00:12:36,360 to give the general solution of y sub h, in other words, 258 00:12:36,360 --> 00:12:39,940 if u1 had been a constant multiple of u2, 259 00:12:39,940 --> 00:12:42,950 we would not have had this be the general solution. 260 00:12:42,950 --> 00:12:45,470 Remember, to find the general solution, 261 00:12:45,470 --> 00:12:48,740 you needed two solutions which were not constant multiples 262 00:12:48,740 --> 00:12:49,740 of one another. 263 00:12:49,740 --> 00:12:52,190 So the fact that we chose u1 and u2, 264 00:12:52,190 --> 00:12:54,510 not just to be solutions of the reduced equation, 265 00:12:54,510 --> 00:12:57,680 the homogeneous equation, but linearly independent solutions, 266 00:12:57,680 --> 00:13:00,860 guarantees the fact that this can't be a constant. 267 00:13:00,860 --> 00:13:02,840 That guarantees the fact that we can 268 00:13:02,840 --> 00:13:05,630 solve for g1 prime and g2 prime, and that 269 00:13:05,630 --> 00:13:08,870 ends the theoretical part of today's lesson. 270 00:13:08,870 --> 00:13:13,700 In summary, leaving out the entire theory, if L of y 271 00:13:13,700 --> 00:13:16,400 equals f of x, with not necessarily 272 00:13:16,400 --> 00:13:20,300 constant coefficients here, and if the general solution 273 00:13:20,300 --> 00:13:24,410 of the homogeneous equation L of y equals 0 is known, 274 00:13:24,410 --> 00:13:27,920 and in particular, is c1u1 plus c2u2, 275 00:13:27,920 --> 00:13:32,210 then a particular solution of L of y 276 00:13:32,210 --> 00:13:41,210 equals f of x is given by g1u1 plus g2u2 where g1 and g2 are 277 00:13:41,210 --> 00:13:46,430 any pair of functions satisfying this pair of equations. 278 00:13:46,430 --> 00:13:48,650 By the way, just in passing, notice 279 00:13:48,650 --> 00:13:53,090 that whereas g1 prime and g2 prime are uniquely determined, 280 00:13:53,090 --> 00:13:58,100 g1 and g2 are determined only up to an arbitrary constant. 281 00:13:58,100 --> 00:14:01,110 For one thing, I only need a particular solution, 282 00:14:01,110 --> 00:14:03,260 so I can drop the arbitrary constant. 283 00:14:03,260 --> 00:14:05,120 For another thing, if you insist that 284 00:14:05,120 --> 00:14:06,650 I put the arbitrary constant in. 285 00:14:10,500 --> 00:14:13,320 Notice that when I multiply out, look what I have left? 286 00:14:13,320 --> 00:14:20,040 g1u1 plus g2u2 plus c1u1 plus c2u2, and that's 287 00:14:20,040 --> 00:14:22,890 just my homogeneous solution back again, 288 00:14:22,890 --> 00:14:25,050 which jibes with the fact that once you've 289 00:14:25,050 --> 00:14:27,990 seen one particular solution, you've seen them all. 290 00:14:27,990 --> 00:14:30,780 Namely, once we have one particular solution, 291 00:14:30,780 --> 00:14:33,060 any other particular solution is obtained 292 00:14:33,060 --> 00:14:38,240 by adding on any solution of the homogeneous equation 293 00:14:38,240 --> 00:14:40,400 to the particular solution obtained. 294 00:14:40,400 --> 00:14:42,350 But that's just, again, an aside. 295 00:14:42,350 --> 00:14:45,470 I think the best way to hammer home what we're talking about 296 00:14:45,470 --> 00:14:48,230 is to come back to the example that we ended 297 00:14:48,230 --> 00:14:50,570 the lecture of last time with-- with which we 298 00:14:50,570 --> 00:14:53,370 ended the lecture of last time. 299 00:14:53,370 --> 00:14:56,270 The example was, if you recall, y double prime plus 300 00:14:56,270 --> 00:14:59,900 y equals secant x. 301 00:14:59,900 --> 00:15:03,380 The point is that because we have constant coefficients 302 00:15:03,380 --> 00:15:06,050 here, we can certainly write down the general solution 303 00:15:06,050 --> 00:15:07,700 of the homogeneous equation. 304 00:15:07,700 --> 00:15:10,370 This is y double prime plus y equals 0. 305 00:15:10,370 --> 00:15:12,410 That leads to the characteristic equation 306 00:15:12,410 --> 00:15:14,270 4r squared plus 1 is 0. 307 00:15:14,270 --> 00:15:17,330 That leads to r equals plus or minus i, 308 00:15:17,330 --> 00:15:20,000 and using our usual technique, that 309 00:15:20,000 --> 00:15:25,820 leads to the general solution c1 sine x plus c2 cosine x. 310 00:15:25,820 --> 00:15:27,770 In other words, in this problem, sine 311 00:15:27,770 --> 00:15:29,870 x will play the role of u1. 312 00:15:29,870 --> 00:15:32,570 Cosine x will play the role of u2. 313 00:15:32,570 --> 00:15:34,610 And now according to the technique, 314 00:15:34,610 --> 00:15:38,240 to find a particular solution of this given equation, 315 00:15:38,240 --> 00:15:40,890 all we must do is write down what? 316 00:15:40,890 --> 00:15:49,680 g1 sine x plus g2 cosine x where g1 prime u1 1 plus g2 prime u2 317 00:15:49,680 --> 00:15:50,810 is 0. 318 00:15:50,810 --> 00:15:54,920 And g1 prime u1 prime-- see, you want a sine x-- 319 00:15:54,920 --> 00:15:59,540 u1 prime cosine x plus g2 prime u2 prime. 320 00:15:59,540 --> 00:16:03,650 u2 is cosine x, so u2 prime is minus sine x. 321 00:16:03,650 --> 00:16:06,410 That must equal f of x, and in our problem, 322 00:16:06,410 --> 00:16:08,480 f of x is secant x. 323 00:16:08,480 --> 00:16:11,300 So these are the two equations and two unknowns 324 00:16:11,300 --> 00:16:14,480 that I have to solve for g1 prime and g2 prime. 325 00:16:14,480 --> 00:16:16,200 The easiest way to do this, I guess, 326 00:16:16,200 --> 00:16:19,220 is to solve for g1 prime, multiply the top equation 327 00:16:19,220 --> 00:16:23,810 by sine x, the bottom equation by cosine x, and add. 328 00:16:23,810 --> 00:16:29,955 If I do that, I get that g1 prime is a common factor. 329 00:16:29,955 --> 00:16:32,920 This is sine squared plus cosine squared, which is 1. 330 00:16:32,920 --> 00:16:34,710 So this is g1 prime. 331 00:16:34,710 --> 00:16:36,960 These two terms here cancel because they're 332 00:16:36,960 --> 00:16:39,270 the same magnitudes with opposite signs. 333 00:16:39,270 --> 00:16:44,310 Cosine x times secant x is 1, so g1 prime is 1. 334 00:16:44,310 --> 00:16:47,280 If the derivative of g1 is identically 1, g1 335 00:16:47,280 --> 00:16:50,370 itself must have been x plus some constant. 336 00:16:50,370 --> 00:16:53,700 And I put the constants in accentuated chalk markings 337 00:16:53,700 --> 00:16:56,170 because all I need is a particular solution. 338 00:16:56,170 --> 00:16:58,440 g1 could be x, all right. 339 00:16:58,440 --> 00:17:01,980 Now the idea is knowing that g1 prime is 1, 340 00:17:01,980 --> 00:17:04,319 coming back to this equation, that tells me 341 00:17:04,319 --> 00:17:09,119 that sine x plus g2 prime cosine x is 0, from which I conclude 342 00:17:09,119 --> 00:17:13,560 that g2 prime is minus sine x over cosine x. 343 00:17:13,560 --> 00:17:17,609 Observing that the derivative of cosine x is minus sine x, 344 00:17:17,609 --> 00:17:23,849 this becomes g2 prime is du over u where u is cosine x. 345 00:17:23,849 --> 00:17:27,300 Integral of du over u is log absolute value 346 00:17:27,300 --> 00:17:28,880 of u plus a constant. 347 00:17:28,880 --> 00:17:31,860 In other words, g2 is log absolute value 348 00:17:31,860 --> 00:17:34,530 cosine x plus some constant. 349 00:17:34,530 --> 00:17:36,600 But again, all I need is what? 350 00:17:36,600 --> 00:17:38,010 A particular solution. 351 00:17:38,010 --> 00:17:39,090 How do I get it? 352 00:17:39,090 --> 00:17:45,030 I multiply u1 sign x by g1 and u2 cosine x by g2. 353 00:17:45,030 --> 00:17:49,950 g1 was x, g2 was log absolute value cosine x. 354 00:17:49,950 --> 00:17:53,400 Here is my particular solution of the equation, 355 00:17:53,400 --> 00:17:56,610 y double prime plus y equals secant x. 356 00:17:56,610 --> 00:17:58,740 And again, notice if I had put in the arbitrary 357 00:17:58,740 --> 00:18:03,240 constants c1 and c2, c1 would have multiplied sine x, 358 00:18:03,240 --> 00:18:05,283 c2 would have multiplied cosine x, 359 00:18:05,283 --> 00:18:07,200 and I would have found out that I not only had 360 00:18:07,200 --> 00:18:10,480 a particular solution here, I had the general solution. 361 00:18:10,480 --> 00:18:11,932 But that's not, again, important. 362 00:18:11,932 --> 00:18:13,890 I just mentioned that so you don't think that I 363 00:18:13,890 --> 00:18:15,540 lost the arbitrary constants. 364 00:18:15,540 --> 00:18:17,700 I want to emphasize the fact that all I 365 00:18:17,700 --> 00:18:19,710 need is a particular solution. 366 00:18:19,710 --> 00:18:22,170 A solution of l of y equals f of x 367 00:18:22,170 --> 00:18:24,980 is all I need to tack on to y sub 368 00:18:24,980 --> 00:18:29,100 h to get the general solution of l of y equals f of x. 369 00:18:29,100 --> 00:18:32,190 At any rate, let's check to see if this is the right answer. 370 00:18:32,190 --> 00:18:35,040 And by the way, before I even check it out, let's 371 00:18:35,040 --> 00:18:38,670 keep in mind in terms of the lecture of last time 372 00:18:38,670 --> 00:18:40,650 when we said it was easy to guess what you had 373 00:18:40,650 --> 00:18:44,580 to differentiate to get a sine or cosine or an exponential 374 00:18:44,580 --> 00:18:47,850 or a power of x, what is the likelihood, 375 00:18:47,850 --> 00:18:50,070 and be humble about this and honest, that you 376 00:18:50,070 --> 00:18:54,180 could have looked at secant x and said look at the function 377 00:18:54,180 --> 00:18:57,990 I want to give me this is going to be x sine x 378 00:18:57,990 --> 00:19:02,820 plus log absolute value of cosine x times cosine x? 379 00:19:02,820 --> 00:19:04,710 See if you can do that without any 380 00:19:04,710 --> 00:19:06,807 of these theories and the like, I don't 381 00:19:06,807 --> 00:19:07,890 think you need the course. 382 00:19:07,890 --> 00:19:10,200 I think you should be out clairvoyantly teaching it. 383 00:19:10,200 --> 00:19:13,060 But look at how complicated the solution is, assuming of course 384 00:19:13,060 --> 00:19:14,110 there is a solution. 385 00:19:14,110 --> 00:19:15,900 Let's check that it really is a solution. 386 00:19:15,900 --> 00:19:19,070 Given that y sub p is this, to differentiate this, 387 00:19:19,070 --> 00:19:24,030 this is a product, this is what? x cosine x plus sine x times 1. 388 00:19:24,030 --> 00:19:25,650 That gives me these two terms. 389 00:19:25,650 --> 00:19:28,630 If I now differentiate this, this is also a product. 390 00:19:28,630 --> 00:19:31,390 This is this times the derivative of cosine x, 391 00:19:31,390 --> 00:19:32,998 which is minus sine x. 392 00:19:32,998 --> 00:19:34,290 And then it's going to be what? 393 00:19:34,290 --> 00:19:36,378 This times the derivative of this, 394 00:19:36,378 --> 00:19:37,920 but the derivative of this we already 395 00:19:37,920 --> 00:19:40,470 know is minus sine x over cosine x. 396 00:19:40,470 --> 00:19:42,240 The cosine x's cancel. 397 00:19:42,240 --> 00:19:45,060 All I'm left with is minus sine x. 398 00:19:45,060 --> 00:19:47,970 If I now look at this, these two terms drop out. 399 00:19:47,970 --> 00:19:49,780 That's my yp prime. 400 00:19:49,780 --> 00:19:52,560 To find yp double prime, again, this 401 00:19:52,560 --> 00:19:55,320 is a product so it's a derivative of the first times 402 00:19:55,320 --> 00:19:58,320 the second, that's cosine x, plus the first, which 403 00:19:58,320 --> 00:20:01,470 is x, times the derivative of the second, which is minus sine 404 00:20:01,470 --> 00:20:03,480 x, that gives me this term. 405 00:20:03,480 --> 00:20:06,570 Now I have to differentiate this term, which is also a product. 406 00:20:06,570 --> 00:20:11,230 That's minus log absolute value cosine x times cosine x. 407 00:20:11,230 --> 00:20:13,360 See, that's this term over here. 408 00:20:13,360 --> 00:20:14,730 And now it's going to be what? 409 00:20:14,730 --> 00:20:17,430 This times the derivative of this. 410 00:20:17,430 --> 00:20:19,530 We already know that the derivative of this 411 00:20:19,530 --> 00:20:21,990 is minus sine x over cosine x. 412 00:20:21,990 --> 00:20:23,880 With a minus sign in front, it just 413 00:20:23,880 --> 00:20:26,070 becomes sine x over cosine x. 414 00:20:26,070 --> 00:20:28,530 Multiplying that by sine x, I get sine 415 00:20:28,530 --> 00:20:30,330 squared x over cosine x. 416 00:20:30,330 --> 00:20:34,530 So yp double prime is this, yp p is this. 417 00:20:34,530 --> 00:20:39,150 If I now add yp double prime to yp, what happens? 418 00:20:39,150 --> 00:20:42,060 Here is an x sine x term appearing, 419 00:20:42,060 --> 00:20:45,700 here is a minus x sine x term appearing, they cancel. 420 00:20:45,700 --> 00:20:48,540 Here's a log absolute value cosine x times cosine 421 00:20:48,540 --> 00:20:52,380 x term appearing, here is the same term with a minus sign, 422 00:20:52,380 --> 00:20:54,120 you see they cancel. 423 00:20:54,120 --> 00:20:55,770 And all I'm left with is what? 424 00:20:55,770 --> 00:21:01,260 yp p double prime plus yp is equal to cosine x plus sine 425 00:21:01,260 --> 00:21:04,310 squared x over cosine x. 426 00:21:04,310 --> 00:21:05,430 You see? 427 00:21:05,430 --> 00:21:08,100 Now I put this over a common denominator. 428 00:21:08,100 --> 00:21:08,970 That gives me what? 429 00:21:08,970 --> 00:21:12,420 Cosine squared x plus signs squared x, which is 1, 430 00:21:12,420 --> 00:21:13,800 over cosine x. 431 00:21:13,800 --> 00:21:17,220 And 1 over cosine x is secant x. 432 00:21:17,220 --> 00:21:20,670 And so indeed, this messy function 433 00:21:20,670 --> 00:21:23,730 is a particular solution of this equation 434 00:21:23,730 --> 00:21:26,080 because it satisfies the equation. 435 00:21:26,080 --> 00:21:29,420 In other words, the general solution of y double prime plus 436 00:21:29,420 --> 00:21:34,400 y equals secant x is simply c1 sine x plus c2 cosine x, 437 00:21:34,400 --> 00:21:35,480 you see? 438 00:21:35,480 --> 00:21:38,570 That's my y sub h. 439 00:21:38,570 --> 00:21:45,680 Plus x sine x plus log absolute value cosine x times cosine x. 440 00:21:45,680 --> 00:21:48,470 And that's the method of variation of parameters. 441 00:21:48,470 --> 00:21:50,870 And where is it used primarily? 442 00:21:50,870 --> 00:21:53,420 When you have to tackle a problem which does not 443 00:21:53,420 --> 00:21:55,790 have constant coefficients or if it 444 00:21:55,790 --> 00:21:58,550 has constant coefficients but the right hand side 445 00:21:58,550 --> 00:22:01,590 isn't as pleasant as e to the mx sine 446 00:22:01,590 --> 00:22:05,360 mx cosine mx or x to the nth power. 447 00:22:05,360 --> 00:22:08,510 By the way, just as a note, as will be proven in the homework 448 00:22:08,510 --> 00:22:12,980 exercises, it turns out that if u1 is any solution of l of y 449 00:22:12,980 --> 00:22:16,850 equals 0, the method that we used in variation 450 00:22:16,850 --> 00:22:18,770 of parameters-- in other words, trying 451 00:22:18,770 --> 00:22:21,310 for a particular solution in the form y sub p 452 00:22:21,310 --> 00:22:26,780 equals g1 u1, rather than c1 u1, g1's a function of x now, 453 00:22:26,780 --> 00:22:30,530 that this will always lead to a second independent solution 454 00:22:30,530 --> 00:22:32,450 of l of y equals 0. 455 00:22:32,450 --> 00:22:34,400 By the way, a little note here, and if we 456 00:22:34,400 --> 00:22:36,920 don't catch this right now, it's not too important 457 00:22:36,920 --> 00:22:39,740 because I'll hammer that home in the exercises. 458 00:22:39,740 --> 00:22:43,520 This is only true for linear homogeneous equations 459 00:22:43,520 --> 00:22:44,630 of order 2. 460 00:22:44,630 --> 00:22:46,490 If the order were greater than 2, 461 00:22:46,490 --> 00:22:50,180 all this technique does it guarantees 462 00:22:50,180 --> 00:22:52,820 that it will reduce this homogeneous equation 463 00:22:52,820 --> 00:22:55,790 to a homogeneous equation of lower order. 464 00:22:55,790 --> 00:22:59,730 The point is that if the order is 2, lower order means 1. 465 00:22:59,730 --> 00:23:03,420 And we already know how to solve equations of order 1. 466 00:23:03,420 --> 00:23:06,120 In other words though, what this means is in particular, 467 00:23:06,120 --> 00:23:10,880 if the order is 2, it means that define the general solution 468 00:23:10,880 --> 00:23:14,570 of y double prime plus p of xy prime plus q of xy 469 00:23:14,570 --> 00:23:16,250 equals f of x. 470 00:23:16,250 --> 00:23:19,970 And this is very important, the use of variation of parameters 471 00:23:19,970 --> 00:23:24,950 requires only that we know one particular solution 472 00:23:24,950 --> 00:23:26,970 of the reduced equation. 473 00:23:26,970 --> 00:23:28,700 In other words, if I could find just one 474 00:23:28,700 --> 00:23:30,910 solution of the homogeneous equation, 475 00:23:30,910 --> 00:23:34,250 but I know the method of variation of parameters 476 00:23:34,250 --> 00:23:38,420 will allow me to find a second linearly independent solution. 477 00:23:38,420 --> 00:23:40,610 That would then give me the general solution 478 00:23:40,610 --> 00:23:43,740 of the reduced equation, the homogeneous equation. 479 00:23:43,740 --> 00:23:45,500 And now knowing the general solution 480 00:23:45,500 --> 00:23:48,140 of the homogeneous equation, the usual method 481 00:23:48,140 --> 00:23:50,480 of variation of parameters is what 482 00:23:50,480 --> 00:23:54,440 allows me then to find the particular solution 483 00:23:54,440 --> 00:23:55,870 of the original equation. 484 00:23:55,870 --> 00:23:58,460 And I then add that onto the general solution 485 00:23:58,460 --> 00:24:00,560 of the homogeneous equation, and I then 486 00:24:00,560 --> 00:24:02,720 have the desired general solution. 487 00:24:02,720 --> 00:24:05,000 The hard part is that when you don't 488 00:24:05,000 --> 00:24:07,160 have constant coefficients, how do you 489 00:24:07,160 --> 00:24:12,160 find even that one solution of the homogeneous 490 00:24:12,160 --> 00:24:13,750 equation that you need? 491 00:24:13,750 --> 00:24:18,370 And that is going to be the discussion for next time. 492 00:24:18,370 --> 00:24:22,750 At any rate then, until next time, that's about it for now. 493 00:24:22,750 --> 00:24:24,910 And we'll see you in our next lecture, when 494 00:24:24,910 --> 00:24:28,030 we're going to talk about the use of power series 495 00:24:28,030 --> 00:24:32,780 in finding solutions to linear differential equations. 496 00:24:32,780 --> 00:24:35,180 NARRATOR: Funding for the publication of this video 497 00:24:35,180 --> 00:24:40,040 was provided by the Gabriella and Paul Rosenbaum Foundation. 498 00:24:40,040 --> 00:24:44,210 Help OCW continue to provide free and open access to MIT 499 00:24:44,210 --> 00:24:49,645 courses by making a donation at ocw.mit.edu/donate.