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:19:12

Video transcript

let's apply everything we've learned to an actual differential equation instead of just taking Laplace transforms and taking their inverse let's actually solve a problem so let's say that I had the second derivative of my function y plus 4 times my function y is equal to sine of T sine of T minus the unit step function 0 up until 2 PI of T times sine of T minus 2 pi let's solve this differential equation interpretation of it and I should do a whole playlist on interpretations of differential equations and how do you model it but you know you can kind of view this as a forcing function that it's a weird forcing function of this being applied to some weight with you know this the this is the acceleration term right the second derivative with respect to time is the acceleration so it'd be that you know the mass would be 1 whatever units and then the the just the function just that's a function of its position this is probably some type of spring constant anyway I won't go there I don't to waste your time with the interpretation of it but let's solve it we can do more about interpretations later so we're going to take the Laplace transform of both sides of this equation so what's the Laplace transform of the left-hand side so the Laplace transform of Y of the second derivative of Y is just s squared so now I'm taking the plus transform of just that Laplace traits with s squared times the Laplace transform of Y minus lower the degree there once minus s times y of 0 minus y prime of 0 so clearly I must have to give you some initial conditions in order to do this properly and then plus 4 times the Laplace transform of Y times the Laplace transform of Y is equal to is equal to what's the Laplace transform of sine of T ok that should be second nature by now it's just 1 over s squared plus one and then we have - the Laplace transform of this thing and I'll take a look I'll do a little side note here to figure out the Laplace transform of of this thing right here now we know it I mean I showed it to a couple of videos ago we showed that the Laplace transform the Laplace transform actually I could just I could just write it out here this is going to be the same thing as the Laplace transform of sine of T but if we're have to multiply it by e to the minus if you remember that last formula e to the minus CS where C is 2 pi let me actually let me write that down let me let me I decided to write it down and then I decided oh no I don't want to do this but let me write the so the Laplace transform of the unit step function that goes up to C times some function shifted by C is equal to e to the minus CS times the Laplace transform of just the original function times the Laplace transform of F of T right so if we're taking the Laplace transform of this thing our C is 2 pi our F of T our f of T is just sine of T right C is so then we did this is just going to be equal to if we just do this piece right here it's going to be equal to e to the minus CS our C is 2 pi e to the minus 2 pi s times the Laplace transform of f of t f of t 2 sine of T right before we shift it this is f of t minus 2 pi so f of t is just going to be sine of t so it's going to be times 1 over s squared plus 1 this is a Laplace transform of sine of T so let's go back to our original back to where we had left off so we've taken the Laplace transform of both sides of this equation and clearly I have some initial conditions here so the problem must have given me some and I just forgot to write them down so let's see the initial conditions I've I'm givin you there they are written kind of in the margin here they tell us I'll do it in orange they tell us that Y Y of zero is equal to zero and y prime of zero is equal to zero that makes the math easy that's zero and that's zero so let's see if I can simplify my equation so the left-hand side let's factor out the Laplace transform so let's factor out this term and that term so we get the Laplace transform of Y times this Plus this times s squared plus four is equal to the right hand side and what's the right hand side it is we get we could simplify this well I'll just write it out I don't want to do too many steps at once it's 1 over s squared plus 1 and then plus or minus actually this is a minus minus the Laplace transform of this thing which was e to the minus 2 pi s over s squared plus 1 and so we can write this whole thing as so if we divide both sides of this equation by the s squared plus 4 then we get the Laplace transform of Y is equal to is equal to and actually I can just merge these two they have the same denominator so before I even divide by s squared plus 4 that right hand side will look like this it will look like with a denominator of s squared plus 1 and you have a numerator of 1 1 minus e to the minus 2 pi s and of course we're dividing both sides of equation by s squared plus 4 so we're going to have to stick that s squared plus 4 over here now we're at the hard part in order to figure out why we have to take the inverse Laplace transform of this thing so how do we take the inverse Laplace transform of this thing where the hard part is always you know kind of solving the differential equations easy if you know the Laplace transforms so we're going to do is some it looks like we're gonna have to do some partial fraction expansion so let's see if we can do that so we can rewrite this equation right here we can rewrite this equation so let's write it as this because this will kind of simplify our work let's factor this whole thing out so we're going to write it as one minus e to the minus 2 pi s all of that times do it in orange all of that times 1 over s squared plus 1 times s squared plus 4 now we need to do some partial fraction expansion to simplify this thing right here so we're going to say we're going to do this on the side maybe I should do this over on the right right here this thing let me rewrite it 1 over s squared plus 1 times s squared plus 4 should be able to be re-written as 2 separate fractions s squared plus 1 and s squared plus 4 with the numerators this one would be a s plus B it's going to have to have degree one because this is degree two here and then we'd have C S Plus D and so when you add these two things up you get a s plus B times s squared plus 4 s squared plus 4 plus C s CS plus D times s squared plus 1 all of that over the common denominator right we've seen this this story before we just have to do some algebra here as you can tell these differential equations problems they require a lot of stamina you kind of just have to say I will keep moving forward and do the algebra that I need to do in order to get the answer and you kind of have to get excited about that notion that you have all of this algebra to do so let's figure it out so this top can be simplified to a s to the third a s to the third plus let's let's say plus B s squared plus B s squared plus 4 a s plus 4 a s plus 4 B plus 4 B and then this one is you end up with C s the third C s to the third plus D s squared plus D s squared plus CS plus C S Plus D so when you add all of these up together you get and this is all the algebra that we have to do one for better for worse a plus C over s to the 3rd plus B plus D times s squared plus 4a plus C times s let's go over a little bit plus 4 B plus D and now we just have to say okay so do we see any all of this is equal to this thing up here this is the numerator we just simplified the numerator this is the numerator that's the numerator right there and all of this is going to be over your original s squared plus 1 times your s squared plus 4 and we established that this thing should be let me rewrite this that 1 over s squared plus 1 times s squared plus 4 should equal this thing and then you just pattern match on the coefficients this is all this is all just intense partial fraction expansion and you say look a plus C is the coefficient of the S cubed terms I don't see any s cubed terms here so a plus C a plus C must be equal to 0 and then you see okay B plus D is the coefficient on the x squared terms don't see any s squared terms there so be B plus D must be equal to 0 for a plus C coefficient on the S terms don't see any S terms over here so for a plus C must be equal to 0 and then we're almost done for B plus D must be the constant there is a constant term there so for B plus D is equal to one so let's see if we can do anything here if we subtract this from that we get minus 3a is equal to zero or a is equal to zero if a is equal to 0 then C is equal to zero and let's see what we can get here if we subtract this from that we get minus 3b the DS cancel out is equal to minus 1 or B is equal to 1/3 and then of course we have D is equal to minus B all right if we subtract B from both sides so D is equal to 1/3 so all of that work and we actually have a pretty simple result we have a pretty simple result our our equation this thing here can be rewritten as this thing can be re-written as the a disappeared you just had you know it's 1/3 over s squared plus 1 B was the coefficient on the we make it very clear B was a coefficient on the or it was a term on top of the s squared plus 1 so that's why I'm using be there and then D D or D is minus B so D is minus 1/3 let me make sure I that B is 1/3 right - let me make sure I get that right right D is 1/3 so sorry B is in boy is 1/3 so D is minus 1/3 so B is a is the term on top of the s squared plus 1 and then you have minus D over the minus 1/3 over s squared plus 4 plus 4 this takes a lot of stamina to record this video I hope you appreciate it all right ok so let me rewrite everything just so we can get back to the problem because when you take that partial fraction detour it kind of you forget yeah I mean not not even to speak of the problem you forget what day it is let's see so you get the Laplace transform of Y is equal to 1 minus e to the minus 2 pi s times what that mess that we just solved for x and i'll write like this 1/3 times 1 over s squared plus 1 minus 1/3 times actually let me write it this way because I have this s squared plus 4 so I really want to have a 2 there right so I want to have a 2 in the numerator so you want to have a 2 over s squared plus 4 so if I if I put a 2 in the numerator that I have to divide this by 2 as well so times so let me change this to a 6 right minus 1/6 times 2 is minus 1/3 so I did that just so I get this in the form of the Laplace transform of sine of T now let's see let's see if there's anything that I can do from here anything this is this is an epic problem I'll be amazed if I don't make a careless mistake while I do this so we can rewrite everything let's see let's see if we can simplify this and by simplifying it I'm just going to make it longer we can write the Laplace transform of Y is equal to I'm just going to multiply the 1 out and then I'm going to multiply the e to the minus 2 pi s out so if you multiply the 1 out you get 1/3 times 1 over s squared plus 1 I'm just multiplying the 1 out minus 1/6 these are all the ones times the 1 times 2 over s squared plus 4 and I'm going to multiply the minus e so this and then you get my limits which colors do the minus e so then you get minus e to the minus 2 pi s PI over 3 times 1 over s squared plus 1 and then the minus and the minus cancel out so you get plus e to the minus 2 pi s over 6 times 2 over s squared plus 4 now taking the inverse Laplace transform of these things are pretty straightforward so let's do that let's take the inverse Laplace transform of the whole thing and we get y is equal to inverse Laplace transform of this guy right here is just 1/3 sine of T 1/3 not to write a parenthesis there sine of T and then this is minus 1/6 minus 1/6 times this is the Laplace transform of sine of 2t sine of 2t that's that term right there now these are almost the same but we have this little pesky character over here we have this e to the minus 2 pi s and there we just have to remind ourselves I'll write it here in the bottom we just have to remind ourselves that the Laplace transform Laplace transform of the unit step function I'll put the PI there just you know 2 pi times f of t minus 2 pi I should put it into the step function of T is equal to e to the minus 2 pi s times the Laplace transform of just or let me just write it this way times the Laplace transform of F of T so if we view f of T is just sine of T or sine of 2t then we can kind of backwards pattern match and we'll have to shift it and multiply it by the Laplace by the unit step function so I want to make that clear right if you just look if you didn't have this guy here the Laplace inverse Laplace transform of this guy would be the same thing as this guy just be sine of T inverse Laplace transform of this guy would be sine of 2t but we have this pesky character here which essentially instead of having the inverse Laplace transform just being our f of T it's going to be our F of T shifted by two pi times the the unit step function where it steps up at 2 pi so this is going to be minus 1/3 minus 1/3 times the unit step function it goes that where C is 2 pi of T times instead of sine of T sine of T minus two pi and then we're almost done almost done I'll do it in magenta to celebrate it plus this very last term which is 1/6 times the unit step function to PI of T you the used step function that steps up at 2 pi times sine of and we have to be we have to be careful here instead of into wherever we had a T before we're going to replace it with a t minus 2 pi so sine of a set of 2 t is going to be 2 times t minus 2 pi and there you have it we finally have solved our our very hairy problem we could take some time if we want to simplify this a little bit in fact we might as well at the risk of making a careless mistake at the last moment let me see if I can make any simplifications here actually it's not obvious that there's any without kind of resorting to some type of well we could factor out this this this this guy right here but other than that that seems about as simple as we can get so this is our function of T that satisfies our otherwise simple looking differential equation that we had up here that this will didn't look this looked fairly straightforward but we got this big mess to actually satisfy that equation given those initial conditions that we had initially