So, in this video, we're going to learn how to find a particular solution of an Inhomogeneous equation. When the right-hand side is a sine or a cosine function, there are two different methods of doing this. The method in this video is the more straightforward approach, but maybe requires a little bit more algebra. The method in the next video is more sophisticated, but is maybe easier to do. So, the main key here to find some function X that satisfies this equation, we need an onsets. So, as in the case of the exponential function, we can try a constant times sine t. The problem with that is that the first derivative will give us a cosine t. So, we can't just guess sine t, we have to guess a sine and a cosine. So, the onsets here is to try x equals some function times cosine t, plus some other function times sine t. So, what's important here is that we match the argument of sine t. So, if it was sine two t, we would guess A cosine 2t plus B sine 2t. We take our onsets and we substitute into the differential equation. So, we take the second derivative of this. Remember cosine t becomes minus cosine t, sine t becomes minus sine t. So, second derivative becomes minus A cosine t minus B sine t. Then minus three times the first derivative. So, the derivative of cosine t is minus sine t. The derivative of sine t is cosine t. So, we have a minus three times A times a minus sine t. So, that will be plus 3A sine t. Then we have a minus three times B cosine t. Finally, minus four times X. So, minus 4A cosine t minus 4B sine t. So, that's the lengthy expression from substituting in. That's supposed to be equal to two sine t. The next step of the algebra is to collect all the terms multiplying cosine, and all the terms multiplying sine. So, let's do that. See if I can do that in my end here. So, the terms is multiplying cosine, we have the minus A cosine sine, sine cosine minus A. We have a minus 4A. So, minus 5A minus 3B. So, 5A plus 3B. So, negative 5A plus 3B times cosine t, and the terms multiplying sine, we have a minus B sine t, minus 4B sine t. We have 3A sine t. So, 3A minus 5B, plus 3A minus 5B sine t. That's supposed to be equal to two sine t. When you have a constant times a cosine, plus a constant times a sine equals a constant times a cosine, plus a constant times a sine, you can equate the constants multiplying the cosine, and you can equate the constants multiplying the sine. You can see that by putting t equals zero here. So, then if we put sine zero, cosine zero is one. So, we get 5A plus 3B has to be zero. Or the term multiplying the cosine equals zero times a term multiplying the cosine on the right-hand side. We also get, if you put t equal to pi over two, then cosine pi over two is zero, sine pi over two is one, we will get 3A minus 5B equals two. So, you can always do that. The term multiplying the cosine, the constant multiplying the cosine on the left is equal to the constant multiplying the cosine on the right. The constant multiplying the sign on the left is equal to the constant multiplying the sine on the right. That gives us two linear equations for the two unknowns A and B. We can solve that. How should we do that? I think we can eliminate B. So, if we're to eliminate B, we can multiply say, this first equation by five and multiply this second equation by three. Then we add them, the B will go away. So, we'll get 25A, plus nine times A equal to five times zero is zero, and three times two equals six. So, this is 34A equals six. Or if we divide through by two, we get A equals three over 17. All right, 17 is half of 34. My arithmetic is not always perfect. Then we can figure out what B is. So, maybe from the first equation. So, B is equal to minus five over 3A. So that will work out. The three will cancel, so we'll have minus five over 17. So, we found A and B. So, we have our solution. So, I can write down the solution here. So, we have our x of t is equal to A times cosine t, plus B times sine t. I can factor out the one over 17. Then we have three cosine t, and then B sine t, so minus five sine t. Hopefully, that's the correct answer. So, let's review then how to find a particular solution when the right-hand side is a sine function or a cosine function. Because it's a second-order equation that contains the second derivative, first derivative and the function, we can't just match sine with sine. We have to try onsets that contains both the cosine term and a sine term. But we always have to match the argument of sine in the onsets. Then you substitute in, you do a lot of algebra, you collect terms, and then you set the left-hand side multiplying cosine equal to whatever is multiplying cosine on the right-hand side. The left-hand side multiplying sine whatever is multiplying sine on the right-hand side. That gives you two equations and two unknowns, which you then have to solve. In the next video, I'll show you another technique which is actually the technique I prefer. Hopefully, you will prefer it also. I'm Jeff Chasnov. Thanks for watching, and I'll see you in the next video.