PLAY GAME NOW

30.04.2024 Undetermined Coefficients: Solving non-homogeneous ODEs


� � 
LIVE � �  � � 


30.04.2024

In this video we're going to learn the. method. of undetermined coefficients so far in. our study of. second order differential equations. we've talked only about. what i'll call constant coefficient. differential equations this is where the. left side has. only constant coefficients in front of. the various terms y y prime and y. double prime but when we study constant. coefficients thus far the right hand. side is always being. zero what we call homogeneous but now i. want to figure out how do i deal if the. right hand side is not zero if it's. some other function of the independent. variable like. three e to the two t what do i do there. so as you can probably tell this video. is part of an entire. series on differential equations the. link to the playlist and the free and. open source textbook that accompanies it.

Is down in the description so i'd. encourage you to check that out okay so. some terminology first. i'm going to call a particular solution. y. sub p for particular to be just any. solution. not the general solution not all. possible solutions. just any one that you so wish and then. i'm going to let y sub h be the general. solution. to the same equation if it was. homogeneous so you keep the lefthand. side but you just set the righthand. side being equal to zero. which is indeed a type of equation that. we know how to solve. so y of h is the general solution which. means it has constants. and y of p is just any one particular. solution. now i want to consider what happens if i. add those two things together the. homogeneous solution plus the particular. well. i can just plug this in so let me take. the lefthand side and everywhere i'm.

Going to plug in. the homogeneous plus the particular. solution so two derivatives of that. thing. minus two times one derivative of that. minus three times just plug it in. and then what i notice that i can. separate the two different sides i can. put everything with the homogeneous. solution together and everything with. the. particular solution together but this. just looks like the lefthand side of. the differential equation twice. for the homogeneous since it's a. solution to the homogeneous we know that. that portion adds up to zero. and then for the particular the. particular cell is the nonhomogeneous. so that portion adds up to three e to. the two t which of course is just. three e to the two t and thus the. homogeneous plus the particular. that is a solution to the. nonhomogeneous equation. so here's the idea if you have a.

Particular solution and i have a homogeneous solution we can add our solutions together and that still solves the nonhomogeneous equation that's another solution to the nonhomogeneous equation i can actually do the same thing with a slight twist on it let me imagine that there are two different particular solutions i have a particular solution yp and you have a particular solution perhaps we'll call it y tilde sub p well then how much can you and i disagree i mean we can disagree a little bit but the difference between you and i is a solution to the homogeneous again you could prove this by plugging it in and seeing that it would add up to 0.

Indeed you could plug this into the. lefthand side and you'd get that adding. up to 3 e to the 2t. minus 3 e to the 2t which would just be. 0. it's a solution to the homogeneous. so you and i can disagree only by a. solution to the homogeneous. so this is going to give us a. methodology basically we're going to. find the general solution. to the homogeneous we're going to find. any particular solution you wish doesn't. have to be anything fancy just whatever. one you like. and then if you add those together you. get all the solutions. so let me show you how this is going to. work so step one i'm going to solve the. homogeneous. this is something that we know how to do. from our past so i'll do it quickly you. plug in e to the rt. you get the characteristic equation you. solve for the roots of that. characteristic equation and you write.

The general solution. to the homogeneous system as c one e to. the three t. and c two e to the minus t because you. have these two roots three and minus one. okay that's the old part but now we move. on to step. two where we look particularly at the. nonhomogeneity the the 3e to the 2t. part. so what i want to do is i want to find a. solution any solution. one solution doesn't have to be all of. them to the nonhomogeneous. equation and what i'm going to do is i'm. going to do a guess. i'm going to guess that the answer looks. kind of like the right hand side kind of. like 3 e to the 2t. but because this is called the method of. undetermined coefficients. you might guess that my coefficient will. be undetermined. so what i mean by this is here's my. guess instead of the 3. i put an undetermined coefficient a but. other than that i leave the same.

Structure the e to the 2t. is going to be the same so my guess is. at some constant a. times e to the 2t i mean it's a guess so. let's just plug it in. well if i do that then okay two. derivatives of this is going to give 2. times 2. is 4 times 8 e to the 2t then minus 2. times 2 e to the 2t so now minus 4. times a e to the 2t and then finally. minus 3y. minus 3a e to the 2t so just a lot of e. to the 2ts everywhere. then observe well i have a plus 4a and a. minus 4a times e to the 2t those cancel. that leaves me with minus 3a equals 2. 3 and both multiplied by e to the 2t. well if that's the case then a has to be. equal to 1. and i have a value for it now my. particular solution is. negative 1 times e to the 2t this is a. solution it's not. the general solution but it is a. solution so then finally the most. important part.

Step number three how do i put them. together well. the general solution to this is the. general solution to the homogeneous. plus the one solution you found to the. particular. so all sorts of substance carriers let's. remind ourselves why g. means the general solution y h the. solution to the homogeneous and y p. the particular solution aka the solution. to the nonhomogeneous so in my case. i have my homogeneous that was the c1e. to the 3t and. c2e to the minus t and i have my. particular which was negative e. to the 2t that's my general solution. if i had initial conditions i could plug. in and evaluate the c1 and the c2. note by the way that the order here. matters so you have to form your general. which was your homogeneous. and your particular and only then solve. for the coefficients i've noticed in the. past students often.

Get the homogeneous they solve for the. coefficients first and only. then add for the particular that order. doesn't work out. the second observation here is just know. where the conjugates are coming from. the constants are part of the solution. to the homogeneous but the particular. just any one particular one that works. that's why we call it a particular. solution there's no constant in the. particular part. okay so that's the methodology let's do. one more example. this example is almost the same as the. first example. the left hand side the constant. coefficient part is identical. the right side is almost the same except. it's 3e to the. minus t now not 2t as it was in the. previous example. why does this matter well i mean the. homogeneous hasn't changed. we can just quote that one again but now. if i look at this.

You see the e to the minus t that's the. nonhomogeneity. the e to the minus t is also there in. the solution to the homogeneous system. so a guess of the form a constant times. e to the minus t. cannot work it cannot work. because e to the minus t is a. homogeneous solution that added would. add up to zero. so what can we do well we can do a very. analogous trick that we did when we had. repeated roots to constant coefficient. equations a little while ago. what i'm going to do is for my yp i'm. going to guess a times. t e to the minus t basically what i've. done here is i said well. a e to the minus t can't work but if i. multiply by one more t out the front. maybe this will work okay well it's just. a guess right. could be good could be bad let's plug it. in and see i'm gonna have to step away. here because this will take a little bit.

Of writing. but what i'm gonna do is i'm just going. to plug in a t e to the minus t. everywhere there's y. we've got a single derivative and a. double derivative this is going to. involve some product rules so. i'm going to step away to give myself a. little bit of space here but if i. execute those product rules then i would. get well this long messy expression you. can check it if you wish. what i do want to note though is that if. i look at all the terms that are of the. form. t e to the t well i have an a i have a. plus 2 a and then i have a minus 3a. which cancels so those three terms all. cancel. that leaves you with well if you count. them up minus. 4 a e to the minus t is equal to 3 e to. the minus t which is the right hand side. okay so then what does that mean a has. to be a has to be negative. threequarters and thus i can see what.

My general solution is. my general solution was the homogeneous. plus the particular the particular is. minus threequarters t e to the minus t. so the mess is the same solve the. homogeneous in general and then. guess just some particular one and then. add them together by our theory. the only difference was you had to be a. little bit more careful about your y. particular just to make sure it didn't. overlap with one of the solutions. for the homogeneous equation so. then we turn to the question of i mean. what kind of guesses should you do in. general so. let me put up a little bit of a chart. here so the left column i have different. types of nonhomogeneities the. things that could show up on the right. hand side of your equation a bit. confusingly. so for example you have exponentials or. polynomials or sine and cosine terms.

And in the right column i've told you. what you should guess. for your y particular so for instance we. saw if it was exponential. guess an exponential of the same form a. e to the rt where a is an. undetermined coefficient in the method. of undetermined coefficients. if it's a sine term or if it's a cos. term. well you can guess a sine and a cos of. the same frequency like. sine rt you guess sine rt but here's the. trick. you have to have a sine of rt plus. b cosine of rt even if your left hand. side only had one of those two terms. the idea is that derivative sine is. cosine derivative cosine is sine. so you need to have both sines and. cosines in your. guess if there's any sines or cosines. appearing in the nonhomogeneity. and then for a degree n polynomial like. say t squared you'd guess a degree. two polynomial the generic degree two.

Polynomial. a zero plus a one t all the way up to a. n to the n. and then there's two caveats the first. caveat is what we talked about you. might need to multiply by some t's if. the solution that you get. is a matching to the homogeneous you. multiply by t. or t squared or t cubed however many. multiplications of. t's to a natural number s is a natural. number. you need so that the result you get is. not a matching to the homogeneous. and then the final caveat being that you. might have a combination of these like. the sum of them or a multiplication of. them in which case you add or multiply. the guesses as well. so a final illustration of this i won't. do the algebra for it but i'll tell you. what the guess is so. same left hand side same homogeneous. part but the right hand side is really. messy now t. squared plus 3 to the minus t times.

Cosine of 4t. it's a mess so my homogeneous we know. what to do there. but what about my particular so the. particular is a bunch of things. for the t squared that was a polynomial. so you guess. a generic degree two polynomial now note. i'm not guessing. c t squared i'm guessing a generic. degree two polynomial. a plus b t you've got to include all the. terms of. less degrees than that then for the. exponential. times the cosine we've seen that if. there's a cosine term you have to have a. cosine plus a sine term so i'll do that. a constant d times the exponential. cosine. of 4t and then a constant e times the. exponential times sine of 4t you have to. have. both the cosine and the sine term added. together with different coefficients. final note is that if it was just e to. the minus t without the cosine you would.

Have had to multiply. by the extra value of t so you didn't. match the homogeneous. as i did in the previous example but. here e to the minus t. times cosine that is not a solution to. the homogeneous and so there's no need. to multiply by any extra t so. that would be my guess now if you plug. it in there's going to be. five different variables a b c d and e. and it could be quite a mess to go and. evaluate them i didn't even test to see. how messy it would be in this particular. case but it would just be algebra even. if it is messy. so you could in theory go and solve for. the a the b the c the d and the e. and then you would know your particular. final answer homogeneous. plus particular all right so i hope you. enjoyed this video if you did please. give it a like. for the youtube algorithm if you have. any questions leave them down in the.

All Devices iOS Android Chromecast