Transcription of Matrix Differential Equations Jacobs - Xecunet
1 Matrix Differential EquationsJacobsOne of the very interesting lessons in this course is how certain algebraictechniques can be used to solve differential Equations . The purpose ofthese notes is to describe how the solution(u1u2)of the Matrix equation(abcd)(u1u2)= (u1u2)will apply to the solution of the differential equa-tiona2d2ydt2+a1dydt+a0y= 0. As we will see later, the differential equationcan be rewritten in a Matrix form and then the eigenvectors and eigenvaluesof the Matrix then lead to a of Eigenvectors and EigenvaluesLetA=(abcd)and u=(u1u2). A number is said to be aneigenvalueofAif there is a nonzero vector uso thatA u= u. The vector uis saidto be aneigenvectorofA. Please note that the equation (A I) u= 0,whereI=(1 00 1)and 0=(00), is completely equivalent to the equationA u= u.
2 This is important because if we seek a nonzero solution uof(A I) u= 0then the matrixA Ihad better not have an all, ifA Ihad an inverse, then the equation (A I) u= 0couldbe solved by multiplying both sides by this inverse and we would obtain u= (A I) 1 0= 0. This could not be if uis supposed to be a nonzerosolution of the Ihas no inverse then the determinant ofA Imust be 0, andthis is how we find the :Find the eigenvalues and eigenvectors ofA=(1 2 1 4)The determinant ofA Iis 1 2 1 4 = 2 5 + 6. This is zero onlywhen = 2 or = 3, so these are the find the eigenvectors corresponding to = 2, we solve (A 2I) u= 0(A 2I) u=( 1 2 1 2)(u1u2)=(00)If we multiply out and compare coordinates, we get u1+ 2u2= 0 sou1= 2u2 u=(u1u2)=(2u2u2)=u2(21)Thus, any nonzero scalar multiple of(21)will be an eigenvector correspond-ing to eigenvalue = , we find the eigenvectors corresponding to = 3 by solving the matrixequation (A 3I) u= 0(A 3I) u=( 2 2 1 1)(u1u2)=(00)This implies that uis a solution only if u1+u2= 0 u=(u1u2)=(u2u2)=u2(11)Therefore, any nonzero scalar multiple of(11)will be an eigenvector corre-sponding to eigenvalue = MatricesA Matrix (abcd)is said to bediagonalifb=c= 0.
3 So, for example,the identity Matrix (1 00 1)is a diagonal Matrix . Just about any matrixcalculation in easy to do with diagonal matrices. For example, look at thefollowing Matrix multiplication, where the matrices are not diagonal:(a11a12a21a22)(b11b12b21b22)=(a 11b11+a12b21a11b12+a12b22a21b11+a22b21a2 1b12+a22b22)Compare this to the simplicity of multiplying two diagonal matrices:(a1100a22)(b1100b22)=(a11b1100a 22b22)Finding the inverse of a Matrix is also simpler if the Matrix is diagonal. If(abcd)has an inverse, then it is given by:(abcd) 1=(dad bc bad bc cad bcaad bc)Notice how much simpler this formula is if the Matrix is diagonal:(a00d) 1=(1a001d)Diagonalization of MatricesIn many cases, we can take matrices that are not diagonal and put them interms of a diagonal Matrix through a simple Matrix multiplication a simple demonstration, take the matrixA=(1 2 1 4)whose eigenvec-tors(21)and(11)have already been calculated.
4 We begin by constructing amatrixP=(2 11 1)from these eigenvectors. Now, look what happens whenwe calculate the Matrix productP 1AP=(1 1 1 2)(1 2 1 4)(2 11 1)=(2 2 3 6)(2 11 1)=(2 00 3)We have just obtained a diagonal Matrix . This formula applies to a moregeneral Matrix (abcd).Suppose the eigenvalues ofA=(abcd)are 1and 2with eigenvectors u1=(p11p21)and u2=(p12p22)respectively. This means that:A u1= 1 u1A u2= 2 u2(a11a12a21a22)(p11p21)=( 1p11 1p21)(a11a12a21a22)(p12p22)=( 2p12 2p22)Now, let s combine these results. LetP=(p11p12p21p22)AP=(a11a12a21a22)(p11 p12p21p22)=( 1p11 2p12 1p21 2p22)Compare this to the productP where =( 100 2)P =(p11p12p21p22)( 100 2)=( 1p11 2p12 1p21 2p22)We see thatAP=P . This means thatP 1AP= and thereforeP 1 APis a diagonal Matrix .
5 Of course, this assumes that the matrixPhas an inverse. It is easy to prove that as long as 1 = 2, then the columnsofPare linearly independent andPwill have an : LetA=(0 1 8 6). Find a matrixPso thatP 1 APis begin by solving 0 = det(A I) = 2 6 + 8 to get the eigenvalues. 1= 2 2= 4 The corresponding eigenvectors are:(12)(14)and therefore, the required matrixPis(1 12 4)Let s check this answer:P 1AP=(2 12 112)(0 1 8 6)(1 12 4)=(4 1 4 2)(1 12 4)=(2 00 4)The result is a diagonal Matrix . Notice that the entries along the diagonalare exactly the eigenvalues to Systems of Linear Differential EquationsProblems involving interconnecting spring systems, tank systems and elec-tric circuits involve several unknown functions solving a system of differen-tial s consider, for example the problem of finding two functionsx1=x1(t)andx2=x2(t) that solve the following system of differential Equations :x 1(t) =a11x1(t) +a12x2(t)x 2(t) =a21x1(t) +a22x2(t)Let s put this in Matrix notation.
6 Let x=(x1x2)sod xdt=(x 1x 2)and letA=(a11a12a21a22). The system of differential Equations can now be writtenasd xdt=A x. The trick to solving this equation is to perform a change ofvariable that transforms this differential equation into one involving only adiagonal the eigenvector procedure, we can find a matrixPso thatP 1AP=( 100 2). We can define a vector-valued function v=(v1(t)v2(t))by the formula v=P 1 x. Make the substitution x=P vinto the differential equationd xdt=A xdt=A xddt(P v) =A x=AP vPd vdt=AP vd vdt=P 1AP vSinceP 1 APis a diagonal Matrix , the Matrix differential equation is now:(dv1dtdv2dt)=( 100 2)(v1v2)=( 1v1 2v2)If we now compare coordinates, we get two simple differential Equations :dv1dt= 1v1dv2dt= 2v2 These Equations can be solved easily using separation of (t) =c1e 1tv2(t) =c2e 2twherec1andc2are constants.
7 Now that we have the coordinates of v, wecan obtain the coordinates of xfrom the equation x=P :Solve the following system of differential Equations :x 1(t) =x1(t) + 2x2(t)x 2(t) = x1(t) + 4x2(t)In Matrix form this equation isd xdt=A xwhereA=(1 2 1 4). For thismatrix, we have already foundP=(2 11 1)so if we make the substitution x=P vinto the equationd xdt=A x, we will getd vdt=(2 00 3) vwhosesolution is v=(c1e2tc2e3t). The solution we seek is: x=P v=(2 11 1)(c1e2tc2e3t)=(2c1e2t+c2e3tc1e2t+c2e3t) Comparing coordinates, we get:x1(t) = 2c1e2t+c2e3tandx2(t) =c1e2t+c2e3tThere is also a useful vector format for the answer if we split up the vectorsolution as follows: x=(2c1e2t+c2e3tc1e2t+c2e3t)=(2c1e2tc1e2t )+(c2e3tc2e3t)=c1(21)e2t+c2(11)e3tNotice that the general solution is a linear combination of terms of the form uertwhereris an eigenvalue and uis the corresponding eigenvector.
8 Thisobservation can speed up the solution :An animal is receiving medication from an external drug recycling systemat an animal hospital. There are 3 liters of blood in this animal. Fluid isbeing delivered into the animal intravenously. The fluid, containing bothblood and the drug, is entering the animal at the rate of18liters/hour. Asaline solution, containing no drug at all, is entering the animal at the rateof14liters/hour. Blood is being drawn from the animal and sent back to theexternal system at the rate of38liters/hour. Fluid is also being drawn out ofthe external system and into a waste receptacle at the rate of14 external system has 2 liters of fluid altogether and this volume (t) be the number of milligrams of drug in the animal (t) be the number of milligrams of drug in the external system an initial condition ofx(0) = 0 andy(0) = 210 milligrams of the formulas forx(t) andy(t) by solving the appropriate system ofdifferential (RateIn) (RateOut)=18literhour y2mgliter 38literhour x3mgliterdydt=(RateIn) (RateOut)=38literhour x3mgliter 38literhour y2mgliterMore concisely:x = 18x+116yy =18x 316yOr, in Matrix form:(x y )=( 1/8 1/161/8 3/16)(xy)If x=(x y )andA=( 1/81/161/8 3/16).
9 We can now solved xdt=A x. Webegin with the eigenvalues by solving:0 = det(A I) = 1/8 1/161/8 3/16 = 2+516 +164 After factoring:0 =( +14)( +116)So, the eigenvalues are: = 14 = 116 The corresponding eigenvectors are: u1=(1 2) u2=(11)If we proceed just as we did in the last example, we end up with the generalsolution: x=c1(1 2)e t/4+c2(11)e t/16We have an initial condition x(0) =(0210)which implies thatc1= 70 andc2= 70 so(x(t)y(t))= 70(1 2)e t/4+ 70(11)e t/16 Equating coordinates:x(t) = 70( e t/4+e t/16)y(t) = 70(2e t/4+e t/16)Example:Solve the equationd xdt=A xwhereAand xare defined as:A= 0 1 00 0 1 2 1 2 x= x1(t)x2(t)x3(t) We begin with the eigenvalues ofAwhich we get by solving det(A I) = 0. 100 1 2 1 2 = 0 3+ 2 2+ 2 = 0 Fortunately, this factors nicely ( 1)( + 1)( 2) = 0 Therefore the eigenvalues are: = 1 = 1 = 2and, if you calculate the corresponding eigenvectors, you will get: u= 111 u= 1 11 u= 124 If the format from the previous example also applies to this three dimen-sional case, we would expect the general solution to be a linear combinationof all solutions of the form uertwhich would give us: x=c1 111 e1t+c2 1 11 e 1t+c3 124 e2tWill this really be true?
10 Again, the diagonalization method comes to therescue. We form the matrixPwith the eigenvectors making up the 1 1 11 1 21 1 4 Now, we can calculateP 1 APand verify that it is 1AP= 11/2 1/21/3 1/2 1/6 1/301/3 0 1 00 0 1 2 1 2 1 1 11 1 21 1 4 = 1 0 00 1 00 0 2 If we now define v=P 1 xas before, the equationd xdt=A xtransforms tothe equationd vdt= vwhere is a diagonal Matrix . v 1v 2v 3 = 1 0 00 1 00 0 2 v1v2v3 = v1 v22v3 Equate coordinates:dv1dt=v1dv2dt= v2dv3dt= 2v3v1=c1etv2=c2e tv3=c3e2t x=P v= 1 1 11 1 21 1 4 c1etc2e tc3e2t = c1et+c2e t+c3e2tc1et c2e t+ 2c3e2tc1et+c2e t+ 4c3e4t =c1 111 e1t+c2 1 11 e 1t+c3 124 e2tThis verifies the solution we had assumed at the Repeated Root CaseOur solution ofd xdt=A xdepended on being able to find a Matrix aninvertible matrixPso thatP 1 APis a diagonal Matrix .