You are on page 1of 15

Math 133A, Week 12:

Nonhomogeneous Systems

Section 1: Fundamental Matrices


Consider the problem of determining the particular solution for an ensemble
of initial conditions. For instance, suppose we are considering the differential
equation
dx
= −x + 3y
dt (1)
dy
= 3x − y
dt
which we know has the general solution
     
x(t) −1 1
= C1 e−4t + C2 e2t .
y(t) 1 1

Suppose, however, that instead of determining the particular solution for


a single initial condition x(0) = x0 , y(0) = y0 , we wish to determine an
ensemble of particular solutions for a variety conditions. As things stand
now, we are required to solve for C1 and C2 individually each time we wish
to apply an initial condition. This could be a lot of work!
Fortunately, this will not be required, but we will have to make use of
a little linear algebra in order to see how to get around the problem. First
of all, we should recognize that we can write the solution in the equivalent
form
−e−4t e2t
    
x(t) C1
= .
y(t) e−4t e2t C2
In other words, we can write the equation in the matrix form

x(t) = Ψ(t)c (2)

where Ψ(t) is the 2 × 2 matrix with the fundamental solutions x1 (t) and
x2 (t) along the columns.

1
Our goal is to relate the undetermined coefficients c ∈ R2 to the initial
conditions x(0) in general. This equation tells us exactly how to do that!
We have

x(0) = Ψ(0)c =⇒ c = Ψ(0)−1 x(0) = Ψ−1 (0)x0 (3)

where Ψ(0) ∈ R2×2 is the matrix Ψ(t) evaluated at zero and Ψ−1 (0) is the
inverse of this matrix. We can now plug (3) into (2) to get

x(t) = Φ(t)x0 (4)

where Φ(t) = Ψ(t)Ψ−1 (0) ∈ R2×2 . This is exactly what was wanted! Once
we have determined the matrix Φ(t), we have a relationship which immedi-
ately gives the solution x(t) for an arbitrary initial vector x0 .

Definition 1
Consider the initial value problem ẋ = Ax, x(0) = x0 . A matrix Ψ(t) ∈
R2×2 is called a fundamental matrix of the system if it satisfies x(t) =
Ψ(t)c where c ∈ R2 and x(t) is a solution of the system. The matrix
Φ(t) is the fundamental matrix with the property x(t) = Φ(t)x0 .

Note: The fundamental matrix Φ(t) has the following properties:


(1) Φ(0) = I; and (2) Φ0 (t) = AΦ(t). The first property is an important
check for the correctness of our results. The second property follows
from the observation that each column is a solution of ẋ = Ax.

Example 1
Determine the fundamental matrix Φ(t) for the system (1).

Solution: We have
−e−4t e2t
   
−1 1
Ψ(t) = =⇒ Ψ(0) =
e−4t e2t 1 1

2
which implies that

− 12 1
   
−1 1 −1 1 2
Ψ (0) = = 1 1
2 1 1 2 2

It follows that
−e−4t e2t
  
−1 1 −1 1
Φ(t) = Ψ(t)Ψ (0) =
2 e−4t e2t 1 1
e−4t + e2t −e−4t + e2t
 
1
=
2 −e−4t + e2t e−4t + e2t

and therefore the solution can be written in the form x(t) = Φ(t)x0 as
 −4t
+ e2t −e−4t + e2t
   
x(t) 1 e x0
= .
y(t) 2 −e−4t + e2t e−4t + e2t y0

We can easily check that Φ(0) = I by computing


 −4(0)
+ e2(0) −e−4(0) + e2(0)
  
1 e 1 0
Φ(0) = = .
2 −e−4(0) + e2(0) e−4(0) + e2(0) 0 1

As expected, the result relates the solutions directly to the initial con-
ditions. We no longer have to compute the constants C1 and C2 at every
iteration!

Example 2
Determine the fundamental matrix Φ(t) ∈ R2×2 for the system of dif-
ferential equations
dx
= x − 4y
dt
dy
= x − 3y.
dt
Solution: We determined last week that this system of differential
equations has the general solution
         
x(t) 2 2 1
= C1 + C2 t + e−t .
y(t) 1 1 0

3
We now want to determine the fundamental matrix Φ(t) = Ψ(t)Ψ−1 (0)
where Ψ(t) is the matrix with the fundamental solutions above along
the columns. We will have to be a little careful when establishing our
fundamental solutions—they are component-wise coefficients of the un-
determined constants C1 and C2 . In this case, we have that
 −t −t
e + 2te−t

2e
Ψ(t) = .
e−t te−t

It follows that
   
2 1 −1 0 1
Ψ(0) = =⇒ Ψ (0) = .
1 0 1 −2

Consequently, we have

2e−t e−t + 2te−t


  
0 1
Φ(t) = Ψ(t)Ψ−1 (0) =
e−t te−t 1 −2
e−t + 2te−t −t
 
−4te
= −t
te e − 2te−t
−t

Section 2: Matrix Exponentials


The fundamental matrix turns out to be very important when constructing
solutions of more complicated linear system. In order to take this step
forward, however, we will first have to take a step backward. Reconsider the
general linear and homogeneous system
x0 (t) = Ax(t). (5)
If we carry through with our earlier analogy with a single first order equation
of the form x0 (t) = ax(t), we would recognize the general form of the solution
as x(t) = x0 eat . So perhaps there is some sense in which we could write
x(t) = eAt x0
as the solution for our system (5). (Note that this is very close to the solution
x(t) = Φ(t)x0 we just discovered!)
The question then becomes: how might we define eAt ? It should be
clear that we cannot simply take the exponential of each term in the matrix

4
as this does not generally lead a function x(t) which is a solution of (5).
Instead, we recall that the exponential eat can be expanded as the Taylor
series

X (at)n (at)2 (at)3
eat = = 1 + at + + + ···
n! 2! 3!
n=0

This suggests that, instead of defining the matrix exponent eAt directly, we
define it as the infinite series

X 1 n n 1 1
eAt = A t = I + At + A2 t2 + A3 t3 + · · · (6)
n! 2! 3!
n=0

(Notice here that A2 = A · A, A3 = A · A · A, etc.)


We should have some healthy skepticism about this formula. After all, it
is an infinite sum, which we have no hope of computing explicitly. The best
we might hope for is some result regarding convergence. But before we give
up hope on this interpretation entirely, consider the following observation:
It is a solution of the system of differential equation! To check this, we can
simply evaluate. We clearly have
1 2 2
x(0) = eA(0) x0 = (I + A(0) + A (0) + · · · )x0 = x0
2!
so that it satisfies the initial condition. On the left-hand side of the system,
we have
 
d At  d 1 2 2 1 3 3
e x0 = I + At + A t + A t + · · · x0
dt dt 2! 3!
 
2 1 3 2
= A + A t + A t + · · · x0
2!
and on the right-hand side we have
 
1 1
A eAt x0 = A I + At + A2 t2 + A3 t3 + · · · x0

2! 3!
 
2 1 3 2
= A + A t + A t + · · · x0
2!
so it satisfies the differential equation. No matter how uncomfortable (6)
may seem, we cannot escape the implication that it is meaningful! (Whether
it is useful is another discussion entirely.)
Now recall our earlier discussion, where we defined the fundamental ma-
trix Φ(t) = Ψ(t)Ψ−1 (0) and noted that the function x(t) = Φ(t)x0 was a

5
solution of our initial value problem. In other words, we really have two
functions which we are claiming are solutions of the initial value problem

x0 (t) = Ax(t), x(0) = x0 , (7)

specifically, x(t) = eAt x0 and x(t) = Φ(t)x0 . But how can this be? How can
an initial value problem have two solutions? The answer is that it can’t. It
is a well-known fact that the initial value problem (7) always has a unique
solution. We are inescapably drawn to conclude that

eAt = Φ(t). (8)

That is the matrix exponential coincides with the fundamental matrix Φ(t)
with the property Φ(0) = I.

This equation should be surprising! What it will allow us to do is


interpret the fundamental matrix Φ(t) in two ways: a solution of a
linear system of differential equations (right-hand side of (8)), or as a
matrix exponential with many of the properties and intuitions which
come from the standard exponential function (left-hand side of (8)).

Example 3

Determine the matrix exponential eAt for the matrix


 
−1 5
A= .
−2 1

Solution: Without the preceding motivation, we might be a little lost.


By the definition, we have
1 2 2 1
eAt = I + At + A t + A3 t3 + · · ·
2! 3!
which, beyond a few terms, we have no hope of computing explicitly.
Nevertheless, this is the definition—we are now allowed to take the
exponential of A component-wise as this will produce an incorrect result.
What we realize given the previous discussion is that eAt = Φ(t)
where Φ(t) is the particular fundamental solution of the differential

6
equation
dx
= Ax
dt
with the property Φ(0) = I. In other words, all we need to do is find
Φ(t) for the first-order system

dx
= −x + 5y
dt
dy
= −2x + y.
dt
We found last week that this system had the general solution
    
1 −3
x(t) = C1 cos(3t) − sin(3t)
2 0
    
1 −3
+ C2 sin(3t) + cos(3t) .
2 0

The fundamental matrix Ψ(t) is therefore given by


 
cos(3t) + 3 sin(3t) −3 cos(3t) + sin(3t)
Ψ(t) =
2 cos(3t) 2 sin(3t)

so that
   
1 −3 1 0 3
Ψ(0) = =⇒ Ψ(0)−1 = .
2 0 6 −2 1

It follows that
  
At 1 cos(3t) + 3 sin(3t) −3 cos(3t) + sin(3t) 0 3
e = Φ(t) =
6 2 cos(3t) 2 sin(3t) −2 1
 
1 6 cos(3t) − 2 sin(3t) 10 sin(3t)
=
6 −4 sin(3t) 6 cos(3t) + 2 sin(3t)
cos(3t) − 13 sin(3t) 5
 
3 sin(3t)
=
− 32 sin(3t) cos(3t) + 13 sin(3t)

Notice that, as expected, we have eA(0) = Φ(0) = I. We have accom-


plished our task, without having to ever directly consider properties of
the matrix exponential eAt !

7
Section 3: Nonhomogeneous Systems
Consider being asked to solve the differential equation
dx
=1−x
dt (9)
dy
= 1 + x − 2y
dt
by using the matrix algebra methods we have been employing over the past
two weeks.
We can rewrite the left-hand side as a vector derivative x0 (t) = (x0 (t), y 0 (t))
and collect most of the right-hand side as
  
−1 0 x(t)
Ax = .
1 −2 y(t)

This, however, does not incorporate all of terms in the equation since the
1’s do not fit into either of these forms. The best we can do is write them
as a separate vector, so that we have
 0      
x (t) −1 0 x(t) 1
0 = + .
y (t) 1 −2 y(t) 1

This is a new class of systems of differential equations, which we now for-


mally define.

Definition 2
A linear nonhomogeneous system of differential equations is one
which can be written in the form
dx
= Ax + g(t) (10)
dt
where A ∈ R2×2 is a matrix of constants and g(t) ∈ R2 may depend
upon t.

8
Note: A system of differential equations is called homogeneous if
there are no terms which do not involve the state variable or its deriva-
tives (in this case, x). Although we did not identify them this way, the
systems x0 (t) = Ax(t) considered so far were all homogeneous.

To motivate how we might solve such an equation as (10), consider one


of the first integration techniques we learned for first-order differential equa-
tions. When we considered
dx
= ax(t) + g(t)
dt
we recognized that we could re-arrange the expression as
dx
− ax(t) = g(t)
dt
and then obtain the integrating factor
R
−a dt
µ(t) = e = e−at

so that we could write


d  −at
e x(t) = e−at g(t).

dt
We could then integrate and solve for x(t) to get
Z
x(t) = Ceat + eat e−at g(t) dt.

There is nothing stopping us from attempting this technique with our


linear system (10)! We may write the expression as
dx
− Ax(t) = g(t)
dt
and then obtain the integrating factor µ(t) = e−At . We then obtain
d  −At
x(t) = e−At g(t).

e
dt
We can integrate and solve for x(t) to obtain
Z
At
x(t) = e c + e At
e−At g(t) dt. (11)

9
If we had encountered this solution before our previous discussion of
matrix exponentials, we would be very distressed. We now know, however,
that eAt = Φ(t) where Φ(t) is the fundamental matrix of the corresponding
homogeneous system
dx
= Ax
dt
which satisfies also Φ(0) = I. We also know Φ(t) can be computed from an
arbitrary fundamental matrix Ψ(t) by the formula Φ(t) = Ψ(t)Ψ−1 (0).
We can take advantage of this intuition to rewrite (10) in a computable
form. In order to do this, we will use the property e−At = [eAt ]−1 = Φ−1 (t)
(true, but beyond the scope of this course), and substitute back from Φ(t) to
an arbitrary fundamental matrix Ψ(t). We arrive at the following formula:
Z
x(t) = Ψ(t)c + Ψ(t) Ψ−1 (s)g(s) ds (12)

where c = (C1 , C2 ).
As with homogeneous systems, we can use the fundamental matrix Φ(t)
to obtain a direct relationship between the solution x(t) and the initial
condition x0 . We have the following formula:
Z t
x(t) = Φ(t)x0 + Φ(t) Φ−1 (s)g(s) ds. (13)
0

With this formula, however, we will have to be careful to integrate from


s = 0 to s = t when constructing the solution (13). That is, we have to
compute a definite integral rather than an indefinite one. In general, it will
be easier to use an arbitrary fundamental matrix in (12) and then solve for
the constants C1 and C2 directly.

Example 4
Use the system formulation to solve the following initial value problem:
dx
= 1 − x, x(0) = 0
dt (14)
dy
= 1 + x − 2y, y(0) = 1.
dt
Solution: We start by solving the linear system of differential equations

10
x0 (t) = Ax(t) with the matrix
 
−1 0
A= .
1 −2

We can quickly compute that the characteristic polynomial is (−1 −


λ)(−2 − λ) = 0 so that λ1 = −1 and λ2 = −2. For λ1 = −1 we have
the eigenvector v1 = (1, 1) and for λ2 = −2 we have the eigenvector
v2 = (0, 1). It follows that the general solution is
   
1 −t 0
x(t) = C1 e + C2 e−2t .
1 1

This gives the fundamental matrix


 −t 
e 0
Ψ(t) = .
e−t e−2t

We quickly derive that

e−2t et
   
−1 1 0 0
Ψ (t) = −t =
e−3t −e e−t −e 2t e2t

where det(Ψ(t)) = e−t e−2t − (0)e−t = e−3t . We then set up

et
Z Z   
−1 0 1
Ψ (t)g(t) dt = 2t 2t dt
−e e 1
Z  t 
e
= dt
0
 t 
e
=
0

where we have ignored the constants because they already appear in the
final form (13). It follows that we have
Z  −t  t   
−1 e 0 e 1
Ψ(t) Ψ (t)g(t) dt = −t −2t = .
e e 0 1

11
The general solution is therefore
Z
x(t) = Ψ(t)c + Ψ(t) Ψ−1 (t)g(t) dt
 −t    
e 0 C1 1
= −t −2t + .
e e C2 1

The initial conditions x(0) = 0 and y(0) = 1 give the system


      
0 1 0 C1 1
= + .
1 1 1 C2 1

It follows that we have


0 = C1 + 1
1 = C1 + C2 + 1

so that C1 = −1 and C2 = 1. We therefore obtain the solution

x(t) = 1 − e−t
y(t) = 1 − e−t + e−2t

as we had before. Despite the amount of work we have done, we should


be encouraged that none of the individual steps were particularly chal-
lenging, and that the result obtained is consistent with our earlier work!

Example 5
Find the solution of the following initial value problem
dx
= −4x − 3y + e−t , x(0) = 0
dt
dy
= 3x + 2y + e−t , y(0) = 0.
dt
Solution: We start by rewriting the system as
 0      −t 
x (t) −4 −3 x(t) e
0 = + .
y (t) 3 2 y(t) e−t

12
We first solve the homogeneous equation x0 (t) = Ax(t) where
 
−4 −3
A= .
3 2

We have the characteristic polynomial (−4−λ)(2−λ)+9 = λ2 +2λ+1 =


(λ + 1)2 = 0 so that λ = −1. Since we have a repeated root, we need to
find a regular and generalized eigenvector. We can see that (A+I)v = 0
gives    
−3 −3 0 1 1 0
−→
3 3 0 0 0 0
so that v1 + v2 = 0. Setting v2 = 1, we have v = (−1, 1). Since we
have only obtained a single eigenvector, we must solve the equation
(A + I)w = v. This gives

1 1 13
   
−3 −3 −1
−→ .
3 3 1 0 0 0

It follows that we have w1 + w2 = 13 . Setting w2 = 0 we have w1 = 13


so we have w = ( 13 , 0). We therefore have the general solution to the
homogeneous system
       1 
−1 −1
x(t) = C1 + C2 t + 3 e−t .
1 1 0

It follows that the fundamental matrix Ψ(t) is given by

−e−t 13 e−t − te−t


 
Ψ(t) =
e−t te−t

so that
 −t
− 13 e−t + te−t

−1 1 te
Ψ (t) = 1 −2t
− e −e−t −e−t
 3
−3tet et − 3tet

= .
3et 3et

13
It follows that we have
−3tet et − 3tet e−t
  
Ψ−1 (t)g(t) =
3et 3et e−t
 
−6t + 1
=
6

We therefore have
−3t2 + t
Z Z    
−1 −6t + 1
Ψ(t) g(t) dt = dt =
6 6t

so that
−e−t 1 −t
− te−t −3t2 + t
Z   
Ψ(t) −1
Ψ(s) g(s) ds = 3e
e−t te−t 6t
−3t2 e−t + te−t
 
= .
3t2 e−t + te−t

It follows that the general solution is given by


Z
x(t) = Ψ(t)c + Ψ(t) Ψ−1 (s)g(s) ds

−e−t 31 e−t − te−t −3t2 e−t + te−t


      
x(t) C1
=⇒ = + .
y(t) e−t te−t C2 3t2 e−t + te−t

The initial conditions x(0) = 0 and y(0) = 0 give

−1 13
      
0 C1 0
= + .
0 1 0 C2 0

It follows that C1 = C2 = 0. The particular solution is therefore

x(t) = −3t2 e−t + te−t


y(t) = 3t2 e−t + te−t .

14
Suggested Problems
1. Determine the fundamental matrix Φ(t) for the following systems of
differential equations (all derivatives with respect to t):
x0 = x − 4y x0 = −x + 9y
 
(a) (c)
y 0 = −y y 0 = −x − 7y
x0 = 7x + 4y x0 = 3x − 5y
 
(b) (d)
y 0 = −6x − 3y y0 = x + y

2. Use the system formulation to solve the following initial value prob-
lems:
dx


 = 2 − 2x, x(0) = 1
(a) dt
dy
= x − y, y(0) = 1.


dt
dx 1


 = −3x + et , x(0) =
(b) dt 4
dy 1
= −4x − y, y(0) = − .


dt 2
dx


 = −2x + 4y + 2, x(0) = 0
(c) dt
dy
= −x + 2y + 1, y(0) = −1.


dt
dx


 = 3x − 2y + t, x(0) = 0
(d) dt
dy
= 5x − 3y, y(0) = 0.


dt
3. Consider the reversible chemical reaction X  Y with inflow g(t)
of X outflow of Y proportional to its concentration. Assume this
reaction system can be modeled by the following system of differential
equations:
dx


 = 3 − 4x + y
dt (15)
 dy = 4x − 4y.

dt
Determine the solution of the system for the initial conditions x(0) = 1
and y(0) = 1. Interpret the solution in terms of the chemical system
described.

15

You might also like