WEBVTT mathematics/differential-equations/murray
00:00:00.000 --> 00:00:05.000
Hi welcome back to www.educator.com, I’m Will Murray doing the differential equations lectures.
00:00:05.000 --> 00:00:11.000
Today we are going to talk about inhomogeneous equations and the method of variation of parameters.
00:00:11.000 --> 00:00:22.000
There are 2 ways to solve inhomogeneous equations in the last lecture we learned the method of undetermined coefficients and we worked through that very carefully.
00:00:22.000 --> 00:00:32.000
Today we are going to learn a totally different method which is called variation of parameters, let us see how that works out.
00:00:32.000 --> 00:00:46.000
To solve the linear second order inhomogeneous, that is really the key word here, inhomogeneous constant coefficient differential equation, Y″ + bY′ + cy=g(t).
00:00:46.000 --> 00:00:58.000
The key part here is that inhomogeneous, remember homogeneous means you have a 0 on the right hand side, inhomogeneous means that you have a function here that is not 0, a g(t).
00:00:58.000 --> 00:01:10.000
We are going to solve the homogeneous equation first by the methods of earlier lectures, remember we had several lectures on how to solve homogeneous equations.
00:01:10.000 --> 00:01:23.000
If you do not remember how to do that, maybe go back and check the earlier lectures in the differential equation series and what you will get is a homogeneous solution c1 y1 + c2 y2.
00:01:23.000 --> 00:01:32.000
Before we go on I want to emphasize one point here, you will notice here that there is no coefficient in front of the Y″.
00:01:32.000 --> 00:01:37.000
That is going to be a key point to make some of the equations later on work out.
00:01:37.000 --> 00:01:56.000
If you are trying to solve one of these equations and you do have a coefficient in front of the Y″, what you want to do is divide that away any coefficient here.
00:01:56.000 --> 00:02:07.000
Let us see some examples of that and that really does matter and it is something that can really easily lead you into mistakes when you are solving these things, we will be careful with that.
00:02:07.000 --> 00:02:16.000
First you solve the homogeneous equation, it means you set the right hand side equal to 0, that is what homogeneous means.
00:02:16.000 --> 00:02:31.000
Using what we learned about the characteristic equation and complex roots from repeated roots, all that business took us several lectures to unfold to get a homogeneous solution c1 y1 + c2 y2.
00:02:31.000 --> 00:02:41.000
Let me show you where you go from there, you want to find a particular solution to the inhomogeneous using what is called variation of parameters.
00:02:41.000 --> 00:02:54.000
What that means is where we had c1 before and c2, we are going to replace those by generic functions u1(t) and u2(t).
00:02:54.000 --> 00:03:05.000
We do not know what the u1 and u2 are but we are going to replace those by functions and that is going to form our particular solution.
00:03:05.000 --> 00:03:24.000
Here is how you figure out what u1 and u2 are, you solve this system y1 u1′ + y2 u2′=g.
00:03:24.000 --> 00:03:35.000
Let me stress here what is known and what is unknown, the known is the y1 and y2.
00:03:35.000 --> 00:03:44.000
You know that because you got those from your homogeneous solution which you already solved.
00:03:44.000 --> 00:03:52.000
You also know (g), because that came from the g(t), that is how get this g.
00:03:52.000 --> 00:04:03.000
What you do not know and what you are trying to solve for are the u1 and u2, remember the u stands for unknown here.
00:04:03.000 --> 00:04:14.000
Since you do not know what u1 and u2 are, you do not know what their derivatives are either and you want to think of the 2 variables here as being u1′ and u2′.
00:04:14.000 --> 00:04:24.000
We have 2 equations and unknown here, it is like an algebraic system that you solved in high school algebra but it is actually trickier than that,
00:04:24.000 --> 00:04:30.000
Because all of these things are functions instead of just constants and numbers.
00:04:30.000 --> 00:04:38.000
Let me walk you through how you would solve these things, you solve the system for u1 and u2′.
00:04:38.000 --> 00:04:49.000
That just tells you the derivatives of u1 and u2, then you have to integrate u1′ and u2′ to get u1 and u2.
00:04:49.000 --> 00:04:58.000
Once you figure out those, you plug those in to your original guess for the particular solution and you make those the coefficients of y1 and y2.
00:04:58.000 --> 00:05:09.000
Remember those will be functions of (t), it is not c1 y1 + c2 y2, they are not constants anymore, they are functions of (t).
00:05:09.000 --> 00:05:21.000
I want to expand a little bit on this business of solving the system for u1′ and u2′ because that can be a little unpleasant, it is not as easy as solving systems in high school algebra.
00:05:21.000 --> 00:05:31.000
I will be gave a short hand way of solving that, you got find what is called the Wronskian of the 2 homogeneous solutions.
00:05:31.000 --> 00:05:36.000
Wronski was a Polish mathematician so the Wronskian is named after him.
00:05:36.000 --> 00:05:47.000
It means that you set up this little matrix of y1 and y2 and then on the second line you put their derivatives y1′ and y2′.
00:05:47.000 --> 00:06:00.000
Then you take the determinant of this matrix which means you cross multiply y1 × y2′ and y2 × y1′ and you subtract those.
00:06:00.000 --> 00:06:08.000
You get this determinant y1 y2′ – y2 y1′.
00:06:08.000 --> 00:06:23.000
The way you can find u1′ and u2′ is you plug in that determinant that you just figured out in the denominator and the numerator you have y2 and that (g).
00:06:23.000 --> 00:06:36.000
Remember that was from the right hand side of the original differential equation Y″ + bY′ +cy=g(t) that is where the (g) comes from.
00:06:36.000 --> 00:06:42.000
And the y1 and y2 come from your homogeneous solutions.
00:06:42.000 --> 00:07:03.000
That is kind of a formulaic way you can find u1′ and u2′ but you still have to integrate them to get u1 and u2.
00:07:03.000 --> 00:07:20.000
And then you take those u1 and u2 and plug in to your guess for the particular solution u1 y1 + u2 y2.
00:07:20.000 --> 00:07:26.000
There are several steps here we will go through some examples so you will get a chance to get more comfortable with this.
00:07:26.000 --> 00:07:28.000
Let us go ahead and jump in to the examples.
00:07:28.000 --> 00:07:40.000
We are starting with the homogeneous differential equation (t² Y″ – t) × (t + 2Y′) + (t + 2y)=0.
00:07:40.000 --> 00:07:57.000
We are given the general solution there, the homogeneous solution is c1 t + c2 te^t and then we are asked to find the general solution to the inhomogeneous differential equation.
00:07:57.000 --> 00:08:03.000
It is the same stuff on the left hand side but inhomogeneous means the right hand side is not 0.
00:08:03.000 --> 00:08:18.000
We replaced it with 2tq, let us go ahead and see how that one works out.
00:08:18.000 --> 00:08:21.000
I wanted to give myself a new clean slate here.
00:08:21.000 --> 00:08:30.000
Remember a key part of solving these things using variation of parameters is that you can not have a coefficient on the Y″.
00:08:30.000 --> 00:08:38.000
Here we do have this coefficient so right away I’m just going to divide the whole equation by t².
00:08:38.000 --> 00:09:01.000
I get Y″ -, now t/t² is 1/t, I will just write t + 2/t Y′ + t + 2/t²y = t³/t² is just t.
00:09:01.000 --> 00:09:20.000
What I did there was I divided away that t² so I will have a nice clean Y″ with no coefficient there and that means my g(t) is 2t, that is the g(t).
00:09:20.000 --> 00:09:29.000
The homogeneous solution is where you get your y1 and y2, so that is y1 and that is y2.
00:09:29.000 --> 00:09:39.000
I’m going to follow the solution hint that I gave you in the lesson overview where we find the Wronskian of y1 and y2.
00:09:39.000 --> 00:09:51.000
That means you write the original equations on the first line, y1 is t and y2 is te^t.
00:09:51.000 --> 00:10:00.000
On the second line you take their derivatives, the derivative of t is 1, derivative of te^e we got to use the product rule on that.
00:10:00.000 --> 00:10:21.000
It is t × the derivative of e^t, so that is te^t + e^t × the derivative of t, that is just e^t × 1.
00:10:21.000 --> 00:10:46.000
That is our Wronskian and we need to take the determinant of that, which is t² e^t + te^t- the back diagonal te^t.
00:10:46.000 --> 00:10:55.000
Those 2 terms cancel out and we get t² e^t, that is our Wronskian determinant.
00:10:55.000 --> 00:11:09.000
Remember our formula for u1′ is –g × y2/ the Wronskian, so that is negative.
00:11:09.000 --> 00:11:28.000
My g was 2t, 2t × y2 is te^t, I divide that by the Wronskian determinant which is t²e^t.
00:11:28.000 --> 00:11:38.000
It looks like I have a t² cancelling and an e^t cancelling, I will just get -2 there and that was my u1′.
00:11:38.000 --> 00:11:46.000
I integrate that to get u1, integrate that would respect to t will get 2t.
00:11:46.000 --> 00:12:02.000
You do not need to add constants when you are doing these integrals, ultimately our particular solution is going to be u1 y1 + u2 y2.
00:12:02.000 --> 00:12:17.000
If I added a constant to u1, I would end up just getting more constant multiples of y1 in my particular solution which would just replicate terms from my homogeneous solution.
00:12:17.000 --> 00:12:21.000
There is no point in adding constant to u1 here.
00:12:21.000 --> 00:12:34.000
U2′, remember our formula back from the lesson overview is (gy) 1/ the Wronskian determinant.
00:12:34.000 --> 00:12:51.000
Our g is 2t, our y1 comes from here, is t, divided by t²e^t and I get 2.
00:12:51.000 --> 00:13:03.000
The t’s are all cancelled but I still have this e^t in the denominator, that is the same as multiplying by e^-t.
00:13:03.000 --> 00:13:21.000
The integral of u2′, the integral of 2e^-tdt which is negative to e^-t, not dt anymore because I have done the integral.
00:13:21.000 --> 00:13:58.000
I do not need to add a constant when I do that integration, my particular solution is u1 y1 + u2 y2 which is -2t, that is u1 × y1 is t + u2 is -2 e^-t and y2 is te^t.
00:13:58.000 --> 00:14:10.000
This actually simplifies down a bit, we get -2t², the e^-t and e^t cancel each other out (-2t).
00:14:10.000 --> 00:14:34.000
Let me point something out, this -2t part is actually this replicates a term of the Y homogeneous there.
00:14:34.000 --> 00:14:37.000
It means that it is really not contributing anything to the particular solution.
00:14:37.000 --> 00:14:46.000
If you ran it through the differential equation you just get 0 because it is a homogeneous solution.
00:14:46.000 --> 00:14:56.000
We can omit, we can leave that part off.
00:14:56.000 --> 00:15:08.000
Which means when we go for the general solution I can leave that part off, it is the homogeneous solution + the particular solution just like before.
00:15:08.000 --> 00:15:31.000
It is c1 t + c2 te^t , and now my particular solution I can leave off the -2t because it is already built in to this part -2t².
00:15:31.000 --> 00:15:42.000
We have solved our very first problem using variation of parameters.
00:15:42.000 --> 00:15:47.000
Let me just recap how that worked out here, first thing we have to do is get rid of this t².
00:15:47.000 --> 00:16:00.000
We did not want any coefficient in front of the Y″ so I divided it out and that meant that the term on the right hand side became 2t, so that was the g(t) that I used there.
00:16:00.000 --> 00:16:08.000
Then I wanted to use my formulas for variations of parameters, first thing I have to do for that was to build this Wronskian matrix.
00:16:08.000 --> 00:16:22.000
Which means I take the 2 functions from the homogeneous solution t and te^t, write down their derivatives and get a 2 by 2 matrix, take its determinant by cross multiplying.
00:16:22.000 --> 00:16:35.000
That simplify down to t² e^t and then I used my 2 formulas for u1′ and u2′ which reduced down to -2 and 2e^-t.
00:16:35.000 --> 00:16:51.000
Integrate then to get u1 and u2, then I plugged it back into our guess for the particular solution which means that you take u1 and u2 and you multiply them by y1 and y2.
00:16:51.000 --> 00:17:01.000
That is what I’m doing here, I noticed that one term of the particular solution was actually a copy of this term of the homogeneous solution.
00:17:01.000 --> 00:17:20.000
I decided to leave it out because it is already built in to the homogeneous solution, I leave that part out and I added my particular solution back to the homogeneous solution to get my general solution.
00:17:20.000 --> 00:17:34.000
At this point, if I have initial conditions I would use them to find the values of c1 and c2.
00:17:34.000 --> 00:17:40.000
In this case I was not given an initial condition, I’m not going to find c1 and c2.
00:17:40.000 --> 00:17:47.000
I’m just going to stop with my general solution.
00:17:47.000 --> 00:18:04.000
Let us move on, for the inhomogeneous differential equation Y″ + y= tan t, we want to solve the corresponding homogeneous equation and find the Wronskian of the solutions.
00:18:04.000 --> 00:18:15.000
The homogenous equation means you take the right hand side and you set it equal to 0, that is Y″ + y is equal to 0.
00:18:15.000 --> 00:18:24.000
The characteristic equation, this is actually one that sometimes trips students up because they will say r² + r=0.
00:18:24.000 --> 00:18:35.000
That is not correct, remember the r term corresponds to the Y′ term not the y term, that is incorrect.
00:18:35.000 --> 00:18:51.000
Let me show you, the correct one would be r² + 1 =0, you will get r²=-1, r= i or -i.
00:18:51.000 --> 00:19:02.000
Remember we have a formula back when we got complex roots to the characteristic equation, you can look that up a few lectures back when we have homogeneous equations.
00:19:02.000 --> 00:19:21.000
There was a lecture called complex roots, it is said that when you have a + bi then you r solution is c1 e^at cos.
00:19:21.000 --> 00:19:36.000
I think we might have listed cos first, we might have listed sin first, it does not matter you can list either one first, + c2 e^at cos(bt).
00:19:36.000 --> 00:19:52.000
In this case our a is 0 and our b is 1, because we got 0 + 1i and 0-1i, these e^a t terms that just gives you e⁰.
00:19:52.000 --> 00:20:14.000
Those terms just turn into 1 and our homogeneous solution is c1 sin(1)t, just c1 sin(t) + c2 cos(t).
00:20:14.000 --> 00:20:28.000
We got a nice homogeneous solution, it is not the solution to the inhomogeneous equation yet but it is a nice homogeneous solution.
00:20:28.000 --> 00:20:46.000
We are also asked to find the Wronskian of the solutions, remember we set up this little matrix sin(t) cos(t) and then we take the derivative.
00:20:46.000 --> 00:20:59.000
The derivative of sin is –cos and the derivative of cos is sin.
00:20:59.000 --> 00:21:09.000
Reverse those, the derivative of sin(t) is +cos(t) and the derivative of cos is –sin(t).
00:21:09.000 --> 00:21:14.000
To take the determinant we cross multiply there.
00:21:14.000 --> 00:21:26.000
We get –sin² and this one is positive but there was a negative in there so we get –sin².
00:21:26.000 --> 00:21:40.000
The back direction you always subtract so –cos² and we get -1 for the Wronskian.
00:21:40.000 --> 00:21:47.000
Let me mention here that this is a slightly unusual situation.
00:21:47.000 --> 00:22:04.000
Normally the Wronskian will be a function of t not just a simple number, this was a nice one and it just simplify down to a number.
00:22:04.000 --> 00:22:11.000
Normally the Wronskian will be a function of t, it will be e^t or cos (t) or something like that.
00:22:11.000 --> 00:22:16.000
We have the Wronskian and we have our homogeneous solution.
00:22:16.000 --> 00:22:25.000
That is all was have to do for this example but you want to make sure you really understand this example because we are going to use this one to solve the next one as well.
00:22:25.000 --> 00:22:30.000
Let me recap quickly how this worked out, we wrote down the characteristic equation.
00:22:30.000 --> 00:22:38.000
This is the correct form of the characteristic equation and that one I was just trying to highlight a common mistake that student make.
00:22:38.000 --> 00:22:48.000
We found the roots, looked back at our old form for complex roots to find the generic form of the homogeneous solution.
00:22:48.000 --> 00:23:00.000
This is plugging in a=0, b=1, and we get our homogeneous solution and that was the y1, that was the y2.
00:23:00.000 --> 00:23:08.000
We set up our little matrix, found the derivatives and cross multiplied, simplified down to -1 as our Wronskian.
00:23:08.000 --> 00:23:15.000
We are going to use all these to solve the inhomogeneous equation in the next example.
00:23:15.000 --> 00:23:28.000
In example 3, we are going to keep going from example 2 where we have the inhomogeneous differential equation Y″ + y= tan(t).
00:23:28.000 --> 00:23:36.000
Let me just remind you that we already solved the homogeneous equation in the previous example.
00:23:36.000 --> 00:23:52.000
Here is what we figured out in example 2, the homogenous solution is c1 sin(t) + c2 cos(t).
00:23:52.000 --> 00:23:57.000
That means our y1 is sin(t) and y2 is cos(t).
00:23:57.000 --> 00:24:06.000
We also figured out the Wronskian of those 2 solutions, the Wronskian matrix turn out the derivative, the determinant turned out to be -1
00:24:06.000 --> 00:24:13.000
We are going to use all that to build our inhomogeneous solution using variation of parameters.
00:24:13.000 --> 00:24:29.000
Let me show you how that one goes, u1′, here is our generic formula that we had at the very beginning of the lecture its –y2g/the Wronskian.
00:24:29.000 --> 00:24:44.000
In this case, our y2 we got up above is cos(t) and our g, that is the right hand side of the original differential equation, that is g(t) right there.
00:24:44.000 --> 00:25:02.000
This is tan(t) and our Wronskian is -1 so the negative is cancel we got cos(t) and tan(t) I’m going to write that as sin(t)/cos(t).
00:25:02.000 --> 00:25:08.000
The cos is cancel and we just get sin(t), that was just u1′.
00:25:08.000 --> 00:25:18.000
To get u1, we have to integrate that, the integral of sin(t)dt is –cos(t).
00:25:18.000 --> 00:25:29.000
Remember, when we do this integration you do not need to add the arbitrary constant, if you did then you would end up just like replicating copies of your homogeneous solution.
00:25:29.000 --> 00:25:32.000
That is why you do not have to worry about the arbitrary constant.
00:25:32.000 --> 00:25:43.000
U2′, again using our formula from the beginning of the lecture is y1 g/the Wronskian.
00:25:43.000 --> 00:25:55.000
Our y1 was sin(t) and our g was tan(t), Wronskian is -1.
00:25:55.000 --> 00:26:17.000
Now, I put the negative outside, sin(t) and tan(t) is sin(t)/cos(t) and this is –sin²t/cos(t), that is a little uglier.
00:26:17.000 --> 00:26:28.000
I’m going to write that as –sin² as the same as 1 – cos ²(t)/cos(t).
00:26:28.000 --> 00:26:37.000
I will distribute the negative signs so I get cos²t – 1/cos(t).
00:26:37.000 --> 00:26:53.000
That is the same as cos(t), if I break up the fraction, -1/cos(t) is sec(t).
00:26:53.000 --> 00:26:58.000
That was all, remember u2′, we still have not actually found u2.
00:26:58.000 --> 00:27:02.000
To get u2 we take the integral of that, so let me keep going up here.
00:27:02.000 --> 00:27:15.000
U2 is the integral of cos(t) – sec(t)dt, so we got to integrate that.
00:27:15.000 --> 00:27:24.000
The integral of cos is sin(t), the integral of sec(t) is really not something you want to figure out on the spot.
00:27:24.000 --> 00:27:30.000
That is just something that you have to remember from either calculus 1 or calculus 2.
00:27:30.000 --> 00:27:39.000
If you do not remember that, you might want to check back at the www.educator.com lectures for calculus 2 in particular, we figured out what the integral of sec(t) is.
00:27:39.000 --> 00:27:56.000
It was the natural log of sec(t) + tan(t).
00:27:56.000 --> 00:28:05.000
Now we are going to take u1 and u2 and we are going to plug in our generic formula for the particular solution.
00:28:05.000 --> 00:28:26.000
That is u1 y1 + u2 y2 and u1 is –cos(t) that is from here, y1 from here is sin(t).
00:28:26.000 --> 00:28:52.000
Now u2 is this long expression sin(t), I will multiply it through by y2 which is cos(t) as I go along, + sin(t) cos(t) – cos(t) natural log of sec(t) + tan(t).
00:28:52.000 --> 00:29:04.000
That is our particular solution but it works out pretty nicely because you can see we got a –cos(t) sin(t) here and then a +sin(t) cos(t)so those cancel out.
00:29:04.000 --> 00:29:17.000
It simplifies down to –cos(y) × the natural log of sec(t) + tan(t).
00:29:17.000 --> 00:29:30.000
That was our particular solution and to get the general solution, remember it is the homogeneous solution + the particular solution.
00:29:30.000 --> 00:29:51.000
I go back to, my homogeneous solution is c1 sin(t) + c2 cos(t) + -cos(t) × natural log of sec(t) + tan(t).
00:29:51.000 --> 00:29:58.000
You do not put an arbitrary constant on that particular part.
00:29:58.000 --> 00:30:08.000
You just have arbitrary constants on the homogeneous part, the particular part was very carefully designed to work exactly right for the inhomogeneous equation.
00:30:08.000 --> 00:30:13.000
It does not get an arbitrary constant.
00:30:13.000 --> 00:30:23.000
To summarize what we did here, we started out with our homogeneous solution which we found back in example 2 and the previous examples.
00:30:23.000 --> 00:30:34.000
You can check back there if you do not remember where that comes from, c1 × sin(t), c2 cos(t), sin(t) is y1 and cos(t) is y2.
00:30:34.000 --> 00:30:45.000
We had these generic formulas for variation of parameters, u1′ is –y2g/the Wronskian and u2′ is y1g/the Wronskian.
00:30:45.000 --> 00:30:50.000
For each of those we get our g(t) over here from the right hand side of the equation.
00:30:50.000 --> 00:30:56.000
We plug in what y1 and y2 are I here and here and work them out.
00:30:56.000 --> 00:31:06.000
That was u1′ so we had to take its integral to get u1, that was our u1.
00:31:06.000 --> 00:31:15.000
This was u2′, a little bit of trigonometric cleverness and then we had to take the integral of that to get u2.
00:31:15.000 --> 00:31:22.000
We plug those back into our generic form for the particular solution u1 y1 + u2 y2.
00:31:22.000 --> 00:31:29.000
It turned out after we plugged in what u1 y1, u2 y2 where and got a nice cancellation here.
00:31:29.000 --> 00:31:34.000
That simplified down and gave us a slightly simpler form for the particular solution.
00:31:34.000 --> 00:31:41.000
We added that back on to the homogeneous solution c1 sin(t) + c2 cos(t).
00:31:41.000 --> 00:31:49.000
That plus our particular solution gave us the general solution to the differential equation.
00:31:49.000 --> 00:31:59.000
On our next example, we are going to start with the inhomogeneous differential equation Y″ + 3y′ + 2y=sin(e^t).
00:31:59.000 --> 00:32:06.000
We are going to solve the corresponding homogeneous equation and we are going to find the Wronskian of the solutions.
00:32:06.000 --> 00:32:15.000
The homogeneous equation means that you take the right hand side and you just set it equal to 0, you throw away whatever you see over there.
00:32:15.000 --> 00:32:25.000
We are going to throw away the sin(e^t) and we are joust going to get Y″ + 3Y′ + 2y =0.
00:32:25.000 --> 00:32:37.000
We learned in a few lectures back how to solve this kind of thing, you just set up the characteristic equation r² + 3r + 2=0.
00:32:37.000 --> 00:32:51.000
That factors nicely, that is r + 1 × r + 2=0.
00:32:51.000 --> 00:32:59.000
I get r=-1 or -2, if you did not want to factor it, you could also do this by the quadratic equation.
00:32:59.000 --> 00:33:11.000
My own personal feeling is that the quadratic equation is slight more susceptible to mistakes than the factoring method, but if you are more comfortable it is certainly ok to do it that way.
00:33:11.000 --> 00:33:25.000
We get the homogeneous equation is c1 e^-t that is from the -1 + c2 e^-2t that is from the -2.
00:33:25.000 --> 00:33:34.000
We got our homogeneous equation and that is a good step toward what we want.
00:33:34.000 --> 00:33:39.000
What we are asked to do now is to find the Wronskian of the solution.
00:33:39.000 --> 00:33:50.000
That means that you make a little matrix, e^-t and e^-2t and then find their derivatives.
00:33:50.000 --> 00:33:59.000
Well, derivative of e^-t is – e^-t, derivative of e^-2t is -2e^-2t.
00:33:59.000 --> 00:34:07.000
We are going to find the determinant of that matrix and that means we cross multiply here.
00:34:07.000 --> 00:34:22.000
Positive direction there gives us -2e^-t × e^-2t, remember you add the exponents so that is e^-3t.
00:34:22.000 --> 00:34:33.000
In the negative direction we cross multiply and we get -e ^-2t, e^-t, so that is e^-3t.
00:34:33.000 --> 00:34:52.000
But then we are subtracting it, so -e^-3t, that turns into a plus and we get -2 +1, -e^-3t as our Wronskian.
00:34:52.000 --> 00:34:58.000
That is what we got by solving the inhomogeneous equation and finding the Wronskian of the solutions.
00:34:58.000 --> 00:35:02.000
You want to hang on to this because the next example is to solve,
00:35:02.000 --> 00:35:05.000
Sorry that was for solving the homogeneous equation.
00:35:05.000 --> 00:35:12.000
We are going to use this same equation for the example and we will solve the inhomogeneous equation.
00:35:12.000 --> 00:35:22.000
Let me recap quickly how we did this, we started with the homogeneous equation which means you just throw away the right hand side, set it equal to 0.
00:35:22.000 --> 00:35:34.000
Solve that using the characteristic equation, factor it down, get a couple of roots, the roots become the exponents, the coefficients and the exponents, we get our homogeneous equation.
00:35:34.000 --> 00:35:47.000
That is going to be the y1, that is going to be the y2, and then we set up our little matrix here with y1 and y2 and the derivatives of each one.
00:35:47.000 --> 00:35:57.000
We multiply the positive forward direction, we multiply the negative backwards direction, add them up and we get our Wronskian there.
00:35:57.000 --> 00:36:02.000
Hang on to these solutions, we are going to use them in the next example.
00:36:02.000 --> 00:36:13.000
For example 5, we are going to solve the inhomogeneous differential equation Y″ + 3Y′ + 2y= sin e^t.
00:36:13.000 --> 00:36:20.000
Let me remind you that we have solved the homogeneous equation for this one in the previous example.
00:36:20.000 --> 00:36:28.000
Let me bring you up to date with what we have learned from example 4 here.
00:36:28.000 --> 00:36:34.000
If you have not looked at example 4 recently, just go back and read that over so this would not be a complete mystery.
00:36:34.000 --> 00:36:53.000
Example 4 told us that the homogeneous solution to this equation was c1 e^t + c2 e^-2t.
00:36:53.000 --> 00:37:06.000
That was our y1 and that was our y2 and we already found the Wronskian of those which turned out to be –e^-3t.
00:37:06.000 --> 00:37:14.000
We are in pretty good shape to get started on the inhomogeneous equation here which means we are going to use variation of parameters.
00:37:14.000 --> 00:37:33.000
Using our formulas for variation of parameters u1′ is –y2 × g/the Wronskian, so –y2 is e^-2t.
00:37:33.000 --> 00:37:50.000
G is sin(e^t), remember g is whatever you see on the right hand side there, so sin(e^t), got that over here from g(t).
00:37:50.000 --> 00:37:59.000
Our Wronskian determinant is –e^-3t, this does simplify a bit.
00:37:59.000 --> 00:38:12.000
First of course the 2 negative cancel each other, this e^-3t, if you bring it up into the numerator it becomes e^3t.
00:38:12.000 --> 00:38:23.000
We have e^3t, e^-2t, just gives you e^1t × sin(e^t), that simplifies a bit.
00:38:23.000 --> 00:38:37.000
To get u1 itself, that was just the derivative we found there, we need to integrate e^1t × sin(e^t) dt and we got to do a little substitution there.
00:38:37.000 --> 00:38:48.000
We are going to do a little s substitution, I can not use u, normally I like to use u for u substitutions but we are already using the u’s for something else here.
00:38:48.000 --> 00:39:00.000
I’m going to use another variable and I picked s, s = e^t and ds is going to be derivative of e and t is just e^edt.
00:39:00.000 --> 00:39:23.000
Here I have sin(s) and this e^e dt just give me a ds and the integral of sin(s) is –cos(s), which is –cos(e^t),.
00:39:23.000 --> 00:39:36.000
That was a little substitution, it might be worth reviewing the calculus 1 lectures for substitution here on www.educator.com if you are a little rusty on how to make substitutions in integration.
00:39:36.000 --> 00:39:40.000
Let me show you, the next step is to figure u2′.
00:39:40.000 --> 00:39:49.000
Again, using the formulas from the beginning, we have this is y1g/the Wronskian determinant.
00:39:49.000 --> 00:40:07.000
Our y1 was e^-t, g is still sin(e^t) and we are dividing that by –e^-3t, that is the Wronskian determinant.
00:40:07.000 --> 00:40:19.000
If I simplify that a bit, I will pull the negative outside and I will get e^-3t when it comes up to the numerator turns into e^3t.
00:40:19.000 --> 00:40:31.000
We got e^3t and e^t that gives us e^2t × sin(e^t) and that is just u2′.
00:40:31.000 --> 00:40:47.000
To get u2 I have to integrate that so u2 is the integral of that, couple of negative outside so e^2t × sin(e^tdt).
00:40:47.000 --> 00:41:02.000
We can solve this one using the same substitution, I will get my s is e^t, ds is e^tdt.
00:41:02.000 --> 00:41:12.000
This part will give me a sin(s) and now this e^2t, I’m going to write that as e^t × e^t.
00:41:12.000 --> 00:41:22.000
The reason I’m doing that is I need one e^t for my (ds), if I take on e^t to be (ds).
00:41:22.000 --> 00:41:31.000
Those were the collectively give me my (ds), I still have one e^t left so there is still an (s) left over there.
00:41:31.000 --> 00:41:39.000
I’m integrating s sin(s)/(ds) and that is still a little ugly, I’m going to use integration by parts here.
00:41:39.000 --> 00:41:50.000
That was something we covered in the calculus 2 lectures here on www.educator.com, you can check back and look up your material on integration by parts if you are a little bit rusty on that.
00:41:50.000 --> 00:42:00.000
I’m going to the quick version, the integral of s sin(s), let me use tabular integration here.
00:42:00.000 --> 00:42:05.000
I’m going to write derivatives on the left, t he derivative of s is 1, the derivative of 1 is 0.
00:42:05.000 --> 00:42:19.000
The integral of sin(s) is –cos(s), and the integral of cos(s) is sin, so the integral of –cos(s) is -sin(s)
00:42:19.000 --> 00:42:30.000
Then I make little diagonal lines, put a + and – and what I get here, I still have this one negative from the outside.
00:42:30.000 --> 00:42:47.000
I’m going to read along the diagonal lines there, -s cos(s) + because we have couple of minus there that cancel each other sin(s).
00:42:47.000 --> 00:42:55.000
If I distribute my negative back in, and by the way remember we do not have to include the (c) when we are integrating to get this u’s.
00:42:55.000 --> 00:43:07.000
That is one nice thing you do not have to worry about, if I distribute my negative back in I will get +s cos(s) and let us remember that s was e^t.
00:43:07.000 --> 00:43:26.000
E^t × cos(e^t) –sin (s) because there was a negative on the outside, - sin (e^t), that was my u2 there.
00:43:26.000 --> 00:43:48.000
Now I found u1 and I found u2, I’m ready to just plug them in to the generic form for my particular solution which is u1 y1 + u2 y2.
00:43:48.000 --> 00:44:23.000
U1 is –cos(e^t and that gets multiplied by y1 which is e^-t + u2 is e^t cos(e^t) – sin(e^t).
00:44:23.000 --> 00:44:35.000
All of that gets multiplied by y2 which is e^-2t, what happens here if I distribute that e^-2t here.
00:44:35.000 --> 00:44:47.000
E^-2t × e^t is e^-t × cos(e^t).
00:44:47.000 --> 00:44:54.000
I have got e^-tcos(e^t) here, I’m not forgetting that other term, we will get to that in a second.
00:44:54.000 --> 00:44:59.000
But over here we got -cos(e^t) × e^-t.
00:44:59.000 --> 00:45:04.000
Those 2 terms cancel each other out, this is pretty common in variation of parameters.
00:45:04.000 --> 00:45:13.000
You will get 2 terms that cancel each other out in some funny way, it is not always obvious when it happen but it is nice when it does.
00:45:13.000 --> 00:45:30.000
The only term I have left here is coming from these 2 factors, -(e^2t) × sin(e^t), it is the way it simplifies down there.
00:45:30.000 --> 00:45:46.000
That is my particular solution, my general solution remember is the homogeneous solution + the particular solution.
00:45:46.000 --> 00:45:56.000
That is the homogeneous solution we already figured out back in example 4 was e^-t + c2 e^-2t.
00:45:56.000 --> 00:46:12.000
I’m going to add on the particular solution that we just worked out that is negative, -e^-2t sin(e^t).
00:46:12.000 --> 00:46:21.000
That is my general solution since I do not have initial conditions, I do not need to figure out what c1 and c2 are.
00:46:21.000 --> 00:46:27.000
You do not put a constant on a particular solution, just on a homogeneous solution.
00:46:27.000 --> 00:46:32.000
That is my general solution and I’m done with that one.
00:46:32.000 --> 00:46:39.000
Let me recap what we did there, we started out with the homogeneous solution which we found from example 4.
00:46:39.000 --> 00:46:48.000
If that was a mystery where that came from, go back and watch the video for example 4 and you will see where that comes from.
00:46:48.000 --> 00:46:58.000
Read off y1 and y2 there and we had also figured out the Wronskian matrix in the previous example.
00:46:58.000 --> 00:47:12.000
That is still coming from example 4, we have our Wronskian there and then we used our formulas for u1′ and u2′ in terms of y1 and their Wronskian matrix and y2.
00:47:12.000 --> 00:47:22.000
There is a (g) in there, and we get the (g) from the right hand side of the original differential equation, that is where that (g) comes from, here and here.
00:47:22.000 --> 00:47:33.000
We simplify those down that gives us u1′ and u2′ and to get u1 and u2 themselves you have to integrate those.
00:47:33.000 --> 00:47:37.000
That is what we are doing here is we are integrating with a little substitution.
00:47:37.000 --> 00:47:48.000
First one is not a bad integral to get u1 by itself, remember you do not have to add a constant when you are doing these integrals to find u1 and u2.
00:47:48.000 --> 00:48:00.000
U2 is a little messier, we had to integrate this and we did a substitution first and then even after substituting we had an integral that we needed to solve by integration by parts.
00:48:00.000 --> 00:48:07.000
That is what I was doing up here, this little table is doing the integration by parts to integrate s sin(s).
00:48:07.000 --> 00:48:14.000
If that is fussy for you, you might want to go back and check the lectures for calculus 2 here on www.educator.com.
00:48:14.000 --> 00:48:20.000
There is a whole lecture on integration by parts where you get some practice with that.
00:48:20.000 --> 00:48:30.000
After we did that integration by parts we got to substitute back and distribute the negative sign (s is e^t) and we got our u2.
00:48:30.000 --> 00:48:39.000
We took u1 and u2 and plug them into our generic form for the particular solution, so there is our u1 and u2.
00:48:39.000 --> 00:48:48.000
Multiply them by y1 and y2, it was nice because some terms cancel, that term cancel with that term here.
00:48:48.000 --> 00:48:54.000
It simplify down to a single term here, that was our particular solution.
00:48:54.000 --> 00:49:00.000
To find the general solution remember you add the particular solution back to your homogeneous solution.
00:49:00.000 --> 00:49:09.000
There is our homogeneous solution again and there is our particular solution being added on to it.
00:49:09.000 --> 00:49:15.000
That is how variation of parameters works and that is the end of this lecture in the differential equation series.
00:49:15.000 --> 00:49:21.000
I’m very happy that you are watching, my name is Will Murray and you are watching www.educator.com.
00:49:21.000 --> 00:49:22.000
Thanks for joining us, bye.