If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:18:59

Video transcript

in this video I'm going to introduce you to the concept of the convolution convolution for one of the first times mathematicians actually named something similar to what it's actually doing you're actually convoluting the functions in this video I'm not going to dive into the intuition of the convolution because the convolution there's a lot of different ways you can look at it has a lot of different applications and if you become an engineer if really of any kind you're going to see the convolution in in in kind of a discrete form in a continuous form and a bunch of different ways but in this video I just want to make it I just want to make you comfortable with the idea of a convolution especially in the context of of taking Laplace transforms so the convolution theorem why don't we actually before I even go to the convolution theorem let me define what a convolution is so let's say that I have some function f of T let me just so if I convolute F with G so this is what this is means that I'm going to take the convolution of F and G and this is going to be a function of T and so far nothing I've written should make any sense to you because I haven't defined what this means this is like those SAT problems where they say like you know a triangle B means a plus B over 3 if you're you know while you're standing on one leg or something like that so I need to define this in some similar way so let me undo this silliness that I just wrote there and the definition of the convolution we're going to do it over a over well there's several definitions you'll see but the definition we're going to use in this context there's actually one other definition you'll see in the continuous case is the integral from 0 to t of F of F of t minus tau F of t minus tau x times G of T let me well stain let me just write Slice times G of tau D tau now this this might seem like a very bizarro thing to do when you're like Sal how do I even how do I even compute one of these things and to kind of give you that comfort let's actually compute a convolution let's say that and it's actually was hard to find some functions that are very easy to analytically compute and you're going to find that we're going to go into a lot of trig identities to actually compute this but if I say that f of T if I define F of T to be equal to the sine of T and I define cosine of T let me do it in orange or I define G of T to be equal to the cosine of T now let's do some let's convolute the two functions so the convolution of F with G with G and this is going to be a function of T it equals it equals this I'm just going to show you how to apply this integral so it equals the integral I'll do it in purple the integral from 0 to t of f of t minus tau this is my f of T so it's going to be sine of t minus tau times G of tau well this is my G of T so G of tau is cosine of tau cosine of tau D tau so that's the integral and now to evaluate it we're going to have to break out some trigonometry so let's do that this almost is just a very good trigonometry and integration review so let's evaluate this but I wanted to evaluate this in this video because I want to show you that this isn't just some abstract thing that you can actually evaluate these functions so the first thing I want to do I mean I don't know what the antiderivative of this is it's tempting you see a sine and a cosine maybe then the derivatives of each other but it's a sine of t minus tau so let me rewrite that sine of t minus tau and we'll just use the trig the trig identity that the sine of t minus tau is just equal to the sine of T the sine of T times the cosine of tau minus the sine of tau times the cosine of T and actually I just made a video where I go through all of the the the trig I go through these trig identities really just to review them or myself and actually to make a video in better quality on them as well so if we make this substitution this you'll find it on the inside a cover of any trigonometry or calculus book you get the convolution of F and G is equal to MLS write that F star G I'll just write it with that is equal to the integral from 0 to t of instead of sine of t minus tau I'm going to write this thing right there so I'm going to write the sine of T times the cosine of tau minus the sine of tau times the cosine of T and then all of that times the cosine of tau all that's times the cosine of tau have to be careful with my towels and T's and let's see T and tau and tau and T yeah everything's working so far so let's see so then that's DT let me put that or sorry D tau to be very careful here now let's let's distribute this cosine of tau out and what do we get we get this is equal to so f F convoluted with G I just go to F star G it's equal to the integral from 0 to t of sine of T times cosine of tau times cosine of tau I'm just distributing this cosine of tau so it's cosine squared of tau and then minus let's move right the cosine of T first and I'm doing that because we're integrating with respect to tau so I'm just gonna write my cosine of T first so cosine of T times sine of tau times sine of tau times the cosine of tau times the cosine of tau D tau and now since we're taking the integral of really you know two things subtracting from each other let's just turn this into two separate integrals so this is equal to this is equal to the integral from 0 to t of sine of T times the cosine squared of tau D tau minus the integral from 0 to t times cosine of cosine of T times sine of tau cosine of tau D tau now what can we do well is simplify it more but we're integrating we're integrating with respect to let me be careful here we're integrating with respect to tau I wrote a T there we're integrating with respect to tau so all of these this cosine of T right here that's a constant the sine of T is a constant for all I know T could be equal to five it doesn't matter that one of the boundaries of our integration is also a t that T would be a five in which case these are all just constants we're integrating only with respect to the Tau so if cosine of you know if cosine of five that's a constant we can take it out take it out of the integral so this is equal to this is equal to sine of T times the integral from zero to T of cosine squared of tau D tau and then minus minus cosine of T that's just a constant I'm bringing it out times the integral from zero to T of sine of tau sine of tau cosine of tau D tau now this antiderivative is pretty straight forward you could do u substitution and now let me do it here instead of doing it in our head this is a complicated problem so we don't want to skip steps if we set U is equal to sine of tau then D u D tau is equal to the cosine of tau right just the derivative of sine or we could write that D U is equal to cosine of cosine of tau D tau right and then of course this is from well well we'll we'll undo the substitution before we have evaluate the the endpoints here but this one's a little bit more of a conundrum I don't know how to take the antiderivative of cosine squared of tau it's not obvious what what that is so to do this we're going to break out some some more trigonometric identities and in the last in a video I just recorded it might not be the last video in the playlist I showed I showed that the cosine cosine squared of Tao I'm just using Tao as an example is equal to one half times one one plus one plus the cosine of two Tao and once again this is just a trig identity that you'll find in really in the inside cover of probably your calculus book so we can make this substitution here make this substitution right there and then let's see what what our integrals what our integrals become so this first one over here let me just write it here it'd be we get sine of T sine of T times the integral from 0 to T of this thing here let me I could just take the let me just take the one-half out so let me just to keep things simple so it's x so I'll put the one-half out here that's this 1/2 so 1 plus cosine of 2 tau and all of that is d D tau that's this integral right there and then we have this integral right here minus cosine of T cosine of T times the integral from let me be let me be very clear this is this is tau is equal to 0 this is tau is equal to 0 to tau is equal to t2 tau is equal to T and then this thing right here I did some u substitution if u is equal to sine of T then this becomes u and we showed that D U is equal to cosine u is equal to sine of tau and then we still showed that D U is equal to cosine tau D tau so this thing right here is equal to D u so it's u D u and let's see if we can do anything useful now so this integral right here the antiderivative of this the antiderivative of this is pretty straightforward so what are we going to get let me write this outside part so we have 1/2 times the sine of T and now let me take the antiderivative of this this is going to be tau plus the antiderivative of this it's going to be 1/2 sine of 2 tau 1/2 sine of 2 tau I mean we could have done a used substitution we could have said U is equal to 2 tau and and all of that but I think you can do that from recognition and if you don't believe me you just have to take the derivative of this sine of a 1/2 sine of 2 tau is the derivative of this is U you multiply you take the derivative of the inside so that's 2 so the 2 and the 1/2 cancel out and then the derivative of the outside so cosine of 2 tau and you're going to evaluate that from 0 to T and then we have minus cosine of T and then we're going to have we take the antiderivative of this let me do this on the side so the integral the integral of UD you that's trivially easy that's one-half u squared right now that's one-half u squared but what was you to begin with it was sine of tau right so the antiderivative of this thing right here is 1/2 u squared but u a sine of tau so it's going to be 1/2 u which is sine of tau squared and we're going to evaluate that we're going to evaluate that from 0 to T and we didn't even have to do all this use substitution the way I often do it in my head I see the sine of tau cosine of tau if I have a function and I have this derivative I can treat that function just like if I had an X there so it'd be sine squared of tau over 2 which is exactly what we have there so it looks like we're in the homestretch it looks like we're in the homestretch we're taking the convolution of sine of T with cosine of T and so we get 1/2 sine of T now if I evaluate this thing at T what do I get I get T plus 1/2 sine of 2t that's when I evaluated at t and then from that I need to subtract it evaluated at 0 so minus 0 minus 1/2 sine of 2 times 0 which is just sine of 0 right so this part right here this whole thing right there what does that simplify to well this is 0 sine of 0 is 0 so this is all 0 so this first integral right there simplifies to 1/2 sine of T times T plus 1/2 sine of 2t plus 1/2 sine of 2t all right now what does this one simplify to over here well this one over here you have minus minus cosine of T and we're going to evaluate this whole thing at T so you get 1/2 sine squared of t minus 1/2 sine the sine of 0 squared which is a 0 so that's just minus 0 so so far everything that we have written simplifies to let me multiply it all out so I have 1/2 let me just pick a good color 1/2 T sine of T right I'm just multiplying those out plus 1/4 sine of T sine of 2t and then I have over here I have minus 1/2 sine squared T times cosine of T right I just took the minus cosine T and multiplied it through here and I got that now this is a valid answer but I suspect that we can simplify this more you may be using some more trigonometric identities and this this guy right there looks ripe to simplify and we know that the sine of 2t sine of 2t another trig identity you'll find out the inside cover of any of your books is equal to the sine is two times the sine of T times the cosine of T so if you substitute that there what is our whole expression equal you get this first term let me scroll down a little bit you get one-half T times the sine of T plus 1/4 sine of T times this thing in here so x times 2 sine of T cosine of T just two trig identity nothing more than that and then finally I have this minus 1/2 sine squared T cosine of T no one ever said this is going to be easy but hopefully it's instructive on some level at least it shows you that you didn't memorize your trig identities for nothing so what is this simplest let me rewrite the whole thing or let me just rewrite this part so this is equal to 1/4 now I have well let me see 1/4 times 2 so it's really 1/4 times 2 is 1/2 and then sine squared of T right at the sign times the sine sine squared of t cosine of T and then this one over here is minus 1/2 sine squared of T cosine of T and luckily for us or lucky for us these cancel out and of course we had this guy out in the front we had this 1/2 T sine T out in front now this guy cancels with this guy and all we're left with through this whole hairy problem and this is pretty satisfying is 1/2 T sine of T so we just showed you that the convolution the convolution if I define let me write our result I should normally I feel like printing this instant you're kind of writing this in stone because this is so much work but if we write that f of T is equal to sine of T and G of T is equal to cosine of T I just showed you that the convolution of F with G which is a function of T which is defined as the integral from zero to t of F of t minus tau times G of tau D tau which was equal to and I'll switch colors here which was equal to the integral from zero to T of sine of t minus tau times G of tau D tau that all of this mess all of this convolution it all equals and this is pretty satisfying it all equals it all equals one-half T sine of T and the whole reason why I went through all this mess and kind of bringing out the neurons that had the trig identities memorized or having to reprove them or whatever else is to just show you that this convolution it is convoluted and it seems a little bit bizarre but you really can take the convolutions of of actual functions and get an actual answer so the convolution of sine of T with cosine of T is one-half T sine of T so hopefully you have a little of intuition of well not intuition but you at least have a little bit of a hands-on understanding of how the convolution can be calculated