Linear Systems of Differential Equations
CS 130: Mathematical Methods in Computer Science Ordinary Differential Equations Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University of the Philippines, Diliman nshernandez@dcs.upd.edu.ph Day 17
Linear Systems of Differential Equations
Ordinary Differential Equations
Linear Systems of Differential Equations First-Order Homogeneous Systems
Linear Systems of Differential Equations
First-Order Systems
Linear Systems of Differential Equations
First-Order Systems first-order ODE
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2 higher-order ODE
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2 higher-order ODE ⇒ ex: y 00 + 2y 0 − y = ex
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2 higher-order ODE ⇒ ex: y 00 + 2y 0 − y = ex if we let u = y 0 , we have u0 + 2u − y = ex
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2 higher-order ODE ⇒ ex: y 00 + 2y 0 − y = ex if we let u = y 0 , we have u0 + 2u − y = ex That is, y 00 + 2y 0 − y = ex is replaced by the linear system y0 = u u0 = y − 2u + ex
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2 higher-order ODE ⇒ ex: y 00 + 2y 0 − y = ex if we let u = y 0 , we have u0 + 2u − y = ex That is, y 00 + 2y 0 − y = ex is replaced by the linear system y0 = u u0 = y − 2u + ex ⇒ ex: y 000 + 2y 00 − y 0 + 3y = x
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2 higher-order ODE ⇒ ex: y 00 + 2y 0 − y = ex if we let u = y 0 , we have u0 + 2u − y = ex That is, y 00 + 2y 0 − y = ex is replaced by the linear system y0 = u u0 = y − 2u + ex ⇒ ex: y 000 + 2y 00 − y 0 + 3y = x if we let u = y 0 and v = u0 = y 00 ,
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2 higher-order ODE ⇒ ex: y 00 + 2y 0 − y = ex if we let u = y 0 , we have u0 + 2u − y = ex That is, y 00 + 2y 0 − y = ex is replaced by the linear system y0 = u u0 = y − 2u + ex ⇒ ex: y 000 + 2y 00 − y 0 + 3y = x if we let u = y 0 and v = u0 = y 00 , we have v 0 + 2v − u − 3y = x
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2 higher-order ODE ⇒ ex: y 00 + 2y 0 − y = ex if we let u = y 0 , we have u0 + 2u − y = ex That is, y 00 + 2y 0 − y = ex is replaced by the linear system y0 = u u0 = y − 2u + ex ⇒ ex: y 000 + 2y 00 − y 0 + 3y = x if we let u = y 0 and v = u0 = y 00 , we have v 0 + 2v − u − 3y = x That is, y 000 + 2y 00 − y 0 + 3y = x is replaced by the linear system y0 = u u0 = v 0 v = 3y + u − 2v + x
Linear Systems of Differential Equations
First-Order Systems first-order ODE ⇒ ex: y 0 − y = 2 higher-order ODE ⇒ ex: y 00 + 2y 0 − y = ex if we let u = y 0 , we have u0 + 2u − y = ex That is, y 00 + 2y 0 − y = ex is replaced by the linear system y0 = u u0 = y − 2u + ex ⇒ ex: y 000 + 2y 00 − y 0 + 3y = x if we let u = y 0 and v = u0 = y 00 , we have v 0 + 2v − u − 3y = x That is, y 000 + 2y 00 − y 0 + 3y = x is replaced by the linear system y0 = u u0 = v 0 v = 3y + u − 2v + x Any linear system of ODEs can be written as a first-order system.
Linear Systems of Differential Equations
Solution of a First-Order Homogeneous System with Constant Coefficients
Example dx dt dy dt
=y = −2x + 3y
Linear Systems of Differential Equations
First-Order Homogeneous Systems and Matrix Algebra
Example x0 = y y 0 = −2x + 3y
Linear Systems of Differential Equations
First-Order Homogeneous Systems and Matrix Algebra
Example x0 = y y 0 = −2x + 3y In matrix notation, we have
Linear Systems of Differential Equations
First-Order Homogeneous Systems and Matrix Algebra
Example x0 = y y 0 = −2x + 3y In matrix notation, we have X0 = AX x 0 1 where X = and A = y −2 3
Linear Systems of Differential Equations
First-Order Homogeneous Systems and Matrix Algebra
Example x0 = y y 0 = −2x + 3y In matrix notation, we have X0 = AX x 0 1 where X = and A = y −2 3 Find the eigenvalues of A and the eigenvectors associated with each eigenvalue.
Linear Systems of Differential Equations
Some Important Theorems
Theorem Let A be an n × n matrix. The vector function X(t) = eλt~v is a particular solution to the linear system of first-order differential equations given by X0 = AX if and only if ~v is an eigenvector of A with corresponding eigenvalue λ.
Linear Systems of Differential Equations
Some Important Theorems
Theorem Let A be an n × n matrix. The vector function X(t) = eλt~v is a particular solution to the linear system of first-order differential equations given by X0 = AX if and only if ~v is an eigenvector of A with corresponding eigenvalue λ.
Theorem If (λ1 , ~v1 ), (λ2 , ~v2 ), · · · , (λk , ~vk ) are eigenpairs of an n × n matrix A and c1 , c2 , · · · , ck are any scalars, then X(t) = c1 eλ1 t~v1 + c2 eλ2 t~v2 + · · · + ck eλk t~vk is a solution to X0 = AX.
Linear Systems of Differential Equations
... with real eigenvalues Going back to our previous example:
Example x0 = y y 0 = −2x + 3y We have X0 = AX where X =
The eigenvalues of A are 1 and 2.
x y
and A =
0 −2
1 3
Linear Systems of Differential Equations
... with real eigenvalues Going back to our previous example:
Example x0 = y y 0 = −2x + 3y We have X0 = AX where X =
x y
and A =
0 −2
The eigenvalues of A are 1 and 2. The eigenvectors associated with the eigenvalue 1 are 1 r , ∀r ∈ R \ {0} . 1
1 3
Linear Systems of Differential Equations
... with real eigenvalues Going back to our previous example:
Example x0 = y y 0 = −2x + 3y We have X0 = AX where X =
x y
and A =
0 −2
The eigenvalues of A are 1 and 2. The eigenvectors associated with the eigenvalue 1 are 1 r , ∀r ∈ R \ {0} . 1 The eigenvectors associated with the eigenvalue 2 are 1 r , ∀r ∈ R \ {0} . 2
1 3
Linear Systems of Differential Equations
... with real eigenvalues Going back to our previous example:
Example x0 = y y 0 = −2x + 3y We have X0 = AX where X =
x y
and A =
0 −2
The eigenvalues of A are 1 and 2. The eigenvectors associated with the eigenvalue 1 are 1 r , ∀r ∈ R \ {0} . 1 The eigenvectors associated with the eigenvalue 2 are 1 r , ∀r ∈ R \ {0} . 2 Hence, we have
1 3
Linear Systems of Differential Equations
... with real eigenvalues Going back to our previous example:
Example x0 = y y 0 = −2x + 3y We have X0 = AX where X =
x y
and A =
0 −2
The eigenvalues of A are 1 and 2. The eigenvectors associated with the eigenvalue 1 are 1 r , ∀r ∈ R \ {0} . 1 The eigenvectors associated with the eigenvalue 2 are 1 r , ∀r ∈ R \ {0} . 2 Hence, we have X = c1 et
1 1
+ c2 e2t
1 2
1 3
Linear Systems of Differential Equations
More Examples
•
x0 y0
x0 • y0 z0
= 4x = −4x
= x = =
−
− y + 4y
y y 3y
− + +
z 3z z
Linear Systems of Differential Equations
... with complex eigenvalues
Example x0 = 2x − 5y y 0 = 2x − 4y
Linear Systems of Differential Equations
... with complex eigenvalues
Example x0 = 2x − 5y y 0 = 2x − 4y 0
X = AX where X =
x y
and A =
2 2
−5 −4
Linear Systems of Differential Equations
... with complex eigenvalues
Example x0 = 2x − 5y y 0 = 2x − 4y 0
X = AX where X =
x y
and A =
The eigenvalues of A are −1 ± i.
2 2
−5 −4
Linear Systems of Differential Equations
... with complex eigenvalues
Example x0 = 2x − 5y y 0 = 2x − 4y 0
X = AX where X =
x y
and A =
2 2
−5 −4
The eigenvalues of A are −1 Âą i. The eigenvectors associated with the eigenvalue −1 + i are 3+i r , ∀r ∈ R \ {0} . 2
Linear Systems of Differential Equations
... with complex eigenvalues
Example x0 = 2x − 5y y 0 = 2x − 4y 0
X = AX where X =
x y
and A =
2 2
−5 −4
The eigenvalues of A are −1 Âą i. The eigenvectors associated with the eigenvalue −1 + i are 3+i r , ∀r ∈ R \ {0} . 2 The eigenvectors associated with the eigenvalue −1 − i are 3−i r , ∀r ∈ R \ {0} . 2
Linear Systems of Differential Equations
... with complex eigenvalues
Example x0 = 2x − 5y y 0 = 2x − 4y 0
X = AX where X =
x y
and A =
2 2
−5 −4
The eigenvalues of A are −1 Âą i. The eigenvectors associated with the eigenvalue −1 + i are 3+i r , ∀r ∈ R \ {0} . 2 The eigenvectors associated with the eigenvalue −1 − i are 3−i r , ∀r ∈ R \ {0} . 2
Âť „ ÂŤ „ ÂŤ ff „ ÂŤ „ ÂŤ ff– 3 1 3 1 X = e−t b1 cos t − sin t + b2 sin t + cos t 2 0 2 0
Linear Systems of Differential Equations
More Examples
•
x0 y0
= 2x = −4x
•
x0 y0
= 3x + 5y = −x − y
x0 • y0 z0
= x = =
+
+ y + 2y
2y y −y
− + +
z z z
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
y
+ +
z z
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
+ +
z z
y
x 0 X0 = AX where X = y and A = 1 z 1
1 0 1
1 1 0
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
+ +
z z
y
x 0 X0 = AX where X = y and A = 1 z 1 The eigenvalues of A are 2, −1, −1.
1 0 1
1 1 0
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
+ +
z z
y
x 0 X0 = AX where X = y and A = 1 z 1
1 0 1
1 1 0
The eigenvalues of A are 2, −1, −1. The associated eigenvectors with the eigenvalue 2 are 1 r 1 , ∀r ∈ R \ {0} . 1
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
+ +
z z
y
x 0 X0 = AX where X = y and A = 1 z 1
1 0 1
1 1 0
The eigenvalues of A are 2, −1, −1. The associated eigenvectors with the eigenvalue 2 are 1 r 1 , ∀r ∈ R \ {0} . 1 1 Hence, a particular solution is X1 = 1 e2t . 1
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
+ +
z z
y
X0 = AX where X =
x y
0 and A = 1 1
1 0 1
1 1 0
The eigenvectors associated with the eigenvalue −1 are
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
+ +
z z
y
X0 = AX where X =
x y
0 and A = 1 1
1 0 1
1 1 0
Theeigenvectors associated with the eigenvalue −1 are −1 −1 r 1 + s 0 , ∀r, s ∈ R where r and s are not both 0 . 0 1
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
+ +
z z
y
X0 = AX where X =
x y
0 and A = 1 1
1 0 1
1 1 0
Theeigenvectors associated with the eigenvalue −1 are −1 −1 r 1 + s 0 , ∀r, s ∈ R where r and s are not both 0 1 Hence, we obtain 2 linearly independent particular solutions:
0 .
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
+ +
z z
y
X0 = AX where X =
x y
0 and A = 1 1
1 0 1
1 1 0
Theeigenvectors associated with the eigenvalue −1 are −1 −1 r 1 + s 0 , ∀r, s ∈ R where r and s are not both 0 1 Hence,we obtain 2 linearly independent particular solutions: −1 −1 X2 = 1 e−t and X3 = 0 e−t 0 1
0 .
Linear Systems of Differential Equations
... with repeated eigenvalues
Example x0 y0 z0
= = =
y x x +
+ +
z z
y
X0 = AX where X =
x y
0 and A = 1 1
1 0 1
1 1 0
Theeigenvectors associated with the eigenvalue −1 are −1 −1 r 1 + s 0 , ∀r, s ∈ R where r and s are not both 0 1 Hence,we obtain 2 linearly independent particular solutions: −1 −1 X2 = 1 e−t and X3 = 0 e−t 0 1 X = c1 X1 + c2 X2 + c3 X3
0 .
Linear Systems of Differential Equations
... with repeated eigenvalues Now, let us try this:
Example x0 = y y 0 = −4x + 4y
Linear Systems of Differential Equations
... with repeated eigenvalues Now, let us try this:
Example x0 = y y 0 = −4x + 4y 0
X = AX where X =
x y
and A =
0 −4
1 4
Linear Systems of Differential Equations
... with repeated eigenvalues Now, let us try this:
Example x0 = y y 0 = −4x + 4y
x 0 X = AX where X = and A = y −4 The eigenvalues of A are 2, 2. 0
1 4
Linear Systems of Differential Equations
... with repeated eigenvalues Now, let us try this:
Example x0 = y y 0 = −4x + 4y
x 0 1 X = AX where X = and A = y −4 4 The eigenvalues of A are 2, 2. The eigenvectors associated with the eigenvalue 2 are 1 r , ∀r ∈ R \ {0} . 2 0
Linear Systems of Differential Equations
... with repeated eigenvalues Now, let us try this:
Example x0 = y y 0 = −4x + 4y
x 0 1 X = AX where X = and A = y −4 4 The eigenvalues of A are 2, 2. The eigenvectors associated with the eigenvalue 2 are 1 r , ∀r ∈ R \ {0} . 2 1 Hence, a particular solution is X1 = e2t . 2 0
Linear Systems of Differential Equations
... with repeated eigenvalues Now, let us try this:
Example x0 = y y 0 = −4x + 4y
x 0 1 X = AX where X = and A = y −4 4 The eigenvalues of A are 2, 2. The eigenvectors associated with the eigenvalue 2 are 1 r , ∀r ∈ R \ {0} . 2 1 Hence, a particular solution is X1 = e2t . 2 But we need another particular solution that is linearly independent from X1 0
Linear Systems of Differential Equations
... with repeated eigenvalues Now, let us try this:
Example x0 = y y 0 = −4x + 4y
x 0 1 X = AX where X = and A = y −4 4 The eigenvalues of A are 2, 2. The eigenvectors associated with the eigenvalue 2 are 1 r , ∀r ∈ R \ {0} . 2 1 Hence, a particular solution is X1 = e2t . 2 But we need another particular solution that is linearly independent from X1 ... how do we find such a solution??? 0
Linear Systems of Differential Equations
... with repeated eigenvalues Now, let us try this:
Example x0 = y y 0 = −4x + 4y
x 0 1 X = AX where X = and A = y −4 4 The eigenvalues of A are 2, 2. The eigenvectors associated with the eigenvalue 2 are 1 r , ∀r ∈ R \ {0} . 2 1 Hence, a particular solution is X1 = e2t . 2 But we need another particular solution that is linearly independent from X we find 1 ... how do such a solution??? 1 0 2t X2 = te + e2t 2 1 0
Linear Systems of Differential Equations
... with repeated eigenvalues Now, let us try this:
Example x0 = y y 0 = −4x + 4y
x 0 1 X = AX where X = and A = y −4 4 The eigenvalues of A are 2, 2. The eigenvectors associated with the eigenvalue 2 are 1 r , ∀r ∈ R \ {0} . 2 1 Hence, a particular solution is X1 = e2t . 2 But we need another particular solution that is linearly independent from X we find 1 ... how do such a solution??? 1 0 2t X2 = te + e2t 2 1 0
X = c1 X 1 + c2 X 2
Linear Systems of Differential Equations
More Examples
•
x0 y0
= =
•
x0 y0
= 4x = −4x
8x 4x
x0 • y0 z0
= z = y = x
x0 • y0 z0
= = =
4x
− +
y 12y
+ +
+
y 8y
y 4y
+
z 4z
Linear Systems of Differential Equations
Exercises Find the general solution of the given homogeneous system X 0 = AX where A is :
1 1 −1 0 1. 0 2 0 1 −1 3 −1 −1 1 −1 2. 1 1 −1 1 0 0 1 3. 0 0 −1 0 1 0 5 −4 0 0 2 4. 1 0 2 5
Linear Systems of Differential Equations
Questions? See you next meeting!