CHAPTER 3: SYSTEMS OF ODES MINGFENG ZHAO November 16, 2014 Theorem 1 (Decoupled system). Let A = a b , if bc = 0, that is, ~x0 = A~x + f~(t) is decoupled, then we can solve c d x1 and x2 separately. For example, if b = 0, then we have (1) x01 = ax1 + f1 (t) (2) x02 = cx1 + dx2 + f2 (t). For the first equation (1), it’s a first order linear equation of x1 , by using the method of variation of parameters, we can solve x1 from (1). Then plug x1 (t) into (2), we get a first order linear equation of x2 , by using the method of variation of parameters, we can solve x2 . x0 = x1 , 1 . Example 1. Solve the system x0 = x − x . 1 2 2 Since x01 = x1 , then x1 (t) = C1 et . Since x02 = x1 − x2 = −x2 + C1 et , solve x2 by using the undetermined coefficients, x0 = x1 , C1 t 1 e + C2 e−t . Then the solution to the system is: we get x2 (t) = x0 = x − x . 2 1 2 2 ~x(t) = C 1 et C1 t 2 e + C2 e−t . Theorem 2 (Method of elimination). Consider the system: (3) x01 = ax1 + bx2 + f1 (t) (4) x02 = cx1 + dx2 + f2 (t). Take the derivative of the first equation (3) or the second equation (4), then (5) x001 = ax01 + bx02 + f10 (t). 1 2 MINGFENG ZHAO By (4) and plug x02 into (5), then x001 (6) = ax01 + bcx1 + bdx2 + bf2 (t) + f10 (t) By (3), we know that bx2 = x01 − ax1 − f1 (t), plug bx2 into (6), we get x001 = (a + d)x01 − (ad − bc)x1 + f10 (t) − df1 (t) + bf2 (t). That is, we have (7) x001 − (a + d)x01 + (ad − bc)x01 = f10 (t) − df1 (t) + bf2 (t). The equation (7) is a constant coefficient of second order equation, we can use the variation of parameters to solve x0 − ax1 − f1 (t) x1 (t) from (7). If b 6= 0, then x2 (t) = 1 to get x2 (t). If b = 0, plug x1 (t) into (4) to solve the first order b linear equation of x2 (t). x0 = x1 + x2 , 1 . Example 2. Solve the system x0 = x − x . 1 2 2 Since x01 = x1 + x2 , then x001 = x01 + x02 = x01 + x1 − x2 Since x02 = x1 − x2 = x01 + x1 − (x01 − x1 ) = Since x01 = x1 + x2 2x1 . That is, x001 − 2x1 = 0, which implies that √ x1 (t) = C1 e 2t √ + C2 e− 2t . √ √ √ √ Then x01 (t) = C1 2e 2t − C2 2e− 2t . Since x01 = x1 + x2 , then x2 (t) = x01 (t) − x1 (t) = √ √ √ √ √ √ C1 2e 2t − C2 2e− 2t − C1 e 2t + C2 e− 2t = √ √ √ √ C1 ( 2 − 1)e 2t − C2 ( 2 + 1)e− 2t . CHAPTER 3: SYSTEMS OF ODES 3 x0 = x1 + x2 , 1 Then the solution to the system is: x0 = x − x . 1 2 2 √ √ + C2 e− 2t . ~x(t) = √ √ √ √ C1 ( 2 − 1)e 2t − C2 ( 2 + 1)e− 2t C1 e 2t Theorem 3 (Fundamental matrix of homogeneous system). Let A be a 2 × 2 matrix, ~y (t) and ~z(t) be two linearly independent solutions to ~x0 = A~x, then the general solution to ~x0 = A~x is ~x(t) = C1 ~y (t) + C2 ~z(t). ~ In this case, the 2 × 2 matrix X(t) = [~y (t) ~z(t)] is called a fundamental matrix of the system ~x0 = A~x. It’s easy to ~ 0 (t) = AX(t). ~ see that X Theorem 4 (Eigenvalue Method). Let λ be an eigenvalue of A and ~v be an eigenvector corresponding to λ, then ~x(t) = eλt~v is a solution to ~x0 = A~x. Theorem 5 (Distinct eigenvalues). Let A be a 2 × 2 matrix with two distinct eigenvalues λ1 and λ2 , and ~v1 and ~v2 are eigenvectors corresponding to λ1 and λ2 , respectively. I. If λ1 and λ2 are two different real eigenvalues, then the general solution to ~x0 = A~x is: ~x = C1 eλ1 t~v1 + C2 eλ2 t~v2 . II. If λ1 and λ2 are two different complex eigenvalues, then λ2 = λ1 , ~v2 = ~v1 , and the general solution to ~x0 = A~x is: ~x = C1 Re eλ1 t~v1 + C2 Im eλ1 t~v1 . Example 3. Solve ~x0 = 2 2 1 3 ~x. First, let’s find eigenvalues of A := 2 2 1 3 det (λI2 − A) = det , we need to solve λ−2 −2 −1 λ−3 = (λ − 2)(λ − 3) − 2 = λ2 − 5λ + 4 = 0. Then λ1 = 1, and λ2 = 4. 4 MINGFENG ZHAO For λ1 = 1, let’s find the eigenvalue corresponding to λ1 = 1, we need to solve A~x = ~x, that is, −1 −2 x1 0 = . −1 −2 x2 0 Then x1 = x2 x2 −2 . That is, 1 −2 is an eigenvalue corresponding to λ1 = 1. 1 For λ2 = 4, let’s find the eigenvalue corresponding to λ2 = 4, we need to solve A~x = 4~x, that is, 2 −2 x1 0 = . −1 1 x2 0 Then x1 x2 = x1 1 , that is, 1 1 is an eigenvalue corresponding to λ2 = 4. 1 Therefore, the general solution to ~x0 = 2 2 1 3 ~x is: ~x(t) = C1 et −2 + C2 e4t 1 First, let’s find the eigenvalues of A = det (λI2 − A) = det 2 2 −4 6 1 . 1 2 2 −4 6 Example 4. Solve the initial value problem ~x0 = ~x and ~x(0) = 1 . 1 , then λ−2 −2 4 λ−6 = (λ − 2)(λ − 6) + 8 = λ2 − 8λ + 20 = 0. Then λ1 = 4 + 2i, and λ2 = 4 − 2i. CHAPTER 3: SYSTEMS OF ODES For λ = 4 + 2i, let’s solve A~v = λ~v , that is, 2 + 2i 4 −2 −2 + 2i x1 = x2 5 0 . 0 So we have x1 = x1 x2 That is, 1 1 . 1+i is an eigenvalue corresponding to 4 + 2i, then e(4+2i)t i+i Euler’s identity, we have 1 is a solution to ~x0 = A~x. By 1+i e(4+2i)t 1 1+i e4t cos(2t) + ie4t sin(2t) = = 4t (4+2i)t 4t (1 + i)e (1 + i) e cos(2t) + ie sin(2t) e4t cos(2t) e4t sin(2t) + i . = e4t cos(2t) − e4t sin(2t) e4t cos(2t) + e4t sin(2t) e(4+2i)t Hence, the general solution to ~x0 = A~x is: e4t cos(2t) e4t sin(2t) + C2 . ~x(t) = C1 e4t cos(2t) − e4t sin(2t) e4t cos(2t) + e4t sin(2t) On the other hand, since ~x(0) = 1 , then 1 C1 1 + C2 1 0 = 1 Then C1 = 0 and C2 = 0. Therefore, the solution to ~x0 = ~x(t) = 1 . 1 2 2 −4 6 ~x and ~x(0) = e4t cos(2t) 4t 4t e cos(2t) − e sin(2t) 1 is: 1 . Theorem 6 (Multiple eigenvalue). Let A be a 2 × 2 matrix with the same real eigenvalue λ and ~v be the eigenvector corresponding to λ, then ~x(t) = eλt~v is a solution to ~v 0 = A~x. 6 MINGFENG ZHAO I. If λI2 − A = 0, that is, λ is a geometric eigenvalue, then the general solution to ~x0 = A~x is 1 0 + eλt . ~x(t) = eλt 0 1 II. If λI2 − A 6= 0, that is, λ is a defective eigenvalue, then another linearly independent solution ~y to ~x0 = A~x has the form ~y (t) = eλt (t~v + w) ~ for some vector w ~ to be determined. After a simple computation, we will know that w ~ satisfies (λI2 − A)w ~ = −~v . Example 5. Solve ~x0 = 2 0 2 0 0 2 ~x. , it’s easy to say that A has only one eigenvalue λ = 2 and 2I2 − A = 0, that is, λ = 2 is a geometric 0 2 eigenvalue of A. So the general solution to ~x0 = A~x is: Let A = ~x(t) = C1 e2t 1 + C2 e2t 0 det (λI2 − A) = det . 1 x0 = 3x1 + x2 1 . Example 6. Find the general solution to x0 = 3x 2 2 x0 = 3x1 + x2 3 1 The coefficient matrix of the system is A = x0 = 3x 0 2 2 0 λ−3 −1 0 λ−3 1 . First, let’s find eigenvalues of A, then 3 = (λ − 3)2 = 0. Then λ1 = λ2 = 3. Now let’s solve 3 1 0 3 0 −1 0 0 x1 = 3 x2 x1 . x2 Then So x1 x2 = x1 1 0 x1 x2 = 0 . 0 . Hence we know that λ = 3 is the only one eigenvalue for A, ~v = 1 is the eigenvector, 0 and 3I2 − A 6= 0, that is, λ = 3 is a defective eigenvalue of A. Then ~y (t) = e3t~v is a solution to ~x0 = A~x. CHAPTER 3: SYSTEMS OF ODES 7 Let ~x = e3t (t~v + w) ~ = t~y (t) + e3t w ~ be another linearly independent solution to ~x0 = A~x, then ~x0 = ~y (t) + t~y 0 (t) + 3e3t w ~ = A(t~y (t) + e3t w) ~ = tA~y (t) + e3t Aw. ~ Since ~y (t) is a solution to ~x0 = A~x, then ~y (t) + 3e3t w ~ = e3t Aw. ~ Since ~y (t) = e3t~v , then e3t~v + 3e3t w ~ = e3t Aw, ~ that is, ~v + 3w ~ = Aw. ~ Hence, (3I2 − A)w ~ = −~v , that is, 0 −1 w −1 1 = 0 0 w2 0 So we can take w1 = 0 and w2 = 1, that is, w ~ = 0 . So another solution is −1 e3t (t~v + w) ~ = e3t t 1 + 0 0 = e3t 1 t . 1 Therefore, the genera solution to ~x0 = A~x is: ~x = C1 e3t 1 0 + C2 e3t t = 1 C1 e3t + C2 te3t C2 e 3t . Theorem 7 (Undetermined coefficients). Let A be a 2 × 2 matrix,, consider the system: ~x0 = A~x + f~(t). Let ~a, ~b be two constant vectors, pn (t) and p̃n (t) be polynomials with degree n. If f~(t) has the form: ~a pn (t)emt cos(kt) + ~b p̃n (t)emt sin(kt), then a particular solution ~xp (t) to ~x0 = A~x + f~(t) can be take as: ~xp (t) = n+α X ~vi ti emt cos(kt) + i=0 n+α X w ~ i ti emt sin(kt), i=0 where • α is one of 0, 1 and 2 (α is the multiplicity of m + ki as the eigenvalues to A): – If m + ki is not an eigenvalue of A, then α = 0. – If m + ki is an eigenvalue of Aand A has two different eigenvalues, then α = 1. – If m + ki is an eigenvalue of A and A has only one eigenvalue, then α = 2. 8 MINGFENG ZHAO • ~vi and w ~ i are undetermined constant vectors. Remark 1. Since α ∈ {0, 1, 2}, we do not need to compute eigenvalues of A to determin α, we can just try α = 2, that is, ~xp (t) = n+2 X ~vi ti emt cos(kt) + i=0 Example 7. Let A = −1 0 −2 1 n+2 X w ~ i ti emt sin(kt) i=0 . Find a particular solution of ~x0 = A~x + f~(t), where f~(t) = et First, let’s find the eigenvalues of A, that is, det (λI2 − A) = det λ+1 0 2 λ−1 = (λ + 1)(λ − 1) = 0, then λ1 = and λ2 = −1. Notice that f~(t) = et 1 = 1 0 et + 0 t. 1 So we can let ~xp (t) = ~atet + ~bet + ~ct + d~ be a particular solution to ~x0 = A~x = f~(t), then = ~aet + ~atet + ~bet + ~c ~x0p (t) = A~xp (t) + f~(t) = A~atet + A~bet + A~ct + Ad~ + 1 et + 0 0 t. 1 Then we have A~b + A~a = ~a, 1 = ~a + ~b, A~c + 0 0 = 0, ~ and ~c = Ad. 1 Solve ~a, ~b, ~c, m and n, we can take ~a = 0 −1 , ~b = 1 2 , ~c = 0 0 −1 , and d~ = 0 −1 . So a particular solution to ~x0 = A~x + f~(t) is: ~xp (t) = . t 0 −1 tet + 1 2 0 et + 0 −1 t + 0 −1 = 1 t 2e t −te − t − 1 . CHAPTER 3: SYSTEMS OF ODES 9 Theorem 8 (Variation of parameters). Let ~x1 (t) and ~x2 (t) be two linearly independent solutions to ~x0 = A(t)~x, then X(t) = [~x1 ~x2 ] is a fundamental matrix, that is, X 0 (t) = A(t)X(t). Let’s consider ~x0 = A(t)~x + f~(t). Let ~xp (t) = X(t)~u(t) for some ~u(t) be a particular solution to ~x0 = A(t)~x + f~(t), after a simple computation, we can get X(t)~u0 (t) = f~(t), which implies that ~u0 (t) = X(t)−1 f~(t). Then Z ~u(t) = X(t)−1 f~(t) dt. That is, Z X(t)−1 f~(t) dt. ~xp (t) = X(t) Example 8. Find a particular solution to ~x0 = Let A = 1 1 4 −2 and f~(t) = − et et 1 1 4 −2 ~x − et et . . First, let’s find the eigenvalues of A, that is, det (λI2 − A) = det λ−1 −1 −4 λ+2 = (λ − 1)(λ + 2) − 4λ2 + λ − 6 = 0. Then λ1 = −3, For λ = −3, let’s solve A~x = −3~x, that is, Then x1 x2 = x1 1 −4 −4 −1 −4 −1 and λ2 = 2. x1 x2 = 0 . 0 , tha is, 1 −4 is an eigenvalue for λ = −3. 10 MINGFENG ZHAO For λ = 2, let’s solve A~x = 2~x, that is, Then x1 = x1 x2 1 1 −1 −4 4 x1 = 0 x2 . 0 , that is, 1 1 is an eigenvalue for λ = 2. 1 So the general solution to ~x0 = 1 1 4 −2 ~x is: ~x(t) = C1 1 1 e−3t + C2 −4 e2t . 1 Then a fundamental matrix for ~x0 = A~x can be: X(t) = e−3t e2t −4e−3t e2t . Then X(t)−1 = e2t −e2t 1 5e−t 4e−3t e Let ~xp (t) = X(t)~u(t) be a particular solution to ~x0 = −3t e3t −e3t = 1 5 4e−2t 1 1 4 −2 X(t)~u0 (t) = − ~x − e−2t . et , then et et . et Then 0 ~u (t) = −X(t) −1 e3t 1 =− 5 4e−2t et et −e3t e−2t 0 0 1 =− = . 5 5e−t et −e−t et Then Z ~u(t) = ~u0 (t) dt = Z 0 −e −t 0 dt = e −t . CHAPTER 3: SYSTEMS OF ODES Then a particular solution to ~x0 = 1 1 −2 4 ~x − ~xp (t) = X(t)~u(t) = et e can be: t e−3t e2t −4e−3t e2t Example 9 (Laplace transform for systems). Solve ~x0 = 1 4 Let A = 1 1 4 −2 11 1 −2 0 e−t = ~x − et e t et et . and ~x(0) = 0. ~ and X(s) = L[~x(t)], then ~ ~ L[~x0 (t)] = sX(s) − ~x(0) = sX(s). Apply the Laplace transform on the both sides of ~x0 = 1 1 4 −2 ~ ~ sX(s) = AX(s) − ~x − L[et ] L[et ] et et , we get . By looking up the table, we have L[et ] = 1 . s−1 Then we get s−1 −1 −4 s+2 ~ X(s) = − 1 s−1 1 s−1 . Then we get s+2 1 ~ X(s) =− (s − 1)(s + 2) − 4 4 1 s−1 1 s−1 1 s−1 1 =− (s + 3)(s − 2) By partial fractions, we have 1 1 1 = − . (s − 1)(s − 2) s−2 s−1 By looking the table, we have −1 L 1 = e2t , s−2 and L −1 1 = et . s−1 s+3 s−1 s+3 s−1 = − 1 (s−1)(s−2) 1 (s−1)(s−2) . 12 MINGFENG ZHAO Therefore, the solution to ~x0 = 1 4 1 −2 ~x − et e t and ~x(0) = 0 is: ~ ~x(t) = L−1 [X(s)] = − e2t − et e2t − et = x0 = f1 (x1 , x2 ) 1 Definition 1 (Vector field). The vector field of x0 = f (x , x ) 2 1 2 2 et − e2t et − e2t . is the projection on the x1 x2 -plane of its three x0 = f1 (x1 , x2 ) 1 dimensional vector field in the tx1 x2 -space. To draw the vector field of : x0 = f (x , x ) 2 1 2 2 I. Plot the x1 x2 -plane. II. Select points as many as possible in the plane, say P1 , P2 , · · · , Pn . III. At each point Pi , draw a short arrow with direction (f1 (Pi ), f2 (Pi )). For the the two dimensional autonomous linear system ~x0 = A~x, where A is a 2 × 2 constant matrix. Assume A has two distinct nonzero eigenvalues λ1 6= λ2 , the behavior of solutions to the two dimensional linear homogeneous system ~x0 = A~x: Example 10. Let A = Example 11. Let A = Example 12. Let A = Eigenvalues Behavior I. real and both positive source(unstable) II. real and both negative sink (stable) III. real and opposite signs saddle IV. purely imaginary center point (ellipses) V. complex with positive real part spiral source VI. complex with negative real part spiral sink 1 1 0 2 , then λ1 = 1, λ2 = 2. Then the vector field of ~x0 = A~x is a source/unstable . −1 −1 0 −2 1 1 0 −2 , then λ1 = −1, λ2 = −2. Then the vector field of ~x0 = A~x is a sink/stable . , then λ1 = 1 and λ2 = −2. Then the vector field of ~x0 = A~x is a saddle/unstable . CHAPTER 3: SYSTEMS OF ODES Example 13. Let A = 0 1 −4 0 1 1 −4 1 Example 14. Let A = Example 15. Let A = 13 , then λ1 = 2i and λ2 = −2i. Then the vector field of ~x0 = A~x is a center/ellipse . , then λ1 = 1+2i and λ2 = 1−2i. Then the vector field of ~x0 = A~x is a spiral source . −1 −1 4 −1 , then λ1 = −1 − 2i and λ2 = −1 + 2i. Then the vector field of ~x0 = A~x is a spiral sink . Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C. Canada V6T 1Z2 E-mail address: mingfeng@math.ubc.ca