0% found this document useful (0 votes)
4 views67 pages

Chapter9Notes

Uploaded by

mikehoward283
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views67 pages

Chapter9Notes

Uploaded by

mikehoward283
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Matrix Methods for Linear Di↵erential System | §9.1, §9.

4 1

Aim
• All the linear di↵erential equations and systems of any order can be converted into a (large) 1st order di↵erential system.

Vectors, matrices and operations


✓ ◆ ✓ ◆
v1 u1
• Let v = and u = be vectors.
v2 u2
• We use 2 ⇥ 1 vectors for simplicity, but could easily use n ⇥ 1
• We can add vectors using component-wise addition
✓ ◆ ✓ ◆ ✓ ◆
v1 u1 u1 + v 1
v+u= + =
v2 u2 u2 + v 2
• We can scale vectors: Let ↵ be a real number. Then
✓ ◆ ✓ ◆
v1 ↵v1
↵v = ↵ =
v2 ↵v2
• We can ‘multiply’ vectors with a dot product (as in calc 3)
✓ ◆ ✓ ◆
v1 u1
u·v = · = u1 v 1 + u2 v 2
v2 u2
• We don’t generally use ‘cross product’ in linear algebra
0 1
w1
• Consider also w = @ w2 A. Note that w + u and w · u do not make mathematical sense
w3

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Matrix Methods for Linear Di↵erential System | §9.1, §9.4 2
✓ ◆ ✓ ◆
a11 a12 b11 b12
• Let A = and B = be 2 ⇥ 2 matrices
a21 a22 b21 b22
• We use 2 ⇥ 2 matrices for simplicity, but could easily use n ⇥ n (we will deal with square matrices
in general)
• We can add matrices by adding componentwise
✓ ◆ ✓ ◆ ✓ ◆
a11 a12 b11 b12 a11 + b11 a12 + b12
A+B = + =
a21 a22 b21 b22 a21 + b21 a22 + b22

• We can scale matrices: Let ↵ be a real number. Then


✓ ◆ ✓ ◆
a11 a12 ↵a11 ↵a12
↵A = ↵A = =
a21 a22 ↵a21 ↵a22

• We can multiply matrices in the following way:


– Square matrices A and B must be same size, or doesn’t make sense
– For C = AB, cij = (row i of A) · (col j of B)
– That is,
✓ ◆✓ ◆ ✓ ◆
a11 a12 b11 b12 a11b11 + a12b21 a11b12 + a12b22
AB = =
a21 a22 b21 b22 a21b11 + a22b21 a21b12 + a22b22
• Example ✓ ◆✓ ◆ ✓ ◆ ✓ ◆
1 2 5 6 1·5+2·7 1·6+2·8 19 22
= =
3 4 7 8 3·5+4·7 3·6+4·8 43 50

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Matrix Methods for Linear Di↵erential System | §9.1, §9.4 3
• Matrix vector multiplication just like matrix matrix multiplication, but just one column to work
on ✓ ◆✓ ◆ ✓ ◆
a11 a12 x1 a11x1 + a12x2
Ax = =
a21 a22 x2 a21x1 + a22x2
• Example ✓ ◆✓ ◆ ✓ ◆ ✓ ◆
1 2 5 1·5+2·7 19
= =
3 4 7 3·5+4·7 43
• Matlab easily can do any of these operations

>> A = [1,3;5 6]

A =

1 3
5 6

>> B = [2 4;6 8]

B =

2 4
6 8

>> A+B

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Matrix Methods for Linear Di↵erential System | §9.1, §9.4 4

ans =

3 7
11 14

>> A*B

ans =

20 28
46 68

>> 5*A - 3*B + A*B

ans =

19 31
53 74

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Matrix Methods for Linear Di↵erential System | §9.1, §9.4 5
In-class activity

• Define A, B, x by ✓ ◆ ✓ ◆ ✓ ◆
1 0 1 2 1
A= , B= , x=
3 4 2 5 4
– Calculate by hand AB, Ax, and show that (A + B)x = Ax + Bx by calculating both sides of
the equality
• Define A, x by 0 1 0 1
1 0 0 1
A = @ 3 4 1 A, x = @ 4 A
1 1 2 5
– Calculate by hand Ax
• Check your answers above using Matlab

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Matrix Methods for Linear Di↵erential System | §9.1, §9.4 6
1st Order Di↵erential System

For two unknown functions, x(t) and y(t), consider a 1st order di↵erential system:
( ✓ ◆0 ✓ ◆✓ ◆
x0 = 4x + 2y, x 4 2 x
, = in a matrix form.
y 0 = 4x 4y. y 4 4 y
| {z } | {z } | {z }
x0 A x

Example 1. Express the following di↵erential system into a matrix form:


8 0
>
> x1 = 2x1 + t2x2 + (4t + et)x4 = 2x1 + (t2)x2 + 0 · x3 + (4t + et)x4,
>
<x0 = (sin t)x + (cos t)x = 0 · x + (sin t)x + (cos t)x + 0 · x ,
2 2 3 1 2 3 4
>
> x03 = x1 + x2 + x3 + x4 = 1 · x1 + 1 · x2 + 1 · x3 + 1 · x4,
>
: 0
x4 = 0 = 0 · x1 + 0 · x2 + 0 · x3 + 0 · x4 .
0 10 0 10 1
2 t
x1 2 t 0 4t + e x1
B C B CB C
B x2 C B 0 sin t cos t 0 C B x2 C
,B C =B CB C,
@ x3 A @ 1 1 1 1 A @ x3 A
x4 0 0 0 0 x4
| {z } | {z } | {z }
x0 A x

which is a 1st order homogeneous linear di↵erential system.

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Matrix Methods for Linear Di↵erential System | §9.1, §9.4 7

Example 2. Express a second order di↵erential equation, my 00 + by 0 + ky = Fext(t), into a matrix


form:

Solution. We need a second variable: Conventionally, we pick v(t) := y 0(t). Then


b k Fext(t)
y 00 +b |{z}
m |{z} y 0 +ky = Fext(t) ) v 0 = v y+ .
m m m
=v 0 =v

So we get a 1st order linear di↵erential system, which is nonhomogeneous:


8 0
<y = v = 0 · y + 1 · v + 0, ✓ ◆0 ✓ ◆✓ ◆ ✓ ◆
y 0 1 y 0
Fext , = + Fext(t) . ⇤
:v0 = k y b
v+ , v k b
v
m m m | {z } | m{z m } | {z } | {z m }
0 x A x f (t)

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Matrix Methods for Linear Di↵erential System | §9.1, §9.4 8

Example 3. Express the following di↵erential system (originated from a coupled mass-spring system),
(
m1x00 + (k1 + k2)x k2y = 0,
with x(0) = x0, y(0) = y0, x0(0) = v0, y 0(0) = w0 into a matrix form.
m2y 00 k2x + k2y = 0,

Solution. Let x1 := x, x2 := x0, x3 := y, x4 := y 0. Then


k1 + k2 k2
m1x00 + (k1 + k2)x k2y = 0 ) m1x02 + (k1 + k2)x1 k2 x 3 = 0 ) x02 = x1 + x3 ,
m1 m1
k2 k2
m2y 00 k2x + k2y = 0 ) m2x04 k2 x 1 + k2 x 3 = 0 ) x04 = x1 x3 .
m2 m2
Also, keep x01 = x2 and x03 = x4 in mind.
Then we get the following homogeneous linear di↵erential system:
0 10 0 10 1 0 1 0 1 0 1
x1 0 1 0 0 x1 x1(0) x(0) x0
B C B k1+k2 0 k2 0 C B C B C B 0 C B C
B x2 C B m1 m1 C B x2 C B x2(0) C B x (0) C B v0 C
B C =B CB C with B C=B C=B C.
@ x3 A @ 0 0 0 1 A @ x3 A @ x3(0) A @ y(0) A @ y0 A
k2 k2 0
x4 m2 0 m2 0 x 4 x 4 (0) y (0) w0
| {z } | {z } | {z } | {z }
x0 A x x(0)

X So our target problem is the 1st order linear di↵erential system given by
x0 = A(t)x + f (t) with x(0) = x0,
where A(t) is a matrix function and f (t) is a vector function. This form is called a normal form.

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Matrix Methods for Linear Di↵erential System | §9.1, §9.4 9

• If f (t) = 0, then it is called homogeneous.


• If A(t) = A is independent of t, then it is called constant-coefficients.

X Any linear di↵erential equations of any order can be converted into this form by introducing sec-
ondary variables (velocity, acceleration, etc.)

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Matrix Methods for Linear Di↵erential System | §9.1, §9.4 10
In-class activity
• Write the following ODE as a first order system
y 00 + ty 0 + 5y = t

• Write the following ODE system as a first order system


y 00 + ty 0 + 5y = tx
x00 + y 0 + 2x0 + t2x = sin(t)

MATH 2080 | Introduction to Di↵erential Equations | Spring 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 1

Aim
• Learn some linear algebra tools for 2 × 2 matrices; determinant, trace, inverse

Review of Matrices
 
a b
Let A be a 2 × 2 matrix, i.e., A = .
c d
• The determinant of A:
a b
det(A) = |A| = = ad − bc
c d

• The trace of A:
tr(A) = a + d

 
1 0
• The identity matrix I =
0 1
AI = IA = A for any square matrix A (of the same size as A)
    
1 0 a11 a12 a11 a12
=
0 1 a21 a22 a21 a22
Ix = x     
1 0 x1 x1
=
0 1 x2 x2

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 2
 
1 0
• The inverse of A: A−1 such that AA−1 = A−1A = I = .
0 1
 −1    
a b 1 d −b 1 d −b
A−1 = = = .
c d |A| −c a ad − bc −c a
– No easy formulas for A−1 for general matrices (actually in general for larger matrices one should
avoid calculating A−1 altogether, as there are better ways to do whatever you are trying to do
with A−1 - but let’s leave that for your linear algebra or numerical methods courses
– We are going to stick with 2 × 2 case, so this is all we need for now
    
1 0 x 1 x 1
• Key point: Can use A−1 to solve equations. Since Ix = = = x,
0 1 x2 x2
Ax = b =⇒ A−1Ax = A−1b =⇒ Ix = A−1b =⇒ x = A−1b

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 3

• A is nonsingular (or invertible) if and only if


   
0 0
∃A−1 ⇔ |A| = 6 0 ⇔ Ax = has only x =
0 0
⇔ Ax = b has a unique solution for any vector b

• A is singular (or not invertible) if and only if


 
0
@A−1 ⇔ |A| = 0 ⇔ Ax = has nonzero solutions
0
⇔ Ax = b has either no solution or many solutions
⇔ a row of A is a linear combination of other rows of A
 
d −b
– Since by definition A−1 1
= |A| , if |A| = 0, the expression for A−1 is not defined
−c a

 
a(t) b(t)
• If A consists of differentiable functions, A(t) = , we can differentiate or integrate
c(t) d(t)
A(t):
0 0
 
a b
A0 = ,
c0 d0
Z R R 
a(t) dt b(t) dt
A(t) dt = R R .
c(t) dt d(t) dt

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 4
Examples
 
1 2
1. A = 1 is singular(not invertible) or nonsingular(invertible)?
2 1

1
|A| = 1 · 1 − 2 · = 0 ⇒ A is singular ⇒ @A−1.
2
 
1 1
2. B = 1 is singular or nonsingular?
2 1

1 1
|B| = 1 · 1 − 1 · = 6= 0 ⇒ B is nonsingular (invertible) ⇒ ∃B −1.
2 2
3. The inverse of B
 −1      
1 1 1 1 −1 1 1 −1 2 −2
B −1 = 1 = = = .
2 1 |B| − 12 1 1
2
− 12 1 −1 2
Note we can check if this is correct since B −1B = I, so we can calculate
    
2 −2 1 1 1 0
1 =
−1 2 2 1 0 1
and so we do get back I from B −1B.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 5
4. AB = BA?
1 · 1 + 2 · 12 1 · 1 + 2 · 1
      
1 2 1 1 2 3
AB = 1 1 = 1 1 1 = ,
2 1 2 1 2 ·1+1· 2 2 ·1+1·1 1 32
1 · 1 + 1 · 12 1 · 2 + 1 · 1 3
      
1 1 1 2 2 3
BA = 1 1 = 1 1 1 = .
2 1 2 1 2 ·1+1· 2 2 ·2+1·1 1 2
In general, AB 6= BA, i.e. matrix multiplication does not commute. There are some exceptions,
e.g. IA = AI where I is identity, but in general you cannot expect this to be true.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 6

Example. Convert the following in a normal form (recall normal form is x0 = Ax + f )


(
a1x0 + a2x + a3y 0 + a4y = f1(t)
a5x0 + a6x + a7y 0 + a8y = f2(t)
Notice we can write this with vectors and matrices as follows
  0      
a1 a3 x a2 a4 x f1(t)
+ =
a5 a7 y0 a6 a8 y f2(t)
       
a1 a3 a2 a4 f1(t) x
• Defining B = ,C= ,f = , and x = , the equation can be
a5 a7 a6 a8 f2(t) y
written in matrix-vector form as
Bx0 + Cx = f
• This is not quite in normal form, since there is a matrix multiplying x0.
• Assuming B −1 exists, we can fix this by multiplying both sides of the equation by B −1 to get
x0 + B −1Cx = B −1f
which now fits the normal form, with matrix B −1C and right hand side vector B −1f .
• As an aside, if B −1 did not exist, then you would need to first reduce / rewrite the equations in a
different way, and then solve - which actually could be done with no major problems, since row 1
of B is a multiple of row 2 of B, one could appropriately add the original 2 equations to eliminate
all derivatives, solve for x in terms of y (or vice versa), then plug in to get an 1st order equation in
just 1 variable.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 7
Linear System and Matrix Equation

• We can use A−1 to solve many linear systems / matrix equations Ax = b


(
3x − y = 8
    
3 −1 x 8
• ⇒ =
x + 2y = 5 1 2 y 5
| {z } | {z } | {z }
A x b
        
x 1 2 1 8 1 16 + 5 3
= x = A−1b = = = ⇒ x = 3, y = 1.
y 3 · 2 − (−1) · 1 −1 3 5 7 −8 + 15 1

(
3x − y = 0
         
3 −1 x 0 0 0
• ⇒ = A−1
⇒ x = |{z} = .
x + 2y = 0 1 2 y 0 exists
0 0
| {z } | {z }
A with |A|=76=0 x

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 8
(      
2x + 4y = 0 2 4 x 0
• ⇒ = . Since A−1 does not exist, x = A−1b does not
x + 2y = 0 1 2 y 0
| {z } | {z } | {z }
A with |A|=0 x b
work.
– When A−1 does not exist, it means you don’t really have 2 equations. (or for n × n system,
you don’t really have n equations)
– Huh? When A−1 does not exist, one of the rows of A can be made from a linear combination
of the other rows.
– In the 2 × 2 case, this means one row of A is a multiple of the other
– If right hand sides also agree, then infinitely many solutions. If not, 0 solutions.
– In our problem, since the first line is the same as the second one (equation 2 is 2 times equation
1) including the right hand sides, just solve either one to get x = −2y.
   
x −2y
– Thus, any vector of the form = for any y ∈ R is a solution.
y y
   
−2 10
So is a solution, so is , and so on
1 −5

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 9
(      
2x + 4y = 10 2 4 x 10
• ⇒ = .
x + 2y = 5 1 2 y 5
| {z } | {z } | {z }
A with |A|=0 x b

– Since A−1 does not exist, x = A−1b will not work.


– Since the first line is equivalent to the second one as it is double the second equation (including
the right hand sides), just solve either one to see that x = 5 − 2y.
       
x 5 − 2y 5 −2
– So it has infinitely many solutions: = = +y , ∀y ∈ R
y y 0 1

(
2x + 4y = 2
• ⇒
x + 2y = 5
• As above, x = A−1b will not work.
• Left hand sides of equation are multiples (row 1 of A is double row 2)
• But right hand sides are not the same multiples
(
x + 2y = 1
• If we multiply equation 1 by 21 , we get
x + 2y = 5
• Clearly no such x, y can exist, so we have no solutions

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 10
In class activity

1. Solve the following equation by formulating it as Ax = b, and then multiplying both sides of the
equation by A−1.
x + 2y = 1
3x + 4y = 2
 
sin(2t) cos(2t)
2. Find X −1(t) for X(t) =
2 cos(2t) −2 sin(2t)
 
1 1
3. For what values of r is det(A − rI) = 0, for A = ?
−2 4

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 11
# 1 Solve the following equation by formulating it as Ax = b, and then multiplying both sides of
the equation by A−1.
x + 2y = 1
3x + 4y = 2
We first write it as a linear system of the form Ax = b:
    
1 2 x 1
Ax = = =b
3 4 y 2
Note that |A| = 1 · 4 − 3 · 2 = −2, so A−1 exists and we use the formula for A−1 to get
     
1 d −b 1 4 −2 −2 1
A−1 = =− = 3 1
|A| −c a 2 −3 1 2 −2

Now to solve we can multiply both sides by A−1 since


Ax = b =⇒ A−1Ax = A−1b =⇒ x = A−1b
For our problem, this gives     
−2 1 1 0
x= 3 1 = 1
2 − 2 2 2
and so x = 0, y = 12 , which can be checked in the original equation that they are in fact the solution.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 12
 
sin(2t) cos(2t)
# 2 Find X −1(t) for X(t) =
2 cos(2t) −2 sin(2t)

The
 inverse
 formula is valid for matrices that  are functions
 of t, so we just need to use it. For
a b d −b
A= , the inverse formula is A−1 = |A|
1
c d −c a

For our matrix X, we get |X| = −2 sin2(2t) − 2 cos2(2t) = −2. Now applying the formula,
1
   
1 −2 sin(2t) − cos(2t) sin(2t) 2 cos(2t)
X −1(t) = − =
2 −2 cos(2t) sin(2t) cos(2t) − 12 sin(2t)
While this already finishes the problem, as a sanity check, let’s calculate X −1X and make sure we do
get I back:
1
    
sin(2t) 2 cos(2t) sin(2t) cos(2t) 1 0
X −1X = = =I
cos(2t) − 12 sin(2t) 2 cos(2t) −2 sin(2t) 0 1
and we do get back the identity, as expected.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 13
 
1 1
# 3 For what values of r is det(A − rI) = 0, for A = ?
−2 4

Calculating det(A − rI):


     
1 1 1 0 1−r 1
|A − rI| = −r = = (1 − r)(4 − r) + 2 = r2 − 5r + 6
−2 4 0 1 −2 4 − r
Hence |A − rI| = 0 when 0 = r2 − 5r + 6 = (r − 3)(r − 2), so when r = 2 and r = 3.

There will be a mylab assignment from 9.3 for this material.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 14
Eigenvalues and Eigenvectors (from section 9.5)
 
a b
For A = , r is called an eigenvalue and u 6= 0 is called an eigenvector if they satisfy Au = ru.
c d

• An eigenvalue/eigenvector pair (r, u) solves Au = ru


• We don’t allow u = 0 since this is the trivial solution and not useful. That is, we require u 6= 0 in
the definition of eigenvector
• Note that if Au = ru, then also A(2u) = r(2u), and for any scalar s, A(su) = r(su)
– Thus only the direction of the eigenvector u is unique, since any rescaling still gives a mathe-
matically correct eigenvector
– We will use this fact to our advantage
• If we determine all the eigenvalues and eigenvectors for a matrix (and we will determine formulas
for this in the slides to follow), we can use them to solve ODE systems

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 15
• Why do we care about eigenvalues and eigenvectors?
– Eigenvalues and eigenvectors are building blocks for the solution of x0 = Ax
0
– Observe that if (r, u) is an eigenpair, then calculating [ertu] :
 rt 0
e u = rertu = ertru = ertAu = A ertu
 

– Which precisely means that x(t) = ertu satisfies the equation x0 = Ax


• So in later sections, we will use eigenvalues/eigenvectors (a lot)
• For this section, we will learn how to find them

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 16
• How to find eigenvalues?

By definition, u is a nonzero solution to


Au = ru = rIu ⇔ (A − rI)u = 0

This last equation can only have a nonzero solution u if (A − rI) is singular, which is equivalent
to |A − rI| = 0.

Hence we find the r’s by solving |A − rI| = 0 for r:


a−r b
= (r − a)(r − d) − bc = r2 − (a + d) r + (ad − bc) = 0 (Characteristic equation)
c d−r | {z } | {z }
| {z } tr(A) det(A)
=|A−rI|

– This is simply a quadratic equation in r


– The roots r of this equation are the eigenvalues of the matrix.
– Note we could get 2 real roots, 1 real root, or 0 real roots (2 complex roots).

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 17
• How to find eigenvectors?
• Once eigenvalues are found, we go one by one through the eigenvalues and find its corresponding
eigenvector
• For a known eigenvalue r, we now look for u such that (A − rI)u = 0, so consider
    
a−r b u1 0
(A − rI)u = =
c d−r u2 0
Which is equivalent to the two equations
(a − r)u1 + bu2 = 0
cu1 + (d − r)u2 = 0
– Since A − rI is singular, either a row of A − rI is zero, or a row is a scalar multiple of the other
– In either case, one row can be completely ignored! and we only need to solve one equation that
has 2 unknowns
– There will be infinitely many solutions, but all will be scalar multiples of each other (this is ok
since recall eigenvectors can be scaled and are still eigenvectors)
– For example, if row 1 / equation 1 is nonzero, solve (a − r)u1 + bu2 = 0, by picking u1 = b and
u2 = r − a
– or, similarly, you could pick u1 = 1 and then determine u2 with some algebra; this will give an
equivalent eigenvector
– If row 1 is zero, you can do something similar for row 2: cu1 + (d − r)u2 = 0 gives solution
u1 = r − d, u2 = c
– If both rows are zero, then any vector u works since the zero matrix times u is zero

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 18
Examples. Find all eigenvalues and corresponding eigenvectors.
 
1 1 1−r 1
•A= : = (1 − r)2 − 4 = r2 − 2r − 3 = (r − 3)(r + 1) = 0 ⇒ r = 3, −1.
4 1 4 1−r
| {z }
=|A−rI|
 
−2 1
X For r = 3, A − rI = A − 3I =
4 −2
∗ We want u that solves (A − 3I)u = 0
∗ Since row 1 is nonzero, we only need to consider row 1 of the equation (A − 3I)u = 0 to
determine u
−2u1 + u2 = 0
 
1
∗ Pick u1 = 1 which then makes u2 = 2, so u =
2
X For r = −1,     
2 1 u1 0
0 = (A − rI)u =⇒ =
4 2 u2 0
– We only need to consider row 1 / equation 1 since it is nonzero (row 2 is the same equation,
multiplied on both sides by a scalar)
– For the equation 2u1 + u2 = 0, pick u1 = 1 which determines u2 = −2.
– Thus the eigenvector is  
1
u=
−2

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 19

− 12 1
 
•A= : |A − rI| = r2 + r + 45 = 0 ⇒ r = − 12 ± i.
−1 − 21
X For r = − 12 + i,
 
−i 1
A − rI =
−1 −i
– Thus we need to consider only equation 1: −iu1 + u2 = 0.
 
1
– Picking u1 = 1 determines u2 = i, and gives the eigenvector u =
i
X For r = − 12 − i,
 
i 1
A − rI =
−1 i
– Thus we need to consider only equation 1: iu1 + u2 = 0.
 
1
– Picking u1 = 1 determines u2 = −i, and gives the eigenvector u =
−i

– Complex conjugate of a complex number means to negate the imaginary part: conj(a+bi)=a−bi
– Complex conjugate of a vector means to take complex conjugate of each entry
– For complex valued cases, eigen values/vectors are always complex conjugate to each other.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 20
 
1 −1
•A= :
1 3
|A − rI| = r2 − 4r + 4 = (r − 2)2 = 0 ⇒ r = 2
– Only 1 eigenvalue r = 2
– For corresponding eigenvector,  
−1 −1
A − rI =
1 1
– We only need to consider equation 1: −u1 − u2 = 0.
 
1
– Picking u1 = 1 gives u2 = −1 and so u =
−1

 
2 0
•A= :
0 2
|A − rI| = r2 − 4r + 4 = (r − 2)2 = 0 ⇒ r = 2
– (A − rI)u = 0 with r = 2 gives the equations
 
0 0
u=0
0 0
 
1
– Any nonzero vector u will work. I would pick
0

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 21
Activities for you to try now:
 
2 −1
1. Find eigenvalues and eigenvectors of A =
−2 3
 
1 3
2. Find eigenvalues and eigenvectors of A =
−3 −1

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 22
 
2 −1
# 1 Find eigenvalues and eigenvectors of A =
−2 3

• First find the eigenvalues, so set


 
2 − r −1
0 = |A − rI| = = (2 − r)(3 − r) − 2 = r2 − 5r + 4 = (r − 4)(r − 1)
−2 3 − r

• Hence the eigenvalues are 1 and 4.


• Now calculate the corresponding eigenvectors:

 
1 −1
• For r = 1, A − rI = , so equation 1 of (A − rI)u = 0 is u1 − u2 = 0.
−2 2
 
1
Picking u1 = 1 determines u2 = 1, so our eigenvector is u =
1
   
1 −1
Any scalar multiple of would also be a correct eigenvector, e.g. .
1 −1

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 23
 
−2 −1
• For r = 4, A − rI = , so equation 1 of (A − rI)u = 0 is −2u1 − u2 = 0.
−2 −1
 
1
Picking u1 = 1 determines u2 = −2, so our eigenvector is u =
−2
   
1 1
Hence the two eigenvalue/eigenvector pairs are (1, ), and (4, )
1 −2

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Review of Linear Algebra | §9.2, §9.3, §9.5 24
 
1 3
# 2 Find eigenvalues and eigenvectors of A =
−3 −1
• First find the eigenvalues, so set
 
1−r 3
0 = |A − rI| = = −(1 − r)(1 + r) − 9 = r2 − 1 + 9 = r2 + 8
−3 −1 − r

• Hence the eigenvalues are r = ±2 2i


 
1 − 2 2i 3 √
• For the r = 2 2i eigenvector, A−rI = , so equation 1 of (A−rI)u = 0
−3 −1 − 2 2i

is (1 − 2 2i)u1 + 3u2 = 0.


 
1 √
Picking u1 = 1 determines u2 = − 13 (1 − 2 2i), so our eigenvector is u =
− 31 (1 − 2 2i)

• For the r = −2 2i eigenvector, since we know eigenvectors of a real matrix must be complex
conjugates
 of each other,
 we can simply take complex conjugate of the first eigenvector to get
1 √
u=
− 31 (1 + 2 2i)

There is a short assignment on mylab math for this.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 25

Aim
• Learn how to solve x0 = Ax using eigenvalues/vectors of A (the case when two distinct eigenvalues)

   
a b x1(t)
We would like to solve x0 = Ax, where A = and x = x(t) = .
c d x2(t)
• We have already learned that if (r, u) is an eigenpair of A, then x = ertu is a solution to x0 = Ax.

• We consider now the case that A has 2 distinct eigenvalues (either real or complex)

• We consider the case that A has only one eigenvalue in the next lecture.

• Key result: If two eigenvalues of A are distinct (either real or complex), r1 6= r2, then
x(t) = c1er1tu1 + c2er2tu2 is the general solution of x0 = Ax,
where u1 and u2 are eigenvectors corresponding r1 and r2, respectively.

Proof. Observe that x1(t) := er1tu1 and x2(t) := er2tu2 are solutions, as was shown in Ch 9 Lecture 3.
0 0
Ax1(t) = A[er1tu1] = er1tAu1 = er1tr1u1 = r1er1tu1 = er1t u1 = er1tu1 = x01(t),
r2 t 0
0
r2 t r2 t r2 t r2 t
u2 = e u2 = x02(t).
r2 t

Ax2(t) = A[e u2] = e Au2 = e r2u2 = r2e u2 = e
Then we have the following superposition principle: x = c1x1 + c2x2, since
x0 − Ax = (c1x1 + c2x2)0 − A(c1x1 + c2x2) = c1(x01 − Ax1) + c2(x02 − Ax2) = 0.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 26
X Also, we have to guarantee x1 and x2 are linearly independent: Suppose not, i.e., x2 = cx1. Then
er2tu2 = x2 = cx1 = cer1tu1 ⇒ u2 = ce(r1−r2)tu1.
Since u1, u2, c are constants, and e(r1−r2)t is a non-constant function, the only possibility is c = 0.
Then u2 = 0, which contradicts to the assumption that u2 6= 0. 

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 27
 
2 −3
Example 1. Solve x0 = Ax, where A =
1 −2
2 − r −3
(1) Find eigenvalues: = (2 − r)(−2 − r) + 3 = r2 − 1 = 0 ⇒ r1 = 1, r2 = −1.
1 −2 − r

(2) Find corresponding eigenvectors.


   
1 −3 3
For r1 = +1, A − r1I = ⇒ u1 − 3u2 = 0 ⇒ u2 = 1, u1 = 3 ⇒ u1 = .
1 −3 1
   
3 −3 1
For r2 = −1, A − r2I = ⇒ 3u1 − 3u2 = 0 ⇒ u1 = 1, u2 = 1 ⇒ u2 = .
1 −1 1
   
3 1
(3) General solution: x(t) = c1er1tu1 + c2er2tu2 = c1et + c2e−t , ∀c1, c2 ∈ R.
1 1

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 28
 
1 −3
Example 2. Solve x0 = Ax, where A =
0 −2
1 − r −3
(1) Find eigenvalues: = (1−r)(−2−r)−0 = (r−1)(r+2) = 0 ⇒ r1 = 1, r2 = −2.
0 −2 − r
X Notice that every upper/lower triangular matrix will have diagonal entries as eigenvalues.

(2) Find corresponding eigenvectors.


   
0 −3 1
For r1 = +1, A − r1I = ⇒ 0u1 − 3u2 = 0 ⇒ u2 = 0, u1 = any ⇒ u1 = .
0 −3 0
   
3 −3 1
For r2 = −2, A − r2I = ⇒ 3u1 − 3u2 = 0 ⇒ u2 = .
0 0 1
   
1 1
(3) General solution: x(t) = c1er1tu1 + c2er2tu2 = c1et + c2e−2t , ∀c1, c2 ∈ R.
0 1

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 29
What happens if the eigenvalues are complex?

• We still find evals and evecs first, (r1, u1), (r2, u2)
• But since two eigenvalues and eigenvectors are complex conjugate to each other, we only need to
bother finding (r1, u1) since (r2, u2) = (r1, u1)
• Complex solutions are
x1 = er1tu1, x2 = er2tu2
• Since r2 = r̄1 and u2 = ū1,
x2 = x̄1, since x2 = er2tu2 = er̄1tū1 = er1tū1 = er1tu1 = x̄1.

• A general complex solution is


x(t) = c1x1(t) + c2x̄1(t) = c1er1tu1 + c2er̄1tū1, ∀c1, c2 ∈ C

• We want real solutions, so these complex solutions are not good enough

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 30
x1 +x2 x1 −x2
• To get a real solution, from the superposition principle we have that both 2 and 2i are
solutions
• But since
x1 + x̄1 x1 + x2 x1 − x̄1 x1 − x2
Re [x1] = = , Im [x1] = =
2 2 2i 2i
it follows that Re [x1] and Im [x1] are both real solutions
• Thus we have the general real solution
x(t) = c1Re[x1(t)] + c2Im[x1(t)] = c1Re[er1tu1] + c2Im[er1tu1], ∀c1, c2 ∈ R

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 31
 
−1 2
Example 3. Solve x0 = Ax, where A =
−1 −3
(1) Find eigenvalues:
−1 − r 2
= (−1 − r)(−3 − r) + 2 = r2 + 4r + 5 = (r + 2)2 + 1 = 0 ⇒ r = −2 ± i.
−1 −3 − r
   
1−i 2 2
(2) Find an eigenvector u1 for r1 = −2 + i: A − r1I = ⇒ u1 = .
−1 −1 − i −1 + i
(3) Calculate x1 = er1tu1 and decompose into real part + i· imag part
it
       
2 2 2e 2(cos t + i sin t)
x1(t) = e(−2+i)t = e−2teit = e−2t it = e−2t
−1 + i −1 + i (−1 + i)e (−1 + i)(cos t + i sin t)
     
(2 cos t) + i(2 sin t) 2 cos t 2 sin t
= e−2t = e−2t +i e−2t ,
(− cos t − sin t) + i(cos t − sin t) − cos t − sin t cos t − sin t
| {z } | {z }
=Re[x1 (t)] =Im[x1 (t)]

(4) General solution: real representation is x(t) = c1Re[x1] + c2Im[x1]:


   
2 cos t 2 sin t
x(t) = c1Re[x1(t)] + c2Im[x1(t)] = c1e−2t + c2e−2t .
− cos t − sin t cos t − sin t

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 32
A couple for you to try on your own
 
−1 4
1. Solve x0 = Ax, where A = 1
2 −2
 
−2 −5
2. Solve x0 = Ax, where A =
1 2

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 33
 
−1 4
# 1 Solve x0 = Ax, where A = 1
2 −2

(1) Find eigenvalues:


−1 − r 4
1 = (−1 − r)(−2 − r) − 2 = r2 + 3r = r(r + 3) = 0 ⇒ r1 = 0, r2 = −3.
2 −2 − r

(2) Find corresponding eigenvectors.


   
−1 4 4
For r1 = 0, A − r1I = 1 ⇒ − u 1 + 4u2 = 0 ⇒ u2 = 1, u1 = 4 ⇒ u 1 = .
−2 1
2   
2 4 −2
For r2 = −3, A − r2I = 1 ⇒ 2u1 + 4u2 = 0 ⇒ u2 = 1, u1 = −2 ⇒ u2 = .
2 1 1

(3) General solution:


       
4 −2 4 −2
x(t) = c1er1tu1 +c2er2tu2 = c1e0t +c2e−3t = c1 +c2e−3t , ∀c1, c2 ∈ R.
1 1 1 1

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 34
 
−2 −5
# 2 Solve x0 = Ax, where A =
1 2

Starting with eigenvalues,


 
−2 − r −5
0 = |A − rI| = = −(2 + r)(2 − r) + 5 = r2 + 1
1 2−r
so r = ±i, i.e. r1 = i, r2 = −i.

Next for u1:


 
−2 − i −5
A−rI = ⇒ u1+(2−i)u2 = 0 I used equation 2 since it looked simpler; we get to pick
1 2−i
 
i−2 −1
Thus u2 = 1 and u1 = i−2 gives a solution u1 = (could have picked u1 = 1 and got u2 = i−2 )
1
Calculate x1 and split into real and imag parts:
     
i − 2 (i − 2)(cos t + i sin t) (−2 cos t − sin t) + i(cos t − 2 sin t)
x1 = er1tu1 = eit = =
1 cos t + i sin t cos t + i sin t
   
(−2 cos t − sin t)) (cos t − 2 sin t)
Thus Re[x1] = and Im[x1] =
cos t sin t

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Homogeneous Linear Systems with Constant Coefficients | §9.5, §9.6 35
Finally we get to the general solution
   
(−2 cos t − sin t)) (cos t − 2 sin t)
x(t) = c1Re[x1(t)] + c2Im[x1(t)] = c1 + c2
cos t sin t

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Repeated Eigenvalues | §9.5 (Exercise #35) 36

Aim
• Learn how to solve x0 = Ax using eigenvalues/vectors of A (the case when a repeated eigenvalue)

• If there are 2 distinct eigenvalues r1 6= r2 for a 2 × 2 matrix A, we know how to find the general
solution
• But what if r1 = r2?
– If only 1 eigenvalue for a 2 × 2 matrix A, it is a repeated root of |A − rI| = 0
– A matrix A with a repeated eigenvalue may have 1 or 2 corresponding (linearly independent)
eigenvectors
– If 2 linearly independent eigenvectors, then the formula we used for 2 distinct eigenvalues u1,
u2 will work with r1 = r2 = r
– If only 1 linearly independent eigenvector, then we need a new tool (which we will develop)

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Repeated Eigenvalues | §9.5 (Exercise #35) 37
 
−1 0
Example 1. Solve x0 = Ax, where A = .
0 −1
−1 − r 0
(1) Find eigenvalues: = (−1 − r)2 = (r + 1)2 = 0 ⇒ r = −1 (repeated).
0 −1 − r
 
0 0
(2) Find eigenvectors: (A − rI)u = u = 0 ⇒ any u 6= 0 are eigenvectors. So pick
0 0
   
1 0
u1 = and u2 = .
0 1
| {z }
linearly independent

   
1 0
(3) General solution: x(t) = c1ertu1 + c2ertu2 = c1e−t + c2e−t , ∀c1, c2 ∈ R.
0 1
X Even with a repeated eigenvalue, if we have two linearly independent eigenvectors, we are fine!

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Repeated Eigenvalues | §9.5 (Exercise #35) 38

− 21 1
 
Example 2. Solve x0 = Ax, where A = .
0 − 12

− 21 − r 1
(1) Find eigenvalues: 1 = (− 12 − r)2 = (r + 12 )2 = 0 ⇒ r = − 12 (repeated).
0 −2 − r
   
0 1 1
(2) Find eigenvectors: (A − rI)u = u = 0 ⇒ u = , only one corresponding
0 0 0
eigenvector.  
1 1
(3) General solution: x(t) = c1 e− 2 t +c2 ????? .
0 | {z }
| {z }
x1 (t) x2 (t)

X If we have only one eigenvector, we claim x2 = tertu + ertv where (A − rI)v = u :

Since Au = ru and Av = rv + u, (ert)0 = rert, and (tert)0 = rtert + ert,

0
Ax2 = A[te u + e v] = te ru + e (rv + u) = (rte + e )u + re v = te u + e v = x02.
rt rt rt rt rt rt rt
 rt rt

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Repeated Eigenvalues | §9.5 (Exercise #35) 39

X Thus to find x2, it remains to find (nonzero) v where (A − rI)v = u


X Such a v satisfying (A − rI)v = u is called a generalized eigenvector
     
0 1 1 0
From v= =⇒ 0v1 + v2 = 1, and so we have v =
0 0 0 1

 
    
− 12 t 1 1 1 1 0
Thus x(t) = c1 e +c2 te− 2 t + e− 2 t .
0 0 1
| {z } | {z }
x1 (t) x2 (t)=tert u+ert v

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Repeated Eigenvalues | §9.5 (Exercise #35) 40
 
1 −1
Example 3. Solve x0 = x.
1 3
| {z }
A
1 − r −1
(1) Find eigenvalues: = (1 − r)(3 − r) + 1 = r2 − 4r + 4 = (r − 2)2 = 0 ⇒ r| {z = 2} .
1 3−r repeated
   
−1 −1 1
(2) Find eigenvectors: A − rI = ⇒ u= , only one corresponding eigenvector.
1 1 −1
     
1 1
(3) General solution: x(t) = c1e2t + c2 te2t + e2tv ,
−1 −1
where v is a generalized eigenvector such that
   
−1 −1 1
(A − rI)v = u ⇔ v= ⇒ v1 + v2 = −1
1 1 −1
 
1
⇒ v= (there were infinity many choices]
−2
      
1 1 1
So x(t) = c1e2t + c2 te2t + e2t
−1 −1 −2
X The other choices of v would yield an equivalent x (although it may look different)

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Repeated Eigenvalues | §9.5 (Exercise #35) 41

Summary of using eigenvalues / eigenvectors to solve 2 × 2 homogeneous linear systems x0 = Ax


I will put this summary on the exam for you to refer to

• Case 1: 2 real eigenvalues/eigenvectors (r1, u1) and (r2, u2)


General solution: x(t) = c1er1tu1 + c2er2tu2

• Case 2: 2 complex eigenvalues/eigenvectors (r1, u1) and (r2, u2)


– Calculate x1 = er1tu1
General solution: x(t) = c1Re[x1(t)] + c2Im[x1(t)]
• Case 3: Only 1 real eigenvalue r, but two linearly independent eigenvectors u1, u2
General solution: x(t) = c1ertu1 + c2ertu2

• Case 4: Only 1 real eigenvalue r, and only 1 corresponding eigenvector u


– Calculate v such that (A − rI)v = u
General solution: x(t) = c1ertu + c2 tertu + ertv


MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Repeated Eigenvalues | §9.5 (Exercise #35) 42
One for you to try: Find the general solution to
 
5 −3
x0(t) = x(t)
3 −1

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Repeated Eigenvalues | §9.5 (Exercise #35) 43
Solution to  
5 −3
x0(t) = x(t)
3 −1

• First we find eigenvalues via |A − rI| = 0:


 
5 − r −3
0 = |A − rI| = = (r − 2)2
3 −1 − r
so 1 eigenvalue r = 2
• Now for eigenvector(s), solve (A − rI)u = 0, so
   
5 − 2 −3 3 −3
0= u= u
3 −1 − 2 3 −3
 
1
The rows give just 1 equation: 3u1 − 3u2 = 0, so we get 1 eigenvector u =
1
• Since just 1 eigenvector, need v satisfying (A − rI)v = u, so solve
   
3 −3 1
v= =⇒ 3v1 − 3v2 = 1
3 −3 1
 
1/3
so I pick v = (many other correct choices)
0
Finally we can put it together into the general solution
      
1 1 1/3
x(t) = c1ertu + c2 tertu + ertv = c1e2t + c2 ter2t + e2t

1 1 0

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Repeated Eigenvalues | §9.5 (Exercise #35) 44
Initial Value Problems

Solve the initial value problem


x0 = Ax, x(0) = x0.
• The general solution was x(t) = c1x1(t) + c2x2(t)
 
| |  
c1
• In matrix form, we can write x(t) =  x1(t) x2(t)  .
c2
| | | {z }
| {z } c
X(t)

• Determine c1 and c2 from the IC: x0 = x(0) = X(0)c ⇒ c = X(0)−1x0.


• So the solution is x(t) = X(t)X(0)−1x0.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 45

Aim
• Learn how to solve nonhomogeneous differential system using undetermined coefficients method or variation of parameters

Now consider a nonhomogeneous problem:


x0 = Ax + f (t) with x(0) = x0.

• Like the scalar case, we build general solution with x = xh + xp

For the next two illustrating examples, we will always have


   
1 2 −5
A= and x0 = .
0 −1 2
Note that    
1 −1 −2 1 2
A−1 = =
−1 0 1 0 −1
and the eigenvalues and eigenvectors are
   
1 1
r1 = 1, u1 = , r2 = −1, u2 = .
0 −1
   
1 1
So the homogeneous solution is always xh(t) = c1et + c2e−t .
0 −1

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 46
     
2 1 2 −5
Example 1. Solve x0 = Ax + with x(0) = x0. From above, A = and x0 = .
1 0 −1 2
We use the undetermined coefficients method:
• Find a particular solution, guessing xp = a, a constant vector since f is a constant vector. Then
taking the derivative of xp gives an equation, and plugging xp into the ODE gives a second equation:
     
2 2 2
x0p = 0 and x0p = Axp + = Aa + =⇒ Aa + =0
1 1 1
and thus        
2 −2 −4 −4
Aa = − ⇒ a = A−1 = ⇒ xp = .
1 −1 1 1
     
1 1 −4
• General solution: x = xh + xp = c1et + c2e−t + , ∀c1, c2 ∈ R.
0 −1 1
• Determine c1, c2 from the IC:
            
−5 1 1 −4 1 1 c1 −1
= x(0) = c1 + c2 + ⇒ =
2 0 −1 1 0 −1 c2 1
   −1          
c1 1 1 −1 1 −1 −1 −1 1 1 −1 0
⇒ = = = = .
c2 0 −1 1 −1 0 1 1 0 −1 1 −1

−4 − e−t
     
1 −4
• Finally, x(t) = −e−t + = .
−1 1 1 + e−t

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 47
     
t + 2 1 2 −5
Example 2. Solve x0 = Ax + with x(0) = x0. Again, A = and x0 = .
2t − 1 0 −1 2
   
1 2
Notice that f (t) = t + , a vector polynomial.
2 −1
• Guess xp = ta + b. Then x0p = a and x0p = Axp + f , so
   
1 2
a = tAa + Ab + t +
2 −1
Now proceed similar to scalar case of method of undetermined coefficients. Left side coefficients of
t must equal right side coefficients of t, and same for coefficients of 1 (i.e. the terms with no t’s):
   
1 2
Aa + = 0 and Ab + = a.
2 −1
We can write these equation as
   
1 2
Aa = − , Ab = a − .
2 −1
and thus solve first for a and then for b.
         
−1 −5 −5 − 2 −7 −1
So a = A−1 = , b = A−1 = A−1 = .
−2 2 2+1 3 −3
     
−5 −1 −5t − 1
Hence xp = t + = .
2 −3 2t − 3

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 48
     
1 1 −5t − 1
• General solution: x = xh + xp = c1et + c2e−t + , ∀c1, c2 ∈ R.
0 −1 2t − 3
• Determine c1, c2 from the IC:
            
−5 1 1 −1 1 1 c1 −4
= x(0) = c1 + c2 + ⇒ =
2 0 −1 −3 0 −1 c2 5
   −1       
c1 1 1 −4 1 1 −4 1
⇒ = = = .
c2 0 −1 5 0 −1 5 −5

−5t − 1 + et − 5e−t
       
1 1 −5t − 1
• Finally, x(t) = et − 5e−t + = .
0 −1 2t − 3 2t − 3 + 5e−t

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 49
• The method of undetermined coefficients can be used in analogous way for various right hand sides
as was done for scalar equations.
• However, it can get quite messy for more complicated f .
• Another method called ‘variation of parameters’ is typically a better way to find xp unless f was
very simple
• It allows us to derive a formula for any f
• We are solving x0 = Ax + f (t) with x(0) = x0 and a particular solution is our main interest.
 
| |  
c1
• Since the homogeneous solution is xh(t) = c1x1(t) + c2x2(t) =  x1(t) x2(t) 
c2
| |
| {z }
fundamental matrix X(t)
 r1 t
x1(t) = e u1,
 x2(t) = er2tu2,
where either x1(t) = ertu, x2(t) = tertu + ertv with (A − rI)v = u,
x1(t) = Re[er1tu1], x2(t) = Im[er1tu1],

we guess the following form of our particular solution:


 
| |  
v1 (t)
xp(t) = v1(t)x1(t) + v2(t)x2(t) =  x1(t) x2(t)  = X(t)v(t).
v2(t)
| | | {z }
| {z } v(t)
X(t)

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 50

Then, since x01 = Ax1 and x02 = Ax2 imply X 0 = AX,


x0p = X 0v + Xv0 = AXv + Xv0 =⇒ x0p − AXv = Xv0
and
x0p = Axp + f = AXv + f =⇒ x0p − AXv = f
we set the right hand sides of last two equations equal to get
Z
Xv0 = f ⇒ v0 = X −1f ⇒ v(t) = X −1(t)f (t) dt.
Z
Therefore, the variation of parameters formula is obtained: xp(t) = X(t) X −1(t)f (t) dt.
X In practice, memorize
xh = X(t)c, xp = X(t)v where X(t)v0 = f .

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 51

e2t
   
2 −3
Example 6. Solve x0 = x+
1 −2 1
   
3 1
(1) Homogeneous solution: Since r1 = 1, u1 = and r2 = −1, u2 = ,
1 1
     t −t   
3 1 3e e c1
xh = c1 et +c2 e−t = .
1 1 et e−t c2
| {z } | {z } | {z }
x1 x2 X(t)

(2) Particular solution: xp = X(t)v(t), where X(t)v0 = f (t). So


 −t −t
  2t   t −t
  1 t 1 −t   1 t 1 −t 
1 e −e e 1 e − e e − e 2e + 2e
v0 = = = 2 2 ⇒ v =
2 −et 3et 1 2 −e3t + 3et − 12 e3t + 32 et − 16 e3t + 32 et
| {z } | {z }
X −1 (t) f (t)

t −t 1 t 1 −t 4 2t
    
3e e 2e + 2e 3+ 3e
which gives xp = = .
et e−t − 61 e3t + 32 et 2+ 1 2t
3e
| {z }| {z }
X(t) v(t)
Note there are no integration constants since we want the simplest v that satisfies v0 = X −1f .

3et e−t 3 + 34 e2t


  
 
c1
(3) General solution: x = + .
et e−t c2 2 + 13 e2t
| {z }
X(t)

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 52
A couple for you to try

1. Use the
 method
 of undetermined
  coefficients to find a general solution of x0 = Ax + f , where
6 1 t
A= and f = .
4 3 1
2. Use
 the variation ofparameters method to find a general solution of x0 = Ax + f , where A =
t2
 
8 −4
and f = .
4 −2 1

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 53

#1 Use the


 method of undetermined
 coefficients to find a general solution of x0 = Ax + f , where
6 1 t
A= and f = .
4 3 1

First, calculate
 the eigenvalues
  to be r1 = 2 and r2 = 7, then find their corresponding eigenvectors
1 1
to be u1 = and u2 = . Thus we have found the homogeneous solution to be
−4 1
   
1 1
xh = c1e2t + c2e7t .
−4 1

 
   
t 1 0
Now for the particular solution. Since f = =t + is a vector polynomial of degree
1 0 1
1, we guess a vector polynomial of the same order xp = at + b.

Since x0p = a and x0p = Axp + f , we know


   
1 0
a = Axp + f = Aat + Ab + t +
0 1
So setting coefficients of t and 1 equal, we get equations
   
−1 0
Aa = Ab = a −
0 1

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 54
First solve for a:
   −1       
−1 6 1 −1 1 3 −1 −1 −3/14
a = A−1 = = =
0 4 3 0 14 −4 6 0 4/14
Now solve for b:
       
0 1 3 −1 −3/14 1 1
b = A−1 a − = =
1 14 −4 6 −10/14 196 −48
Thus    
−3/14 1 1
xp = t+
4/14 196 −48
and so the general solution is
       
1 1 −3/14 1 1
x = c1e2t + c2e7t + t+
−4 1 4/14 196 −48

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 55

#2 Use the


 variationof 2parameters
 method to find a general solution of x0 = Ax + f , where
8 −4 t
A= and f = .
4 −2 1

   
1 2
Determine the eigenvalues and eigenvectors to be r1 = 0, r2 = 6, u1 = , and u2 = .
2 1
Thus
6t
      
1 2 1 2e c1
xh = c1 + c2e6t =
2 1 2 e6t c2
1 2e6t
 
and so we have defined X(t) = . We need X −1, so calculate it:
2 e6t
6t 6t
 
1 e −2e
X −1 =
−3e6t −2 1
Determine v such that v0 = X −1f :
 6t 6t
 2   2 6t 6t
  2

1 e −2e t 1 t e − 2e −1 t − 2
v0 = X −1f = = =
−3e6t −2 1 1 −3e6t −2t2 + 1 3 −2t2e−6t + e−6t
Since Z
1 2 2 −6t
t2e−6t dt = − t2e−6t − te−6t − e +C
6 36 216
we get (not ignoring the integration constant)
1 3
 
−1 3 t − 2t + C 1
v=
3 −2(− 6 t e − 36 te − 216 e ) + −1
1 2 −6t 2 −6t 2 −6t
6 e
−6t
+ C2

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 56
Finally, we finish it up with
1 3
−1 1 2e6t
  
3 t − 2t + C 1
x = Xv =
3 2 e 6t
2( 6 t e + 36 te + 216 e ) + −1
1 2 −6t 2 −6t 2 −6t
6 e
−6t
+ C2
−1 3 t − 2t + 4( 61 t2 + 36 ) + −2
1 3 2 2
+ C1 + 2C2e6t

t + 216 6
= 2 3 1 2 2 2 −1 6t
3 3 t − 4t + 2( 6 t + 36 t + 216 ) + 6 + 2C1 + C2 e
8
While usually C1 = C2 = 0, here we take C2 = 0 but C1 = −( 216 − 26 ). The integration constants
can be 0, but we usually want as simple an expression as possible. It would not be wrong to set them to 0.

With this choice of C1, C2, we get


1 3
+ 46 t2 − 16
 
−1 3t 9t
x= 2 3
3 3t + 13 t2 − 35
9t

Note that this is a cubic vector polynomial. At first glance, you might have expected a quadratic,
since f is a quadratic vector polynomial and we might have wanted to guess a quadratic vector polyno-
mial.

However, notice that x1 solution is a constant polynomial, and so the method of coefficients would
not have worked - hence you would have had to multiply your guess by t, which would produce a cubic
polynomial.

The variation of parameters method is easy to apply, but we can run into ugly expressions due to
the integrals arising in the calculation of v.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz


Nonhomogeneous Linear Differential System | §9.7 57

However, if one has access to e.g. Maple or Mathematica, then these integrals can be done quickly
and easily, making the entire method easy to use.... but by hand it can get ugly.

MATH 2080 | Introduction to Differential Equations | Fall 2020 | Leo Rebholz

You might also like