If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:11:00

Video transcript

let's do some more non homogeneous equations so let's take the same problem but we'll change the right-hand side because I think you know how to solve the essentially the homogenous version so same problem as we did in the last video the second derivative of Y minus three times the first derivative of Y minus four times the function and now in the last example we had the non-homogeneous part was three e to the 2x but we're tired of dealing with exponent functions so let's make it a trigonometric function so let's say it equals two sine of X so the first step you do is what we did what we've been doing is you take the character you essentially solve the homogeneous equation so this left-hand side is equal to zero you do that by getting the characteristic equation R squared minus three R minus four is equal to 0 you get the solutions R is equal to 4 R is equal to minus one and then you get that general solution we did this in the last video you get the general solution of the homogeneous maybe we'll call this the homogenous solution why homogeneous we got with c1 e to the 4x plus c2 e to the minus X and that's all in good but in order to get the general solution of this non-homogeneous equation I have to take the solution of the homogenous equation if this were equal to 0 and then add that to a particular solution that satisfies this equation that satisfies that that when you when you take the second derivative minus 3 times the first minus 4 times the function I actually get 2 sine of X and here once again we'll use undetermined coefficients and undetermined coefficients you just think to yourself what function when I take its second and first derivatives and add and subtract multiples of them to each other will I get sine of X well two functions end up with sine of X when you take first and second derivatives and that's sine and cosine of X so it's a good guess and that's really what you're doing in the method of undetermined coefficients you take a guess of a particular solution and then you solve for the undetermined coefficients so let's say that our guess is why why is equal to I don't know some coefficient times sine of X and this if this was sine of 2x I'd put a times sine of 2x here just because I want its derivatives - I still want no matter what happens here I want the sine of two X's or maybe cosine of two X's so still exist if this was a sine of 2x there's nothing I could do to a sine of X or nothing at least trivial that I could do to sine of X that would end up with a sine of 2x so whatever is here I want here plus cosine of 2x plus be some coefficient undetermined coefficient times cosine of X and once again this was sine of 2x I'd want a cosine of 2x here so let's figure out its first and second derivatives so the first derivative of this Y prime is equal to a cosine of X cosine derivative is minus sine so minus B sine of X and then the second derivative I'll write down here the second derivative is equal to what derivative of cosine is minus sine so minus a sine of X minus B cosine of X minus V cosine of X I think you're starting to see the hardest thing in most differential equations problems is not making careless mistakes it's a lot of algebra and and and and a lot of fairly basic calculus wind and the real trick is to not make careless mistakes every time I say that I tend to make one so I'm going to focus extra right now so anyway let's take these and substitute them back into into this this non-homogeneous equation let's see if I can solve for a and B so the second derivative is that I'm going to add from that I'm going to so let me just rewrite it just so that you see what I'm doing so I'm going to take the second derivative Y prime prime so that's minus a sine of X minus B cosine of X I'm going to add minus three times the first derivative to that I'm going to write the signs under the sines and the cosines under the cosine so minus three times this so the sign is let's see it's plus 3b sine of X so 3 B sine of X minus 3 times this so minus 3a minus 3a cosine of X and then minus 4 times 4 times our original function so minus 4 minus 4 sine of X right minus 4 times that minus 4 times this minus 4b cosine of X and when I take the sum of all of those when I when I that's essentially the left-hand side of this equation when I take the sum of all of that that is equal to 2 sine of X I could have written them out in a line but we've just been more confusing and now this is not this makes it easy to add up the sine of X is in the cosine of X's so if I add up all the coefficients on the sine of X I get minus a plus 3b minus 4a so that looks like minus 5a plus 3b sine of X plus and now what are the coefficients here what are all the coefficients here I have minus B and then I have another minus 4 B so minus 5b and then minus 3a so minus 3a minus 5b ran out of space cosine of X this is a cosine of X should go right here so anyway how do I solve for a and B well I have the five minus five a plus 3b is equal to whatever coefficients in front of sine of X here so minus 5a plus 3b must be equal to 2 and then minus 3a minus 5b is a coefficient on cosine of X although I kind of squeezed in the cosine of X here right so this is this must be equal to whatever the coefficient on cosine of X is on the right hand side well the cosine the coefficient of cosine of X on the right inside is zero so that sets up a system of two unknowns with two equations a linear system so we get minus 5a plus 3b is equal to two and we get minus 3a minus 5b is equal to zero equal to zero and let's see if I can simplify this a little bit I see this is a system of two unknowns two equations if I multiply the top equation by five thirds right actually let me multiply let me multiply the top equation by five thirds I get minus 25 over 3a plus 5b is equal to 5/3 times this 5/3 times two is ten thirds 10 thirds and the bottom equation is I have minus 3a minus 5b is equal to zero let's add the two equations I get ten thirds is equal to these cancel out and let's see that's minus 25 over 3 minus 9 over 3 right minus 9 over 3 a is equal to 10 thirds it's getting a little bit messier than I like but we'll soldier on so let's see minus 5 25 minus 9 what's minus 25 minus 9 so that is 34 so we get 34 over 3 a is equal to 10 over 3 or let's see we can get rid of we can multiply both sides by 3 divide both sides by 34 a is equal to 10 over 34 which is equal to 5 over 17 nice ugly numb five over seventeen and now we can solve for B so let's see minus three times a this color is nauseating me minus three times a five over seventeen minus five B is equal to zero so that's what minus 15 over seventeen is equal to minus is equal to plus 5b I just took this put on the right-hand side and then divide both sides by divide both sides by five actually let me make sure oh you know what I realize I mean it comes mistake here minus 25 minus 9 that's minus 34 over 3 so minus 34 a is equal to 10 ay is equal to minus 10 over 34 or minus 5 over 17 so minus 3 times minus 5 over 17 so that's equal to plus 5 15 over 17 is equal to plus 5 B right and then we get B is equal to 3 over 17 that was hairy and notice the hard part was not losing your negative signs but anyway we now have our particular solution to this right our particular solution is let me try to write in a non nauseating color although I think I picked a nauseating one the particular solution is a minus 5 over 17 sine of X right that was a coefficient on sine of X plus B plus 3 over 17 times cosine of X and if we look at our original problem the general solution now to this non-homogeneous equation would be this which is the general solution to the homogeneous equation which we've done many videos on plus now our particular solution that we solved using the method of undetermined coefficient so if you just take that and add it to that you're done and I am out of time see you in the next video