11 - Solve Differential Equations (ODEs) w/ Laplace Transforms, Part 3

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello welcome to this lesson of the Laplace transform tutor here we're going to solve another differential equation again ratcheting up the complexity a little bit as we go the same process applies we'll apply the Laplace transform to both sides collect the terms trying to put the Laplace transform on one side by itself and then we'll end up trying to invert but what you're gonna find is that you know the previous two problems we did were pretty simple and so when we got down to that step inverting it back from doing the inverse transform back to get to time was pretty simple from here on out these problems and the ones that follow it's gonna be a little bit more difficult to invert it it's still possible given that what we already know but there's a little trick that we have to do and you may have I know that you've used it in the past it's called partial fractions expansion I want to get into it too much here because I'll review it as we go through the problem but the bottom line is in order to really solve anything with Laplace transforms you pretty much have to be pretty comfortable with partial fractions expansion I'm going to review it here but you might be a good idea for you to go back to calculus I know that my calculus videos cover partial fractions everybody taking calculus at some point has to learn partial fractions so it's probably a good idea for you to be good at that because we're gonna use it in a lot of problems so let's just not get too far ahead of ourselves let's look at the differential equation first derivative of the function X of t minus X of T is equal to 2 times the sine of T so this is a much more realistic looking differential equation that you might see and in a real differential equations course you know and you have to solve that and so on the initial condition is x + 0 is equal to 0 and notice that there's only a first derivative anywhere in this equation that means there's only one initial condition required to solve it so that's what's given to us let's go ahead and march through and do exactly what we always do let's take the Laplace transform of everything here so it'd be the Laplace transform of that derivative Laplace transform of X and on the right hand side it's gonna be the Laplace transform of 2 times the sine of T so we go through the equation applying everything everywhere and then we will now work with this so if you remember and go back over here to refresh your memory Laplace transform of the first derivative is s times the Laplace minus the initial condition and that's we're gonna put here so to be s times the Laplace transform of X minus X of 0 that's what we're gonna have then we have a minus sign here so everything here just comes from this now we have a minus sign this Laplace of X we're just going to leave alone we can't do anything with it yet on the right hand side we have the Laplace transform of two times the sine of T so for now let's just leave it alone we'll actually just pull the two out because it's a constant and we'll just say sine of T like that alright so on the left hand side what we have we have s times the Laplace transform of X and then here we have the initial condition which we can see is zero so really I'll just for completeness put it there but really it just drops away and now let's go deal with this what's the Laplace transform of sine of T well if we look over here the Laplace transform of sine of beta times T is beta over s squared plus beta squared in this king in this case beta is 1 so it's going to be 1 over s squared plus 1 so what we'll get here is we'll have 1 over s squared plus 1 that's going to be that Laplace transform that we care about and so what we're going to do now is we will notice that this 0 is basically just basically drops away so what we're going to have then is we'll factor out the Laplace transform on the left to have the Laplace transform of X open a parenthesis we'll have s and then we'll have minus 1 this basically is simplifying this the 0 drops away we factor out a little plus s minus 1 on the right hand side we'll have a 2 on the top s squared plus 1 on the bottom ok so what we have here is the Laplace transform times this term equals this term over here we want to solve for the Laplace transform so we're going to divide by this term right here so I have the Laplace transform of X is equal to two over would divide by this will give us s minus one over here and then we'll have s squared plus one right here okay so we've basically gotten down to the point where we've done in all of these problems we've taken the Laplace transform of both sides we've applied our initial condition and we've solved for the Laplace transform which is a pure function of s now all we need to do is invert it come backwards so that we can go back to the time domain and basically convert this to a function of X of T but the problem is when you look at this two over this term in s times this term in s if you look over at our table we have absolutely nothing that looks like that should look at this table over here we don't have anything that looks like that now let me tell you though we do have this term matches part of it the s minus lambda kind of matches this part and the s squared plus one kind of matches this part you can see how you can kind of use this guy to get that part of it over there but unfortunately when you see these Laplace transforms like this and this one like this those are if they're standalone now we have something multiplied by something else and you're taking the Laplace transform of the entire thing so you cannot just apply them individually they're multiplied together if they were added together sure we can apply that Laplace transform term by term but now we're we're trying to invert the whole thing another way to look at it is if I multiply all these s's out I'm gonna get some polynomial in s cubed because that's the leading terms here and I have nothing on the board over there that that can invert an S cubed polynomial when it's s cubed plus 2's squared plus 3s plus 5 or whatever it ended up being I don't have anything that looks like that so you're stuck for a minute now here's where I said that there will be some tricks so to speak to help you invert these things and you need to be comfortable with them and what I mentioned to you before is partial fractions expansion this is a textbook partial fractions expansion there so what we need to do is expand this in partial fractions where one of the fractions will have the S minus 1 in the denominator the other fraction the other point of the partial fractions will have this in the denominator and they'll be linked by a plus sign that's what partial fractions does so I can then apply these these guys on the table individually to those so I could just tell you hey do partial fractions on this and and and you know just kind of throw you to the wolves but I don't want to do that because I think that's a little bit mean and you know we want to make sure you understand everything so let's do a very quick review of partial fractions all right I'm gonna give you enough of a review to kind of get us through this problem but if I were you I would also review what you learned in calculus either from my videos or from your textbook because it's something that we're gonna use a lot so here we go this is my informal definition of partial fractions it's gonna be written kind of in my own words if in the denominator meaning the denominator of whatever it is you're trying to split apart you have the any of the following okay you look a little weird I'll explain it 1 over s minus a to the IMP power then you write as the following you write it as some constant a 1 over s minus a plus some constant a 2 over s minus a squared plus dot plus a to the M or sub M over s minus a to the M power so what we're trying to say is basically partial fractions expansion is a way to when you have basically two or more terms in the denominator where they're basically polynomials and s is basically what it's going to boil down so here you have s minus 1 to the first power and we have s squared plus 1 to the first power if you have something in the denominator where it's just s minus a number raised to a power in this case we have s minus 1 to the first power so it's going to be simpler but you might have s minus a squared s minus a to the third s minus a to the fifth whatever whatever power you have outside of the parentheses you basically mean to add that many so if you have let's say s minus a to the first power it's just gonna be this term right here they have s minus something to the second power then you'll have this term and then another constant with this guy squared if you have three terms you'll have three terms where you have first power second power third power so whatever power you have down here you're going to end up with that many terms that's why it's s minus a to the M power all right let me write something else underneath it if you have or I should say something like this one over s squared plus B s plus C to the M power then you write as B 1 s plus C 1 over s squared plus B s plus C right plus B 2 s plus C 2 over s squared plus B s plus C squared and then I'll say plus dot dot dot let me go ahead and scoot over a little bit side 1 plus dot dot plus and then basically be M s plus cm over s squared plus B s plus C to the M power alright I know this looks kind of ugly you know when you explain something like partial fractions it looks extremely complicated as first at first but we're gonna put stuff like this on the board I'm trying to summarize all possible cases right so that's why I have all these little M's running around everywhere I'm generalizing everything in reality when you have a real partial fractions problem it's gonna be much simpler and it'll just be a few terms and then you'll basically solve it but basically you're looking for two classes of the denominator and then you can split this guy up as follows if you have very simply s notice there's no power on this but if you have s minus a to the M power then you basically have to have that many terms each one increases the power of the you have a single constant on the top here I'm calling them a 1 a 2 a 3 whatever a a sub M but it doesn't matter what you label the constant on the top ultimately you're going to be solving for these constants there now if you have a denominator that looks like a polynomial a full-blown polynomial in s where you have s squared plus some number times s plus C all raised to the M power then you kind of have the same thing except the top is BS plus C in the bottom again you have to have that many terms however many what the power of M is so here's the first power here's the second power third power on up to however whatever power of M you have each time you add a term you have to add another BS + c BS + c BS + c non numbering them here but in reality it doesn't matter if you call it B 1 B 2 C 1 whatever you just need to create some constants and solve for them so what we want to do is want to expand that guy there so again I kind of said that you need to kind of review it on your own so what you're gonna do is essentially is you're gonna rewrite your partial fraction expansion in terms of this on the right hand side then you're gonna cross multiply and solve for the constants now believe me I totally understand that this may look confusing at first or whatever but all of you guys up to this point must have studied this in calculus I know that I taught it in my calculus 2 course so go refresh your memory on that if its total Greek to you you really need to understand it or you're not going to be able to get very far with inverting any of applause transforms because a lot of times they do look like this so what we're gonna do now is we're gonna leave this on the board and we're going to we're going to continue with this problem and you're gonna see that it's not that big of a deal so here we have a situation let me go and screw this over actually I think I'd rather scoot it over so you can see both sides the way we're going to write this is we have a Laplace transform equal to this so we have a simple s minus 1 on the bottom and we have a polynomial in s each power of these parentheses is just 1 so really what we're going to have is we're gonna say that this fraction here this whole term here can be re-written in terms of a partial fraction expansion and it would look something like this a over s minus 1 plus B s plus C over s squared plus 1 that's it in this particular case there's only a power of 1 here so we only need one power and s plus 1 there's only a power of 1 in here so we only need one of these powers here because it's so simple you just use a simple single constant a for this and then be s plus C so what we're saying is that this fraction 2 over all of this stuff is exactly equivalent to the sum of these two fractions here all that remains is for us to find out whether a B and C is and if we can find out what a B and C is then we can expand into this partial fractions representation which as you will see as we go on is going to let us invert this transform whereas right now if we leave it like this we can't do that so the way you continue with partial fractions expansion is once you write out what it's equivalent to here you need to basically multiply both sides because there's an equal sign here this is actually equivalent to what we have on the right so we can multiply left and right by anything we want we're gonna multiply by the entire denominator here the entire denominator both sides of the equal sign so if you do that to the left you're just gonna get a two because everything is going to cancel and when you get to this term here you're gonna end up with a and you're gonna end up with s squared plus one because if I multiply both sides by this then when it multiplies by this term the S minus 1 will cancel this will be left multiplied by a and then you will have be s plus C and then you will have s minus 1 over there because when I multiply by both of these terms it gets multiplied here and then it also gets multiplied here when I multiply over here the S squared plus 1 cancels this is the only surviving term that gets multiplied notice I wrap it in parentheses to make it absolutely clear all right so again what you do is you do a lot of algebra up until this point it's been pretty simple but now what we're gonna do is have to bust out this guy in algebra and see what a B and C are equal to so what we'll do is we'll say 2 is equal to a times s squared plus a just distributing this in and then here we have to do foil because we have two binomials so what we will have is for the first terms will have B s squared for the inside terms will have C s for the outside terms we'll have negative B s and for the last terms will have negative C so we literally are just doing algebra on all of that stuff and then we want to collect terms but we want to collect them in groupings of s s squared and so on so we look for the s squares and we see we have two of these guys so we factor out this s squared and it's a plus B don't worry about why we're doing it yet just realize that we're collecting these terms and factoring it out okay I'll put a dot under here and under here to tell you that we've used those two terms now we try to collect the S terms here and so I'll pull out an S and I'll say C minus B because that's factoring out an S from here I'll put a dot under here and here to tell you we've used these terms the only terms left is a minus C all right plus a minus C I'll just put a parenthesis around that just to group it and show you so all we've done is we've cross multiplied we've collected terms we factored everything out and now we have this is actually any an equal sign here so what we have basically learned is we look for s squared terms on the left there's no s squared terms on the left and so since there's an S squared turn on the right what we've basically figured out is a plus B must be equal to zero because we're looking for a coefficients of s squared on the left and they don't exist so we must set this now equal to zero now we look at this term and we're looking for any terms that involve s over here and there are none so C minus B we now know is equal to zero so basically both of these are zero because this is a simpler problem this constant there's no s here this constant implies that a minus C must equal to the constant term on this side which is two right so basically what we have done is we have created a system of equations with a B and C we have three equal three variables a B and C and we have three very simple equations so we can solve this system for a B and C and you can do it any way you want any way you're comfortable you can do substitution which is what I'll do here in a second you can set it up as a matrix and take the inverse and multiply by the right-hand side that's kind of how I like to do it if it's a more complicated set of equations you can use matrix methods if you're allowed to use graphing calculators in your test then most of these calculators have it where you can just type the stuff in and it'll calculate a B and C for you you can use that if you want but for now since we're learning this stuff I want to show you everything so we're gonna solve this we're gonna solve this guy straight out so what I want to do first is I want to rearrange the first equation solve for a so a is equal to negative B the second equation I want to turn around and solve it for C which is just going to be B but because we move it over and then I'm gonna take these two guys and I'm gonna plug it in into the third equation and I'm gonna change colors for that and so what I'm going to have is a we said is negative B minus C which we now said is equal to B is equal to two so what you have is negative two B is equal to two and so what you have then is B is equal to negative one B is equal to negative one so that's one of the answers and now that we have that it's extremely easy to write the rest of it because a is equal to negative B so we say a is equal to negative B which we now know that it's negative B is negative one so we do the negative of that so negative B equals negative negative one equals one right so we say ne is equal to one and then finally C is equal to B and since B is negative one we just say it's a negative one so now what we have is a B and C software a is positive one B is negative one and C is also negative one so doing all this work gives us three constants now we come back up to our partial fraction expansion now we know what a is now we know what B is now we know what C is which are all defined as numbers so now we know that this fraction here this whole thing can be written in this form that's called partial fractions expansion so what I want to do is apply what we have here so all right so now what we're going to do is use what we have expanded in partial fractions and plug in our values for a B and C so on this board we will say that the Laplace transform of X is equal to a over s minus one where a we have solved for is equal to 1 so it's 1 over s minus 1 and then we have plus B s plus C B is equal to let's see here B is equal to negative 1 and C is also equal to negative 1 so it's negative s plus a negative 1 so negative s minus 1 over s squared plus 1 all right so now we're getting somewhere we feel like I do know how to invert this one we've done that a lot but this one still looks a little bit weird but then we realize that I can bust this apart into two into two fractions there's nothing to do with partial fractions just just regular old algebra and you'll see what I mean in a minute here we can put the negative from here and call this s over s squared plus 1 this negative comes from here 1 over s squared plus 1 right so this comes about because we have two terms in the top linked by a minus sign and so we can write the first time over the denominator and then the second term over the denominator this is a basically just fraction addition if I had given you this and said hey add these guys together you would say these are the same denominator so keep the denominator add the numerators this is what you get we're just going in Reverse so now that we've done this we now can finally actually make some progress so because now we can say that X of T is the inverse Laplace of 1 over s minus 1 minus from here the inverse Laplace of s over s squared plus 1 minus from here the inverse Laplace of 1 over s squared plus 1 just like that and so then we just go term by term we say X of T is equal to 1 over s minus 1 comes straight from here s minus 1 where lambda is 1 we get e to the 1 T so we e to the 1 T like this the minus sign camp comes from here and then we look for s over s squared plus 1 we see s over s squared plus 1 now beta must equal 1 so if beta is 1 then this inverts to cosine of 1 times T which is just cosine T all right and then finally we have a minus sign here this one is 1 over s squared plus 1 1 over s squared plus 1 beta must be 1 so we have 1 over 1 sine of 1 T what we get is 1 over 1 is 1 and we have sine of 1 and times T this is the final answer this is what we've been trying to find when you solve a differential equation what you're trying to do is figure out what X of T is what is that function that makes this true if you take this function X of and you stick it back into this differential equation if you take its derivative and then you subtract the function itself you're gonna get this alright and that's basically how it works there and the initial condition is going to hold at X of 0 you should get 0 in fact you can kind of look at that right here X of 0 is equal to 0 if you put 0 here e to the 0 is 1 here cosine of 0 is also 1 sine of 0 is 0 so you have 1 minus 1 gives you 0 the initial condition satisfies our solution so real quick from the top what we basically have to do with all of these problems is Laplace transform both sides which we've done here with the derivative here this carries down Laplace transform here we will do in the next step then we plug in the initial condition from here right take the Laplace transform of the right side we factor out the Laplace transform giving us this then we move it over here this is what we need to invert if you can invert it great now frequently you're going to have terms like this on the bottom you need to figure out if you can use partial fractions so what you're looking for is terms where it's just X minus a number raised to a power you're also looking at polynomial terms s squared plus something times s plus C raised to a power in this case we only have one of these terms so it's just one constant over this guy that's why we did this and then here we only have one power so it's just BS plus C over the first power of this guy but if you had multiplicity if you had more than one of those in terms of an exponent here you would have to add more terms going up in the power of the denominator each time and that gets into the messiness of partial fractions if you have a much more complicated problem like let's say for instance this problem that we were working came out 2's minus 1 to the third power here and then s squared plus 1 to the fourth power that would make this a much harder problem because we'd have to spend a lot more time expanding partial fractions but anyway once we get it written down into what we think it needs to be multiply both sides by the denominator here so they gets rid of everything on the left and it gets us this on the right we distribute everything in and we cool terms but when we collect them we're trying to cook factor out an S squared we're trying to factor out an S and then we're trying to write a constant term then we make equality's we say these two things must be equal so if there's an S squared term on the left in this case there's not but if there was we just set the coefficient equal to this in this case at zero we set the coefficient of s from this side in this case it's equal to zero and then we have a constant term which must then be equal to two then we solve the system of equations any which way you want to find a B and C which we found once we do that we can write the partial fractions expansion which we can do one more step to split it up further and then the whole goal of it is to take Laplace transforms functions of s that are all wrapped up together multiplied and bust them up into a lot of terms that can be individually analyzed so what we end up with is having to inverse this one inverse this one and inverse this one which we can then do so as I said before the basic technique remains the same we want to Laplace both sides collect everything inverse Laplace the answer it's just that doing that inverse sometimes can take some work a lot of opportunity for mistakes the partial fractions expansion can go wrong with the algebra you know they're solving that little system of equations to get the partial fractions can lead to algebraic errors and things like that so you got to be careful but ultimately the concept of what we're doing is not hard so make sure you can do this yourself I encourage you to get a piece of paper and do it yourself by hand and then follow me on to the next section we'll just basically continue giving our bearings with solving these problems learning how to deal with Laplace transform in practical ways and plowing through the algebra and the solution methods step-by-step so that you can gain practice and confidence with the Laplace transform
Info
Channel: Math and Science
Views: 78,886
Rating: undefined out of 5
Keywords: laplace, laplace transform, laplace transformations, laplace transform examples, laplace transform problems, transform, differential equations, laplace equation, inverse laplace transform, math, equation, engineering, odes, ordinary differential equations, differential equations laplace transform, differential equations laplace transform examples, systems of linear differential equations laplace, ordinary differential equations laplace, laplace differential equation, engineering math
Id: vFgzuAzphNc
Channel Id: undefined
Length: 27min 30sec (1650 seconds)
Published: Thu May 17 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.