[Go to the Notes on Diffy Qs home page] [PDF version]
[next] [prev] [prev-tail] [tail] [up]
Note: 1 lecture, §4.1 in EP
Often we do not have just one dependent variable and one equation. And as we will see, we may end up with systems of several equations and several dependent variables even if we start with a single equation.
If we have several dependent variables, suppose
,
, …,
we can have a differential equation
involving all of them and their derivatives. For example,
. Usually, when we have
two dependent variables we would have two equations such as

and
. We call the above a system of differential equations. More precisely, it is a
second order system. Sometimes a system is easy to solve by solving for one variable and then for the
second variable.
Example 3.1.1: Take the first order system

,
.
We note that
is the general solution of the first equation. We can then plug this
into the
second equation and get the equation
, which is a linear first order equation that is easily
solved for
. By the method of integrating factor we get
![]() |
or
. The general solution to the system is, therefore,

and
given the initial conditions. We substitute
and find that
and
.
Generally, we will not be so lucky to be able to solve like in the first example, and we will have to solve for all variables at once.
As an example application, let us think of mass and spring systems again. Suppose we have one spring
with constant
but two masses
and
. We can think of the masses as carts, and we will suppose
that they ride along with no friction. Let
be the displacement of the first cart and
be the
displacement of the second cart. That is, we put the two carts somewhere with no tension on the spring,
and we mark the position of the first and second cart and call those the zero position. That is,
is a
different position on the floor than the position corresponding to
. The force exerted by
the spring on the first cart is
, since
is how far the string is stretched (or
compressed) from the rest position. The force exerted on the second cart is the opposite, thus the
same thing with a negative sign. Newton’s second law states that force equals mass times
acceleration.

In this system we cannot solve for the
variable separately. That we must solve for both
and
at once is intuitively obvious, since where the first cart goes depends exactly on where the second cart
goes and vice-versa.
Before we talk about how to handle systems, let us note that in some sense we need only consider first
order systems. Take an
order differential equation
![]() |
Define new variables
and write the system

,
, …,
. Once you have solved for the
’s, you can discard
through
and let
. We note that this
solves the original equation.
A similar process can be followed for a system of higher order differential equations. For example, a
system of
differential equations in
unknowns, all of order
, can be transformed into a first order
system of
equations and
unknowns.
Example 3.1.2: Sometimes we can use this idea in reverse as well. Let us take the system
![]() |
where the independent variable is
. We wish to solve for the initial conditions
,
.
We first notice that if we differentiate the first equation once we get
and now we know what
is in terms of
and
.
![]() |
So we now have an equation
. We know how to solve this equation and we find that
. Once we have
we can plug in to get
.
![]() |
We solve for the initial conditions
and
. Hence,
and
. So
and
. Our solution is
![]() |
It is useful to go back and forth between systems and higher order equations for other reasons. For example, the ODE approximation methods are generally only given as solutions for first order systems. It is not very hard to adapt the code for the Euler method for a first order equation to first order systems. We essentially just treat the dependent variable not as a number but as a vector. In many mathematical computer languages there is almost no distinction in syntax.
In fact, this is what IODE was doing when you had it solve a second order equation numerically in the IODE Project III if you have done that project.
The above example was what we will call a linear first order system, as none of the dependent
variables appear in any functions or with any higher powers than one. It is also autonomous as the
equations do not depend on the independent variable
.
For autonomous systems we can easily draw the so-called direction field or vector field. That is, a plot
similar to a slope field, but instead of giving a slope at each point, we give a direction (and
a magnitude). The previous example
,
says that at the point
the
direction in which we should travel to satisfy the equations should be the direction of the
vector
with the speed equal to the magnitude of this vector. So we draw the vector
based at the point
and we do this for many points on the
-plane. We may
want to scale down the size of our vectors to fit many of them on the same direction field. See
Figure 3.1.
We can now draw a path of the solution in the plane. That is, suppose the solution is given by
,
, then we can pick an interval of
(say
for our example) and plot all the
points
for
in the selected range. The resulting picture is usually called the phase portrait (or
phase plane portrait). The particular curve obtained we call the trajectory or solution curve. An example
plot is given in Figure 3.2. In this figure the line starts at
and travels along the vector field for a
distance of 2 units of
. Since we solved this system precisely we can compute
and
. We get
that
and
. This point corresponds to the top right end of the plotted solution
curve in the figure.
,
.
,
with the trajectory of the
solution starting at
for
.
Notice the similarity to the diagrams we drew for autonomous systems in one dimension. But now note how much more complicated things become if we allow just one more dimension.
Also note that we can draw phase portraits and trajectories in the
-plane even if the system is not
autonomous. In this case however we cannot draw the direction field, since the field changes as
changes. For each
we would get a different direction field.
Note: 1 and a half lectures, first part of §5.1 in EP
Before we can start talking about linear systems of ODEs, we will need to talk about matrices, so let us
review these briefly. A matrix is an
array of numbers (
rows and
columns). For example, we
denote a
matrix as follows
![]() |
By a vector we will usually mean a column vector which is an
matrix. If we mean a row vector
we will explicitly say so (a row vector is a
matrix). We will usually denote matrices by upper case
letters and vectors by lower case letters with an arrow such as
or
. By
we will mean the vector of
all zeros.
It is easy to define some operations on matrices. Note that we will want
matrices to really act
like numbers, so our operations will have to be compatible with this viewpoint.
First, we can multiply by a scalar (a number). This means just multiplying each entry by the same number. For example,
![]() |
Matrix addition is also easy. We add matrices element by element. For example,
![]() |
If the sizes do not match, then addition is not defined.
If we denote by 0 the matrix of with all zero entries, by
,
some scalars, and by
,
,
some
matrices, we have the following familiar rules.

Another operation which is useful for matrices is the so-called transpose. This operation just swaps
rows and columns of a matrix. The transpose of
is denoted by
. Example:
![]() |
Let us now define matrix multiplication. First we define the so-called dot product (or inner product) of two vectors. Usually this will be a row vector multiplied with a column vector of the same size. For the dot product we multiply each pair of entries from the first and the second vector and we sum these products. The result is a single number. For example,
![]() |
And similarly for larger (or smaller) vectors.
Armed with the dot product we can define the product of matrices. First let us denote by
the
row of
and by
the
column of
. Now for an
matrix
and an
matrix
we can define the product
. We let
be an
matrix whose
entry
is
![]() |
Do note how the sizes match up. Example:
![]() |
For multiplication we will want an analogue of a 1. This is the so-called identity matrix. The identity
matrix is a square matrix with 1s on the main diagonal and zeros everywhere else. It is usually denoted by
. For each size we have a different identity matrix and so sometimes we may denote the size as a
subscript. For example, the
would be the
identity matrix
![]() |
We have the following rules for matrix multiplication. Suppose that
,
,
are matrices of the
correct sizes so that the following make sense. Let
denote a scalar (number).

A few warnings are in order however.
in general (it may be true by fluke sometimes). That is, matrices do not commute.
does not necessarily imply
even if
is not 0.
does not necessarily mean that
or
. For the last two items to hold we would need to essentially “divide” by a matrix. This is where matrix
inverse comes in. Suppose that
is an
matrix and that there exists another
matrix
such
that
![]() |
Then we call
the inverse of
and we denote
by
. If the inverse of
exists,
then we call
invertible. If
is not invertible we say
is singular or just say it is not
invertible.
If
is invertible, then
does imply that
(this also means that the inverse is unique).
We just multiply both sides by
to get
or
or
. It is also not hard to
see that
.
We can now talk about determinants of square matrices. We define the determinant of a
matrix as
the value of its own entry. For a
matrix we define
![]() |
Before trying to compute determinant for larger matrices, let us first note the meaning of the
determinant. Consider an
matrix as a mapping of
to
. For example, a
matrix
is a mapping of the plane where
gets sent to
. Then the determinant of
is
then the factor by which the volume of objects gets changed. For example, if we take the unit
square (square of sides 1) in the plane, then
takes the square to a parallelogram of area
. The sign of
denotes changing of orientation (if the axes got flipped). For
example,
![]() |
Then
. Now let us see where the square with vertices
,
,
, and
gets sent. Obviously
gets sent to
. Now
![]() |
So it turns out that the image of the square is another square. This one has a side of length
and is
therefore of area 2.
If you think back to high school geometry, you may have seen a formula for computing
the area of a parallelogram with vertices
,
,
and
. And it is
precisely
![]() |
The vertical lines here mean absolute value. The matrix
carries the unit square to the given
parallelogram.
Now we can define the determinant for larger matrices. We define
as the matrix
with the
row and the
column deleted. To compute the determinant of a matrix, pick one row, say the
row
and compute.
![]() |
For example, for the first row we get
![]() |
We alternately add and subtract the determinants of the submatrices
for a fixed
and all
. For example,
for a
matrix, picking the first row, we would get
.
For example,
![]() |
The numbers
are called cofactors of the matrix and this way of computing the
determinant is called the cofactor expansion. It is also possible to compute the determinant by expanding
along columns (picking a column instead of a row above).
Note that a common notation for the determinant is a pair of vertical lines.
![]() |
I personally find this notation confusing since vertical lines for me usually mean a positive quantity, while determinants can be negative. So I will not ever use this notation in these notes.
One of the most important properties of determinants (in the context of this course) is the following theorem.
In fact, we have a formula for the inverse of a
matrix
![]() |
Notice the determinant of the matrix in the denominator of the fraction. The formula only works if the determinant is nonzero, otherwise we are dividing by zero.
One application of matrices we will need is to solve systems of linear equations. This may be best shown by example. Suppose that we have the following system of linear equations

Without changing the solution, we could swap equations in this system, we could multiply any of the equations by a nonzero number, and we could add a multiple of one equation to another equation. It turns out these operations always suffice to find a solution.
It is easier to write the system as a matrix equation. Note that the system can be written as
![]() |
To solve the system we put the coefficient matrix (the matrix on the left hand side of the equation) together with the vector on the right and side and get the so-called augmented matrix
![]() |
We then apply the following three elementary operations.
We will keep doing these operations until we get into a state where it is easy to read off the answer or until we
get into a contradiction indicating no solution, for example if we come up with an equation such as
.
Let us work through the example. First multiply the first row by
to obtain
![]() |
Now subtract the first row from the second and third row.
![]() |
Multiply the last row by
and the second row by
.
![]() |
Swap rows 2 and 3.
![]() |
Subtract the last row from the first, then subtract the second row from the first.
![]() |
If we think about what equations this augmented matrix represents, we see that
,
, and
. We try this solution in the original system and, voilą, it works!
If we write this equation in matrix notation as
![]() |
where
is the matrix
and
is the vector
. The solution can be also computed with the
inverse,
![]() |
One last note to make about linear systems of equations is that it is possible that the solution is not
unique (or that no solution exists). It is easy to tell if a solution does not exist. If during the row reduction
you come up with a row where all the entries except the last one are zero (the last entry in a row
corresponds to the right hand side of the equation) the system is inconsistent and has no solution. For
example if for a system of 3 equations and 3 unknowns you find a row such as
in the
augmented matrix, you know the system is inconsistent.
You generally try to use row operations until the following conditions are satisfied. The first nonzero entry in each row is called the leading entry.
Such a matrix is said to be in reduced row echelon form. The variables corresponding to columns with no leading entries are said to be free variables. Free variables mean that we can pick those variables to be anything we want and then solve for the rest of the unknowns.
Example 3.2.1: The following augmented matrix is in reduced row echelon form.
![]() |
If the variables are named
,
, and
, then
is the free variable and
and
.
On the other hand if during the row reduction process you come up with the matrix
![]() |
there is no need to go further. The last row corresponds to the equation
which is
preposterous. Hence, no solution exists.
If the coefficient matrix is square and there exists a unique solution
to
for any
, then
is
invertible. In fact by multiplying both sides by
you can see that
. So it is useful to
compute the inverse, if you want to solve the equation for many different right hand sides
.
The
inverse is basically given by a formula, but it is not hard to also compute inverses of larger
matrices. While we will not have too much occasion to compute inverses for larger matrices than
by hand, let us touch on how to do it. Finding the inverse of
is actually just solving a bunch of linear
equations. If you can solve
where
is the vector with all zeros except a 1 at the
position,
then the inverse is the matrix with the columns
for
(exercise: why?). Therefore, to find
the inverse we can write a larger
augmented matrix
, where
is the identity. If
you do row reduction and put the matrix in reduced row echelon form, then the matrix will
be of the form
if and only if
is invertible, so you can just read off the inverse
.
Exercise 3.2.4: Compute determinant of
. Hint: expand along the proper row or column
to make the calculations simpler.
Exercise 3.2.6: For which
is
not invertible? Is there only one such
? Are there
several? Infinitely many.
Note: less than 1 lecture, second part of §5.1 in EP
First let us talk about matrix or vector valued functions. This is essentially just a matrix whose entries
depend on some variable. Let us say the independent variable is
. Then a vector valued function
is
really something like
![]() |
Similarly a matrix valued function is something such as
![]() |
We can talk about the derivative
or
and this is just the matrix valued function whose
entry
is
.
Rules of differentiation of matrix valued functions are similar to rules for normal functions. Let
and
be matrix valued functions. Let
a scalar and
be a constant matrix. Then

A first order linear system of ODEs is a system which can be written as
![]() |
Where
is a matrix valued function, and
and
are vector valued functions. We will often suppress
the dependence on
and only write
. A solution is of course a vector valued function
satisfying the equation.
For example, the equations

![]() |
We will mostly concentrate on equations that are not just linear, but are in fact constant coefficient
equations. That is, the matrix
will be a constant and not depend on
.
When
(the zero vector), then we say the system is homogeneous. For homogeneous
linear systems we still have the principle of superposition, just like for single homogeneous
equations.
Theorem 3.3.1 (Superposition). Let
be a linear homogeneous system of ODEs. Suppose that
are
solutions of the equation, then
![]() | (3.1) |
is also a solution. If furthermore this is a system of
equations (
is
), and
are
linearly independent. Then every solution can be written as (3.1).
Linear independence for vector valued functions is essentially the same as for normal functions.
are linearly independent if and only if
![]() |
has only the solution
.
The linear combination
could always be written as
![]() |
where
is the matrix with columns
, and
is the column vector with entries
.
is called the fundamental matrix, or fundamental matrix solution.
To solve nonhomogeneous first order linear systems. We apply the same technique as we did before.
Theorem 3.3.2. Let
be a linear system of ODEs. Suppose
is one particular solution.
Then every solution can be written as
![]() |
where
is a solution to the associated homogeneous equation (
).
So the procedure will be exactly the same. We find a particular solution to the nonhomogeneous equation, then we find the general solution to the associated homogeneous equation and we add the two.
Alright, suppose you have found the general solution
. Now you are given an initial
condition of the form
for some constant vector
. Suppose that
is the fundamental matrix
solution of the associated homogeneous equation (i.e. columns of
are solutions). The general solution
is written as
![]() |
Then we are seeking a vector
such that
![]() |
Or in other words we are solving the nonhomogeneous system of linear equations
![]() |
for
.
Example 3.3.1: In §3.1 we solved the following system

,
.
This is a homogeneous system, so
. We write the system as
![]() |
We found the general solution was
and
. Hence in matrix notation, the
fundamental matrix solution is
![]() |
It is not hard to see that the columns of this matrix are linearly independent. To see this, just plug in
and note that the two constant vectors are already linearly independent here.
Hence to solve the initial problem we solve the equation
![]() |
or in other words,
![]() |
After a single elementary row operation we find that
. Hence our solution is
![]() |
This agrees with our previous solution.
Exercise 3.3.2: a) Verify that the system
has the two solutions
and
.
b) Write down the general solution. c) Write down the general solution in the form
,
(i.e. write down a formula for each element of the solution).
Exercise 3.3.4: Verify that
and
and
are linearly independent. Hint: You
must be a bit more tricky than in the previous exercise.
Note: 2 lectures, §5.2 in EP
In this section we will learn how to solve linear homogeneous constant coefficient systems of ODEs by the eigenvalue method. Suppose you have a linear constant coefficient homogeneous system
![]() |
Now suppose we try to adapt the method for single constant coefficient equations by trying the function
. However,
is a vector. So we try
, where
is an arbitrary constant vector. We plug into the
equation to get
![]() |
We divide by
and notice that we are looking for a
and
that satisfy the equation
![]() |
To solve this equation we need a little bit more linear algebra which we review now.
Let
be a square constant matrix. Suppose there is a scalar
and a nonzero vector
such
that
![]() |
We then call
an eigenvalue of
and
is called the corresponding eigenvector.
If we rewrite the equation for an eigenvalue as
![]() |
We notice that this has a nonzero solution
only if
is not invertible. Were it invertible, we could
write
which implies
. Therefore,
has the eigenvalue
if
and only if
solves the equation
![]() |
Note that this means that we will be able to find an eigenvalue without finding the corresponding
eigenvector. The eigenvector will have to be found later, once
is known.
Note that for an
matrix, the polynomial we get by computing
will be of degree
,
and hence we will in general have
eigenvalues.
To find an eigenvector corresponding to
, we write
![]() |
and solve for a nontrivial (nonzero) vector
. If
is an eigenvalue, this will always be possible.
Example 3.4.3: Find the eigenvector of
corresponding to the eigenvalue
.
We write
![]() |
It is easy to solve this system of linear equations. Write down the augmented matrix
![]() |
and perform row operations (exercise: which ones?) until you get
![]() |
The equations the entries of
have to satisfy are, therefore,
,
, and
is a free
variable. We can pick
to be arbitrary (but nonzero) and let
and of course
. For
example,
. We try this:
![]() |
Yay! It worked.
Exercise 3.4.1 (easy): Are the eigenvectors unique? Can you find a different eigenvector for
in the example above? How does it relate to the other eigenvector?
Exercise 3.4.2: Note that when the matrix is
you do not need to write down the augmented
matrix when computing eigenvectors (if you have computed the eigenvalues correctly). Can you
see why? Try it for the matrix
.
OK. We have the equation
![]() |
We find the eigenvalues
,
, …,
of the matrix
, and the corresponding eigenvectors
,
, …,
. Now we notice that the functions
,
, …,
are solutions of the equation and hence
is a solution.
Theorem 3.4.1. Take
. If
is
and has
distinct real eigenvalues,
, …,
then there
are
linearly independent corresponding eigenvectors
, …,
, and the general solution to the ODE
can be written as.
![]() |
Example 3.4.4: Suppose we take the system
![]() |
Find the general solution.
We have found the eigenvalues
earlier. We have found the eigenvector
for the eigenvalue
3. In similar fashion we find the eigenvector
for the eigenvalue 1 and
for the eigenvalue 2
(exercise: check). Hence our general solution is
![]() |
Note: If you write a homogeneous linear constant coefficient
order equation as a first order system
(as we did in §3.1) then the eigenvalue equation
![]() |
is essentially the same as the characteristic equation we got in §2.2 and §2.3.
A matrix might very well have complex eigenvalues even if all the entries are real. For example, suppose that we have the system
![]() |
Let us compute the eigenvalues of the matrix
.
![]() |
Thus
. The corresponding eigenvectors will also be complex. First take
,
![⃗
([P - (1]- i)I)⃗v = 0,
i 1
-1 i⃗v = ⃗0.](diffyqs2150x.png)
and
are multiples of each other. So we only
need to consider one of them. After picking
, for example, we have the eigenvector
. In similar fashion we find that
is an eigenvector corresponding to the eigenvalue
.
We could write the solution as
![]() |
But then we would need to look for complex values
and
to solve any initial conditions. And even
then it is perhaps not completely clear that we get a real solution. We could use Euler’s formula
here and do the whole song and dance we did before, but we will do something a bit smarter
first.
We claim that we did not have to look for the second eigenvector (nor for the second eigenvalue). All
complex eigenvalues come in pairs (because the matrix
is real).
First a small side note. The real part of a complex number
can be computed as
, where the bar
above
means
. This operation is called the complex conjugate. Note that for a real
number
,
. Similarly we can bar whole vectors or matrices. If a matrix
is real then
. We
note that
. Or
![]() |
So if
is an eigenvector corresponding to eigenvalue
, then
is an eigenvector corresponding to
eigenvalue
.
Now suppose that
is a complex eigenvalue of
,
the corresponding eigenvector and
hence
![]() |
is a solution (complex valued) of
. Then note that
and hence
![]() |
is also a solution. The function
![]() |
is also a solution. And it is real valued! Similarly as
is the imaginary part we find
that
![]() |
is also a real valued solution. It turns out that
and
are linearly independent.
Returning to our problem, we take
![]() |
It is easy to see that
![[ t ]
Re ⃗x1 = e sin t ,
etco st
[ et cost ]
Im ⃗x1 = t ,
-e sin t](diffyqs2188x.png)
The general solution is
![]() |
This solution is real valued for real
and
. Now we can solve for any initial conditions that we
have.
The process is this. When you have complex eigenvalues, you notice that they always come in pairs.
You take one
from the pair, you find the corresponding eigenvector
. You note that
and
are also solutions to the equation, are real valued and are linearly
independent. You go on to the next eigenvalue which is either a real eigenvalue or another complex
eigenvalue pair. Hence, you will end up with
linearly independent solutions if you had
distinct
eigenvalues (real or complex).
You can now find a real valued general solution to any homogeneous system where the matrix has distinct eigenvalues. When you have repeated eigenvalues, matters get a bit more complicated and we will look at that situation in §3.7.
Exercise 3.4.6: a) Find the general solution of
,
using the eigenvalue method
(first write the system in the form
). b) Solve the system by solving each equation
separately and verify you get the same general solution.
Exercise 3.4.8: Find the general solution of
,
using the eigenvalue
method. Do not use complex exponentials in your solution.
Note: 1 lecture, should really be in EP §5.2, but is in EP §6.2
Let us take a moment to talk about homogeneous systems in the plane. We want to think about how the
vector fields look and how this depends on the eigenvalues. So we have a
matrix
and the
system
![]() | (3.2) |
We will be able to visually tell how the vector field looks once we find the eigenvalues and eigenvectors of the matrix.
Figure 3.3: Eigenvectors of
.
Case 1. Suppose that the eigenvalues are real and positive. Find the two eigenvectors and plot them in
the plane. For example, take the matrix
. The eigenvalues are 1 and 2 and the corresponding
eigenvectors are
and
. See Figure 3.3.
Now suppose that
and
are on the line determined by an eigenvector
for an eigenvalue
. That
is,
for some scalar
. Then
![]() |
The derivative is a multiple of
and hence points along the line determined by
. As
, the
derivative points in the direction of
when
is positive and in the opposite direction when
is
negative. Let us draw arrows on the lines to indicate the directions. See Figure 3.4.
We fill in the rest of the arrows and we also draw a few solutions. See Figure 3.5. You will notice that the picture looks like a source with arrows coming out from the origin. Hence we call this type of picture a source or sometimes an unstable node.
with
directions.
Case 2. Suppose both eigenvalues were negative. For example, take the negation of the matrix in case
1,
. The eigenvalues are
and
and the corresponding eigenvectors are the same,
and
. The calculation and the picture are almost the same. The only difference is that the eigenvalues are
negative and hence all arrows are reversed. We get the picture in Figure 3.6. We call this kind of picture a
sink or sometimes a stable node.
Case 3. Suppose one eigenvalue is positive and one is negative. For example the matrix
. The
eigenvalues are 1 and
and the corresponding eigenvectors are the same,
and
. We reverse
the arrows on one line (corresponding to the negative eigenvalue) and we obtain the picture in Figure 3.7.
We call this picture a saddle point.
The next three cases we will assume the eigenvalues are complex. In this case the eigenvectors are also complex and we cannot just plot them on the plane.
Case 4. Suppose the eigenvalues are purely imaginary. That is, suppose the eigenvalues are
. For
example, let
. The eigenvalues turn out to be
and the eigenvectors are
and
. We
take the eigenvalue
and its eigenvector
and note that the real an imaginary parts of
are
![[1 ] [ cos2t ]
Re ei2t = ,
[2i] [-2 sin 2]t
1 i2t sin 2t
Im 2i e = 2cos 2t .](diffyqs2255x.png)
Case 5. Now the complex eigenvalues have positive real part. That is, suppose the eigenvalues are
for some
. For example, let
. The eigenvalues turn out to be
and the
eigenvectors are
and
. We take
and its eigenvector
and find the real and imaginary
of
are
![[ ] [ ]
Re 1 e(1+2i)t = et cos 2t ,
2i -2 sin 2t
[1 ] [ sin 2t ]
Im e(1+2i)t = et .
2i 2cos 2t](diffyqs2267x.png)
in front of the solutions. This means that the solutions grow in magnitude while spinning
around the origin. Hence we get a spiral source. See Figure 3.9.
Case 6. Finally suppose the complex eigenvalues have negative real part. That is, suppose the
eigenvalues are
for some
. For example, let
. The eigenvalues turn out to be
and the eigenvectors are
and
. We take
and its eigenvector
and find
the real and imaginary of
are
![[ ] [ ]
1 (-1-2i)t -t cos2t
R e 2i e = e 2 sin 2t ,
[ ] [ ]
1 (-1-2i)t -t- sin2t
Im 2i e = e 2 cos2t .](diffyqs2278x.png)
in front of the solutions. This means that the solutions shrink in magnitude while spinning
around the origin. Hence we get a spiral sink. See Figure 3.10.
We summarize the behavior of linear homogeneous two dimensional systems in Table 3.1.
| Eigenvalues | Behavior |
| real and both positive | source / unstable node |
| real and both negative | sink / stable node |
| real and opposite signs | saddle |
| purely imaginary | center point / ellipses |
| complex with positive real part | spiral source |
| complex with negative real part | spiral sink |
Exercise 3.5.1: Take the equation
, with
,
,
for the
mass-spring system. a) Convert this to a system of first order equations. b) Classify for what
do you get which behavior. c) Can you explain from physical intuition why you do not get all the
different kinds of behavior here?
Exercise 3.5.2: Can you find what happens in the case when
. In this case the eigenvalue
is repeated and there is only one eigenvector. What picture does this look like?
Exercise 3.5.3: Can you find what happens in the case when
. Does this look like any of
the pictures we have drawn?
Note: more than 2 lectures, §5.3 in EP
While we did say that we will usually only look at first order systems, it is sometimes more
convenient to study the system in the way it arises naturally. For example, suppose we have
3 masses connected by springs between two walls. We could pick any higher number, and
the math would be essentially the same, but for simplicity we pick 3 right now. Let us also
assume no friction, that is, the system is undamped. The masses are
,
, and
and the
spring constants are
,
,
, and
. Let
be the displacement from rest position
of the first mass, and
and
the displacement of the second and third mass. We will
make, as usual, positive values go right (as
grows the first mass is moving right). See
Figure 3.11.
This simple system turns up in unexpected places. Note for example that our world really consists of small particles of matter interacting together. When we try this system with many more masses, we obtain a good approximation to how an elastic material will behave. By somehow taking a limit of the number of masses going to infinity, we obtain the continuous one dimensional wave equation. But we digress.
Let us set up the equations for the three mass system. By Hooke’s law we have that the force acting on the mass equals the spring compression times the spring constant. By Newton’s second law we have that force is mass times acceleration. So if we sum the forces acting on each mass and put the right sign in front of each term, depending on the direction in which it is acting, we end up with the desired system of equations.

![]() |
We write the equation simply as
![]() |
At this point we could introduce 3 new variables and write out a system of 6 equations. We claim this
simple setup is easier to handle as a second order system. We will call
the displacement vector,
the
mass matrix, and
the stiffness matrix.
Exercise 3.6.1: Do this setup for 4 masses (find the matrix
and
). Do it for 5 masses. Can
you find a prescription to do it for
masses?
As before we will want to “divide by
.” In this case this means computing the inverse of
. All
the masses are nonzero and it is easy to compute the inverse, as the matrix is diagonal.
![]() |
This fact follows readily by how we multiply diagonal matrices. You should verify that
as an exercise.
Let
. We look at the system
, or
![]() |
Many real world systems can be modeled by this equation. For simplicity, we will only talk about the given masses-and-springs problem. We try a solution of the form
![]() |
We compute that for this guess,
. We plug our guess into the equation and get
![]() |
We can divide by
to get that
. Hence if
is an eigenvalue of
and
is the
corresponding eigenvector, we have found a solution.
In our example, and in many others, it turns out that
has negative real eigenvalues (and possibly a
zero eigenvalue). So we will study only this case here. When an eigenvalue
is negative, it means that
is negative. Hence there is some real number
such that
. Then
. The
solution we guessed was
![]() |
By taking real and imaginary parts (note that
is real), we find that
and
are linearly
independent solutions.
If an eigenvalue is zero, it turns out that
and
are solutions if
is the corresponding
eigenvector.
Exercise 3.6.2: Show that if
has a zero eigenvalue and
is the corresponding eigenvector,
then
is a solution of
for arbitrary constants
and
.
Theorem 3.6.1. Let
be an
with
distinct real negative eigenvalues we denote by
, and the corresponding eigenvectors by
,
, …,
. If
is invertible (that
is, if
), then
![]() |
is the general solution of
![]() |
for some arbitrary constants
and
. If
has a zero eigenvalue, that is
, and all other
eigenvalues are distinct and negative then the general solution becomes
![]() |
Note that we can use this solution and the setup from the introduction of this section even when some of the masses and springs are missing. For example, when there are say 2 masses and only 2 springs, simply take only the equations for the two masses and set all the spring constants for the springs that are missing to zero.
Example 3.6.1: Suppose we have the system in Figure 3.12, with
,
,
, and
.
The equations we write down are
![]() |
or
![]() |
We find the eigenvalues of
to be
(exercise). Now we find the eigenvectors to be
and
respectively (exercise).
We check the theorem and note that
and
. Hence the general solution
is
![]() |
The two terms in the solution represent the two so-called natural or normal modes of oscillation. And the two (angular) frequencies are the natural frequencies. The two modes are plotted in Figure 3.13.
Let us write the solution as
![]() |
The first term,
![]() |
corresponds to the mode where the masses move synchronously in the same direction.
On the other hand the second term,
![]() |
corresponds to the mode where the masses move synchronously but in opposite directions.
The general solution is a combination of the two modes. That is, the initial conditions determine the amplitude and phase shift of each mode.
Example 3.6.2: Let us do another example. In this example we have two toy rail cars. Car 1 of
mass 2 kg is traveling at 3 m/s towards the second rail car of mass 1 kg. There is a bumper on the
second rail car which engages one the cars hit (it connects to two cars) and does not let go. The
bumper acts like a spring of spring constant
. The second car is 10 meters from a wall.
See Figure 3.14.
We want to ask several question. At what time after the cars link does impact with the wall happen? What is the speed of car 2 when it hits the wall?
OK, let us first set the system up. Let us assume that time
is the time when the two cars link
up. Let
be the displacement of the first car from the position at
, and let
be the
displacement of the second car from its original location. Then the time when
is
exactly the time when impact with wall occurs. For this
,
is the speed at impact. This
system acts just like the system of the previous example but without
. Hence the equation
is
![]() |
or
![]() |
We compute the eigenvalues of
. It is not hard to see that the eigenvalues are 0 and
(exercise). Furthermore, the eigenvectors are
and
respectively (exercise). We note
that
and we use the second part of the theorem to find our general solution to be
![]() |
We now apply the initial conditions. First the cars start at position 0 so
and
. The
first car is traveling at 3 m/s, so
and the second car starts at rest, so
. The first
conditions says
![]() |
It is not hard to see that this implies that
. We plug
and
and differentiate to
get
![]() |
So
![]() |
It is not hard to solve these two equations to find
and
. Hence the position of our cars is
(until the impact with the wall)
![]() |
Note how the presence of the zero eigenvalue resulted in a term containing
. This means that the carts
will be traveling in the positive direction as time grows, which is what we expect.
What we are really interested in is the second expression, the one for
. We have
. See Figure 3.15 for the plot of
versus time.
Just from the graph we can see that time of impact will be a little more than 5 seconds from time zero.
For this you have to solve the equation
. Using a computer (or even a
graphing calculator) we find that
seconds.
As for the speed we note that
. At time of impact (5.22 seconds from
) we
get that
.
The maximum speed is the maximum of
, which is 4. We are traveling at almost the
maximum speed when we hit the wall.
Now suppose that Bob is a tiny person sitting on car 2. Bob has a Martini in his hand and would like to not spill it. Let us suppose Bob would not spill his Martini when the first car links up with car 2, but if car 2 hits the wall at any speed greater than zero, Bob will spill his drink. Suppose Bob can move car 2 a few meters towards or away from the wall (he cannot go all the way to the wall, nor can he get out of the way of the first car). Is there a “safe” distance for him to be in? A distance such that the impact with the wall is at zero speed?
The answer is yes. Looking at Figure 3.15, we note the “plateau” between
and
.
There is a point where the speed is zero. To find it we need to solve
. This is when
or in other words when
and so on. We plug in the first value to
obtain
. So a “safe” distance is about 7 and a quarter meters from the
wall.
Alternatively Bob could move away from the wall towards the incoming car 2 where another safe
distance is
and so on, using all the different
such that
. Of course
is always a solution here, corresponding to
, but that means standing right at the
wall.
Finally we move to forced oscillations. Suppose that now our system is
![]() | (3.3) |
That is, we are adding periodic forcing to the system in the direction of the vector
.
Just like before this system just requires us to find one particular solution
, add it to the general
solution of the associated homogeneous system
and we will have the general solution to
(3.3). Let us suppose that
is not one of the natural frequencies of
, then we can
guess
![]() |
where
is an unknown constant vector. Note that we do not need to use sine since there are only second
derivatives. We solve for
to find
. This is really just the method of undetermined coefficients for
systems. Let us differentiate
twice to get
![]() |
Now plug into the equation
![]() |
We can cancel the cosine and rearrange to obtain
![]() |
So
![]() |
Of course this means that
is invertible. That matrix is invertible if and only if
is not an eigenvalue of
. That is true if and only if
is not a natural frequency of the
system.
Example 3.6.3: Let us take the example in Figure 3.12 with the same parameters as before:
,
,
, and
. Now suppose that there is a force
acting on the
second cart.
The equation is
![]() |
We have solved the associated homogeneous equation before and found the complementary solution to be
![]() |
We note that the natural frequencies were 1 and 2. Hence 3 is not a natural frequency, we can try
. We can invert
![]() |
Hence,
![]() |
Combining with what we know the general solution of the associated homogeneous problem to be we
get that the general solution to
is
![]() |
The constants
,
,
, and
must then be solved for given any initial conditions.
If
is a natural frequency of the system resonance occurs because you will have to try a particular
solution of the form
![]() |
That is assuming that all eigenvalues of the coefficient matrix are distinct. Note that the amplitude of this
solution grows without bound as
grows.
Exercise 3.6.4: Let us take the example in Figure 3.12 with the same parameters as before:
,
, and
, except for
which is unknown. Suppose that there is a force
acting on the first mass. Find an
such that there exists a particular solution where the
first mass does not move.
Note: This idea is called dynamic damping. In practice there will be a small amount of damping and so any transient solution will disappear and after long enough time, the first mass will always come to a stop.
Exercise 3.6.5: Let us take the example 3.6.2, but that at time of impact, cart 2 is moving to the left at the speed of 3 m/s. a) Find the behavior of the system after linkup. b) Will the second car hit the wall, or will it be moving away from the wall as time goes on. c) at what speed would the first car have to be traveling for the system to essentially stay in place after linkup.
Exercise 3.6.6: Let us take the example in Figure 3.12 with parameters
,
. Does there exist a set of initial conditions for which the first cart moves but the second
cart does not? If so find those conditions, if not argue why not.
Note: 1–2 lectures, §5.4 in EP
It may very well happen that a matrix has some “repeated” eigenvalues. That is, the characteristic
equation
may have repeated roots. As we have said before, this is actually unlikely to
happen for a random matrix. If you take a small perturbation of
(you change the entries of
slightly) you will get a matrix with distinct eigenvalues. As any system you will want to solve in
practice is an approximation to reality anyway, it is not indispensable to know how to solve these
corner cases. But it may happen on occasion that it is easier or desirable to solve such a system
directly.
Take the diagonal matrix
![]() |
has an eigenvalue 3 of multiplicity 2. We usually call the multiplicity of the eigenvalue in the
characteristic equation the algebraic multiplicity. In this case, there exist 2 linearly independent
eigenvectors,
and
. This means that the so-called geometric multiplicity of this eigenvalue is
2.
In all the theorems where we required a matrix to have
distinct eigenvalues, we only really
needed to have
linearly independent eigenvectors. For example, let
has the general
solution
![]() |
Let us restate the theorem about real eigenvalues. In the following theorem we will repeat eigenvalues
according to (algebraic) multiplicity. So for
above we would say that it has eigenvalues 3 and
3.
Theorem 3.7.1. Take
. If
is
and has
real eigenvalues (not necessarily distinct),
,
…,
, and if there are
linearly independent corresponding eigenvectors
, …,
, and the general
solution to the ODE can be written as.
![]() |
The geometric multiplicity of an eigenvalue of algebraic multiplicity
is equal to the number of
linearly independent eigenvectors we can find. It is not hard to see that the geometric multiplicity is
always less than or equal to the algebraic multiplicity. Above we, therefore, handled the case when these
two numbers are equal. If the geometric multiplicity is equal to the algebraic multiplicity we say the
eigenvalue is complete.
The hypothesis of the theorem could, therefore, be stated as saying that if all the eigenvalues of
are
complete then there are
linearly independent eigenvectors and thus we have the given general
solution.
Note that if the geometric multiplicity of an eigenvalue is 2 or greater, then the set of linearly
independent eigenvectors is not unique up to multiples as it was before. For example, for the diagonal
matrix
above we could also pick eigenvectors
and
, or in fact any pair of two linearly
independent vectors.
If an
matrix has less than
linearly independent eigenvectors, it is said to be deficient. Then there
is at least one eigenvalue with algebraic multiplicity that is higher than the geometric multiplicity. We
call this eigenvalue defective and the difference between the two multiplicities we call the
defect.
![]() |
has an eigenvalue 3 of algebraic multiplicity 2. Let us try to compute the eigenvectors.
![]() |
We must have that
. Hence any eigenvector is of the form
. Any two such vectors are linearly
dependent, and hence the geometric multiplicity of the eigenvalue is 1. Therefore, the defect is 1, and we
can no longer apply the eigenvalue method directly to a system of ODEs with such a coefficient
matrix.
The key observation we will use here is that if
is an eigenvalue of
of algebraic multiplicity
,
then we will be able to find
linearly independent vectors solving the equation
. We will
call these the generalized eigenvectors.
Let us continue with the example
and the equation
. We have an eigenvalue
of (algebraic) multiplicity 2 and defect 1. We have found one eigenvector
. We have the
solution
![]() |
In this case, let us try (in the spirit of repeated roots of the characteristic equation for a single equation) another solution of the form
![]() |
We differentiate to get
![]() |
must equal
, and
![]() |
By looking at the coefficients of
and
we see
and
. This means
that
![]() |
If these two equations are satisfied, then
is a solution. We know the first of these equations is
satisfied because
is an eigenvector. If we plug the second equation into the first we find
that
![]() |
If we can, therefore, find a
which solves
, and such that
, we
are done. This is just a bunch of linear equations to solve and we are by now very good at
that.
We notice that in this simple case
is just the zero matrix (exercise). Hence,
any vector
solves
. So we just have to make sure that
.
Write
![]() |
By inspection we see that letting
(
could be anything in fact) and
does the job. Hence we
can take
. So our general solution to
is
![]() |
Let us check that we really do have the solution. First
, good. Now
, good.
Note that the system
has a simpler solution since
is a triangular matrix. In particular, the
equation for
does not depend on
.
Exercise 3.7.1: Solve
by first solving for
and then for
independently. Now
check that you got the same solution as we did above.
Let us describe the general algorithm. First for
of multiplicity 2, defect 1. First find an eigenvector
of
. Now find a vector
such that


This machinery can also be generalized to larger matrices and higher defects. We will not go over, but
let us just state the ideas. Suppose that
has a multiplicity
eigenvalue
. We find vectors such
that
![]() |
Such vectors are called generalized eigenvectors. For every eigenvector
we find a chain of generalized
eigenvectors
through
such that:


linearly independent solutions (
is the multiplicity). You may
need to find several chains for every eigenvalue.
Exercise 3.7.3: Let
. a) What are the eigenvalues? b) What is/are the defect(s) of
the eigenvalue(s)? c) Solve
.
Exercise 3.7.4: Let
. a) What are the eigenvalues? b) What is/are the defect(s) of the
eigenvalue(s)? c) Solve
in two different ways and verify you get the same answer.
Exercise 3.7.5: Let
. a) What are the eigenvalues? b) What is/are the defect(s) of
the eigenvalue(s)? c) Solve
.
Exercise 3.7.6: Let
. a) What are the eigenvalues? b) What is/are the defect(s) of
the eigenvalue(s)? c) Solve
.
Exercise 3.7.7: Let
. a) What are the eigenvalues? b) What is/are the defect(s) of
the eigenvalue(s)? c) Solve
.
Exercise 3.7.8: Suppose that
is a
matrix with a repeated eigenvalue
. Suppose that
there are two linearly independent eigenvectors. Show that the matrix is diagonal, in particular
.
Note: 2 lectures, §5.5 in EP
In this section we present a different way of finding the fundamental matrix solution of a system. Suppose that we have the constant coefficient equation
![]() |
as usual. Now suppose that this was one equation (
is a number or a
matrix). Then the solution to
this would be
![]() |
It turns out the same computation works for matrices when we define
properly. First let us write down
the Taylor series for
for some number
.
![]() |
Recall
, and
. We differentiate this series term by term
![]() |
Maybe we can write try the same trick here. Suppose that for an
matrix
we define the matrix
exponential as
![]() |
Let us not worry about convergence. The series really does always converge. We usually write
as
by convention when
is a matrix. With this small change and by the exact same calculation as above we
have that
![]() |
Now
and hence
is an
matrix. What we are looking for is a vector. We note that in the
case we would at this point multiply by an arbitrary constant to get the general solution. In the matrix case
we multiply by a column vector
.
Theorem 3.8.1. Let
be an
matrix. Then the general solution to
is
![]() |
where
is an arbitrary constant vector. In fact
.
Let us check.
![]() |
Hence
is the fundamental matrix solution of the homogeneous system. If we find a way to
compute the matrix exponential, we will have another method of solving constant coefficient
homogeneous systems. It also makes it easy to solve for initial conditions. To solve
,
,
we take the solution
![]() |
This equation follows because
, so
.
We mention a drawback of matrix exponentials. In general
. The trouble is that matrices
do not commute, that is, in general
. If you try to prove
using the Taylor series,
you will see why the lack of commutativity becomes a problem. However, it is still true that if
,
that is, if
and
commute, then
. We will find this fact useful. Let us restate this as a
theorem to make a point.
In some instances it may work to just plug into the series definition. Suppose the matrix is diagonal. For
example,
. Then
![]() |
and
![]() |
So by this rationale we have that
![]() |
This makes exponentials of certain other matrices easy to compute. Notice for example that the matrix
can be written as
where
. Notice that
and
commute, and that
. So
for all
. Therefore,
. Suppose we actually want to compute
.
and
still commute (exercise: check this) and
, since
. We write
![]() |
. Note that this matrix has a repeated
eigenvalue with a defect; there is only one eigenvector for the eigenvalue 2. So we have found a
perhaps easier way to handle this case. In fact, if a matrix
is
and has an eigenvalue
of multiplicity 2, then either it is diagonal, or
where
. This is a good
exercise.
Exercise 3.8.1: Suppose that
is
and
is the only eigenvalue. Then show that
. Then we can write
, where
. Hint: First write down what does
it mean for the eigenvalue to be of multiplicity 2. You will get an equation for the entries. Now
compute the square of
.
Matrices
such that
for some
are called nilpotent. Computation of the matrix
exponential for nilpotent matrices is easy by just writing down the first
terms of the Taylor
series.
In general, the exponential is not as easy to compute as above. We cannot usually write any
matrix as a sum of commuting matrices where the exponential is simple for each one. But fear
not, it is still not too difficult provided we can find enough eigenvectors. First we need the
following interesting result about matrix exponentials. For any two square matrices
and
, we
have
![]() |
This can be seen by writing down the Taylor series. First note that
![]() |
And hence by the same reasoning
. So now write down the Taylor series for
![]() |
Now we will write a general matrix
as
, where
is diagonal. This procedure is called
diagonalization. If we can do that, you can see that the computation of the exponential becomes easy.
Adding
into the mix we see that
![]() |
Now to do this we will need
linearly independent eigenvectors of
. Otherwise this method does
not work and we need to be trickier, but we will not get into such details in this course. We let
be the
matrix with the eigenvectors as columns. Let
, …,
be the eigenvalues and let
, …,
be the
eigenvectors, then
. Let
be the diagonal matrix with the eigenvalues on the
main diagonal. That is
![]() |
Now we write
![]() |
Now the columns of
are linearly independent as these are the eigenvectors of
. Hence
is
invertible. Since
, we right multiply by
and we get
![]() |
This means that
. With
is turns into
![]() | (3.4) |
The formula (3.4), therefore, gives the formula for computing the fundamental matrix solution
for the
system
, in the case where we have
linearly independent eigenvectors.
Notice that this computation still works when the eigenvalues and eigenvectors are complex, though
then you will have to compute with complex numbers. Note that it is clear from the definition that if
is
real, then
is real. So you will only need complex numbers in the computation and you may need to
apply Euler’s formula to simplify the result. If simplified properly the final matrix will not have any
complex numbers in it.
Example 3.8.1: Compute the fundamental matrix solution using the matrix exponentials for the system
![]() |
Then compute the particular solution for the initial conditions
and
.
Let
be the coefficient matrix
. We first compute (exercise) that the eigenvalues are 3 and
and the corresponding eigenvectors are
and
. Hence we write
![]() |
The initial conditions are
and
. Hence, by the property that
we find that
the particular solution we are looking for is
where
is
. Then the particular solution we are
looking for is
![]() |
We note that if you can compute the fundamental matrix solution in a different way, you can use this to
find the matrix exponential
. The fundamental matrix solution of a system of ODEs is not unique. The
exponential is the fundamental matrix solution with the property that for
we get the identity matrix.
So we must find the right fundamental matrix solution. Let
be any fundamental matrix solution to
. Then we claim
![]() |
Obviously if we plug
into
we get the identity. It is not hard to see that we can
multiply a fundamental matrix solution on the right by any constant invertible matrix and we still get a
fundamental matrix solution. All we are doing is changing what the arbitrary constants are in the general
solution
.
If you think about it, the computation of any fundamental matrix solution
using the eigenvalue method
is just as difficult as computation of
. So perhaps we did not gain much by this new tool. However, the
Taylor series expansion actually gives us a very easy way to approximate solutions, which the eigenvalue
method did not.
The simplest thing we can do is to just compute the series up to
a certain number of terms. There are better ways to approximate the
exponential
.
In many cases however, few terms of the Taylor series give a reasonable approximation for the exponential
and may suffice for the application. For example, let us compute the first 4 terms of the series for the
matrix
.
![]() |
and worse for larger
. For larger
, you will generally have to compute more terms. Let us see how we
stack up against the real solution with
. The approximate solution is approximately (rounded to 8
decimal places)
![]() |
And plugging
into the real solution (rounded to 8 decimal places) we get
![]() |
This is not bad at all. Although if you take the same approximation for
you get (using the Taylor
series)
![]() |
while the real value is (again rounded to 8 decimal places)
![]() |
So the approximation is not very good once we get up to
. To get a good approximation at
(say up to 2 decimal places) you would need to go up to the
power (exercise).
Exercise 3.8.4: Find a fundamental matrix solution for the system
,
,
. Then find the solution that satisfies
.
Exercise 3.8.7: Use exercise 3.8.6 to show that
. In particular this means that
is invertible even if
is not.
Exercise 3.8.8: Suppose
is a matrix with eigenvalues
, 1, and corresponding eigenvectors
,
. a) Find matrix
with these properties. b) Find the fundamental matrix solution to
. c) Solve the system in with initial conditions
.
Exercise 3.8.9: Suppose that
is an
matrix with a repeated eigenvalue
of multiplicity
. Suppose that there are
linearly independent eigenvectors. Show that the matrix is diagonal,
in particular
. Hint: Use diagonalization and the fact that the identity matrix commutes
with every other matrix.
Note: 3 lectures (may have to skip a little), somewhat different from §5.6 in EP
Let us first focus on the nonhomogeneous first order equation
![]() |
where
is a constant matrix. The first method we will look at is the integrating factor method. For
simplicity we rewrite the equation as
![]() |
where
. We multiply both sides of the equation by
(being mindful that we are dealing with
matrices which may not commute) to obtain
![]() |
We notice that
. This fact follows by writing down the series definition of
,
![]() |
. Hence,
![]() |
We can now integrate. That is, we integrate each component of the vector separately
![]() |
Recall from exercise 3.8.7 that
. Therefore, we obtain
![]() |
Perhaps it is better understood as a definite integral. In this case it will be easy to also solve for the initial conditions as well. Suppose we have the equation with initial conditions
![]() |
The solution can then be written as
![]() | (3.5) |
Again, the integration means that each component of the vector
is integrated separately. It is not
hard to see that (3.5) really does satisfy the initial condition
.
![]() |
Example 3.9.1: Suppose that we have the system

.
Let us write the system as
![]() |
We have previously computed
for
. We immediately also have
, simply by negating
.
![]() |
Instead of computing the whole formula at once. Let us do it in stages. First
![]() |
Then
![]() |
Phew!
Let us check that this really works.
![]() |
Similarly (exercise)
. The initial conditions are also satisfied as well (exercise).
For systems, the integrating factor method only works if
does not depend on
, that is,
is
constant. The problem is that in general
![]() |
because matrices generally do not commute.
For the next method, we note that the eigenvectors of a matrix give the directions in which the matrix acts like a scalar. If we solve our system along these directions these solutions would be simpler as we can treat the matrix as a scalar. We can put those solutions together to get the general solution.
Take the equation
![]() | (3.6) |
Assume that
has
linearly independent eigenvectors
. Let us write
![]() | (3.7) |
That is, we wish to write our solution as a linear combination of the eigenvectors of
. If we can solve
for the scalar functions
through
we have our solution
. Let us decompose
in terms of the
eigenvectors as well. Write
![]() | (3.8) |
That is, we wish to find
through
that satisfy (3.8). We note that since all the eigenvectors of
are independent, the matrix
is invertible. We see that (3.8) can be
written as
, where the components of
are the functions
through
. Then
. Hence it is always possible to find
when there are
linearly independent
eigenvectors.
We plug (3.7) into (3.6), and note that
.
![]() |
If we identify the coefficients of the vectors
through
we get the equations

equation we write
![]() |
We use the integrating factor
to find that
![]() |
Now we integrate and solve for
to get
![]() |
Note that if you are looking for just any particular solution, you could set
to be zero. If we leave these
constants in, we will get the general solution. Write
, and we are
done.
Again, as always, it is perhaps better to write these integrals as definite integrals. Suppose that we have
an initial condition
. We take
and note
, just like before. Then if
we write
![]() |
we will actually get the particular solution
satisfying
,
because
.
Example 3.9.2: Let
. Solve
where
for
.
The eigenvalues of
are
and 4 and the corresponding eigenvectors are
and
respectively. This calculation is left as an exercise. We write down the matrix
of the eigenvectors and
compute its inverse (using the inverse formula for
matrices)
![]() |
We are looking for a solution of the form
. We also wish to write
in terms of the
eigenvectors. That is we wish to write
. Thus
![]() |
So
and
.
We further want to write
in terms of the eigenvectors. That is, we wish to write
. Hence
![]() |
So
and
. We plug our
into the equation and get that
![]() |
We get the two equations

![]() |
is the constant of integration. As
then
and hence
.
Similarly
![]() |
As
we have that
and hence
. The solution is
![]() |
That is,
and
.
Exercise 3.9.1: Check that
and
solve the problem. Check both that they satisfy the
differential equation and that they satisfy the initial conditions.
The method of undetermined coefficients also still works. The only difference here is that we will have to take unknown vectors rather than just numbers. Same caveats apply to undetermined coefficients for systems as they do for single equations. This method does not always work, furthermore if the right hand side is complicated, you will have lots of variables to solve for. In this case you can think of each element of an unknown vector as an unknown number. So in system of 3 equations if you have say 4 unknown vectors (this would not be uncommon), then you already have 12 unknowns that you need to solve for. The method can turn into a lot of tedious work. As this method is essentially the same as it is for single equations, let us just do an example.
Example 3.9.3: Let
. Find a particular solution of
where
.
Note that we can solve this system in an easier way (can you see how), but for the purposes of the example, let us use the eigenvalue method plus undetermined coefficients.
The eigenvalues of
are
and 1 and the corresponding eigenvectors are
and
respectively. Hence our complementary solution is
![]() |
for some arbitrary constants
and
.
We would want to guess a particular solution of
![]() |
However, something of the form
appears in the complementary solution. Because we do not yet know
if the vector
is a multiple of
we do not know if a conflict arises. It is possible that no
conflict arises, but to be safe we should also try
. Here we find the crux of the difference for
systems. You want to try both
and
in your solution, not just
. Therefore, we
try
![]() |
Thus we have 8 unknowns. We write
,
,
, and
, We have to plug this into
the equation. First let us compute
.
![]() |
Now
must equal
so
![]() |
,
,
and any constants.

augmented matrix and start row reduction, but it is easier to just do
this in an ad hoc manner. Immediately we see that
,
,
. Plugging these
back in we get that
and
. The remaining equations that tell us something
are

and
.
can be arbitrary and still satisfy the equation. We are looking for just a single
solution so presumably the simplest one is when
. Therefore,
![]() |
That is,
,
. You would add this to the complementary solution to get the general
solution of the problem. Notice also that both
and
really was needed.
Exercise 3.9.2: Check that
and
solve the problem. Also try setting
and again check
these solutions. What is the difference between the two solutions we can obtain in this way?
As you can see, other than the handling of conflicts, undetermined coefficients works exactly the same as it did for single equations. However, the computations can get out of hand pretty quickly for systems. The equation we had done was very simple.
Just as for a single equation, there is the method of variation of parameters. In fact for constant coefficient systems, this is essentially the same thing as the integrating factor method we discussed earlier. However this method will work for any linear system, even if it is not constant coefficient, provided you have somehow solved the associated homogeneous problem.
Suppose we have the equation
![]() | (3.9) |
Further, suppose that you have solved the associated homogeneous equation
and found the
fundamental matrix solution
. The general solution to the associated homogeneous equation is
for a constant vector
. Just like for variation of parameters for single equation we try the solution to the
nonhomogeneous equation of the form
![]() |
where
is a vector valued function instead of a constant. Now substitute into (3.9) to
obtain
![]() |
But
is the fundamental matrix solution to the homogeneous problem so
, and
thus
![]() |
Hence
. If we compute
, then
. Now integrate to obtain
and we have the particular solution
. Let us write this as a formula
![]() |
Note that if
is constant and you let
, then
and hence we get a
solution
which is precisely what we got using the integrating factor
method.
Example 3.9.4: Find a particular solution to
![]() | (3.10) |
Here
is most definitely not constant. Perhaps by a lucky guess, you find that
solves
. Once we know the complementary solution we can easily find a solution to
(3.10). First we find
![]() |
Next we know a particular solution to (3.10) is
![]() |
Adding the complementary solution we have that the general solution to (3.10).
![]() |
Exercise 3.9.3: Check that
and
really solve (3.10).
In the variation of parameters, just like in the integrating factor method we can obtain the general
solution by adding in constants of integration. That is, we will add
for a vector of arbitrary
constants. But that is precisely the complementary solution.
We have already previously did a simple example of the method of undetermined coefficients for second order systems in § 3.6. This method is essentially the same as undetermined coefficients for first order systems. There are some simplifications that you can make, as we did in § 3.6. Let the equation be
![]() |
where
is a constant matrix. If
is of the form
, then you can try a solution of the
form
![]() |
and you do not need to introduce sines.
If the
is a sum of cosines, you note that we still have the superposition principle, so if
, you could try
for the problem
, and you
would try
for the problem
. Then sum the solutions.
However, if there is duplication with the complementary solution, or the equation is of
the form
, then you need to do the same thing as you do for first order
systems.
Actually you will never go wrong with putting in more terms than needed into your guess. You will just find that the extra coefficients will turn out to be zero. But it is useful to save some time and effort.
If we have the system
![]() |
we can do eigenvector decomposition, just like for first order systems.
Let
, …,
be the eigenvalues and
, …,
be the eigenvectors. Again form the matrix
. Write
![]() |
Decompose
in terms of the eigenvectors
![]() |
And again
.
Now plug in and doing the same thing as before
![]() |
Identify the coefficients of the eigenvectors to get the equations

, and we are done; we have a particular solution. If you
have found the general solution for
through
, then again
is the general
solution.
Example 3.9.5: Let us do the example from § 3.6 using this method. The equation is
![]() |
The eigenvalues were
and
, with eigenvectors
and
. Therefore
and
. Therefore,
![]() |
So after the whole song and dance of plugging in, the equations we get are

for the first equation and
for the second equation. We plug in to get

and
. And hence
and
. So our particular solution is
![]() |
This solution matches what we got previously in § 3.6.
Exercise 3.9.4: Find a particular solution to
,
, a) using
integrating factor method, b) using eigenvector decomposition, c) using undetermined coefficients.
Exercise 3.9.5: Find the general solution to
,
, a) using
integrating factor method, b) using eigenvector decomposition, c) using undetermined coefficients.
Exercise 3.9.6: Find the general solution to
,
,
a) using eigenvector decomposition, b) using undetermined coefficients.