So, let me show you another method for solving the same differential equation as in the last video. Again, we're just looking for a particular solution when the right-hand side is sine or a cosine. Instead of doing a sine and cosine ansatz, another method is to convert this to a complex differential equation and then deal with an exponential ansatz. We can do that because of the famous identity that e to the i t is equal to cosine t plus i sine t. So, we write the complex differential equation z double dot minus 3z dot minus 4z equals 2. Instead of sine t here, we write e to the i t. Remember that if you have a complex expression equals a complex expression, you can always set that as two equations. The real part of the left-hand side equals the real part of the right-hand side and the imaginary part of the left-hand side equals the imaginary part of the right-hand side. Because the imaginary part of e to the i t equals sine t, the imaginary part of z will be what we look for. So, x here is going to be equal to the imaginary part of z. If the right-hand side was a cosine t, then we would be looking for the real part of z. Okay. So, we try now our exponential ansatz. So, we try z to find the particular solution as an unknown constants C, which here can be a complex number, times e to the i t. We match the exponential function. Then we substitute it into the differential equation. Z double dot brings down i squared, which is minus 1. So, if I cancel the e to the i t, then I'll write minus C for z double dot, minus 3z dot, z dot brings down an i. So, minus 3Ci. Then minus 4z, which will be minus 4C. That's equal to the right-hand side which is 2. So, we can factor out the C here. So, factor out a minus C So, we get minus C. Then we have C plus 4C is 5. Sorry 1 plus 4 is 5 plus 3i. So, here we'll have this is minus 5C. So, I'll end up with 5. Then this is minus 3Ci. So, I'll end up with plus 3i. That's equal to the right-hand side is 2. So, let me put that here. We solve that for C. So, what do we get for C? So, C is minus 2 over 5 plus 3i. C equals minus 2 over 5 plus 3i. Then we can write that as a complex number. If we clear the denominator we multiply by the complex conjugate of the denominator 5 minus 3i. The denominator becomes 25 plus 9 which is 34. The numerator is minus 10. Then we have a minus 2 times minus 3i is plus 6i. This becomes 1 over 17 if we divide numerator and denominator by 2. We have a minus 5 plus 3i. Okay. So, that's our complex coefficient C is 1 over 17 times minus 5 plus 3i. The final step then we have our z but we need our x. So, the final step is to find the particular solution which is the imaginary part of C times e to the i t. We have a 1 over 17. Then we have the imaginary part of minus 5 plus 3i. So, let me write it down here, minus 5 plus 3i times e to the i t which is cosine t plus i sine t. Okay. That's our solution then for the particular solution. So, now all we need to do is to pick out the imaginary part. We have a 1 over 17. Then we have a 3 cosine t. We have a minus 5 sine t. Then that's our solution for the particular solution. So, you can check that we got the same answer. As last time I like this method better because I don't have all this system of linear equations to solve. I don't have to collect too many terms. But in my experience maybe the students feel go into complex exponential functions is a little bit more tricky. But it's up to you which way you like to solve this type of equation. We'll see later that this is actually a very useful way of solution because sometimes it pays to keep the exponential function together. We'll see that later. So, let me summarize here. I'm teaching you a second method of finding a particular solution when there's a sine or cosine on the right-hand side. In this method you convert the real differential equation to a complex differential equation. You use the fact that e to the i t is cosine t plus i sine t. Then we're going to solve the complex differential equation. But the solution we're looking for is just the imaginary part of the solution of the complex differential equation so that the right-hand side is a sine t. The algebra is a little bit easier because you can try an exponential function for your ansatz and work through the algebra with the complex numbers. Then in the end you just pick out the imaginary part in this case because there's a sine t on the right-hand side or the real part in the case when it's a cosine of t on the right-hand side. I'm Jeff Jasanoff. Thanks for watching and I'll see you in the next video.