Math 2280-001 Wed Apr 8 5.6-5.7 Matrix exponentials, linear systems, and variation of parameters for inhomogeneous systems. Recall: For the first order system x# t = A x , F t is a fundamental matrix (FM) if its n columns are a basis for the solution space to the first order system above (i.e. F t is the Wronskian matrix for a basis to the solution space). , F t is an FM if and only if F# t = A F and F 0 is invertible. , et A is the unique matrix solution to X# t = A X X 0 =I and may be computed either of two ways: et A = F t F 0 K1 where F t is any other FM, or via the infinite series t2 2 t3 3 tk k et A = I C tA C A C A C... C A C ... 2! 3! k! Example 1: We showed that if l 1 0 0 ... 0 L= 0 l 2 0 ... 0 : : : 0 0 ln ... then 1 C t l1 C tL e = t2 2 l C... 2! 1 0 0 ... 0 0 1 C t l2 C t2 2 l C... 0 ... 2! 2 0 : : 0 0 tl e = 0 1 0 tl e 2 : ... ... 0 ... 0 : : : : 0 0 0 e tl n 1 C t ln C t2 2 l C... 2! n Example 2) If A is diagonalizable we showed that we got the same answer for et A using A = SLSK1 and the Taylor series method, as we did we did using the F t F 0 K1 method. In fact, F t = S etL and F 0 K1 = SK1 , so this makes sense. , Finish the second to last page of Monday's notes, and then discuss the general (non-chain) way that one can compute eA t when A is not diagonalizable, below. It depends on the fundamental fact about how the generalized eigenspaces of a matrix fit together....which we discussed briefly before in the March 27 notes. (This is also discussed in the text.) ....................................................................... "Recall", For An # n let the characteristic polynomial p l = det A K l I factor as k k k p l = K1 n l K l 1 l K l 2 ... l K l m Any eigenspace of A for which dim El ! kj is called defective. If A has any defective eigenspaces then 1 2 m j it is not diagonalizable. However, the larger generalized eigenspaces Gl defined by j k A K ljI El 4 Gl d nullspace j j j do always have dimension kj . If bases for each Gl are amalgamated they will form a basis for =n or Cn . j ...................................................................... For each basis vector v of Gl one can construct a basis solution x t to x#= A x as follows: j l It j AK l I t x t = eA t v = e j e v 2 lt t 2 = e j I I C t A K ljI C A K l j I C... v 2! lt t2 2 = e j v C t A K ljI v C A K l j I v C... 2! lt j =e t2 v C t A K ljI v C 2! lt j x t =e k K1 A K ljI t2 v C t A K ljI v C 2! 2 tj kj K 1 ! vC A K ljI k K1 j v C 0 C 0 C... k K1 A K ljI 2 vC tj kj K 1 ! k Notes: The final sum is a finite sum because v 2 nullspace you've just reconstructed A K ljI j A K ljI k K1 j v . ! If v was an eigenvector, lt x t =e j v Use the n independent solutions found this way to construct a F t , and compute eA t = F t F 0 K1 . Exercise 1 Find eA t for the matrix in the system 5.5.2 (an old homework problem, where you were supposed to find a basis for the solution space using chains): x1 # x1 3 K1 = x2 # 1 1 x2 tech check: > with LinearAlgebra : 3 K1 Ad ; 1 1 factor Determinant A K l$IdentityMatrix 2 A := ; 3 K1 1 lK2 1 2 (1) So the only eigenvalue is l = 2. > B d A K 2$ IdentityMatrix 2 ; NullSpace B ; B := 1 K1 1 K1 1 (2) 1 but El = 2 is only one-dimensional. However, the generalized eigenspace Gl = 2 = nullspace A K 2 I will be two dimensional: 2 > NullSpace B2 ; 0 1 , 1 (3) 0 Use this generalized nullspace basis to construct a basis of solutions to x#= A x and use the resulting F t to construct the matrix exponential... 1 > x1 d t/e2$ t$ IdentityMatrix 2 C t$B . 0 : x1 t ; x2 d t/e2$ t$ IdentityMatrix 2 C t$B C t2 2 $B . 2 0 : 1 x2 t ; F d t/ x1 t x2 t : F t ; F t .F 0 K1; MatrixExponential t$A ; #these last two should be the same!! In fact, the last three in this case e2 t 1 C t t e2 t Kt e2 t 1 K t e2 t > > e2 t 1 C t Kt e2 t t e2 t 1 K t e2 t e2 t 1 C t Kt e2 t t e2 t 1 K t e2 t e2 t 1 C t Kt e2 t t e2 t Ke2 t K1 C t (4) Variation of parameters: This is what fundamental matrices and matrix exponentials are especially good for....they let you solve non-homogeneous systems without guessing. Consider the non-homogeneous first order system x# t = P t x C f t * Let F t be an FM for the homogeneous system x# t = P t x. Since F t is invertible for all t we may do a change of functions for the non-homogeneous system: x t =F t u t plug into the non-homogeneous system (*): F# t u t C F t u # t = P t F t u t C f t . Since F#= P F the first terms on each side cancel each other and we are left with F t u# t = f t K1 u #= F f which we can integrate to find a u t , hence an x t = F t u t . Remark: This is where the (mysterious at the time) formula for variation of parameters in nth order linear DE's came from.... "Recall" (February 23 notes): .................................................................................................. Variation of Parameters: The advantage of this method is that is always provides a particular solution, even for non-homogeneous problems in which the right-hand side doesn't fit into a nice finite dimensional subspace preserved by L, and even if the linear operator L is not constant-coefficient. The formula for the particular solutions can be somewhat messy to work with, however, once you start computing. Here's the formula: Let y1 x , y2 x ,...yn x be a basis of solutions to the homogeneous DE L y d y n C pn K 1 x y n K 1 C...C p1 x y#C p0 x y = 0 . Then yp x = u1 x y1 x C u2 x y2 x C ... C un x yn x is a particular solution to L y =f provided the coefficient functions (aka "varying parameters") u1 x , u2 x ,...un x have derivatives satisfying the Wronskian matrix equation y1 y2 ... yn u # 1 y1 # y2 # ... ... ... ... y1n K 1 y2n K 1 yn # u # ... : ... ynn K 1 2 u # n 0 = 0 : f .................................................................................................. But if we convert the nth order DE into a first order system for x1 = y, x2 = y# etc. we have x1 =y x1 #= x2 = y# x2 #= x3 = y## xn K 1 #= xn xn #= =y n =y nK1 =Kp0 x y1 Kp1 x y2 K...Kpn K 1 x yn K 1 C f . And each basis solution y t for L y = 0 gives a solution y, y#, y##, ...y system x1 # x1 0 1 0 ... 0 x2 # x2 0 0 1 ... 0 x3 # : xn # = T nK1 0 0 0 0 0 1 ... 0 x3 C 0 : : : : : : : ... Kpn K 1 xn f Kp0 Kp1 Kp2 to the homogeneous . So the original Wronskian matrix for the nth order linear homogeneous DE is a FM for the system above, so the formula we learned in Chapter 3 is a special case of the easier to understand one for first order systems that we just derived, namely F t u# t = f t K1 u #= F f Returning to first order systems, if we want to solve an IVP for a first order system rather than find the complete general solution, then the following two ways are appropriate: 1) If you want to solve the IVP x# t = P t x C f t x 0 = x0 K1 The the solution will be of the form x = F u (where u #= F f as above). Thus x0 = F 0 u0 so K1 u0 = F 0 x0 . Thus t u t = u0 C t u t = u0 C u # s ds 0 K1 F s f s ds. 0 Then x t =F t u t t x t =F t u0 C K1 F s f s ds . 0 2) If you want to solve the special case IVP x# t = A x C f t x 0 = x0 where A is a constant matrix, you may derive a special case of the solution above just as we did in Chapter 1. This is sort of amazing! x# t = A x C f t x# t KA x = f t Kt A e x# t KA x = eKt Af t d eKt Ax t = eKt Af t . dt Integrate from 0 to t: eKt Ax t K x0 = tA Move the x0 over and multiply both sides by e tA x t =e t eKs Af s ds 0 : t x0 C 0 eKs Af s ds . Exercise 2 Consider the non-homogeneous problem related to the homogeneous system in Exercise 1: x1 # x2 # = 3 K1 x1 1 x2 1 x1 0 0 = x2 0 1 C t 0 . Solve this system using the formula tA x t =e t x0 C eKs Af s ds 0 (One could also try undetermined coefficients, but variation of parameters requires no "guessing.") Tech check: (The commands are sort of strange, but might help in your homework.) > with LinearAlgebra : 3 K1 : 1 1 MatrixExponential t$A ; t f d t/ : 0 > Ad x0 d 0 : 0 e2 t 1 C t Kt e2 t t e2 t Ke2 t K1 C t > integrand d s/simplify MatrixExponential Ks$A .f s > integrand t ; #checking (5) : #integrand in formula above (6) KeK2 t K1 C t t Kt2 eK2 t (6) > integrated d unapply map int, integrand s , s = 0 .. t , t : #"map" applies a function to each entry of an array... # "unapply" makes a function out of output > integrated t ; #checking 1 2 K2 t t e 2 (7) 1 1 K2 t 1 1 2 K2 t K 2 t K C e C te C t e 4 4 2 2 > x d unapply simplify MatrixExponential t$A . x0 C integrated t , t : x t ; #checking answer 1 t e2 t K 1 4 1 1 1 1 K e2 t C C tC t e2 t 4 4 4 4 > with DEtools : dsolve x1# t = 3$x1 t Kx2 t C t, x2# t = x1 t C x2 t , x1 0 = 0, x2 0 = 0 ; 1 1 1 1 1 1 x1 t = t e2 t K t, x2 t = K e2 t C C tC t e2 t 4 4 4 4 4 4 > > (8) (9)