Matrix Methods for Linear Systems of Differential Equations We now present an application of matrix methods to linear systems of differential equations. We shall follow the development given in Chapter 9 of Fundamentals of Differential Equations and Boundary Value Problems by Nagle, Saff, Snider, third edition. Calculus of Matrices If we allow the entries a ij t in an n n matrix At to be functions of the variable t, thenat is a matrix function of t. Similarly if the entries x i t of a vector xt are functions of t, thenxt is a vector function of t. A matrix At is said to be continuous at t if each a ij t is continuous at t. At is differentiable at t if each a ij t is differentiable at t and we write Also da dt t A t a ij t nn a b Atdt a b aij tdt nn We have the following differentiation formulas for matrices d CA C da dt dt, C a constant matrix d A B da dt dt db dt d AB A db dt dt B da dt In the last formula the order in which the matrices are written is important, since matrix multiplication need not be commutative. Linear Systems in Normal Form Asystemofn linear differential equations is in normal form if it is expressed as x t Atxt ft where xt and ft are n column vectors and At a ij t nn. A system is called homogeneous if ft ; otherwise it is called nonhomogeneous. When the
elements of A are constants, the system is said to have constant coefficients. We note that a linear nth order differential equation y n t p n ty n p ty gt can be rewritten as a first order system in normal form using the substitution x t yt, x t y t,..., x n t y n t.5 Then x t y t x t x t y t x 3 t x n t y n t x n t x n t y n t p n ty n p ty gt From.5 we can write this last equation as x n t p tx t p n tx n t gt Thus the differential equation can be put in the form with x xt x,ft x n gt and A p t p t p t p n t p n t The initial value problem for the normal system is the problem of finding a differential vector function xt that satisfies the system on an interval I and also satisfies the initial condition xt x, where t is a given point of I and x is a given constant vector.
Example: Convert the initial value problem y 3y y y y 3 into an initial value problem for a system in normal form. Solution: y 3y y. x t yt x t y t x x x 3x x Thus x t 3 x x We also have the initial condition x x x 3 x. Theorem (Existence and Uniqueness) Suppose At and ft are continuous on an open interval I that contains the point t. Then, for any choice of the initial vector x there exists a unique solution xt on the entire interval I to the initial value problem x t Atxt ft, xt x Remark: Just as in Ma we may introduce the Wronskian of n vectors functions and use it to test for linear independence. We have Definition: The Wronskian of the n vector functions x t colx,x,...,x n,...,x n t colx n,x n,...,x nn is defined to be the real-valued function 3
Wx,...,x n t x t x t x n t x t x t x n t x n t x n t x nn t One can show that the Wronskian of solutions x,...,x n to x Ax is either identically zero or never zero on and interval I. Also, a set of n solutions x,...,x n to x Ax on I is linearly independent if and only if their Wronskian is never zero on I. Thus the Wronskian provides us with an easy test for linear independence for solutions of x Ax. Theorem (Representation of Solutions - Homogeneous Case) Let x,x,...,x n be n linearly independent solutions to the homogeneous system x t Atxt 3 on the interval I, whereat is an n n matrix function continuous on I. Then every solution of 3 on I can be expressed in the form xt c x t c n x n t 4 where c,...,c n are constants. A set of solutions x,...,x n that are linearly independent on I is called a fundamental solution set for 3. The linear combination 4 is referred to as the general solution of 3. Exercise: e t e t e t Verify that e t e t,, e t e t is a fundamental solution set for the system x t xt 5, eigenvectors:,, 4
Consider x 3 t e t e t.then e t e t Ax 3 t e t e t x 3 t e t e t e t Remark: The matrix Xt e t e t e t e t solution of 5 can be written as is a fundamental matrix for the DE 5. The general e t e t e t xt Xtc c e t e t c e t c 3 e t Remark:IfwedefineanoperatorL by Lx x Ax then this operator is linear. Thatis,Lc x c x c Lx c Lx. Thus if x and x are homogeneous solutions of the homogeneous equation x Ax the c x c x is also a solution of this equation. Another consequence of this linearity is the superposition principle for linear systems. It states that if x p and x p are solutions respectively of the nonhomogeneous systems Lx g and Lx g,thenx p x p is a solution of Lx g g. This leads to Theorem 3 (Representation of Solutions - Nonhomogeneous Case) Let x p be a particular solution to the nonhomogeneous system x t Atxt ft 6 on the interval I, andletx,x,...,x n be a fundamental solution set on I for the corresponding homogeneous system x t Atxt. Then every solution to 6 on I can be expressed in the form xt x p t c x t c n x n t 7 where c,...,c n are constants. 5
Remark: The linear combination of x p,x,...,x n written in 7 with arbitrary constants c,...,c n is called the general solution of 6. We may express this solution as x x p Xc, wherex is a fundamental matrix for the homogeneous system and c is an arbitrary constant vector. Solving Normal Systems. To determine a general solution to the n n homogeneous system x Ax : a. Find a fundamental solution set x,...,x n that consists of n linearly independent solutions to the homogeneous equation. b. Form the linear combination x Xc c x c n x n where c colc,...,c n is any constant vector and X x,...,x n is the fundamental matrix, to obtain a general solution.. To determine a general solution of to the nonhomogeneous system x Ax f : a. Find a particular solution x p to the nonhomogeneous system. b. Form the sum of the particular solution and the general solution Xc c x c n x n to the corresponding homogeneous system in part, x x p Xc x p c x c n x n to obtain a general solution. Homogeneous Linear Systems with Constant Coefficients Consider now the system x t Axt 8 where A is a (real) constant n n matrix. Theorem 4 Suppose the n n constant matrix A has n linearly independent eigenvectors u,u,...,u n.letr i be the eigenvalue corresponding to the u i.then e r t u,e r t u,...,e r nt u n 9 is a fundamental solution set on, for the homogeneous system x Ax. Hence the general solution of x Ax is xt c e r t u c n e r nt u n where c,...,c n are arbitrary constants. 6
Remark: The eigenvalues may be real or complex and need not be distinct. Proof Since Au i r i u i we have d dt er it u i r i e r it u i e r it Au i Ae r it u i so each element of the set 9 is a solution of the system 8. Also the Wronskian of these solutions is Wt dete r t u,...,e r nt u n e r r r nt detu,...,u n since the eigenvectors are linearly independent. Example Find a general solution of x 5 4 x 5 4, eigenvectors:, 4 4 Thus xt c e t c e 4t 4 Thus the solution is x t c e t 4c e 4t x t c e t c e 4t SNB gives the following strange looking result: x 5x 4x x x, Exact solution is: x t 3 C e t 4 3 C e 4t 4 3 C e 4t 4 3 C e t x t 3 C e 4t 3 C e t 4 3 C e t 3 C e 4t This is correct and is equivalent to, ifweletc 3 C 4 3 C and c 3 C 3 C. However, it is a most cumbersome form of the solution. 7
Exercise: Nagle and Saff page 535 #3. Find a fundamental matrix for the system x t 3 7 xt Solution: 3, eigenvectors: 3,, 7, 7 8 3 Hence the four linearly independent solutions are e t 3,e t,e 7t 8 Therefore a fundamental matrix is,e 3t e t e t e 7t e 3t 3e t e 7t e 7t e 3t 8e 7t We know that if a matrix has n distinct eigenvalues, then the eigenvectors associated with these eigenvalues are linearly independent. Hence Corollary If the n n constant matrix A has n distinct eigenvalues r,...,r n and u i is an eigenvector associated with r i then e r t u,...,e r nt u n is a fundamental solution set for the homogeneous system x Ax. 8
Example Solve the initial value problem x t xt x 4 4 5 Solution: 4 4 5, eigenvectors:,, 3 4 4 c e t c e t c 3 e 3t Thus xt c e t c e t c 3 e 3t c e t c e t c 3 e 3t 4 4 c e t 4c e t 4c 3 e 3t We define xt via this. xt c e t c e t c 3 e 3t c e t c e t c 3 e 3t c e t 4c e t 4c 3 e 3t so that c c c 3 x c c c 3 c 4c 4c 3 Thus we form, row echelon form: 4 4 c,c,c 3. Then the solution is. Hence xt e t e 3t 4 4 Complex Eigenvalues 9
We now discuss how one solves the system x t Axt in the case where A is a real matrix and the eigenvalues are complex. We shall show how to obtain two real vector solutions of the system. Recall that if r i is a solution of the equation that determines the eigenvalues, namely, p deta ri then r i is also a solution of this equation, and hence is an eigenvalue. Recall that r is called the complex conjugate of r and r r. Let z a ib, wherea and b are real vectors, be an eigenvector corresponding to r. Then it is not hard to see that z a ib is an eigenvector corresponding to r.since A r Iz then taking the conjugate of this equation and noting that since A and I are real matrices then A A and I I A r Iz A r Iz A r Iz so z is an eigenvector corresponding to r. Therefore the vectors w t e it a ib and w t e it a ib are two linearly independent vector solutions of. However, they are not real. To get real solutions we proceed as follows: Since e it e t cost isint then w t e it a ib e t costa sin tb isinta costb Therefore w t x t ix t where x t e t costa sintb x t e t sin ta costb Since w t is a solution of, then w t Aw t so x t ix t Ax t iax t Equating real and imaginary parts of this last equation leads to the real equations x t Ax t x t Ax t
so that x t and x t are real vector solutions of corresponding to the eigenvalues i. Note that we can get the two expressions above for x t and x t by taking the real and imaginary parts of w t Example Find the general solution of the initial value problem x t 3 xt x Solution: We first find the eigenvalues and eigenvectors of the matrix. We want the roots of 3 r r 3 r r r 4r 5 Thus r 4 6 45 i The system of equations to determine the eigenvectors is 3 rx x x rx or 3 rx x x rx For r i we have ix x x ix Multiplication of the first equation by i i yields the second equation, since i i. Thus x ix Letting x gives the eigenvector conjugate of the first we have 3, eigenvectors: i i. Since the second eigenvector is the complex i, i i i i Thus,,a,b. The two linearly independent solutions are
wt e it i e t e it ie t e it e t cost isin t ie t cost isint e t cost ie t sint e t cost sin t ie t cost sin t e t cost sin t ie t sint cost Therefore x t e t costa sintb e t cost sint x t e t sin ta costb e t sint cost Thus xt c e t cost sint c e t sint cost x c e c e. Therefore so c e and c xt e t cost sin t Example Find a [real] general solution to x x 3 x x. Solution: We first find the eigenvalues and eigenvectors of the matrix. We want the solutions to 3 r det 3 r r r 4r 5 r Thus r 4 6 45 The system of equations to determine the eigenvectors is i
3 rx x x rx For r i we have ix x x ix or ix x x ix One can see that the first and second equations are the same by multiplying the first equation by i and recalling that i i. Thus x i x We have x i x i x i i i x Letting x we have the eigenvector i Since the eigenvectors are complex conjugates we have that the eigenvalues of the matrix i i are i and i and the corresponding eigenvectors are and. 3 3 The eigenvalues of the matrix i i and. Let r i, so,. Also are i and i and the corresponding eigenvectors are i i so a and b. x t e t costa sintb e t cost sint x t e t sin ta costb e t sin t cost 3
xt c e t cost sint c e t sint cost c e t cost sin t e t cost c e t sint cost e t sint Nonhomogeneous Linear Systems The techniques of Undetermined Coefficients and Variation of Parameters that are used to find particular solutions to the nonhomogeneous equation y pxy qxy gx have analogies to nonhomogeneous systems. Thus we now discuss how one solves the nonhomogeneous system x t Atxt ft Undetermined Coefficients Consider the nonhomogeneous constant coefficient system x t Axt ft Before presenting the method for systems we recall the following result for second nonhomogeneous order differential equations. For more on this see Linear Second Order DEs (Hold down the Shift key and click.) A particular solution of where a,b,c are constants is where ay by cy Ke x y p Kex p if p y p Kxex p if p, p y p K p x e x if p p Example pr ar br c y 5y 4y e x 4
Homogeneous solution: p 5 4 4 4, y h c e x c e 4x Now to find a particular solution for e x. p Since p 5 p 5 3 y p kxex p xe x 3 y y h y p c e x c e 4x 3 xex Example Problem 3, page 547 of text. Find the general solution of x t xt e t 4e t e t Solution: We first find the homogeneous solution., eigenvectors: 3,, 3 Since these eigenvectors are linearly independent, then x h t c e 3t We seek a particular solution of the form c e 3t x p t e t a a a 3 c 3 e 3t Then x p t e t a a a 3 Ax p t e t 4e t e t e t a a a 3 e t 4e t e t e t a a a 3 a a a 3 a a a 3 4 Thus 5
a a a a 3 a a a a 3 4 a 3 a a a 3, Solution is: a,a,a 3 Therefore x p t e t and xt x h t x p t c e 3t c e 3t c 3 e 3t e t Note: the Method of Undetermined Coefficients works only for constant coefficient systems. Example Problem, Page 547 of text. Find a general solution to x t t xt 4 4t Solution: We first find a general homogeneous solution. r r 4 r r 3 r 3r 4 r Thus the eigenvalues are r,3. The equations that determine the eigenvectors are rx x 4x rx For r 3 we have x x 4x 3x Thus x x and an eigenvector is. For r we have x x 4x x Thus x x and we have the eigenvector. Hence 6
x h t c e 3t c e t. To find x p we let x p t a t b a t b since ft is a polynomial. Plugging into the DE we have a a 4 a t b a t b t 4t b t b ta ta 4b 4t b 4ta ta Equating the coefficients of t on both sides we have a a or 4 4a a a a 4a a 4 Therefore a,a. Equating the constant terms on both sides we have a b b a 4b b Using the values for a, a we have b b 4b b Thus b,b. With these values for the constants we have that Finally x p t xt x h t x p t c e 3t t c e t t Example Problem 4, page 547 of text. Find a general solution to 7
x t Solution: We first find a homogeneous solution. xt 4cost sin t r r 4 4 4r r r r 4r rr 4 r Thus the eigenvalues are r,4. The equations for the eigenvectors are rx x x rx For r we have x x or x x. Thus we have the eigenvector. Forr 4 we have x x x x or x x Thus we have the eigenvector Hence x h t c e t. c e 4t We assume Hence Plugging into the DE yields x p t x p a cost b sint a cost b sint a sint b cost a sint b cost a sin t b cost a sin t b cost a cost b sint a cost b sint 4cost sin t or a sin t b cost a sin t b cost a cost a cost b sin t b sin t a cost a cost b sin t b sin t 4cost sin t We equate the coefficients of the sint and cost terms. Thus 8
b a a 4 b a a or To solve this system we form a b b a b b a a b 4 a a b a b b a b b 4 and row reduce. 4 R R 3 R R 4 5 4 4 4 5 R R 3 R R 4 9 8 8 9 R 3 9 8 8 9 R 3R 4 9 8 4 R 4 R 3 4 9 8 9R 3R 4 4 7 34 7 R 4 4 R 4R 3 4 R 3 R R 3 R 5 R 4 R R 4 R 9
Thus a,a,b,b and Finally a general solution is x p t sint cost sint xt x h t x p t c c e 4t sint cost sint 3 Example The eigenvalues of the matrix i i eigenvectors are and. Find a [real] general solution to x x 3 are i and i and the corresponding x x 5t. Solution: First we find a real general solution to x x 3 x x. Here, and Since then i i a ib. x t e t costa sintb x t e t sin ta costb x t e t cost sint x t e t sin t cost Hence x h t c x t c x t c e t cost sint e t cost c e t sint cost e t sint Or we may expand one of the complex solutions and take the real and imaginary parts.
e it i e t cost isin t i e t cost sint i sin t cost cost isint e t cost sint e t cost i e t sint cost e t sint x h c e t cost sin t e t cost c e t sint cost e t sin t e t cost sint e t cost e t sin t cost e t sint c c Next, we find a particular solution to the given non-homogeneous equation. Since the non-homogeneous term is a polynomial of degree one, the solution must be the same. Thus let x p t x x at b ct d We substitute into the system of DEs and find the coefficients. x x 3 x x 5t a c 3 at b ct d 5t a c 3a ct 3b d a ct b d 5t We equate like terms. 3a c 5 a c a 3b d c b d Thus (from the first pair of equations) a 5, c and then b andd 8. Combining homogeneous and particular solutions, we have a general solution.
x x c e t cost sint e t cost c e t sin t cost e t sin t 5t t 8 e t cost sin t e t cost e t sint cost e t sint c c 5t t 8 Example a) Find the eigenvalues and eigenvectors of A. Solution: We solve deta ri. deta ri r r r r r i r i So, the eigenvalues are a complex conjugate pair. We find the eigenvector for one and take the complex conjugate to get the other. For r i, we solve A riu i i u u Thus we have the equations iu u u iu The second row is redundant, so iu u oru i u. Hence any multiple of i is an eigenvector for r i. Then an eigenvector corresponding to r i is b) Find the [real] general solution to i. x x x x e t. Solution: The solution is the general solution x h to the homogeneous equation plus one [particular] solution x p to the full non-homogeneous equation. First we ll find x p. It is in the form x p c e t c e t
Substituting into the D.E., we obtain x x c e t c e t c e t c e t e t Hence c e t c e t c e t c e t c e t c e t e t c e t c e t c e t c e t e t We can divide by e t (which is never zero) and move the unknowns to the left side to obtain c c x p e t To find a solution to the homogeneous solution we use the eigenvalue i i and the corresponding eigenvector i a ib. i Since x t e t costa sintb x t e t sin ta costb then x t e t cost sint x t e t sint cost Hence x h t c x t c x t c e t cost e t sin t c e t sin t e t cost Or, for the solution to the homogeneous equation, we may use one of the eigenvalues and eigenvectors found in a to write a complex solution and break it into real and imaginary parts. we ll use i. 3
x e it i e t cost isint i e t cost ie t sin t e t sint ie t cost x h c e t cost e t sin t c e t sin t e t cost e t cost e t sint e t sint e t cost c c Finally, we add to obtain the desired solution. x e t cost e t sin t e t sin t e t cost c c e t Variation of Parameters (This material is not covered in Ma 7.) Consider now the nonhomogeneous system x t Atxt ft where the entries in At may be any continuous functions of t. LetXt be a fundamental matrix for the homogeneous system x t Atxt The general solution of is Xtc where c is an n constant vector. To find a particular solution of, consider x p t Xtvt where vt is an n vector function of t that we wish to determine. Then x p t Xtv t X tvt so that yields Xtv t X tvt Atx p t ft AtXtvt ft Since Xt is a fundamental matrix for, thenx t AXt, so the last equation becomes Xtv t AtXtvt AtXtvt ft or Xtv t ft Since the columns of Xt are linearly independent, X t exists and v t X tft 4
Hence vt X tftdt and Finally the general solution is given by x p t Xtvt XtX tftdt xt x h t x p t Xtc XtX tftdt 3 Example Page 578 Solve the initial value problem x t 3 xt e t, x Solution: We first find a fundamental matrix for the homogeneous solution. 3, eigenvectors:, 3 Xt 3e t e t e t e t Hence 3e t e t e t e t Formula 3 yields e t e t 3 e t e t X xt 3e t e t c e t e t c 3e t e t e t e t e t e t 3 e t e t e t dt 3e t e t c e t e t c 3e t e t e t e t et e t 6 e3t 3 e t 3e t e t c e t e t c 3e t et e t e t 6 e3t 3 e t e t et e t e t 6 e3t 3 e t 5
xt x Thus 3e t e t c e t e t c 3c c 3 3 c c 7 3, Solution is: c 5 6,c 3 xt 6 et 6 et 3e t e t 3 e t e t 5 6 7e t 5e 3t 8 8e t 9e t 5e 3t e t 3e t et e t e t 6 e3t 3 e t e t et e t e t 6 e3t 3 e t 3c c 3 3 c c 7 3. Finally 3e t et e t e t 6 e3t 3 e t e t et e t e t 6 e3t 3 e t The Matrix Exponential Function (Not covered in F) Recall that the general solution of the scalar equation x t axt where a is a constant is xt ce at. We will now see that the general solution of the normal system x t Axt where A is a constant n n matrix is xt e At c. We must, of course, define e At. Definition: Let A be a constant n n matrix. The we define e At I At A t! An tn n! n A n tn n! This is an n n matrix. Remark: If D is a diagonal matrix, then the computation of e Dt is straightforward. Example Let D.Then 6
D 4, D 3 8,... D n n n Therefore e Dt n D n n! tn n n t n n! n n t n n! e t e t In general if D is an n n diagonal matrix with r,r,...,r n down its main diagonal, then e Dt is the diagonal matrix with e r t,e r t,...,e r nt down its main diagonal. It can be shown that the series converges for all t and has many of the same properties as the scalar exponential e at. Remark: It can be shown that if a matrix A has n linearly independent eigenvectors, then P AP is a diagonal matrix, where P is formed from the n linearly independent eigenvectors of A. Thus P AP D 3 where D is a diagonal matrix. In fact, D has the eigenvalues of A along its diagonal. Let A Thus P 4 4 5 4 4.Then, inverse: 4 3, P, 4 Hence P AP 4 4 5 4 4 3 Now 3 implies that when A has n linearly independent eigenvalues we have A PDP so that 7
e At e PDP t I PDP t PDP t PDP t I PDP t PDP PDP t I PDP t PD P t P I Dt Dt P Pe Dt P Example: Let A 5 4,, eigenvectors: 3, P,P and D 3. Show that A P DP and use this to compute e At. A PDP 3 5 4 as required. Thus e 5 4 t e t e 3t e 3t e t e 3t e t e t e 3t from SNB. Also Pe Dt P e 3 t so e At Pe Dt P e t e 3t e t e 3t e t e 3t e t e 3t e t e 3t This e At is a fundamental matrix for the system x t 5 4 xt sinceifwelet 8
x h t e 5 4 t c c e t e 3t e t e 3t c e t e 3t e t e 3t c c e 3t e t c e t e 3t c e t e 3t c e 3t e t c e 3t e t c e t e 3t c e t e 3t c e 3t e t then x h t c 6e 3t e t c e t 6e 3t c e t 3e 3t c 3e 3t e t and Ax h t 5 4 c e 3t e t c e t e 3t c e t e 3t c e 3t e t 4c e t e 3t 5c e t e 3t 4c e 3t e t 5c e 3t e t c e t e 3t c e t e 3t c e 3t e t c e 3t e t 6c e 3t c e t c e t 6c e 3t c e t c e t 3c e 3t 3c e 3t c 6e 3t e t c e t 6e 3t c e t 3e 3t c 3e 3t e t x h t : Theorem 5 (Properties of the Matrix Exponential Function) Let A and B be n n constant matrices and r,s and t be real (or complex) numbers. Then. a. e A e I b. e Ats e At e As c. e At e At d. e ABt e At e Bt provided that AB BA e. e rit e rt I f. d dt e At Ae At Remark: c. tells us that the matrix e At has an inverse. Proof of f. 9
d dt e At d dt I At A t! A A t A 3 t! An tn n! An tn n! Ae At A I At A t! An tn n! Theorem 6 (e At is a Fundamental Matrix) If A is an n n constant matrix, then the columns of the matrix e At form a fundamental solution set for the system x t Axt. Therefore, e At is a fundamental matrix for the system, and a general solution is xt e At c. Lemma (Relationship Between Fundamental Matrices) Let Xt and Yt be two fundamental matrices for the same system x Ax. Then there exists a constant column matrix C such that Yt XtC. Remark: Let Yt e At XtC and set t. Then I XC C X and e At XtX If the nxn matrix A has n linearly independent eigenvectors u i,thene r t u, e r t u,,e r nt is a fundamental matrix for x Ax and e At e rt u, e rt u,,e rnt u,u,,u n Calculating e At for Nilpotent Matrices Definition: An nxn matrix A matrix is nilpotent if for some positive integer k A k. Since e At I At A t! An tn n! n A n tn n! we see that if A is nilpotent, then the infinite series has only a finite number of terms since A k A k and in this case e At I At A t! Ak tk k! This may be taken further. The Cayley-Hamilton Theorem says that a matrix satisfies its own characteristic equation, that is, pa. Therefore, if the characteristic polynomial for A has the form pr n r r n,thatisahas only one multiple eigenvalue r,then pa n A r I n. Hence A r I is nilpotent and e At e r IA r It e rit e A rit e r t I A r It A r In tn n! Example Find the fundamental matrix e At for the system 3
x t Axt where A Solution: The characteristic polynomial for A is pr det r r r r 3 3r 3r r 3 Hence r isaneigenvalueofa with multiplicity 3. By the Cayley-Hamilton Theorem A I 3 and e At e t e A It e t I A It A I t! A I and A I Thus e At e t te t e t te t te t te t te t e t te t te t te t te t e t e t 3