CHAPTER 1 System of First Order Differential Equations In this chapter, we will discuss system of first order differential equations. There are many applications that involving find several unknown functions simultaneously . Those unknown functions are related by a set of equations that involving the unknown functions and their first derivatives. For example, in Chapter Two, we studied the epidemic of contagious diseases. Now if • S(t) denotes number of people that is susceptible to the disease but not infected yet. • I(t) denotes number of people actually infected. • R(t) denotes the number of people have recovered. If we assume • The fraction of the susceptible who becomes infected per unit time is proportional to the number infected, b is the proportional number. • A fixed fraction rS of the infected population recovers per unit time, 0 ≤ r ≤ 1. • A fixed fraction of the recovers g become susceptible and infected, 0 ≤ g ≤ 1. proportional function. The system of differential equations model this phenomena are S 0 = −bIS + gR I 0 = bIS − rI R0 = rI − gR The numbers of unknown function in a system of differential equations can be arbitrarily large, but we will concentrate ourselves on 2 to 3 unknown functions. 1. Principle of superposition Let aij (t), bj (t) i = 1, 2, · · · , n and j = 1, 2, · · · , n be known function, and xi t, i = 1, 2, · · · , n be unknown functions, the linear first 1 2 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS order system of differential equation for xi (t) is the following, x01 (t) = a11 (t)x1 (t) + a12 (t)x2 (t) + · · · + a1n (t)xn (t) + b1 (t) x02 (t) = a21 (t)x1 (t) + a22 (t)x2 (t) + · · · + a2n (t)xn (t) + b2 (t) x03 (t) = a31 (t)x1 (t) + a32 (t)x2 (t) + · · · + a3n (t)xn (t) + b3 (t) .. . x0n (t) = an1 (t)x1 (t) + an2 (t)x2 (t) + · · · + ann (t)xn (t) + f1 (t) Let x(t) be the column vector of unknown functions xi t, i = 1, 2, · · · , n, A(t) = (aij (t), and b(t) be the column vector of known functions bi t, i = 1, 2, · · · , n, we can write the first order system of equations as (1) x0 (t) = A(t)x(t) + b(t) • When n = 2, the linear first order system of equations for two unknown functions in matrix form is, · 0 ¸ · ¸· ¸ · ¸ x1 (t) a11 (t) a12 (t) x1 (t) b1 (t) = + x02 (t) a21 (t) a22 (t) x2 (t) b2 (t) • When n = 3, the linear first order system of equations for three unknown functions in matrix form is, 0 x1 (t) a11 (t) a12 (t) a13 x1 (t) b1 (t) x02 (t) = a21 (t) a22 (t) a23 x2 (t) + b2 (t) x03 (t) a31 (t) a32 (t) a33 x3 t b3 (t) A solution of equation (1) on the open interval I is a column vector function x(t) whose derivative (as a vector-values function) equals A(t)x(t) + b(t). The following theorem gives existence and uniqueness of solutions, Theorem 1.1. If the vector-valued functions A(t) and b(t) are continuous over an open interval I contains t0 , then the initial value problem ½ 0 x (t) = A(t)x(t) + b(t) x(t0 ) = x0 has an unique vector-values solution x(t) that is defined on entire interval I for any given initial value x0 . When b(t) ≡ 0, the linear first order system of equations becomes x0 (t) = A(t)x(t), which is called a homogeneous equation. As in the case of one equation, we want to find out the general solutions for the linear first order system of equations. To this end, we first have the following results for the homogeneous equation, 1. PRINCIPLE OF SUPERPOSITION 3 Theorem 1.2. Principle of Superposition Let x1 (t), bx2 (t), · · · , xn (t) be n solutions of the homogeneous linear equation x0 (t) = A(t)x(t) on the open interval I. If c1 , c2 , · · · , cn are n constants, then the linear combination c1 x1 (t) + c2 x2 (t) + c3 x3 (t) + · · · + cn xn (t) is also a solution on I. Example 1.1. Let · ¸ 1 0 x (t) = x(t) 0 −2 · t ¸ · ¸ e 0 , x1 (t) = and x2 (t) = are two solutions, as 0 e−2t · ¸ · t ¸ · ¸· t ¸ (et )0 e 1 0 e 0 bx1 (t) = = = 0 0 0 −2 0 0 and · bx02 (t) = 0 (e−2t )0 ¸ · = 0 −2e−2t ¸ · = 1 0 0 −2 ¸· 0 ¸ e−2t By the Principle of Superposition, for any two constants c1 and c2 · t ¸ · ¸ · ¸ e 0 c1 et x(t) = c1 x1 (t) + c2 x2 (t) = c1 + c2 = 0 e−2t c2 e−2t is also solution. We shall see that it is actually the general solution. The next theorem gives the general solution of linear system of equations, Theorem 1.3. - Let x1 (t), x2 (t), · · · , bxn (t) be n linearly independent (as vectors) solution of the homogeneous system x0 (t) = A(t)x(t), then for any solution xc (t) there exists n constants c1 , c2 , · · · , cn such that xc (t) = c1 x1 (t) + c2 x2 (t) + · · · + cn xn (t). We call xc (t) the general solution of the homogeneous system. 4 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS If xp (t) is a particular solution of the nonhomogeneous system, x(t) = B(t)x(t) + b(t), and xc (t) is the general solution to the associate homogeneous system, x(t) = B(t)x(t) then x(t) = xc (t) + xp (t) is the general solution. Example 1.2. Let · ¸ · ¸ 4 −3 −4t2 + 5t 0 x (t) = x(t) + x(t) 6 −7 −6t2 + 7t + 1 · ¸ · −5t ¸ 3e2t e , x1 (t) = and x2 (t) = are two linearly independent 2t 2e 3e−5t · 2 ¸ t solutions. and xp (t) = is a particular solution. By Theorem t 1.3, · ¸ 3c1 e2t + c2 e−5t + t2 (2) x(t) = c1 x1 (t) + c2 x2 (t) + xp (t) = 2c1 e2t + 3c2 e−5t + t is the general solution. Now suppose we want to · find ¸a particular so2 lution that satisfies the initial condition x(0) = , then let t = 0 −1 in (2), we have · ¸ · ¸ 3c1 + c2 2 x(0) = = , 2c1 + 3c2 −1 which can be written in matrix form, · ¸· ¸ · ¸ 3 1 c1 2 = , 2 3 c2 −1 · ¸ · ¸ c1 1 Solve this equation, we get = . So the particular c2 −1 ¸ · 3e2t − e−5t + t2 . solution is x(t) = 2e2t − 3e−5t + t From the above example, we can summarize the general steps in find a solution to initial value problem, ½ x0 (t) = A(t)x(t) + b(t) x(t0 ) = x0 2. HOMOGENEOUS SYSTEM 5 • Step One: Find the general solution xc = c1 x1 (t) + c2 x2 (t) + · · · + cn xn (t), where x1 (t), x2 (t), · · · , xn (t) are a set of linearly independent solutions, to the associate homogeneous system, x0 (t) = A(t)x(t). • Step Two: Find a particular solution xp (t)to the nonhomogeneous system, x0 (t) = A(t)x(t) + b(t). • Step Three: Set x(t) = xc (t) + xp (t) and use the equation x(t0 ) = x0 , to determine c1 , c2 , · · · , cn . 2. Homogeneous System We will use a powerful method called eigenvalue method to solve the homogeneous system x0 (t) = Ax(t) where A is a matrix with constant entry. We will present this method for A is either a 2 × 2 or 3 × 3 cases. The method can be used for A is an n × n matrix. The idea is to find solutions of form (3) x(t) = veλt , a straight line that passing origin in the direction v. Now taking derivative on x(t), we have (4) x0 (t) = λveλt put (3) and (2.2) into the homogeneous equation, we get x0 (t) = λveλt = Aveλt So Av = λv, which indicates that λ must be an eigenvalue of A and v is an associate eigenvector. 2.1. A is a 2 × 2 matrix. Suppose · ¸ a11 a12 A= a21 a22 Then the characteristic polynomial p(λ) of A is p(λ) = |A−λI| = (a11 −λ)∗(a22 −λ)−a12 a21 = λ2 −(a11 +a22 )+(a11 a22 −a12 a22 . So p(λ) is a quadratic polynomial of λ. From Algebra, we know that p(λ) = 0 has either 2 distinct real solutions, or a double solution, or 2 conjugate complex solutions. The following theorem summarize the solution to the homogeneous system, 6 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS Theorem 2.1. Let p(λ) be the characteristic polynomial of A, for x0 (t) = Ax(t), Case 1: p(λ) = 0 has two λ¸1 and λ2 . · distinct ¸ real solutions · v11 v12 Suppose v 1 = and v 2 = are associate eigenv21 v22 vector (i.e, Av 1 = λ1 v 1 and Av 2 = λ2 v 2 ) Then the general solution is xc (t) = c1 v 1 eλ1 t + c2 v 2 eλ2 t And · v11 eλ1 t v12 eλ2 t v21 eλ1 t v22 eλ2 t Φ(t) = ¸ is called the fundamental matrix(A fundamental matrix is a square matrix whose columns are linearly independent solutions of the homogeneous system). Case 2: p(λ) = 0 has a double solutions λ0 . In this case p(λ) = (λ − λ0 )2 and λ0 is a zero of p(λ) with multiplicity 2. (1) λ0 has eigenvectors: · two¸ linearly independent · ¸ v11 v12 Suppose v 1 = and v 2 = are associate linearly v21 v22 independent eigenvectors. Then the general solution is xc (t) = (c1 v 1 + c2 v 2 )eλ0 t And · λ0 t Φ(t) = e v11 v12 v21 v22 ¸ (2) λ0 has · only¸ one associate eigenvector: v11 Suppose v 1 = is the only associated eigenvector and v21 · ¸ v12 v2 = is a solution of v22 (λ0 I − A)v 2 = v 1 . Then the general solution is, xc (t) = (c1 v 1 + c2 (tv 1 + v 2 )eλ0 t And · Φ(t) = e λ0 t v11 (v11 t + v12 ) v21 (v21 t + v22 ) is the fundamental solution matrix. ¸ 2. HOMOGENEOUS SYSTEM 7 Case 3: p(λ) = 0 has two solutions a + bi and a − bi. · conjugate complex ¸ v11 + iv12 Suppose v = is the associate complex eigenv21 + iv22 vector· with ¸respect to a· + bi, ¸then the general solution is, v11 v12 v1 = and v 2 = v21 v22 xc (t) = [c1 (v 1 cos(bt) − v 2 sin(bt))c2 (v 2 cos(bt) + v 1 sin(bt))]eat . And at Φ(t) = e · v11 cos(bt) − v12 sin(bt) v12 cos(bt) + v11 sin(bt) v21 cos(bt) − v22 sin(bt) v22 cos(bt) + v21 sin(bt) ¸ is the fundamental matrix. From Theorem 2.1, let Φ(t) be the fundamental matrix, the general · ¸ c1 solution is given by xc (t) = Φ(t)c, with c = and the solution c2 that satisfies a given initial condition x(t0 ) = x0 is given by x(t) = Φ(t)Φ(t )-t x 0 0 Example 2.1. · Two distinct ¸ eigenvalues case Find the general 2 −3 solution to x0 (t) = x(t) −1 −5 Solution vecs() Using Mathcad , functions eigenvals() and eigen- In Mathcad , eigenvecs(M) Returns a matrix containing the eigenvectors. The nth column of the matrix returned is an eigenvector corresponding to the nth eigenvalue returned by eigenvals. √ we find,λ1 = ·− 32 + 21 61 √ √ 3 1 and λ = − − 61 with ¸associated eigen2 2· 2 ¸ √ −7 − 61 −7 + 61 vectors v 1 = and v 2 = respectively. So 2 2 the fundamental matrix is √ √ √ √ · ¸ 3 − 12 61)t (− 32 + 12 61)t 2 (−7 − 61)e√ (−7 + 61)e(− √ Φ(t) = 3 1 3 1 2e(− 2 + 2 61)t 2e(− 2 − 2 61)t · ¸ c1 and the general solution is, for c = , c2 xc (t) = Φ(t)c a 8 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS Example 2.2. One double eigenvalues with two linearly in- ¸ · 2 0 dependent eigenvectors Find the general solution to x0 (t) = x(t). 0 2 Solution ¸ · ¸ ·The ¸eigenvalue is λ0 = 2 and associated · eigenvectors 0 c1 e2t 1 and , so the general solution is xc = a are 1 c2 e2t 0 Example 2.3. One double eigenvalues · ¸with only one eigen· ¸ 2 −3 2 0 vector Find the solution to x (t) = x(t) and x(0) = 3 8 3 Solution Using Mathcad , functions eigenvals() and · eigen- ¸ −.707 vecs() we can find a double eigenvalue λ0 = 5 and eigenvector . .707 Notice, the symbolic operator →(bring ˙ up by either [Shift][Ctrl][.] or [Ctrl][.]) will not work with eigenvecs() this time, but since multiply an eigenvector · by a¸ nonzero constant still get an eigenvector, we can 3 choose v 1 = . −3 To (A − λ0 I)w = v 1 λ0 we will solve (A − · find ¸w that · satisfies ¸ w1 1 λ0 I) = . That is, w2 −1 · ¸· ¸ · ¸ −3 −3 w1 3 = 3 3 w2 −3 One solution is w1 = 1 and w2 = 0 So the fundamental matrix is · ¸ −3 −3t + 1 5t Φ(t) = e 3 3t · ¸ c1 and the general solution is, c = , c2 · Now, Φ(0) = e5(0) · ¸ 0 −1 1 . 3 −3 −3 xc (t) = Φ(t)c ¸ · ¸ −3 −3(0) + 1 −3 1 = and Φ(0)-1 = 3 3(0) 3 0 Hence, the particular solution is x(t) = Φ(t)Φ(0)-1 x0 = e5t · −3t + 4 3t − 3 ¸ a 2. HOMOGENEOUS SYSTEM 9 Example 2.4. Two conjugate complex eigenvalues case Find ¸ · 2 −3 the general solution to x0 (t) = x(t) 1 2 Solution Using Mathcad , functions eigenvals() and √eigenvecs() we find two conjugate complex eigenvalues, 1 = 2 + i 3 and · √ λ¸ √ 3 with respect to λ2 = 2 − i 3 with associated eigenvector v 1 = −i √ λ1 . Compare this with the Theorem 2.1, we have a = 2, b = 3, v11 = √ 3, v21 = 0, v12 = 0, and v22 = −1. So the fundamental matrix is · √ ¸ 3 cos(bt) − sin(bt) 2t √ Φ(t) = e 3 sin(bt) − cos(bt) · ¸ c1 and the general solution is, c = , c2 √ √ ¸· ¸ · √ 3 cos(√ 3t) − sin( √3t) c1 2t √ xc (t) = Φ(t)c = e c2 √3 sin( 3t) − √cos(¸ 3t) · √ 3c cos(√ 3t) − c2 sin(√ 3t) = e2t √ 1 3c1 sin( 3t) − c2 cos( 3t) · ¸ 1 Suppose we want to find a solution such that x(0) = , then 2 x(t) = Φ(t)Φ(0)-1 x(0) √ √ ¸-1 · ¸ · √ ¸· √ 1 3 cos( 3t) − sin( 3t) 3 0 2t √ √ √ = e 2 · √3 sin( √3t) − cos(√ 3t) ¸ · 01 ¸ −1 √ 3 cos(√ 3t) − sin( √3t) 3 = e2t √ −2 3 sin( 3t) − cos( 3t) √ √ · ¸ cos( √ 3t) + +2 sin(√ 3t) 2t = e − sin( 3t) + 2 cos( 3t) a 2.2. A is a 3 × 3 matrix. Suppose a11 a12 a13 A = a21 a22 a23 a31 a32 a33 Then the characteristic polynomial p(λ) of A given by p(λ) = |A − λI|, 10 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS is a cubic polynomial of λ. From Algebra, we know that p(λ) = 0 has either 3 distinct real solutions, or 2 distinct solutions and one is a double solution, or one real solution and 2 conjugate complex solutions, or a triple solution. The following theorem summarize the solution to the homogeneous system, Theorem 2.2. Let p(λ) be the characteristic polynomial of A, for x0 (t) = Ax(t), Case 1: p(λ) = 0 has three λ3 . λ1 , λ2 , and distinct real solutions v13 v12 v11 Suppose v 1 = v21 , v 2 = v22 , and v 3 = v23 v31 v32 v33 are associate eigenvector (i.e, Av 1 = λ1 v 1 , Av 2 = λ2 v 2 , and Av 3 = λ3 v 3 ) Then the general solution is xc (t) = c1 v 1 eλ1 t + c2 v 2 eλ2 t + c3 v 3 eλ3 t And the fundamental matrix is v11 eλ1 t v12 eλ2 t v13 eλ3 t Φ(t) = v21 eλ1 t v22 eλ2 t v23 eλ3 t . v31 eλ1 t v32 eλ2 t v33 eλ3 t Case 2: p(λ) = 0 has a double solutions λ0 . 2 So p(λ) = (λ− λ0 ) (λ − λ1 ), and λ0 has multiplicity 2. Let v12 v22 is the eigenvector associated with λ1 . v3 = v32 [1] λ0 has eigenvectors: · two¸linearly independent · ¸ v11 v12 Suppose v 1 = and v 2 = are associate linearly v21 v22 independent eigenvectors. Then the general solution is xc (t) = (c1 v 1 + c2 v 2 )eλ0 t + c3 v 3 eλ1 t And v11 eλ0 t v12 eλ0 t v13 eλ1 t Φ(t) = v21 eλ0 t v22 eλ0 t v23 eλ1 t v31 eλ0 t v32 eλ0 t v33 eλ1 t 2. HOMOGENEOUS SYSTEM 11 [2] λ0 has one eigenvector: v11 Suppose v 1 = v21 is the associated eigenvector with rev31 v12 spect to λ0 and v 2 = v22 is a solution of v32 (λ0 I − A)v 2 = v 1 . Then the general solution is, xc (t) = (c1 v 1 + c2 (tv 1 + v 2 ))eλ0 t + c3 v 3 eλ1 And v11 eλ0 t (v11 t + v12 )eλ0 t v13 eλ1 Φ(t) = v21 eλ0 t (v21 t + v22 )eλ0 t v23 eλ1 v31 eλ0 t (v31 t + v32 )eλ0 t v33 eλ1 is the fundamental solution matrix. Case 3: p(λ) = 0 has two conjugate complex solutions a ± bi and a real solution λ1 . v11 + iv12 Suppose v = v21 + iv22 is the associate complex eigenv31 + iv32 vectorwith respect to a + bi, then the general solution is, let v13 v 3 = v23 , are associated eigenvectors with respect to λ1 , V33 xc (t) = [c1 (v 1 cos(bt)−v 2 sin(bt))c2 (v 2 cos(bt)+v 1 sin(bt))]eat +c3 v 3 eλ1 . And v11 cos(bt) − v12 sin(bt) v12 cos(bt) + v11 sin(bt) v13 eλ1 Φ(t) = eat v21 cos(bt) − v22 sin(bt) v22 cos(bt) + v21 sin(bt) v23 eλ1 v31 cos(bt) − v32 sin(bt) v32 cos(bt) + v31 sin(bt) v33 eλ1 is the fundamental matrix. Case 4: p(λ) = 0 has solution λ0 with multiplicity 3. In this case, p(λ) = (λ − λ0 )3 . [1] λ0has three eigenvectors. linearly independent v13 v12 v11 Let v 1 = v21 , v 2 = v22 , and v 3 = v23 be V33 V32 v31 the three linearly independent eigenvectors. Then the general 12 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS λ0 t solution is xc (t) = (c1 v 1 + c2 v 2 + c3 v and fundamental 3 )e v11 v12 v13 v21 v22 V23 v matrix is Φ(t) = eλ0 t 31 v32 V33 [2] λ0 has two linearly eigenvectors. independent v12 v11 are the linearly inde v v , v2 = Suppose v 1 = 22 21 V v31 32 v13 v23 , then only one of the pendent eigenvectors. Let v 3 = V33 two equations, (A − λ0 I)v 3 = v 1 or (A − λ0 I)v 3 = v 2 can has a solution that is linearly independent with v 1 , v 2 . Suppose (A−λ0 I)v 3 = v 2 generates such a solution. Then the general solution is xc (t) = [c1 v 1 +c2 v 2 + c3 (tv 2 + v 3 )]eλ0 t v11 v12 tv12 + v13 and fundamental matrix is Φ(t) = eλ0 t v21 v22 tv22 + V23 v31 v32 tv32 + V33 [3] λ has only one eigenvector. 0 v11 Let v 1 = v21 be the linearly independent eigenvectors. v 31 v12 v13 Let v 2 = v22 and v 3 = v23 be two vectors that V32 V33 satisfies (A − λ0 I)v 2 = v 1 and (A − λ0 I)v 3 = v 2 . Then the general solution is xc (t) = [c1 v 1 + c2 (tv 1 + v 2 ) + c3 (t2v 1 + tv 2 + v 3 )]eλ0 t and fundamental matrix is Φ(t) = v11 tv11 + v12 t2 v11 + tv12 + v13 eλ0 t v21 tv21 + v22 t2 v21 + tv22 + V23 v31 tv31 + v32 t2 v31 + tv32 + V33 Remark 2.1. Suppose A is an n × n matrix, for the homogeneous system x0 (t) = Ax(t), three general case would happen Case 1: A has n distinct eigenvalues λi , i = 1, 2, · · · , n with linearly independent eigenvectors v i , i = 1, 2, · · · , n then the general solution will be xc (t) = c1 v 1 eλ1 + c2 v 2 eλ2 + · · · + cn v n eλn 2. HOMOGENEOUS SYSTEM 13 Case2: A has m < n distinct eigenvalues, in this case some eigenvalues would have multiplicity greater than 1. Suppose λr has multiplicity r. Depending on how many linearly independent eigenvectors are associated with λr the situation could be very complex. Let p be the number of linearly eigenvectors associated with λr , then d = r − p is called the deficit of λr . The simply cases are either d = 0 or d = r − 1. When 0 < d < r − 1 the situation could be very complex. Suppose d = r − 1 and v 1 is the only eigenvector associate with λr , then one will have to solve r − 1 equations (A − λr )i v i+1 = v i , i = 1, 2, · · · , r − 1. And the general solution would contains terms like [c1 v 1 + c2 (v 1 t + v 2 ) + c3 (v 1 t2 + v 2 t + v 3 ) + · · · + cr (v r1 + v 2 tr−1 + · · · + v r )]eλr . Case 3: A complex root a+bi with associated eigenvector v a +iv b , then the general solution contains term, [c1 (v a cos(bt)−v b sin(bt))+ c2 (v a sin(bt) + v b cos(bt))]eat . Remark 2.2. Suppose x1 (t), x2 (t), x3 (t), · · · , xn (t) are n linearly independent solution for n×n homogeneous system, x0 (t) = Ax(t), the fundamental matrix Φ(t) is a matrix whose columns are xi (t), i = 1, 2, · · · , n. Example 2.5. (Two distinct eigenvalues) Find the general solution to x01 = 3x1 + 4x2 − 2x3 x02 = 2x1 + x2 − 4x3 x03 = x1 + 2x2 x1 (t) 3 4 −2 Solution Let x(t) = x2 (t) and 2 1 −4 The equax3 (t) 1 2 0 0 tions can be written in matrix form x (t) = Ax(t). Using Mathcad , functions eigenvals() and eigenvecs() we find,λ1 = −4 2 and λ2 = 1 with associated eigenvectors v 1 = 1 and v 2 = −2 1 0 respectively. Since λ1 has multiplicity 2 as 1 appeared twice 1 in the result of eigenvals() function, we need to solve the equation (A − λ1 I)v 3 = v 2 . 14 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS To use Mathcad , (1) you first compute (A − λ1 I)v 3 using the following sequences of key stroke, [*] type ([Ctrl][M], set the rows and columns in the matrix definition popup menu, input the data for A, [*] type -[Ctrl][M] set the row and column number and input data for λ1 I, [*] type )[Ctrl][M], now set 1 as column number, enter a, b, c in the place holders, [*] type [Ctrl][.] to compute symbolically and you get. (2) Using the Given Find block to find a solution. Type Given in a blank space, type a+2b-c[Ctrl]= 1 and 2a-4c[Ctrl]=0 in two rows, then type key word Find following by typing (a,b)[Ctrl][.] you will get the solution in terms of c. 4 Set c = 1, we get v 3 = −1 . 1 So the fundamental matrix is −4e2t et (t + 4)et 0 −et Φ(t) = e2t 2t t −2e e (t + 1)et and the general solution is, xc (t) = c1 v 1 e2t + c2 v 2 et + c3 (tv 2 + v 3 )et a Example with deficit 1) Find the solution 2.6. (One eigenvalue 3 0 1 2 to x0 (t) = 2 1 1 x(t) and x(0) = 3 −4 0 −1 −4 Solution Using Mathcad , functions eigenvals() (Notice the eigenvecs() will not find a good result in this case due to the rounding error.) we find, λ0 = 1 is the only eigenvalue. To find the associate eigenvectors we compute (Using (A − λ0 I)v = 0) 2 0 1 v1 (A − λ0 I)v = 2 0 1 v2 v3 −4 0 −2 2v1 + v3 2v1 + v3 = 0 −4v1 − 2v3 2. HOMOGENEOUS SYSTEM 15 We have only 2v1 + v3 = 0 for three variables v1 , v2 , v3 , this indicates 1 that v2 can be any value, and set v1 = 1 find v3 = −2, So v 1 = 0 −2 1 1 are two eigenvectors. and v 2 = −2 To find the generalize eigenvector associated with λ0 we will have to solve two equations w1 1 (A − λ0 I) w2 = 0 , w3 −2 and From (2.2), w1 1 (A − λ0 I) w2 = 1 , w3 −2 · ¸ 2 0 1 1 2 0 1 w1 = 0 , w2 −4 0 −2 −2 we get two inconsistent equations 2w1 + w3 = 1 and 2w1 + w3 = 0. So now solution can be found in this case. From (2.2), · ¸ 2 0 1 1 2 0 1 w1 = 1 , w2 −4 0 −2 −2 we get one equation 2w1 + w3 = 1 choose w3= 1 we get w1 = 0, since 0 w2 can be anything, we set w2 = 1. So v 3 = 1 and we can verify 1 that v 1 , v 2 , and v 3 are linearly independent. So the fundamental matrix is 1 1 t 1 t+1 Φ(t) = et 0 −2 −2 −2t + 1 and the general solution is, xc (t) = [c1 v 1 + c2 v 2 + c3 (tv 2 + v 3 )]et 16 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS 1 1 0 1 Now, Φ(0) = −2 −2 Hence, the particular 0 2 −1 1 and Φ(0)-1 3 = 3 . 1 −4 0 t solution is x(t) = [v 1 + 3v 2 ]e a Example 2.7. (One eigenvalue with deficit 2) Find the general 2 1 0 solution to x0 (t) = 1 4 1 x(t). 2 −2 3 Solution Using Mathcad , functions eigenvals() (Notice the eigenvecs() will not find a good result in this case due to the rounding error.) we find, λ0 = 3 is the only eigenvalue. To find the associate eigenvectors we compute (Using (A − λ0 I)v = 0) −1 1 0 v1 1 1 v2 (A − 3I)v = 1 2 −2 0 v3 −v1 + v2 + v3 v1 + v2 + v3 = 0 2v1 − 2v2 1 We have only one eigenvector v 1 = 1 . −2 To find the generalize eigenvector associated with λ0 we will have to solve two equations (A − 3I)v 2 = v 1 , and (A − 3I)v 3 = v 2 , From (2.2), −1 1 0 a 1 1 1 1 b = 1 , 2 −2 0 c −2 we have two equations ½ b−a = 1 a+b+c=1 0 Choosing a = 0, we get b = 1, c = 0. Hence v 2 = 1 0 2. HOMOGENEOUS SYSTEM 17 From (2.2), −1 1 0 a 0 1 1 1 b = 1 , 2 −2 0 c 0 we have two equations ½ b−a = 0 a+b+c=1 0 Choosing a = 0, we get b = 0, c = 1. So v 3 = 0 and we can verify 1 that v 1 , v 2 , and v 3 are linearly independent. So the fundamental matrix is 1 t t2 t2 + t Φ(t) = et 1 1 + t −2 −2t −2t2 + 1 and the general solution is, xc (t) = [c1 v 1 + c2 (tv 1 + v 2 ) + c3 (t2 v 1 + tv 2 + v 3 )]e3t a Example 2.8. (Two conjugate complex eigenvalues case) 1 −1 3 Find the general solution to x0 (t) = 2 0 3 x(t) 1 0 1 Solution Using Mathcad , functions eigenvals() and eigenvecs() we find two conjugate√complex eigenvalues and √ one real eigenvalue, λ1 = 1, λ2 = 12 + i 12 19, and λ3 = 12 − i 12 19 with associ √ 1 0 1 + i √19 ated eigenvector v 1 = 1 and v = −2 + i 19 = −2 + 2 1 2 √ √ 19 i 19 with respect to λ3 . Compare this with the Theorem 1.3, 0 18 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS we have a = 21 , b = √ 1 2 1 19, v 2 = −2 (real part of v), and v 3 = 2 √ √ 19 19 (imaginary part of v). 0 The general solution is, 1 1 1√ 1√ 1√ 1√ xc (t) = c1 v 1 et +c2 (v 2 cos( 19)−v 3 sin( 19))e 2 t +c3 (v 2 sin( 19)+v 3 cos( 19))e 2 t 2 2 2 2 a 3. Nonhomogeneous System of Equations To find solutions to the initial value problem of nonhomogeneous equations x0 (t) = Ax(t) + b(t), x(t0 ) = x0 we follow the steps below, (1) Find the general solution xc (t) = Φ(t)c to homogeneous equation x0 (t) = Ax(t), where Φ(t) is the fundamental matrix. (2) Find a particular solution xp to x0 (t) = Ax(t) (3) The general solution to the nonhomogeneous equation x0 (t) = Ax(t) is x(t) = xc (t) + xp (t). Using x(t0 ) = x0 to determine the coefficient vector c. The following theorem gives one way to find a particular solution based on the fundamental matrix, Theorem 3.1. Let Φ(t) be a fundamental matrix of x0 (t) = Ax(t), a particular solution to x0 (t) = Ax(t) + b(t) is given by Z xp (t) = Φ(t) Φ(t)-1 b(t) dt. Example 3.1. Find the general solution to x01 = 3x1 + 4x2 − 2x3 + t2 x02 = 2x1 + x2 − 4x3 x03 = x1 + 2x2 − t2 Solution x1 (t) 3 4 −2 Let x(t) = x2 (t) , A = 2 1 −4 , and x3 (t) 1 2 0 t2 b(t) = 0 . The equations can be written in matrix form x0 (t) = −t2 3. NONHOMOGENEOUS SYSTEM OF EQUATIONS 19 Ax(t)+b(t). From Example 2.5, we know that the fundamental matrix to x(t) = Ax(t) is −4e2t et (t + 4)et 0 −et Φ(t) = e2t 2t t −2e e (t + 1)et − 52 t2 e−2t t2 )e−t To find a particular solution, we first compute Φ-1 (t)b(t) = −( 52 t3 + 11 5 2 2 −t te 5 then we compute R 2 2 −2t − t e dt 5 R R t2 )e−t dt Φ(t) Φ-1 (t)b(t) dt = Φ(t) −( 25Rt3 + 11 5 2 2 −t t e dt 5 1 2 16 t + 2t + 5 5 7 . = − 51 t2 − 35 t − 10 9 2 24 29 t + t + 5 5 5 And so the general solution is, −4 1 x(t) = c1 1 e2t + c2 0 et −2 1! 1 2 à 16 t + 2t + 1 4 5 5 7 + c3 t 0 + −1 et + − 15 t2 − 53 t − 10 9 2 24 29 1 1 t + 5t+ 5 5 The following is a screen shot that shows how to carry out the computation in Mathcad , To use Mathcad , (1) Define fundamental matrix A(t) and b(t) in the same line (not as shown in graph), and compute in the next line A−1 b(t) (2) type A(t)*[Ctrl][M] choose column as 1, at each place holder, type [Ctrl][I] to get the indefinite integral, (3) and put the corresponding entry of A−1 b(t) in the integrant position. (4) press [Shift][Ctrl][.] type key work simplify a 20 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS Theorem 3.2. for x0 (t) = Ax(t), R -1If Φ(t) is the fundamental matrix 1 , and xp (t) = Φ (t)b(t) dt, then x(t) = Φ(t)Φ (t0 )(x0 − xp (t0 )) + xp (t) is the solution to the nonhomogeneous initial value problem, x0 (t) = Ax(t) + b(t), x(t0 ) = x0 · ¸ 2 −3 0 Example 3.2. Find the solution to x (t) = x(t) + 3 8 · ¸ · ¸ e2t 2 and x(0) = −2e2t 1 Solution From Example 2.3 is the fundamental matrix is · ¸ −3 −3t + 1 5t Φ(t) = e 3 3t ¸ · 0 −1 1 1 and Φ(0) = 3 . −3 −3 · ¸ R e2t Now b(t) = , using the formula xp (t) = Φ(t) Φ-1 (t)b(t) dt 2t −2e · ¸ 0 and Mathcad , we have xp (t) = 1 2t e 3 Therefore, ¸ · ¸Ã· ¸ · ¸! · 1 0 0 −1 2 − 32 1 Φ(0) (x(0) − xp (0)) = . − 1 = 1 −8 3 −3 −3 3 and the solution is x(t) = Φ(t)Φ(0)-1 (x(0) − xp (0)) + xp (t) = e5t · 24t − 6 −24t − 2 + 31 e−3t ¸ a 4. Higher order differential equations One can transform equations that involving higher order derivatives of unknown functions to system of first order equations. For example, suppose x(t) is an unknown scalar function that satisfies mx00 (t) + cx0 (t) + kx(t) = f (t) an equation can be used to model a spring system with external force f (t) or an RCL electronic circuit with an energy source f (t). 4. HIGHER ORDER DIFFERENTIAL EQUATIONS 21 Now if we set x1 (t) = x(t) and x2 (t) = x0 (t) we then get an system of first order equations x01 (t) = x2 (t) c k f (t) (6) x02 (t) = − x2 (t) − x1 (t) + m m m In general, if we have an differential equation that involving nth order derivative x(n) (t) of unknown function x(t), (5) x(n) = a0 x(t) + a1 x0 (t) + · · · + an−1 x(n−1) + f (t), we can transform it into an system of first order equations of n unknown functions x1 (t) = x(t), x2 (t) = x0 (t), x3 (t) = x(2) (t), · · · , xn (t) = x(n−1) (t), and using the eigenvalue method for system of differential equation to solve the higher order equation. Example 4.1. Transform the differential equation x(3) + 3x(2) − 7x (t) − 9x = sin(t) into system of first order equations. 0 Solution Here the highest order of derivative is third derivative x(3) of x(t). So we transfer it into system of 3 equations. Let x1 (t) = x(t), x2 (t) = x0 (t), x3 (t) = x00 (t), we have x01 (t) = x2 (t) x02 (t) = x3 (t) x03 (t) = −3x3 (t) + 7x2 (t) + 9x1 (t) − sin(t) x1 (t) 1 0 0 0 Let x(t) = x2 (t) , A = 0 1 0 , and b(t) = 0 x3 (t) 9 7 −3 f (t) we can write the system of equation in matrix form x0 (t) = Ax(t) + b(t). a (7) (8) (9) Example 4.2. Find the general solution for the 3rd order differential equation x(3) + 3x(2) − 7x0 (t) − 9x = sin(t). From previousexample, Example 4.1, Solution Let x(t) = x1 (t) 1 0 0 0 x2 (t) , A = 0 1 0 , and b(t) = 0 we can write x3 (t) 9 7 −3 f (t) the system of equation in matrix form x0 (t) = Ax(t) + b(t). √ Using Mathcad we find the eigenvalues are λ1 =−1, λ + 10, λ3 = 2 = −1 1√ 1 √ −1− 10 with associate eigenvectors, v 1 = −1 , v 2 = −1 + √10 , 1 11 − 2 10 22 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS 1√ and v 3 = −1 − √10 respectively (after multiply the results of 11 + 2 10 Mathcad by some constants). So the fundamental matrix is √ √ −t (−1+ 10)t (1+ 10)t e e e√ √ √ √ Φ(t) = −e−t (−1 + 10)e(−1+ √10)t −(1 + 10)e(1+ √10)t √ √ e−t (11 − 2 10)e(−1+ 10)t (11 + 2 10)e(1+ 10)t From Φ(t) we find a particular solution 3 5 Z cos(t) − 39 sin(t) 52 1 35 cos(t) − 156 sin(t) xp (t) = Φ(t) Φ-1 (t)b(t) dt = 26 3 8 − 52 cos(t) − 39 sin(t) Hence the general solution to the system is x1 (t) x2 (t) = x (t) √ √ 3 −t (−1+ 10)t (1+ 10)t 3 5 c1 e + c2 e + c3 e + 52 cos(t) − 39 sin(t) √ √ √ √ −c1 e−t + c2 (−1 + 10e(−1+ 10)t − c3 (1 + 10)e(1+ 10)t + 1 cos(t) − 35 sin(t) 26 156 √ √ √ √ 3 8 c1 e−t + c2 (11 − 2 10)e(−1+ 10)t + c3 (11 + 2 10)e(1+ 10)t − 52 cos(t) − 39 sin(t) √ √ 3 5 and x1 (t) = c1 e−1t + c2 e(−1+ 10)t + c3 e(1+ 10)t + 52 cos(t) − 39 sin(t) is the general solution to the third order ordinary differential equation x(3) + 3x(2) − 7x0 (t) − 9x = sin(t) . a Example 4.3. Find the solution to the initial value problem x00 − 10x0 + 9x = tet , x(0) = 1, x0 (0) = −1. Solution Since the given equation is of second order, we will have two unknowns x1 (t) = x(t), x2 (t) = x0 (t) to transform the equation into a system of first order equations, x01 (t) = x2 x02 (t) = 10x2 − 9x1 + tet , and the initial conditions are¸ x1 (0) =·x(0) = 1 ¸x2 (0) = x0 (0) = · · −1. ¸ x1 (t) 0 1 0 Now let x(t) = ,A= , and b(t) = . x2 (t) −9 10 tet We have the matrix version of this equation, x0 (t) = Ax(t) + b(t) 4. HIGHER ORDER DIFFERENTIAL EQUATIONS 23 Using Mathcad , we find· the ¸eigenvalues · λ1¸ = 1, λ1 = 9, and 1 1 associate eigenvectors v 1 = , v2 = . And fundamental 1 9 · t ¸ e e9t matrix Φ(t) = . et 9e9t From Φ(t) we find a particular solution ¸ · Z 1 (32t2 + 8t + 1)et − 512 1 xp (t) = Φ(t) Φ (t)b(t) dt = 1 − 512 (32t2 + 72t + 9)et · ¸ 1 The solution with initial values x0 = is given by −1 -1 x(t) = Φ(t)Φ µ (0)(x0 − b(0)) +¶b(t) 1 639 127 9t 1 2 t − 16 t − 64 t + 512 e − 512 e . µ ¶ = 1 2 9 631 1143 − 16 t − 64 t + 512 et − 512 e9t Hence the solution to the initial value µ problem of the¶second order 1 2 1 639 differential equation is x(t) = x1 (t) = − 16 t − 64 t + 512 et − 127 e9t . a 512 Project At beginning you should enter: Project title, your name, ss#, and due date in the following format Project One: Define and Graph Functions John Doe SS# 000-00-0000 Due: Mon. Nov. 23rd, 2003 You should format the text region so that the color of text is different than math expression. You can choose color for text from Format– >Style select normal and click modify, then change the settings for font. You can do this for headings etc. (1) Solutions To System of Equations Finding solution to linear system using Mathcad and study the long time dynamic behavior of the solutions. • Find general solution to ½ 0 x = −y y0 = x 24 1. SYSTEM OF FIRST ORDER DIFFERENTIAL EQUATIONS Plot several solutions with different initial values in [-] xt-plane, yt-plane xy-plane. Here you will need to define range variable t = 0, 0.1 · · · 7 and set X := x(t), Y := y(t). The graph in xy-plane is called the trajectory. If this models the movement of a satellite, what is its trajectory. • Find general solution to ½ 0 x = −8y y 0 = 18x Plot several solutions with different initial values in [-] xt-plane, yt-plane xy-plane. Here you will need to define range variable t = 0, 0.1 · · · 7 and set X := x(t), Y := y(t). The graph in xy-plane is called the trajectory. If this models the movement of a satellite, what is its trajectory. • Find general solution to ½ 0 x = 2x − y y 0 = y − 3x Plot several solutions with different initial values in [-] xt-plane, yt-plane xy-plane. Here you will need to define range variable t = 0, 0.1 · · · 7 and set X := x(t), Y := y(t). The graph in xy-plane is called the trajectory. If this models the movement of a system of two species, what is you conclusion about interdependency of these species? Can you find initial value such that x(t) = 0 (distinct) for some t? what about y(t). (2) Solution of Higher order equation In general mx00 + cx0 + kx = f (t) models a object with mass m attached to a spring with constant k and damping force that is proportional to the velocity x0 , c ≥ 0, k > 0. Suppose m = 1 and f (t) = Ae−at sin(bt), that is the external force is oscillatory (b > 0) and diminishing (a > 0) Find solutions and graph the solutions. - c = b = 0 Find general solution and graph some particular solutions. - c = 20, k = 10, a = 0, b = 41 , A = 1 √ - c = 2, k = 3, A = 100, a = 2, b = 2