 Now we've derived a method of using variation of parameters for a set of differential equations. Let's work through an example that will make things abundantly clear and we can use the beauty of that equation to solve this problem. Here's my square matrix A and X and it's not homogeneous. I have this column vector f of t, column matrix f of t. I still need to remember that my set of solutions is going to be this x sub c, x sub t, my complementary and my particular solution. First of all I've got to do my complementary set of solutions. We're going to set f of t equal to zero. In other words make this a homogeneous equation and we're going to still use the method of getting eigenvalues and eigenvectors. So I'm going to get this new matrix A minus a lambda i. So what is that going to be? Negative three, negative lambda. One, two and negative four minus lambda. And I want to set the determinant of that equal to zero. In other words I'm going to have negative three minus lambda and negative four minus lambda and so those two minus these two and I set that equal to zero. Now I warn you these are long problems. It will take you quite a few minutes to do and I'll see if we need to break the video down. So that's going to be a 12. That's going to be a plus. That's going to be seven lambda plus lambda squared minus two equals zero and that looks to me as that's ten. So it's lambda squared, a seven, five times two. So it looks like lambda sub one equals negative two and lambda sub two is going to equal negative five. Those seem to be the two. I think the board is definitely not going to be big enough. So let's just do that. Let's do a minus lambda sub one, lambda sub one i. And what is that going to be? Well let's put a negative two for instance. So that's going to be a negative one, negative three minus negative two. Where are we there? And then a one. And here we have a two and negative four minus negative two leaves me with a negative two there. So we have that and I have to multiply this by k sub one. So we're going to have a negative one and one and two and negative two and I multiply this by k sub one and k sub two. In other words, you can clearly see the case of one is going to be equal to k sub two. In other words, k sub one is going to equal this matrix one one. One one. Negative k sub one is to this multiplication, negative k sub one plus k sub two and that is going to equal the zero vector or two times k sub one minus two times k sub two. Exactly the same thing. So that is going to be my case of one. Let's do a minus a lambda sub two i. I'm just skipping through these things easily. You should never have to do them by now. So that is going to be the negative five. So three, that's going to equal two. That's going to equal one. That's going to equal two. And of course that's going to equal one. And I have to multiply this by the case of two and we'll call that case of three and case of four. If I do this multiplication, I see that two times k sub one plus k sub two. And that's going to equal zero. And the same for this. It's going to be exactly the same. Not sub one and sub two, so to say there. Three and four, we made them. Three and four. You can do this in whichever way that suits your working. So in other words, I see how I'm going to have that. Case of four equals negative two times case of three. If I let case of one equal one, I'm going to have the fact that case of two is going to equal, case of two will equal, if I put a one in there, was I correct? Two and one, two and one equals negative. So if I put a cap for case of three or one in there, I'm going to get negative two. So there we go. Case of one and I have case of two. And I therefore have my complementary set. And that is going to simply equal, x is then going to be c sub one. And we have case of one. Case of one. So that's complementary set. Case of one e to the power lambda sub one t. Plus we're going to have a c sub two, case of two e to the power lambda sub two t. Let's get more chalk. In other words, my complementary set is going to equal. Now we've got to develop this fundamental matrix from this. So this is the only new part. So let's have c sub one. And then we're going to have case of one is one one times that, which is, well, let me write it out. It's one one e to the power negative two t plus c sub two, what was it? One negative two e to the power negative five t. And another way I could write this is the following. That's c sub one. And it's e to the power negative two t e to the power negative two t plus c sub two. And we're going to have e to the power negative five t and negative two e to the power negative five t. In other words, I can now write my fundamental set. Remember, that's x sub one and that's x sub two. In other words, my fund, my, my, my x sub c, yeah, is going to be e to the power negative two t e to the power negative two t e to the power negative five t negative two e to the power negative five t times c. And my, my column vector c is c sub one and c sub two. If I do this multiplication, then I get back to this, which is the same as that, which is where we get that from. In other words, my fundamental set in t equals e to the power negative two t e to the power negative two t e to the power negative five t minus two e to the power negative five t. There is my fundamental set. So I developed that. I get that from my fundamental matrix, I should say, from x sub one and x sub two. And remember, x sub one and x sub two is this k sub one times e to the power lambda sub one t and x sub two is k sub two times e to the power lambda sub two t. So that's easy. Now I have this. I think I'll stop the video here. We'll clean the board. And we'll get the particular solution from this. Now that we have our fundamental matrix, let's get the inverse of the fundamental matrix. So how do I do that? Well, it's one over the determinant. So one over this times that. So you have negative two e to the power negative seven t minus this is e to the power negative seven t. And what do I do? I swap these two around, so that becomes negative two e to the power negative five t. This becomes e to the power negative two t. And I put two negatives there. So that's negative e to the power negative five t and negative e to the power negative two t. What is this? This becomes negative three. So if I do that, that's negative three e to the power negative seven t so I have that the inverse of my fundamental matrix is going to equal what this so that's two thirds two thirds e to the power so negative five plus seven that's two that's two t here I'm going to have a third e to the power negative seven five that's two t as well and is that correct here and then here we're going to have another third e to the power seven a negative seven so that's five t and here we're going to have negative a third e to the power seven and two that's five t there is my inverse now I have to multiply this by the f of t let's just give ourselves some space here give us some space here so I've got to multiply that by the f of t what was the f of t that was three t and e to the power negative t so I've got to do this two by two by two by one so I'm going to be left with a two by one matrix so this is where the mistakes come in so this times that plus this times that okay so three t times this three three so that's going to be two t e to the power two t e to the power two t plus this times that that is a third e to the power t third and that's e to the power t that's that one times that one and that one times that one and then these two three and that three pencils out it's t e to the power five t that one and that one plus this one and this one so that's going to be negative a third e to the power five negative four that's four t so that is my two by one matrix that is my two by one matrix and now what I have to do is to integrate that I have to get the integral of that okay yes the other mu well let's leave that five t so I have to get the integral of this the integral of this dt so how do I do that well it is really not a problem you just do this row and this row and you're going to get two answers you're going to get a two by one matrix as well now yeah we'll have to use the product rule that'll be easy product rule and that one will be easy let's do that let's just get some chalk let's go for that so two t I think what I'll do here yeah let's run through that two t so what are you going to do with the product rule and remember the whole equation here is we also just have to multiply by this and that is going to be extra p remember that was our equation for x of p this is the multiplication of the inverse of the fundamental inverse of the fundamental matrix times the f of t which was there okay so what are we going to do let's just do some side work here let's make u equal to 2t that means v prime is e to the power 2t which means u prime is 2 and that means v was going to be a half e to the power 2t so I'm going to have uv so that's 2 that's that so that's t e to the power 2t minus the integral of u prime times that two times a half nothing is left that's e to the power 2t dt so here we're going to have left t e to the power 2t minus it looks like a half minus a half e to the power 2t so all I did was just integrated this on its own so what am I left today let's write that and then I still have to remember just to integrate that as well and the integral of versus just going to be plus a third plus a third e to the power t so what do we have left here so x of p equals the fundamental matrix times I've got the first bit it's t e to the power 2t minus a half minus a half e to the power 2t plus a third e to the power t e to the power t so that's the first bit I have and now I just need the second bit let's do that one so now we just integrate this so integral with with the matrix here two by one matrix just do the one there's your one answer one a row and then do the second low nothing other than this yet again we'll use to use the product rule let's just remind ourselves so I'm going to select u being t there's various ways to do the product rule this is my way and this is e to the power 5t which means u prime it's going to equal this one that means v was the first e to the power 5t and then for the product rule we have uv so that's going to be a first t e to the power 5t minus the integral of u prime v I can bring the five a fifth out e to the power 5t and then I must just remember to just to add the integral of that one which is going to be negative so that's dt negative that is going to be 12 e to the power 4t 1 over 12 e to the power 4t so I've done this product rule and that one now we still just have to do this integration so that's going to end up being a fifth t e to the power 5 e to the power 5t now the integral of this is going to be negative 1 over 25 negative 1 over 25 e to the power 5t that one and minus one over 12 e to the power 4t so I have my 2 by 1 matrix this is actually quite easy to integrate this now I just have to do this multiplication this one times that one so this is a 2 by 2 matrix this is a 2 by 1 matrix so remember multiplication they do not commute so I've got to do it in this order so I've got to multiply this matrix by that and that's just going to make for very long videos I'm going to stop there and that is just going to give you the x of p x of p is then going to be there but remember we still need the fundamental matrix times c plus then this answer there to have the full answer remember this was how we got it this was our our homogeneous complementary set of solutions and now we just have to do this multiplication to do that remember this was just a multiplication of the inverse of the fundamental matrix times the f of t times the f of t and I integrate that just row by row so that I can get two rows of answers nothing more difficult than that