You are on page 1of 18

Linear Algebra and Differential Equations

Lecture 22
Applications of systems of differential equations

July 27, 2016

Linear Algebra and Differential EquationsLecture 22 Applications


July
of systems
27, 2016of differential
1 / 18 e

Mixing problems
Consider a series of three vats with brine pumped between them at a rate
of r liters per minute

If x1 (t), x2 (t), x3 (t) are the amounts of salt, in kg, in V1 , V2 , V3


respectively and c0 is the concentration of input to V1 then the DEs for
the amounts of salt are
x1 = c0 r k1 x1
x20 = k1 x1 k2 x2
x30 = k2 x2 k3 x3
where ki =

r
Vi .

Linear Algebra and Differential EquationsLecture 22 Applications


July
of systems
27, 2016of differential
2 / 18 e

We can express it as a matrix equation


0

x1
k1
0
0
x1
c0 r
x2 = k1 k2
0 x2 + 0 = Ax + f
x3
0
k2 k3
x3
0

the solution to the problem is


x = xp + (x(0) xp (0))
where
xp = A1 f
Since the eigenvalues of A are k1 , k2 , k3 the elements of will be
combinations of e k1 t , e k2 t , e k3 t and
lim x = xp

so the xs asymptote to their equilibrium values.

Linear Algebra and Differential EquationsLecture 22 Applications


July
of systems
27, 2016of differential
3 / 18 e

A numerical example
Let
r = 60 c0 = 1 V1 = 20 V2 = 12 V3 = 60
x1 (0) = 44

x2 (0) = 0 x3 (0) = 0

the DE is

0
60
x1
3 0
0
x1
x2 = 3 5 0 x2 + 0
0
x3
0
5 1
x3

The particular (equilibrium) solution is found by putting the left hand side
of equation to zero

20
xp = 12
60
The eigenvalues of A are 1, 3, 5

Linear Algebra and Differential EquationsLecture 22 Applications


July
of systems
27, 2016of differential
4 / 18 e

the associated eigenvectors are


2 0 0
0
3 4 0 v1 = 0
0
5 0
0

0 0 0
3 2 0 v3 =
0 5 2

2 0 0
3 0 0 v5 =
0 5 4

0
0
0

0
0
0

v1

0
= 0
1

4
v3 = 6
15

0
v5 = 4
5

Linear Algebra and Differential EquationsLecture 22 Applications


July
of systems
27, 2016of differential
5 / 18 e

The general solution is

20
0
4
0
x = 12 + c1 e t 0 + c2 e t 6 + c3 e 5t 4
60
1
15
5
Using the initial condition gives


44
20 + 4c2

0 =
12 + 6c2 + 4c3
0
60 + c1 15c2 5c3
with solution
c1 = 30

c2 = 6

c3 = 12

Linear Algebra and Differential EquationsLecture 22 Applications


July
of systems
27, 2016of differential
6 / 18 e

Second order constant coefficient equations


In physical situations these are more common than the first order DEs
x00 = Ax

A is constant

We will use the same idea that worked for first order systems, let
x = e t v
Substituting into the DE gives
2 ve t = Ave t

Av = 2 v

thus = where is an eigenvalue of A and v is the associated


eigenvector.
we can express the solution in matrix exponential form as

x=e

At

c1 + e

At

c2

Linear Algebra and Differential EquationsLecture 22 Applications


July
of systems
27, 2016of differential
7 / 18 e

If A has distinct eigenvalues it also has linearly independent eigenvectors.


We can use these as a basis and work with the components in this basis
Suppose the eigenvalues and associated eigenvectors of A are 1 , , n
and v1 , , vn . Write x in the form
x(t) = x1 (t)v1 + + xn (t)vn
Substituting into the DE
x100 (t)v1 + + xn00 (t)vn = Ax = 1 x1 (t)v1 + + n xn (t)vn
(x100 (t) 1 x1 (t))v1 + + (xn00 (t) n xn (t))vn
but the vi are linearly independent so the coefficients are all zero and we
have the n DEs
x100 (t) 1 x1 (t) = 0

xn00 (t) n xn (t) = 0

Linear Algebra and Differential EquationsLecture 22 Applications


July
of systems
27, 2016of differential
8 / 18 e

An application
Consider two masses with the same mass, m, connected by three springs
as shown below

The equations of motion are


mx100 = k1 x1 + k2 (x2 x1 )
or


x1
x2

00

1
=
m

mx 00 = k3 x2 + k2 (x1 x2 )

(k1 + k2 )
k2
k2
(k2 + k3 )



x1
x2

Linear Algebra and Differential EquationsLecture 22 Applications


July
of systems
27, 2016of differential
9 / 18 e

The trace of the matrix is


trA =

1
(k1 + 2k2 + k3 ) < 0
m

The determinant is
detA =


1
1
2
(k
+
k
)(k
+
k
)

k
= 2 (k1 k2 + k2 k3 + k3 k1 ) > 0
1
2
2
3
2
m2
m

and
1
((k1 + k3 )2 + 4k2 (k1 + k3 ) + 4k22
m2
4(k1 k2 + k2 k3 + k3 k1 ))

1
=
(k1 k3 )2 + 4k22
2
m

(trA)2 detA =

so the eigenvalues of A are real and negative and so the s are pure
imaginary and the solution will be a combination of cos and sin.

Linear Algebra and Differential EquationsLecture 22 Applications


Julyof27,
systems
2016 of differential
10 / 18 e

A numerical example
For example let m = 1, k1 = 6, k2 = 2, k3 = 3 The equation is



00 
8 2
x1
x1
=
2 5
x2
x2
The eigenvalues are 4, 9 and the associated eigenvectors are


 
 
4 2
0
1
v4 =
v4 =
2 1
0
2


 


1 2
0
2
v9 =
v9 =
2 4
0
1
The DEs are
x100 = 4x1

x200 = 9x2

so the general solution is



x = (c1 cos 2t + c2 sin 2t)

1
2


+ (c3 cos 3t + c4 sin 3t)

2
1

Linear Algebra and Differential EquationsLecture 22 Applications


Julyof27,
systems
2016 of differential
11 / 18 e

Spectral methods
This is another way to calculate matrix exponentials without calculating
eigenvectors and change of basis matrices.
For simplicity suppose the matrix A has n distinct eigenvalues,
1 , 2 , , n , and associated eigenvectors, v1 , v2 , , vn , define the
projection matrices
A 2 I A 3 I
A n I
P1 =

1 2 1 3
1 n
A n I
A 1 I A 3 I

P2 =
2 1 2 3
2 n
..
..
..
..
.
.
.
.
A 1 I A 2 I
A n1 I
Pn =

n 1 n 2
n n1
The Cayley Hamilton theorem is
p(A) = (A 1 I)(A 2 I) (A n I) = 0

Linear Algebra and Differential EquationsLecture 22 Applications


Julyof27,
systems
2016 of differential
12 / 18 e

Properties of the projection matrices


P1 + P2 + + Pn = I
Pi Pj = 0 if i 6= j
3 P2 = P
i
i
4 AP = P
i
i i
5 A = P + P + + P
1 1
2 2
n n
6 Ak = k P + k P + + k P
1
2
n n
1
2
Proof (1)
P1 v1 = v1
P1 v2 = = P1 vn = 0
1
2

Expand any vector using the eigenvectors as basis


u = u1 v1 + + un vn
then
(P1 + P2 + + Pn )u = u1 v1 + + un vn = u
so
P1 + P2 + + Pn = I

Linear Algebra and Differential EquationsLecture 22 Applications


Julyof27,
systems
2016 of differential
13 / 18 e

(2) If i 6= j then the Cayley Hamilton theorem implies


Pi Pj = 0
(3)
Pi = Pi I = Pi (P1 + P2 + + Pn ) = P2i
(4)
(A i I)Pi = p(A) = 0

APi = i Pi

again using the Cayley Hamilton theorem.


(5)
A = AI = A(P1 + P2 + + Pn ) = 1 P1 + n Pn
(6)
Ak = (1 P1 + n Pn )k = k1 Pk1 + kn Pkn = k1 P1 + kn Pn

Linear Algebra and Differential EquationsLecture 22 Applications


Julyof27,
systems
2016 of differential
14 / 18 e

Using projection matrices to solve DEs


Because of property (6) of the projection matrices
e At = e 1 t P1 + e 2 t P2 + + e n t Pn
For example to solve the IVP

1 1 1
x0 = 0 2 1 x
1 1 3

3
x(0) = 2
1

the characteristic equation for A is


3 62 + 11 6 = 0 = 1, 2, 3

0 1 1
1 1 1
0 1
AI= 0 1 1
A 2I = 0
1 1 2
1 1 1

Linear Algebra and Differential EquationsLecture 22 Applications


Julyof27,
systems
2016 of differential
15 / 18 e

2 1 1
A 3I = 0 1 1
1 1 0

3 3 0
1
(A 2I)(A 3I)
= 1 1 0
P1 =
(1 2)(1 3)
2
1 1 0

1 2 1
(A I)(A 3I)
P2 =
= 1 2 1
(2 1)(2 3)
0 0 0

1 1 2
(A I)(A 2I)
1
1 1 2
P3 =
=
(3 1)(3 2)
2
1 1 2

Linear Algebra and Differential EquationsLecture 22 Applications


Julyof27,
systems
2016 of differential
16 / 18 e

The fundamental matrix is


e At

= e t P1 + e 2t P2 + e 3t P3
3 t
1 3t
2t
32 e t + 2e 2t 12 e 3t
2e e + 2e

1 t
1 3t
2t
=
12 e t + 2e 2t 12 e 3t
2e e + 2e

1 t
1 3t
21 e t + 12 e 3t
2e 2e

e 2t + e 3t

e 2t

e 3t

e 3t

and the solution to the IVP is

15 t
2 e

2 =

5 t
2e

x=e

At

6e 2t + 32 e 3t

3 3t
2e

6e 2t

52 e t + 32 e 3t

Linear Algebra and Differential EquationsLecture 22 Applications


Julyof27,
systems
2016 of differential
17 / 18 e

Another example
Solve the IVP
 0 
 
x
5 3
x
=
y
2 4
y

x(0)
y (0)


=

1
2

the characteristic equation is


2 + 9 + 14 = 0
= 2, 7




A (7)I
1 2 3
1 3 3
A (2)I
P2 =
=
=
P7 =
2 2
2 (7)
5 2 3
7 (2)
5
 2t

1 2e
+ 3e 7t 3e 2t 3e 7t
At
2t
7t
e = e P2 + e P7 =
5 2e 2t 2e 7t 3e 2t + 2e 7t
and the solution is
1
x = e x(0) =
5
At

e 2t + 9e 7t
e 2t 6e 7t

Linear Algebra and Differential EquationsLecture 22 Applications


Julyof27,
systems
2016 of differential
18 / 18 e

You might also like