1 00:00:00,000 --> 00:00:00,720 2 00:00:00,720 --> 00:00:05,439 We're now ready to solve non-homogeneous second-order 3 00:00:05,440 --> 00:00:08,440 linear differential equations with constant coefficients. 4 00:00:08,439 --> 00:00:09,869 So what does all that mean? 5 00:00:09,869 --> 00:00:12,869 Well, it means an equation that looks like this. 6 00:00:12,869 --> 00:00:17,759 A times the second derivative plus B times the first 7 00:00:17,760 --> 00:00:24,990 derivative plus C times the function is equal to g of x. 8 00:00:24,989 --> 00:00:28,389 Before I show you an actual example, I want to show you 9 00:00:28,390 --> 00:00:29,310 something interesting. 10 00:00:29,309 --> 00:00:33,629 That the general solution of this non-homogeneous equation 11 00:00:33,630 --> 00:00:35,770 is actually the general solution of the homogeneous 12 00:00:35,770 --> 00:00:38,030 equation plus a particular solution. 13 00:00:38,030 --> 00:00:39,920 I'll explain what that means in a second. 14 00:00:39,920 --> 00:00:43,340 So let's say that h is a solution of 15 00:00:43,340 --> 00:00:45,425 the homogeneous equation. 16 00:00:45,424 --> 00:00:47,949 17 00:00:47,950 --> 00:00:50,790 And that worked out well, because, h for homogeneous. 18 00:00:50,789 --> 00:00:53,592 h is solution for homogeneous. 19 00:00:53,593 --> 00:00:59,370 20 00:00:59,369 --> 00:01:01,320 There should be some shorthand notation for homogeneous. 21 00:01:01,320 --> 00:01:04,129 22 00:01:04,129 --> 00:01:05,880 So what does that mean? 23 00:01:05,879 --> 00:01:11,699 That means that A times the second derivative of h plus B 24 00:01:11,700 --> 00:01:18,670 times h prime plus C times h is equal to 0. 25 00:01:18,670 --> 00:01:21,980 That's what I mean when I say that h is a solution-- and 26 00:01:21,980 --> 00:01:24,570 actually, let's just say that h is the general solution for 27 00:01:24,569 --> 00:01:26,189 this homogeneous equation. 28 00:01:26,189 --> 00:01:27,789 And we know how to solve that. 29 00:01:27,790 --> 00:01:30,000 Take the characteristic equation depending on how many 30 00:01:30,000 --> 00:01:32,030 roots it has and whether they're real or complex. 31 00:01:32,030 --> 00:01:35,310 You can figure out a general solution. 32 00:01:35,310 --> 00:01:37,189 And then if you have initial conditions, you can substitute 33 00:01:37,189 --> 00:01:39,939 them and get the values of the constants. 34 00:01:39,939 --> 00:01:40,969 Fair enough. 35 00:01:40,969 --> 00:01:45,060 Now let's say that I were to say that g is a solution. 36 00:01:45,060 --> 00:01:47,450 Well no, I already used g up here. 37 00:01:47,450 --> 00:01:48,769 Well, I don't like using vowels. 38 00:01:48,769 --> 00:01:49,929 Let's say j. 39 00:01:49,930 --> 00:01:53,860 Let's say j is a particular solution to this 40 00:01:53,859 --> 00:01:54,790 differential equation. 41 00:01:54,790 --> 00:01:55,520 So what does that mean? 42 00:01:55,519 --> 00:02:03,584 That means that A times j prime prime plus B times j 43 00:02:03,584 --> 00:02:09,409 prime plus C times j is equal to g of x. 44 00:02:09,409 --> 00:02:09,788 Right? 45 00:02:09,788 --> 00:02:20,149 So we're just defining j of x to be a particular solution. 46 00:02:20,150 --> 00:02:25,180 47 00:02:25,180 --> 00:02:32,150 Now what I want to show you is that j of x plus h of x is 48 00:02:32,150 --> 00:02:35,819 also going to be a solution to this original equation. 49 00:02:35,819 --> 00:02:38,729 And that it's the general solution for this 50 00:02:38,729 --> 00:02:40,039 non-homogeneous equation. 51 00:02:40,039 --> 00:02:41,799 And before I just do it 52 00:02:41,800 --> 00:02:43,380 mathematically, what's the intuition? 53 00:02:43,379 --> 00:02:46,199 Well, when you substitute h here, you get 0. 54 00:02:46,199 --> 00:02:49,339 When you substitute j here, you get g of x. 55 00:02:49,340 --> 00:02:51,300 So when you add them together, you're going to get 56 00:02:51,300 --> 00:02:52,950 0 plus g of x here. 57 00:02:52,949 --> 00:02:53,929 So you're going to get g of x here. 58 00:02:53,930 --> 00:02:55,120 And I'll show you that right now. 59 00:02:55,120 --> 00:03:00,349 So let's say I wanted to substitute h plus j here. 60 00:03:00,349 --> 00:03:02,984 And I'll do it in a different color. 61 00:03:02,985 --> 00:03:06,460 A-- so the second derivative of the sum of those two 62 00:03:06,460 --> 00:03:08,520 functions is going to be the second derivative of both of 63 00:03:08,520 --> 00:03:16,090 them summed up-- plus B times the first derivative of the 64 00:03:16,090 --> 00:03:20,490 sum plus C times the sum of the functions. 65 00:03:20,490 --> 00:03:23,510 66 00:03:23,509 --> 00:03:25,969 And my goal is to show that this is equal to g of x. 67 00:03:25,969 --> 00:03:27,599 So what is this simplified to? 68 00:03:27,599 --> 00:03:31,989 Well if we take all the h terms, we get Ah prime prime 69 00:03:31,990 --> 00:03:39,978 plus Bh prime plus Ch plus, let's do all the j terms. Aj 70 00:03:39,978 --> 00:03:48,800 prime prime plus Bj prime plus Cj. 71 00:03:48,800 --> 00:03:51,710 Well by definition of how we defined h and j, what 72 00:03:51,710 --> 00:03:54,260 is this equal to? 73 00:03:54,259 --> 00:03:57,359 We said that h is a solution for the homogeneous equation, 74 00:03:57,360 --> 00:03:59,610 or that this expression is equal to 0. 75 00:03:59,610 --> 00:04:01,820 So that equals 0. 76 00:04:01,819 --> 00:04:05,909 And by our definition for j, what does this equal? 77 00:04:05,909 --> 00:04:09,210 We said j is a particular solution for the 78 00:04:09,210 --> 00:04:12,830 non-homogeneous equation, or that this expression is 79 00:04:12,830 --> 00:04:14,080 equal to g of x. 80 00:04:14,080 --> 00:04:18,009 81 00:04:18,009 --> 00:04:21,680 So when you substitute h plus j into this differential 82 00:04:21,680 --> 00:04:23,600 equation on the left-hand side. 83 00:04:23,600 --> 00:04:26,740 On the right-hand side, true enough, you get g of x. 84 00:04:26,740 --> 00:04:31,189 So we've just shown that if you define h and j this way, 85 00:04:31,189 --> 00:04:38,379 that the function, we'll call it k of x is equal to h of x 86 00:04:38,379 --> 00:04:39,490 plus j of x. 87 00:04:39,490 --> 00:04:41,389 I'm running out of space. 88 00:04:41,389 --> 00:04:43,289 That is the general solution. 89 00:04:43,290 --> 00:04:46,830 I haven't proven that is the most general solution, but I 90 00:04:46,829 --> 00:04:48,629 think you have the intuition, right? 91 00:04:48,629 --> 00:04:51,149 Because the general solution on the homogeneous one that 92 00:04:51,149 --> 00:04:54,949 was the most general solution, and now we're adding a 93 00:04:54,949 --> 00:04:57,240 particular solution that gets you the g of x on the 94 00:04:57,240 --> 00:04:58,620 right-hand side. 95 00:04:58,620 --> 00:05:01,829 That might be very confusing to you, so let's actually try 96 00:05:01,829 --> 00:05:04,469 to do it with some real numbers. 97 00:05:04,470 --> 00:05:07,190 And I think it'll make a lot more sense. 98 00:05:07,189 --> 00:05:09,100 Let's say we have the differential equations-- and 99 00:05:09,100 --> 00:05:10,970 I'm going to teach you a technique now for figuring out 100 00:05:10,970 --> 00:05:14,690 that j in that last example. 101 00:05:14,689 --> 00:05:17,500 So how do you figure out that particular solution? 102 00:05:17,500 --> 00:05:18,839 Let's say I have the differential equation the 103 00:05:18,839 --> 00:05:24,909 second derivative of y minus 3 times the first derivative 104 00:05:24,910 --> 00:05:29,860 minus 4 times y is equal to 3e to the 2x. 105 00:05:29,860 --> 00:05:32,680 106 00:05:32,680 --> 00:05:36,259 So, the first step is we want the general solution of the 107 00:05:36,259 --> 00:05:38,659 homogeneous equation. 108 00:05:38,660 --> 00:05:40,620 And in that example I just did, that would have 109 00:05:40,620 --> 00:05:42,250 been our h of x. 110 00:05:42,250 --> 00:05:47,310 So we want the solution of y prime prime minus 3y prime 111 00:05:47,310 --> 00:05:49,850 minus 4y is equal to 0. 112 00:05:49,850 --> 00:05:53,060 Take the characteristic equation. 113 00:05:53,060 --> 00:05:55,030 This 4 is equal to 0. 114 00:05:55,029 --> 00:06:02,949 r minus 4 times r plus 1 is equal to 0. 115 00:06:02,949 --> 00:06:08,759 2 roots, r could be 4 or negative 1. 116 00:06:08,759 --> 00:06:12,610 And so our general solution-- I'll call that h. 117 00:06:12,610 --> 00:06:14,520 Well, let's call that y general. 118 00:06:14,519 --> 00:06:17,060 y sub g. 119 00:06:17,060 --> 00:06:21,439 So our general solution is equal to-- and we've done this 120 00:06:21,439 --> 00:06:28,810 many times-- C1 e to the 4x plus C2 e to the minus 121 00:06:28,810 --> 00:06:30,660 1x, or minus x. 122 00:06:30,660 --> 00:06:31,640 Fair enough. 123 00:06:31,639 --> 00:06:34,209 So we solved the homogeneous equation. 124 00:06:34,209 --> 00:06:38,259 So how do we get, in that last example, a j of x that will 125 00:06:38,259 --> 00:06:39,819 give us a particular solution, so on the 126 00:06:39,819 --> 00:06:42,029 right-hand side we get this. 127 00:06:42,029 --> 00:06:43,369 Well here we just have to think a little bit. 128 00:06:43,370 --> 00:06:46,319 And this method is called The Method of Undetermined 129 00:06:46,319 --> 00:06:46,899 Coefficients. 130 00:06:46,899 --> 00:06:50,259 And you have to say, well, if I want some function where I 131 00:06:50,259 --> 00:06:53,509 take a second derivative and add that or subtracted some 132 00:06:53,509 --> 00:06:56,610 multiple of its first derivative minus some multiple 133 00:06:56,610 --> 00:06:59,670 of the function, I get e to the 2x. 134 00:06:59,670 --> 00:07:01,890 That function and its derivatives and its second 135 00:07:01,889 --> 00:07:03,860 derivatives must be something of the form, something 136 00:07:03,860 --> 00:07:05,550 times e to the 2x. 137 00:07:05,550 --> 00:07:06,840 So essentially we take a guess. 138 00:07:06,839 --> 00:07:12,769 We say well what does it look like when we take the various 139 00:07:12,769 --> 00:07:15,269 derivatives and the functions and we multiply multiples of 140 00:07:15,269 --> 00:07:16,409 it plus each other? 141 00:07:16,410 --> 00:07:17,170 And all of that. 142 00:07:17,170 --> 00:07:21,230 We would get e the to 2x or some multiple of e to the 2x. 143 00:07:21,230 --> 00:07:25,970 Well, a good guess could just be that j-- well I'll call it 144 00:07:25,970 --> 00:07:28,460 y particular. 145 00:07:28,459 --> 00:07:33,099 Our particular solution here could be that-- and particular 146 00:07:33,100 --> 00:07:35,170 solution I'm using a little different than the particular 147 00:07:35,170 --> 00:07:37,509 solution when we had initial conditions. 148 00:07:37,509 --> 00:07:40,399 Here we can view this as a particular solution. 149 00:07:40,399 --> 00:07:43,679 A solution that gives us this on the right-hand side. 150 00:07:43,680 --> 00:07:49,449 So let's say that the one I pick is some constant A times 151 00:07:49,449 --> 00:07:51,526 e to the 2x. 152 00:07:51,526 --> 00:07:56,100 If that's my guess, then the derivative of that is equal to 153 00:07:56,100 --> 00:07:59,450 2Ae the to 2x. 154 00:07:59,449 --> 00:08:02,490 And the second derivative of that, of my particular 155 00:08:02,490 --> 00:08:07,310 solution, is equal to 4Ae to the 2x. 156 00:08:07,310 --> 00:08:09,439 And now I can substitute in here, and let's see if I can 157 00:08:09,439 --> 00:08:11,740 solve for A, and then I'll have my particular solution. 158 00:08:11,740 --> 00:08:14,030 So the second derivitive, that's this. 159 00:08:14,029 --> 00:08:21,659 So I get 4Ae to the 2x minus 3 times the first derivitive. 160 00:08:21,660 --> 00:08:22,760 So minus 3 times this. 161 00:08:22,759 --> 00:08:30,550 So that's minus 6Ae to the 2x minus 4 times the function. 162 00:08:30,550 --> 00:08:36,750 So minus 4Ae to the 2x, and all of that is going to be 163 00:08:36,750 --> 00:08:39,928 equal to 3e to the 2x. 164 00:08:39,928 --> 00:08:43,139 Well we know e to the 2x equal 0, so we can divide 165 00:08:43,139 --> 00:08:44,149 both sides by that. 166 00:08:44,149 --> 00:08:47,120 Just factor it out, really. 167 00:08:47,120 --> 00:08:48,970 Get rid of all of the e's to the 2x. 168 00:08:48,970 --> 00:08:51,340 On the left-hand side, we have 4A and a minus 4A. 169 00:08:51,340 --> 00:08:53,300 Well, those cancel out. 170 00:08:53,299 --> 00:08:58,539 And then lo and behold, we have minus 6A is equal to 3. 171 00:08:58,539 --> 00:09:03,399 Divide both sides by 6 and get A is equal to minus 1/2. 172 00:09:03,399 --> 00:09:03,939 So there. 173 00:09:03,940 --> 00:09:05,330 We have our particular solution. 174 00:09:05,330 --> 00:09:11,710 It is equal to minus 1/2 e to the 2x. 175 00:09:11,710 --> 00:09:14,639 And now, like I just showed you before I cleared the 176 00:09:14,639 --> 00:09:18,389 screen, our general solution of this non-homogeneous 177 00:09:18,389 --> 00:09:21,649 equation is going to be our particular solution plus the 178 00:09:21,649 --> 00:09:23,789 general solution to the homogeneous equation. 179 00:09:23,789 --> 00:09:27,169 So we can call this the most general 180 00:09:27,169 --> 00:09:28,769 solution-- I don't know. 181 00:09:28,769 --> 00:09:30,360 I'll just call it y. 182 00:09:30,360 --> 00:09:41,230 It is our general solution C1e to the 4x plus C2e to the 183 00:09:41,230 --> 00:09:45,300 minus x plus our particular solution we found. 184 00:09:45,299 --> 00:09:51,839 So that's minus 1/2e to the 2x. 185 00:09:51,840 --> 00:09:53,300 Pretty neat. 186 00:09:53,299 --> 00:09:55,779 Anyway, I'll do a couple more examples of this. 187 00:09:55,779 --> 00:09:56,789 And I think you'll get the hang of it. 188 00:09:56,789 --> 00:10:00,559 In the next examples, we'll do something other than an e to 189 00:10:00,559 --> 00:10:02,259 the 2x or an e function here. 190 00:10:02,259 --> 00:10:05,750 We'll try to do stuff with polynomials and trig 191 00:10:05,750 --> 00:10:06,860 functions as well. 192 00:10:06,860 --> 00:10:09,440 I'll see you in the next video. 193 00:10:09,440 --> 00:10:10,400