1 00:00:00,000 --> 00:00:00,670 2 00:00:00,670 --> 00:00:04,059 Let's do another example of solving a nonhomogeneous 3 00:00:04,059 --> 00:00:07,169 linear differential equation with a constant coefficient. 4 00:00:07,169 --> 00:00:08,869 And the left-hand side is going to be the same one that 5 00:00:08,869 --> 00:00:10,559 we've been doing. 6 00:00:10,560 --> 00:00:14,980 The second derivative of y minus 3 times the first 7 00:00:14,980 --> 00:00:22,620 derivative minus 4 times y is equal to-- and now instead of 8 00:00:22,620 --> 00:00:25,220 having an exponential function or a trigonometric functional, 9 00:00:25,219 --> 00:00:28,164 we'll just have a simple-- well, it just looks an x 10 00:00:28,164 --> 00:00:30,000 squared term, but it's a polynomial. 11 00:00:30,000 --> 00:00:30,589 Right? 12 00:00:30,589 --> 00:00:33,200 And you know how to solve the general solution of the 13 00:00:33,200 --> 00:00:36,170 homogeneous equation if this were 0. 14 00:00:36,170 --> 00:00:38,440 So we're going to focus just now on the particular 15 00:00:38,439 --> 00:00:40,559 solution, then we can later add that to the general 16 00:00:40,560 --> 00:00:43,710 solution of a nonhomogeneous equation, to get the solution. 17 00:00:43,710 --> 00:00:48,410 So what's a good guess for a particular solution? 18 00:00:48,409 --> 00:00:50,439 Well, when we had exponentials, we guessed that 19 00:00:50,439 --> 00:00:51,729 our solution would be an exponential. 20 00:00:51,729 --> 00:00:54,199 When we had trigonometric functions, we guessed that our 21 00:00:54,200 --> 00:00:56,730 solution would be trigonomretric. 22 00:00:56,729 --> 00:00:59,229 So since we have a polynomial here that makes this 23 00:00:59,229 --> 00:01:02,289 differential equation nonhomogeneous, let's guess 24 00:01:02,289 --> 00:01:05,689 that a particular solution is a polynomial. 25 00:01:05,689 --> 00:01:06,939 And that makes sense. 26 00:01:06,939 --> 00:01:09,679 27 00:01:09,680 --> 00:01:11,430 If you take a second-degree polynomial, take its 28 00:01:11,430 --> 00:01:13,620 derivatives and add and subtract, you should hopefully 29 00:01:13,620 --> 00:01:15,560 get another second-degree polynomial. 30 00:01:15,560 --> 00:01:22,650 So let's guess that it is Ax squared plus Bx plus C. 31 00:01:22,650 --> 00:01:24,550 And what would be a second derivative? 32 00:01:24,549 --> 00:01:31,094 Well a second derivative would be 2Ax plus B. 33 00:01:31,094 --> 00:01:34,349 34 00:01:34,349 --> 00:01:36,030 Sorry, this is the first derivitive. 35 00:01:36,030 --> 00:01:40,879 The second derivative would be 2A. 36 00:01:40,879 --> 00:01:44,489 And now we can substitute back into the original equation. 37 00:01:44,489 --> 00:01:51,079 We get the second derivitive, 2A minus 3 times the first 38 00:01:51,079 --> 00:01:52,189 derivitive. 39 00:01:52,189 --> 00:01:57,269 So minus 3A-- oh no, sorry. 40 00:01:57,269 --> 00:01:58,289 Minus 3 times this. 41 00:01:58,290 --> 00:02:09,360 So minus 6Ax minus 3B minus 4 times the function itself. 42 00:02:09,360 --> 00:02:20,610 So minus 4Ax squared minus 4Bx minus 4C. 43 00:02:20,610 --> 00:02:22,350 That's just 4 times all of that. 44 00:02:22,349 --> 00:02:24,840 That's going to equal 4x squared. 45 00:02:24,840 --> 00:02:27,629 46 00:02:27,629 --> 00:02:30,009 And I'll just group our x squared, our x and our 47 00:02:30,009 --> 00:02:33,229 constant terms, and then we could try to solve for the 48 00:02:33,229 --> 00:02:34,229 coeficients. 49 00:02:34,229 --> 00:02:34,909 So let's see. 50 00:02:34,909 --> 00:02:38,210 I have one x squared term here. 51 00:02:38,210 --> 00:02:41,305 So it's minus 4Ax squared. 52 00:02:41,305 --> 00:02:45,540 53 00:02:45,539 --> 00:02:47,039 And then what are my x terms? 54 00:02:47,039 --> 00:02:51,909 I have minus 6Ax minus 4Bx. 55 00:02:51,909 --> 00:02:58,750 So then say plus minus 6A minus 4B times x. 56 00:02:58,750 --> 00:03:01,210 I just added the coefficients. 57 00:03:01,210 --> 00:03:04,379 And then finally we get our constant terms. 2A 58 00:03:04,379 --> 00:03:06,530 minus 3B minus 4C. 59 00:03:06,530 --> 00:03:13,689 60 00:03:13,689 --> 00:03:16,594 And all of that will equal 4x squared. 61 00:03:16,594 --> 00:03:23,180 62 00:03:23,180 --> 00:03:25,510 Now how do we solve for A, B, and C? 63 00:03:25,509 --> 00:03:30,009 Well, whatever the x squared coefficients add up on this 64 00:03:30,009 --> 00:03:31,840 side, it should equal 4. 65 00:03:31,840 --> 00:03:35,590 Whatever the x coefficients add up on this side, it should 66 00:03:35,590 --> 00:03:38,689 be equal to 0, right? 67 00:03:38,689 --> 00:03:43,340 Because you can view this as plus 0x, right? 68 00:03:43,340 --> 00:03:46,750 And then you could say plus 0 constant as well. 69 00:03:46,750 --> 00:03:48,840 So the constants should also add up to 0. 70 00:03:48,840 --> 00:03:49,900 So let's do that. 71 00:03:49,900 --> 00:03:52,210 So first let's do the x squared term. 72 00:03:52,210 --> 00:03:56,555 So minus 4A should be equal to 4. 73 00:03:56,555 --> 00:04:04,090 74 00:04:04,090 --> 00:04:09,580 And then that tells us that A is equal to minus 1. 75 00:04:09,580 --> 00:04:10,870 Fair enough. 76 00:04:10,870 --> 00:04:14,980 Now the x terms. Minus 6A, minus 4B, that 77 00:04:14,979 --> 00:04:16,879 should be equal to 0. 78 00:04:16,879 --> 00:04:17,180 Right? 79 00:04:17,180 --> 00:04:17,930 So let's write that down. 80 00:04:17,930 --> 00:04:20,278 We know what A is, so let's substitute. 81 00:04:20,278 --> 00:04:24,790 So minus 6 times A, so minus 6 times minus 1. 82 00:04:24,790 --> 00:04:35,270 So that's 6 minus 4B is equal to 0. 83 00:04:35,269 --> 00:04:40,930 So we get 4B-- I'm just putting 4B on this side and 84 00:04:40,930 --> 00:04:41,519 then switching. 85 00:04:41,519 --> 00:04:43,180 4B is equal to 6. 86 00:04:43,180 --> 00:04:49,170 And B is equal to-- 6 divided by 4 is 3/2. 87 00:04:49,170 --> 00:04:52,640 And then finally the constant term should also equal 0, so 88 00:04:52,639 --> 00:04:54,750 let's solve for those. 89 00:04:54,750 --> 00:04:58,910 2 times A, that's minus 2. 90 00:04:58,910 --> 00:05:00,500 Minus 3 times B. 91 00:05:00,500 --> 00:05:02,569 Well, that's minus 3 times this. 92 00:05:02,569 --> 00:05:10,389 So minus 9/2 minus 4C is equal to 0. 93 00:05:10,389 --> 00:05:11,579 So let's see. 94 00:05:11,579 --> 00:05:12,959 I don't want to make a careless mistake. 95 00:05:12,959 --> 00:05:21,319 So this is minus 4 minus 9/2, right? 96 00:05:21,319 --> 00:05:25,069 That's minus 4/2 minus 9/2-- and we could take the 4C and 97 00:05:25,069 --> 00:05:27,259 put it on that side-- it's equal to 4C. 98 00:05:27,259 --> 00:05:31,170 99 00:05:31,170 --> 00:05:33,390 What's minus 4 minus 9? 100 00:05:33,389 --> 00:05:39,939 That's minus 13/2. 101 00:05:39,939 --> 00:05:44,459 Minus 13/2 is equal to 4C. 102 00:05:44,459 --> 00:05:51,479 4C, divide both sides by 4, and then you get C is equal to 103 00:05:51,480 --> 00:05:58,590 minus 13/8. 104 00:05:58,589 --> 00:06:01,089 And I think I haven't made a careless mistake. 105 00:06:01,089 --> 00:06:04,049 So if I haven't, then our particular 106 00:06:04,050 --> 00:06:07,370 solution, we now know. 107 00:06:07,370 --> 00:06:09,340 Well, let me write the whole solution. 108 00:06:09,339 --> 00:06:09,989 So. 109 00:06:09,990 --> 00:06:12,910 And this is a nice stretch of horizontal real estate. 110 00:06:12,910 --> 00:06:14,490 So let's write our solution. 111 00:06:14,490 --> 00:06:17,889 Our solution is going to be equal to the particular 112 00:06:17,889 --> 00:06:21,099 solution, which is Ax squared, so that's minus 1x squared. 113 00:06:21,100 --> 00:06:23,950 114 00:06:23,949 --> 00:06:35,029 Ax squared plus Bx plus 3/2x plus C minus 13/8. 115 00:06:35,029 --> 00:06:36,359 So this is the particular solution. 116 00:06:36,360 --> 00:06:37,670 We solved for A, B, and C. 117 00:06:37,670 --> 00:06:41,520 We determined the undetermined coefficient. 118 00:06:41,519 --> 00:06:44,279 And now if we want the general solution, we add to that the 119 00:06:44,279 --> 00:06:46,399 general solution of the homogeneous equation. 120 00:06:46,399 --> 00:06:49,089 121 00:06:49,089 --> 00:06:52,939 What was that? y prime minus 3y prime minus 122 00:06:52,939 --> 00:06:55,360 4y is equal to 0. 123 00:06:55,360 --> 00:06:57,280 And we've solved this multiple times. 124 00:06:57,279 --> 00:07:00,429 We know that the general solution to the homogeneous 125 00:07:00,430 --> 00:07:08,040 equation is C1e to the 4x plus C2e to the minus x, right? 126 00:07:08,040 --> 00:07:10,040 You just take the characteristic equation r 127 00:07:10,040 --> 00:07:13,400 squared minus 3r minus 4. 128 00:07:13,399 --> 00:07:13,929 What did you get? 129 00:07:13,930 --> 00:07:20,090 You get r minus 4 times r plus 1, and then that's how you get 130 00:07:20,089 --> 00:07:20,939 minus 1 and 4. 131 00:07:20,939 --> 00:07:21,810 Anyway. 132 00:07:21,810 --> 00:07:24,879 So if this is the general solution to the homogeneous 133 00:07:24,879 --> 00:07:28,350 equation, this a particular solution to the 134 00:07:28,350 --> 00:07:30,080 nonhomogeneous equation. 135 00:07:30,079 --> 00:07:32,180 The general solution to the nonhomogeneous equation is 136 00:07:32,180 --> 00:07:33,150 going to be the sum of the two. 137 00:07:33,149 --> 00:07:34,500 So let's add that. 138 00:07:34,500 --> 00:07:44,199 So plus C1e to the 4x plus C2e to the minus x. 139 00:07:44,199 --> 00:07:45,229 So there you. 140 00:07:45,230 --> 00:07:46,720 I don't think that was too painful. 141 00:07:46,720 --> 00:07:49,680 The most painful part was just making sure that you don't 142 00:07:49,680 --> 00:07:52,240 make a careless mistake with the algebra. 143 00:07:52,240 --> 00:07:55,360 But using a fairly straightforward, really 144 00:07:55,360 --> 00:07:58,210 algebraic technique, we were able to get a fairly fancy 145 00:07:58,209 --> 00:08:03,069 solution to this second order linear nonhomogeneous 146 00:08:03,069 --> 00:08:06,089 differential equation with constant coefficients. 147 00:08:06,089 --> 00:08:08,359 See you in the next video. 148 00:08:08,360 --> 00:08:08,900