Current time:0:00Total duration:12:14
0 energy points

Using the convolution theorem to solve an initial value prob

Using the Convolution Theorem to solve an initial value problem. Created by Sal Khan.
Video transcript
Now that we know a little bit about the convolution integral and how it applies to the Laplace transform, let's actually try to solve an actual differential equation using what we know. So I have this equation here, this initial value problem, where it says that the second derivative of y plus 2 times the first derivative of y, plus 2 times y, is equal to sine of alpha t. And they give us some initial conditions. They tell us that y of 0 is equal to 0, and that y prime of 0 is equal to 0. And that's nice and convenient that those initial conditions tend to make the problem pretty clean. But let's get to the problem. So the first thing we do is we take the Laplace transform of both sides of this equation. The Laplace transform of the second derivative of y is just s squared. This should be a bit of second nature to you by now. It's s squared times the Laplace transform of Y, which I'll just write as capital Y of s, minus s-- so we start with the same degree as the number of derivatives we're taking, and then we decrement that every time-- minus s times y of 0-- you kind of think of this as the integral, and you take the derivative 1, so this isn't exactly the derivative of that-- minus, you decrement that 1, you just have a 1 there, y prime of o. And that's the Laplace transform of the second derivative. Now, we have to do the Laplace transform of 2 times the first derivative. That's just going to be equal to plus 2, times sY of s-- s times the Laplace transform of Y; that's that there-- minus y of 0. And we just have one left. The Laplace transform of 2Y. That's just equal to plus 2 times the Laplace transform of Y. And then that's going to be equal to the Laplace transform of sine of alpha t. We've done that multiple times so far. That's just alpha over s squared plus alpha squared. Now, the next thing we want to do is we want to separate out the Laplace transform of Y terms, or the Y of s terms. Actually, even better, let's get rid of these initial conditions. y of 0, and y prime of 0 is 0, so this term is 0. That term is 0, and that term is 0. So our whole expression-- I can get rid of the colors now-- it just becomes-- let me pick a nice color here-- becomes s squared times Y of s, plus 2s, Y of s-- that's that term right there-- plus 2Y of s, is equal to the right-hand side, is equal to alpha over s squared plus alpha squared. Now let's factor out the Y of s, or the Laplace transform of Y. And so we get s squared plus 2s, plus 2, all of that times Y of s, is equal to this right-hand side, is equal to alpha over s squared, plus alpha squared. Now we can divide both sides of this equation by this thing right here, by that right there. And we get Y of s, the Laplace transform of Y is equal to this thing, alpha over s squared, plus alpha squared, times-- or, you know, I could just say times-- 1 over s squared, plus 2s, plus 2. I could just say divided by this, but it works out the same either way. Now, what can we do here? Remember, I was doing this in the context of convolution, so I want to look for a Laplace transform that looks like the product of two Laplace transforms. I know what the inverse Laplace transform of this is. In fact, I just took it. It's sine of alpha t. So if I can figure out the inverse Laplace transform of this, I could at least express our function y of t at least as a convolution integral, even if I don't necessarily solve the integral. From there, it's just calculus, or if it's an unsolvable integral, we could just use a computer or something, although you could actually use a computer to solve this so, you might skip some steps even going through this. But anyway, let's just try to get this in terms of a convolution integral. So what can I do with this? This is, let's see, this isn't a perfect square. So if this isn't a perfect square, the next best thing is to try to complete the square here. So let's try to write this as a, so let's see, if I write this as s squared plus 2s, plus something, plus 2. I just rewrote it like this. And if I wrote this as s squared plus 2s, plus 1, that becomes s plus 1 squared. But if I add a 1, I have to also subtract a 1. I can't just add 1's arbitrarily to things. So if I add 1 I have to subtract a 1 to cancel out with that 1. So I really haven't changed this at all, I just rewrote it like this. But this now, I can rewrite this term right here as s plus 1 squared. And then this becomes plus 1. That's this term right here. This is the plus 1. So I could rewrite my whole Y of s is now equal to alpha over s squared, plus alpha squared, times 1 over this thing, s plus 1 squared, plus 1. Now, I already said, I know what the inverse Laplace transform of this thing is. Now I just have to figure out what the inverse Laplace transform of this thing is. Of this-- let me pick a nice color-- of this blue thing in the blue box, and then I can express it as a convolution integral. And how do I do that? I could just do it right now. I could just immediately say that y of t-- let me write this down-- y of t, so the inverse is equal to the inverse Laplace transform of, obviously of Y of s. Let me write that down, Y of s. Which is equal to the inverse Laplace transform of these two things. The inverse Laplace transform of alpha over s squared, plus alpha squared, times 1 over s plus 1 squared, plus 1. And now the convolution theorem tells us that this is going to be equal to the inverse Laplace transform of this first term in the product. So the inverse Laplace transform of that first term, alpha over s squared, plus alpha squared, convoluted with-- I'll do a little convolution sign there. I was about to say convulsion. They're not too different. Convoluted with the inverse Laplace transform of this term, the inverse Laplace transform of 1 over s plus 1 squared, plus 1. If I have the product of two Laplace transforms, and I can take each of them independently and I can invert them, the inverse Laplace transform of their product is going to be the convolution of the inverse Laplace transforms of each of them, each of the terms. And what I just said confused me a bit, so I don't want to confuse you. But I think you get the idea. I have these two things. I recognize these independently. I can independently take the inverse of each of these things, so the inverse Laplace transform of their products is going to be the convolution of each of their inverse transforms. Now what's this over here? Well I had this in the beginning of the problem? The inverse Laplace transform of this, right here, is sine of alpha t. And then we're going to convolute that with the inverse Laplace transform of this right here. Let's do a little bit of work on the side, just to make sure we get this right. So the Laplace transform of sine of t is equal to 1 over s squared, plus 1. That looks like this, but I was shifted by minus 1. You might remember that the Laplace transform of e to the at sine of t, when you multiply e to the at times anything, you're shifting its Laplace transform. So that will be equal to 1 over s minus a squared, plus 1. We essentially shifted it by a. So now we have something that looks very similar to this. If we just set our a to be equal to negative 1, here our a is equal to negative 1, then it fits this pattern. This is s minus negative 1. So the inverse Laplace transform of this thing right here is just e to the a, which is minus 1, so minus 1t, times sine of t. So this is the solution to our differential equation, even though it's not in a pleasant form to look at. And we can, if we want, express it as an integral. I'm not going to actually solve the integral in this problem, because it gets hairy, and it's not even clear that-- well, I won't even attempt to do it. But I just want to get into a form, and from there it's just integral calculus. or maybe a computer. What's the convolution of these two things? It's the integral from 0 to t, of sine of the first function of t minus tau. Well, I could actually switch, and I haven't shown you this, but we can switch the order either way, but actually let me just do it this way. I could write this as sine of [? out ?] t minus tau, times alpha-- I'm taking the sine of all of those things-- times e to the minus tau, sine of tau, dtau. That's one way, that if I wanted to express the solution of this differential equation's integral, I could write it like that. And it actually should be kind of obvious to you that this could go either way. Because when it was a product up here, obviously order does not matter. I could write this term first, or I could write that term first. So regardless of which term is written first, the same principle would apply. And I'll formally prove it in a future video. So we could have also done it the other way. We could have written this expression as e to the minus t, sine of t, convoluted with sine of alpha t. And that would be equal to the integral from 0 to t, of e to the minus t minus tau, sine of t, minus tau, times sine of alpha tau, dtau. So these are equivalent. Either of these would be an acceptable answer. And normally on a test like this, the teacher won't expect you to actually evaluate these integrals. The teacher will just say, get it into an integral just to kind of see whether you know how to convolute things and get your solution to the differential equation at least into this form, because from here it really is just, I won't say basic calculus, but it's non-differential equations. So hopefully, this second example with the convolution to solve an inverse transform clarified things up a little bit.