Flash and JavaScript are required for this feature.

Download the video from iTunes U or the Internet Archive.

**Description:** For linear equations, the solution for a cosine input is the real part of the solution for a complex exponential input. That complex solution has magnitude G (the gain).

Related section in textbook: 1.5

**Instructor:** Prof. Gilbert Strang

Response to Complex Exponen...

GILBERT STRANG: So complex numbers are going to come in to today's video, and let me show you why. So I'm going to solve the problem. The differential equation we know-- first order, linear with a source term, but now the source term has both the cosine and the sine. And the sine, you notice, has this imaginary square root of minus 1 involved. So I'll call this y complex with a little c, because the answer is going to come out a complex number instead of a real number. So the previous lecture solved it with the cosine, and now we're going to solve it with that combination, and you may wonder why.

The reason is that Euler left behind a fantastic formula for that the cosine plus i times the sine of an angle equals the exponential of the angle, e to the i omega t. And the good part about that is-- which we saw earlier for exponentials-- that when the source term is an exponential the solution is an exponential. So I look for a solution of this with that same e to the i omega t, and it's got some factor capital Y that we have to find. And we find that by substituting this into the equation, and then we learn what this capital Y is.

So let me put that in. The derivative, the left side, is-- so this is the still going to be our complex solution. It's still complex. So I put this into the equation. The derivative will be i omega-- of course, the derivative of the exponential brings down the number there, whatever it is. i omega y e to the i omega t. That's what we get for the derivative of this, and now that should equal a times the function plus the source, e to the i omega t. Just as we did before with a real, e to the st, now it's s is i omega. And the beauty is we divide everything by e to the i omega t, and then we get a simple equation. i omega-- bring the a on the other side-- times y is what? Good. So y we now know is 1 over i omega minus a. It involves the frequency omega in the source term, and it involves the rate of growth, the constant, in the 0 order term. Good.

That's our expression for capital Y, and if I put that in here, I have the complex solution, but my idea is to use this complex solution to find two real solutions-- that's really why I'm-- this video is about-- using this complex source term to find the solutions for both that one and sine omega t. And the trick will be-- the way to do it will be I will take-- here's my complex solution. I'll take the real part of this complex solution. It will be the results. Match the cosine. That's the real part of this expression, which I now know, and the imaginary part of this same expression will give me the sine, the output, the response to the sine term.

So to problem solve one method, but there's a step that I have to take. How do I find the real part of this expression? The real part is easy if the complex number is written a plus ib. Real part is a. The imaginary part is b, but I don't have it a plus side ib. I have it in this form, and in a way, it's a better form. So now I have to think about-- and y itself has this thing in the denominator. So can I practice by looking at this number i omega-- i omega minus a? That's really the awkward quantity that I have to get into a good form, and the form you want for complex numbers when you're going to multiply them is the polar form.

I want to put this in the form re to the i alpha. So a positive number, the magnitude of this, and the angle-- so I have to draw the complex plane. I guess this is the first time in these lectures. So there is the real axis. Here's the imaginary axis, and here's a complex number, i omega minus a. So in the imaginary direction, I go up omega, and in the real direction, I go minus a. So here's my number. This is up to i omega and back to minus a, and there is the number I omega minus a. And there is the angle alpha, and the length of that is the r. So I have those two things to find. That's called putting the number into its polar form. This is its rectangular form, real, imaginary. This is its magnitude, and now what is the magnitude of that? Easy.

| a right triangle with height with that side is omega. This side is minus a. I use Pythagoras to know that this r is the square root of a squared plus omega squared. That length squared-- the minus sign disappears. That length squared, omega squared-- so that's the r.

Now, what about e to the i alpha? What's the angle-- e to the i alpha? The best I can say is I know what that angle is. I can only tell you its tangent, but let me just leave it as alpha. Alpha is the angle. The tangent of this angle will be that number over that number. I'll leave it that way. So that's a key step, a first step with complex numbers, and in a later video, we'll be devoted entirely to working with complex numbers. Here you're getting a first look at it, or you may have seen it before.

So now I had to divide by that. That's why I like this form. Dividing by it-- so now I'm ready for-- I'm ready to put in my complex. y complex was this y, which was 1 over i omega minus a, and e to the i omega t. That's what we have, but now i omega minus a we have in this nicer form. I can divide by that. If I divide by that, it'll be 1 over the square root of a squared plus omega squared times e to the i alpha-- e to the minus i alpha. When I divide by an exponent-- that exponent-- exponential-- that exponent changes sign-- times e to the i omega t. Are you good with that? So this number produced both of those terms, the magnitude part and the angle part, and then this part was pure angle. And that's my answer in a nicer form, and here is even better form. I combine these two. e to the i something times-- when I multiply two exponentials, I can put that as e to the i omega t minus alpha. You see that it has that factor e to the minus i alpha as well as the e to the i omega t.

Now I'm ready to take the real part and the imaginary part, and that will give me my two solutions-- my two real solutions to the real equation. So take the real part, and that's why I'll concentrate on the real part is the original y of t-- y real coming from the cosine. The cosine of omega t is the case I'm redoing from what I had in an earlier lecture as a combination of sines and cosines. Now we're going to see it more beautifully. So I'm ready to take the real part of that.

Well, this is a real number-- 1 over the square root of a squared plus omega squared. And what is the real part of e to the i times an angle? The real part of e to the i theta is the cosine of theta. The real part is the cosine. That's where using Euler-- always using Euler. So it's just the cosine of omega t minus alpha, and that's exactly what we ended up with with more work in the previous lecture. The magnitude-- this was called the gain. This was the G part. This is the G, the gain. The input was the size of cosine was size one. It's increased or decreased by this factor, and then the cosine is still here. And alpha, you remember, is the time lag. The input is a pure cosine, but the output is a shifted cosine, which is also a combination of cosine and sine.

So there you've used complex numbers-- maybe the first time, maybe not-- to get the nice form for the answer. And of course, if the input was the sine of omega t, then I would have the same thing. That would be a sine. So it's really the physically important quantity is the gain and the phase lag. Good. So that's the first use of complex numbers to get us back to an exponential, after which the solution is easy. I'll have more source terms-- a few more-- and then I'll look for a formula that applies for any source term. Thank you.