NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS LANCE D. DRAGER 1. Introduction A common problem that comes up in many different fields of mathematics and engineering is solving a system of linear constant coefficient differential equations. Such a system looks like π₯′1 (π‘) = π11 π₯1 (π‘) + π12 π₯2 (π‘) + · · · + π1π π₯π (π‘) π₯′2 (π‘) = π21 π₯1 (π‘) + π22 π₯2 (π‘) + · · · + π2π π₯π (π‘) (1.1) .. . π₯′π (π‘) = ππ1 π₯1 (π‘) + ππ2 π₯2 (π‘) + · · · + πππ π₯π (π‘), where the πππ ’s are constants. This is a system of π differential equations for the π unknown functions π₯1 (π‘), . . . , π₯π (π‘). It’s important to note that the equations are coupled, meaning the the expression for the derivative π₯′π (π‘) contains not only π₯π (π‘), but (possibly) all the rest of the unknown functions. It’s unclear how to proceed using methods we’ve learned for scalar differential equation. Of course, to find a specific solution of (1.1), we need to specify initial conditions for the unknown functions at some value π‘0 of π‘, π₯1 (π‘0 ) = π1 π₯2 (π‘0 ) = π2 (1.2) .. . π₯π (π‘0 ) = ππ , where π1 , π2 , . . . , ππ are constants. It’s pretty clear that linear algebra is going to help here. We can put our unknown functions into a vector-valued function β‘ β€ π₯1 (π‘) β’ π₯2 (π‘) β₯ β’ β₯ π₯(π‘) = β’ . β₯ , β£ .. β¦ π₯π (π‘) Version Time-stamp: ”2011-07-08 17:05:03 drager”. 1 2 LANCE D. DRAGER and our constant coefficients into a matrix an π × π matrix π΄ = [πππ ]. Recall that to differentiate a vector-valued functions, we differentiate each component, so β‘ ′ β€ π₯1 (π‘) β’ π₯′2 (π‘) β₯ β’ β₯ π₯′ (π‘) = β’ . β₯ , β£ .. β¦ π₯′π (π‘) so we can rewrite (1.1) more compactly in vector-matrix form as (1.3) π₯′ (π‘) = π΄π₯(π‘). If we put our initial values into a vector β‘ β€ π1 β’ π2 β₯ β’ β₯ π = β’ . β₯, β£ .. β¦ ππ we can rewrite the initial conditions (1.2) as (1.4) π₯(π‘0 ) = π. Thus, the matrix form of our problem is (1.5) π₯′ (π‘) = π΄π₯(π‘), π₯(π‘0 ) = π. A problem of this form is called an initial value problem (IVP). For information on the matrix manipulations used in these notes, see the Appendix. Eigenvalues and eigenvectors are going to be important to our solution methods. Of course, even real matrices can have complex, nonreal eigenvalues. To take care of this problem, we’ll work with complex matrices and complex solutions to the differential equation from the start. In many (but not all) applications, one is only interested in real solutions, so we’ll indicate as we go along what happens when our matrix π΄ and our initial conditions π are real. The equation π₯′ (π‘) = π΄π₯(π‘) is a homogeneous equation. An inhomogeneous equation would be one of the form π₯′ (π‘) = π΄π₯(π‘) + π (π‘), where π (π‘) is a given vector-value function. We’ll discuss homogeneous systems to begin with, and show how to solve inhomogeneous systems at the end of these notes. 1.1. Notation. The symbol R will denote the real numbers and C will denote the complex numbers. We will denote by Matπ×π (C) the space of π × π matrices with entries in C and Matπ×π (R) will denote the space of π × π matrices with entries in R. We use Rπ as a synonym Matπ×1 (R), the space of column vectors with π entries. Similarly, Cπ is a synonym for Matπ×1 (C). NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 3 2. The Matrix Exponential In this section, we’ll first consider the existence and uniqueness question for our system of equations. We’ll then consider the fundamental matrix for our system and show how this solves the problem. In the last subsection, we’ll view this fundamental matrix as a matrix exponential function. 2.1. Initial Value Problem and Existence and Uniqueness. The main problem we’re interested in is the initial value problem (2.1) π₯′ (π‘) = π΄π₯(π‘), π₯(π‘0 ) = π, were π΄ ∈ Matπ×π (C), π ∈ Cπ and we’re solving for a function π₯(π‘) with values in Cπ , defined on some interval in R containing π‘0 . We state the following existence and uniqueness theorem without proof. Theorem 2.1 (Existance and Uniqueness Theorem). Let π΄ be an π × π complex matrix, let π ∈ Cπ and let π‘0 ∈ R. (1) There is a differentiable function π₯ : R → Cπ : π‘ β¦→ π₯(π‘) such that π₯′ (π‘) = π΄π₯(π‘), for all π‘ ∈ R, π₯(π‘0 ) = π. (2) If π½ ⊆ R is an open interval in R that contains π‘0 and π¦ : π½ → Cπ is a differentiable function such that π¦ ′ (π‘) = π΄π¦(π‘), for all π‘ ∈ π½, π¦(π‘0 ) = π, then π¦(π‘) = π₯(π‘) for all π‘ ∈ π½. In view of this Theorem, we may as well consider solutions defined on all of R. For brevity, we’ll summarize by saying that solutions of the initial value problem are unique. It will turn out to be useful for consider initial value problems for matrix valued functions. To distinguish the cases, we’ll usually write π(π‘) for our unknown function with values in Matπ×π (C). Theorem 2.2. Suppose that π΄ ∈ Matπ×π (C) and that π‘0 ∈ R. Let πΆ be a fixed π × π complex matrix. Then there is a function π : R → Matπ×π (C) : π‘ β¦→ π(π‘) such that (2.2) π ′ (π‘) = π΄π(π‘), π‘∈R π(π‘0 ) = πΆ. This solution is unique in the sense of Theorem 2.1 Proof. If we write π(π‘) in terms of its columns as π(π‘) = [π₯1 (π‘) | π₯2 (π‘) | · · · | π₯π (π‘)], so each π₯π (π‘) is a vector-valued function, then π ′ (π‘) = [π₯′1 (π‘) | π₯′2 (π‘) | · · · | π₯′π (π‘)], π΄π(π‘) = [π΄π₯1 (π‘) | π΄π₯2 (π‘) | · · · | π΄π₯π (π‘)] 4 LANCE D. DRAGER Thus, the matrix differential equation π ′ (π‘) = π΄π(π‘) is equivalent to π vector differential equations π₯′1 (π‘) = π΄π₯1 (π‘) π₯′2 (π‘) = π΄π₯2 (π‘) .. . π₯′π (π‘) = π΄π₯π (π‘). If we write the initial matrix πΆ in terms of its columns as πΆ = [π1 | π2 | · · · | ππ ], then the initial condition π(π‘0 ) = πΆ is equivalent to the vector equations π₯1 (π‘0 ) = π1 π₯2 (π‘0 ) = π2 .. . π₯π (π‘0 ) = ππ Since each of the initial value problems π₯′π (π‘) = π΄π₯π (π‘), π₯π (π‘0 ) = ππ , π = 1, 2, . . . , π has a unique solution, we conclude that the matrix initial value problem (2.2) has a unique solution. 2.2. The Fundamental Matrix and It’s Properties. It turns out we only need to solve one matrix initial value problem in order to solve them all. Definition 2.3. Let π΄ be a complex π × π matrix. The unique π × π-matrix value function π(π‘) that solves the matrix initial valued problem π ′ (π‘) = π΄π(π‘), (2.3) π(0) = πΌ will be denoted by Φπ΄ (π‘), in order indicate the dependence on π΄. In other words, Φπ΄ (π‘) is the unique function so that Φ′π΄ (π‘) = π΄Φπ΄ (π‘), (2.4) Φπ΄ (0) = πΌ. The function Φπ΄ (π‘) is called the Fundamental Matrix of (2.3). We’ll have a much more intuitive notation for Φπ΄ (π‘) in a bit, but we need to do some work first. First, let’s show that Φπ΄ (π‘) solves the initial value problems we’ve discussed so far. Theorem 2.4. Let π΄ be an π × π complex matrix. (1) Let π ∈ Cπ . The solution of the initial value problem π₯′ (π‘) = π΄π₯(π‘), (2.5) π₯(π‘0 ) = π, is (2.6) π₯(π‘) = Φπ΄ (π‘ − π‘0 )π. NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 5 (2) Let πΆ ∈ Matπ×π (C). The solution π(π‘) of the matrix initial value problem π ′ (π‘) = π΄π(π‘), (2.7) π(π‘0 ) = πΆ. is (2.8) π(π‘) = Φπ΄ (π‘ − π‘0 )πΆ. Proof. Consider the matrix-valued function Ψ(π‘) = Φπ΄ (π‘ − π‘0 ). We then have π Φπ΄ (π‘ − π‘0 ) ππ‘ π = Φ′π΄ (π‘ − π‘0 ) (π‘ − π‘0 ) ππ‘ = π΄Φ(π‘ − π‘0 ) Ψ′ (π‘) = = π΄Ψ(π‘). We also have Ψ(π‘0 ) = Φπ΄ (π‘0 − π‘0 ) = Φπ΄ (0) = πΌ. For the first part of the proof, suppose π is a constant vector, and let π¦(π‘) = Ψ(π‘)π. Then π¦ ′ (π‘) = Ψ′ (π‘)π = π΄Ψ(π‘)π = π΄π¦(π‘), and π¦(π‘0 ) = Ψ(π‘0 )π = πΌπ = π. Thus, π¦(π‘) is the unique solution of the initial value problem (2.5). The proof of the second part is very similar. Exercise 2.5. Show that Φ0 (π‘) = πΌ, for all π‘, where 0 is the π × π zero matrix. In the rest of this subsection, we’re going to derive some properties of Φπ΄ (π‘). The pattern of proof is the same in each case; we show two functions satisfy the same initial value problem, so they must be the same. Here’s a simple example to start. Theorem 2.6. Let π΄ be an π × π real matrix. Then Φπ΄ (π‘) is real. The solutions of the initial value problems (2.5) and (2.7) are real if the initial data, π or πΆ, is real. Recall that the conjugate of a complex number π§ is denoted by π§¯. Of course, π§ is real if and only if π§ = π§¯. If π₯(π‘) is a complex valued function, we define π₯ ¯(π‘) by π₯ ¯(π‘) = π₯(π‘). Note that π π₯ ¯′ (π‘) = π₯(π‘) = π₯′ (π‘). ππ‘ Proof of Theorem. Let π΄ be a complex matrix. The fundamental solution Φπ΄ (π‘) solves the IVP (2.9) π ′ (π‘) = π΄π(π‘), π(0) = πΌ 6 LANCE D. DRAGER Suppose π(π‘) is the solution of this IVP. Taking conjugates, we get ¯ ′ (π‘) = π΄¯π(π‘), ¯ ¯ (2.10) π π(0) = πΌ. ¯ In other words, (2.10) shows that π(π‘) is the solution of the IVP ′ ¯ (2.11) π (π‘) = π΄π (π‘), π (0) = πΌ, ¯ so we must have π (π‘) = π(π‘). But (2.11) is the IVP that defines Φπ΄¯ (π‘). In other words, for a complex matrix π΄, we have Φπ΄¯ (π‘) = Φπ΄ (π‘). Suppose now that π΄ is real. Then π΄¯ = π΄. The last equation becomes Φπ΄ (π‘) = Φπ΄ (π‘). Since Φπ΄ (π‘) is equal to its conjugate, it must be real. Of course, if Φπ΄ (π‘) is real, and π is a real vector, the solution π₯(π‘) = Φπ΄ (π‘ − π‘0 )π of (2.5) is real. A similar argument takes care of (2.7). Next, we have a basic property that is frequently used. Theorem 2.7. Let π΄ be an π × π complex matrix. For any π‘, π ∈ R, (2.12) Φπ΄ (π‘ + π ) = Φπ΄ (π‘)Φπ΄ (π ). Proof. Let π be fixed but arbitrary, and think both sides of (2.12) as functions of π‘. Consider the matrix initial value problem (2.13) π ′ (π‘) = π΄π(π‘), π(0) = Φπ΄ (π ). According to the Theorem 2.4, the solution of this initial value problem is π(π‘) = Φπ΄ (π‘)Φπ΄ (π ). On the other hand, consider the function Ψ(π‘) = Φπ΄ (π‘ + π ). We have π Φπ΄ (π‘ + π ) Ψ′ (π‘) = ππ‘ π = Φ′π΄ (π‘ + π ) (π‘ + π ) ππ‘ = π΄Φπ΄ (π‘ + π ) = π΄Ψ(π‘) and Ψ(0) = Φπ΄ (0 + π ) = Φπ΄ (π ). Thus, Ψ(π‘) is also a solution to the initial value problem (2.13). Our two solutions must be the same, which proves the theorem. Since π‘ + π = π + π‘, we readily obtain the following corollary. Corollary 2.8. For any real numbers π‘ and π , Φπ΄ (π‘)Φπ΄ (π ) = Φπ΄ (π )Φπ΄ (π‘), i.e., the matrices Φπ΄ (π‘) and Φπ΄ (π ) commute. Almost as easily, we obtain a second corollary. Corollary 2.9. For any π‘ ∈ R, the matrix Φπ΄ (π‘) is invertible and the inverse is Φπ΄ (−π‘). Proof. Φπ΄ (π‘)Φπ΄ (−π‘) = Φπ΄ (−π‘)Φπ΄ (π‘) = Φπ΄ (π‘ + (−π‘)) = Φπ΄ (0) = πΌ. NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 7 The next theorem has a similar proof. We’ll use this later. Theorem 2.10. Let π΄ be an π × π complex matrix and let π be a real number. Then Φπ π΄ (π‘) = Φπ΄ (π π‘), π‘ ∈ R. Proof. Let Ψ(π‘) = Φπ΄ (π π‘). Then π Φπ΄ (π π‘) ππ‘ π = Φ′π΄ (π π‘) (π π‘) ππ‘ = π Φ′π΄ (π π‘) Ψ′ (π‘) = = π π΄Φπ΄ (π π‘) = (π π΄)Ψ(π‘), and Ψ(0) = πΌ. Thus, Ψ(π‘) satisfies the same initial value problem that characterizes Φπ π΄ (π‘), so the two functions must be equal. The next theorem describes how the effect of similarity transformations. This well be the key to computing Φπ΄ (π‘) when π΄ is diagonalizable. Theorem 2.11. Let π΄ be and π × π complex matrix, and let π be an invertible π × π complex matrix. Then Φπ −1 π΄π (π‘) = π −1 Φπ΄ (π‘)π. Proof. Let Ψ(π‘) = π −1 Φπ΄ (π‘)π . Then we have Ψ′ (π‘) = π −1 Φ′π΄ (π‘)π = π −1 π΄Φπ΄ (π‘)π = π −1 π΄π π −1 Φπ΄ (π‘)π = (π −1 π΄π )Ψ(π‘). We also have Ψ(0) = π −1 Φπ΄ (0)π = π −1 πΌπ = πΌ. Thus, π(π‘) is a solution of the same initial value problem that characterizes Φπ −1 π΄π (π‘), so the two functions are equal. The following proposition is preparation for the next theorem. As we’ll see, what commutes with what is important in this subject. Proposition 2.12. Let π΄ be an π × π complex matrix. Let π΅ be an π × π complex matrix that commutes with π΄, i.e., π΄π΅ = π΅π΄. Then π΅ commutes with Φπ΄ (π‘), i.e., π΅Φπ΄ (π‘) = Φπ΄ (π‘)π΅, π‘ ∈ R. In particular, since π΄ commutes with itself, we have π΄Φπ΄ (π‘) = Φπ΄ (π‘)π΄, π‘ ∈ R. Proof. Consider the matrix initial value problem (2.14) π ′ (π‘) = π΄π(π‘), π(0) = π΅. According to Theorem 2.4, the solution to this initial value problem is π(π‘) = Φπ΄ (π‘)π΅. 8 LANCE D. DRAGER Let Ψ(π‘) = π΅Φπ΄ (π‘). Then we have Ψ′ (π‘) = π΅Φ′π΄ (π‘) = π΅π΄Φπ΄ (π‘) = π΄π΅Φπ΄ (π‘) since π΄π΅ = π΅π΄ = π΄Ψ(π‘). We also have Ψ(0) = π΅Φπ΄ (0) = π΅πΌ = π΅. Thus, Ψ(π‘) solves the initial value problem (2.14), so our two solutions must be equal. Theorem 2.13. If π΄ and π΅ are π × π square matrices that commute, i.e., π΄π΅ = π΅π΄, then Φπ΄+π΅ (π‘) = Φπ΄ (π‘)Φπ΅ (π‘). Of course, since π΄ + π΅ = π΅ + π΄, we would have to have Φπ΄+π΅ (π‘) = Φπ΅ (π‘)Φπ΄ (π‘), so the matrices Φπ΄ (π‘) and Φπ΅ (π‘) commute. Proof. You know the drill by now. Let Ψ(π‘) = Φπ΄ (π‘)Φπ΅ (π‘). Then we have Ψ′ (π‘) = Φ′π΄ (π‘)Φπ΅ (π‘) + Φπ΄ (π‘)Φ′π΅ (π‘) by the Product Rule = π΄Φπ΄ (π‘)Φπ΅ (π‘) + Φπ΄ (π‘)π΅Φπ΅ (π‘) = π΄Φπ΄ (π‘)Φπ΅ (π‘) + π΅Φπ΄ (π‘)Φπ΅ (π‘) by Proposition 2.12 = (π΄ + π΅)Φπ΄ (π‘)Φπ΅ (π‘) = (π΄ + π΅)Ψ(π‘). In addition we have Ψ(0) = Φπ΄ (0)Φπ΅ (0) = πΌπΌ = πΌ. Thus, Ψ(π‘) solves the same initial value problem as Φπ΄+π΅ (π‘), so the two functions are equal. Exercise 2.14. Under the hypotheses of the last theorem, show that Φπ΄ (π )Φπ΅ (π‘) = Φπ΅ (π‘)Φπ΄ (π ) for all π , π‘ ∈ R, not just π = π‘ as stated in the theorem. 2.3. Matrix Exponentials. If π is a number, consider the initial value problem π₯′ (π‘) = ππ₯, π₯(0) = 1. ππ‘ The solution is π₯(π‘) = π . Of course this depends on knowing the exponential function exp(π₯) = ππ₯ . But this function can also be recovered from the solution of the IVP as ππ = π₯(1). We can follow a similar course to define ππ΄ = exp(π΄) when π΄ is a matrix. Definition 2.15. If π΄ is a complex π × π matrix, we define ππ΄ = Φπ΄ (1). Now use Theorem 2.10 (reversing the roles of π and π‘). For any π , we have Φπ‘π΄ (π ) = Φπ΄ (π‘π ). Setting π = 1 in this equation gives us ππ‘π΄ = Φπ‘π΄ (1) = Φπ΄ (π‘). For the rest of the notes, we’ll write ππ‘π΄ or exp(π‘π΄) instead of Φπ΄ (π‘). Let’s summarize the properties we’ve developed so far in the new notation. NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 9 Proposition 2.16. If π΄ is a complex π×π matrix, the matrix exponential function ππ‘π΄ satisfies the following properties. (1) π π‘π΄ π = π΄ππ‘π΄ , π0π΄ = πΌ. ππ‘ (2) If π΄ is real, ππ‘π΄ is real. (3) π(π‘1 +π‘2 )π΄ = ππ‘1 π΄ ππ‘2 π΄ . (4) For each fixed π‘, ππ‘π΄ is invertible, and the inverse is π−π‘π΄ . (5) ππ‘(π π΄) = π(π π‘)π΄ (6) For any invertible π × π matrix π , π −1 ππ‘π΄ π = ππ‘π −1 π΄π . (7) If π΅ commutes with π΄, then π΅ππ‘π΄ = ππ‘π΄ π΅ (8) If π΄ and π΅ commute, then ππ‘(π΄+π΅) = ππ‘π΄ ππ‘π΅ = ππ‘π΅ ππ‘π΄ . Remark 1. Of course, it would be nice to know what ππ‘(π΄+π΅) is when π΄ and π΅ don’t commute. The answer is given by the Baker-Campbell-Hausdorff formula, which is fairly complex. This is beyond the scope of these notes. There is another approach to developing the matrix exponential function, which we should mention. Recall that, for a real variable π₯, the exponential function ππ₯ is given by a power series, namely ∞ ∑οΈ 1 1 1 1 π π₯ = 1 + π₯ + π₯2 + π₯3 + π₯4 + · · · . π = π! 2 6 24 π₯ π=0 If π΄ is a square matrix, then formally substituting π₯ = π‘π΄ in the series above would suggest that we define ππ‘π΄ by (2.15) π π‘π΄ = ∞ π ∑οΈ π‘ π=0 π! 1 1 π΄π = πΌ + π‘π΄ + π‘2 π΄2 + π‘3 π΄3 + · · · . 2 6 Of course, this is an infinite sum of matrices. One can interpret convergence of this series to mean that the scalar infinite series one gets in each slot converges. Of course, to make this proposed definition valid, we would have to show that the series (2.15) converges. To make the definition useful, we would have to develop enough properties of such infinite series to prove that ππ‘π΄ has the properties in Proposition 2.16. We’ve decided to take a different approach. Still, we’ll see an echo of the power series (2.15) below. 3. Computing Matrix Exponentials We will first consider how to compute ππ‘π΄ when π΄ is diagonalizable, and the consider the nondiagonalizable case. 10 LANCE D. DRAGER 3.1. The Diagonalizable Case. Recall that an π × π matrix π΄ is diagonalizable if there is an invertible matrix π so that π −1 π΄π is a diagonal matrix π·. This means that π· is of the form β‘ β€ π1 β’ β₯ π2 β’ β₯ π·=β’ β₯, . . β£ β¦ . ππ where all the off diagonal entries are zero. The first thing to do is to find ππ‘π· when π· is diagonal. Proposition 3.1. If π· is the diagonal matrix β‘ π1 β’ π2 β’ π·=β’ .. β£ . β€ β₯ β₯ β₯, β¦ ππ then ππ‘π· is the diagonal matrix ππ‘π· β‘ π1 π‘ π β’ β’ =β’ β£ β€ ππ2 π‘ .. . πππ π‘ β₯ β₯ β₯. β¦ Proof. We just check that our proposed solution satisfies the right initial value problem. So, define Ψ(π‘) by β€ β‘ π1 π‘ π β₯ β’ ππ2 π‘ β₯ β’ Ψ(π‘) = β’ β₯. .. β¦ β£ . ππ π‘ π Then, β‘ π1 0 π β’ β’ Ψ(0) = β’ β£ β€ ππ 2 0 .. . ππ π 0 β‘ 1 β₯ β’ β₯ β’ β₯=β’ β¦ β£ β€ β‘ π1 π‘ π β₯β’ β₯β’ β₯β’ β¦β£ ππ 1 .. β₯ β₯ β₯=πΌ β¦ . 1 By differentiating each component, we get β‘ π1 π‘ π1 π β’ π2 ππ1 π‘ β’ ′ Ψ (π‘) = β’ β£ One the other hand β‘ π1 β’ π2 β’ π·Ψ(π‘) = β’ .. β£ . β€ β€ .. . ππ πππ π‘ β₯ β₯ β₯. β¦ β‘ π1 π‘ π1 π β₯ β’ β₯ β’ β₯=β’ β¦ β£ β€ ππ2 π‘ .. . ππ π π‘ β€ π2 ππ1 π‘ .. . ππ πππ π‘ β₯ β₯ β₯. β¦ NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 11 Thus, Ψ′ (π‘) = π·Ψ(π‘). We conclude that Ψ(π‘) solves the initial value problem that defines ππ‘π· , so we must have ππ‘π· = Ψ(π‘). We can now easily compute ππ‘π΄ if π΄ is diagonalizable. In this case, we have π π΄π = π· for some diagonal matrix π·. We can also write this equation as −1 π΄ = π π·π −1 . But then, we know ππ‘π΄ = ππ‘π π·π −1 = π ππ‘π· π −1 . So, to compute ππ‘π΄ when π΄ is diagonalizable, we use the equation (3.1) ππ‘π΄ = π ππ‘π· π −1 . Let’s do a couple of computations. Example 3.2. Consider the matrix β‘ 8 π΄ := β£ 6 6 β€ −3 −3 β¦ −1 −4 −2 −4 The characteristic polynomial of π΄ is π(π) = π3 − 5π2 + 8π − 4 which factors as π(π) = (π − 1)(π − 2)2 . Thus the eigenvalues are 1 and 2. First, let’s find a basis for πΈ(1), the eigenspace for eigenvalue 1. Of course, πΈ(1) is the nullspace of π΄ − (1)πΌ. We calculate that β‘ β€ 7 −4 −3 π΄ − πΌ = β£ 6 −3 −3 β¦ 6 −4 −2 The reduced row echelon form of π΄ − πΌ is β‘ 1 0 π =β£ 0 1 0 0 β€ −1 −1 β¦ 0 By the usual method, we find the nullspace of π , which is the same as the nullspace of π΄ − πΌ. The conclusion is that πΈ(1) is one dimensional with basis β‘ β€ 1 π£1 = β£ 1 β¦ . 1 Next, let’s look for a basis of πΈ(2). We β‘ 6 π΄ − 2πΌ = β£ 6 6 calculate −4 −4 −4 β€ −3 −3 β¦ . −3 The reduced row echelon form of π΄ − 2πΌ is β‘ β€ 1 −2/3 −1/2 0 0 β¦. π =β£ 0 0 0 0 12 LANCE D. DRAGER By the usual method, we find that πΈ(2) is two dimensional with basis β‘ β€ β‘ β€ 1/2 2/3 π’2 = β£ 0 β¦ , π’3 = β£ 1 β¦ . 1 0 It’s not necessary, but we can make things look nicer by getting rid of the fractions. It we multiply π’2 by 2 and π’3 by 3, we’ll still have a basis. This gives us a new basis β‘ β€ β‘ β€ 1 2 π£2 = 2π’2 = β£ 0 β¦ , π£3 = 3π’3 = β£ 3 β¦ 2 0 Since we have 3 independent eigenvectors, the matrix π΄ is diagonalizable. We put the basis vectors into a matrix as columns, so we get β‘ β€ 1 1 2 π = [π£1 | π£2 | π£3 ] = β£ 1 0 3 β¦ 1 2 0 The corresponding diagonal matrix is β‘ 1 π· = β£0 0 0 2 0 β€ 0 0β¦ . 2 The reader is invited to check that π −1 π΄π = π·. More importantly at the moment, we have π΄ = π π·π −1 . Thus, ππ‘π΄ = π ππ‘π· π −1 . We easily calculate1 ππ‘π· as β‘ β€ exp (π‘) 0 0 β£ β¦ 0 exp (2π‘) 0 0 0 exp (2π‘) Using a machine, we compute ππ‘π΄ = π ππ‘π· π −1 β€β‘ β€β‘ β‘ exp (π‘) 0 0 1 1 2 β¦β£ 0 exp (2π‘) 0 = β£ 1 0 3 β¦β£ 0 0 exp (2π‘) 1 2 0 β‘ −6 exp (π‘) + 7 exp (2π‘) 4 exp (π‘) − 4 exp (2π‘) = β£ −6 exp (π‘) + 6 exp (2π‘) 4 exp (π‘) − 3 exp (2π‘) −6 exp (π‘) + 6 exp (2π‘) 4 exp (π‘) − 4 exp (2π‘) −6 3 2 4 −2 −1 β€ 3 exp (π‘) − 3 exp (2π‘) 3 exp (π‘) − 3 exp (2π‘) β¦ . 3 exp (π‘) − 2 exp (2π‘) Consider the initial value problem β‘ π₯′ (π‘) = π΄π₯(π‘), β€ 1 π₯(0) = π = β£ 2β¦ . −3 The solution is β‘ β€ −7 exp (π‘) + 8 exp (2π‘) π₯(π‘) = ππ‘π΄ π = β£ −7 exp (π‘) + 9 exp (2π‘) β¦ . −7 exp (π‘) + 4 exp (2π‘) 1The software I’m using prefers exp(π‘) to ππ‘ β€ 3 −1 β¦ −1 NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 13 Example 3.3. Here is a simple example with complex eigenvalues. Let [οΈ ]οΈ 4 −1 π΄= . 5 0 The characteristic polynomial is π(π) = det(π΄ − ππΌ) = π2 − 4π + 5. The roots of the characteristic polynomial are 2 + π and 2 − π. We calculate [οΈ ]οΈ 2−π −1 π΄ − (2 + π)πΌ = . 5 −2 − π The reduced row echelon form of π΄ − (2 + π)πΌ is [οΈ ]οΈ 1 −2/5 − (1/5) π . π = 0 0 By the usual method we find the nullspace of π , which is the same as the nullspace of π΄ − (2 + π)πΌ. The result is that the nullspace is one dimensional with basis [οΈ ]οΈ 2/5 + (1/5) π π£1 = . 1 Thus, π£1 is a basis of the eigenspace of π΄ for eigenvalue 2 + π. The other eigenvalue, 2 − π is the conjugate of the first eigenvalue, so we can just conjugate the basis we found for 2 + π. This give us [οΈ ]οΈ 2/5 − (1/5) π π£2 = 1 and a basis for the eigenspace for eigenvalue 2 − π. Since we have two independent eigenvectors, the matrix π΄ is diagonalizable. If we put π£1 and π£2 into a matrix we get ]οΈ [οΈ 2/5 + (1/5) π 2/5 − (1/5) π . π = 1 1 The corresponding diagonal matrix is [οΈ ]οΈ 2+π 0 π·= . 0 2−π Note that each column of π is an eigenvector for the eigenvalue occurring in the corresponding column of π·. You can now check that π −1 π΄π = π·, or π΄ = π π·π −1 . Since π΄ is real, we know that ππ‘π΄ must be real, even though π and π· are not real. We compute ππ‘π· as [οΈ (2+π)π‘ ]οΈ π 0 ππ‘π· = 0 π(2−π)π‘ We then have ππ‘π΄ = π ππ‘π· π −1 . Putting into the TI-89 gives [οΈ 2π‘ ]οΈ π (cos(π‘) + 2 sin(π‘)) π2π‘ sin(π‘) π‘π΄ . (3.2) π = 5π2π‘ sin(π‘) π2π‘ (cos(π‘) − 2 sin(π‘)) 14 LANCE D. DRAGER Of course, the calculator has used Euler’s Formula π(πΌ+ππ½)π‘ = ππΌπ‘ cos(π½π‘) + πππΌπ‘ sin(π½π‘). Sometimes you have to put this in by hand to persuade recalcitrant software to give you results that are clearly real. If we are given an initial condition [οΈ ]οΈ π π₯(0) = π = 1 , π2 the solution of the initial value problem π₯′ (π‘) = π΄π₯(π‘), π₯(0) = π is [οΈ (οΈ π₯(π‘) = ππ‘π΄ π = ]οΈ )οΈ π2 π‘ cos (π‘) + 2 π2 π‘ sin (π‘) π1 − π2 π‘ sin (π‘) π2 (οΈ )οΈ . 5 π2 π‘ sin (π‘) π1 + π2 π‘ cos (π‘) − 2 π2 π‘ sin (π‘) π2 3.2. Nilpotent Matrices. In this subsection we discuss nilpotent matrices, which will be used in the next subsection to compute the matrix exponential of a general nondiagonalizable matrix. Definition 3.4. A square matrix π is said to be nilpotent if π π = 0 for some integer π ≥ 1. Example 3.5. Consider the matrix π½2 = [οΈ 0 0 ]οΈ 1 . 0 Of course, π½2 ΜΈ= 0, but the reader can easily check that π½22 = 0. If we go one dimension higher, we have β€ β‘ 0 1 0 π½3 = β£0 0 1β¦ . 0 0 0 The reader can easily check that π½32 ΜΈ= 0 but π½33 = 0. You can see a pattern here, but these are just some simple examples of nilpotent matrices. We’ll see later that it’s possible to have a nilpotent matrix where all the entries are nonzero. Of course, if π π = 0, then π π = 0 for all π > π. One might wonder how high a power π is necessary to make π π = 0. This is answered in the next theorem. Theorem 3.6. Let π be a nilpotent π × π matrix. Then π π = 0. To put it more precisely, if π π−1 ΜΈ= 0 and π π = 0, then π ≤ π. The proof of this theorem will be given in the appendices. Our main concern here is to compute ππ‘π when π is nilpotent. This can be done by a simple matrix calculation. Theorem 3.7. Let π be an π × π matrix. Then (3.3) ππ‘π = πΌ + π‘π + π−1 ∑οΈ 1 1 1 1 2 2 π‘ π + π‘3 π 3 + · · · + π‘π−1 π π−1 = π‘π π π . 2! 3! (π − 1)! π! π=0 NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 15 Note that it may well happen that π π = 0 for some π < π − 1, so some of the terms above will vanish. You may recognize this formula as what you would get if you plug π into the power series (2.15) and notice that all the terms with exponent higher than π − 1 will be zero. However, we can prove the theorem without resorting to the power series, we just use our usual method. Proof of Theorem. Consider the function Ψ(π‘) = πΌ + π‘π + 1 2 2 1 3 3 1 1 π‘ π + π‘ π +···+ π‘π−2 π π−2 + π‘π−1 π π−1 . 2! 3! (π − 2)! (π − 1)! Clearly Ψ(0) = πΌ. It’s easy to differentiate Ψ(π‘) if you recall that π/π! = 1/(π − 1)!. The result is 1 1 1 π‘π−3 π π−2 + π‘π−2 π π−1 . (3.4) Ψ′ (π‘) = π + π‘π 2 + π‘2 π 3 + · · · + 2 (π − 3)! (π − 2)! One the other hand, we can compute π Ψ(π‘) by multiplying π through the formula for Ψ(π‘). The result is (3.5) 1 1 1 1 π Ψ(π‘) = π +π‘π 2 + π‘2 π 3 + π‘3 π 4 +· · ·+ π‘π−2 π π−1 + +π‘π−1 π π 2! 3! (π − 2)! (π − 1)! But the last term is zero, because π π = 0. Thus, we get exactly the same formula in (3.4) and (3.5), so we have Ψ′ (π‘) = π Ψ(π‘). Thus, Ψ(π‘) satisfies the same initial value problem that defines ππ‘π . Thus, we must have ππ‘π = Ψ(π‘). With this formula, we can compute ππ‘π for (reasonably small) nilpotent matrices. Example 3.8. Consider the matrix β‘ 0 β’0 π½ =β’ β£0 0 1 0 0 0 0 1 0 0 β€ 0 0β₯ β₯. 1β¦ 0 We have β‘ 0 β’0 2 π½ =β’ β£0 0 β‘ 0 β’0 3 π½ =β’ β£0 0 π½ 4 = 0. 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 β€ 0 1β₯ β₯ 0β¦ 0 β€ 1 0β₯ β₯ 0β¦ 0 16 LANCE D. DRAGER Thus, we can calculate 1 1 ππ‘π½ = πΌ + π‘π½ + π‘2 π½ 2 + π‘3 π½ 3 2 3! β‘ β‘ β€ 0 1 1 0 0 0 β’0 0 β’0 1 0 0β₯ β’ β₯ =β’ β£0 0 1 0β¦ + π‘ β£0 0 0 0 0 0 0 1 β‘ β€ 1 π‘ π‘2 /2 π‘3 /6 β’0 1 π‘ π‘2 /2β₯ β₯. =β’ β£0 0 1 π‘ β¦ 0 0 0 1 0 1 0 0 β€ β‘ 0 0 β’ 1 0β₯ β₯ + π‘2 β’0 1β¦ 2 β£0 0 0 0 0 0 0 1 0 0 0 β€ β‘ 0 0 β’ 1 1β₯ β₯ + π‘3 β’0 0β¦ 6 β£0 0 0 0 0 0 0 0 0 0 0 β€ 1 0β₯ β₯ 0β¦ 0 Example 3.9. Consider the matrix [οΈ 3 π= 1 ]οΈ −9 . −3 The reader is invited to check that π 2 = 0. Thus, ππ‘π = πΌ + π‘π [οΈ ]οΈ [οΈ ]οΈ 1 0 3 −9 = +π‘ 0 1 1 −3 [οΈ ]οΈ 1 + 3π‘ −9π‘ = . π‘ 1 − 3π‘ In general, it’s clear from the formula (3.3) that the entries of ππ‘π are polynomials in π‘. 3.3. Computing Exponentials with the Jordan Decomposition. In this section will see a “general” method for computing the matrix exponential of any matrix. I put “general” in quotes because we’re making our usual assumption that you can find the eigenvalues. Which matrices commute with each other is going to be important, so we start with an easy proposition about commuting matrices. The proof is left to the reader Theorem 3.10. Consider π×π matrices. We say π΄ commutes with π΅ if π΄π΅ = π΅π΄. (1) π΄ commutes with itself and with the identity πΌ. (2) If π΄ commutes with π΅, π΄ commutes with any power of π΅. (3) If π΄ commutes with π΅ and with πΆ then π΄ commutes with πΌπ΅ + π½πΆ for any scalars πΌ, π½ ∈ C. If a matrix does not have enough independent eigenvectors it’s not diagonalizable. We need to look for more vectors to add to the list. It turns out the the important thing to look for is generalized eigenvectors. Definition 3.11. Let π΄ be an π × π matrix and let π be an eigenvalue of π΄. The generalized eigenspace of π΄ for eigenvalue π is denoted by πΊ(π) and is defined as (οΈ )οΈ πΊ(π) = nullspace (π΄ − ππΌ)π . NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 17 Note that if (π΄ − ππΌ)π π£ = 0 then (π΄ − ππΌ)π π£ = 0 for all π > π. In particular, the eigenspace of π΄ for eigenvalue π is defined by πΈ(π) = nullspace((π΄ − ππΌ)), so πΈ(π) ⊆ πΊ(π). In particular πΊ(π) ΜΈ= {0}. The following Big Theorem will justify our constructions in this section. It is stated without proof. Theorem 3.12 (Generalized Eigenspaces Theorem). Let π΄ be an π × π matrix and let π1 , . . . , ππ be the distinct eigenvalues of π΄. If you find a basis for each of the generalized eigenspaces πΊ(ππ ) and concatenate this lists into one long list of vectors, you get a basis for Cπ . To make this notationally specific suppose that you take a basis π£1π , π£2π , . . . , π£ππ π of πΊ(ππ ), where ππ is the dimension of πΊ(ππ ). The the list of vectors (3.6) π£11 , π£21 . . . , π£π1 1 , π£12 , π£22 , . . . π£π2 2 , . . . , π£1π , π£2π , . . . , π£ππ π is a basis of Cπ . In particular, the dimensions of the generalized eigenspaces add up to to π. Corollary 3.13 (Generalized Eigenspaces Decomposition). Let π΄ be an π × π matrix and let π1 , . . . , ππ be the distinct eigenvalues of π΄. Then every vector π£ ∈ Cπ can be written uniquely as (3.7) π£ = π£1 + π£2 + · · · + π£π , π£π ∈ πΊ(ππ ). 0 = π£1 + π£2 + · · · + π£π , π£π ∈ πΊ(ππ ) In particular, if (3.8) then each π£π is zero. Proof. According to our big theorem, we can find a basis of Cπ of the form (3.6). If π£ is any vector it can be written as a linear combination of the basis vectors. In particular, we can write (3.9) π£= ππ π ∑οΈ ∑οΈ πππ π£ππ , π= π=1 for some scalars πππ . But the term ππ ∑οΈ πππ π£ππ π=1 is in πΊ(ππ ), so (3.9) gives us the expression (3.7). Since the coefficients πππ are unique, so is the decomposition (3.7). The second statement follows by uniqueness. In preparation for our construction of the Jordan Decomposition, we have the following fact. Proposition 3.14. Let π΄ be an π × π matrix. Then generalized eigenspaces of π΄ are invariant under π΄. In other words if π is an eigenvalue of π΄, π£ ∈ πΊ(π) =⇒ π΄π£ ∈ πΊ(π). 18 LANCE D. DRAGER Proof. Suppose that π£ ∈ πΊ(π). Then, by definition, (π΄ − ππΌ)π π£ = 0 To check if π΄π£ is in πΊ(π), we have to check if (π΄ − ππΌ)π (π΄π£) is zero. But π΄ and (π΄ − ππΌ)π commute. So we have (π΄ − ππΌ)π (π΄π£) = ((π΄ − ππΌ)π π΄)π£ = (π΄(π΄ − ππΌ)π )π£ = π΄((π΄ − ππΌ)π π£) = π΄0 = 0. Thus, π΄π£ ∈ πΊ(π). We’re now ready to discuss the Jordan Decomposition Theorem and how to use it to compute matrix exponentials. Theorem 3.15 (Jordan Decomposition Theorem). Let π΄ be an π×π matrix. Then there are unique matrices π and π that satisfy the following conditions (1) π΄ = π + π (2) ππ = π π, i.e., π and π commute (it follows from the previous condition that π and π commute with π΄). (3) π is diagonalizable (4) π is nilpotent. The expression π΄ = π + π is the Jordan Decomposition of π΄. We’ll leave the uniqueness part of this Theorem to the appendices. We’ll show how to construct π and π , which will prove the existence part of the Theorem. This Theorem will enable us to compute ππ‘π΄ . Since π and π commute, ππ‘π΄ = ππ‘π ππ‘π = ππ‘π ππ‘π . We know how to compute ππ‘π , since π is diagonalizable, and we know how to compute ππ‘π , since π is nilpotent. We’ll give one application of the uniqueness part of the Theorem. Corollary 3.16. If π΄ is a real matrix with Jordan Decomposition π΄ = π + π , then π and π are real. ¯ . Taking the conjugates of both Proof. In general, if π΄ = π + π , then π΄¯ = π¯ + π ¯ ¯ ¯ ¯ sides in ππ = π π gives π π = π π. Taking the conjugates of both sides in π π = 0 ¯ π = 0, so π ¯ is nilpotent. shows π ¯ We claim that π is diagonalizable. First observe that if π is invertible, we have π π −1 = π −1 π = πΌ. Taking conjugates in this shows that π¯ π −1 = π −1 π¯ = πΌ¯ = πΌ. This shows that π¯ −1 = π −1 . Now,since π is invertible, there is an invertible matrix π and a diagonal matrix π· so that π −1 ππ = π·. Taking conjugates on both sides of this equation and using our previous remark, we have ¯ π¯ −1 π¯π¯ = π·. ¯ is certainly diagonal, so π¯ is diagonalizable. The matrix π· NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 19 ¯ satisfy all the required conditions to form a Jordan Decomposition Thus, π¯ and π ¯ of π΄. Thus, in general, ¯ π΄¯ = π¯ + π ¯ is the Jordan Decomposition of π΄. But if π΄ is real, then π΄¯ = π΄, so ¯ π΄ = π¯ + π ¯ satisfy all the right conditions. By the uniqueness part of the where π¯ and π ¯ , so both π and Jordan Decomposition Theorem, we must have π = π¯ and π = π π are real. We’ll now see how to construct the Jordan Decomposition, and then how to compute ππ‘π΄ . To construct the Jordan Decomposition of π΄, we first find the eigenvalues of π΄, call them π1 , . . . , ππ . Next, we find a basis of each of the generalized eigenspaces πΊ(ππ ). We know how to do this because πΊ(ππ ) = nullspace((π΄ − ππΌ)π ). So, we compute the matrix (π΄ − ππΌ)π and use our usual algorithm to find the null space. So, we first find the RREF of (π΄ − ππΌ)π and we can then read off a basis of the nullspace. Obviously this will all be much pleasanter if we have machine assistance, like the TI-89 or Maple. Once we have found a basis of each generalized eigenspace, putting all the lists together gives a basis of Cπ . Thus, if we insert all of these vector as the columns of a matrix π , the matrix π in π × π and is invertible. Now construct a diagonal matrix β‘ β€ π1 β’ β₯ π2 β’ β₯ (3.10) π·=β’ (off diagonal entries are 0), β₯, .. β£ β¦ . ππ where πβ is the eigenvalue that goes with column β of π , i.e., πβ = ππ if column β of π is one of the basis vectors of πΊ(ππ ). So, all of the πβ ’s are eigenvalues of π΄, but the same eigenvalue could be repeated in several columns. We then construct a matrix π by (3.11) π = π π·π −1 . Certainly π is diagonalizable! Claim. If π£ ∈ πΊ(πβ ), then ππ£ = πβ π£. Proof of Claim. This is just the way we constructed it. Describe π by its columns as ]οΈ [οΈ π = π1 π2 . . . ππ . Since ππ = π π·, we have πππ = ππ ππ . By the construction, a subset of the columns of π form a basis of πΊ(πβ ). Thus, we can find some columns ππ1 , ππ2 , . . . , πππ , 20 LANCE D. DRAGER that form a basis, where π is the dimension of πΊ(πβ ). Since these vectors are πΊ(πβ ), we have ππ1 = ππ2 = · · · = πππ = πβ . If π£ ∈ πΊ(πβ ), we can write π£ in terms of our basis as π£ = π1 ππ1 + π2 ππ2 + · · · + ππ πππ . for some scalars π1 , π2 , . . . , ππ . Then we have ππ£ = π1 πππ1 + π2 πππ2 + · · · + ππ ππππ = π1 πβ ππ1 + π2 πβ ππ2 + · · · + ππ πβ πππ = πβ (π1 ππ1 + π2 ππ2 + · · · + ππ πππ ) = ππ π£. This completes the proof of the claim. If π£ is any vector, we can write it in the form π£ = π£1 + · · · + π£ π , (3.12) π£π ∈ πΊ(ππ ). Applying π gives us (3.13) ππ£ = π1 π£1 + π2 π£2 + · · · + ππ π£π , ππ π£π ∈ πΊ(ππ ). Claim. π commutes with π΄. Proof of Claim. Recall that if π£ ∈ πΊ(πβ ), then π΄π£ ∈ πΊ(πβ ). If π£ is any vector, we can write it in the form (3.12). Multiplying by π΄ gives us π΄π£ = π΄π£1 + π΄π£2 + · · · + π΄π£π . Since each π΄π£π is in πΊ(ππ ), we can apply π to get ππ΄π£ = π1 π΄π£1 + π2 π΄π£2 + · · · + ππ π΄π£π . On the other hand, ππ£ = π1 π£1 + π2 π£2 + · · · + ππ π£π , and multiplying by π΄ gives π΄ππ£ = π΄(π1 π£1 + π2 π£2 + · · · + ππ π£π ) = π1 π΄π£1 + π2 π΄π£2 + · · · + ππ π΄π£π Thus, ππ΄ = π΄π. Now, we define π by π = π΄ − π. Obviously π΄ = π + π . Since π commutes with π΄ and itself, π commutes with π΄ − π = π . Thus, ππ = π π. It remains to show that π is nilpotent. Claim. If π£ ∈ πΊ(πβ ), then (3.14) (π΄ − π)π π£ = (π΄ − πβ )π π£ = 0. Proof of Claim. Since π΄ and π commute with each other and with the identity, π΄ − π and π΄ − πβ πΌ commute. If π£ ∈ πΊ(πβ ), ππ£ = πβ π£. Thus, (π΄ − π)π£ = π΄π£ − ππ£ = π΄π£ − πβ π£ = (π΄ − πβ πΌ)π£. NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 21 For the next power we have (π΄ − π)2 π£ = (π΄ − π)[(π΄ − π)π£] = (π΄ − π)[(π΄ − πβ πΌ)π£] = {(π΄ − π)(π΄ − πβ π£)} π£ = {(π΄ − πβ πΌ)(π΄ − π)} π£ = (π΄ − πβ πΌ)[(π΄ − π)π£] = (π΄ − πβ πΌ)[(π΄ − πβ πΌ)π£] = (π΄ − πβ πΌ)2 π£ We can continue inductively to show (π΄ − π)π π£ = (π΄ − πβ )π π£ for any power π. If we set π = π, we get(3.14). We can now prove that π is nilpotent. If π£ is any vector, we write it in the form (3.15) π£ = π£1 + · · · + π£π , π£π ∈ πΊ(ππ ). Applying π π to both sides of (3.15) gives π π π£ = (π΄ − π)π π£ = (π΄ − π)π π£1 + (π΄ − π)π π£2 + · · · + (π΄ − π)π π£π = (π΄ − π1 )π π£1 + (π΄ − π2 )π π£2 + · · · + (π΄ − ππ )π π£π = 0 + 0 + · · · + 0 = 0. Thus, π π π£ = 0 for all π£, so π π = 0. We’ve now constructed matrices π and π so that π΄ = π + π , ππ = π π, π is diagonalizable and π is nilpotent. So, we’ve found the Jordan Decomposition of π΄. We can use the machinery we developed to compute ππ‘π΄ . Our matrix π· in (3.10) is diagonal, so β€ β‘ ππ‘ π 1 β₯ β’ ππ2 π‘ β₯ β’ (off diagonal entries are 0), ππ‘π· = β’ β₯, . .. β¦ β£ πππ π‘ Since π = π π·π −1 , we can compute ππ‘π by ππ‘π = π ππ‘π· π −1 . Since π is nilpotent, we know how to compute ππ‘π . We can then compute ππ‘π΄ as ππ‘π΄ = ππ‘π ππ‘π = ππ‘π ππ‘π . Let’s summarize the steps in this process. Theorem 3.17 (Computing ππ‘π΄ ). Let π΄ be an π × π matrix. To compute ππ‘π΄ , follow these steps. (1) Find the characteristic polynomial of π΄ and the eigenvalues of π΄. Call the eigenvalues π1 , . . . , ππ . (2) For each eigenvalue πβ , find a basis of πΊ(πβ ) by computing the matrix π΅ = (π΄ − πβ )π and the finding a basis for the nullspace of π΅. (3) Put the basis vectors you’ve constructed in as the columns of a matrix π . 22 LANCE D. DRAGER (4) Construct the diagonal matrix β‘ β€ π1 β’ β₯ π2 β₯ β’ π·=β’ β₯, .. β£ β¦ . ππ (off diagonal entries are 0), where ππ is the eigenvalue such that the πth column of π is in πΊ(ππ ). (5) Construct the matrices π = π π·π −1 and π = π΄ − π. Then π΄ = π + π is the Jordan Decomposition of π΄. If π΄ is diagonalizable, you’ll wind up with π = 0. (6) Compute ππ‘π· by β€ β‘ ππ‘ π 1 β₯ β’ ππ2 π‘ β₯ β’ ππ‘π· = β’ β₯ .. β¦ β£ . πππ π‘ (7) Compute ππ‘π by ππ‘π = π ππ‘π· π −1 (8) Compute ππ‘π by the method for nilpotent matrices discussed above. (9) Compute ππ‘π΄ by ππ‘π΄ = ππ‘π ππ‘π . Example 3.18. Consider the matrix [οΈ π π΄= 0 ]οΈ π , π where π and π are constants. Since the matrix is upper triangular, we see that the only eigenvalue is π. We can write [οΈ ]οΈ [οΈ ]οΈ π 0 0 π π΄= + . 0 π 0 0 Let [οΈ ]οΈ [οΈ ]οΈ π 0 0 π π= , π= . 0 π 0 0 Clearly π is diagonlizable. The matrices π and π commute, since π = ππΌ is a multiple of the idenity, which commutes with all 2 × 2 matrices. The reader can easily check that π 2 = 0, so π is nilpotent. Thus, π΄ = π + π is the Jordan decomposition of π΄. Since π is diagonal, we have [οΈ ππ‘ ]οΈ π 0 π‘π π = . 0 πππ‘ If we use our formula for the exponential of a nilpotent matrix, we get [οΈ ]οΈ 1 ππ‘ π‘π π = πΌ + π‘π = . 0 1 Finally we get ππ‘π΄ = ππ‘π ππ‘π = [οΈ ππ‘ π 0 ππ‘πππ‘ πππ‘ . ]οΈ For a more serious example, you’re going to want a calculator or computer. It’s best to do these using rational arithmetic in order to avoid problems with roundoff error. NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 23 Example 3.19. Consider the matrix β‘ β€ −319 −16 4 64 β’ −668 −31 13 132 β₯ β₯ π΄=β’ β£ −407 −20 7 81 β¦ . −1747 −87 23 350 The eigenvalues are 1 and 2. To find the generalized eigenspace for eigenvalue 1, we calculate β‘ β€ 712 44 16 −152 β’ 2686 163 52 −570 β₯ β₯ (π΄ − πΌ)4 = β’ β£ 1162 70 21 −246 β¦ . 4187 258 92 −893 The RREF of this is β‘ 1 β’ 0 π =β’ β£ 0 0 0 1 0 0 0 0 1 0 β€ −1/7 −8/7 β₯ β₯. 0 β¦ 0 Finding the nullspace of π in the usual way, we find that the nullspace is one dimensional with basis vector β€ β‘ 1/7 β’8/7β₯ β₯ π£1 = β’ β£ 0 β¦. 1 Thus, πΊ(1) is one dimensional with basis π£1 . In this case the generalized eigenspace is the same as the eigenspace. For eigenvalue 2, we calculate β‘ β€ −79 −4 0 16 β’ −632 −32 0 128 β₯ β₯. (π΄ − 2πΌ)4 = β’ β£ 0 0 0 0 β¦ −553 −28 0 112 The RREF of this is β‘ 1 β’ 0 π =β’ β£ 0 0 4/79 0 0 0 0 0 0 0 β€ −16/79 β₯ 0 β₯ β¦ 0 0 Calculating the nullspace of π , we find that πΊ(2) is three dimensional with basis β‘ β€ β‘ β€ β‘ β€ 16/79 0 −4/79 β’ 0 β₯ β’0β₯ β’ 1 β₯ β₯ β’ β₯ β’ β₯ π£2 = β’ β£ 0 β¦ , π£3 = β£1β¦ , π£4 = β£ 0 β¦ . 1 0 0 . Next, we put these vectors into a matrix π , β‘ β€ 1/7 16/79 0 −4/79 β’8/7 0 0 1 β₯ β’ β₯. β£ 0 0 1 0 β¦ 1 1 0 0 24 LANCE D. DRAGER We next construct a diagonal matrix π·, where the diagonal entry in each column is the eigenvalue that goes with the corresponding column of π , β‘ β€ 1 0 0 0 β’ 0 2 0 0 β₯ β₯ π·=β’ β£ 0 0 2 0 β¦. 0 0 0 2 We can now find β‘ π = π π·π −1 81 4 0 β’ 632 34 0 =β’ β£ 0 0 2 553 28 0 β€ −16 −128 β₯ β₯. 0 β¦ −110 If you’re following along with your machine, convince yourself that π and π΄ commute by calculating ππ΄ − π΄π. Next, we calculate β€ β‘ −400 −20 4 80 β’ −1300 −65 13 260 β₯ β₯. π =π΄−π =β’ β£ −407 −20 5 81 β¦ −2300 −115 23 460 Using your machine, you can check that π 2 ΜΈ= 0 but π 3 = 0, so π is nilpotent. Thus, we have found the Jordan Decomposition π΄ = π + π . To calculate the exponential ππ‘π΄ , we proceed as follows. Since π· is a diagonal matrix, we calculate that β€ β‘ π‘ π 0 0 0 β’ 0 π2π‘ 0 0 β₯ β₯. ππ‘π· = β’ β£ 0 0 π2π‘ 0 β¦ 0 0 0 π2π‘ Then we have −79ππ‘ + 80π2π‘ β’ −632ππ‘ + 632π2π‘ =β’ β£ 0 −553ππ‘ + 553π2π‘ β‘ ππ‘π = π ππ‘π· π −1 −4ππ‘ + 4π2π‘ −32ππ‘ + 33π2π‘ 0 −28ππ‘ + 28π2π‘ 0 0 π2π‘ 0 β€ 16ππ‘ − 16π2π‘ 128ππ‘ − 128π2π‘ β₯ β₯ β¦ 0 π‘ 2π‘ 112π − 111π Since π 3 = 0, we have β‘ 1 − 400π‘ + 186π‘2 −20π‘ + 10π‘2 4π‘ 80π‘ − 38π‘2 β’ β’ 1209 2 65 247 2 β’ −1300π‘ + π‘ 1 − 65π‘ + π‘2 13π‘ 260π‘ − π‘ β’ 2 2 2 ππ‘π = πΌ+π‘π +(π‘2 /2)π 2 = β’ 465 2 25 95 β’ β’ −407π‘ + π‘ −20π‘ + π‘2 5π‘ + 1 81π‘ − π‘2 β’ 2 2 2 β£ 2139 2 115 2 437 2 −2300π‘ + π‘ −115π‘ + π‘ 23π‘ 1 + 460π‘ − π‘ 2 2 2 Finally, to compute ππ‘π΄ , we compute ππ‘π΄ = ππ‘π ππ‘π . After heroic simplification, and turning the expression sideways, we get If you find that hard to believe, set Ψ equal to the last horrible matrix and use your machine to compute π Ψ − π΄Ψ ππ‘ and see that you get the zero matrix. β€ β₯ β₯ β₯ β₯ β₯. β₯ β₯ β₯ β¦ NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 25 Example 3.20. Let’s try a case with complex eigenvalues. Let β‘ β€ 1 −7 5 31 β’ 2 −5 6 27 β₯ β’ β₯ β£ 2 4 −3 −25 β¦ 0 −2 2 11 The characterisitc polynomial is π(π) = π4 − 4π3 + 14π2 − 20π + 25 = (π − (1 + 2π))2 (π − (1 − 2π))2 , so the eigenvalues are 1 ± 2π. To find the eigenspace πΈ(1 + 2π), we calculate β‘ −2π −7 β’ 2 −6 − 2π π΄1 = π΄ − (1 + 2π)πΌ = β’ β£ 2 4 0 −2 The RREF of this is 5 6 −4 − 2π 2 β€ 31 β₯ 27 β₯ −25 β¦ 10 − 2π β€ 1 0 −π 0 β’ 0 1 −1 0 β₯ β₯ β’ β£ 0 0 0 1 β¦ 0 0 0 0 From this, it is easy to calculate that the nullspace of π is one dimensional with basis vector β‘ β€ π β’1β₯ β’ β₯. β£1β¦ 0 Thus, πΈ(1 + 2π) is one dimesional, Takeing conjugates, we see that πΈ(1 − 2π) is also one dimensional, so π΄ is not diagonalizable. To find a basis of πΊ(1 + 2π), we calculate that β€ β‘ 128 −512π 384π 128 + 2304π β’ 128π 256 − 384π −128 + 384π −640 + 1792π β₯ β₯ π΄41 = β’ β£ 128π 128 + 256π −256π −640 − 1536π β¦ 0 −128π 128π 128 + 640π The RREF of this is β‘ 128 β’ 128π β’ π := β£ 128π 0 β‘ −512π 256 − 384π 128 + 256π −128π 384π −128 + 384π −256π 128π β€ 128 + 2304π −640 + 1792π β₯ β₯ −640 − 1536π β¦ 128 + 640π Calculting the nullspace of π , we find that πΊ(1 + 2π) is two dimensional with basis vectors β‘ β€ β‘ β€ π 3 + 2π β’1β₯ β’5−πβ₯ β₯ β’ β₯ π£1 = β’ β£1β¦ , π£2 = β£ 0 β¦ . 0 1 ππ‘π΄ (οΈ )οΈ −79ππ‘ + 186π‘2 − 400π‘ + 80 π2π‘ (οΈ )οΈ 2π‘ β’ 2 β’ −632ππ‘ + 1209 2 π‘ − 1300π‘ + 632 π β’ =β’ 1/2π2π‘ π‘ (465π‘ − 814) β£ (οΈ )οΈ 2π‘ 2 −553ππ‘ + 2139 2 π‘ − 2300π‘ + 553 π β‘ 5/2π2π‘ π‘ (5π‘ − 8) (οΈ )οΈ 2π‘ 2 −28ππ‘ + 115 2 π‘ − 115π‘ + 28 π (οΈ )οΈ −4ππ‘ + 10π‘2 − 20π‘ + 4 π2π‘ (οΈ 2 )οΈ 2π‘ −32ππ‘ + 65 2 π‘ − 65π‘ + 33 π 23π2π‘ π‘ π2π‘ (5π‘ + 1) 13π2π‘ π‘ 4π2π‘ π‘ (οΈ )οΈ β€ 16ππ‘ + −38π‘2 + 80π‘ − 16 π2π‘ (οΈ )οΈ 2π‘ β₯ 2 β₯ 128ππ‘ + − 247 2 π‘ + 260π‘ − 128 π β₯ β₯ 2π‘ −1/2π π‘ (95π‘ − 162) β¦ (οΈ )οΈ 437 2 π‘ 2π‘ 112π + − 2 π‘ + 460π‘ − 111 π 26 LANCE D. DRAGER NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 27 By taking conjugates, we conclude that πΊ(1 − 2π) is two dimensional with basis vectors β‘ β€ β‘ β€ 3 − 2π −π β’5+πβ₯ β’1β₯ β’ β₯ β₯ π£3 = β’ β£ 1 β¦ , π£4 = β£ 0 β¦ . 1 0 Next we put these vectors into a matrix to get β‘ β€ 3 + 2π π 3 − 2π −π β’ 5−π 1 5+π 1 β₯ β₯ π =β’ β£ 0 1 0 1 β¦ 1 0 1 0 and we form the diagonal matrix β‘ 1 + 2π 0 0 β’ 0 1 + 2π 0 π·=β’ β£ 0 0 1 − 2π 0 0 0 β€ 0 β₯ 0 β₯, β¦ 0 1 − 2π where the nonzero entry in each column of π· is the eigenvalue that goes with the corresponding columun in π . We can then compute β€ β‘ 1 −6 4 26 β’ 2 −5 6 26 β₯ β₯ π = π π·π −1 = β’ β£ 2 4 −3 −26 β¦ 0 −2 2 11 and β€ 0 −1 1 5 β’ 0 0 0 1 β₯ β₯. π =π΄−π =β’ β£ 0 0 0 1 β¦ 0 0 0 0 2 We can then compute that π = 0, so π is nilpotent. To compute ππ‘π we have β€ β‘ 1 −π‘ π‘ 5π‘ β’ 0 1 0 π‘ β₯ β₯ ππ‘π = πΌ + π‘π = β’ β£ 0 0 1 π‘ β¦ 0 0 0 1 β‘ To compute ππ‘π , we first compute ππ‘π· which is β‘ (1+2π)π‘ π 0 0 (1+2π)π‘ β’ 0 π 0 β’ β£ 0 0 π(1−2π)π‘ 0 0 0 0 0 0 β€ β₯ β₯. β¦ π(1−2π)π‘ We can then compute ππ‘π = π ππ‘π· π −1 , but we won’t write out that out here. Finally, we can compute ππ‘π΄ = ππ‘π ππ‘π as ππ‘π΄ ππ‘ cos (2π‘) β’ ππ‘ sin (2π‘) =β£ π‘ π sin (2π‘) 0 β‘ −3ππ‘ sin (2π‘) − π‘ππ‘ cos (2π‘) π cos (2π‘) − 3ππ‘ sin (2π‘) − ππ‘ π‘ sin (2π‘) 2ππ‘ sin (2π‘) − ππ‘ π‘ sin (2π‘) −ππ‘ sin (2π‘) π‘ 2ππ‘ sin (2π‘) + π‘ππ‘ cos (2π‘) 3ππ‘ sin (2π‘) + ππ‘ π‘ sin (2π‘) π‘ π cos (2π‘) − 2ππ‘ sin (2π‘) + ππ‘ π‘ sin (2π‘) ππ‘ sin (2π‘) β€ 13ππ‘ sin (2π‘) − ππ‘ π‘ sin (2π‘) + 5π‘ππ‘ cos (2π‘) 13ππ‘ sin (2π‘) + π‘ππ‘ cos (2π‘) + 5ππ‘ π‘ sin (2π‘) β₯ −13ππ‘ sin (2π‘) + π‘ππ‘ cos (2π‘) + 5ππ‘ π‘ sin (2π‘) β¦ ππ‘ cos (2π‘) + 5ππ‘ sin (2π‘) 28 LANCE D. DRAGER NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 29 Alternately, we can try the following display β‘ π‘ π cos (2π‘) −3ππ‘ sin (2π‘) − π‘ππ‘ cos (2π‘) π‘ π‘ β’ π sin (2π‘) π cos (2π‘) − 3ππ‘ sin (2π‘) − ππ‘ π‘ sin (2π‘) ππ‘π΄ = β’ β£ ππ‘ sin (2π‘) 2ππ‘ sin (2π‘) − ππ‘ π‘ sin (2π‘) 0 −ππ‘ sin (2π‘) β€ 2ππ‘ sin (2π‘) + π‘ππ‘ cos (2π‘) 13ππ‘ sin (2π‘) − ππ‘ π‘ sin (2π‘) + 5π‘ππ‘ cos (2π‘) 3ππ‘ sin (2π‘) + ππ‘ π‘ sin (2π‘) 13ππ‘ sin (2π‘) + π‘ππ‘ cos (2π‘) + 5ππ‘ π‘ sin (2π‘) β₯ β₯ π‘ π‘ π‘ π cos (2π‘) − 2π sin (2π‘) + π π‘ sin (2π‘) −13ππ‘ sin (2π‘) + π‘ππ‘ cos (2π‘) + 5ππ‘ π‘ sin (2π‘) β¦ ππ‘ sin (2π‘) ππ‘ cos (2π‘) + 5ππ‘ sin (2π‘) 4. Inhomogenous Equations So far, we’ve dealt with homogenous equations of the form (4.1) π₯′ (π‘) = π΄π₯(π‘) In this section, we’ll solve inhomogenous equations of the form (4.2) π₯′ (π‘) = π΄π₯(π‘) + π (π‘) where π (π‘) is a vector-valued function. With the machinery we’ve developed, this is actually quite easy. We first write the equation in the form π₯′ (π‘) − π΄π₯(π‘) = π (π‘) and then we use π−π‘π΄ as an integrating factor. We multiply both sides of the equation on the left by π−π‘π΄ to get π−π‘π΄ π₯′ (π‘) − π−π‘π΄ π΄π₯(π‘) = π−π‘π΄ π (π‘). Note that the left-hand side of this equation is exactly π −π‘π΄ (π π₯(π‘)), ππ‘ as we can see by applying the product rule. Thus, our equation becomes π −π‘π΄ (π π₯(π‘)) = π−π‘π΄ π (π‘). ππ‘ Let’s change the π‘ variable to π to get π −π π΄ (π π₯(π )) = π−π π΄ π (π ). ππ Now integrate this equation for π between 0 and π‘. This gives us ∫οΈ π‘ [οΈ −π π΄ ]οΈπ =π‘ π π₯(π ) π =0 = π−π π΄ π (π ) ππ 0 Evaluating the left-hand side, we get π−π‘π΄ π₯(π‘) − π₯(0) = ∫οΈ π‘ π−π π΄ π (π ) ππ 0 If we denote the inital condiction at π‘ = 0 by π₯0 , so π₯(0) = π₯0 , we can rewrite the equation as ∫οΈ π‘ −π‘π΄ π π₯(π‘) = π₯0 + π−π π΄ π (π ) ππ . 0 30 LANCE D. DRAGER Now multiply both sides on the left by ππ‘π΄ , which give us ∫οΈ π‘ π−π π΄ π (π ) ππ , (4.3) π₯(π‘) = ππ‘π΄ π₯0 + ππ‘π΄ 0 which gives us the solution to the differential equation (4.2). Note that the second term is exactly the solution of (4.2) with the zero initial condition, i.e. π₯0 = 0. In the second term, we can move the factor ππ‘π΄ into the integral and rewrite the equation as ∫οΈ π‘ π(π‘−π )π΄ π (π ) ππ , (4.4) π₯(π‘) = ππ‘π΄ π₯0 + 0 which expresses the second term as a convolution. In the integral ∫οΈ π‘ π(π‘−π )π΄ π (π ) ππ , 0 We can make the change of variables π = π‘ − π . Then ππ = − ππ and π = π‘ − π. When π = 0, π = π‘ and when π = π‘, π = 0. Thus ∫οΈ π‘ ∫οΈ 0 ∫οΈ π‘ π(π‘−π )π΄ π (π ) ππ = − πππ΄ π (π‘ − π) ππ = πππ΄ π (π‘ − π) ππ 0 π‘ 0 We may as well relable the dummy variable of integration as π , so we can rewrite (4.4) as ∫οΈ π‘ (4.5) π₯(π‘) = ππ‘π΄ π₯0 + ππ π΄ π (π‘ − π ) ππ . 0 Any of the equivalent equations (4.3), (4.4) and (4.5) can be called the Variations of Constants Formula or the Variations of Parameters Formula. The name comes from a different derivation of the formula. Just out of curiosity, let’s go through this alternate derivation. You can skip this if you want. You’ve probably seen something like the before. Since our homogenous equation (4.1) is linear, we have the usual principle of superpostion. Proposition 4.1 (Principle of Superposition). Consider the homogenous equation π₯′ (π‘) = π΄π₯(π‘) (4.6) and the inhomogenous equation (4.7) π₯′ (π‘) = π΄π₯(π‘) + π (π‘). (1) If π₯1 and π₯2 (π‘) are solutions of the homogenous equation (4.6) and πΌ and π½ are scalars then π₯(π‘) = πΌπ₯1 (π‘) + π½π₯2 (π‘) is a solution of the homogenous equation. (2) If π₯π (π‘) is a particular solution (i.e., a specific function) of the inhomogenous equation, then every solution of the inhomogenous equation can be written as (4.8) π₯(π‘) = π₯π (π‘) + π§(π‘) where π§(π‘) is a solution of the homogenous equation. In other words, as π§(π‘) ranges over all solutions of the homogenous equation, (4.8) ranges over all solutions of the inhomogenous equation. NOTES ON SOLVING LINEAR SYSTEMS OF DIFFERENTIAL EQUATIONS 31 (3) If π₯π (π‘) is a particular solution of the inhomogenous equation with π₯π (0) = 0, then the solution π₯(π‘) of the inhomogeous equation with initial condition π₯(0) = π₯0 is π₯(π‘) = ππ‘π΄ π₯0 + π₯(π‘). Department of Mathematics and Statistics, Texas Tech University, Lubbock, TX 79409-1042 E-mail address: lance.drager@ttu.edu