Вы находитесь на странице: 1из 284

# Dierential Equations

V. W. Noonburg
R. Decker

Spring 2011

Preface
Chapter 1. Introduction to Dierential Equations
1.1 Basic Terminology
1.2 General Solutions and Initial Value Problems
1.2.1 General Solutions
1.2.2 Initial Value Problems
1.2.3 Long Term Behavior
1.2.4 Finite Time Blow-up
1.2.5 Backwards in Time
1.2.6 Three Methods of Solution

## Chapter 2. First-order Dierential Equations

2.1 Separable First-order Equations
2.1.1 Application I - Population Growth
2.1.2 Application II - Newtons Law of Cooling

## 2.2 Geometric Method, the Slope Field

2.2.1 Phase Portraits and Slope Fields

## 2.3 Linear First-order Dierential Equations

2.4 Existence and Uniqueness of Solutions
2.5 More Analytic Methods for Nonlinear First-order Equations
2.5.1 Exact Equations
2.5.2 Bernoulli Equations
2.5.3 Symmetries of the Slope Field

## 2.6 Numerical Methods

2.6.1 Eulers Method
2.6.2 Improved Euler Method
2.6.3 Fourth-order Runge-Kutta

## 2.7 Autonomous Equations, the Phase Line

2.7.1 Equations with Parameters
2.7.2 Bifurcation

## Lab1: Population Growth with Harvesting

2.8 Applications
2.8.1 Application I - Mixing Problem
2.8.2 Application II - Single Neuron Equation

## Chapter 3. Second-order Dierential Equations

3.1 General Theory of Second-order Linear Dierential Equations
3.2 Homogeneous Constant Coecient Linear Dierential Equations
3.2.1 Initial Conditions
3.2.2 Higher Order Linear Equations

## 3.3 Harmonic Oscillators

3.4 Nonhomogeneous Constant Coecient Linear Dierential Equations
3.5 Driven Mass-spring Systems, Beats, and Resonance
3.5.1 Beats
3.5.2 Dierential Equations and Beats
3.5.3 Resonance

## 3.6 Variation of Parameters

3.6.1 Cauchy-Euler Equation

## 3.7 Numerical Methods for Second-order Equations

3.8 Qualitative Methods and the Phase Plane
3.8.1 Vector Fields, Direction Fields and Phase Portraits for Autonomous Equations
3.8.2 Nonlinear Equations and Fixed Points

## Chapter 4. Linear Systems of First-order Dierential Equations

4.1 Introduction to Systems
4.2 Matrix Algebra
4.3 Eigenvalues and Eigenvectors
= AX,
n=2
4.4 Analytic Solutions of X
Chapter 5. Geometry of Autonomous Systems
5.1 Geometric Behavior of Linear Systems in the Phase Plane
5.1.1 Systems with Real (Non-zero) Eigenvalues
5.1.2 Systems with Complex Eigenvalues
5.1.3 The Trace-Determinant Plane
5.1.4 The Special Cases

## 5.2 Geometric Behavior of Nonlinear Autonomous Systems

5.2.1 Finding the Equilibrium Points
5.2.2 Determining the Type of an Equilibrium

## 5.3 Bifurcations for Systems

5.4 Applications
5.4.1 The Van der Pol Equation
5.4.2 The Wilson-Cowan Equations
5.4.3 A Periodically Harvested Logistic Growth Model

## Chapter 6. Laplace Transforms

6.1 Simple Laplace Transforms
6.1.1 Review of Partial Fractions

## 6.2 Deriving More Laplace Transforms

6.2.1 Review of Completing the Square

## 6.3 The Unit Step and Delta Functions

6.4 Convolution and Circuits
6.4.1 Electrical Circuits

## 6.4.2 Transfer Functions and the Frequency Domain

6.4.3 Filters and the Response Curve
6.4.4 Poles and Zeros

## Appendix A: Answers to Odd-numbered Exercises

Appendix B: Derivative and Integral Formulas
Appendix C: Cofactor Method for Determinants
Appendix D: Cramers Rule

0.1

Preface

This text is intended for a one semester course in dierential equations, as is normally taken
by engineering, science, and mathematics majors in their sophmore year of college. The
prerequisite is two semesters of calculus. The notation of partial derivatives, as is normally
introduced in a calculus of several variable course, is used some in Sections 2.4 and 5.2, but
should not be an impediment to students who have not had this course (a brief explanation
of a partial derivative is given in Section 2.4).

0.1.1

Technology

Several of the sections require the use of technology (Maple, Mathematica, Matlab, TI-89).
Some notes about the use of technology are incorporated into the text (TI-89 and Maple).
Also, freely available internet resources are sucient to complete the exercises and projects
in the text (see below).

0.1.2

Internet Resources

## An interactive java graphing applet for rst-order dierential equations is available at

uhaweb.hartford.edu/rdecker/MathletToolkit/FirstOrderBook.htm (no www at the beginning)
and one for second-order equations and systems is available at uhaweb.hartford.edu/rdecker/
MathletToolkit/SystemsBook.htm. These applets were created by undergraduate students
at the University of Hartford after completing the Dierential Equations course that you
are now taking.
When computer algebra is required, the Wolfram Alpha site (www.wolframalpha.com)
can be used. For example, go to Wolfram Alpha and type in solve dierential equation
y = 2y + cos(t); you will see the exact solution as well as some graphs.

Chapter 1

Introduction to Dierential
Equations
Dierential equations arise from real-world problems and problems in applied mathematics.
One of the rst things you are taught in Calculus is that the derivative of a function is the
instantaneous rate of change of the function with respect to its independent variable. When
mathematics is applied to real-world problems, it is often the case that nding a relation
between a function and its rate of change is easier than nding a formula for the function
itself; and it is this relation between an unknown function and its derivatives that produces
a dierential equation.
To give a very simple example, a biologist studying the growth of a population, with size
at time t given by the function P (t), might make the very simple, but logical, assumption
that a population always grows at a rate directly proportional to its size. In mathematical
notation, the equation for P (t) could then be written as
dP
= rP (t);
dt
where the constant of proportionality, r, would probably be determined experimentally by
biologists working in the eld. On the other hand, equations for population growth can
become as complicated as
dP
P 2
= rP (1 P/k) 2
.
dt
+ P2
This latter equation appears in a 1978 paper by Ludwig, Jones and Holling, and models the
population growth of the North American spruce budworm.
In an analogous manner, a physicist might argue that all of the forces acting on a
particular moving body at time t depend only on its position x(t) and its velocity x (t). He
could then use Newtons 2nd Law to express mass times acceleration as mx (t) and write
an equation for x(t) in the form:
mx (t) = F (x(t), x (t)),
where F is some given function of two variables. One of the best-known equations of this
type is the mass-spring equation:
mx + cx + kx = f (t),
5

## in which x(t) is the position at time t of an object of mass m suspended on a spring,

and c and k are the damping coecient and spring constant, respectively. The function f
represents an external force acting on the system.
In each of the above examples, the problem has been written in the form of a dierential
equation, and the solution of the problem lies in nding a function P (t), or x(t), which
makes the given equation true.

1.1

Basic Terminology

Before you begin to tackle the problem of formulating and solving dierential equations, it is
necessary to understand some basic terminology. Our rst and most fundamental denition
is that of a dierential equation itself.
Denition 1.1 A dierential equation is any equation involving an unknown function
and one or more of its derivatives.
The following are examples of dierential equations:
1. x (t) + 3x (t) + 2x(t) = 0
2.

dP
dt

= rP (t)(1 P (t)/N )

3. y + (y 3 1)y + y = sin(x)
4. x(iv) (s) + k 2 x(s) = 0
5.

2
x2 u(x, y)

2
y 2 u(x, y)

=0

.
ordinary vs. partial differential equations
Dierential equations fall into two very broad categories, called ordinary dierential
equations and partial dierential equations. If the unknown function in the equation is a
function of only one variable, the equation is called an ordinary dierential equation.
In the above list of examples, equations 1-4 are ordinary dierential equations, with the
unknown functions being x(t), P (t), y(x), and x(s) respectively. If the unknown function in
the equation depends on more than one independent variable, the equation is called a partial
dierential equation; and in this case, the derivatives appearing in the equation will be
partial derivatives. Equation 5 is an example of an important partial dierential equation,
called Laplaces Equation, which arises in several dierent areas of applied mathematics.
In Equation 5, u is a function of the two independent variables x and y. In this book,
we will not consider methods for solving partial dierential equations. One of the basic
methods involves reducing the partial dierential equation to the solution of two or more
ordinary dierential equations, and so it is important to have a solid grounding in ordinary
dierential equations rst.

## independent variables, dependent variables, and parameters

Three dierent types of quantities can appear in a dierential equation. The unknown
function, for which the equation is to be solved, is called the dependent variable; and
6

since we will be considering only ordinary dierential equations, the dependent variable is a
function of a single independent variable. In addition to the independent and dependent
variables, a third type of quantity, called a parameter, may appear in the equation. A
parameter is a quantity that remains xed in any given specication of the problem, but
can vary from problem to problem. In this book, parameters will usually be real numbers,
such as r and N in equation 2 above, and k 2 in equation 4.

## order of a differential equation

Another important way in which dierential equations are classied is in terms of their
order.
Denition 1.2 The order of a dierential equation is the order of the highest derivative
of the unknown function which appears in the equation.
The dierential equation 2 is a 1st -order equation; 1, 3 and 5 are 2nd -order, and 4 has
order 4. In equation 3, be careful to note that the term y 3 represents the cube of the function
y(x), and not its third derivative. Even though equation 5 is a partial dierential equation,
it is still said to be of second order since only second-order partial derivatives appear in the
equation.
You may have noticed in the Table of Contents that some of the chapter headings refer
to rst-order or second-order dierential equations. In some sense, rst-order equations
are thought of as being simpler than second-order equations. By the time you have worked
through Chapter 2, you may not want to believe that this is true, and there are special cases
where it denitely is not true; however, it is a useful way to distinguish between equations
to which dierent methods of solution apply. In Chapter 4, we will see that solving ordinary
dierential equations of order greater than one can always be reduced to solving a system
of rst-order equations.

what is a solution?
Given any dierential equation, exactly what do we mean by a solution? It is rst
important to realize that we are looking for a function, and therefore it needs to be dened
on some interval of its independent variable. On this interval, it must make the equation an
identity; that is, it must satisfy the given equation. This idea is made precise in Denition
1.3 and the examples following it.
Denition 1.3 A solution of a dierential equation is a suciently dierentiable function
which, if substituted into the equation, together with the necessary derivatives, makes the
equation an identity (a true statement for all values of the independent variable) over some
interval of the independent variable.
Example 1.1.1 Show that the function p(t) = et is a solution of the dierential equation
x + 3x + 2x = 0.
To show that it is a solution, compute the rst and second derivatives of p(t):
p (t) = et
7

p (t) = et .
With the three functions p(t), p (t) and p (t) substituted into the dierential equation in
place of x, x , and x , it becomes
(et ) + 3(et ) + 2(et ) = (1 3 + 2)(et ) = (0)(et ) 0,
which is an identity (in the independent variable t) for all real values of t.
For practice, show that the function q(t) = e2t is also a solution of the equation
x + 3x + 2x = 0. It may seem surprising that two completely dierent functions satisfy
this equation, but we will soon see that dierential equations can have many solutions, in
fact innitely many. In the above example, the solutions p and q turned out to be functions
that are dened for all real values of t. In the next example, things will not be quite as
simple.

Example 1.1.2 Show that the function (x) = (1 x2 )1/2 1 x2 is a solution of the
dierential equation y = x/y. First, notice that (x) is not even dened outside of the
interval 1 x 1. In the interval 1 < x < 1, (x) can be dierentiated by the Chain
Rule (for powers of functions):
(x) = (1/2)(1 x2 )1/2 (2x) = x/(1 x2 )1/2 .
The right-hand side of the equation y = x/y, with (x) substituted for y, is:
x/(x) = x/(1 x2 )1/2
which is identically equal to (x) wherever and are both dened. Therefore, (x) is a
solution of the dierential equation y = x/y on the interval (1, 1).
You may be wondering if there are any solutions of y = x/y which do exist outside of
the interval 1 < x < 1, since the dierential equation is certainly dened outside of that
interval. In the next chapter it will be made clear exactly where solutions do exist.
Beginning students are often confused when asked to show that a given function is a
solution of a given dierential equation. This is always a much easier problem than being
asked to nd the solution of a given dierential equation. Showing that a function is a
solution involves only dierentiation, for which there is always a formula. We will soon see
that solving a dierential equation involves integration, which you have already learned can
be hard, and does not always have a nice solution.

systems of equations
Many real-world situations are too complex to be modelled with a single dierential
equation. One can use systems of dierential equations to develop more complex models. A
typical system of ordinary dierential equations will have several dependent variables (recall
that when we have multiple independent variables we are dealing with partial dierential
equations). There will be as many equations in the system as there are dependent variables.
8

A well-known system of two rst-order dierential equations with two dependent variables
is the Lotka-Volterra system of equations (also known as the Predator-Prey equations)

dx
= ax bxy
dt
dy
= cy + dxy
dt
where x, and y are the dependent variables, t is the independent variable, and a, b, c, and
d are parameters (all assumed to be positive). This system models a situation where x(t)
represents the number of prey animals (for example rabbits), and y(t) represents the number
of predator animals (for example foxes), and t represents time. The values of the parameters
will depend on the actual ecosystem being modelled; but just with the assumption that the
parameters are all positive, the equations can be seen to imply that in isolation the rabbit
population grows (x = ax) and the foxes die out (y = cy). The other two terms, bxy
and +dxy, indicate that the eect of their interaction is negative for the rabbits and positive
for the foxes.
To show that a set of formulas for the dependent variables (functions of the independent
variable) is a solution to a system of equations, one must show that the given formulas
satisfy all of the equations (make all of the equations into identities).
Example 1.1.3 Show that the functions x(t) = cos t + sin t, and y(t) = cos t sin t form a
solution to the system of rst-order dierential equations given by

x = y
y = x.
Dierentiating both functions we get
x (t)

y (t)

d
(cos t + sin t) = sin t + cos t = cos t sin t = y(t)
dt
d
(cos t sin t) = sin t cos t = (cos t + sin t) = x(t),
dt

## relationship between systems and higher-order equations

An nth order dierential equation can be written as a system of n rst-order dierential
equations. Thus, it is possible to study only systems of equations. In this text, however,
we choose to study higher-order equations in their own right (primarily second-order equations) because there are many standard techniques in the literature for treating higher-order
equations that we believe students of dierential equations should be familiar with.
In the example that follows, we illustrate how to write a second-order dierential equation
as a system of two rst-order equations. The basic idea is to dene a new dependent variable,
say y1 , to be the original dependent variable, and then let y2 be the derivative of the original
dependent variable.
9

## Example 1.1.4 Write the second-order dierential equation y + 2y + 2y = 0 as a system

of two rst-order dierential equations.
We dene y1 = y, and y2 = y . Now solve for y in the dierential equation to get

## y = 2y 2y. We now have y1 = y = y2 , and y2 = y = 2y 2y = 2y2 2y1 so that

the system, which now contains only rst derivatives, becomes
y1

= y2

y2

= 2y1 2y2

In a similar manner, any nth order dierential equation can be written as a system of n
rst-order dierential equations.
Problems 8-16 in the Exercises below can be used to test your recall of the formulas for
dierentiation. It is impossible to become a skilled dierential equations solver unless these
rules of Calculus are part of your equipment. A table of Derivatives and Integrals can be
found in Appendix B.

Exercises 1.1 For each equation 1-7 below, determine its order. Name the independent
variable, the dependent variable, and any parameters in the equation:
1. y = y 2 t
2. dP/dt = rP (1 P/k)
3. dP/dt = rP (1 P/k)

P 2
2 +P 2

4. mx + bx + kx = 2t5
5. x + 2x + x + 3x = sin(t)
6. (ty (t)) = et
7. d2 /dt2 + sin() = 4 cos(t)
For each of the equations below, show that the given function is a solution. Determine
the largest interval or intervals of the independent variable over which the solution is
dened, and satises the equation:
8. 2x + 6x + 4x = 0, x(t) = e2t
9. x + 4x = 0, x(t) = sin(2t) + cos(2t)
10. t2 x + 3tx + x = 0, x(t) = 1/t
11. t2 x + 3tx + x = 0, x(t) = ln(t)/t
12. P = rP, P (t) = Cert , C any real number
13. P = rP (1 P ), P (t) = 1/(1 + Cert ), C any real number
10

## 14. x = (t + 2)/x, x(t) =

t2 + 4t + 1

In the next two problems below, show that the given functions form a solution. Determine the largest interval of the independent variable over which the solution is dened,
and satises the equations:
15. System is x = x y,

## y = 4x + y, solution is x = et e3t , y = 2et + 2e3t .

16. System is x = x y,
2et sin 2t .

## In problems 17 and 18, write the second-order equation as a system of rst-order

equations:
17. y + 2y + y = 0
18. y y + 6(y y 3 ) = cos(t)

11

1.2
1.2.1

## General Solutions and Initial Value Problems

General solutions

In the last section in Example 1.1.1 we saw that there can be more than one solution to a
dierential equation. In the next example we show that there can be innitely many (in
fact this is the typical case).
Example 1.2.1 Show that x = Ae2t is a solution to the dierential equation x = 2x for
any real value of A. Graph the solution for the A values A = 2, 1, 0, 1, 2.
The derivative of x = Ae2t is x = 2Ae2t . Substituting these expressions into the dierential equation x = 2x gives 2Ae2t = 2Ae2t , which is an identity in t for any real value of
A.
In Figure 1.1 we show the graph of the function x = Ae2t for A = 2, 1, 0, 1, 2.
10
A=2
8

6
x

A=1
4

2
A=0
1

## 0.8 0.6 0.4 0.2 0

2

0.2

0.4

0.6

0.8

A=1

8
A=2
10

Figure 1.1: Family of solution curves x = Ae2t for the dierential equation x = 2x
We refer to the solution x = Ae2t to the dierential equation x = 2x as a one-parameter
family of solutions or alternatively as a general solution. In this particular case, every
possible solution to x = 2x can be expressed in the form x = Ae2t , for some real value
of the constant A. Some of the solution methods for rst-order equations produce general
solutions which do not contain every possible solution, and we will see an example of this
shortly.
General solutions to higher-order dierential equations and systems of equations usually
contain more than one arbitrary constant. The general rule is that for an nth order dierential equation, or for a system of n rst-order equations, the solution will have n arbitrary
constants.
12

1.2.2

## Sometimes, instead of the entire family of solution curves corresponding to a dierential

equation, we are interested in one particular curve which goes through a specic point in
the plane. We can specify such a point in the plane using an initial condition. For example,
with the dierential equation x = 2x we might specify the initial condition x(0) = 1. For
rst-order dierential equations, a dierential equation together with one initial condition
is referred to as an initial value problem, or IVP for short.
In Example 1.2.1, the IVP x = 2x, x(0) = 1 picks out the solution x = e2t from the
general solution x = Ae2t , that is, it corresponds to A = 1. A solution to an initial value
problem must satisfy both the dierential equation and the initial condition. Solutions to
initial value problems are also sometimes referred to as particular solutions.
For higher-order dierential equations and systems of equations, more initial conditions
are needed. The number of initial conditions in an initial value problem should correspond
to the number of arbitrary constants in the formula for the solution.
Example 1.2.2 Show that x = c1 et + c2 et is a solution to x x = 0 for arbitrary values
of the two constants c1 and c2 (and hence is a general solution). Also nd the particular
solution to the same dierential equation that satises, x(0) = 5 and x (0) = 1.
Using x = c1 et + c2 et we get x = c1 et c2 et and x = c1 et + c2 et . Thus x x 0
which shows that x = c1 et + c2 et is a solution to x x = 0 for any c1 and c2 .
If we assume that the particular solution has the form x = c1 et + c2 et , its derivative
will have the form x = c1 et c2 et . Thus we can impose the conditions x(0) = 5 and
x (0) = 1 on these two expressions to get two equations in two unknowns:
c1 e0 + c2 e0
c1 e0 c2 e0

= 5
= 1

or more simply
c1 + c2
c1 c2

= 5
= 1.

These equations can be solved simultaneously to get c1 = 2 and c2 = 3 (check this). Thus
x = 2et + 3et solves the initial value problem x x = 0, x(0) = 5, x (0) = 1.

1.2.3

Long-term behavior

When we ask What is the long-term behavior of a solution x(t) to an initial value problem,
we are asking What does the solution look like for large t values? Sometimes this means
just nding lim x(t). In other cases, we may say something like For large t, the solution
t
settles into a steady sinusoidal oscillation or For large t the solution approaches in
such a way that it is asymptotic to the line x = t + 1 (approaches innity linearly). The
long-term behavior often depends on the initial conditions, or equivalently, on the values
assigned to the constants in the formula for the solution.

13

1.2.4

## Finite time blow-up

For some initial value problems questions about long-term behavior dont make sense, because the solution runs into a vertical asymptote, and hence goes to in a nite amount of
time. Solutions to dierential equations cant cross vertical asymptotes, and the solution
just ends at the asymptote. See part c) of the next Example.
Example 1.2.3 First verify each claim below. Then determine the long-term behavior for
each solution. For general solutions, explain how the long-term behavior depends on the
constant.
a) The function x(t) = 1et is a solution to the initial value problem x = x+1, x(0) =
0.
b) The function x(t) = 1 + Cet is a general solution of the dierential equation x =
x + 1.
1
c) The function x(t) = Ct
is a general solution to x = x2 .
d
(1 et ) = et and x + 1 = (1 et ) + 1 = et , and x(0) = 1 e0 = 0;
a) x = dt
therefore, the function is a solution to the initial value problem. Since lim (1 et ) = 1 we
t

get x(t) 1 as t .
b) x = Cet and x + 1 = (1 + Cet ) + 1 = Cet so the function gives a solution to the
dierential equation for any value of C. lim (1 + Cet ) depends on the value of C; for
t

## C > 0 we get x(t) as t , for C = 0 the solution is a constant x 1, and for

C < 0 we get x(t) as t .
d
1
1
2
c) x = dt
( Ct
) = (Ct)
2 which is the same as x , so the function is a solution of the
dierential equation for any value of C. There is a vertical asymptote at t = C. If we
assume that initial conditions are given at t = 0, then for C < 0 the asymptote is to the
left of the initial condition, and so we get x 0 as t . For C > 0 we run into the
asymptote before we get to innity, so x as t C (nite time blow-up). We cannot
have C = 0 if the initial condition is given at t = 0.
Note that in part (c) of the previous example, x 0 is a solution of the dierential
1
equation x = x2 , but is not given by the solution formula x(t) = Ct
for any nite value of
the constant C. This illustrates what we mentioned previously; a general solution may or
may not contain every possible solution of the dierential equation. Much more will be said
about this in Chapter 2 when we consider various analytic methods for solving rst-order
dierential equations.

1.2.5

Backwards in time

For an initial value problem, the solution usually exists for values of the independent variable
(often considered to be time) both before and after the point where the initial condition is
given. For an initial value problem that models a real-world system, such as the position of
a mass on a spring or the size of a population, one can determine past states of the system
(what was the position of the mass two hours ago?) as well as future states (what will the
position of the mass be in two hours?). For this text, when we talk about the long-term
behavior of a system, we will always mean in the future (as t ).

14

1.2.6

## Dierent Ways of Solving Dierential Equations

One of the most intriguing things about the study of dierential equations, from the point
of view of a mathematician, is that for the majority of dierential equations there is no
way of nding an exact formula for the solution. Sometimes the equation itself can be
simplied in a reasonable way to make it a solvable equation. If this is not possible,
and if an initial condition is given, approximate numerical solutions can be generated by
a calculator or computer. This will produce clues to the general behavior of the solutions;
but even equations that come from relatively simple applied problems can lead to new and
interesting mathematical results, and you will be shown some of these problems in later
chapters. This makes solving dierential equations a challenge (one might even say an art)
comparable to that faced by experimental scientists, or in a more down-to-earth analogy,
by detectives.
Three basic approaches are used to obtain information about the solutions of a dierential
equation:
1) Analytic (Exact) Methods. These are methods that apply only to very special
types of equations, and produce formulas for the solutions, in terms of simple functions
like polynomials, exponentials, and trigonometric functions. Much of what is taught in
an introductory course in dierential equations centers on learning when and how to apply
these methods. Anyone who has to solve dierential equations needs these standard analytic
methods in their toolbox. Analytic methods can be used to nd both families of solutions
and solutions to initial value problems.
2) Geometric (Graphical) Methods. In the case of a rst-order dierential equation,
even if a formula for a solution cannot be found, the dierential equation itself gives a
formula for the derivative of the solutions. This formula can be used to sketch a eld of
direction vectors that show graphically how the entire family of solution curves behaves.
Sometimes this information is even more helpful than having a single analytic solution to
look at. Graphical methods can also be extended to systems of dierential equations. This
is a subject of current research in mathematics, and in later Chapters you will be introduced
to this very interesting topic.
3) Numerical Methods. With calculators and computers it is easy to obtain approximate solutions of dierential equations by using one of a variety of numerical methods.
These methods produce a table of approximate values of the unknown function y(t), at
discrete values t0 , t0 + t, t0 + 2t, . . . , t0 + N t of the independent variable t. To use
numerical methods, one must have one or more initial conditions, thus these methods apply
only to initial value problems. These methods are extremely helpful when analytic methods
do not apply; however, numerical methods can easily generate false results and must be
used intelligently. One of the aims of this book is to produce intelligent users of numerical
methods.
In the following chapters, all three of these methods will be described in detail. One of the
most important things you will learn is how to determine which method, or methods, will give
you the information you are looking for in the case of a particular problem. Before computers
were readily available, a course in dierential equations concentrated on analytic methods
and ways of transforming equations so that these methods could be applied. Now, most of
the analytic methods have been programmed in computer algebra systems such as Maple,
Mathematica, or the TI-89 calculator. For analytically solvable dierential equations, such
computer algebra systems will produce the exact solution, complete with arbitrary constants.
They can also be used to nd exact solutions to initial value problems. An introductory
15

course can now go much further and show students how to tackle more interesting problems
by using the graphical and numerical methods that are available.
Technology Appendix
Use a computer algebra system to nd the solution to 2x + 6x + 4x = 0. This is the
dierential equation in problem 8 from Section 1.1, where the solution x(t) = e2t was
given.
The MAPLE instruction required to solve a dierential equation is:
dsolve(deq);
To solve 2x + 6x + 4x = 0 write:
dsolve(2*diff(x(t),t\$2)+6*diff(x(t),t)+4*x(t)=0);
NOTE: diff(x(t),t) is the rst derivative of x(t) with respect to t. To obtain the second derivative, you use diff(x(t),t\$2). With recent versions of Maple you can use the simpler and more intuitive x (t) instead of diff(x(t),t) and x (t) instead of diff(x(t),t\$2).
Any appearance of the dependent variable x must be written as x(t).
The MAPLE response should be:
x(t) = C1e(t) + C2e(2t) .
In the output, C1 and C2 are arbitrary constants, so this is a two-parameter family of
solutions. This general solution corresponds to the particular solution given in problem 8
from the previous section, if the constants are taken to be C1 = 0 and C2 = 1.
On the TI89/92 calculator use the deSolve command (home screen, Calc menu). The
syntax is
deSolve(DE, independent variable, dependent variable)
so that to solve 2x + 6x + 4x = 0 write:
deSolve(2x + 6x + 4x = 0, t, x).
The response to this command should be something like
x = @1 et + @2 e2t .
On the TI-89 calculator, constants of integration are represented by the @ symbol followed
by a number (the number increases by one every time you solve a new dierential equation).
Just for fun, try solving x = x2 t on the TI-89, by entering
deSolve(x = x2 t, t, x).
It turns out that there is no known analytic method for obtaining an exact solution of this
equation in terms of simple functions; therefore, the calculator just returns the unsolved
equation. This happens more often than you might expect, and is the reason why it is
important to learn how to use the graphical and numerical methods.

16

Exercises 1.2 In each of the problems 1 4, use dierentiation to show that the given
function is a solution of the equation for all values of the constants (and hence is a general
solution):
1. Function: x = t + c, dierential equation x = 1.
2. Function: y =

1
2

cos t +

1
2

2

## 4. Function x = C1 cos(t) + C2 sin(t) + 12 et , dierential equation x + x = et .

Solve each initial value problem below, using the general solutions from exercises 1-4
(the dierential equations are the same).
5. x = 1, x(0) = 5.
6. y = y sin(t), y(0) = 1.
7. y = xy, y(0) = 2.
8. x + x = et , x(0) = 0, x (0) = 1.
For each problem below, verify that the function is a solution to the initial value problem
or dierential equation, and then nd the long-term behavior of the solution. For the
problems that involve a general solution, assume that any initial condition is given at
t = 0 and describe how the long-term behavior depends on the initial condition. Be
sure to check for asymptotes and nite time blow-up.
9. Function: P (t) = 1/(1 + et ). Initial value problem: P = P (1 P ), P (0) = 12 .
10. Function: P (t) = 1/(1 2et ). Initial value problem: P = P (1 P ), P (0) = 12 .
11. Function: P (t) = 1/(1 + Cet ). Dierential equation: P = P (1 P ).
12. Function: x(t) =

1
2

sin t

1
2

## cos t + Cet . Dierential equation: x = x + sin(t).

For each of the dierential equations below, use a computer algebra system, such as
MAPLE or a TI-89 calculator, to nd a formula for the general solution (the equations
are the same as in Problems 9-14 in the Exercises for Section 1.1). In each case,
compare the answer to the solution that was given with the equation in Section 1.1.
Determine which values of the arbitrary constants give the solutions from that section.
13. x + 4x = 0
14. t2 x + 3tx + x = 0
15. t2 x + 3tx + x = 0
16. P = rP
17. P = rP (1 P )
18. \

17

18

Chapter 2

First-order Dierential
Equations
In this chapter, methods will be given for solving rst-order dierential equations. Remember that rst-order implies that the rst derivative of the unknown function is the highest
derivative appearing in the equation. It will always be assumed that the equation can be
solved explicitly for x , so that the most general rst-order dierential equation can always
be put in the form:
x = f (t, x),
(2.1)
where f denotes an arbitrary function of two variables. To see why such an assumption is
necessary, suppose the dierential equation is
(x (t))2 + 4x (t) + 3x(t) = t.
It would be messy, but not impossible, to use the quadratic formula to extract two dierent
dierential equations of the form x = f (t, x) from this quadratic equation. However, one
could also imagine equations where solving for x (t) is not even possible; and in such a case,
our methods may not be applicable.
The material in this chapter will cover several analytic methods for solving rst-order
dierential equations, each one requiring the function f in equation (2.1) to have a special
form. Two dierent geometric methods are also described; one for the general equation
(2.1), and a more specic method for an equation where f is a function depending only
on x. Numerical methods for rst-order equations are introduced, and theoretical issues of
existence and uniqueness of solutions are discussed. As you proceed through this chapter,
try to develop a feeling not only for how to solve the easy equations, but for what makes
the hard equations hard. At the end of the chapter, you will be presented with some real
problems in applied mathematics. Acquiring a solid understanding of rst-order equations
will lay the groundwork for everything that follows.

2.1

## Separable rst-order equations

The rst analytic method for your bag of tools applies only to rst-order equations, and
then only if they can be written in the form
x (t) = g(t)h(x);
19

(2.2)

that is, if the function f (t, x) can be factored into a product of a function of t times a
function of x. Such a dierential equation is called separable.

Example 2.1.1 Determine which of the following rst-order dierential equations are separable. Hint: try to factor the right-hand side if the equation does not initially appear to be
separable.
a) x = xt2
b) x = x + t2
c) x = xt + t
d) x = x2 + xt
Equation a) is separable with g(t) = t2 and h(x) = x. Equation b) is not separable as
x + t2 cannot be factored into a function of t multiplied by a function of x. Equation c) can
be factored as x = t(x + 1) and so is separable with g(t) = t and h(x) = x + 1. Equation d)
can be partially factored as x = x(x + t) but since the factor (x + t) cannot be factored into
a function of t multiplied by a function of x it is not separable.
Comment: If the right-hand side of the equation x = f (t, x) does not depend on t,
that is x = f (x), then the equation is separable (such equations are called autonomous,
and will be investigated in Section 2.7). Here we have g(t) = 1, and h(x) = f (x).
If the derivative x (t) is written as dx/dt, and both sides of equation (2.2) are divided
by h(x), the equation becomes
1
dx
= g(t).
(2.3)
h(x(t)) dt
The two sides of equation (2.3) will be identical if, and only if, their integrals are the same
up to an additive constant; that is, if

1
dx
( )dt = g(t)dt + C.
h(x(t)) dt
The method of simple substitution can be applied to the integral on the left. If we substitute
u = x(t), then du = (dx/dt)dt, and if we can nd an antiderivative H(u) of 1/h(u) and an
antiderivative G(t) of g(t), the result is

## [1/h(u)]du = H(u) = G(t) + C.

Replacing u again by x(t):
H(x(t)) = G(t) + C.

(2.4)

This method is mathematically correct, and the only part which can cause diculty is
nding the anti-derivatives H(u) and G(t).
The expression H(x) = G(t) + C is called an implicit solution of (2.2); that is, it
denes a relation between the unknown function x and its independent variable t. If it can
be solved explicitly for x as a function of t, the result is called an explicit solution of the
dierential equation.
20

A simple device can be employed to make solving separable equations a bit more straightforward, and it also avoids the integration by substitution. If, in equation (2.3), we split the
dierential dx/dt into two pieces dx and dt and separate them, as well as the other functions
of x and t, we will have the equation

[1/h(x)]dx = g(t)dt.
(2.5)
Integration of (2.5), considering x as a dummy variable of integration on the left, and t as
the variable of integration on the right, leads to exactly the same (thus, mathematically
correct) solution:
H(x) = G(t) + C
1
where H(x) is an antiderivative for h(x)
and G(t) is an anitiderivative for g(t).
Everything that has been said so far can be summarized in a simple step-by-step procedure for solving separable equations.

## To solve a separable rst-order dierential equation x (t) = g(t)h(x):

Write the equation in the form dx/dt = g(t)h(x).
Multiply both sides by dt, divide by h(x), and integrate, to put the equation
in the form

[1/h(x)]dx = g(t)dt.
Find an antiderivative H(x) of 1/h(x) and an antiderivative G(t) of g(t).
Write the solution as H(x) = G(t) + C.
If possible, solve the equation from the previous step explicitly for x, as a
function of t.

## The next example shows how this method works in practice.

Example 2.1.2 Solve the separable dierential equation x = t(x + 1).
First write the equation in the form
dx/dt = t(x + 1).
Separate the variables (including dx and dt) so only the variable x appears on the left and
t on the right:
1
dx = tdt.
(x + 1)
Integration of each side with respect to its own variable of integration leads to the implicit
solution
ln |x + 1| = t2 /2 + C,
21

## which can be solved explicitly for x by applying the exponential function:

eln |x+1| = |x + 1| = e(t

/2+C)

= eC e(t

/2)

If the positive constant eC is allowed to take on both positive and negative values, the absolute
value signs can be dropped, to give
x + 1 = Ae(t

/2)

where A = eC is an arbitrary constant which can be positive or negative. Then the explicit
solution is
x(t) = Ae(t

/2)

1.

(2.6)

One should expect that the solution of a rst-order dierential equation will contain one
arbitrary constant. Remember from Calculus that the solution of the integration problem
x (t) = cos(t), for example, is
x(t) = sin(t) + C.
This simply reects the fact that knowing the derivative of a function does not dene the
function uniquely; that is, a curve x(t) can be translated vertically up or down without
changing its slope.
As we saw in Section 1.2, a particular solution to a rst-order dierential equation is a
solution in which there are no arbitrary constants. We will nd (in Section 2.4) that, in
general, to obtain a particular solution of a rst-order dierential equation it is necessary
and sucient to give one initial condition of the form x(t0 ) = x0 . For example, to nd the
solution of x (t) = cos(t), given the initial condition x(0) = 2, use the general solution with
t = 0 to write
x(0) = sin(0) + C = 2.
This determines the value of the constant C = 2. Then the particular solution that satises
the given initial condition is
x(t) = sin(t) + 2.
Again from section 1.2, we know that a solution of a rst-order dierential equation
containing a single constant of integration is called a general solution. The general solution
of a separable equation will contain all solutions of the equation, with the possible exception
of constant solutions. These are constant values x(t) C of the unknown function x which
make the right-hand side of the dierential equation (2.1) equal to 0. Note that with x C
the dierential equation is satised, because the derivative of a constant function is x 0.
In the above example x = t(x + 1), x 1 is a constant solution. Note that in this
particular case it is given by the general solution (2.6) when the constant A = 0. In solving
a separable equation it is wise to nd all constant solutions rst, since they may be lost
when the equation is divided by h(x).
Example 2.1.3 Solve the initial-value problem x = t/x, x(0) = 1.
First note that this dierential equation has no constant solutions; that is, there are no
constant values for x that make t/x = 0. Write the equation as dx/dt = t/x. Then by
multiplying by dt and x, and integrating,

xdx = tdt
22

x2 /2 = t2 /2 + C
and the explicit solution is

x(t) = t2 + 2C.

We can satisfy the initial condition by substituting t = 0 into the general solution.

x(0) = 0 + 2C = 1.
This implies that C must be 1/2 and the
sign of the square root must be taken to be positive. Now the unique solution x(t) = t2 + 1, to the initial-value problem, is completely
determined.
The following two applications show how separable dierential equations and initial-value
problems can arise in real-world situations.
Application 1. Population Growth
One of the simplest dierential equations arises in the study of the growth of biological
populations. Consider a population with size P (t) at time t. If it is assumed that the
population has a constant birth rate and constant death rate , per unit of time, then an
equation for the rate of growth of the population is
dP/dt = P (t) P (t) = ( )P (t) = rP (t),
where r is called the net growth rate of the population. This is a separable dierential
equation with general solution (Check it!):
P (t) = Kert ,
where K is the arbitrary constant of integration. The initial value is frequently given as the
size of the population at time t = 0. Then P (0) = Ker0 = K, and the particular solution of
this initial-value problem is P (t) = P (0)ert . This means that, t units of time after the initial
time, the population will have grown exponentially (or decreased exponentially if > ).
Populations do not usually grow exponentially forever, and biologists generally use more
complicated equations of growth to take this into account.
The logistic growth equation assumes that as the population P increases, the growth
rate r decreases, due to the eects of crowding, intraspecies competition, etc. The simplest
way to decrease the growth rate as P increases is to assume that the growth rate is linear
in P ; that is, replace r by R = r P (t). Then
dP/dt = (r P (t))P (t) = rP (t)(1

## P (t)) = rP (t)(1 P (t)/N );

r

(2.7)

where we have dened a new constant N = r/. Notice that the rate of growth dP/dt
goes to 0 as P (t) N . This limiting value of the population, N , is called the carrying
capacity of the ecosystem in which the population lives. The parameter r, which gives the
approximate rate of growth of the population when it is small, is called the intrinsic growth
rate of P .
23

The logistic growth equation (2.7) is a separable dierential equation, but the expression
dP/[P (1 P/N )] has to be integrated using partial fractions, or with the use of computer
algebra. In either case we have
dP/[P (1 P/N )] =

1
dP =
P (1 P/N )
ln| N + P | + ln|P | =

rdt

rdt
rt + K.

We now apply the exponential function to both sides and apply properties of the exponential
and logarithmic functions to get
eln|N +P |+ln|P |
P
P N
P
P

ert+K

K1 ert , where K1 = eK

P K1 ert N K1 ert
N K1 ert
N K1 ert
N K1
N
=
=
=
rt
1 K1 e
1 + K1 ert
ert + K1
1 Cert

(2.8)

where C = K11 . Note that the dierential equation (2.7) has two constant solutions P 0
and P N . Setting the constant C = 0 in the general solution (2.8) gives P = N , but no
nite value of C makes the general solution equal to 0.
We can use the general solution to determine
( ) the long-term behavior of the population.
The denominator will be zero if t = 1r ln C1 . This quantity is positive
( if
) C > 1, and so
in this case we get nite time blow-up, that is, P as t 1r ln C1 . If C < 1 then
either there is no asymptote or the asymptote occurs before t = 0, and so P N as t .
Note: It can be shown that P only when the initial condition is negative, which is
physically unrealistic.
Application 2: Newtons Law of Cooling
Newtons Law of Cooling is a well-known law of physics which implies that if a small
body of temperature T is placed in a room with constant air temperature A, the rate of
change of the temperature T is proportional to the temperature dierence A T . This law
can be expressed in the form of a dierential equation:
T (t) = k(A T (t));
where T (t) is the temperature of the small body at time t, A is the surrounding (ambient)
air temperature, and k is the constant of proportionality which depends on the physical
properties of the small body. This is a separable dierential equation and can be solved by
writing
dT /dt = k(A T )

dT
= kdt
AT
ln |A T | = kt + C
|A T | = e(kt+C)
24

A T (t) = ekt ,
where is eC . The explicit solution is
T (t) = A ekt .

(2.9)

The long term behavior is very easy to determine here, since T A as t . Thus the
temperature of the small body tends to the ambient (i.e. room ) temperature.
Consider the following very practical example which uses Newtons Law of Cooling.
Example 2.1.4 A cup of coee, initially at temperature T (0) = 2100 , is placed in a room
in which the temperature is 700 . If the temperature of the coee after 5 minutes has dropped
to 1850 , at what time will the coee reach a nice drinkable temperature of 1600 ?
If we assume the cup of coee cools down according to Newtons Law of Cooling, the general
solution in equation (2.9), with A = 70, can be used to write
T (t) = 70 ekt .
Using the given initial condition, we can nd the value of :
T (0) = 70 e0k = 70 = 210
= 140.
The temperature function can now be written as T (t) = 70 + 140ekt . To nd the value of
the parameter k, use the given value T (5):
T (5) = 70 + 140e5k = 185
e5k =

115
140

1
115
k = ln(
) 0.0393.
5
140
This value for k completely determines the temperature function; that is,
T (t) = 70 + 140e0.0393t
for all t > 0. Now the answer to the original question can be found by solving the equation
T (t) = 160 for t. The approximate value for t is 11.2 minutes.
In this last example, if the value of the physical parameter k had been known beforehand,
only one value of the temperature would have been required to determine the function T (t)
exactly. In this particular problem, the value of the parameter k had to be determined
experimentally from the given data, thus necessitating the temperature to be read at two
dierent times. This sort of thing is even more likely to occur in problems that come
from non-physical sciences, where parameters are usually not known constants and must be
experimentally determined from the data provided.

25

## Exercises 2.1 Determine whether or not each equation is separable.

1. x + 2x = et
2. x + 2x = 1
3. x =

x+1
t+1

4. x =

sin t
cos x

Put each equation below into the form x (t) = g(t)h(x), and solve it by the method of
separation of variables:
5. x =

x
t

6. x =

t
x

7. x = x + 5
8. x = 3x 2
9. x = x cos(t)
10. x = (1 + t)(2 + x)
11. xx = 1 + 2t + 3t2
12. x = (t + 1)(cos(x))2
13. x = t + tx2
14. x = 2 tx2 t + 2x2 (Hint: factor by hand or use the factor command of a computer
algebra system).
Solve each of the following initial-value problems:
15. y = y + 1, y(0) = 2
16. y = ty, y(0) = 3
17. x = x cos(t), x(0) = 1
18. x = (1 + t)(2 + x), x(0) = 1
19. x = (t + 1)(cos(x))2 , x(0) = 1
20. P = 2P (1 P ), P (0) = 1/2
21. (Population growth) A population P is growing according to the growth law dP
dt = rP
(recall that the assumption is that the growth rate is proportional to the population
size). Time t is measured in years. If the population is initially 100, and after 1
year the population is 150, how many will there be after 2 years? Hint: solve the
dierential equation for P as a function of t. Then use the two conditions P (0) = 100
and P (1) = 150 to determine r and the integration constant. What happens to the
population in the long term?
26

22. (Population growth) Repeat problem 21, but this time assume the growth law dP
dt =
rP (1 P/300) (this is equation (2.6) with carrying capacity N = 300). The solution
to the dierential equation is given under the Application 1 subsection of this section.
What happens to the population in the long term?
23. (Newtons Law of Cooling) A bottle of coke is taken out of a 400 refrigerator and placed
on a picnic table. Five minutes later the coke has warmed up to 500 . If the outside
temperature remains constant at 900 , what will be the temperature of the coke after it
has been on the table for 20 minutes? What happens to the temperature of the coke in
the long term?
24. (Newtons Law of Cooling) Disclaimer: The following problem is known not to be a very
good physical example of Newtons Law of Cooling, since the thermal conductivity of
a corpse is hard to measure. It does, however, make a rather vivid application.
At 7am one morning detectives nd a murder victim in a closed meat locker. The
temperature of the victim measures 880 . Assume the meat locker is always kept at 400 ,
and at the time of death the victims temperature was 98.60 . When the body is nally
removed at 8am, its temperature is 860 .
a) When did the murder occur?
b) How big an error in the time of death would result if the live body temperature was
only known to be between 98.20 and 99.80 ?
25. (Falling bodies) From Newtons second law sum of forces=massacceleration
we can derive the dierential equation for a body falling through air (or any other
medium). The forces acting on the body are gravity and drag (due to air resistance).
One common modeling assumption, used for slowly moving objects, is that the drag
force is proportional to the velocity of the body. Let v represent the velocity of the body;
then v is the acceleration. The force of gravity is given by mg where m is the mass
and g is the acceleration of gravity. Letting c represent the proportionality constant,
we get the dierential equation of motion
mv = mg cv
since the force of gravity acts downward and the drag force acts upward for a body that
is falling (for a falling body, v is negative, and so cv is positive). The value of g is
9.8m/ sec2 , the units of m are kilograms and the units of c are kg/ sec.
a) Assuming that both m and c are positive, nd the general solution to the dierential
equation mv = mg cv for v as a function of t.Hint: rst show that g+dvc v = dt.
m

b) Find limt v(t). This is called the terminal velocity of the falling body.
m
c) Suppose that a body with mass 1kg has a teminal velocity of 20 sec
. Find the value
of c.

d) About how long does it take the body from c) to reach terminal velocity if it is
dropped from rest? (Since the body actually only reaches terminal velocity in the limit
as t , nd out when the body gets to within 1% of terminal velocity).

27

2.2

## For any rst-order dierential equation

x = f (t, x),

(2.10)

whether or not it can be solved by some analytic method, it is possible to obtain a large
amount of graphical information about the general behavior of the solution curves from
the dierential equation itself. In Section 2.4 you will see that if the function f (t, x) is
everywhere continuous in both variables t and x, and has a continuous derivative with
respect to x, the family of solutions of (2.10) form a set of non-intersecting curves which ll
the entire (t, x)-plane. In this section we will see how to use the function f (t, x) to sketch a
vector eld which shows geometrically how these solution curves (also called trajectories)
ow through the plane. This can all be done without ever solving the dierential equation
analytically.
Let x(t) be any solution of (2.10). Then if x(t) passes through some point (t, x
) in the
plane, the graph of x(t) at that point must have slope f (t, x
). Using just the function f (t, x),
a vector eld can be drawn by choosing an arbitrary set of points (ti , xi ), and through each
of these points drawing a short line with slope f (ti , xi ).
Denition 2.1 A slope eld for a dierential equation x = f (t, x) is a vector eld with
short lines of slope f (ti , xi ) drawn through each point (ti , xi ) in some chosen grid of points
in the (t, x)-plane.
Example 2.2.1 Sketch a slope eld for the dierential equation
x = x + t f (t, x).
We will arbitrarily choose a grid of points with integer coordinates in the region 3 t
3, 3 x 3 (see Figure 2.1 ). At each grid point (ti , xi ), the vector will have slope
f (ti , xi ) = xi + ti . For example, the vector at (1, 2) has slope 2 + (1) = 1 and the vector
at (2, 2) has slope (2) + 2 = 0. We can put the slopes at all of the integer grid points
into a table:
3
2
1
0
1
2
3

0
1
2
3
4
5
6
3

1
0
1
2
3
4
5
2

2
1
0
1
2
3
4
1

3
4
5
2
3
4
1
2
3
x
0
1
2
1
0
1
2 1
0
3 2 1
0
1
2
t
The slope at integer pairs (t,x)
for the dierential equation x = t + x

6
5
4
3
2
1
0
3

We plot the slope marks in Figure 2.1. A solution curve passing through the point (1, 0)
has been sketched in as well, by drawing it so that at each point it is tangent to the slope
28

vector at that point. Note that in order for this to work, it has to be assumed that the
direction of the slope vectors changes continuously in both the t and x directions. It appears
that all solutions lying above the line of slope 1, through the point (0, 1) (that is with
initial condition x(0) = 1), tend to as t , and solutions lying below that line tend
to . Thus the long term behavior is determined very easily without getting an exact
solution.

x
3

5
4

1
3 2 1 0
1

P(t)

t
1

2
1

2
3

Figure 2.1: x = x + t

## Figure 2.2: P = 0.5P (1 P/4)

This is hardly a precise solution method, but it quickly gives a picture of how the entire
family of solutions behaves. Therefore, in a sense, it is a picture of the general solution.
The ner the grid, the more information one has to work with.
In the next example a slope eld will be drawn for a logistic growth equation.
Example 2.2.2 Sketch a slope eld for the equation
dP/dt = 0.5P (1 P/4).
In this case the right-hand side of the equation depends only on P , and not explicitly
on t. This means that the slopes along any horizontal line P = constant will all be the
same. Some solutions have been sketched in the slope eld in Figure 2.2, and they show the
characteristic shape of solutions of the logistic equation. Notice that solutions with P (0) > 0
all appear to tend to the constant solution P (t) = 4, as t .
If it is necessary to sketch a slope eld by hand, there is a more ecient way of choosing
the grid of points at which the vectors are to be drawn. Also, in some cases this method
yields information about the long-term solution that is not obvious from a rectangular grid
of slopes (as we see in the next example). Consider the right-hand side of equation (2.10).
The equation
f (t, x) = m, for a given slope m,
denes a curve in the (t, x)-plane along which all of the slope vectors must have the same
slope m. Such a curve is called an isocline, or curve of equal slopes, for the dierential
equation (2.10). If an isocline for slope m is sketched in the plane, slope lines all of slope m
can be drawn along it very quickly.
29

## Example 2.2.3 Sketch a slope eld for x = x2 t by using isoclines.

x
2
1

t
3

1
2

Figure 2.3: x = x2 t

The isoclines are the curves having equation x2 t = m. These are parabolas, rotated by
900 , and the isoclines for slope m = 3, 2, 1, 0, 1, and 2 have been sketched in Figure
2.3. Be sure to note that, in general, isoclines are not solution curves. Along each of the
isoclines, slope lines with appropriate slope have been drawn at equal intervals. It is then
possible to sketch some approximate solution curves. Note that there appear to be two types
of solutions to this dierential equation; those that approach as t , and those that
approach the lower branch of the parabola x2 = t (and hence ultimately approach ). It
can be proved analytically that there is a unique solution separating these two types. From
Figure 2.3 it can be estimated that the inital condition that separates the dierent longterm behaviors is around x(0) = 0.7. This dierential equation cannot be solved analytically
in terms of the elementary functions such as polynomials, exponentials, etc.; but we will
see that it is possible to approximate this special solution, as closely as desired, with the
numerical methods described in Section 2.6.

For a more detailed slope eld, we can employ computer software such as Maple, Mathematica or Matlab, or a graphing calculator such as the TI89. Also, the applets supplied
with this text can be used for sketching slope elds.

2.2.1

## Phase portraits and slope elds

Slope elds help one to visualize and sketch solution curves in the (t, x) plane. We will
refer to a slope eld with numerous solution curves drawn in on top of it as a phase
portrait. This terminology is somewhat nonstandard; the term phase portrait usually
refers to graphs of autonomous second-order equations and systems, where two dependent
variables are plotted against each other. The information that this type of portrait of a
dierential equation conveys is very similar whether the equation is rst or second order, so
we will use the same term for both cases.
30

Example 2.2.4 The dierential equation x = 0.3x sin t can be viewed as a model for
population growth with cyclic immigration/emmigration. The equation x = 0.3x models
exponential growth; the inclusion of the term sin t represents immigration when the term
is positive, and emmigration when it is negative. Use computer software or a graphing
calculator to create a detailed phase portrait on 0 t 10 and 1 x 5 for this
dierential equation. Based on the phase portrait, determine the approximate value for x(0)
which divides the solution curves for which the population reaches zero in nite time from
the ones for which the population goes to innity (that is, determine how the long-term
behavior depends on the initial condition).
The applet for rst-order equations at uhaweb.hartford.edu/rdecker/MathletToolkit/FirstOrderBook.htm
can be used. Also, see the Technology Appendix at the end of this section for details on how
to use Maple or the TI-89 calculator.
You should get a phase portrait something like the one shown in Figure 2.4. One sees
that if the initial condition x(0) is above about 1.3 the population goes to innity, and if the
initial condition x(0) is below about 1.3 the population dies out at a time t < 3. Remember
that once the population drops to zero it is extinct!
5

3
x(t)
2

10

## Figure 2.4: Phase portrait for x = 0.3x sin t

31

Exercises 2.2 For each of the following dierential equations, sketch a slope eld in the
region 3 t 3, 3 x 3 using an integer grid.
1. x = x + t/2
2. x = xt/(1 + t2 )
3. x = x(1 x/2)
4. x = 1 + t/2
5. x = t/x

## (Note: at any point where x = 0 the slopes will be vertical)

For each of the following dierential equations, sketch a slope eld in the region 3
t 3, 3 x 3 using the method of isoclines.
6. x = x + t
7. x = x3 + t
8. x = x2
9. x = t2 x
For each of the dierential equations below a slope eld has been drawn. Sketch some
solution curves in the slope eld to form a phase portrait. In your own words, describe
the behavior of the family of solutions in the entire (t, x)-plane. As part of your
description, explain how the long-term behavior depends on the initial condtion x(0).
Be as specic as you can.
10. x = 2x(1 x/2)
x3
2
1
3

1 0
1

t
1

2
3

11. x + x = t

32

x3
2
1
3

1 0
1

t
1

2
3

12. x = t/x
x3
2
1
3

1 0
1

2
3

Use computer software or a graphing calculator to create a detailed slope eld and
phase portrait for each equation below. You can also use the applet from Example
2.2.4 (change the equation and adjust the window size as needed). Briey describe the
long-term behavior for various values of the initial condition x(0).
13. x = x + t/2 (same as 1. above).
14. x = x2 (1 x) .
15. x = 1 + t/2 (same as 4. above).
P
16. Recall the logistic population growth equation dP
dt = rP (1 N ) from Section 2.1. Create
a slope eld for this equation using the parameter values r = 0.5 and N = 10. Set the
range on the P axis to extend at least from 5 to 20. Set the range on the t-axis to get
a good picture. Describe the long-term behaviour of the solution curves for all initial
conditions (including negative ones, even though they are not physically realistic).

Technology Appendix
How to generate the slope eld for Example 2.2.4:
In Maple we can use the commands:
with(DEtools):
DEplot(diff(x(t),t)=0.3*x(t)-sin(t),x(t),t=0..10,
x=-1..5,color=BLACK);
33

## On a TI89 calculator, set the calculator Graph mode to DIFFERENTIAL EQUATIONS,

set the dierential equation on the Y= screen to y1 = 0.3y1 sin(t) and while still on the
Y= screen set Fields to SLPFLD using Format under the F1-Tools menu. Then set the
ranges appropriately on the WINDOW screen, and press GRAPH.

34

2.3

## Linear rst-order dierential equations

Methods for solving linear dierential equations have been around for a long time. While
it is not correct to say that all linear equations can be solved analytically and all nonlinear
equations cannot, it is close to the truth. It is so close, in fact, that before computers were
readily available (circa 1955) engineers spent much of their time linearizing their problems
so they could be solved.
A rst-order dierential equation is linear in x(t) if it can be written in the form:
a1 (t)x (t) + a0 (t)x(t) = b(t).
It is called a homogeneous linear equation if, and only if, b(t) 0. Since we are assuming
that our rst-order equations can be solved explicitly for x (t), the function a1 (t) must be
non-zero on some interval of t so that we can divide by it and write the equation as:
x (t) + [a0 (t)/a1 (t)]x(t) = b(t)/a1 (t).
This leads to the following denition.
Denition 2.2 A rst-order linear dierential equation in standard form is an equation which can be written as
x (t) + p(t)x(t) = q(t),
(2.11)
for some functions p and q.

In general, a dierential equation is called linear if the dependent variable (x(t) in the
denition) and its derivatives appear in a linear way. Note, however, that the independent
variable (t in the denition) does not have to appear in a linear way. Thus, for example, if
x or its derivatives appear as the argument of a nonlinear function, such as sin(x), ex , xn ,
ln x, or in any denominator, then the dierential equation is nonlinear. On the other hand,
sin t, et , tn , ln t, and so on can appear as part of p(t) or q(t).
Example 2.3.1 Determine which of the following rst-order dierential equations are linear. If it is linear, state what p(t) and q(t) are. If it is not linear, state why not.
a) x = xt2
b) x = x + sin t
c) x + et x = t
d) x = x2 + xt
Equation a) is linear: write the equation as x t2 x = 0, so that p(t) = t2 and q(t) = 0.
Equation b) is linear: write the equation as x + x = sin t, so that p(t) = 1 and q(t) = sin t.
Equation c) is linear: we have p(t) = et and q(t) = t. Equation d) is nonlinear: the term
x2 is not linear in x.
If equation (2.11) is homogeneous then x (t) + p(t)x(t) = 0, and this can be solved
by our method
for separable equations. In this case, all of the solutions are of the form

35

## If equation (2.11) is not homogeneous, we need to nd a way to integrate the left-hand

side x (t)+p(t)x(t). The trick here, is to nd a function (t) (called an integrating factor)
such that if the left side of (2.11) is multiplied by (t), the product will be the derivative of
some known function, and therefore easy to integrate.
The left side of equation (2.11), after multiplication by (t) is:
(t)[x (t) + p(t)x(t)] = (t)x (t) + (t)p(t)x(t).

(2.12)

For any function , the derivative of (t)x(t), by the product rule for dierentiation, is:
d
[(t)x(t)] = (t)x (t) + (t)x(t).
dt

(2.13)

If (t) is a function such that (t) (t)p(t), both expressions (2.12) and (2.13) are
the same; which implies that after multiplication by the left side of our equation is the
derivative of (t)x(t) with respect to t. A well-known fact from Calculus tells us that the
integral of the derivative of a function f (t) is f (t). This allows us to write:

## (t)[x (t) + p(t)x(t)]dt =

d
[(t)x(t)]dt = (t)x(t).
dt

(2.14)

## Fortunately, the condition that (t) (t)p(t) is just

a homogeneous linear equation in ;

therefore, we can use the simplest solution (t) = e p(t)dt as our integrating factor.

The function = e p(t)dt is an exponential function, which is positive for all t; therefore,
multiplying the dierential equation (2.11) on both sides by does not change the set of
solutions. We can solve the new equation
(t)[x (t) + p(t)x(t)] = (t)q(t)
by integrating both sides with respect to t (using our result in (2.14)):

(t)x(t) =

(t)q(t)dt + C.

## Dividing this by the non-zero function gives the explicit solution

x(t) = (1/(t))[

(t)q(t)dt + C].

(2.15)

You will be relieved to know that, although equation (2.15) is important theoretically,
you do not need to memorize it to solve a simple linear dierential equation. To do that,
one just follows the steps used in the derivation. This can be written in the form of a simple
5-step procedure.
36

## To solve a linear rst-order dierential equation:

Put the equation in standard form,
x (t) + p(t)x(t) = q(t).
Be sure to divide through by the coecient of x (t) if it is not already equal
to 1.

## Find the simplest possible antiderivative, P (t) = p(t)dt, of the coecient

function p(t).
Let (t) = eP (t) , and multiply both sides of the equation in step one by (do
not forget to multiply q(t) by ).
Integrate both sides of the resulting equation with respect to t (be sure to
add a constant of integration on one side). If you have done the rst three
steps correctly, the integral of the left-hand side is just (t)x(t).
Divide both sides of the equation by (t) to obtain the explicit solution x(t).

## The easiest way to see how all of this works is by example.

Example 2.3.2 Solve the equation x = x + tet .
This is easily seen to be a linear equation with standard form
x x = tet .

The coecient p(t) of x is 1, so (t) = e p(t)dt = e (1)dt = et . Now multiply both sides
of the equation by :
et x et x = et (tet ) = t.
The left side is the derivative of (t)x(t) = et x(t) (Check it!); therefore, the equation can
be written as
d t
(e x) = t.
dt
It is now possible to integrate both sides of the equation with respect to t

d t
(e x)dt = tdt
dt
et x = t2 /2 + C
and solve explicitly for x(t):
x(t) = et (t2 /2 + C).
This is the general solution of x = x + tet , and you should check this by dierentiating x(t)
and substituting x(t) and x (t) into the dierential equation.
37

Example 2.3.3 Solve the initial-value problem tx +x = cos(t), x(1) = 2. Also, determine
the long-term behavior of the solution, both by looking at the form of the solution, and with
a slope eld.
To put this equation into standard form, it must be divided by t:
x + (1/t)x = cos(t)/t;

where
it must now be assumed that t = 0. The integrating factor is (t) = e p(t)dt =

(1/t)dt
e
= eln(t) = t. Always choose the simplest possible antiderivative of p. If the dierential equation is multiplied by (t) = t and integrated,

## [tx (t) + x(t)]dt =

[tx(t)]dt = cos(t)dt.
dt
This implies that tx(t) = sin(t) + C, and solving explicitly for x,
x(t) = [sin(t) + C]/t, t = 0.
To satisfy the initial condition x(1) = 2, solve x(1) = sin(1) + C = 2 for C. Then C =
2 sin(1), and the solution to the initial-value problem is x(t) = [sin(t) + 2 sin(1)]/t. It is
clear from the exact solution that x 0 as t . A slope eld for this equation is shown
in Figure 2.5, with the solution through the initial point (1, 2) drawn in. The slope eld
indicates that in fact all solutions with initial conditions given at t > 0 seem to approach
zero as t .

4
x(t)
2
8 6 4 2 0

2
4

## Figure 2.5: tx + x = cos(t)

It is clear that something very strange happens to solutions as t approaches 0. More will
be said about this when the existence and uniqueness of solutions is discussed in Section 2.4.

Exercises 2.3 For each equation below state whether it is linear, separable, both, or neither.
1. x = t sin(x)
38

2. x = t + sin(x)
3. x = x sin(t)
4. x = x + sin(t)
5. y + ty = t
6. y + xy = x2
Solve each of the following linear equations. Also determine the long-term behavior
for each.
7. x + 2x = e2t cos(t)
8. x = x + 1

## Note that this equation is also separable.

9. tx + 2x = 1 + t
10. x = x + t
Solve the following initial-value problems:
11. x = x + e3t , x(0) = 2
12. x + 2x = e2t cos(t), x(0) = 1
13. tx + x = t2 + t, x(1) = 0
14. x + 2tx = t, x(0) = 1
15. Recall the model for a falling body from Exercise 2.1.25 given by mv = mg cv,
m
where m is the mass in kilograms, g is the acceleration of gravity (9.8 sec
2 ), and c is a
proportionality constant which represents the amount of air resistance. In that problem
you found the general solution using separation of variables. Find the general solution
this time using the techniques of this section (since the equation is also linear).

39

2.4

## Existence and Uniqueness of Solutions

In this section we will consider the question of whether a given initial-value problem
x = f (t, x), x(t0 ) = x0
actually has a solution passing through the given initial point (t0 , x0 ); and, if it does, whether
there can be more than one such solution through that point. These are the questions of
existence and uniqueness, and they become very important when one is solving applied
problems.

## Notation of Partial Derivatives

In this section, and again in Section 5.2 we will encounter the symbol f
x which represents
the partial derivative of a function f of two variables x and y with respect to the x variable
(similarly f
y represents the partial derivative of f with respect to y). This symbol is usually
encountered rst in a Calculus of Several Variables course; if you have not had this course
yet, do no worry.
df
For all intents and purposes, you may consider f
x to represent the same thing as dx .
The dierence is that when f depends on two variables x and y instead of just x, we use f
x
df
. The important thing to understand is that when nding the partial derivative
f
x you must consider the y variable to be a constant (and vice versa). Thus for example
f
2
2
if f (x, y) = 2x 3xy 2 + y 3 then f
x = 2 3y and y = 6xy + 3y . When using the
TI-89 calculator, the derivative button will give the correct partial derivative (since you
must specify the dierentiation variable when using this feature of the calculator).
There is a basic theorem which can be applied to the initial-value problem (??).
Theorem 2.1 (Existence and Uniqueness): Given the dierential equation x = f (t, x), if
f is dened and continuous everywhere inside a rectangle R = {(t, x)|a t b, c x d}
containing the point (t0 , x0 ) in its interior, then there exists a solution x(t) passing through
the point (t0 , x0 ), and this solution is continuous on an interval t0 < t < t0 + for some
> 0. If f
x is also continuous in R, there is exactly one such solution; that is, the solution
is unique.
Comment: Notice that even if the function f is suciently dierentiable, the theorem
does not imply that the solution exists for all t. For example, it may have a vertical
asymptote very close to t = t0 .
Example 2.4.1 What does Theorem 2.1 tell us about solutions of the logistic growth equation x = x(1 x)?
The functions f (t, x) = x(1 x) and f
x = 1 2x are both continuous everywhere in the
(t, x)-plane; therefore, there exists a unique solution through any point (t0 , x0 ). This implies
that solution curves in the plane cannot cross. If they did, their point of intersection would
have two solutions through it, and this would contradict the statement of the theorem.
Since x(t) 0 and x(t) 1 are both constant solutions of the dierential equation, the
theorem also implies that any solution with 0 < x(0) < 1 must remain bounded between 0
and 1 for all t for which it exists. If two solutions intersected, it would violate the uniqueness
of the solution through that point.
40

x
4
3
2
1

t
2

1
2

## Figure 2.6: Solutions of x = x(1 x)

Note that the theorem does not tell us how big the t-interval of existence is for a given
solution of x = x(1 x). We solved the equation in example 2.4.1 in Application 1 at
1
the end of Section 2.1 (it is separable). The general solution is x(t) = 1+Ce
t , where
1
C = x(0) 1 if x(0) = 0. If 0 < x(0) < 1 the constant C is positive and the solution
exists for all t. If x(0) > 1 or x(0) < 0, the denominator of x(t) will have a zero at
1
t = ln(C) = ln(1 x(0)
) and x(t) will have a vertical asymptote at that value of t. Figure
2.6 shows the solutions through x(0) = 0.01, 0.5, 1.0 and 1.2. The vertical asymptote for
the solution with x(0) = 0.01 is at t = ln(101) 4.6, and for the solution with x(0) = 1.2
the asymptote is at t = ln(1/6) 1.8.
Example 2.4.2 Does the IVP tx + x = cos(t), x(1) = 2 have a unique solution?
The function f in this case is f (t, x) = (x + cos(t))/t. It is continuous everywhere except
where t = 0. As shown in Figure 2.7, a rectangle which contains no points of discontinuity
of f can be drawn around the initial point (t0 , x0 ) = (1, 2). This implies that there exists
at least one solution of the IVP. To check its uniqueness, it is necessary to compute f
x =
cos(t)

1
1
(
x
+
)
=

.
This
function
is
also
continuous
wherever
t
=

0;
therefore,
the
IVP
x
t
t
t
has a unique solution (shown in Figure 2.7). We found this solution, in Example 2.3.3 to
be x(t) = (sin(t) + 2 sin(1))/t, so the solution of our IVP turns out to only be dened for
t > 0, and has a vertical asymptote at t = 0.
As seen in the Example 2.4.1, a very important consequence of Theorem 2.1, one that we
shall use frequently throughout the rest of this text, is that for nice dierential equations,
distinct solution curves cannot intersect. The proof of the following theorem follows directly
from Theorem 2.1.
Theorem 2.2 (No intersections theorem) Let I represent the interior of the domain
of denition of f (t, x). If f (t, x) and f
x (t, x) are continuous everywhere on I, then no two
distinct solution curves can intersect anywhere in I.
41

x4
3

2
1

t
2

1 0

## Figure 2.7: Solutions of tx + x = cos(t)

Example 2.4.3 Is it possible for solution curves to cross for the dierential equation x =
x + t? For x = xt ?
For x = x + t we have f (t, x) = x + t and f
x = 1. The domain of denition of f (t, x)
is - < t < , < x < and both f and f
x are continuous everywhere, so solution
curves can never cross.
1
For x = xt we have f (t, x) = xt and f
x (t, x) = t . The domain of denition of f (t, x)
f
is t = 0, < x < , and both f and x are continuous there, so solution curves can
never cross inside either of the half-planes t < 0 and t > 0.

## The function f (t, x) = x is dened at x = 0, but we cannot enclose the point

(0, 0) inside
any rectangle that does not contain some points with x < 0. When x < 0, x is not even
dened; therefore, f does not satisfy the continuity hypothesis and Theorem 2.1 gives us no
information about solutions of this IVP.

## The dierential equation x = x in Example 2.4.4 is separable and can be solved by

integration, as follows:

dx
1/2
x
dx = dt
x
2x1/2 = t + C
t+C 2
) .
x(t) = (
2
2

t
2
To satisfy the initial condition x(0) = ( 0+C
2 ) = 0, let C = 0. Then x(t) = 4 is a solution of
the IVP. Notice, however, that x(t) 0 is also a solution; therefore, in this case the solution
1

of the IVP is denitely not unique. This should not be surprising, since f
x = 2 x is not
even dened at x = 0.

42

Thus we have a point, (0, 0), in the t-x plane where two solution curves intersect for the

2
dierential equation x = x (namely, x(t) = 0 and x(t) = t4 ).
This does not contradict
Theorem 2.2, however. The domain of denition of f (t, x) = x is D = {(t, x) : x 0}
and the interior of D is given by I = {(t, x) : x > 0}; the functions f (t, x) = x and
f
1

x (t, x) = 2 x are indeed continuous on the interior I, but the point (0, 0) is on the
boundary of D. Thus, though it would be impossible for two solution curves to intersect
in the interior of D, we see that it is possible for two solution curves to intersect on the
boundary of D.
Proof of Theorem 2.1. It is useful to have some idea of how Theorem 2.1 is proved.
First, consider an equivalent way of writing equation (??). If both sides are integrated from
t0 to a variable value of t:

x (s)ds =

f (s, x(s))ds

t0

t0

x(t) x(t0 ) =

f (s, x(s))ds,
t0

## then x can be written as

x(t) = x0 +

f (s, x(s))ds.

(2.16)

t0

Equation (2.16) is equivalent to the initial-value problem (??), and its solution can be
approximated iteratively in the following way. Let X0 (t) x0 ; that is, X0 (t) is the constant
function with value x0 for all t. Dene a sequence of functions X0 (t), X1 (t), ..., Xn (t), ... by

Xn (t) = x0 +

## f (s, Xn1 (s))ds, n = 1, 2, ....

t0

If this sequence of functions {Xn (t)} can be shown to converge to a unique function x(t) as
n , x(t) will be the unique solution of the initial-value problem (??). It can be shown,
using methods of advanced analysis, that the sequence will converge to a unique function if
there exists a constant K such that f satises the condition |f (t, x) f (t, x
)| K|x x
|
for all points (t, x) and (t, x
) in a rectangle R about the initial point (t0 , x0 ). This is called
a Lipschitz condition for the function f , with Lipschitz constant K. Notice that if f
x
exists and is bounded in R, then f (t, x + x) f (t, x) = f
x (t, )x for some between
x and x + x; therefore, the Lipschitz constant can be taken to be K = max(t,x)R | f
x |.
This implies that Theorem 2.1 gives sucient conditions for existence and uniqueness of
solutions, but solutions may exist even if
some of the conditions of the theorem are not
satised. This was true for the I.V.P. x = x, x(0) = 0.

43

## Exercises 2.4 Answer each of the following:

x
1. Use Theorem 2.1 to show that the dierential equation x = 1+t
2 has a unique solution through every initial point (t0 , x0 ). Can solution curves ever intersect for this
dierential equation?

2. Use Theorem 2.1 to prove that the solution of an initial-value problem for the equation
x
x = 1+t
2 , with x(0) > 0, can never become negative. Hint: First nd a constant
solution of the dierential equation for some constant C.
3. Does the equation x = x2 t have a unique solution through every initial point (t0 , x0 )?
Can solution curves ever intersect for this dierential equation? If so, where?
4. Does the equation x = x2/3 have a unique solution through every initial point (t0 , x0 )?
Can solution curves ever intersect for this dierential equation? If so where? Can you
nd two solution curves that cross each other?
5. Does Theorem 2.1 imply that the solution of x = x2 t, x(0) = 1.0 is dened for all
6. Consider the dierential equation x = t/x.
a) Use Theorem 2.1 to prove that there is a unique solution through the initial point
x(1) = 1/2.
b) Show that for t > 0, x(t) = t is a solution of x = t/x.
c) Use (b) to nd an upper bound on the solution in (a).
d) Solve the initial-value problem in (a) analytically (see Example 2.1.3). Find the
exact t-interval on which the solution is dened. Sketch the solution in the slope eld
below.

x3
2
1
3

1 0
1

t
1

2
3

44

2.5

## More Analytic Methods for Nonlinear First-order

Equations

Two additional methods for solving rst-order dierential equations are given below. This
list is far from exhaustive, but it is important to have some idea of the dierent methods that
exist. If there is any analytic method for solving a given dierential equation your computer
algebra system will probably know how to apply it. Discovering and programming methods
for nding analytic solutions of dierential equations is one of the things that keeps the
programmers for MAPLE, Mathematica, and the TI-89 calculator busy.

2.5.1

## Let F be a dierentiable function of two independent variables x and y. The expression

F
dF = F
x dx + y dy is called the total dierential of the function F . From calculus it
is known that if dF is identically equal to zero in some region of the (x, y) plane, then
the function F (x, y) must be a constant in that region. This can be used to nd analytic
solutions for a certain type of rst-order dierential equation.
Given a rst-order dierential equation written in the form
g(x, y)dx + h(x, y)dy = 0,

(2.17)

suppose we can show that there exists a dierentiable function F (x, y) such that g(x, y) = F
x
and h(x, y) = F
y . (Note that this is not going to be true in general). If it is true, equation
(2.17) states that the total dierential of the function F is zero, and therefore F (x, y) = C
is an implicit solution of equation (2.17).
Example 2.5.1 Solve the dierential equation
y = x/y.

(2.18)

We rst write the equation in the form dy/dx = x/y and then expand it, by assuming that
the dierentials dx and dy can be separated, as
xdx = ydy or xdx + ydy = 0.
2

## The function F (x, y) = x +y

satises F
2
x = x and
is an implicit solution of equation (2.18).

F
y

## = y (Check it!); therefore,

x2 +y 2
2

=C

In the above example the dierential equation (2.18) is also separable, and it would be
a good exercise to show that you get the same solution by solving it by the method for
separable equations.
Denition 2.3 A rst-order dierential equation is called exact if it can be written in the
form
M (x, y)dx + N (x, y)dy = 0
where M (x, y) =

F
x

and N (x, y) =

F
y

45

(2.19)

## In the calculus of several variables it is shown that if F is a twice continuously dier2F

entiable function of two variables then the second-order mixed partial derivatives xy
and
2F
yx

are equal. If M =

F
x

and N = F
y , then
(
)
(
)
M
F
F
N
=

=
.
y
y x
x y
x

N
It is also true, but slightly more dicult to prove, that if M
y = x then there exists a
F
F
function F (x, y) with x = M and y = N ; therefore, a simple way to test equation (2.19)
N
for exactness is to check that the functions M and N satisfy M
y = x .

Example 2.5.2 Determine whether or not each of the following dierential equations is
exact.
(i) (x2 + y)dx + (x sin(y))dy = 0
(ii) (x2 y)dx + (x3 /3 + 4y 2 + 1)dy = 0
(iii) (x + y)dx (x y)dy = 0
In the rst equation, M = x2 + y and N = x sin(y). The partial derivatives are

= y
(x2 + y) = 1 and N
x = x (x sin(y)) = 1; therefore, the equation is exact.
In the second equation, M = x2 y and N = (x3 /3 + 4y 2 + 1). The partial derivatives are

M
2
2
3
2
2
y = y (x y) = x and x = x (x /3 + 4y + 1) = x ; therefore, the equation is exact.
In the third equation, M = x + y and N = (x y). The partial derivatives are
M

## y = y (x + y) = 1 and x = x (x + y) = 1. Since the two partial derivatives are not

the same, equation (iii) is not exact.
M
y

Make sure that
(1) Set

F
x

M
y

N
x ,

## where Q(y) represents the constant of integration with respect to x, and

the symbol x implies that the integration is done as though x is the only
variable, and y is a parameter.
(2) Dierentiate the function F found in step (1), partially with respect to y,
and set the result equal to N (x, y):
(
)

F
=
M (x, y)x + Q (y) N (x, y).
y
y
(3) If you have done steps (1) and (2) correctly, the equation resulting from step
(2) will dene Q (y) as a function of y only. Antidierentiate Q (y) to obtain
Q(y). The function F from step (1), with this value of Q(y), will provide an
implicit solution F (x, y) = C of the given exact dierential equation.
46

## The examples below demonstrate the use of this method.

Example 2.5.3 Solve the dierential equation (x2 + y)dx + (x sin(y))dy = 0,
N
We showed in example 2.5.2 that M
y = x = 1; therefore, this equation is exact. As
2
suggested in step (1), we set F
x = M = x + y. Then

## F = (x2 + y)x = x3 /3 + yx + Q(y).

Step (2) says to dierentiate this version of F partially with respect to y and set the
result equal to N:
F
3
=
(x /3 + yx + Q(y)) = 0 + x + Q (y) N = x sin(y).
y
y
Therefore, the function Q must satisfy Q (y) = sin(y), and integration gives Q(y) =
cos(y). Note: it is not necessary to add a constant to Q(y) since the function F will be set
equal to an arbitrary constant.
Substituting Q(y) into F = x3 /3 + yx + Q(y) we have the complete function F (x, y) =
3
x /3 + yx + cos(y); therefore, an implicit solution of the dierential equation is given by
x3 /3 + yx + cos(y) = C.
In this particular case it is not possible to solve for y(x) explicitly.
Note: Alternatively, we could have started by setting F
y = N = x sin(y) and integrated

## with respect to y to obtain F = (xsin(y))y = xy+cos(y)+P (x). Then F

x = y+P (x)
M = x2 + y implies P (x) = x2 and P (x) = x3 /3. This results in the same function
F (x, y) = xy + cos(y) + x3 /3.
Example 2.5.4 Solve the initial-value problem
y = f (x, y) =

2xy
, y(0) = 1.
1 + x2 + 3y 2

(2.20)

The dierential equation (2.20) is neither separable nor linear. It is easy to see that
f (x, y) is dened and continuous for all x and y, and so is its partial derivative with respect
to y; therefore, the Existence and Uniqueness Theorem tells us that there is a unique solution
through any initial point and solutions can not intersect in the (x, y)plane. Note that y 0
is a constant solution of equation (2.20). A slope eld for this equation is shown in Figure
2.9.
To nd an analytic solution of the IVP, we write the equation in the form
M (x, y)dx + N (x, y)dy = (2xy)dx + (1 + x2 + 3y 2 )dy = 0.
N
We rst check that M
y = 2x = x ; therefore, the method for solving exact equations can
be used.
Now, following the three-step method described above,

47

1.5
1

y(x)

0.5
4

0
0.5

2
x

1
1.5
Figure 2.9: Slope eld for y =

2xy
1+x2 +3y 2

## (1) Let F (x, y) = M (x, y)x + Q(y) = (2xy)x + Q(y) = x2 y + Q(y).

(2) Dierentiating the function found in (1) with respect to y,
F
= x2 + Q (y) N (x, y) = 1 + x2 + 3y 2
y
and the equation for Q (y) is Q (y) = 1 + 3y 2 .
(3) Integrating Q (y) = 1 + 3y 2 gives Q(y) = y + y 3 .
We have now found that F (x, y) is the function x2 y+y+y 3 and therefore x2 y+y+y 3 = C
is an implicit solution of equation (2.20). In this example, we can use the initial condition
y(0) = 1 to nd the constant C. This gives C = 2, and the unique solution to (2.20) is
y 3 + x2 y + y = 2.
We can go one step further and nd an explicit formula for the solution y. There is
a formula for roots of cubic polynomials (see the CRC tables) which is messy, but can
sometimes be used to produce a reasonable result. In this case it provides the following
explicit solution:

y(x) = 1 +

x2 + 1
3

)3

1/3
+ 1

1+

x2 + 1
3

)3

1/3
1

(2.21)

This solution curve is shown in the slope eld in Fig. 2.9. At this point, it would be
interesting to see what your computer algebra system gives as a solution to equation (2.20).
It will probably not be written in exactly the same form as (2.21), but you can check that it
is the same function by graphing both functions on the same set of axes.
The method for solving exact equations can be extended by also allowing for multiplication by an integrating factor. This technique can be used to make an equation of the form
P (x, y)dx + Q(x, y)dy = 0 into an exact equation. An excellent discussion of this method
can be found in the book by Polking, Boggess and Arnold [].

48

2.5.2

Bernoulli Equations

## Any equation of the form

x = p(t)x + q(t)xn , n = 0, 1

(2.22)

## is called a Bernoulli Equation. If n = 0 or n = 1 the equation is easily seen to be linear,

and our method for solving linear equations can be used. For any other value of n, the
substitution of a new dependent variable v(t) = (x(t))1n turns the equation into a linear
equation in v. To see this, dierentiate v(t) by the chain rule:
v =

d 1n
(x
) = (1 n)xn x .
dt

## Multiplying equation (2.22) by xn ,

xn x = p(t)x1n + q(t) = p(t)v + q(t),
and therefore

v = (1 n)p(t)v + (1 n)q(t),

(2.23)

## which is a linear dierential equation for v.

Example 2.5.5 As a rst example we will show that the logistic growth equation
P = rP (1 P/N )

(2.24)

## is a Bernoulli equation for any values of the parameters r and N .

We can rewrite equation (2.24) in the form
P = rP

r 2
P
N

and this has the form of a Bernoulli equation with n = 2, p(t) = r and q(t) = r/N . Letting
v = P 1n = P 1 = 1/P and using equation (2.23), the equation for v is
v = (1 2)p(t)v + (1 2)q(t) = rv +

r
.
N

This linear equation can be solved by multiplying by the integrating factor = ert ,
r
ert v + rert v = ert
N
d rt
r
(e v) = ert ,
dt
N
and integrating
ert v =
Solving for v,

r ert

+ C.
N r

v = 1/N + Cert .

P = 1/v =

N
1
=
,
1/N + Cert
1 + N Cert

## which is equivalent to the solution we found in Section 2.1 by separation of variables. If we

let C1 = N C the two forms are the same.
49

## Another Bernoulli equation is considered in the next example.

Example 2.5.6 Solve the initial-value problem
y = 2y + et y 3 , y(0) = 1.

(2.25)

## This is a Bernoulli equation with n = 3, p(t) = 2, and q(t) = et . If we make the

substitution v = y 1n = y 2 then the equation for v is
v = (1 3) (2) v + (1 3) et = 4v 2et .
Solving for v by our method for linear equations, with = e4t ,
e4t v 4e4t v = 2et e4t = 2e3t

d 4t
(e v)dt = (2e3t )dt
dt
e4t v = (2e3t )/(3) + C
2 t
e + Ce4t .
3

## implies that y = 1/v. Therefore,

v(t) =

To nd y, note that v = y 2

(
y(t) =

2 t
e + Ce4t
3

) 21
.

(2.26)

To satisfy the initial condition y(0) = 1, set ( 23 + C) 2 = 1. We must use the plus
sign, and then C = 31 . The unique solution of the initial value problem (2.25) is

2 t 1 4t
3
y(t) = 1/
e + e =
,
3
3
et (2 + e3t )
1

## It is important in Example 2.5.6 to note that y = 0 is a constant solution of the dierential

equation (2.25), but it is not given by the general formula (2.26). This means that when
using Bernoullis Method it is also necessary to check for constant solutions rst.
The Uniqueness and Existence Theorem can be used to show that equation (2.25) has
unique solutions through every point of the plane. It is interesting to speculate whether the
positive solutions will tend to 0 or to + as t . One might suppose that the term
et y 3 in the slope function would drive solutions to +. However, the slope eld shown in
Figure 2.10, as well as the analytic solution, suggests that there is a positive value of y(0)
below which all positive solutions tend to 0 and above which they tend to +, possibly at
a vertical asymptote. Exercise 21 asks you to nd an approximation to this value of y(0).

50

2
y(t)
1

1
0

t 2

1
2
Figure 2.10: Slope eld for y = 2y + et y 3

2.5.3

## Using Symmetries of the Slope Field

In Figure 2.10 a certain type of symmetry is evident in the slope eld for the equation in
Example 2.5.6. If we write the equation as y = f (t, y) = 2y + et y 3 , we can see analytically
that the slope function f satises
f (t, y) = 2(y) + et (y)3 = (2y + et y 3 ) = f (t, y);
that is, the slope function is symmetric about the t-axis.
Any rst-order dierential equation y = f (t, y) with f satisfying f (t, y) f (t, y)
has the property that if y(t) is any solution of the equation, then y(t) is also a solution.
To prove this, assume y = f (t, y), f (t, y) f (t, y) and let w(t) = y(t). Then
w = y = f (t, y) = f (t, w) (f (t, w)) = f (t, w),
where the next to last equality uses the symmetry property of the slope eld. The fact
that w = f (t, w) proves that the function w is a solution of the same dierential equation
satised by y. This symmetry of the solution curves about the t-axis can be clearly seen in
Figure 2.10.

Exercises 2.5 For equations 1-6, determine whether or not the equation is exact.
1. (x + y)dx + xdy = 0
2. (2x + y)dx + (x y)dy = 0
3. sin(y)dx + x cos(y)dy = 0
4. yex dx + xey dy = 0
5. 2xydx + (x2 + y 2 )dy = 0
6. (x2 + xy + 3y 2 )dx + (y 2 + xy + 3x2 )dy = 0
51

## Find a general solution for each of the following:

7. (x + y)dx + (x + 1)dy = 0
8. (2 + y)dx + (x 3)dy = 0
9. (y + sin(y))dx + (1 + x + x cos(y))dy = 0
10. (xy 2 + 2y)dx + (x2 y + 2x + 1)dy = 0
Show that the equation is exact, and solve the IVP:
11. (1 + xy)dx + 12 x2 dy = 0, y(1) = 1
12. (x + y)dx + (x + 1)dy = 0, y(0) = 2
13. sin(y)dx + (x cos(y))dy = 0, y(1) =

## 14. yex dx + (2 + ex )dy = 0, y(0) = 1

Solve each of the following Bernoulli equations:
15. P = 2P (1 P/4)
16. P = P (2 5P )
17. y = y + et y 2 , y(0) = 1
18. y = 2y + e3t y 2 , y(0) = 1
19. y + y = ty 3
20. y + 2y = 4ty 3
21. For the Bernoulli equation y = 2y + et y 3 in Example 2.5.6, nd the positive solution
that separates solutions tending to zero from those having a vertical asymptote at a
positive value of t What is the initial value y(0) for this solution?

52

2.6

Numerical Methods

If the slope function f satises the conditions of the Existence and Uniqueness Theorem, it
is always possible to compute a numerical approximation to the solution of the initial-value
problem
x (t) = f (t, x), x(t0 ) = x0 .
In theory, if f can be dierentiated enough times, x(t) could be approximated by its Taylor
Series at t = t0 ; that is
x(t0 + t) = x(t0 ) + x (t0 )t + x (t0 )(t)2 /2! + ... + x(n) (t0 )(t)n /n! + ....
In general, this is not a good procedure to use because, as most Calculus students already
know, it may take a very large number of terms in the series to approximate x(t) accurately
for t very far from t0 . Furthermore, for each dierent dierential equation the formula
f (t, x) for x changes and the derivatives x , x , ... would all have to be recalculated. These
d
can be very complicated calculations; for example, the Chain Rule gives x (t) = dt
(x (t)) =
f
f
d
dt (f (t, x(t)) = t + x x (t), and higher derivatives become successively more involved. The
numerical methods described in this section avoid these problems by starting at t = t0 , with
a small t. The value x(t0 + t) is approximated by a small number of terms in the Taylor
Series, and then the process is repeated at t1 = t0 + t, t2 = t0 + 2t, ... . Notice that
there will be a small error at each step, due to truncating the series, and these errors will
accumulate.

2.6.1

Eulers Method

Eulers Method is one of the oldest and simplest numerical methods. It uses only the rst
two terms of the Taylor Series; that is, on each interval [tj , tj+1 ] it approximates x(t) by the
tangent line approximation at the left end of the interval. This approximation is
x(tj + t) x(tj ) + x (tj )t x(tj ) + f (tj , x(tj ))t.
Notice that no derivatives of f have to be evaluated, only the function f itself.
Algorithm for Eulers Method. Given x = f (t, x), x(t0 ) = x0 , to nd approximate
values of x(t) on the interval [t0 , tmax ]:
t0
(1) Choose a small stepsize t = tmax
, with N a positive integer.
N
(2) For j = 0, 1, ..., N 1 compute
xj+1 = xj + f (tj , xj )t
tj+1 = tj + t
(3) Plot the points (tj , xj ), j = 0, 1, ..., N . If straight lines are drawn between
consecutive points, the result of step (3) is a piecewise linear approximation to
the solution x(t) on the interval [t0 , tmax ].

53

Example 2.6.1 Approximate the solution of x = t x, x(0) = 1 on the interval [0, 2].
Let t = 20
N with N arbitrarily chosen to be 4. Then t = 0.5. It helps to make a
table, as shown below. Note that the values tj = t0 + jt are all determined once t is
chosen.
j
0
1
2
3
4

tj
0
0.5
1.0
1.5
2.0

xj
1.0
0.5
0.5
0.75
1.125

f (tj , xj ) = tj xj
1.0
0
0.5
0.75

xj+1 = xj + f (tj , xj )t
1.0 + (1.0)(0.5) = 0.5
0.5 + 0(0.5) = 0.5
0.5 + 0.5(0.5) = 0.75
0.75 + (0.75)(0.5) = 1.125

The value of xj+1 at the end of each row is used as the value of xj in the following
row. The initial conditions give the values of t0 and x0 in the rst line.
The formula for f (tj , xj ) depends on the particular dierential equation being solved.
Using the analytic method for linear dierential equations, the exact solution of x =
t x, x(0) = 1 is x(t) = t 1 + 2et (Check it!). This gives the exact value x(2) =
2 1 + 2e2 1.27067; so the absolute error in our numerically computed value of x(2) in
the above table is |1.27067 1.125| 0.14567.
Repeat the above calculations with N = 8; that is, with t = 0.25. You should end up
with an approximate value x(2) 1.20023. The error in this value is 0.0704. Notice that
by cutting the stepsize t in half the error has been cut approximately in half. Figure 2.11
shows the two approximate solutions plotted together with the exact solution.

1.5

0.5

t
0.5

1.5

## Figure 2.11: Euler approximations to x = t x, x(0) = 1, with N = 4, 8

The error in the Euler Method, after N steps, is said to be O(t). This is read on the
order of t, which means equal to a constant times t, in the limit as t 0. In the
Euler Method the Taylor Series is truncated after the term in t, which produces an error
t0
steps, the accumulated error is on the order of
O((t)2 ) at each step. After N = tmax
t
N times O((t)2 ), which is O(t), as stated.
54

## The order of a numerical method

Based on the preceding discussion, we say that Eulers Method is a rst-order numerical
method because its error is O(t). An nth order numerical method is one whose error is
O((t)n ); thus the error is equal to a constant times (t)n , in the limit as t 0. Because
we rely on our decimal number system so much, we often think in terms of the number of
decimal places of accuracy (absolute error) or the number of digits of accuracy (relative
error).
In example 2.6.1 we saw that when t was cut in half, the error was approximately cut
1
1
, the error is approximately reduced by 10
.
in half. Similarly, if the stepsize is reduced by 10
1
Another way of saying this is that every time you reduce the stepsize by 10 , you get one
1
more decimal place of accuracy. Since reducing the stepsize by 10
requires 10 times as many
steps to get to any particular nal t value, Eulers method can be very time consuming if you
need to get addtional decimal places of accuracy. On a graphing calculator Eulers method
becomes impractical if you need to take more than 1000 or so steps. Even on relatively fast
computers, the speed of Eulers method and the associated round-o error can become a
hindrance. Eulers method is rarely used in real-world applications.

55

2.6.2

## Improved Euler Method

A second order numerical method, called the Improved Euler Method, uses two values of the
slope function in each interval [tj , tj+1 ]. The slope m0 = f (tj , xj ) is computed rst. Then
the Euler approximation of x at tj+1 , denoted by x
j+1 ,is used to calculate an approximation
1
m1 to the slope at the right-hand end of the t-interval. The average slope m = m0 +m
is
2
used to compute a better approximation to x at t = tj+1 . This results in the formula
x(tj + t) xj+1 = xj +

t
(f (tj , xj ) + f (tj + t, xj + tf (tj , xj ))).
2

With some diculty, it can be shown that this formula for xj+1 agrees with the Taylor
Series for x(tj + t) in its rst three terms. This means that the truncation error at each
step is O((t)3 ); therefore, the accumulated error in the Improved Euler Method, over the
interval [t0 , tmax ], is O((t)2 ). Hence, cutting the stepsize in half reduces the error by 14 ,
1
1
and cutting the step size by 10
reduces the error by 100
(resulting in two more decimal
places of accuracy).
Algorithm for the Improved Euler Method. Replace Step (2) in the Euler Method
by the following:
(2 ) For j = 0, 1, ..., N 1 compute
m0 = f (tj , xj )
x
j+1 = xj + m0 t
m1 = f (tj+1 , x
j+1 )
m=

m0 + m1
2

xj+1 = xj + mt
tj+1 = tj + t
Note: The Improved Euler Method is also known as Heuns method, and is a SecondOrder Runge-Kutta method.
Example 2.6.2 Use the Improved Euler Method, with t = 0.5, to approximate the solution
of x = t x, x(0) = 1 on the interval [0, 2].
j

tj

0
1
2
3
4

0
0.5
1.0
1.5
2.0

m0 +m1
2

xj

m0 = tj xj

x
j+1 = xj + m0 t

m1 = tj+1 x
j+1

m=

1.0
0.75
0.78125
0.98828
1.30518

1.0
0.25
0.21875
0.51172

0.5
0.625
0.89063
1.24414

0
0.375
0.60938
0.75586

0.5
0.0625
0.41406
0.63379

xj+1
0.75
0.78125
0.98828
1.30518

Note that the error in x(2) is approximately |1.30518 1.27067| = 0.03451, which is even
less than the error we found using Eulers Method with twice as many steps.
56

With N = 8, the Improved Euler Method gives an approximation of 1.27756 for x(2),
which is in error by approximately 0.00689. By halving the step size, the error has been
reduced to less than a quarter of its size, which is what we would expect with a second-order
method. The Improved Euler Method requires two evaluations of f (t, x) for each step, but
again no derivatives of f have to be calculated.

2.6.3

Fourth-Order Runge-Kutta

A lot of work was done in the rst half of the Twentieth Century to develop methods
which are far more accurate. Most computer algebra systems use what are called RungeKutta Methods, developed by two German mathematicians. The fourth-order Runge-Kutta
Method, for example, uses four evaluations of the slope function on each t-interval to produce an approximation which agrees with the rst 5 terms of the Taylor Series, and has
an accumulated error O((t)4 ) on the interval [t0 , tmax ]. The algorithm is given below.
Although it is very tedious to compute by hand, it is easy to program for a calculator or
computer.
Algorithm for the 4th-order Runge-Kutta Method. Replace Step (2) in Eulers
Method by the following:
(2*) For j = 0, 1, ..., N 1 compute
m1 = f (tj , xj )
t
t
, x j + m1 )
2
2
t
t
, x j + m2 )
m3 = f (tj +
2
2
m4 = f (tj + t, xj + m3 t)
m2 = f (tj +

xj+1 = xj +

t
(m1 + 2m2 + 2m3 + m4 )
6
tj+1 = tj + t

For the IVP x = t x, x(0) = 1, four steps of the 4th-order Runge-Kutta Method
with t = 0.5 results in a value of x(2) 1.27110. The absolute error in this value
is |1.27067 1.27110| = 0.00043, which is much smaller than the error in either Eulers
Method or the Improved Euler Method, as expected. If t is halved, the error in x(2) will
1
= ( 21 )4 times its original size. This means that halving the step size
be approximately 16
t will result in an answer with at least one more signicant decimal digit.
When solving real-world problems, it is often the case that no exact solution is possible;
it then becomes critical to be able to estimate the accuracy of a numerical solution. Based
on the preceding discussion, when one is using the 4th-order Runge-Kutta Method, it is
reasonable to compare two solutions having step sizes t and t/2, and use the position of
the digit in which they dier to estimate how many signicant digits are correct. We saw
with Eulers method that we need to compare two solutions having step sizes t and t/10
in order to estimate the number of digits that are correct.
57

## If we need to attain a given number of digits or decimal places of accuracy, we can

employ the following guidelines:
Guidelines for Obtaining a Given Number of Digits of Accuracy
Eulers method (rst-order): Do two runs, one with stepsize t and one with stepsize
t/10; the digits that agree are assumed to be accurate. In order to obtain more
digits of accuracy, continue to divide the stepsize by 10, until the desired number of
digits agree for two consecutive runs.
Runga-Kutta (fourth-order): Do two runs, one with stepsize t and one with stepsize
t/2; the digits that agree are assumed to be accurate. In order to obtain more digits
of accuracy, continue to divide the stepsize by 2, until the desired number of digits
agree for two consecutive runs.
Warning: Remember that the relationship between the error and the stepsize t for
a numerical method occurs in the limit t 0. In practice this means that the
rst time that you reduce t by a tenth in Eulers method, or by half with RungaKutta, you may not get an additional digit of accuracy. However, as you continue to
reduce the stepsize appropriately, the additional digit guidelines will eventually kick
in (usually fairly quickly).

## Using Numerical Methods with Technology

It should be fairly obvious at this point that it is impractical to use a numerical method
for a large number of steps if a computer or calculator with appropriate capabilities is not
available. In order to see the eect that changing stepsize has on the error of a numeric
method we need to be able to compute the results of a numerical method for large numbers
of steps. A number of calculators and computer programs have built-in capabilities for the
Euler and Runga-Kutta algorithms (and, of course, any programming language can be used
to implement them). The technology appendix at the end of this section describes how to
use Maple and the TI-89 calculator for numerical calculation. Also, the applets supplied
with this text can be used for numerical calculation.

Example 2.6.3 The growth of a population of geese is modelled by the dierential equation
x = 0.5x(1 x) + cos(t), where x is measured in hundreds of geese, and t is in years.
The term 0.5x(1 x) represents logistic growth with carrying capacity 100 geese (x = 1),
and the cos(t) term represents emigration and immigration from neighboring populations.
Assume that there are 30 (x0 = 0.3) geese at time t = 0. How many geese does the model
predict that there will be after 10 years? Obtain an answer accurate to two decimal places
(hence, accurate to the nearest goose). Do this rst using Eulers method, and then using
fourth-order Runga-Kutta; in both cases start with a stepsize of 1.0.
The results below were calculated using the applet for rst-order equations at
uhaweb.hartford.edu/rdecker/MathletToolkit/FirstOrderBook.htm. Note: A tabel of values cn be obtained by pressing the Display values button.
The results for both methods are contained in the following tables.
58

Eulers Method
Stepsize
1
0.1
0.01
0.001

Estimate of x(10)
0.022798
0.919437
0.963143
0.967175

Fourth-Order Runga-Kutta
Stepsize
1
0.5
0.25
0.125

Estimate of x(10)
0.889641
0.960327
0.967163
0.967591

With Eulers method we see that we obtain roughly two digits of accuracy with a stepsize
of t = 0.001, where as with Runga-Kutta we reached a similar level of accuracy using
t = 0.25. Also, note that in both cases, the rst time that we cut the stepsize, we get very
little agreement in the estimates, but that quickly the one additional digit of accuracy rule
kicks in. In any case, we nd that after 10 years there are about 0.97 hundreds of geese, or
in other words, 97 geese.
While fourth-order Runga-Kutta is a very good method for many practical problems,
improvements on it have been, and continue to be, made. One group of advanced numerical
methods are referred to as adaptive stepsize methods. These methods change the stepsize
automatically in order to keep the error below a level determined by the user. Maples
built-in method is of this type (when no method is specied), as is the TI-89 calculators
method when RK is specied. Details of these methods are beyond the scope of this text;
the reader may consult any standard text on Numerical Analysis. Also, see the technology
appendix at the end of this section for information on Maple and the TI-89 calculator.
Example 2.6.4 Do example 2.6.3 again, this time using an adaptive step-size algorithm
(such as RK on the TI-89).
We need to adjust the error tolerance to make sure we have two decimal places of accuracy. On the TI-89 calculator this is call diftol, as explained in the technonogy appendix
1
to this section. Reducing diftol by a factor of 10
gives one more decimal of accuracy. The
results from a TI-89 are show below.

RK on the TI-89
diftol
0.001
0.0001

Estimate of x(10)
0.96722
0.96765

## As before, we get x(10) 0.97.

Numerical Methods and Phase Portraits
In Section 2.2 we dened a phase portrait as a slope eld together with a number of
solution curves drawn on it. Most computer/calculator software that draws slope elds will
also draw solution curves on top of the slope eld to form a phase portrait. The software
is using a numerical algorithm, such as the ones presented in this section. Therefore one
needs to be careful about step size (error tolerance for adaptive step size methods) so that
one gets an accurate phase portrait. Dont believe a computer drawn phase portrait unless
you have tried a smaller step size to see if the portrait is aected (and be sure to follow the
rules for changing the step size depending on the order of the numerical method used, as
explained in this section).
59

## (c) Step size 0.01

Figure 2.12: Phase portraits of x = x + t using Eulers method to draw solution curves
Example 2.6.5 Have a computer or calculator create a phase portrait of the dierential
equation x = x + t. Use enough solution curves (initial conditions) to ll out the entire
graph region. Use dierent step sizes to make sure the phase portrait is accurate.
Figure 2.12 shows phase portraits generated using Eulers method with three step sizes:
1.0, 0.1, and 0.01. The initial conditions were taken at all integer valued coordinates x(i) =
j, and trajectories go both backwards and forwards in time. Clearly, the graph with step size
equal to 1.0 is quite misleading, as well as the fact that it contradicts Theorem 2.1 (solution
curves coincide and cross). The graphs with step sizes 0.1 and 0.01 are quite consistent, and
hence suciently accurate (can you see any minor dierences?). The graphs were created using
the
applet
for
rst-order
equations
at
uhaweb.hartford.edu/rdecker/MathletToolkit/FirstOrderBook.htm .

60

Exercises 2.6

1.

2. For the IVP x = t x, x(0) = 1, make a table of values using Eulers Method with
N = 8 steps and step size t = 0.25 (do the work without using built-in computer or
calculator methods, as in example 2.6.1). Compare to the exact solution (which you
can calculate using the integrating factor method) and give the amount of error.
3. For the IVP x = x, x(0) = 1, make a table of values using Eulers Method with
N = 6 steps and step size t = 0.25 (do the work without using built-in computer or
calculator methods, as in example 2.6.1). Compare to the exact solution (which you
can calculate using separation of variables) and give the amount of error.
4. Repeat Exercise 1 using the Improved Euler Method with N = 8 and t = 0.25.
5. Repeat Exercise 2 using the Improved Euler Method with N = 6 and t = 0.25.
For each I.V.P. below, estimate the value of the dependent variable accurate to three
signicant digits at the point where the independent variable is equal to 5. First use
Eulers method, then repeat using either fourth-order Runga-Kutta or an adaptive step
size RK method (as on the TI-89 calculator; see the technology appendix). Use a computer or calculator built-in method, or alter the rst-order applet at
uhaweb.hartford.edu/rdecker/MathletToolkit/FirstOrderBook.htm .
6. y = y + sin(t), y(0) = 1.
7. x = x2 t, x(0) = 0.
8. y = 0.1xy, y(0) = 4.
9. p = p(1 p) + 0.5 cos(t), p(0) = 0.
Create accurate phase portraits of each dierential equation below, and include in the
phase portrait the solution curve corresponding to the initial condition given. They
are the same as the previous four problems, and you can use the same technology you
used there.
10. y = y + sin(t), y(0) = 1.
11. x = x2 t, x(0) = 0.
12. y = 0.1xy, y(0) = 4.
13. p = p(1 p) + 0.5 cos(t), p(0) = 0.
Problem 14 demonstrates an inherent danger in using approximate solutions:
14. a) Compute the Euler Method approximation to the solution of x = x2 , x(0) = 1 on
the interval [0, 1.2] with t = 0.2.
b) Solve the dierential equation exactly (it is separable), and explain what you nd.
What is happening in a)?
15. Use a numerical method to nd the value of x(0.8) for the solution of x = x2 , x(0) = 1.
Obtain two decimal places of accuracy. Compare this with the exact solution obtained
in problem 14.
61

16. What does the Maple command dsolve give for x(1) and x(1.2) for the IVP in 14?
Comment.
17. In Example 2.2.3 a slope eld was drawn for the dierential equation x = x2 t. It
displayed two dierent types
of solutions, those tending to as t and those
tending to the curve x = t. Use Figure 2.3 to estimate an initial value x(0) where
the behavior changes.
(a) Using technology, nd an initial condition x(0), correct to 3 signicant digits, for
which the solution x(t) seems to separate the two types of solutions described above.
(b) What does this solution appear to approach as t ?
(c) Can you suggest another way to obtain the initial value x(0) more exactly? Remember that this equation is known NOT to have an analytic solution in terms of
simple functions.

Technology Appendix
MAPLE: The command dsolve will try to nd a solution to a given dierential equation or initial-value problem. If you specify the option type=numeric it will produce a
procedure which will give a numerical approximation to the value of the solution at a
given value of the independent variable. You can specify the method to be Eulers method
using method=classical[foreuler] or you can specify fourth-order Runga-Kutta using
method=classical[rk4]; you specify the stepsize with stepsize=value. If you dont specify a method, the default numerical method used by dsolve is the Fehlberg fourth-fth order
Runge-Kutta method. It adaptively varies the step size to ensure that the error remains
small.
The Maple commands corresponding to the Example 2.6.3 are shown below:
Using Eulers method with stepsize 1.0 the commands and the output using Maple
would be:
>
sol:=dsolve([diff(x(t),t)=0.5*x(t)*(1-x(t))+cos(Pi*t),x(0)=0.3],type=
>
numeric,method=classical[foreuler],stepsize=1):
>
sol(10);
[t = 10., x(t) = 0.0227980008095547416]
Using fourth-order Runga-Kutta with stepsize 1.0 the commands and the output
using Maple would be:
>
sol:=dsolve([diff(x(t),t)=0.5*x(t)*(1-x(t))+cos(Pi*t),x(0)=0.3],type=
>
numeric,method=classical[rk4],stepsize=1.0):
>
sol(10);
[t = 10., x(t) = 0.889640947355020306]
TI-89: Use the MODE button to set the graph mode to DIFF EQUATIONS. Type
diamond-F1 to go to the Y= screen and enter the equation and initial condition. While
still in the Y= screen, type F1, choose Format, and set the Solution Method to EULER for
Eulers method. Next type diamond-F2 to go to the WINDOW screen, where you set the
62

stepsize (called tstep). Finally press diamond-F5 to see the results in table form. If you type
F2 at this point and set Independent to ASK, you can enter any nal t-value that you want.
All dierential equations must use Y1 as the dependent variable and t as the independent
variable.
NOTE: When the Solution Method is set to RK on the TI-89, it is not fourth-order
Runga-Kutta, but an adaptive stepsize method (discussed briey at the end of this section).
Instead of changing tstep you need to change the error-control parameter diftol (reduce it
by one-tenth to get an additional digit of accuracy).

63

2.7

## A rst-order dierential equation x = f (t, x) is called autonomous if the slope function f

depends only on x, and not explicitly on t. In other words, the rate of change of x does not
depend on time, but only on the current state of the dependent variable x. The equations
x = x2 and P = rP (1 P ) are autonomous; the equations x = x + t and x = x2 t are
not. An autonomous rst-order equation can be written in the form
x

dx
= f (x).
dt

(2.27)

## Note that an autonomous rst-order equation is always separable.

Solutions of autonomous rst-order equations have very limited types of behavior. Suppose that f (r) = 0 for some real number r. Then x(t) r is a solution of (2.27), since both
f (x) and x are identically zero for all values of t.
Denition 2.4 A constant function x(t) r, such that f (r) = 0, is called an equilibrium
solution of (2.27).
Since the slopes depend only on x, a slope eld (as dened in Section 2.2) for an autonomous equation x = f (x) is completely determined once slopes along any vertical line
t = t are plotted. In fact, if f (x) is dened and continuous for all x, the behavior of solutions
of the equation can be determined from the slope lines along the x-axis. This leads to the
construction of what is called a phase line for the dierential equation (2.27).
To draw a phase line for the equation x = f (x):
Find all real numbers r1 < r2 < ... such that f (ri ) = 0, and label these values
on a vertical x axis. These points represent the equilibrium solutions. We
assume rst that the function f is equal to zero at only nitely many values
of x.
For each interval (, r1 ), (r1 , r2 ), ... pick any value x = x
in the interval and
determine whether f (
x) is positive or negative. Draw an arrow on the axis,
in the given interval, pointing up if f (
x) is positive and down if f (
x) is
negative. Note that if f is a continuous function, it will have constant sign
between any two zeros.
A solution with initial value satisfying ri < x(0) < ri+1 is monotonically increasing if
the arrow points up or monotonically decreasing if the arrow points down. If f (x) satises
the conditions of the Existence and Uniqueness Theorem, then the solution must remain
bounded between the two equilibrium values, since they are solutions and solutions cannot
intersect.
Example 2.7.1 Draw a phase line for the dierential equation
x = f (x) =

(x 1)(x + 2)
.
1 + x2

This equation has two equilibrium solutions: x1 1 and x2 2. These are shown
plotted on a phase line in Figure (2.13). When x = 0, f (x) = (1)(2)/1 < 0 so an arrow is
64

drawn in the downward direction in the interval (2, 1). In both of the intervals (, 2)
and (1, ), f (x) > 0 so the arrows point up. Now consider a solution with initial condition
less than 2, for example x(0) = 3. Its slope will always be positive, but it can never
cross the equilibrium solution x(t) 2 (do you see why?); therefore, it must increase
monotonically and approach 2 as a horizontal asymptote, as t . Similarly, a solution
with 2 < x(0) < 1 must be monotonically decreasing and bounded between 2 and 1 for
all t; therefore, it must approach 2 asymptotically as t . If x(0) > 1, the solution is
monotonically increasing. Whether it exists for all t, or has a vertical asymptote for some
positive value of t, cannot be determined geometrically.

1 u

?
-2 u
6

Figure 2.13:
Phase line for x =

(x1)(x+2)
(1+x2 )

t
1

1
2
3

Figure 2.14:Solutions of x =

(x1)(x+2)
(1+x2 )

In Figure (2.14) solutions have been drawn for certain initial values at t0 = 0; but the
picture would look exactly the same if the same initial conditions were specied at any value
of t0 .

The phase line contains all of the information needed to construct the graphs of solutions
shown in Figure (2.14) , with one exception. It does not contain information on how fast
the curves approach their asymptotes. This information is lost in going to the phase line
representation, but note that we did not need to solve the dierential equation analytically
in order to draw the phase line.
Solutions below the lowest equilibrium solution r1 and above the nal equilibrium solution rN may either be dened for all t, or become innite at a nite value of t. The logistic
equation which was graphed in Figure (2.6) is an example of an autonomous equation. In
that example, the solutions below x 0 and above x 1 were both shown to have vertical
asymptotes. Note that this was done by solving the equation analytically.
Note: If the slope function f has innitely many zeros, for example f (x) = sin(x) which is
zero at x = 0, , 2, ... , the phase line will only be able to show the behavior around a
nite number of these.
65

## Stability - sinks, sources and nodes

In Figure (2.14) it can be seen that if solutions start initially close enough to the equilibrium solution x 2, they will return toward it as t . An equilibrium solution of
this type (with arrows pointing toward it from both sides on the phase line) is called a sink,
and is said to be a stable equilibrium. On the other hand, solutions starting close to x = 1
all tend to move away from this solution as t increases. An equilibrium solution of this type
(with arrows pointing away from it on both sides) is called a source. It is said to be an
unstable equilibrium. If the arrows on the phase line point toward an equilibrium on one
side and away from it on the other side, the equilibrium is called a node. It is semi-stable
in the sense that if a solution starts on one side of the equilibrium it will tend toward it and
on the other side it will tend away as t .
Example 2.7.2 Draw a phase line for the equation
x = x(x + 1)2 (x 3) = f (x),
and label each equilibrium point as a sink, source or node.

0
5

6
3 usource

15

3
2

f(x)

10

x
4

0 usink
unode
-1 6

Figure 2.16:
Phase line

t
1

## Figure 2.17:Solution curves

The equilibrium solutions are the zeros of f (x), namely x = 0, 1, and 3. These are
shown plotted on the phase line in Figure (2.16). To determine the direction of the arrows,
it helps to draw a graph of the slope function f (x) = x(x + 1)2 (x 3). This is shown
in Figure (2.15). Be careful not to confuse the graph of f (x) with graphs of the solution
curves x(t) shown in the DEplot output in Figure (2.17). The graph of f (x) is only used to
determine whether the arrow between two equilibria points up or down. It can be seen that
f (x) is positive between all pairs of equilibrium points except 0 and 3; therefore, all of the
arrows point up except the arrow between 0 and 3. Once the arrows are drawn, it is easy to
see that 1 is a node, 0 is a sink, and 3 is a source. Some solutions of this equation are
shown in Figure (2.17).
66

## Equations with parameters

Dierential equations that are used to model real-world situations often contain unspecied parameters. Consider a population p(t) growing according to the logistic growth
equation (described in Application 1 in the rst section of this chapter)
p (t) = rp(t)(1 p(t)/N );
where p(t) is the size of the population at time t years, r is the intrinsic growth rate (for
small populations), and N is the carrying capacity of the ecosystem. Suppose, for example,
that p(t) represents the number of sh in a pond. The parameters here are r and N.
Even though r and N remain unspecied, we can still sketch a phase line and determine
the stability of the xed points (though we may have to make some assumptions about the
parameters, such as whether they are positive or negative).
Example 2.7.3 Find the equilibrium points and sketch a phase line for the equation p =
rp(1 p/N ). Also determine the stability of the equilibrium points, and sketch a phase
portrait (slope eld with several solution curves). Assume that both r and N are positive.
To nd the equilibrium points we set the right-hand side of the dierential equation to
zero
rp(1 p/N ) = 0
and then solve for the dependent variable p. Since the equation is already in factored form,
we set each factor equal to zero to get
p=0
and
1 p/N

p/N =
p =

0
1
N

so that the equilibrium points are p = 0 and p = N . Notice that we do not need to know the
values of r and N . So far the phase line looks as shown below:

## Figure 2.18: Partial phase line for p = rp(1 p/N )

To determine the direction of the arrows above, below and between the equilibrium points,
we can test points in each of the three regions (we know from continuity that the function
67

f (p) = rp(1 p/N ) will be either always positive or always negative in each of the three
regions that we need to test).
For a value of p above p = N we can choose p = 2N . For a y value between p = 0 and
p = N we can choose p = N/2. For a p value less than p = 0 we can choose N (of course
other choices are possible). We summarize the results below in table form, and show the
complete phase line.

p
2N
N/2
N

## f (p) = rp(1 p/N )

r(2N )(1 (2N )/N ) = 2rN < 0
r(N/2)(1 (N/2)/N ) = r(N/4) > 0
r(N )(1 (N )/N ) = 2rN < 0

Figure 2.19: Table of values and phase line for p = rp(1 p/N )
We can now sketch a reasonably accurate phase portrait for the equation based on the
phase line. In Figure 2.20 we show a phase portrait for p = rp(1 p/N ).

p(t)
N

0
t

## Figure 2.20: Phase portrait for p = rp(1 p/N )

Bifurcation
68

Continuing with the logistic population model from the previous example, suppose that
now each year shermen are allowed to take out a total of h sh. The equation would
become
p (t) = rp(t)(1 p(t)/N ) h.
The letter h stands for harvesting, which in this example refers to the removal of sh each
year by shing. A phase line can be used to study the behavior of this sh population.
Assume r = 0.2 and the carrying capacity of the lake is 1000 sh. We can normalize the
equation so that P (t) = p(t)/100 = hundreds of sh in the lake at time t. Dividing both
sides of the equation by 100, gives
P (t) =

1
1
p (t)
=
(0.2p(t))(1 100P (t)/1000)
h,
100
100
100

## which results in the equation

P (t) = 0.2P (t)(1 P (t)/10) H = f (P, H)
where H = h/100 is now also measured in hundreds of sh.
To nd the equilibrium solutions of this equation, notice that for any constant H, the
slope function f (P, H) is a quadratic polynomial in P , and its zeros can be found by using
the quadratic formula. Write
0.2P (t)(1 P (t)/10) H = 0.02P 2 + 0.2P H = 0.
Then
P =

0.2

(0.2)2 4(0.02)(H)
= 5 25 50H.
2(0.02)

0.6

f(P,H)=.2P(1-P/10)-H
H=0

0.4
0.2
2
0

H=0.2
4
6

10

H=0.5

0.2
H=0.7
0.4
0.6
0.8

## Figure 2.22: Slope function f(P,H)

Phase lines can now be drawn for H = 0, 0.2, 0.5, and 0.7. Figure (2.22) shows the slope
function f (P, H) for each value of H. When H = 0 there are two equilibrium points P = 0
and P = 10. As H is increased, the two equilibria move closer together. When H = 0.5
69

there is exactly one equilibrium point at P = 5, and for H > 0.5 there are no equilibria.
Figure (2.21) consists of a sequence of phase lines, for a range of values of H. It shows that,
as long as less than 50 sh are harvested per year (that is, H < 0.5), there is a minimum
value such that if the sh population starts above that value it will ultimately return to the
upper equilibrium (which is a sink). If more than 50 sh per year are taken out (H > 0.5),
the sh population will ultimately die out no matter what the initial population is. The
value H = 0.5 is called a bifurcation value for the parameter.
Denition 2.5 Let x = f (x, ) be an autonomous dierential equation containing a parameter . A value = is called a bifurcation value of the parameter if the number
and/or type of the equilibrium solutions changes when passes through the value . The
dierential equation is said to bifurcate at = (we say a is the bifurcation point).
In the example above, 0.5 is the bifurcation value of H, and Figure (2.21), showing a
sequence of phase lines in a neighborhood of a bifurcation value, is often referred to as a
bifurcation diagram. One convention is to connect the sinks with solid lines, and the sources
with dotted or dashed lines, representing the equilibrium values in between the ones that
are calculated.
The study of dierential equations with parameters, and of bifurcations, is a current
topic of research in mathematics. The Applications in the next section will give you a
feeling for how all of this applies to real problems in the biological and physical sciences.

70

Exercises 2.7 In problems 1-10, draw a phase line for the autonomous dierential equation
and label each equilibrium point as a sink, source, or node.
1. x = x(1 x/4)
2. x = x2 1
3. x = x2
4. x = (x2 1)(x + 2)2
5. (spruce budworm equation) dP/dt = P (1 P/5)
6. x = sin(x)

0.7P 2
(0.05)2 +P 2

## 7. x = x(a x) for a > 0.

8. x = x(a x) for a < 0.
9. x = x2 a for a > 0.
10. x = x2 a for a < 0.
11. Sketch a bifurcation diagram for x = x(a x) using the values a = 2, 1, 0, 1,
2. What is the bifurcation point a ? Briey explain how the number and/or type of
equilibrium point(s) change at the bifurcation point.
12. Sketch a bifurcation diagram for x = x2 a using the values a = 2, 1, 0, 1,
2. What is the bifurcation point a ? Briey explain how the number and/or type of
equilibrium point(s) change at the bifurcation point.
13. A population of sh in a certain lake satises the growth equation:
dx/dt = f (x, h) = 0.5x(4 x) h,
where x(t) is thousands of sh in the lake at time t (in years), and h is thousands of
sh harvested per year.
a) If the harvesting term h is zero, how many sh will the lake support (i.e. what is
its carrying capacity)?
b) If the harvesting term is constant at h = 1, nd all equilibrium solutions and draw
a phase line. Label each equilibrium as a SINK, SOURCE, or NODE.
c) If h = 1 and the initial condition is x(0) = 0.5, what happens to the solution as
t ? Explain this in terms that a biologist might use.
d) Sketch phase lines for h = 0, 0.5, 1.0, 1.5, 2.0, 2.5 and place them side-by-side as
in Figure 2.21 to form a bifurcation diagram.
e) What is the bifurcation point h = h for this problem?

14. Sketch a phase line for x = |x(1 x)|. Now sketch a phase portrait by hand, based
on the phase line. Then have a computer or calculator draw the solution curves in the
phase portrait, using 0 t 5, 1 x 2. Is this dierent from what you expected?
Does this contradict the uniqueness part of Theorem 2.1?
71

## Lab 1: Population growth with harvesting

Introduction: A sh population is growing in a lake according to the model:
(
dy
y)
= ap 1
d
dt
b
where y denotes the population in thousands of sh after t years from some initial time.
This is logistic growth with carrying capacity b and inherent growth rate a. In addition
there is shing: d thousands of sh are being removed per year. For this lab, assume that
a = 0.37 and b = 5.28 .
Tools:
You will need either computer software or calculator to do this lab. The applet at
uhaweb.hartford.edu/rdecker/MathletToolkit/FirstOrderBook.htm can be used for interactive exploration and to create the required graphs. This applet will not get exact/algebraic
solutions to dierential equations, so you will also need a computer algebra system, such
as Maple, Mathematica, or the TI-89 calculator. Also, the Wolfram Alpha website can
solve dierential equations (just type in solve the dierential equation and then give the
equation).
To use the applet mentioned above, just click in the graph area to create an initial condition. Clicking and dragging will dynamically show how the solution responds to changes
to initial condition, and double clicking will keep that initial condition. Use the slider to
change the parameter d (or type in a value for d and press Enter). You can also enter initial
conditions using the entry boxes (press Enter when done); click on the Keep IC button to
keep that initial condition (this is helpful for graphing the xed point solutions).
To get hard copy of a graph proceed as follows. If you are using Windows, type AltPrtSc to get a screen shot of the window you are looking at, then go to a word processing
document and paste (Ctrl-v). A free program called Snipping Tool (included in some version
of Windows, and downloadable as Snippy for the others) allows you to easily draw a rectangle
around the part of the screen you want. For Mac users, type Apple-Shift-4 to get a crosshairs which can be dragged over the region you want to capture. Then paste into word
processing document.
Experiment:
1. For d = 0 there is no shing. Find the equilibrium values of the population for this
case. Determine the type of stability at each equilibrium point. Produce a phase
portrait (slope eld plus numerous solution curves) for 1 t 10 and 2 P 8
and for values of P (0) ranging between 1 and 7 (include the equilibrium values).
Choose your initial conditions carefully so as to get an accurate phase portrait. In
your report, discuss the phase portrait, both in the context of the sh population and
in purely mathematical terms. In your discussion, describe the long-term behavior of
the population for various initial conditions.
2. Repeat part 1 for d = 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7 . Thus, for each value of d you
need to nd the equilibrium values, and create a phase portrait to include in your
report. Be sure to include initial conditions corresponding to the equilibrium values
for each case, so that the equilibrium solutions are plotted. In your report, group the
72

d values into groups that have similar behavior, and carefully describe what happens
for various initial conditions within each group. Pay particular attention to the lower
equilibrium value (when there is one), and explain what it represents in the context
of shing.
3. Based on your work in part 2, rst estimate (based on the phase portraits and xed
points), and then nd the exact value of the bifurcation point d. In your report,
describe how the number and/or type of equilibrium value(s) changes at d. Sketch
a bifurcation diagram to include in your report. What does this bifurcation point
represent in terms of the amount of shing and the sh population?
Hint on nding the exact bifurcation point: Solve for the equilibrium values as a
function of d (in other words, dont substitute in a numerical value for d when you
set the right-hand side of the dierential equation equal to zero). What would be the
number of equilibrium values at the bifurcation point? Recall that quadratic equations
have either two, one or no solutions depending on the quantity under the radical sign
(called the discriminant) in the quadratic formula. Show all work in your report.
Extensions:
4. Find an exact general solution for the dierential equation using the numerical values
for d that you used in parts 1 and 2. You may want to use a computer algebra
system for this. In your report, discuss how the form of the solution changes for
dierent d values (refer to the groups of d values from part 2, and consider d = 0 to
be a separate group). Use these formulas to determine the long-term behavior of the
sh population for each d value. To do this, eliminate terms that approach zero as
t . In particular, recall that lim ekt = 0 for k < 0 and lim ekt = for k > 0,
lim
tan(t) = , and tanh(t) =

t 2

t
et et
et +et

1e2t
1+e2t .

## You may have to do some algebra

rst to get the expression into a form that has terms that approach zero. In your
report relate your results here to the results you got from the phase portraits parts
1) and 2). Does nite-time blow-up occur for any case? Could you see this from the
phase portraits?
Note: Dierent computer algebra systems may give dierent forms for these general
solutions. Identities that may help in showing the equivalence
of the dierent forms
are tan(ix) = i tanh(x) and tanh(ix) = i tan(x), where i = 1 (the reader should
prove these). Also, complex values of the constant in the general solution may have
to be considered to get all possible solutions.
5. Investigate the model

(
)
dP
P
= ap 1
dp
dt
b

For this model, the parameter d would represent the amount of sh removed each year
per sh in the lake. This could be interpreted as proportional shing, so that d = 0.5
would represent a shing rate of 50% removed per year (shing with large nets may
result in a model such as this, as more sh would be removed from the same area when
73

the population is larger). Use the approach outlined in parts 1-3 above. How do your
results dier from the rst model?
6. A model that includes the seasonal nature of shing (more in the summer, less in the
winter) is given by
(
)
dP
P
= aP 1
d (1 cos(2t))
dt
b
This model there is no shing at t = 0 or t = 1 (winter), and the greatest amount of
shing occurs at t = 0.5 (summer). Since this equation is nonautonomous, there are no
equilibrium points. However, there may be periodic solutions, which we could also call
equilibrium solutions. These are solution curves similar to the equilibrium solutions
in parts 1-2, but they are cyclical (look like sin or cos curves) rather than constants.
For each of the d values in part 2, plot the equilibrium solutions as best you can using
numerical/graphical experimentation, and include a few other solution curves as well
to form a phase portrait. There should be two equilibrium solutions for some d values,
and none for others, just as in the autonomous case. One of the equilibrium solutions
will behave like a sink, and the other like a source. The source like equilibrium
solutions are hard to nd when plotting forward in time, so try plotting backward in
time.
At what time of year does the sh population peak for each equilibrium solution? Use
d = 0.1 . To do this, zoom in on each of the two equilibrium cycles. How is the time at
which the population peaks related to the time at which the amount of shing peaks?
Hard: Try to identify a bifurcation value d as in part 3). This would be the point
where there is exactly one equilibrium solution. Since you cant solve for equilibrium
solutions as you do for equilibrium values, you cant get an exact value for d, so you
must use numerical experimentation. For an in-depth discussion of this problem see
Diego M. Benardete, V. W. Noonburg, and B. Pollina, Qualitative Tools
for Studying Periodic Solutions and Bifurcations as Applied to the Periodically Harvested Logistic Equation, American Mathematical Monthly,
115:3 (2007) 202-219.

74

2.8

Applications

I. Mixing Problems
The rst application we consider is called a one-compartment mixing problem.
Basically, it consists of nding a formula for the amount of some pollutant in a container,
into which pollutant is entering at a xed rate and also owing out at a xed rate. The
general physical rule used to describe this situation is
rate of change of pollutant per unit time = rate in - rate out.
If we denote by x(t) the amount of pollutant in the container at time t, its rate of change
per unit time is given by dx
dt ; therefore, the problem leads to a dierential equation for the
function x(t).
Example 2.8.1 Consider a sh tank which initially contains 150 liters of water with 20
grams of salt (pollutant) dissolved in it. The salt concentration in the tank needs to be
increased from 20/150 grams per liter to 1 gram per liter to accommodate a new species of
sh. Water containing 3 grams of salt per liter is allowed to run into the tank at a rate of
2 liters per minute. The thoroughly stirred mixture in the tank is also allowed to drain out
at the same rate of 2 liters per minute. Find a dierential equation for the amount of salt
x(t) in the tank at time t. Use the initial condition x(0) = 20 to nd the time it will take
to increase the salt concentration in the tank to 1 gram per liter.

2 l/min 3 g/l

x(0) = 20g
V = 150l
- 2 l/min
x(t)
V g/l

We are assuming that the mixture in the tank is thoroughly stirred, so that the salt concentration x(t)/V ol is instantaneously the same throughout the tank. Let x(t) equal grams of
salt in the tank at time t. Then
x(t)
dx
= rate in - rate out = (2l/min)(3g/l) (2l/min)(
g/l);
dt
V ol
dx
and the dierential equation we are looking for is dx
dt = 6 2x(t)/150. Note that dt is
measured in grams/minute.
This dierential equation is both separable and linear. Check that the I.V.P., with x(0) =
2
20, has the solution x(t) = 450 430e 150 t .
To nd the time when the concentration of salt in the tank reaches 1g/l, set 1 =
2
x(t)/V ol = (450 430e 150 t )/150 and solve for t. This gives t 27 minutes as the time it
takes to increase the concentration to the required value.

75

## The only equilibrium solution of the autonomous dierential equation dx

dt = 62x(t)/150
is x = 450, and a phase line will show that this is a stable SINK. It can be seen that as
t , our analytic solution x(t) approaches 450 as we would expect. Note that this is the
value of x for which the concentration in the tank is the same as the concentration of the
solution owing in.
If the ow rates in and out of the container are not the same, the volume will change
over time, and the dierential equation will no longer be autonomous.
Example 2.8.2 In the previous example it took about 27 minutes for the solution to reach
the desired concentration. One way to speed up the process would be to let the salt water
ow in at a faster rate. Assume that the input ow is increased to 2.5l/min, but that the
output ow cannot be increased. If the maximum amount of water the container can hold is
160 liters, will the salt concentration reach the desired level before the container overows?
The dierential equation now becomes
x(t)
g/l).
V ol
The volume of uid in the tank will increase by 0.5 liter each minute, so the volume at time
t is V (t) = 150 + 12 t.
2x
The dierential equation x = 7.5 150+
is not separable, but it is linear and its
1
2t
standard form is
4
x + (
)x = 7.5.
300 + t
x (t) = (2.5l/min)(3g/l) (2l/min)(

## The integrating factor is = e 300+t dt = e4(ln(300+t)) = (300 + t)4 . Multiplying by and

integrating

d
((300 + t)4 x)dt = 7.5(300 + t)4 dt
dt
7.5(300 + t)5
(300 + t)4 x =
+C
5
x(t) = 1.5(300 + t) + C/(300 + t)4 .
Using the initial condition x(0) = 20, the value of C is 430(300)4 . Now set 1 = x(t)/V (t) =
4
3.0 860(300)
(300+t)5 , and solve for t. This gives t 22.4 minutes, but V (22.4) = 150 + 0.5(22.4) =
161.2 liters; therefore, the tank will overow just before the solution reaches the desired
concentration.

## II. Single Neuron Equation

Consider a single neuron (nerve cell) that is receiving external input from surrounding
cells in the brain, plus feedback from its own output.
Let x(t) denote the level of activity of the neuron at time t, normalized to be between
0 (low activity) and 1 (high activity). A simple model representing the change of activity
level for such a cell is given by the dierential equation
dx
= x + S(x + E )
dt
76

(2.28)

feedback


input
E

-~
} - x(t)


## Figure 2.23: Input and output of the neuron

where E is the level of input activity from surrounding cells, is the cells threshold, and S
is called a response function. We will use a standard sigmoidal response function
S(z) =

1
.
1 + eaz

The nonlinear function S can be seen to increase monotonically from 0 and saturate at the
value 1 as z .
The dierential equation (2.28) for x is autonomous and therefore it can be analyzed by
drawing a phase line. Assume a = 10, and the incoming activity E is constant at E = 0.2.
Equation (2.28) now becomes
dx
1
= x +
dt
1 + e10(x+0.2)

(2.29)

Notice that because the value of S is always between 0 and 1, if x > 1 the slope x +
1/(1 + e10(x+0.2) ) is negative and if x < 0 it is positive. This means that any equilibrium
solutions, that is, values of x where dx
dt 0, must lie between 0 and 1. This, in turn, implies
that the arrows on the phase line are always pointing down above x = 1 and up below x = 0.
The equilibrium solutions of this equation are the constant values of x where x = 1/(1 +
e10(x+0.2) ). Figure 2.24 shows graphs of y = x and the response function y = 1/(1 +
e10(x+0.2) ) for values of = 0.4, 0.7 and 1.0. It can be seen that for small there
will be one equilibrium solution near x = 1 and for large there will be one equilibrium
solution near x = 0. This seems reasonable since a high threshold means it takes a lot of
input to produce very much activity. For in a middle range, however, there can be three
equilibrium solutions. We will rst sketch some phase lines to determine the type of each of
these equilibria. A second problem will be to determine the two bifurcation values of at
which the number of equilibrium solutions changes from 1 to 3 and from 3 to 1.
1.2

y=x

1
0.8
0.6

= 0.4

= 0.7

= 1.0

0.4
0.2
0.2 0
0.2

0.2

0.4

0.6
x

0.8

1.2

## Figure 2.24: y = 1/(1 + e10(x+0.2) ) for = 0.4, 0.7, 1.0

Example 2.8.3 Draw a phase line for Equation (2.29) with = 0.7. For each equilibrium
solution determine whether it is a sink, source, or node.
77

Using any numerical solver, such as fsolve in MAPLE or solve on the TI-89 calculator,
the equilibrium solutions can be found by solving the equation 1/(1 + e10(x0.5) ) = x.
Numerical solvers such as fsolve often require an initial guess or interval, so you should
graph both sides of the equation rst and estimate the x-values of the intersections from the
graph to use as initial guesses for the equilibrium solutions. This process should give the
three solutions x1 0.007188, x2 = 0.5, x3 0.992812. Note: the TI-89 solve command
will nd all three without an initial guess.
It is clear from Figure (2.24) that for
= 0.7 the slope function x + 1/(1 +
e10(x0.5) ) is positive if x < x1 , negative between x1 and x2 , positive between
x2 and x3 and negative if x > x3 . Alternatively, just substitute x values from
each of the four intervals dened by the
boundary points x1 , x2 , x3 in the expression x + 1/(1 + e10(x0.5) ) to see where
it is positive and negative.The phase line
for = 0.7 is shown on the right.

?
x3 t SINK
6
x2 t SOURCE
?
x1 t SINK
6

## Example 2.8.4 Find the bifurcation values of .

We must solve for values of for which the graph of y = 1/(1 + e10(x+0.2) ) is tangent
to the line y = x. These will be values of for which there are exactly two equilibrium
solutions; that is, values for which the number of equilibrium solutions changes.
To have a point of tangency with the graph of y = x, the following two equations must
be simultaneously satised (do you see why?):
1/(1 + e10(x+0.2) ) = x

(2.30)

)
d (
e10(x+0.2)
1/(1 + e10(x+0.2) ) = 10
= 1.
dx
(1 + e10(x+0.2) )2

(2.31)

## Using Equation (2.30) we get 1 + e10(x+0.2) =

Substituting these into Equation (2.31) we get

1
x,

## and hence e10(x+0.2) =

1
1
1
10 x 1 2 = 1 or x x2 =
.
10
(x)

1 14/10
This quadratic equation has two real roots x =
0.887 and 0.113.
2
To nd , solve Equation (2.30) for as follows:
1/(1 + e10(x+0.2) )
e10(x+0.2)
10 (x + 0.2 )

x
1
=
1
x
1
= ln( 1)
x
1
1
ln( 1) + x + 0.2
=
10
x
78

1
x

1.

1 14/10
Substituting in the two values for x =
that we found above we get the two
2
bifurcation values 0.51905, 0.88095. When = 0.51905, the point of tangency oc1

14/10

curs at x =
0.1127, and when = 0.88095 the point of tangency is at
2

1+ 14/10
x =
0.8873. You should be able to see from Figure 2.24 that these values
2
are reasonable.

Exercises 2.8
1. Continuing Example 2.8.2, nd the maximum input ow rate such that
the tank will just reach its capacity of 160 liters when the salt concentration reaches 1
gram per liter. How many minutes does it take? Your answer should be exact to the
nearest second. (THIS ONE IS HARD!)
2. Continuing Examples 2.8.1 and 2.8.2, assume now that instead of increasing the input
ow as in Example 2.8.2, we decrease the input ow to 1.5l/min (the output ow is
not changed)? Will the salt concentration reach the desired level before the container
empties?
The next two problems refer to the single neuron equation with a = 10 and E = 0.2.
3. Draw and label phase lines for equation (2.29) for = 0.4, 0.5, ..., 0.9, 1.0. If you draw
the phase lines side-by-side you will have a Bifurcation Diagram (refer back to Figure
2.21).
(
)
4. Carefully sketch a graph of S(x+0.2) = 1/ 1 + e10(x+0.2) for = 0.88095, and

1+ 14/10
show that a point of tangency with the line y = x occurs at x =
0.8873.
2
5. Let a = 10 and = 0.7 and assume that the external input E varies periodically; that
is, E = E(t) = 0.2(1 + sin(t)). The dierential equation now becomes
dx
1
= x +
10(x+0.2(1+sin(t))0.7)
dt
1+e

(2.32)

This time-varying input makes the equation nonautonomous. Use DEplot in MAPLE
or Dierential Equations mode on the TI-89 calculator (or some other graphing program) to draw approximate solutions of equation (2.32) for 0 t 20. Try dierent
values of x(0) between 0.4 and 0.6. How do the solutions compare with those of the
equation when = 0.7 and the input E remains constant at 0.2? Explain carefully
what you observe.

79

80

Chapter 3

Second-order Dierential
Equations
Recalling our denitions from Chapter 1, a second-order dierential equation is any
equation that can be expressed in the form
x = F (t, x, x )

(3.1)

for some arbitrary function F . The equation (3.1) is called linear if it can be put into the
form
x + p(t)x + q(t)x = g(t),

(3.2)

where p, q, and g are arbitrary functions of t. If g(t) 0, equation (3.2) is called a homogeneous linear equation.
The majority of second-order dierential equations are not solvable by analytic methods.
Even the equation (3.2) can be very dicult and sometimes impossible to solve, although
many famous mathematicians (as well as physicists, engineers, astronomers, etc.) have spent
a good part of their lives working on these equations. The following are examples of some
important second-order equations named after the scientists who studied them:
Bessels equation: t2 x + tx + (t2 2 )x = 0
Legendres equation: (1 t2 )x 2tx + ( + 1)x = 0
Vanderpols equation: x + (x2 1)x + x = 0
The rst two equations are linear and homogeneous, with variable coecients; however,
the third equation is nonlinear because of the x2 x term.
One reason for the importance of second-order equations is that if x(t) represents the
position of an object at time t, then x is its instantaneous velocity and x is its acceleration;
thus, real-world problems from the physical sciences very often lead to equations of this type.
If the equation (3.2) has constant coecients, that is, if it is of the form:
ax + bx + cx = g(t)
81

(3.3)

for some constants a = 0, b, and c, and g(t) is any continuous function, the methods in this
chapter will provide an analytic solution. A very well-known and important example of (3.3)
is the mass-spring equation. Analytic formulas will be given for solutions of the mass-spring
equation, and the behavior of the solutions in terms of real-world problems will be studied
in this chapter. Methods for solving equation (3.3) with discontinuous right-hand sides
g(t), such as step functions and impulse functions, will be given in the chapter on Laplace
transforms.
For the majority of nonlinear second-order dierential equations it will be necessary to
again resort to numerical and graphical methods. In Section 3.8, the phase line, dened for
autonomous rst-order equations, will be generalized to a phase plane for autonomous
second-order equations. This will provide a geometric method for studying the behavior of
solutions of arbitrary equations of the form x = F (x, x ).

3.1

## General Theory of Second-order Linear Dierential

Equations

In Section 2.3 we were able to obtain a general formula for the solution of a rst-order
linear dierential equation x + px = q with variable coecients p = p(t) and q = q(t). The
formula contained a single arbitrary constant which could be used to satisfy a given initial
condition x(t0 ) = x0 . It is not always possible to nd such a formula for solutions of the
second-order linear equation
x + px + qx = g.

(3.4)

When the coecients p and q are functions of t, it is often necessary to resort to series or
numerical methods to obtain solutions. However, when p and q are constants there is a way
to nd a general solution. In this section we outline a general theory for solving equation
(3.4).
We begin by stating the following Uniqueness and Existence Theorem which is proved
in more advanced books on dierential equations.
Theorem 3.1 (Existence and Uniqueness Theorem): For the linear equation x + p(t)x +
q(t)x = g(t), given two initial conditions of the form x(t0 ) = x0 and x (t0 ) = v0 , if the
functions p, q, and g are all continuous in some interval t1 < t < t2 containing t0 , then
there exists a unique solution x(t) which is continuous in the entire interval (t1 , t2 ).
A second-order dierential equation, together with two initial conditions, is again referred
to as an initial-value problem (IVP). Ideally, we would like to nd a function x(t) which
can be made to satisfy an arbitrary initial-value problem for equation (3.4). If such a
function x(t) can be found, it will be called a general solution of (3.4).
The standard technique for solving the nonhomogeneous linear equation (3.4) is to rst
look for a general solution xh of the associated homogeneous equation
x + px + qx = 0,

(3.5)

and then use the following two lemmas to obtain the general solution of the nonhomogeneous
equation (3.4). The notation xp will be used to denote a particular solution of the
nonhomogeneous equation.
82

## Lemma 1: If xh is a solution of (3.5) and xp is any solution of (3.4), then x = xh + xp is a

solution of (3.4).
Proof : We are given xh + pxh + qxh = 0 and xp + pxp + qxp = g. Let x = xh + xp . Then
x + px + qx = (xh + xp ) + p(xh + xp ) + q(xh + xp )
= (xh + pxh + qxh ) + (xp + pxp + qxp ) = 0 + g = g,
which shows that x = xh + xp is a solution of (3.4).
Lemma 2: If xp1 and xp2 are any two solutions of (3.4), their dierence xp1 xp2 is a
solution of the homogeneous equation (3.5).
Proof : The proof of Lemma 2 is very similar to that of Lemma 1 and is left as an exercise.
Another way of stating Lemma 2 is to say that if xp is any single solution of (3.4), then
every solution of (3.4) is of the form xp plus a solution of the homogeneous equation. We
have thus proved the following important result.
Theorem 3.2 If xh is a general solution of (3.5) and xp is any solution of (3.4), the
sum x = xh + xp is a general solution of equation (3.4).
We therefore turn our attention to the problem of trying to nd a general solution of the
homogeneous equation. Any homogeneous linear equation has the nice property that linear
combinations of solutions are solutions.
Lemma 3: If x1 and x2 are solutions of equation (3.5) then x(t) = C1 x1 + C2 x2 is also a
solution for any constants C1 , C2 .
Proof: We are given that x1 +px1 +qx1 = 0 and x2 +px2 +qx2 = 0. To see that C1 x1 +C2 x2
is a solution, write
(C1 x1 + C2 x2 ) + p(C1 x1 + C2 x2 ) + q(C1 x1 + C2 x2 )
= C1 (x1 + px1 + qx1 ) + C2 (x2 + px2 + qx2 ) = C1 0 + C2 0 = 0.
Note, for future reference, that the above proof can be easily extended to show that a
linear combination of any nite number of solutions is again a solution. Also note that the
proof does not work for a nonhomogeneous equation or a nonlinear equation. Do you see
why?
Suppose we have two solutions x1 and x2 of equation (3.5), and we form the linear
combination x = C1 x1 + C2 x2 . We know from Lemma 3 that x is a solution of (3.5) for
any constants C1 and C2 . To show that x is a general solution, we need to prove x can be
made to satisfy arbitrary initial conditions at any given initial time t = t0 ; that is, we need
to nd conditions on x1 and x2 such that the system of simultaneous (linear) equations
x(t0 ) =
x (t0 ) =

C1 x1 (t0 ) + C2 x2 (t0 ) = x0
C1 x1 (t0 ) + C2 x2 (t0 ) = v0

(3.6)

has a unique solution C1 , C2 for arbitrary values of x0 , v0 , and t0 . The condition we are
looking for is most easily recognized if the system (3.6) is solved by Cramers Rule. If you
83

do not know this method for solving simultaneous equations, read Appendix D before going
on. Cramers Rule states that the solutions C1 and C2 of (3.6) can be written as ratios of
determinants; that is,

C1 =

x0 x2 (t0 )

v0 x2 (t0 )
x1 (t0 ) x2 (t0 )
x1 (t0 ) x2 (t0 )

C2 =

x0 x2 (t0 ) v0 x2 (t0 )
=
,

x1 (t0 )x2 (t0 ) x1 (t0 )x2 (t0 )

x1 (t0 ) x0

x1 (t0 ) v0
x1 (t0 ) x2 (t0 )
x1 (t0 ) x2 (t0 )

v0 x1 (t0 ) x0 x1 (t0 )
=
.

x1 (t0 )x2 (t0 ) x1 (t0 )x2 (t0 )

(Determinants are discussed in more detail in Section 2 of Chapter 4). It is clear from the
above formulas that there will exist unique solutions C1 and C2 if, and only if, it can be
shown that the determinant in the denominator is unequal to zero for any value t0 of t. This
particular determinant has a special name.
Denition 3.1 If x1 and x2 are solutions of the second-order linear homogeneous equation
(3.5), the determinant

x x2
= x1 x2 x1 x2
W (x1 , x2 ) = 1
x1 x2
is called the Wronskian of the functions x1 and x2 .
The following theorem shows that it is only necessary to check the value of the Wronskian
at a single value of t.
Theorem 3.3 If x1 and x2 are any two solutions of the equation x + px + qx = 0, then
W (x1 , x2 ) is either zero for all t, or unequal to zero for all t.
Proof: The Wronskian is a function of t, and the proof consists of showing that W satises
the rst-order dierential equation dW
dt = pW . To see this, write
d
d
W (x1 , x2 ) = (x1 x2 x1 x2 ) = x1 x2 + x1 x2 x1 x2 x1 x2
dt
dt
= x1 x2 x1 x2 = x1 (px2 qx2 ) (px1 qx1 )x2
= p(x1 x2 x1 x2 ) = pW (x1 , x2 ),
where the hypothesis that x1 and x2 satisfy (3.5) has been used to write x1 = px1 qx1
and x2 = px2 qx2 . The separable dierential equation W = pW has solution W (t) =
t p(s)ds
W0 e t 0
, where W0 is the value of W (x1 (t), x2 (t)) at t = t0 . Therefore, if W0 = 0, the
Wronskian is zero for all values of t, and if W0 = 0, W is an exponential function which is
unequal to zero for all values of t for which it is dened.
At this point we have proved the following theorem.
84

Theorem 3.4 If x1 and x2 are two solutions of the homogeneous equation (3.5), and
their Wronskian x1 x2 x1 x2 is not equal to zero, then x = C1 x1 + C2 x2 is a general
solution of (3.5).
A pair of solutions {x1 , x2 } of (3.5) satisfying W (x1 , x2 ) = 0 is called a fundamental
solution set. The following Lemma shows that for a second-order linear equation, an
equivalent condition for a pair of solutions to be a fundamental solution set is that they not
be constant multiples of each other.
Lemma 4: Given any two non-zero solutions x1 , x2 of (3.5), their Wronskian W (x1 , x2 ) is
identically equal to zero if, and only if, x2 = Kx1 for some constant K.
Proof: If x2 = Kx1 , then
W (x1 , x2 ) = W (x1 , Kx1 ) = x1 (Kx1 ) (x1 ) Kx1 0.
Conversely, suppose W (x1 , x2 ) 0. Since we are assuming that x1 is not the zero function,
we can nd a value of t, say t0 , where x1 (t0 ) = 0; and since the solution x1 is a continuous
function it will be unequal to zero in an entire interval I around t0 . Using the quotient rule
for dierentiation,
( )
W (x1 , x2 )
d x2
x1 x2 x1 x2
=
0
=
2
dt x1
x1
x21
on the interval I, and this implies that x2 /x1 is a constant K in the interval I; that is,
x2 (t) Kx1 (t). Since x2 (t0 ) = Kx1 (t0 ), x2 (t0 ) = Kx1 (t0 ), the two solutions x1 and
x2 = Kx1 both satisfy the same initial conditions at t0 . By the Existence and Uniqueness
Theorem they must be identical functions for all t for which they are dened.
Linear Independence
We say that two functions are linearly dependent if one is equal to a constant multiple
of the other. If two functions are not linearly dependent, we say that they are linearly
independent. In looking for a general solution to a linear second-order dierential equation,
we are looking for two linearly independent solutions x1 and x2 ; the general solution is then
C1 x1 + C2 x2 . We have just shown above that a test to see if two solutions are linearly
independent is to check their Wronskian; if the Wronskian is non-zero, the solutions are
linearly independent.
In the next section, Theorem 3.4 will be used to show that if the coecients p and q
are constants, it is always possible to nd two linearly independent solutions to the homogeneous equation. In Sections 3.4 and 3.6 methods for nding a particular solution of
the nonhomogeneous equation will be given. Furthermore, we will see later that all of the
theoretical results in this section can be easily extended to higher order linear dierential
equations.

Exercises 3.1 Determine whether each of the following equations is linear or nonlinear. If
it is linear state whether it is homogeneous or not.
1. x + t2 x + sin(t)x = 0
2. x + t2 x + t sin(x) = 0
85

3. t2 x + tx + x + t = 0
4. t2 x + tx + 3x = 0
5. x + x2 = 0
6. x + t2 = 0
For each linear equation below, assume initial conditions are given at t = 0. Find the
largest interval in which Theorem 3.1 guarantees continuity of the solution.
7. 3x + 2x + x = 0
8. x + 10x + 4x = et
1
9. x + tan(t)x + 1t
x=0

1
10. x + 2 t2 x + t3
x = sec(t)

## 11. (t2 1)x + tx = 4

12. (t2 + t 6)x + et x + sin(t)x = (t 2)t
For equations 13-16 below two functions x1 and x2 are given. Show that x1 and x2 are
both solutions of the equation, and compute their Wronskian. Are x1 and x2 linearly
independent.
13. x + x = 0, x1 = cos(t), x2 = sin(t)
14. x + 3x + 2x = 0, x1 = et , x2 = e2t
15. t2 x 2tx + 2x = 0, t > 0, x1 = t, x2 = t2
16. x + 4x = 0, x1 = sin(2t), x2 = sin(t) cos(t)
17. Write out a proof of Lemma 2.

86

3.2

## Homogeneous Constant Coecient Linear Dierential Equations

In this section we will study second order, linear, constant coecient, homogeneous dierential equations; that is, equations of the form:
ax + bx + cx = 0,

(3.7)

## where a, b, and c are arbitrary real numbers, a = 0.

First note that in the case of constant coecients, the Uniqueness and Existence Theorem implies that all solutions will be continuous for all t. From Theorem 3.4 we know that
a general solution of 3.7 is completely determined once we nd a pair of linearly independent solutions x1 and x2 (recall that linear independence can be checked by showing that
W (x1 , x2 ) x1 x2 x1 x2 = 0).
.
The General Solution
To nd x1 and x2 , we assume a solution of (3.7) has the form x = ert . This is an obvious
choice, since all of the derivatives of ert are constant multiples of ert . After substituting
x = ert , x = rert , and x = r2 ert into equation (3.7), and dividing by the non-zero function
ert , we have the quadratic equation
ar2 + br + c = 0.

(3.8)

The left-hand side of (3.8) is called the characteristic polynomial of the dierential
equation (3.7), and its roots r are the values of the exponent needed for ert to be a solution
of (3.7).
The solutions of the quadratic equation (3.8) fall into three categories. You may recall
from your previous study of quadratic polynomials that the type of root is determined by
the quantity b2 4ac, called the discriminant. If this quantity is positive there are two real
roots r1 and r2 , if it is zero there is one real root r, and if the discriminant is negative there
are two complex roots + i and i. General solutions to the dierential equation can
now be written down immediately according to the table below.

Roots
General Solution
Two real roots r1 and r2 :
x(t) = C1 er1 t + C2 er2 t
One real root r:
x(t) = C1 ert + C2 tert
Two complex roots: i: x(t) = C1 et cos(t) + C2 et sin(t)
Table 3.1: Solutions to Linear Constant Coecient Equations

Comment: In each of the three cases we must show that the two functions are solutions
and, in addition, that they are linearly independent.
In the rst case, we know that x1 = er1 t and x2 = er2 t are solutions, and r1 = r2 ;
therefore, the Wronskian is
W (er1 t , er2 t ) = er1 t r2 er2 t r1 er1 t er2 t = (r2 r1 )e(r1 +r2 )t = 0
87

## which demonstrates that x1 and x2 are linearly independent.

In the case of one real root r, ert is a solution, and it can be shown that tert is also a
solution (see Exercise 17). The Wronskian is
W (ert , tert ) = ert (ert + rtert ) rert tert = e2rt = 0
again proving linear independence.
In the case of complex roots, we need to use Eulers Formula ei = cos()+i sin(). If you
have not seen Eulers Formula before, it can be shown to be true by using the Maclaurin
series for the functions ex , sin(x) and cos(x), with a complex argument x = i. With
r1 = + i and r2 = i, it allows us to write
er1 t = e(+i)t = et cos(t) + iet sin(t)
and
er2 t = e(i)t = et cos(t) iet sin(t).
Since er1 t and er2 t are both solutions, the linear combinations
1 r1 t 1 r2 t
e + e = et cos(t)
2
2
and
1 r1 t
1
e er2 t = et sin(t)
2i
2i
are both solutions by Lemma 3. In this case
W (et cos(t), et sin(t)) = e2t = 0.
The calculation of W is left to the exercises.

## Example 3.2.1 Find a general solution to x 2x 3x = 0.

The characteristic polynomial is r2 2r 3, and the roots are r1 = 3, r2 = 1. This falls
under the rst case of two real roots; therefore, a general solution is
x(t) = C1 e3t + C2 et

Check it!

Initial Conditions
For any homogeneous linear second-order equation with constant coecients, the Existence and Uniqueness Theorem 3.1 holds for < t0 < . This implies that if initial
conditions are given in the form x(t0 ) = x0 , x (t0 ) = x0 at any xed value t = t0 , then
the constants C1 and C2 can be uniquely determined. Example 3.2.2 below shows how to
determine these constants.
88

## Example 3.2.2 Find a solution to the initial value problem x 4x + 4x = 0, x(0) = 1,

x (0) = 3.
The characteristic polynomial is r2 4r + 4 and the only root is r = 2. This falls under the
second case of one real root; therefore, a general solution is
x(t) = C1 e2t + C2 te2t
To apply the initial conditions we need to nd the derivative of the general solution; that is
x (t) = 2C1 e2t + C2 e2t + 2C2 te2t
(from the product rule). Substituting t = 0 and x(0) = 1 in the rst equation gives
C1 = 1;
then substituting t = 0 and x (0) = 3 in the second equation we get
2C1 + C2 = 3.
We now have two (linear) equations in the two unknowns C1 and C2 . Since C1 = 1, the
second equation implies that C2 = 1 and the (unique) solution to the I.V.P. is
x(t) = e2t + te2t

Example 3.2.3 Find a solution to the IVP x + 2x + 26x = 0, x(0) = 1, x (0) = 16.
The characteristic polynomial is r2 + 2r + 26 and the roots are r = 1 5i. This falls under
the third case (complex roots); therefore, a general solution is
x(t) = C1 et cos(5t) + C2 et sin(5t)
The derivative is
x (t) = C1 (et cos(5t) 5et sin(5t)) + C2 (et sin(5t) + 5et cos(5t)).
At t = 0, we have x(0) = C1 = 1 and x (0) = C1 + 5C2 = 16; therefore, C1 = 1 and
C2 = 3. The unique solution to the IVP is
x(t) = et (cos(5t) 3 sin(5t)) .
Long-Term Behavior of Solutions
In all three cases, a general solution of the dierential equation ax + bx + cx = 0
consists of two terms, each of which contains an exponential function of the form ert . If
r > 0 then the expression ert goes to + as t , and if r < 0 then ert goes to 0 as
t . Furthermore, the expression tert has the same long-term behavior as ert (due to
LHopitals Rule), and the terms et cos(t) and et sin(t) oscillate either with larger and
larger amplitude ( > 0) or smaller and smaller amplitude ( < 0). Thus we can say quite a
89

bit about what solutions will look like for large t, even when we do not have initial conditions
to determine the constants C1 and C2 .The following graphs illustrate these behaviors:

x=ert , r>0

x=ert , r<0

x=tert , r>0

x=tert , r<0

## x=et cos t, <0

Example 3.2.4 Describe the long-term behavior of the solutions in Examples 3.2.1, 3.2.2
and 3.2.3.
In Example 3.2.1 we saw that a general solution to x 2x 3x = 0 is x(t) = C1 e3t +C2 et .
If C1 is not zero, then as t , the rst term goes to , depending on the value of C1
and the second term vanishes (goes to zero). Thus, any solution to this dierential equation
for which C1 is not zero approaches + if C1 > 0 and approaches if C1 < 0.
In Example 3.2.2 we saw that a general solution to x 4x + 4x = 0 is x(t) = C1 e2t +
C2 te2t . As long as the constants are not zero, both terms tend to as t ; whether
the solution approaches + or depends on the signs of the constants, and therefore
on the initial conditions. When we applied the initial conditions x(0) = 1 and x (0) = 3
we obtained x = e2t + te2t as the solution to the I.V.P; since both terms approach + as
t , this function approaches +. The graph of this function is shown below.
16
12
8
4
1

0.5

0.5

x=e2t +te2t

90

## In Example 3.2.3 we solved the dierential equation x + 2x + 26x = 0 and found a

general solution x(t) = C1 et cos(5t) + C2 et sin(5t). Thus, as long as the constants are not
both zero, all solutions oscillate with smaller and smaller amplitude, eventually approaching
zero. The unique solution, with initial conditions x(0) = 1 and x (0) = 16, was found to
be x(t) = et (cos(5t) 3 sin(5t)). A graph of this function is shown below.

2
1
0
1

2
t

2
x=et (cos(5t)3 sin(5t))

## Higher order linear equations

Everything we have done so far in Chapter 3 extends easily to higher order linear
dierential equations; that is, equations of the form
x(n) + an1 x(n1) + + a2 x + a1 x + a0 x = f (t), n > 2

(3.9)

For an nth order linear equation, the Uniqueness and Existence Theorem still guarantees a
unique solution, but now it is necessary to have n initial conditions x(t0 ), x (t0 ), , x(n1) (t0 ),
and these must be specied at a value of t at which all of the coecient functions are continuous.
For the associated homogeneous equation
x(n) + an1 x(n1) + + a2 x + a1 x + a0 x = 0

(3.10)

it is easy to show that arbitrary linear combinations of solutions are solutions. It can also
be shown that if x1 , x2 , , xn is a set of n solutions such that the nth order Wronskian

x1
x2

xn

x1
x2

xn

..

W (x1 , x2 , , xn ) =

.
(n1)

(n1)
(n1)
x
x2
xn
1

is unequal to zero (higher-order determinants are dened in Appendix C), then the linear
combination
xH = C1 x1 + C2 x2 + + Cn xn
is a general solution of (3.10); that is, every solution is of this form. Furthermore, if xP is
any solution of (3.9) and xH is a general solution of (3.10), the proof that x = xH + xP is
a general solution of (3.9) is exactly the same as it was for the second-order equation.
91

## In the case of constant coecients a0 , a1 , , an1 , if we assume that a solution of the

homogeneous equation has the form x = ert , we nd that the exponent r must be a root of
the polynomial
rn + an1 rn1 + + a1 r + a0 .

(3.11)

This nth degree polynomial is again called the characteristic polynomial of the dierential equation, and its roots can be real or complex. If a0 , , an1 are real, the complex
roots occur as complex conjugate pairs i. There will always be exactly n roots, but
some of them may occur more than once and we need the following denition.
Denition 3.2 A root ri of (3.11) is said to have multiplicity k if k is the largest integer
such that (r ri )k is a factor of (3.11). A root of multiplicity one is called a simple root.
It turns out that a fundamental solution set can be obtained by considering the roots
one at a time. Solutions of (3.10) fall into four dierent cases:
1. If r is a simple real root of (3.11), then ert is a solution of (3.10).
2. If r is a real root of multiplicity k > 1, then ert , tert , tk1 ert are all solutions.
3. If i is a pair of complex roots of multiplicity one, then et cos(t) and et sin(t)
are solutions.
4. If i is a complex pair of multiplicity k, then et cos(t), et sin(t), tet cos(t),
tet sin(t), , tk1 et cos(t), tk1 et sin(t) are solutions.
With a little care, the total number of solutions can be seen to add up to the degree n of
the characteristic polynomial, and it can be shown that the Wronskian of these n solutions
is unequal to zero (but we will not try to do that here).
Example 3.2.5 Find a general solution of x + 4x + 5x + 2x = 0.
The characteristic polynomial is
r3 + 4r2 + 5r + 2 = (r + 2)(r + 1)2 .
Since r = 2 is a simple real root, e2t is a solution. The other root r = 1 has multiplicity
k = 2, and this gives us two more solutions et and tet ; therefore, a general solution of
the equation is x(t) = C1 e2t + C2 et + C3 tet .
Example 3.2.6 Solve the initial value problem x(4) x = 0, x(0) = 1, x (0) = x (0) =
x (0) = 0.
The characteristic polynomial
r4 1 = (r2 1)(r2 + 1) = (r 1)(r + 1)(r i)(r + i)
has two simple real roots 1 and 1 and a single pair of complex conjugate roots 0 i. The
general solution can therefore be written as
x(t) = C1 et + C2 et + C3 cos(t) + C4 sin(t).
92

To satisfy the initial conditions we need to dierentiate the solution three times:
x (t) = C1 et C2 et C3 sin(t) + C4 cos(t).
x (t) = C1 et + C2 et C3 cos(t) C4 sin(t).
x (t) = C1 et C2 et + C3 sin(t) C4 cos(t).
This gives us the following system of linear equations to be solved for C1 , ..., C4 :
x(0)

C1 + C2 + C3 = 1

x (0) =
x (0) =

C1 C2 + C4 = 0
C1 + C2 C3 = 0

x (0) =

C1 C2 C4 = 0.

## The (unique) solution is C1 = C2 = 14 , C3 = 12 , C4 = 0 and the solution of the I.V.P. is

x(t) =

1 t 1 t 1
e + e + cos(t).
4
4
2

In Chapter 4 we will describe another method for solving linear dierential equations of
arbitrary order, by writing them as a system of rst-order equations. However, theoretically
at this point you should be able to nd an analytic solution of any homogeneous linear
constant coecient dierential equation that you will encounter in an undergraduate course.
The hardest part will probably be factoring the characteristic polynomial.

93

Exercises 3.2 Find a general solution for each of the following dierential equations, and
describe the behavior of each solution as in Example 3.2.4.
1. x + 7x + 10x = 0
2. x 3x + x = 0
3. x + 6x + 9 = 0
4. y y + 14 y = 0
5. y + 2y + 5y = 0
6. x + x + x = 0
7. x + 3x + 3x + x = 0
8. x(4) + 5x + 4x = 0
Find the solution to each of the following initial value problems, and describe the
behavior of each solution. Also, sketch a graph of each solution (choose an appropriate
viewing window to illustrate the principles discussed in Example 3.2.4 ).
9. 2y + 3y 9y = 0, y(0) = 1, y (0) = 0
10. x + 0.24x + 0.013255x = 0, x(0) = 2, x (0) = 0
11. 4x 4x + x = 0, x(0) = 0, x (0) = 1
12. y + 0.23y + 0.013255y = 0, y(0) = 2, y (0) = 0
13. y 2y + 5y = 0, y(0) = 1, y (0) = 1
14. x + 0.22x + 0.013255x = 0, x(0) = 2, x (0) = 0
15. x + 2x + 5x = 0, x(0) = 2, x (0) = x (0) = 0,
16. x(4) + 5x + 4x = 0, x(0) = 0 , x (0) = 1, , x (0) = x (0) = 0
17. For the one real root case (i.e. when b2 4ac = 0), show that if ert is one solution
of ax + bx + cx = 0, then tert is also a solution. Hint: Substitute x = tert into the
b
.
equation and use the fact that r = 2a
18. Show that if the roots of the characteristic polynomial are i and = 0, then the
Wronskian of the two solutions et cos(t) and et sin(t) is unequal to zero.
19. Solutions of the three IVPs below (with x(0) = 1, x (0) = 0) are shown in graphs A-C.
Try to match each graph to its corresponding equation by looking only at the roots of
the characteristic polynomial.
(i) x + 2x + x = 0

(ii) x + 2x + 8x = 0
94

## (iii) x 0.3x + 0.02x = 0

A
1
0.5
0
0.5
x(t) 1
1.5
2

4 t 6

10

1
0.8
0.6
x(t)
0.4
0.2
0

0.8
x(t)
0.4
0
1

3
t

95

3
t

3.3

Harmonic Oscillators

An object of mass m is suspended on a spring with spring constant k (the system of the
object and the spring together is called a harmonic oscillator).

6
y=0
y

C
C
C
C
C
C
C
C
C
C
C
C
C
C
C

m


## Figure 3.1: A simple mass-spring system

Let y represent the distance that the spring has been displaced in the upward direction
from its resting position. Hookes Law tells us that the force of the spring on the object is
given by F = ky. Newtons second law F = ma gives us ky = my (we use the negative
sign because the force opposes the pulling of the spring). This equation is usually written
as
my + ky = 0;
(3.12)
and is referred to as the undamped mass-spring equation. Damping refers to friction
inherent in any real-world mechanical system. Thus a more realistic model would include this
friction or damping factor. The most common (and simplest) assumption is that the force of
friction is proportional to the velocity of the massive object (as is the case with an automobile
shock absorber, generically called a dashpot). Since this force opposes the motion of the
object, we add a new term cy on the F side of F = ma to get cy ky = my or
my + cy + ky = 0,

(3.13)

## which is called the damped mass-spring equation.

The damped mass-spring equation is just a second order, linear, constant coecient,
homogeneous dierential equation, which we now know how to solve. Thus the three cases
that apply to equations of this type apply to the mass-spring equation. For a realistic system,
the constants m, c, k are all positive, except for c, which can be zero (the undamped case).
It is easily shown (see Exercise 11 at the end of the section) that, if all of the coecients are
positive, the roots r1 and r2 of the characteristic polynomial must both be negative or have
negative (or zero) real part. This seems reasonable because we would not want to have an
(unforced) mass-spring system where the mass ies o to innity.
The three cases that the solutions fall into have names for a mass-spring system. When
there are two real roots and the solution is y = C1 er1 t + C2 er2 t we call the system over
damped (no oscillations). When there is one real root and the solution is y = C1 ert +C2 tert
96

we call the system critically damped (again no oscillations). When there are complex
roots i and the solution is y = C1 et cos(t) + C2 et sin(t), we call the system under
damped (the system oscillates). Note that for a mass-spring equation the discriminant
of the characteristic polynomial
is c2 4mk, so that the system is under
damped if the
damping constant c satises c < 4mk (c small) and over damped if c > 4mk (c large).
Note on frequency and period. The functions cos(t) and sin(t) each complete a full

## cycle on the t-interval from 0 to 2

and hence complete 2 cycles on the interval from 0 to
2

1. We call the period and 2 the frequency. We can use these terms for functions
such as et cos(t) and et sin(t) as well, in that they represent periodic functions with
variable amplitude (the zeroes of these functions are not aected by the et term).
Note on amplitude and phase shift. The trig identity cos(A B) = cos(A) cos(B) +
sin(A) sin(B) can be used to convert a function of the form C1 cos(t) + C2 sin(t) into
a single cosine function D cos(t ). We call D the amplitude and the phase. The
formulas for converting from one form to the other are obtained by writing D cos(t
) = D(cos(t) cos() + sin(t) sin()) = C1 cos(t) + C2 sin(t); then C1 = D cos() and
C2 = D sin(). Solving for D and we have D2 = C12 + C22 and tan() = C2 /C1 , subject
to the condition C1 = D cos() (use either = arctan(C2 /C1 ) or = arctan(C2 /C1 ) + ,
whichever satises C1 = D cos()). The function cos(t ) is shifted units to the right

cycles to the right of cos(t). Notice also that by factoring out the et
of cos(t), or 2
term in the under damped case (complex roots) we get

C1 et cos(t) + C2 et sin(t) =
et (C1 cos(t) + C2 sin(t)) = Det cos(t ).
Similarly, if we want to write the result as a single sine function D sin(t ) instead of
a single cosine function, the trig identity sin(A B) = sin(A) cos(B) cos(A) sin(B) can
be used to show that the corresponding formulas are D2 = C12 + C22 and tan() = C1 /C2
subject to C2 = D cos().
Note on units. This being a mathematics course, we will take the easy way out and always
use the same units. We just need to know that a force of 1 Newton (n) will accelerate a
mass of 1 kilogram (kg) at a rate of 1 meter per second squared (s2 ) so that 1n = 1 kgm
(s2n ).
The mass m will be in kilograms, the spring constant k will be in Newtons per meter m
which is( the same )as kg
s2 , and the damping constant c will be in Newtons per meter per
second

n
m/s

ns
m

## which is the same as

kg
s .

n
. The
Example 3.3.1 A 1 kg mass is suspended on a spring with a spring constant of 16 m
mass is displaced 0.5 meters in the positive y direction from its rest position and released.
Assume no damping. Find the equation that describes the position (y) of the mass as a
function of time (t). Describe the motion.

The dierential equation of motion for the position of the mass would be y + 16y = 0. The
initial condition on the position would be y(0) = 0.5. The initial condition on the velocity
would be y (0) = 0 because we assume that the mass is released with no initial velocity (it
97

is not pushed as it is released). The roots of the characteristic equation are 4i so that the
general solution is
y = C1 cos(4t) + C2 sin(4t)
The derivative is y = 4C1 sin(4t) + 4C2 cos(4t) so that the initial conditions give us the
two equations C1 = 0.5 and 4C2 = 0 (hence C2 = 0) so the solution to the I.V.P. is
y = 0.5 cos(4t).
4
The mass oscillates at a rate of 2
0.6367 cycles per second (the frequency), or one cycle
2
every 4 1.57 seconds (the period)..

Example 3.3.2 A 1 kg mass on a spring is displaced 0.1 meters from rest and given a
push in the opposite direction resulting in an initial velocity of 0.2 meters per second. The
n
spring constant is k = 1 m
and there is damping with a damping constant of c = 2 ns
m . Find
the equation of motion of the mass, sketch a graph of the solution for 0 t 6, and describe
what happens.
The dierential equation would be y + 2y + y = 0 with the initial conditions y(0) = 0.1
and y (0) = 0.2. The general solution would be y = C1 et + C2 tet (one real root case)
which is critically damped motion. The derivative would be y = C1 et + C2 et C2 tet ,
and applying the initial conditions we get the two equations C1 = 0.1 and C1 + C2 = 0.2,
and hence C2 = 0.1 . The solution to the I.V.P. is
y = 0.1et 0.1tet .
Clearly this solution approaches zero as t gets large so that the mass returns to its resting
point without oscillating. The graph is given below:

y
0.1

0.075

0.05

0.025
0
0

1.25

2.5

3.75

5
t

y(t)=0.1et 0.1tet

One can see that the mass crosses the rest position one time (at t 1 second) before coming
(asymptotically) to rest. In the critically damped and over damped cases (no oscillations)
there can be at most one point where the mass crosses the rest position.

98

Example 3.3.3 The motion of the tip of an airplane wing is modelled as a mass-spring
n
system, with mass 500kg, damping constant 2000 ns
m , and spring constant 100000 m . Displacements of as much as 2m have been recorded. An engineer would like to know the
position of the wing tip at 1 second intervals for the next 5 seconds following a 2m displacement (assume zero initial velocity). She would also like to know the period and frequency of
the oscillations (if any).
The dierential equation would be 500y + 2000y + 100000y = 0, and the general solution is y = C1 e2t cos(14t) + C2 e2t sin(14t) (show this!). If we assume initial conditions
of y(0) = 2, and y (0) = 0, then using the general solution for y given above, and usd
ing y = dt
(C1 e2t cos(14t) + C2 e2t sin(14t)) = 14C2 e2t cos(14t) 2C1 e2t cos(14t)
2t
14C1 e
sin(14t) 2C2 e2t sin(14t), we get the simultaneous linear equations
C1
2C1 + 14C2

= 2
= 0

## We solve these to get C1 = 2, C2 = 27 ,so that the solution to the I.V.P. is

2
y = 2e2t cos(14t) + e2t sin(14t)
7
We can now form a table of values starting with t = 0 and ending with t = 5 at 1 second
intervals:

t
0
1
2
3
4
5

y
2.0
7. 531 5 102
3. 384 4 102
2. 632 103
5. 224 6 104
6. 754 4 105

We know that we have (decaying) oscillations because of the sin and cos terms. The period
14
1
would be 2
(also called cycles per
14 0.448 80s and the frequency would be 2 2. 228 2s
second or Hertz).
Using the Note on amplitude and phase shift from earlier in this section, we can write
2e2t cos(14t) + 27 e2t sin(14t) as De2t cos(14t ). Using D2 = 22 + ( 27 )2 = 200
49 and

2/7
1
200
1
tan() = 2 = 7 we get D =
49 2.0203, and = arctan( 7 ) 0.14190 (we check that
C1 = D cos(), which is true, so we do not have to add to arctan( 17 ) to get the correct ).
With these values for D and , the solution to the I.V.P. becomes y = 2.0203e2t cos(14t
0.14190). Note that the cos function is shifted to the right by = 0.14190
0.010136
14

seconds, or by 2
= 0.14190
0.022584 cycles.
2
A graph shows the exponentially decaying oscillations:

99

2
1.5
1
0.5
0
0

1.25

2.5

3.75

-0.5

5
t

-1

## y(t)=2e2t cos(14t)+ 27 e2t sin(14t)

100

Exercises 3.3 For exercises 1-6, nd a function that describes the displacement of the mass
of the given mass-spring system. Sketch a graph of the function on the interval 0 t 5.
Classify the type of damping as over-damped, under-damped or critically damped.
n
1. Mass 1kg, no damping, spring constant 64 m
. The mass is displaced 0.3m downward
and released.
n
2. Mass 1kg, no damping, spring constant 64 m
. The mass is in its rest position and hit
with a hammer which gives it an initial velocity of 1 m
s in the upward direction.
n
3. Mass 1kg, damping constant 12 ns
m , spring constant 72 m . The mass is displaced 1m
upward and released.
n
4. Mass 1kg, damping constant 12 ns
m , spring constant 72 m . The mass is in its rest
position and hit with a hammer which gives it an initial velocity of 2 m
s in the upward
direction.
n
5. Mass 3kg, damping constant 48 ns
m , spring constant 84 m . The mass is displaced 2m
upward and released.
n
6. Mass 3kg, damping constant 48 ns
m , spring constant 84 m . The mass is displaced 2m
upward and simultaneously hit with a hammer, imparting a velocity of 1 m
s in the
downward direction.

For exercises 7-10, nd a function that describes the displacement of the mass of the
given mass-spring system. Provide a table of values in 1 second intervals for 0 t 5.
Classify the type of damping as over-damped, under-damped or critically damped, and
if the motion is periodic, nd the period and frequency of the oscillations.
n
7. Mass 1kg, damping constant 20 ns
m , spring constant 100 m . The mass is displaced 0.5m
m
downward and given an initial velocity of 2 s in the downward direction.
1 n
8. Mass 1kg, damping constant 3 ns
m , spring constant 2 4 m . The mass is displaced 1m
upward and released.
n
9. Mass 5kg, damping constant 1 ns
m , spring constant 1 m . The mass is displaced 1m
m
upward and released with a velocity of 1 s in the downward direction.
n
10. Mass 5kg, damping constant 5 ns
m , spring constant 1 m . The mass is displaced 1m
m
upward and released with a velocity of 1 s in the downward direction.

11. Show that if m, c, and k are all positive, then the roots r of the characteristic polynomial
mr2 + cr + k are either real and negative, or complex with negative real part. Hint:
Use the quadratic formula to write out an expression for r, and look at each of the
three cases.

101

3.4

## Nonhomogeneous Constant Coecient Linear Differential Equations

We now turn our attention to the nonhomogeneous case. We are interested in solving
equations of the form
ax + bx + cx = f (t)
(3.14)
where f (t) can consist of a linear combination of polynomials, exponential functions, and
trig functions (as described later in the section). Notice also that if f (t) depends explicitly
on t, such a dierential equation is also nonautonomous.
Recall from Theorem 3.2 in Section 3.1 that to nd the general solution to a nonhomogeneous equation, we need to nd a particular solution xp to the nonhomogeneous equation
ax + bx + cx = f (t) and add to it the homogeneous (general) solution xh to the homogeneous equation ax + bx + cx = 0. Since we already know how to solve the homogeneous
case (Section 3.2), we only need a technique for nding a particular solution to equation
(3.14). In this section we will employ the method of undetermined coecients. This
consists of proposing a solution xP which has arbitrary constants in it (the undetermined
coecients), substituting the proposed solution xP into the dierential equation, and then
solving for the arbitrary constants by equating coecients of like terms. Note the similarity
to the method of Section 3.2 where we proposed a solution x = ert to a homogeneous linear
dierential equation, and then solved for r.
The question that remains is how to determine the form of the proposed solution xP .
The form of xP depends on the form of the function f (t) in equation (3.14). Basically xP
must have a form similar to that of f (t). We sometimes need a two step process; a rst
attempt, step 1 below, and if that attempt fails, a second attempt, step 2 below.

102

Step 1

## If f (t) is an exponential function whose numerical coecient in the exponent is k (i.e.

k in aekt ), for xP try an exponential function with k as the numerical coecient in the
exponent; if f (t) is a linear combination of cos and sin functions of the same frequency ,
for xP try a linear combination of cos and sin functions with frequency ; and if f (t) is a
polynomial of degree n, for xP try a polynomial of degree n. The dierence between xP
and f (t) is that whereas f (t) will have specic multiplicative constants out in front of the
various terms, the proposed solution xP has undetermined coecients out in front. Note
that coecient k in the exponent of an exponential function, and the frequency in the
trig functions is the same in xP and f (t) (they are not undetermined coecients). We
summarize step 1 in the table below.
f (t)

xP

example f (t)

example xP

aekt
a cos(t) + b sin(t)
a + bt + ct2 + . . . + ztn

Aekt
A cos(t) + B sin(t)
A + Bt + Ct2 + . . . + Ztn

3e2t
4 sin(3t)
3 + 2t + 5t3

Ae2t
A cos(3t) + B sin(3t)
A + Bt + Ct2 + Dt3

## Table 3.2: Undetermined Coecients, Step 1

Comment: If the right-hand side of the dierential equation is a sum of functions of the
type listed in column 1 of Table 3.2 above, one can nd a particular solution by splitting
the problem into two (or more) separate problems, and adding the results. For example,
et 14 cos(4t) + 12 sin(4t) would be a particular solution to the dierential equation x +
4x + 8x = 13et + 10 cos(4t) because et is a particular solution to x + 4x + 8x = 13et and
41 cos(4t) + 12 sin(4t) is a particular solution to x + 4x + 8x = 10 cos(4t).
Comment: The table above is far from exhaustive; we are treating only a few of the
common cases. In particular, it is possible to treat cases where f (t) has the form of a product
of functions of the type in column 1 in Table 3.2. For example, if f (t) has the form atet (a
product of an exponential function and a polynomial) then one can use xP = Aet + Btet to
nd a particular solution. We will investigate a few of these special cases in the exercises.
Comment: A nal reason why we consider only the cases in Table 3.2 is that in a later
section we will introduce another method called variation of parameters, and in a later
chapter we will consider the method of Laplace transforms; both techniques can also be
used to solve linear nonhomogeneous equations, and are more general than the method of
undetermined coecients.
Example 3.4.1 Find a particular solution xP for the dierential equation x + x = 3e2t .
From the rst line of Table 3.2 we assume a particular solution xP = Ae2t . We need to
nd the derivatives of xP :
xP
xP

= 2Ae2t
= 4Ae2t
103

Next we substitute the proposed solution and its derivatives into the given dierential equation.
4Ae2t + Ae2t = 3e2t
In order for this equation to be true for all t the coecients of the e2t terms must equate,
that is, we must have
4A + A = 3.
Solving for A we get A =

3
5

## = 0.6. Thus a particular solution to x +x = 3e2t is xP = 0.6e2t .

Example 3.4.2 Find the general solution xG for the dierential equation x + 2x + x =
4 sin(3t). Describe the long-term behavior of xG .
We have a two part problem; rst nd the homogeneous part of the solution xH , then
nd a particular solution xP . The homogeneous part of the solution would be xH = C1 et +
C2 tet . This follows directly from section 3.2 in that the characteristic equation is r2 + 2r +
1 = 0 which has the single solution r = 1 (see Table 3.1).
From the second line of Table 3.2 we assume a particular solution xP = A cos(3t) +
B sin(3t). Notice that we still need both cos and sin terms even though only a sin term
appears in f (t). The derivatives are
xP
xP

= 3A sin(3t) + 3B cos(3t)
= 9A cos(3t) 9B sin(3t).

## Substituting into the dierential equation we get

(9A cos(3t) 9B sin(3t))+2(3A sin(3t) + 3B cos(3t))+(A cos(3t) + B sin(3t)) = 4 sin(3t).
|
{z
} |
{z
} |
{z
}
x
P

xP

xP

## Multiplying this out, and collecting like terms we get

(8A + 6B) cos(3t) + (6A 8B) sin(3t) = 0 cos(3t) + 4 sin(3t).
(Check it!) We now use the principle that the coecients of like terms on both sides of the
equation must be the same. Thus
cos(3t) terms:
sin(3t) terms:

8A + 6B = 0
6A 8B = 4

Solving this system of linear equations (either by hand or with the aid of a calculator or
computer) we get
6
8
A=
= 0.24, B =
= 0.32
25
25
and so
xP = 0.24 cos(3t) 0.32 sin(3t).
The general solution then becomes
xG = xH + xP = C1 et + C2 tet 0.24 cos(3t) 0.32 sin(3t).
The long-term behavior is governed completely by the particular part of the solution in this
case, because the homogeneous part xH = C1 et + C2 tet goes to 0 as t (as explained
104

in section 3.2). Thus for suciently large t, xG oscillates according to the formula given
by the particular part of the solution, regardless of the values of C1 and C2 . In the graph
below, we have arbitrarily used the values C1 = C2 = 1.

1
0.8
x 0.6
0.4
0.2
0
0.2
0.4

t8

10 12 14

## Example 3.4.3 Find a solution x to the initial value problem x + 3x + 2x = 3 + 2t + 5t3 ,

x(0) = 1, x (0) = 1. Graph the solution and describe its long-term behavior.
Now we have a three part problem. First nd the homogeneous part of the solution xH ,
then nd a particular solution xP , and nally use the initial conditions to determine the
constants C1 and C2 that come from xH . The homogeneous part would be xH = C1 et +
C2 e2t (the characteristic equation r2 + 3r + 2 = 0 has the solutions r1 = 1, r2 = 2).
From the third line of Table 3.2, we assume a particular solution xP = A+Bt+Ct2 +Dt3 .
The derivatives are
xP
xP

= B + 2Ct + 3Dt2
= 2C + 6Dt.

## Upon substituting into the dierential equation we get

(2C + 6Dt) + 3(B + 2Ct + 3Dt2 ) + 2(A + Bt + Ct2 + Dt3 ) = 3 + 2t + 5t3 .
|
{z
}
|
{z
}
|
{z
}
x
P

xP

xP

As in the previous example, we need to collect like terms. The like terms in this example
are the t3 terms, the t2 terms, the t terms, and the constant terms (or equivilently the t0
terms). After collecting like terms the previous equation becomes
(2C + 3B + 2A) + (6D + 6C + 2B)t + (9D + 2C)t2 + (2D)t3 = 3 + 2t + 0t2 + 5t3 .
Equating coecients of like terms we get the four equations
2C + 3B + 2A
6D + 6C + 2B

= 3
= 2

9D + 2C
2D

= 0
= 5.

## The solution is A = 225

8 = 28. 125, B =
Thus the particular solution is

109
4

= 27. 25, C = 45
4 = 11. 25, D =

105

5
2

= 2.5.

## At this point we have the general solution

xG = xH + xP = C1 et + C2 e2t 28. 125 + 27. 25t 11. 25t2 + 2.5t3 .
To nish o the problem, we need to use the initial conditions x(0) = 1 and x (0) = 1 to
nd the constants C1 and C2 . Thus we rst need to nd xG in order to employ the second
initial condition. We have
xG = C1 et 2C2 e2t + 27. 25 22.5t + 7.5t2
so that upon substituting the values from the initial conditions we get
xG (0) = C1

xG (0) = C1

+ C2 28. 125

2C2 + 27. 25

or equivalently
C1 + C2

C1 2C2

29.125

= 28.25.

The solution to these linear equations is C1 = 30.0, C2 = 0.875. Finally, the solution to
the I.V.P. is
x = 30.0et 0.875e2t 28. 125 + 27. 25t 11. 25t2 + 2.5t3 .
The graphs of both the solution to the I.V.P. and the particular part alone are shown below:

125
100
75
50
25
0
0

1.25

2.5

-25

3.75

5
t

## x=30.0et 0.875e2t 28.125+27.25t11.25t2 +2.5t3 (solid)

xP =28.125+27.25t11.25t2 +2.5t3 (dotted)

Because the homogeneous part of the solution goes to zero (due to the negative exponential
terms) we see that after about 3 seconds the full solution to the I.V.P and the particular part
of the solution become almost indistinguishable, and both head o toward positive innity.
Step 2: When Step 1 Fails
There are times when the guidelines in Table 3.2 do not yield a particular solution. The
key concept is that a function cannot be a solution to both a nonhomogeneous dierential
106

equation and to the corresponding homogeneous equation. Its easy to see why. Suppose that
g(t) solves both ax +bx +cx = f (t) and ax +bx +cx = 0; then ag (t)+bg (t)+cg(t) = f (t)
and also ag (t) + bg (t) + cg(t) = 0 which is clearly impossible unless f (t) = 0. Thus the
suggested solutions in Table 3.2 will fail if they also solve the corresponding homogeneous
equation.
You may be wondering what happens if you go ahead with the proposed xP from Table
3.2 when it is also a solution to the homogeneous equation. You will nd that it is impossible to solve the system of linear equations that gives you the values of the undetermined
coecients. If you are using a calulator or computer to solve the linear system, you may
get an error message, and if you are solving the system by hand, you will come across a
contradictory equation such as 0 = 1.
The way out of the dilemna is as follows:
When the proposed xP from Table 3.2 fails, multiply that xP by t and try
again. Repeat if necessary.
Example 3.4.4 Find a particular solution to the dierential equation x x = 4et .
We rst try Step 1, in which the proposed xP would be xP = Aet . The derivatives
would be xP = Aet and xP = Aet and so substituting into the dierential equation we get
Aet Aet = 4et . This simplies to 0 = 4et which is clearly impossible. We could have
seen this coming if we had looked at the homogeneous solution xH rst; the characteristic
equation is r2 1 = 0, which has the solutions r = 1, so that xH = C1 et + C2 et . The
right-hand side of the dierential equation f (t) = 4et matches xH for the case C1 = 4,
C2 = 0 and hence is a solution to the homogeneous equation.
Thus we go to Step 2 and multiply our rst try Aet by t to get
xP = Atet .
The derivatives are
xP

= Aet + Atet

xP

## and substituting into the given dierential equation we get

(2Aet + Atet ) (Atet ) = 4et .
|
{z
} | {z }
x
P

xP

Since the Atet terms cancel out we are left with 2Aet = 4et . Equating the coecients of like
terms we get 2A = 4 or A = 2. Thus a particular solution is
xP = 2tet .
Example 3.4.5 Find the general solution to x + 4x = 5 cos(2t). Sketch a graph of the
particular solution and discuss its signicance.
This time we start with the homogeneous solution; we get xH = C1 cos(2t) + C2 sin(2t)
because the solutions to the characteristic equation r2 + 4 = 0 are r = 0 2i. At this
107

point we recognize that Step 1 will not work, because the right-hand side of the dierential
equation f (t) = 5 cos(2t) corresponds to xH with C1 = 5 and C2 = 0 (i.e. f (t) solves the
homogeneous equation x + 4x = 0).
The Step 1 particular solution would be xP = A cos(2t) + B sin(2t); since we have established that this does not work we multiply by t to get
xP = At cos(2t) + Bt sin(2t).
The derivatives are
xP

xP

## = 4A sin(2t) 4At cos(2t) + 4B cos(2t) 4Bt sin(2t)

(check these derivatives!). Substituting into the dierential equation x + 4x = 5 cos(2t), the
left-hand side is
(4B cos(2t) 4A sin(2t) 4At cos(2t) 4Bt sin(2t)) + 4(At cos(2t) + Bt sin(2t)).
|
{z
}
|
{z
}
x
P

xP

## Simplifying and collecting like terms, we nd that we need

4B cos(2t) 4A sin(2t) = 5 cos(2t) + 0 sin(2t).
Notice that the t cos(2t) and t sin(2t) terms drop out. Equating coecients of the cos(2t)
and sin(2t) terms we get the two linear equations
4B

4A =

## so that B = 54 = 1. 25 and A = 0. Substituting these values into xP (t) = At cos(2t) +

Bt sin(2t) we get
xP = 1.25t sin(2t).
Finally, the general solution is the sum of the homogeneous and the particular solutions:
xG = xH + xP = C1 cos(2t) + C2 sin(2t) + 1.25t sin(2t).
A graph of xP = 1.25t sin(2t) is shown below:

20
y

10

10

10
t

15

20

10
20
xP =1.25t sin 2t

108

2
We view the function 1.25t sin(2t) as a sin function with frequency 2
= 1 and with
variable amplitude 1.25t. Thus as t , xP does not approach a limit, but rather oscillates
with greater and greater amplitude. Since the homogeneous part of the solution C1 cos(2t) +
C2 sin(2t) oscillates with constant amplitude, it has a diminishing aect on the general
solution C1 cos(2t) + C2 sin(2t) + 1.25t sin(2t) and so the general solution looks nearly the
same as the particular solution for large t.

## Exercises 3.4 Routine exercises.

1. Find a particular solution to y y = 4 cos(2t).
2. Find a particular solution to y + 4y + 8y = 3e2t .
3. Find a particular solution to y + y = 4 cos(t).
4. Find a particular solution to y + 4y + 4y = 4e2t . Hint: The repeat if necessary
part of Step 2 applies here.
5. Find the general solution to y 2y + y = 2t.
6. Find the general solution to y + 5y + 6y = 2e4t .
7. Find the general solution to y 3y + 2y = et .
8. Find the general solution to y + 16y = sin(3t).
9. Find the solution to the I.V.P. y + 2y + 2y = 2 cos(t),

y(0) = 1, y (0) = 1 .

## 10. Find the solution to the I.V.P. y + y = sin(t), y(0) = 0,

y (0) = 0 .

The following exercises require the use of the rst comment following Table 3.2.
11. Find a particular solution to y + 10y + 21y = et + t2 .
12. Find a particular solution to y + 9y = sin(t) e2t .
13. Find the solution to the I.V.P. y 9y = t cos(t), y(0) = 0, y (0) = 1 .
14. Find the solution to the I.V.P. y + 2y + y = sin(t) + cos(2t),

y(0) = 0,

y (0) = 0 .

We elaborate on the second comment following Table 3.2. When the function f (t)
on the right-hand side of a second order linear dierential equation is a product of
functions of the type in the rst column of Table 3.2, you can still use undetermined
coecients by assuming a product of the functions in the second column for yP . Proceed as follows: set each undetermined coecient in column 2 equal to 1, multiply
out the terms, and then put one new undetermined coecient in front of each term.
For example, f (t) = 3t sin(2t) is a product of a polynomial of degree one (column 1,
row 3) and a sin function with = 2 (column 1, row 2). Thus assume a product of
a general polynomial of degree one A + Bt (column 2, row 3) and a linear combination of sin and cos functions with = 2, A cos(2t) + B sin(2t) (column 2, row 2).
Now set each coecient equal to 1 and multiply out to get (1 + t)(cos(2t) + sin(2t)) =
109

cos(2t) + sin(2t) + t cos(2t) + t sin(2t); then put one new undetermined coecient in
front of each term, resulting in yP = A cos(2t) + B sin(2t) + Ct cos(2t) + Dt sin(2t).
Use these ideas in the following exercises.
15. Find a particular solution to y + y = 3t sin(2t).
16. Find a particular solution to y + y = et cos(t).
17. Find the solution to the I.V.P. y + 2y + y = tet , y(0) = 1,
18. Find the solution to the I.V.P. y + 2y + 2y = et sin(t),

110

y (0) = 0 .

y(0) = 0,

y (0) = 0 .

3.5

## Driven Mass-Spring Systems, Beats, and Resonance

Consider a damped mass-spring system as described in Section 3.3, but with a new twist.
Our systems will now have an external driving force. If you have ever observed a washing
machine wobbling as it spins (often due to an unbalanced arrangement of clothes inside the
machine) then you have experienced a periodic driving force. A simplied model of the same
phenomenon would be an airplane engine with a broken propeller. Such an engine, when
placed on an airplane wing would cause the wing to vibrate up and down. The rotational
motion of the propeller is transformed into a sinusoidal driving force. In fact, since no
real propeller system can be perfectly balanced, this is something that (propeller) airplane
designers must consider.
Recall from Section 3.3 that by using Newtons second law F = ma we derived the
second order dierential equation my = cy ky where the right-hand side represents
the sum of all forces acting on a mass suspended from a spring, with ky corresponding to
the force of the spring from Hookes Law and cy corresponding to the damping (friction)
force. If we now introduce a driving force f (t) as explained above, the equation becomes
my = cy ky + f (t) or equivalently
my + cy + ky = f (t).

(3.15)

## We refer to equation 3.15 as the driven mass-spring equation.

By an incredible coincidence, equation 3.15 is a non-homogeneous, constant coecient,
linear, second-order dierential equation; just the type we studied in the previous section.
Since we already know how to solve such equations, in this section we concentrate on the
interpretation of the solution to such an equation in terms of driven mass-spring systems.
The point of view that we will take is that f (t) is the input to the system, and the solution
to the dierential equation y(t) is the response or output.
We can now translate between the language of second order, linear, constant coecient
dierential equations and the language of forced mass-spring systems. In particular, when
solving non-homogeneous second order equations we found that the general solution was
a sum of two pieces: the homogeneous piece yH and the particular piece yP . For forced
mass-spring systems, we will call the homogeneous part of the solution the transient part
of the response (at least when damping is present), and we will call the particular part the
steady-state part of the solution. The next example should help to make sense out of these
terms.
n
Example 3.5.1 A 2 kg mass is suspended from a spring with spring constant 30 m
and
ns
damping constant 16 m . It is neither displaced nor given an initial velocity. Find the
response (output) of the system if the input is a sinusoidal driving force with amplitude 400
newtons and frequency of 6 1. 909 9 cycles per second (beginning its cycle at t = 0). Graph
the response function and relate the behavior to the input forcing function.

We have m = 2 for the mass, c = 16 for the damping constant, and k = 30 for the spring
12
cycles per second, and
constant. A sin function with amplitude 400 and frequency 6 = 2
beginning its cycle at t = 0, would be f (t) = 400 sin(12t) (recall from the Note on frequency

## and period from Section 3.3 that the frequency of sin(t) is 2

). Thus the dierential
equation that we want to solve, using Equation 3.15, would be
2y + 16y + 30y = 400 sin(12t).
111

Because the mass is neither displaced nor given an initial push, we have y(0) = 0 and
y (0) = 0 giving us an initial value problem (I.V.P.).
We need to nd the homogeneous part of the solution yH , and then a particular solution
yP , and then add them together to nd the general solution yG . The nal step will be to use
the initial conditions to evaluate the arbitrary constants C1 and C2 .
To nd yH we need to solve the homogeneous dierential equation 2y + 16y + 30y = 0.
The characteristic polynomial is 2r2 + 16r + 30, which has the roots r = 5, r = 3. Thus
we get
yH = C1 e5t + C2 e3t .
To nd yP we use undetermined coecients as described in Section 3.4. We assume
yP = A cos(12t) + B sin(12t).
The derivatives are yP = 12A sin(12t)+12B cos(12t), and yP = 144A cos(12t)144B sin(12t).
Substituting these into the nonhomogeneous dierential equation above we get
2(144A cos(12t) 144B sin(12t)) + 16(12A sin(12t) + 12B cos(12t))
+30(A cos(12t) + B sin(12t)) = 400 sin(12t)
which upon combining like terms gives us
258A cos(12t) + 192B cos(12t) 192A sin(12t) 258B sin(12t) = 400 sin(12t)
Equating the coecients of the cos terms we get
258A + 192B = 0
(since there are no cos terms on the right-hand side), and equating the sin terms we get
192A 258B = 400.
Solving these last two equations for A and B results in
A=

6400
8600
0.742 55, B =
0.997 80
8619
8619

## so that our particular solution is

yP = 0.742 55 cos(12t) 0.997 80 sin(12t)
accurate to 5 digits. Thus the general solution is
yG = yH + yP = C1 e5t + C2 e3t 0.742 55 cos(12t) 0.997 80 sin(12t).

## To apply the initial conditions we need yG

:

yG
= 5C1 e5t 3C2 e3t + 8. 910 6 sin(12t) 11. 974 cos(12t).

## Using y(0) = 0 and y (0) = 0 gives us the equations

C1 + C2 0.742 55 = 0
5C1 3C2 11. 974 = 0
112

## which can be solved simultaneously for C1 and C2 : C1 = 7. 100 8, C2 = 7. 843 4. Therefore

the solution to the I.V.P. is
y = 7. 100 8e5t + 7. 843 4e3t 0.742 55 cos(12t) 0.997 80 sin(12t).
A graph of this function is shown below:

2.5
2
1.5
1
0.5
0
0

1.25

2.5

3.75

-0.5

5
t

-1

## y=7.100 8e5t +7.8434e3t 0.74255 cos(12t)0.99780 sin(12t)

After roughly t = 2 we see that the graph has settled down into a steady state, a simple
sinusoidal oscillation corresponding to the particluar or steady state part of the response
yP = 0.742 55 cos(12t) 0.997 80 sin(12t). This is because the homogeneous or transient
part of the response yH = 7. 100 8e5t +7. 843 4e3t dies out due to the negative exponential
terms. The long-term behavior of yP mirrors the driving force f (t) = 400 sin(12t), in that
both oscillate with a frequency of 6 cycles per second.
Using the Note on amplitude and phase shift from Section 3.3 we can write the steady
state part of the solution yP in the form D sin(12t), which makes it easier to compare
the

input to the output. We have D2 = 0.742 552 + 0.997 802 = 1. 547 0 so that D = 1. 547 0 =
1. 243 8. For we rst try tan1 (0.742 55/0.997 80) = 0.639 77, but this value does not
work for in the equation 0.997 80 = 1. 243 8 cos() (the sign is wrong - check it) and so
we use = 0.639 77 + = 2. 501 8. Thus we can write yP = 1. 243 8 sin(12t 2. 501 8),
8
which means that the steady-state response is shifted 2. 501
= 0.398 17 cycles to the right of
2
the driving force. We could say that in the long-term, the response lags behind the driving
force by about 0.4 cycles. We plot the driving force and the steady-state part of the response,
one above the other, to illustrate this lag:
y

250

0
0

0.125

0.25

0.375

0.5

0.625

0.75

0.875

1
t

-250

113

y
1

0.5

0
0

0.125

0.25

0.375

0.5

0.625

0.75

0.875

1
t

-0.5

-1

## y=400 sin(12t) (above)

y=1.2438 sin(12t2.5018) (below)

Beats
Two sin (or cos) functions added or subtracted can produce interesting results. In
particular, if the two functions have the same amplitude, and if the frequencies are close in
value to each other, then the sum or dierence of the two sin functions will display beats.
We illustrate this idea by graphing the function y = sin(2t) sin(1.7t):
y
1.5
1
0.5
0
-25

-12.5

12.5

25

-0.5

37.5

50
x

-1
-1.5

y=sin(2t)sin(1.7t)

When the two trig functions y = sin(2t) and y = sin(1.7t) reach their peaks (both
positive or both negative) at about the same time, the dierence between the functions is
near zero. When the two trig functions peak in opposite directions (one positive, the other
negative) at about the same time, the dierence between the functions is near 2. Thus
the graph of the dierence of the two functions varies between very small oscillations and
large oscillations. A similar case can be made for the sum of the two functions.
We can use a trig identity to get an even deeper understanding of where beats come
cd
from. It can be shown that sin(c) sin(d) = 2 cos( c+d
2 ) sin( 2 ) (see the exercises at the
end of this section). Thus
sin(1 t 1 ) sin(2 t 2 )
(1 t1 )(2 t2 )
2 t2 )
= 2 cos(((1 t1 )+(
) sin(
2
2
)
(
))
1 2
1 +2
1 +2
2
= 2 sin 1
t

cos
t

.
2
2
2
2
114

(3.16)

A similar formula applies if the sin functions are added rather than subtracted. If 1 is
2
2
sucently close in value to 2 , then 1 +
is much larger than 1
. Therefore the cos
2
2
function in the equation above is oscillating much faster than the sin function.
One
(
) can
2
think of the last line of the above equation as a cos function with frequency 1 +
/ (2)
2
(
)
1 2
2
and with variable amplitude 2 sin 1
.
We
can
graph
our
example
function
t

2
2
y = sin(2t) sin(1.7t) along with its amplitude function y = 2 sin( 21.7
2 t) = 2 sin(0.15t) (or
envelope function as it is sometimes called):

0
-25

-12.5

12.5

25

37.5

50
t

-1

-2

y=sin(2t)sin(1.7t) (solid)
y=2 sin(0.15t) (dotted)
1 2

2
2
= 14
, is called the beat
The frequency of the envelope function, given by 2
4
frequency, and the corresponding period, 1 2 , would be the beat period.

Musical comment:
When two musical intruments sustain notes which are close, but
not quite equal, in pitch, one can hear beats.
Dierential Equations and Beats
The solution to a forced mass-spring equation can display beats when there is no damping. From Section 3.3 we saw that a free mass-spring system (no driving force) with no
damping will display oscillations. Hence the homogeneous part of the solution to a forced
mass-spring system with no damping can be written as a single sin function in the form
yh = Ah sin(h t ). If the driving term (right-hand side of the dierential equation)
consists of sin and/or cos functions all of the same frequency p , then the particular part
of the solution to a forced mass-spring system can also be written as a single sin function
of that frequency, say yp = Ap sin(p t ). We will call 2h the natural frequency of

the system (it depends only on the mass and the spring constant) and we will call 2p the
driving frequency. If h is close in value to p , (i.e. if the natural frequency is close
to the driving frequency) then there is a possibility of beats. In fact, we know from the
previous subsection on beats that if in addition the amplitudes of the two sin functions are
equal, then we will in fact see beats.
It turns out that the amplitudes of the homogeneous and particular parts of the solution,
in the case when both are sin functions, will not in general be equal. However, the closer
the frequencies get, the closer the amplitudes get, and so in practice we will see beats when
the frequencies are suciently close.
115

n
Example 3.5.2 A 1 kg mass is suspended from a spring with spring constant 4 m
and no
damping. It is neither displaced nor given an initial velocity. Find the response (output) of
the system if the input is a sinusoidal driving force with amplitude 1 newton and frequency
of 1.7
2 0.541 1 cycles per second (beginning its cycle at t = 0). Graph the response function
and discuss the behavior in terms of beats.

## The dierential equation would be y + 4y = sin(1.7t) (explain). The initial conditions

would be y(0) = 0 and y (0) = 0. The homogeneous part of the solution is
yh = C1 cos(2t) + C2 sin(2t)
(why?). The particular part is obtained by assuming yp = A cos(1.7t) + B sin(1.7t) (method

## of undetermined coecients). With yp = 2.89A cos(1.7t) 2.89B sin(1.7t), and upon

substituting both yp and yp into the dierential equation and equating like terms we get the
simultaneous linear equations 2.89A+4A = 0 and 2.89B +4B = 1. The solution to these
equations is A = 0 and B = 1/1.11 0.900 9 . Hence the general solution to the dierential
equation is
yG = C1 cos(2t) + C2 sin(2t) + 0.9009 sin(1.7t).

We can now apply the initial conditions to yG and yG = 2C1 sin(2t) + 2C2 cos(2t) + 1.
531 5 cos(1.7t). We get the linear equations C1 = 0 and 2C2 + 1. 531 5 = 0, so that C2 = 1.
531 5/2 0.765 8. The solution to the initial value problem is now
y 0.7658 sin(2t) + 0.9009 sin(1.7t).
The graph is given below:
y

1.5
1
0.5
0
0

12.5

25

37.5

-0.5

50
t

-1
-1.5

## y=0.7658 sin(2t)+0.9009 sin(1.7t)

One can observe clear beats, with a beat period of around 40. We have h = 2 and
4
p = 1.7, and so from the discussion of beats above, the beat period should be 21.7
41. 89
which is consistent with the graph.
Note:
In the preceeding example, the amplitudes of the two sin functions were not
equal, but we still could observe a clear pattern of beats. We could write the solution to
the dierential equation in that example as
y

## 0.135 1 sin(2t) 0.9009 sin(2t) + 0.9009 sin(1.7t)

= 0.135 1 sin(2t) 1. 802 sin(0.15t) cos(1. 85t)
116

using the trig identities from the beat section above. The second term is the beat term; we
refer to the rst term as the noise term. The noise term is small in amplitude compared
to the beat term; if the noise term were too large, the beat pattern would be destroyed.
Resonance
We have seen that beats occur in dierential equations when the natural and driving
frequencies are close but not equal in value. What happens when the two frequencies are
exactly equal? In this case we get the phenomenon called resonance. Since the beat period
is given by h4
p , we see that as the driving frequency approaches the natural frequency,
the beat period goes to innity, that is, the beats get longer and longer. It is also true that
the beat amplitude gets larger as the two frequencies get close. Thus we can imagine that
as the driving frequency approaches the natural frequency, the beats get longer and larger,
until we see an innitely long beat, which continues to rise forever. This is called pure
resonance.
Note:
Resonance can also be dened for a system in which there is a small amount
of damping. It occurs when the frequency of a periodic forcing function is such that the
response function attains a maximum amplitude.
Example 3.5.3 A mass-spring system consists of a 1 kg mass suspended from a spring with
n
spring constant 4 m
. It is driven by a sinusoidal driving force with amplitude 1 newton and
2
frequency of 2 = 0.318 3 cycles per second (beginning its cycle at t = 0). Find the response
of the system, if there is no initial diplacement or initial velocity given. Sketch a graph of
the response. Discuss the implications of your results.
The dierential equation would be y + 4y = sin(2t). The initial conditions would be
y(0) = 0 and y (0) = 0. The homogeneous part of the solution is
yh = C1 cos(2t) + C2 sin(2t).
A rst attempt at a particular solution might be yp = A cos(2t) + B sin(2t). This attempt,
however, quickly leads to a contradiction (show this) because yp solves the homogeneous
dierential equation y + 4y = 0 (notice that the assumed form for yp is identical to yh ).
Thus we must go to Step 2 from Section 3.4, where we multiply the rst guess by t. Thus
we now assume
yp = At cos(2t) + Bt sin(2t).
The derivatives are
yp
yp

## = A cos(2t) 2At sin(2t) + B sin(2t) + 2Bt cos(2t)

= 4A sin(2t) 4At cos(2t) + 4B cos(2t) 4B sin(2t).

## Substituting these into the dierential equation we get

4A sin(2t) 4At cos(2t) + 4B cos(2t) 4Bt sin(2t) + 4(At cos(2t) + Bt sin(2t)) = sin(2t).
|
|
{z
}
{z
}
yp

yp

The terms that contain t cos(2t) and t sin(2t) cancel out, and so we only need equate coecients of the cos(2t) and sin(2t) terms. We get the linear equations
4B
4A

= 0
= 1

117

## so that B = 0 and A = 14 . Thus yp = 14 t cos(2t), and hence the general solution is

1
yg = C1 cos(2t) + C2 sin(2t) t cos(2t).
4
Using the initial conditions, along with yg = 2C1 sin(2t) + 2C2 cos(2t)
1
2 t sin(2t), we get the linear equations
C1
1
2C2
4

1
4

cos(2t) +

## so that C1 = 0 and C2 = 18 . The solution to the I.V.P. is

y=

1
1
sin(2t) t cos(2t).
8
4

## A graph of this solution is given below:

y
10

0
0

12.5

25

37.5

50
t

-5

-10

y= 18 sin(2t) 14 t cos(2t)

The response is an oscillation with greater and greater amplitude. From a practical point
of view, this behavior is indistinguishable from the initial phase of a very long beat. Also,
note that the spring would likely break or permanently get bent out of shape under these
conditions. It is also true, of course, that our assumption of no damping can never be met
in a physical system.
Even though it is dicult to tell a long beat from resonance using a graph, the algebraic
forms are completely dierent. The important thing to notice is the t preceding the cos(2t)
in the term 14 t cos(2t). This t means that the oscillations will continue to increase in
amplitude forever, or until the system breaks apart.

118

Exercises 3.5
cd
1. Prove the trig identity sin(c) sin(d) = 2 cos( c+d
2 ) sin( 2 ). To do this, start with
the well known identity sin(a + b) = cos a sin b + cos b sin a. Then replace a + b with
a b = a + (b) to get an identity for sin(a b). Next subtract these two identities
to get an identity for sin(a + b) sin(a b). Finally, let c = a + b and let d = a b,
and solve for a and b in terms of c and d. Replace all a s and b s with c s and d s in
the identity for sin(a + b) sin(a b), which nishes the proof. Fill in the details and
compose a well-written proof.

For each spring-mass problem, nd the position y(t) as a function of time t, and sketch
a graph of the function over an appropriate interval. If the motion is damped, identify
the transient and steady state parts of the motion, and the approximate time when the
transient part dies out. If the motion is undamped, state whether beats or resonance
are present or not.
2. m = 1, c = 3, k = 2, forcing function f (t) = 2 cos(3t), initial conditions y(0) = 1,
y (0) = 0.
3. m = 1, c = 2, k = 2, forcing function f (t) = 3 cos(t), initial conditions y(0) = 1,
y (0) = 0.
4. m = 1, c = 2, k = 1, forcing function f (t) = sin(2t), initial conditions y(0) = 0,
y (0) = 1.
5. m = 1, c = 0, k = 4, forcing function f (t) = 2 sin(t), initial conditions y(0) = 0,
y (0) = 0.
6. m = 1, c = 0, k = 4, forcing function f (t) = 2 cos(2t), initial conditions y(0) = 0,
y (0) = 0.
7. m = 1, c = 0, k = 100, forcing function f (t) = 40 cos(9t), initial conditions y(0) = 0,
y (0) = 0.

119

3.6

Variation of Parameters

We have seen that nding a particular solution xp by the method of undetermined coecients
only works when the forcing function f (t) is a combination of polynomials, exponential
functions, sines and cosines. The reason for this is that when we assume xp is of a particular
form, if dierentiating it introduces new types of functions, we will not be able to make
the two sides of the dierential equation identical. For example, if f (t) = tan(t), and
we assume xp = A tan(t), the derivative of xp is A(sec(t))2 . Suppose we then let xp =
A tan(t) + B(sec(t))2 . Now xp will contain another new function. There is no way to
express all of the derivatives of tan(t) as a linear combination of a nite set of functions.
The method of Variation of Parameters is another method for nding a particular solution xp . If the forcing function f is integrable, it will be shown to work for any equation of
the form
x + p(t)x + q(t)x = f (t)

(3.17)

for which a general solution to the homogeneous equation can be found. Note carefully that
we can always nd a homogeneous solution if p and q are both constants, but it is only in
rare cases that we will be able to do this if p and q are functions of t. However, the method
is denitely more general in that f (t) is not limited to exponential functions, polynomials,
or sines and cosines.
Given that xh = C1 x1 + C2 x2 is a general solution of the associated homogeneous
equation for (3.17), a particular solution xp will be assumed to be of the form
xp = v1 x1 + v2 x2 .

(3.18)

## The functions v1 and v2 must be non-constant functions of t; otherwise, xp would satisfy

the homogeneous equation.
Since we have two unknown functions v1 and v2 to determine, we can specify two conditions that they must satisfy. The derivative of xp by the product rule is
xp = v1 x1 + v2 x2 + v1 x1 + v2 x2 ,
and in order to simplify both xp and xp , the rst condition we impose on v1 and v2 is that
v1 x1 + v2 x2 = 0.
With (3.19) satised,

xp = v1 x1 + v2 x2

and

xp = v1 x1 + v2 x2 + v1 x1 + v2 x2 .

## Substituting xp , xp and xp into equation (3.17),

(v1 x1 + v2 x2 + v1 x1 + v2 x2 ) + p(v1 x1 + v2 x2 ) + q(v1 x1 + v2 x2 ) = f (t).
The terms can be regrouped in the following way
v1 (x1 + px1 + qx1 ) + v2 (x2 + px2 + qx2 ) + v1 x1 + v2 x2 = f (t),
|
{z
}
|
{z
}
=0

=0

120

(3.19)

and using the fact that x1 and x2 are solutions of the homogeneous equation, we see that
our second condition on the functions v1 and v2 must be
v1 x1 + v2 x2 = f (t).

(3.20)

v1 x1 + v2 x2

= 0

v1 x1

= f (t)

v2 x2

## we obtain the following formulas for the functions v1 and v2 :

0 x2

f x2
x2 f

=
v1 =
,

x1 x2 x1 x2
x1 x2
x1 x2

x1 0

x1 f
x1 f

=
v2 =

x1 x2 x1 x2
x1 x2
x1 x2

Notice that the determinant in the denominator is the Wronskian of x1 and x2 , and since
C1 x1 + C2 x2 is a general solution of the homogeneous equation we know that W (x1 , x2 )
must be unequal to zero. We therefore have formulas for v1 and v2 , which can be integrated
to give
)
)
(
(
x2 f
x1 f
v1 =
,
v2 =
.
(3.21)
W (x1 , x2 )
W (x1 , x2 )
This method is straightforward, but the integrals in (3.21) are usually hard to evaluate. We
rst give a relatively simple example:
Example 3.6.1 Solve the dierential equation
x + x = tan(t).

(3.22)

## We know that the solution of x + x = 0 can be written in the form

xh = C1 cos(t) + C2 sin(t).
If we let x1 = cos(t) and x2 = sin(t) the Wronskian is
W (x1 , x2 ) = x1 x2 x1 x2 = cos(t) cos(t) ( sin(t)) sin(t) 1;
therefore, according to equation (3.21) v1 and v2 are given by

v1 =

(sin(t) tan(t)) dt =

and
v2 =

sin2 (t)
dt
cos(t)

(cos(t) tan(t)) dt =

sin(t)dt.

Integration gives
v1 = sin(t) ln | sec(t) + tan(t)|,
121

v2 = cos(t);
therefore, a particular solution of (3.22) is
xp

= x1 v1 + x2 v2
= cos(t) [sin(t) ln | sec(t) + tan(t)|] + sin(t)( cos(t))
= cos(t) ln | sec(t) + tan(t)|.

## The general solution of (3.22) can now be written as

x(t) = xh + xp = C1 cos(t) + C2 sin(t) cos(t) ln | sec(t) + tan(t)|.
Note that if initial conditions are given at t = 0, the solution becomes unbounded as t
2 . This is not surprising because the forcing function tan(t) can be seen to have vertical
asymptotes at 2 .
The function f (t) = tan(t) is not a forcing function that occurs very often in real-world
problems. A more reasonable forcing function for a mass-spring or RLC circuit problem
might be
1
f (t) =
.
1 + et
This function f (t) could represent the output of a transistor which increases linearly for
small t, but saturates at a value of 1 as t . An example of a problem involving this
function is given below.
Example 3.6.2 Consider the spring-mass equation
x + 3x + 2x = f (t) =

1
.
1 + et

(3.23)

## The equation is slightly over damped, and since f (t) 1 as t it is reasonable to

assume that the steady state function xp will approach 0.5 as t . Suppose an engineer
is asked to answer the following question: If x(0) = 1.0, will x always go below 0.5 for
some positive value of t, or are there values of x (0) for which it could approach 0.5 from
above as t ? Figure 3.2 shows numerical solutions of (3.23) with x(0) = 1 and several
dierent values of x (0), and while this gives a general impression of how solutions behave,
it would not be easy to answer the specic question being asked.
We will therefore try the method of Variation of Parameters to nd an analytic solution
of (3.23). The general solution of the homogeneous equation is xh = C1 e2t + C2 et , so we
will let x1 = e2t and x2 = et . The Wronskian is
W (e2t , et ) = e2t (et ) (et )(2e2t ) = e3t ;
therefore, letting xp = v1 x1 + v2 x2 , we need to compute the integrals
)
)
(
( t

x2 f
e
1
e2t
v1 =
=

dt
=

dt
3t
t
W (x1 , x2 )
e
1+e
1 + et
(

and
v2 =

x1 f
W (x1 , x2 )

(
=

e2t
1

e3t 1 + et
122

dt =

et
dt.
1 + et

2.2
2
1.8
1.6
x

1.4
1.2
1
0.8
0.6
0.4
0

## Figure 3.2: Solutions of (3.23) with x(0) = 1 and x (0) = 1, 0, ..., 5

Both of these integrals can be found by substituting u = et and then using partial fractions.
You should check carefully the following calculations.
Substituting u = et , the integral for v1 becomes

du
1
1
1
1
v1 =
=
( 2+ 3
)du
u3 (1 + u)
u u
u
u+1
1
1

ln (1 + u) = t + et e2t /2 ln(1 + et )
u 2u2
and the integral for v2 is

du
1
1
1
v2 =
= ( 2
)du
u2 (1 + u)
u u
u+1
= ln u +

1
ln (1 + u) = t + et ln(1 + et ).
u
Writing the particular solution as xp = x1 v1 + x2 v2 , the general solution of (3.23) is
(
)
e2t
x(t) = C1 e2t + C2 et + e2t et t
ln (1 + et )
2
( t
)
t
t
+ e
e t ln (1 + e ) .
(3.24)
= ln u +

The constants C1 and C2 depend on the initial conditions, but if the terms of equation (3.24)
are regrouped and x(t) is written as
x(t) =

1
+ et ((C2 + 1) t ln(1 + et )) + e2t (C1 t ln(1 + et ))
2

(3.25)

it can be clearly seen that for all t > max{C1 , C2 +1}, the function x(t) is less than 0.5. Thus,
for any nite initial conditions, x always becomes less than 0.5 and ultimately approaches
0.5 from below as t .
One object of example 3.6.2 is to reinforce the idea that sometimes a numerical solution
is all you need, but other times trying to nd an analytic solution may be worth the eort.
123

## Exercises 3.6 In problems 1-4 use variation of parameters to nd a particular solution xp :

1. x + 4x + 3x = 2et ,

x1 (t) = et ,

x2 (t) = e3t

2. x + 2x + x = 4et ,

x1 (t) = et ,

x2 (t) = tet

3. x + x =

1
1+et ,

x1 (t) = et ,

x2 (t) = 1

(Compare the xp you obtain to the particular solution of this equation with f (t) 1).
4. x + x = cot(t),

x1 (t) = cos(t),

x2 (t) = sin(t)

## A Cauchy-Euler equation is a 2nd-order dierential equation of the form

at2 x + btx + cx = 0,
with a, b, and c real constants. Show that if we let x(t) = tr and substitute x, x , and x into
the dierential equation then r must satisfy
(ar(r 1) + br + c)tr = 0.
If it is assumed that t > 0, then the exponents r must be roots of the characteristic
polynomial ar2 + (b a)r + c, and the general solution can be shown to be
xh = C1 tr1 + C2 tr2 if the roots r1 , r2 are real and unequal
xh = C1 tr + C2 tr ln(t) if r is a double real root
xh = C1 t cos( ln(t)) + C2 t sin( ln(t)) if the roots are complex conjugates i.

5. Match each Cauchy-Euler equation below to the graph of its solution. You should be
able to do this just by determining the roots of the characteristic polynomial. The
initial conditions in each case are x(1) = 1, x (1) = 0.
(i) t2 x + 5tx + 3x = 0

(ii) t2 x + tx + 9x = 0

A
1.5
1
x(t)
0.5
0
0.5
1
1.5

x(t)

0.5

1 t 1.5

1.5
1
0.5

(iii) t2 x 3tx + 3x = 0

B
0.5

t
1 1.5 2 2.5 3

0
0.5
1
1.5
2

C
1.5
1
x(t)
0.5
0
0.5
1
1.5

## 0.2 0.4 0.6 0.8 1 1.2

t

For the following Cauchy-Euler equations, nd two solutions of the homogeneous equation and then use variation of parameters to nd xp . Note: before solving for xp you
need to divide the equation by t2 to have the correct forcing function f (t).
6. t2 x 2tx + 2x = 3t
7. t2 x 2x = 2t
8. t2 x + 14 x = t 2

## Solve the following IVPs and sketch your solution on 0 < t 3:

124

9. x 2t x +
10. x

2
t2 x

= 3t , x(1) = 1, x (1) = 0

= 2t , x(1) = 0, x (1) = 1

2
t2 x

125

3.7

## Numerical Methods for Second Order Equations

and Systems

The methods we have developed for nding exact solutions to second-order dierential
equations are quite limited, in that they apply only to linear equations with constant coecients, and to equations which are either homogeneous or have specic forms for the
non-homogeneous terms (the driving force terms for mass-spring equations). As with rst
order dierential equations, when analytic methods do not work, numerical techniques can
be employed to obtain approximate solutions. For a second-order equation x = F (t, x, x ),
two initial conditions x(t0 ) and x (t0 ) must be specied. The numerical techniques we will
describe are quite general, and can be used for nonlinear equations (which in most cases
cannot be solved exactly).
Numerical techniques have been programmed in most computer algebra systems, such as
MAPLE, and are also available on advanced calculators. It is important to have some idea
of how these techniques work, so that you can understand what the graphs and numbers
you are looking at are telling you. Sometimes numerical approximations are quite good, and
sometimes they are very poor (we have already seen this in the case of rst-order equations).
Understanding how numerical methods work will help you distinguish the good ones from
the poor ones.
Converting Second-Order Equations to Systems
Our approach to implementing numerical methods for second-order (and other higherorder) equations is to rst convert the dierential equation to a system of rst-order dierential equations, and then use algorithms very similar to those of Section 2.6. In Section 1.1
we showed how to convert a second-order equation to a system (see Example 1.1.4). Briey,
for an initial value problem of the form
x = F (t, x, x ),
we let

x(0) = x0 ,

x (0) = x0

x1 = x and x2 = x .

(3.26)
(3.27)

## Then x1 = x = x2 , and x2 = x = F (t, x, x ) = F (t, x1 , x2 ) so that the system with initial

conditions that is equivalent to the initial value problem in Equations 3.26 is given by
x1
x2

=
x1 (0) =

x2

(3.28)

F (t, x1 , x2 )
x0 , x2 (0) = x0

(3.29)
(3.30)

## Eulers Method for Systems

The simplest numerical method for second order dierential equations is an extension
of Eulers method for rst order dierential equations. Recall that Eulers method for rst
order equations of the form x = f (t, x) was based on the idea that if you know the value
of x at some point t = t0 (we called this an initial condition), then you can estimate x at
the point t0 + t using the basic idea of the derivative as the slope of the tangent to write
x(t0 + t) x(t0 ) + x (t0 )t (t was called the step size). Then since the dierential
equation itself gives us x in terms of t and x we can replace x (t0 ) with f (t0 , x0 ) to get
x(t0 + t) x0 + f (t0 , x0 )t where x0 = x(t0 ). Once we have advanced the solution one
126

step from t0 to t0 + t, we can repeat the process to get the value of x at t0 + 2t, t0 + 3t,
and so on.
Consider a system of two rst-order equations
x

= f (t, x, y)

(3.31)

= g(t, x, y)

(3.32)

Note that we have chosen x and y as our two dependent variables instead of x1 and x2 .
This simplies the notation below, as we do not have to use double-subscripted variables.
To apply Eulers method to this system, we essentially apply the algorithm for rst-order
equations to each equation in the system. We write
t1

= t0 + t

(3.33)

x1
y1

x0 + f (t0 , x0 , y0 )t
y0 + g(t0 , x0 , y0 )t

(3.34)
(3.35)

where x0 = x(t0 ), y0 = y(t0 ), x1 = x(t1 ), y1 = y(t1 ), ... to advance the solution one step
from t0 to t1 = t0 + t. As with the rst-order algorithm, we then repeat this process to
advance the solution to t2 = t0 + 2t, t3 = t0 + 3t, and so on. In general we write
ti+1

= ti + t

(3.36)

xi+1
yi+1

xi + f (ti , xi , yi )t
yi + g(ti , xi , yi )t.

(3.37)
(3.38)

for i = 0, 1, . . . , n 1 (to advance the solution n steps). This is Eulers method for a
system of two rst-order dierential equations.
n
Example 3.7.1 A 1kg mass is suspended on a spring with spring constant 1 m
and no
damping. The mass is displaced 1m upward and released. Estimate the position of the mass
after 2 seconds using Eulers method with 10 steps. Also, nd the exact position after 2
seconds, and the error in using Eulers method. Sketch the exact solution along with the
Euler estimates over the interval 0 t 2.

We rst need to write an initial value problem. Let x represent the position of the mass
in meters, and t the time in seconds. From sections 3.3 and 3.5 we get the initial value
problem
x + x = 0, x(0) = 1, x (0) = 0 .
By writing the dierential equation in the form x = x we see that F (t, x, x ) = x. We
now make substututions similar to those in Equations 3.27:
x
y

= x
= x

This transforms the dierential equation and the initial conditions into the system and initial
conditions given by
x = y
y = x
x(0) = 1, y(0) = 0.
127

Comparing this to Equations 3.31 and 3.32 we see that f (t, x, y) = y and g(t, x, y) = x.
Thus the equations that we need to iterate, based on equations 3.36, 3.37, and 3.38 become:

ti+1
xi+1
yi+1

ti + t
xi + yi t
yi xi t.

2
Since we want to get to t = 2 in 10 steps we will use steps of size t = 10
= 0.2. With
t0 = 0, x0 = 1, and y0 = 0, we can start Eulers method. For the rst two steps we have

t1
x1

= t0 + t = 0 + 0.2 = 0.2
x0 + y0 t = 1 + (0)(0.2) = 1.0

y1
t2
x2

y0 x0 t = 0 (1)(0.2) = 0.2
= t1 + t = 0.2 + 0.2 = 0.4
x1 + y1 t = 1.0 + (0.2)(0.2) = 0.96

y2

## We will put all of the results in the form of a table.

i
0
1
2
3
4
5
6
7
8
9
10

ti
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2

xi
1
1
0.96
0.88
0.7616
0.608
0.423936
0.215552
0.00979
0.24375
0.47732

yi
0
0.2
0.4
0.592
0.768
0.92032
1.04192
1.12671
1.16982
1.16786
1.11911

xi + yi t
1
0.96
0.88
0.7616
0.608
0.423936
0.215552
0.00979
0.24375
0.47732

yi + F (ti , xi , yi )t
= yi xi t
0.2
0.4
0.592
0.768
0.92032
1.04192
1.12671
1.16982
1.16786
1.11911

Thus the approximate position of the mass after 2 seconds is x(2) 0.47732.
To nd the exact position of the mass, we can solve this initial value problem using the
methods of Section 3.2. For the general solution of the dierential equation y + y = 0 we
get y = C1 cos(t) + C2 sin(t). Using the initial conditions y(0) = 1 and y (0) = 0 we get
C1 = 1 and C2 = 0 (show this). Thus the solution to the I.V.P is y = cos(t). The exact
solution at t = 2 is therefore y(2) = cos(2) 0.416 15 (accurate to 5 decimal places).
The dierence between the Euler approximation and the exact value, and hence the error
in using Eulers method, is 0.47732 (0.416 15) = 0.061 17m. Thus the Euler estimate
is 0.06117 meters below the exact value. A graph of the exact solution y = cos(t) along with
the Euler estimates is given below.
128

0.75

0.5

0.25

0
0

0.5

1.5

2
t

-0.25

## y=cos(t) (solid line)

Euler estimates (boxes)

We see that the Euler estimates are above the graph of the exact solution when it is
positive, and below the graph of the exact solution when it is negative.
Order of Convergence
In Section 2.6 we discussed the concept of order of convergence; we briey repeat some
of that material here. Generally, as the step size t gets smaller, the Euler estimates get
better. Thus, in the previous example, if a step size of t = 0.1 and 20 steps were chosen,
instead of a step size of t = 0.2 and 10 steps as was the case in the example, then the Euler
estimate at t = 2 would be more accurate (closer to the exact value at t = 2). The order
of convergence of a numerical method is a measure of how quickly the numerical estimate
converges to the exact solution as t approaches 0. Eulers method is a rst order numerical
method, that is, the order of convergence is 1. This means that if the stepsize is divided
by M then the error will also approximately be divided by M (as long as t is suciently
small to begin with). For example, if t is reduced from 0.2 to 0.02 (divided by 10), then
one would expect the error in the Euler estimate to be approximately reduced by a power
of ten (divided by 10). Another way of saying this is that every time t goes down by a
power of ten, you get one more digit of accuracy in your estimate.
In general, a k th order numerical method would be one for which the error is divided
by M k when the step size is divided by M (for t suciently small). For example, if the
step size is divided by 10, then a second order method would reduce the error by 100 and
a fourth order method would reduce the error by 10000. Equivalently, reducing the step
size by one order of magnitude (one power of 10) gets you 2 more digits of accuracy with a
second order method, and 4 more digits of accuracy with a fourth order method.
It is impractical to do very many Euler steps when calculating by hand, so we will assume
you have a calculator or computer software which can run Eulers method for you for the
rest of this section.
Note: With some software systems or calculators it is necessary to rst write the equation
in system form, as we have shown above. For example, if you are using one of the TI
calculators that has dierential equation capability, you must convert to system form, but
in Maple that is not necessary.
Example 3.7.2 Using the mass-spring system and initial conditions from Example 3.7.1
n
, no damping, y(0) = 1, y (0) = 0), use Eulers method
(1kg mass, spring constant 1 m
129

## (implemented on a calculator or computer) to estimate the position of the mass after 2

seconds using stepsizes of t = 0.2, t = 0.02, t = 0.002, and t = 0.0002. For the case
t = 0.2, nd all of the intermediate steps for t = 0 to t = 2; for the other cases, nd just
the value at t = 2. For each case calculate the error involved using Eulers method at t = 2,
and discuss the results in terms of order of convergence.
The initial value problem is y + y = 0, y(0) = 1, y (0) = 0. Using y1 = y, and y2 = y
to the write the I.V.P. in system form we get
y1

y2

(3.39)

y2 =
y1 (0) =

y1
1

(3.40)
(3.41)

y2 (0)

(3.42)

Eulers method can be implemented in Maple using the dsolve function (which can also
be used to get exact solutions). The Maple commands to nd y(1) and y (1), for example,
would be
sol:=dsolve({di(y(t),t\$2)+y(t)=0,y(0)=1,D(y)(0)=0},y(t),type=numeric,
method=classical[foreuler],stepsize=0.2);
sol(1);
For the TI-89 calculator, just put the calculator into dierential equations mode and
input the system equations given in Equations 3.39-3.42.
The table below shows the results from using Maple:
t
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0

y(t)
1.
1.
.959999999999999964
.880000000000000002
.761600000000000055
.608000000000000096
.423936000000000090
.215552000000000132
.978944000000013180e 2
.243752960000000074
.477324902400000028

y (t)
0
.200000000000000010
.400000000000000022
.591999999999999971
.768000000000000016
.920320000000000027
1.04191999999999996
1.12670720000000002
1.16981760000000000
1.16785971200000004
1.11910912000000007

If we compare the computer output to the hand calculated results from the previous example, we can see that they agree up to 5 decimal places. Note that there is some numerical
roundo error starting in about the 15th decimal place in the Maple output (the number of
digits of accuracy can be adjusted in Maple).
We now calculate the value of y at t = 2 only, using the step sizes t = 0.02, t = 0.002,
2
and t = 0.0002. The corresponding values for the number of steps n (using n = t
) would
be n = 100, n = 1000, and n = 10000.
The results, including errors (recall that the exact solution is cos(2)) are shown in the
table below.
130

stepsize
h
0.2
0.02
0.002
0.0002

number of steps
n
10
100
1000
10000

Euler estimate
y(2)
-0.477324902
-0.42430453
-0.416977532
-0.41623005

exact value
cos(2)
-0.41614684
-0.41614684
-0.41614684
-0.41614684

error
y(2)-cos(2)
-0.0611780659
-0.0081576935
-0.0008306952
-0.0000832134

Since the stepsize is reduced by a power of 10 each time (divided by 10), we would expect
the error to also be reduced by a power of 10 each time, in order to verify the claim that
Eulers method is a rst order numerical method (order of convergence is 1). This is easy to
verify with our decimal system; just look to see if the decimal point in the error is moved to
the left one place each time. In our table, this is in fact approximately true, especially when
we go from t = 0.02 to t = 0.002 and from t = 0.002 to t = 0.0002. This is what we
meant when we said as long as t is suciently small to begin with in our introduction
to order of convergence. In this example we see that suciently small is about t = 0.02 or
smaller.
Digits of Accuracy: Another way to think about order of convergence, which is very
easy to visualize, is that for a rst order convergent numerical method, each time the
stepsize is reduced by a power of ten, we get one more digit of agreement between successive
estimates. Looking back at the last example, in the y(2) column we do get roughly one
more digit of agreement between successive estimates each time t is divided by 10.
This idea is important, in that numerical methods are most useful when exact results
are not possible. Thus, one way of estimating how accurate a numerical result is when no
exact result is available, is to reduce the step size by a certain amount, and see how many
digits of agreement you get with consecutive estimates. One continues to reduce the stepsize
until the desired number of digits of accuracy is reached. The amount by which you need
to reduce the step size depends on the order of convergence.
Higher-Order Numerical Methods
Eulers method is useful mainly because it is easy to understand why and how it works,
and it helps one understand concepts such as stepsize and how stepsize relates to order
of convergence. It is not useful for solving practical problems, because it is too slow to
converge. Eulers method is training wheels for learning how to use more sophisticated
numerical methods.
In Section 2.6 we introduced two higher-order methods for rst-order equations: Modied
Euler (also known as Second-order Runge-Kutta) and Fourth-order Runge-Kutta. Both of
these methods can be easily extended to systems of dierential equations (and hence to
second-order and higher dierential equations) using the same approach that we did with
Eulers method. Thus, if you apply the formulas given in Section 2.6 to each equation in
the system of equations, you can develop the algorithms for these methods as applied to
sytems for yourself.
Since this is not a course in numerical analysis (where one studies these methods in great
detail), we will not give the specic formulas for calculating with the Runge-Kutta method.
Instead, we will assume that you have either a calculator or computer software which can
calculate the Runge-Kutta estimates for you. We will not use the Modied Euler method
in this section.
131

Recall since Runge-Kutta is a fourth-order method, we know that if we divide the stepsize
t by 2 then the error will be reduced by 24 = 16. Reduction in the error by a factor of 10
is equivalent to getting one more digit of accuracy; thus reduction in the error by a factor
of 16 gives you slightly more than one more digit of accuracy. The upshot of all this is
that a reasonable rule when using Runge-Kutta fourth order is to divide t by 2 and then
check for the number of digits of agreement between successive estimates. Continue until
the number of digits of agreement is at the desired number of digits of accuracy. Recall
that with Eulers method we had to reduce t by a factor of 10 to get one more digit of
accuracy; with Runge-Kutta we only have to reduce t by a factor of 2 to get (more than)
one more digit of accuracy.
Another variation on numerical methods for dierential equations, are methods which
use an adaptive stepsize. This means that the algorithm changes the stepsize as it moves
forward in order to stay within a specied maximum error per step. A variation of fourth
order Runge-Kutta that uses this idea is called Runge-Kutta-Fehlberg (RKF45). With this
type of method, instead of specifying the stepsize, you specify an error tolerance. On the
TI89 calculator, when the RK method is chosen (its not the standard fourth-order RungaKutta, but rather an adaptive stepsize variation), you lower the quantity called diftol by
powers of ten until the desired number of digits of accuracy is obtained.
Example 3.7.3 Once again we use the mass-spring system from the previous two examples
n
(1kg mass, spring constant 1 m
, no damping, with y(0) = 1 and y (0) = 0). Estimate
the position of the mass after 2 seconds using at least a fourth order method of some kind
(fourth order Runga-Kutta, RKF45, or whatever is built into your software) implemented
on a calculator or in computer software. Obtain 4 decimal places of accuracy, and justify
your claim of accuracy without reference to the exact solution.
Again the initial value problem is y + y = 0, y(0) = 1, y (0) = 0. We look rst at the
standard fourth-order Runge-Kutta algorithm, implemented in Maple.
Of course, as in the previous example, we need to compare the result with stepsize t =
0.2 to the result using other stepsizes in order to know how much accuracy we have in the
result. It would be a huge mistake to believe that the value y(2) = 0.416121093778512696
as listed in the Maple output is accurate to all of the digits printed out. Thus, based on the
discussion preceding this example, since we are using a fourth-order convergent method, we
can repeatedly reduce t by half and compare consecutive estimates.
stepsize
t
0.2
0.1
0.05
0.025

number of steps
n
10
20
40
80

RK estimate
y(2)
-0.4161210938
-0.4161452687
-0.4161467401
-0.4161468306

As advertised, one can see that each time t is halved (and n is doubled in order to
keep the nal value of t at nt = 2.0), we get about one more digit of agreement between
consecutive estimates. Even if you use just the rst two estimates, we would get a four
digit estimate of y(2) 0.4161 (which is in fact accurate to four digits - see the previous
example). This estimate is better than what we got using Eulers method with n = 10, 000
132

steps! If you use the last two estimates from the RK table above, we would estimate y(2)
0.416147 which is accurate to six digits. The higher order of convergence for RK makes a
huge dierence in how quickly we get to a fairly accurate estimate.
Note: If you were using the TI-89 calculator, you would write the equation in system
form and set the Solution Method to RK. Since this is an adaptive stepsize method, you
would start with the error tolerance parameter diftol at 0.001 or so, and then reduce it by
powers of ten until consecutive values for y(2) agree to 4 decimal places.
For our last example, we look at a variation of the mass-spring system used in the rst
three examples. It illustrates what can go wrong when the stepsize of a numerical method
is not small enough, and how it can lead to incorrect conclusions about the physical system.

n
Example 3.7.4 Consider a mass-spring system with a 1kg mass and spring constant 1 m
and with no damping. We then add a sinusoidal driving force by adding the term sin(0.9t) to
the right hand side of the dierential equation (what are the amplitude and frequency of the
driving force?). Also, we start the system with no displacement and no initial velocity, thus
the initial value problem is y + y = sin(0.9t), y(0) = 0, y (0) = 0. Graph the response of
the system (the solution to the I.V.P.) on the interval 0 t 50, using Eulers method with
a stepsize of t = 0.1. Describe the response in terms of the mass-spring system. Justify

40
y

20
0

10

20

30

40

50

20
40
n=500,t=0.1

The graph looks very familiar (in Maple you can use method=classical[foreuler],
stepsize=0.1 with DEplot to generate this graph) . In Section 3.5 we saw that in some
mass-spring systems with no damping we can get the phenomenon of resonance, that is,
oscillations that get larger and larger. It would be easy to come to that conclusion and move
on without any further thought. That would be a big mistake in this case.
It is critical when using numerical methods to do more than one run using dierent
stepsizes (or dierent error tolerances when using an adaptive method). For this problem,
if we do another run using t = 0.01 with n = 5000 steps we get the result below.
133

10
y

5
0

10

20

30

40

50

5
10
n=5000,t=0.01

Now the graph indicates the possibility of beats, rather than resonance. In fact this is
the case, which we would see if we graphed beyond t = 50. Also, we can see that the natural
1
and driving frequencies are close, but not equal ( 2
versus 0.9
2 ), which indicates beats, not
resonance.
It is not only because we used Eulers method that we saw this problem; any numerical
method, no matter how good, will give erroneous results if the stepsize or error tolerance
is not set low enough. When using numerical methods always do more than one run and
compare results before you become condent that the results make sense.
Exercises 3.7 The following driven mass-spring problems are taken from Section 3.5. Explain any unusual results that you nd. Use whatever technology you have available, or you
can use the applet for graphing and calculating numerical solutions for systems of equations
at uhaweb.hartford.edu/rdecker/MathletToolkit/SystemsBook.htm.
1. m = 1, c = 3, k = 2, forcing function f (t) = 2 cos(3t), initial conditions y(0) = 1,
y (0) = 0. Estimate y(1) using Eulers method with step size 0.25. Show all work,
then check with a calculator or computer. Also compare to the exact solution.
2. m = 1, c = 2, k = 2, forcing function f (t) = 3 cos(t), initial conditions y(0) = 1,
y (0) = 0. Estimate y(1) using Eulers method with step size 0.25. Show all work,
then check with a calculator or computer. Also compare to the exact solution.
3. m = 1, c = 2, k = 1, forcing function f (t) = sin(2t), initial conditions y(0) = 0,
y (0) = 1. Estimate y(1) using Eulers method with step sizes h = 1.0, 0.1, 0.01,
0.001 (using a calculator or computer of course). Based on these calculations, about
how many decimals of accuracy do you have with h = 0.001? Compare to the exact
solution to verify.
4. m = 1, c = 0, k = 4, forcing function f (t) = 2 sin(t), initial conditions y(0) = 0,
y (0) = 0. Estimate y(1) using Eulers method with step sizes h = 1.0, 0.1, 0.01,
0.001 (using a calculator or computer of course). Based on these calculations, about
how many decimals of accuracy do you have with h = 0.001? Compare to the exact
solution to verify.
5. m = 1, c = 0, k = 4, forcing function f (t) = 2 cos(2t), initial conditions y(0) =
0, y (0) = 0. Estimate y(1) using fourth order Runga-Kutta (RK4) with step sizes
h = 1.0, 0.5, 0.25, and 0.1 (using a calculator or computer of course). Based on
134

these calculations, about how many decimals of accuracy do you have with h = 0.1?
Compare to the exact solution to verify.
6. m = 1, c = 0, k = 100, forcing function f (t) = 40 cos(9t), initial conditions y(0) =
0, y (0) = 0. Estimate y(1) using fourth order Runga-Kutta (RK4) with step sizes
h = 1.0, 0.5, 0.25, and 0.1 (using a calculator or computer of course). Based on
these calculations, about how many decimals of accuracy do you have with h = 0.1?
Compare to the exact solution to verify.
7. m = 1, c = 0, k = 4, forcing function f (t) = 2 cos(2t), initial conditions y(0) = 0,
y (0) = 0. Estimate y(1) using an adaptive step size algorithm (such as RK on the
TI-89) with error tolerance 0.1, 0.01, 0.001, and 0.0001 (diftol on the TI-89). Based
on these calculations, about how many decimals of accuracy do you have with error
tolerance 0.0001? Compare to the exact solution to verify.
8. m = 1, c = 0, k = 100, forcing function f (t) = 40 cos(9t), initial conditions y(0) = 0,
y (0) = 0. Estimate y(1) using an adaptive step size algorithm (such as RK on the
TI-89) with error tolerance 0.1, 0.01, 0.001, and 0.0001 (diftol on the TI-89). Based
on these calculations, about how many decimals of accuracy do you have with error
tolerance 0.0001? Compare to the exact solution to verify.

135

3.8

## Qualitative Methods and the Phase Plane

We now turn to methods for obtaining information from second-order dierential equations
without solving them explicitly (as in Sections 3.2-3.6), or numerically (as in Section 3.7
). To understand the qualitative behavior of solutions of second-order equations, you will
need to learn about some new types of graphs called vector elds, direction elds and phase
plots. These expand on the ideas of the slope eld and the phase line, dened for rst-order
equations in Chapter 2. We will nd that they are most useful when the dierential equation
being studied is autonomous; that is, is of the form x = F (x, x ).
The Phase Plane
We saw in the last section that in order to apply Eulers method to a second-order
dierential equation, we need to calculate not just the position x but also the velocity x at
each step. This is because knowing the value of x(t0 ) at some time t = t0 does not determine
the value of x (t0 ) for second-order equations. This diers from the rst-order case because
when we write a rst-order equation in the form x (t) = f (t, x(t)) we get x (t0 ) = f (t0 , x(t0 ))
which determines x (t0 ) without having to solve the dierential equation itself. For secondorder equations we can write x (t) = F (t, x(t), x (t)), but this does not help us determine
x (t0 ) when we know x(t0 ) (though it does determine x (t0 ) when we know x(t0 ) and x (t0 )
as we saw in the last section).
The consequence of the above discussion is that for second-order equations we can think
of the solution as consisting of a list of corresponding t, x(t), and x (t) values. Again, if
we look back at the last section on numerical methods, we see that in fact this is precisely
what we generate using Eulers method (see Examples 3.7.1 and 3.7.2). So far we have just
looked at the t versus x(t) graph when graphing the solution to a second-order dierential
equation. We could, however, just as easily look at a t versus x (t) graph or an x(t) versus
x (t) graph. We will refer to the t versus x(t) and t versus x (t) graphs as time plots, and
the x(t) versus x (t) graph as the phase plot. A phase plot is an example of a parametric
plot, which you may have studied in a precalculus or calculus course. When the coordinate
plane is labelled with x along the horizontal axis and x along the vertical axis, we refer to
that coordinate plane as the phase plane.
Furthermore, recall from the last section that it is often convenient to write a secondorder dierential equation as a rst-order system. When we dene new variables x1 = x,
and x2 = x , then a phase plot would be a plot of x2 versus x1 . In Chapters 4 and 5 where
we study systems in and of themselves, plots of x2 versus x1 will also be called phase plots.
Example 3.8.1 For each of the following initial value problems, solve the dierential equation to obtain x(t) and x (t), and sketch both time plots (t versus x(t) and t versus x (t))
and the phase plot ( x(t) versus x (t)). Use the interval 0 t 20. Relate the results to
mass-spring systems.
a) x + 4x = 0, x(0) = 0, x (0) = 2
b) x + 0.2x + 4.01x = 0, x(0) = 0, x (0) = 2
c) x + 4x = sin(1.6t), x(0) = 0, x (0) = 0
Each equation can be solved for x(t), using the methods of sections 3.2 (for a and b) and
3.4 (for c). Then for each case simply dierentiate x(t) to nd x (t). We get
d
sin(2t) = 2 cos(2t)
a) x = sin(2t), x = dt
136

( 0.1t
)
d
b) x = e0.1t sin(2t), x = dt
e
sin(2t) = e0.1t (2 cos(2t) 0.1 sin(2t))
(
) 10
5
d 25
5
10

c) x = 25
36 sin(1.6t) 9 sin(2t), x = dt 36 sin(1.6t) 9 sin(2t) = 9 cos(1.6t) 9 cos(2t)
In Maple, the plot command can be used to generate both time plots and phase plots
after x(t) and x (t) have been obtained. On the TI-89, you must put the calculator into
PARAMETRIC mode to get a phase plot. We could also (tediously) generate a table of
values for t, x(t), and x (t), and then use these to generate the required plots, but this is not
a very practical idea. The phase and time plots for equation (a) are shown in Figure 3.3.
x(t) time plot

x 0.5

x 1

8 t 12

0.5

16

20

phase plot
2
x

8 t 12

16

20

0.5

1
0

0.5
x

## Figure 3.3: Time and phase plots for x = sin(2t), x = 2 cos(2t)

Certainly we are not surprised to see typical sin and cos curves for the x(t) and the x (t)
plots (the time plots). The x vs x plot (phase plot) is elliptical; it is traced out once on the
interval 0 t (the periods of both sin(2t) and 2 cos(2t) are equal to ), starting at the
point x = 0, x = 2, and moving in a clockwise direction. This corresponds to a mass-spring
system with no damping, released from the rest position with an initial velocity of 2 m
s . After
seconds, the mass returns to its original position, then repeats the process; solutions of
undamped mass-spring systems form ellipses in the phase plane. This is easily checked in this

particular case by noting that at any time t, (x(t))2 + ( x 2(t) )2 = (sin(2t))2 + (cos(2t))2 1;
2
therefore, the equation of the elliptical curve in the phase plot is x2 + x4 = 1.
The plots for the dierential equation (b) are in Figure 3.4. The time plots are sin
x(t) time plot

## x(t) time plot

1
x 0.5
0
0.5
1

x
5

10
t

15

20

phase plot
2

0
1

10
t

15

20

0.5

1
0
1

0.5
x

Figure 3.4: Time and phase plots for x = e0.1t sin(2t), x = e0.1t (2 cos(2t) 0.1 sin(2t))
and cos curves with exponentially decreasing amplitudes, corresponding to an under damped
mass-spring system. The phase plot consists of a clockwise spiral, starting at x = 0, x = 2,
and spiraling inward toward the origin; solutions of under damped mass-spring systems form
inward spirals in the phase plane. We will have much more to say about that in Chapter 5.
The plots for equation (c) are in Figure 3.5. The time plots indicate beats, with sin
and cos curves having amplitudes that increase, then decrease. The phase plot consists of
a curve that winds around the origin in the clockwise direction, moving in and out while
crossing over itself. This corresponds to an undamped, driven, mass-spring system, with
137

1.5
1
x
0.5

phase plot

2
x

0
0.5
1
1.5

10
t

15

20

2
x

1
0
1

10
t

15

20

1.5 1

1
0
1

0.5 x 1 1.5

## Figure 3.5: Time and phase plots for x =

25
36

sin(1.6t) 59 sin(2t), x =

10
9

cos(1.6t) 10
9 cos(2t)

driving frequency close to the natural frequency. Driven mass-spring systems form phase
plots with trajectories that can cross over themselves in the phase plane.
Comment: The cases in Example 3.8.1 are typical in the following sense. Phase plots are
most useful when studying autonomous equations (e.g. undriven mechanical systems); they
may be much less useful for studying nonautonomous equations (e.g. driven mechanical
systems). We will see why as we progress through this section.
To understand even more clearly the connection between the time and phase plots, notice
that we are, in eect, looking at three dierent views of a parametric curve in 3-dimensional
txx space.
3-dim. space curve

2
1.5

2
1.5
1
0.5
dx/dt 0
0.5
1
1.5

1.5

0.5
dx/dt

0.5

0.5

dx/dt

10
t

15

20

0.8
0.4
0 x
0.4
0.8

0
0.5

1.5

1
x0

1.5
0

10
t

15

20

0.8

0.4

## 0 0.2 0.4 0.6 0.8

x

0
10 t
20

Figure 3.6: Three views of the space curve (t, e0.1t sin(2t), e0.1t (2 cos(2t) 0.1 sin(2t)))
In Figure 3.6 a MAPLE-generated space curve for equation (b) in Example 3.8.1 is
shown
on the left. It is generated by plotting )the 3-dimensional parametric curve (t, x, x ) =
( 0.1t
t, e
sin(2t), e0.1t (2 cos(2t) 0.1 sin(2t)) , with t as parameter. If the coordinate axes
are rotated so only the t and x axes are visible (that is, the x axis is perpendicular to the
paper), we will see the x(t) time plot shown in Figure 3.4. Similarly, the other two plots in
Figure 3.4 are obtained by rotating the space curve so that the x axis disappears (the x (t)
time plot) or so that the t axis disappears (the xx phase plot). The middle and right views
in Figure 3.6 show how the space curve approaches the x (t) time plot and the phase plot,
respectively, as the axes are turned.
For nonlinear equations it is often the phase plot that is most accessible, and you should
learn to visualize how the x(t) graph will look, just from seeing the phase plot. The only
thing that can NOT be determined from the phase plot is the time at which things are
happening (for example, the time when maxima and minima occur). Remember that we
had the same problem when we used a phase line to draw the solution of an autonomous
rst-order equation.
138

Vector Fields, Direction Fields, and Phase Portraits for Autonomous Equations

Our aim is to show that, for autonomous second-order equations, the behavior of solutions in the phase plane can be determined (approximately) without being able to solve the
equation analytically; that is, without having an exact formula for the solution.
From calculus, we know that if the x and y coordinates of a parametric curve in the

xy-plane are given by x = f (t) and y = g(t), then the vector f (t0 ) i + g (t0 ) j is tangent
to the parametric curve at the point (f (t0 ), g(t0 )), and this vector points in the direction in
which the curve is being traced out. Such vectors are called tangent vectors. If the curve

represents the position of a particle, then the vector f (t) i + g (t) j is called the velocity
vector; its magnitude is the speed of the particle. In Figure 3.7, we show a parametric
curve (an inward spiral), along with a number of tangent vectors.

## Figure 3.7: Parametric curve with tangent vectors

We have seen that the solution x(t) to a second order dierential equation, and its
derivative x (t), can be used to form a parametric curve (x(t), x (t)) called a phase plot. For
many of the plots in this section we will need to put our second-order equations into system
form using x1 = x and x2 = x . Thus the parametric curve would become (x1 (t), x2 (t))

and the tangent vector at the point t = t0 would be given by x1 (t0 ) i + x2 (t0 ) j . For a

general rst-order system given by x1 = f (t, x1 , x2 ) and x2 = g(t, x1 , x2 ), the tangent vector

## becomes f (t0 , x1 (t0 ), x2 (t0 )) i + g(t0 , x1 (t0 ), x2 (t0 )) j .

System

Tangent Vector :

x1 = f (t, x1 , x2 ), x2 = g(t, x1 , x2 )

## f (t0 , x1 (t0 ), x2 (t0 )) i + g(t0 , x1 (t0 ), x2 (t0 )) j

This shows that if we know that a solution curve for a rst-order system of dierential
equations passes through the point (x1 (t0 ), x2 (t0 )) at the time t = t0 then we can nd the
tangent vector at that point, even if we have not yet solved that system (that is, even if
we do not have an explicit formula for the solution curve). Even more important, if the
system of equations is autonomous (the equation system is of the form x1 = f (x1 , x2 ) and
x2 = g(x1 , x2 ) with no explicit dependence on t), then we can nd the tangent vector for
139

any curve that passes through the point (x1 , x2 ) regardless of the time t at which it passes
through that point.
Note: In the case where the autonomous second-order equation x = F (t, x, x ) is converted
to the system x1 = x2 , x2 = F (t, x1 , x2 ) using x1 = x, x2 = x , then the formula for the

## F (t0 , x(t0 ), x (t0 )) j .

Denition 3.3 A vector eld for an autonomous system of rst-order dierential equations given by x1 = f (x1 , x2 ) and x2 = g(x1 , x2 ) is an array of vectors in the phase plane,

where the vector at the point (x1 , x2 ) is given by f (x1 , x2 ) i + g(x1 , x2 ) j . For the au

## tonomous second-order equation x = F (x, x ), the vector eld is given by x i + F (x, x ) j .

When working with dierential equations, it is often the case that we are not interested
in the length of the vectors in the vector eld, but rather just the direction. If we make all
of the vectors in the vector eld have the same length, then the vector eld turns into a
direction eld.
Denition 3.4 A direction eld for an autonomous system of rst-order dierential
equations given by x1 = f (x1 , x2 ) and x2 = g(x1 , x2 ) is an array of vectors, at some selected
grid of points, where the direction of the vector at the point (x1 , x2 ) is given by the direc

tion of f (x1 , x2 ) i + g(x1 , x2 ) j , and where the length of each vector is chosen to make the
graph easy to read (most vectors will be shortened so that they do not overlap other vectors).
For the autonomous second-order equation x = F (x, x ), the direction eld is given by the

direction of x i + F (x, x ) j .
Note: A vector located at the point (x, x ) can be plotted so that either the base of the
vector or the midpoint of the vector is placed at the grid point (x, x ). Maple and the TI-89
calculator, for example, place the midpoints of the vectors at the grid points; in the example
below we use the base points.
Example 3.8.2 For the autonomous second-order equation x + 2x + 2x = 0, create both
a vector eld, and a direction eld in the region 1 x 1, 1 x 1 of the phase
plane. Use a 3 by 3 array of vectors (for the grid of points, use the ordered pairs with integer
values).
We have x = 2x 2x so that F (x, x ) = 2x 2x . The corresponding rst-order
system using x1 = x and x2 = x would be x1 = x2 , x2 = 2x1 2x2 . Thus the vector

## whose base is at the point (x1 , x2 ) would be given by x i + (2x 2x ) j . We calculate

the vectors at the integer ordered pairs and put the results into Table 3.1 (for example when

## x = 0 and x = 1 we get 1 i + (2 0 2 (1)) j = i + 2 j ).

The graph of the vector eld and its associated direction eld is given in Figure 3.8. It
should be apparent that the direction eld is much easier to interpret than the vector eld.
A given solution curve (x1 , x2 ) = (x, x ) will follow the arrows in the direction
eld, in this case circling the origin in a clockwise direction.

140

1
0
1

2j

i +4j
1

i 2j

i +2j
0
x

i 4j

2 j

i
1

vector field
3
2
y
1
2

1 1
2
3

direction field
1
y 0.5
1
y

0.5
0.5

0.5
y

## Figure 3.8: A vector eld with associated direction eld

In practice, it is too tedious to sketch a complete direction eld by hand; one usually
needs at least a 10 by 10 grid of vectors to get a good picture. Furthermore, software programs and calculators that create direction elds also plot solution curves (using a numerical
method such as Euler or Runge-Kutta) when initial conditions are given. A direction eld,
along with a sucient number of solution curves, is called a phase portrait. The number
of solution curves needed to generate a complete picture of the behavior of a dierential
equation will vary depending on the nature of the equation. In particular, one needs more
solution curves in regions where the behavior is more complex.
When using software to create phase portraits, numerical methods are generally used
to generate the solution curves. Thus the type of numerical method and the step size can
aect how the phase portrait looks. Generally you should use a fourth-order (or higher)
numerical method (such as Runge-Kutta), and you need to make sure that your step size is
suciently small.
For many software programs and graphing calculators, in order to generate a direction
eld we must rst rewrite our autonomous second-order dierential equation x = F (x, x )
as a system of rst-order equations.
Example 3.8.3 Use a computer program or a calculator to construct a phase portrait of
the dierential equation x + 2x + 2x = 0 (the same equation as in Example 3.8.2) in the
region 10 x 10, 10 x 10. In addition, create phase and time plots for the
particular solution curve with initial conditions x = 9 and x = 4 in the region given above,
and for 0 t 10.
First we rewrite x + 2x + 2x = 0 as a rst order system. Since x = 2x 2x we
have F (t, x, x ) = 2x 2x , and so using y1 = x and y2 = x we get the system y1 = y2 ,
y2 = 2y1 2y2 (we have used y1 and y2 this time because those are the vaviables used by
the TI-89). A computer-drawn phase portrait of this system is shown in Figure 3.9.
Notice that in addition to the direction eld, we have included 8 solution curves, which
are dened by their initial conditions. These initial conditions were carefully chosen in
141

phase portrait
10
y2

10

5
y1

10

10

## Figure 3.9: Direction eld + solution curves = phase portrait

order to ll out the phase portrait; that is, to illustrate the behavior of this equation
for any starting point in the given region. The range of t values for a phase portrait is
somewhat arbitrary, and depends on how fast solutions are tending to their limiting values.
Here we chose 0 t 5 after some experimentation. We see from the phase portrait that
all solution curves, regardless of the starting point, spiral inward toward the origin in a
clockwise direction. This is consistent with our mini direction eld in Example 3.8.2.
Next we plot the single solution curve corresponding to the initial conditions x = 9 and
x = 4 (and hence y1 = 9 and y2 = 4) in the phase plane, and the x versus t and x versus
t planes (the time plots). The resulting plots are in Figure 3.10. Check to see if you can
visualize what the graph of x(t) looks like just by looking at the solution in the phase plane.
phase plane
10

10

0
5

10

x

5
x

10

10

10
x

5
0

4 t 6

10

5
0

10

10

4 t 6

10

## Figure 3.10: Three views of a solution curve

The reason that we dene direction elds only for autonomous second-order equations
and systems of rst-order equations is that if the independent variable t appeared explicitly

## g(t, x1 , x2 ) j would also depend on t. If we take t to represent time, as it does in many

applications of second-order equations, the arrows in the vector eld would not keep still as
time progressed; they would be always changing direction.
Because the direction vectors do in fact keep still for an autonomous second-order equation, we can use the following Existence and Uniqueness Theorem to arrive at an important
142

## result: for well-behaved autonomous second-order dierential equations, distinct solutions

curves do not cross each other in the phase plane.
Theorem 3.5 Existence and Uniqueness Theorem for autonomous second-order
dierential equations: Assume given an IVP of the form x = F (x, x ), x(t0 ) =
F
x0 , x (t0 ) = x0 . Assume the functions F, F
x , and x are all continuous in some rect
angle R = {a < x < b, c < x < d} in the phase plane. If the point (x0 , x0 ) is in R, then
there exists a unique solution of the IVP which is continuous for all t in some (possibly
very small) interval around t = t0 .
If the function F and its derivatives are continuous everywhere in the phase plane,
each solution curve for an autonomous equation becomes a kind of fence. Solutions cannot
intersect, because if they did, the point of intersection would be an initial point with more
than one solution through it, and this would contradict the conclusion of the Existence and
Uniqueness Theorem. By lling out the phase plane with a sucient number of solution
curves (with carefully chosen initial conditions) one gets a map of the dierential equation,
which shows how the solution through any given initial point will move and where it will
end up.
It is important to understand that these ideas do not apply to the time plots, even if
the equation is autonomous. In Figure 3.11 we show the phase portrait from Example 3.8.3
along with time plots where the same set of initial conditions is used in the time plots as
in the phase portrait. One can see that distinct solution curves can indeed cross over each
phase portrait
10
x
10

x(t) plot
x

0
5

5
x

10

x(t) plot

10

10

10
x

5
0
5

t 3

10

5
0
5

t 3

10

## Figure 3.11: Time and phase plots for Example 3.8.3

other in the time plots.
Nonlinear Equations and Fixed Points
The real power of phase portraits comes into play when one moves from linear secondorder dierential equations to nonlinear ones. Because nonlinear equations are, in general,
much harder to solve than linear ones, qualitative methods such as the phase portrait, and
numerical methods such as Runge-Kutta are often the only means of obtaining information
For linear homogeneous second-order equations, the origin (0, 0) in the phase plane is
called a xed point. This is because the (unique) solution to ax + bx + cx = 0 subject to
x(0) = 0 and x (0) = 0 is x(t) 0 (show this). Thus if you start at the origin, you stay
there forever.
In general, a point (x1 , x2 ) in the phase plane of an autonomous rst-order system of
dierential equations x1 = f (x1 , x2 ) and x2 = g(x1 , x2 ) will be xed if the derivatives of both
143

components x1 and x2 of a solution curve are zero at that point; that is, the tangent vector

x1 i + x2 j at the point is the zero vector. Thus to be xed we require that f (x1 , x2 ) = 0
and simultaneously g(x1 , x2 ) = 0. This leads to the following denition.
Denition 3.5 A xed point (also called an equilibrium point or critical point) of an
autonomous rst-order system of equations x1 = f (x1 , x2 ), x2 = g(x1 , x2 ) is a point (x1 , x2 )
for which f (x1 , x2 ) = 0 and g(x1 , x2 ) = 0.
Note: For an autonomous second-order equation x = F (x, x ) the above denition becomes the condition that a xed point (x, x ) must satisfy both x = 0 and F (x, x ) = 0. In
terms of a mass-spring system this says that the mass is stationary (x = 0) and that there
are no forces acting on it (F (x, x ) = 0).
For the linear homogeneous constant coecient equation ax + bx + cx = 0, with c = 0,
the origin is the only xed point. For nonlinear equations, there can be multiple xed points
(and the origin is not necessarily one of them).
Fixed points play a key role in the phase portraits of nonlinear second-order equations.
We will study xed points in much more detail in Chapters 4 and 5 when we study systems
of equations in general. For now, we will be content to nd the xed points of a given
autonomous equation, and to describe what the solution curves look like near the xed
points by looking at phase portraits. In particular, pay attention to whether most solution
curves that pass close to a given xed point seem to be ultimately moving towards that
xed point (these are called stable xed points), or away from it (these are called unstable
xed points).
2

## Example 3.8.4 The dierential equation ddt2 +c d

dt +k sin() = 0 is used to model the motion
of a damped, rigid pendulum, where measures the angle (in radians) that the pendulum
makes with a vertical line (Figure 3.12). As with a mass-spring system, c is the damping

## Figure 3.12: Pendulum

(friction) coecient, and k takes into account the mass and length of the pendulum. Create
a phase portrait for the pendulum equation in the region 8 8, 5 5, using
c = 0.5 and k = 1. Also, nd the xed points in this region, and describe the behavior of the
pendulum, especially in the vicinity of the xed points, based on the phase portrait.
We rst write the dierential equation in the form = F (, ); we have = sin()
0.5 . Letting y1 = , and y2 = , we get the system of equations
y1
y2

= y2
= sin(y1 ) 0.5y2
144

(3.43)
(3.44)

By carefully choosing the initial conditions we obtain the phase portrait in Figure 3.13.
You should try to reproduce this phase portrait using your own software or calculator by
pendulum phase portrait
4
theta prime
2

4
theta

2
4

## Figure 3.13: + 0.5 + sin = 0

estimating the initial conditions from the graph in Figure 3.13. In order to nd the xed
points, we take the right-hand sides of Equations 3.43 and 3.44 and set them both equal to
zero
y2

sin(y1 ) 0.5y2

0.

Solving simultaneously we get y2 = 0 and sin(y1 ) = 0. In terms of the original variables this
becomes
= 0 and sin() = 0.
The solutions are the zeros of the sine function, that is = n, where n can be zero
or any positive or negative integer. Therefore, the xed points are (n, 0) for any n. The
only xed points that lie in the region 8 8, 5 5 are (2, 0), (, 0), (0, 0),
(, 0), and (2, 0).
We rst look at the xed points (2, 0), (0, 0), (2, 0). Solution curves that come close
to any of these points, circle around the xed point in a clockwise direction, approaching
closer and closer to the xed point as t (an inward spiral). These xed points are
stable. When we study systems of equations in detail, we will call this type of stable xed
point a spiral sink. In terms of the pendulum itself, these points represent possible resting
points for the pendulum, which occur at the bottom of the pendulums swing. For example,
if the pendulum goes through the top of its swing one time and then eventually comes to
rest at the bottom of its swing (after swinging back and forth for a while), then it stops at
the xed point (2, 0). If you were then to displace the pendulum a small amount, it would
return again to that xed point; this is why we call these stable xed points.
Next, consider the xed points (, 0) and (, 0). Solution curves that approach close to
either of these xed points rst approach the xed point from one direction, then curve and
move away from it in a dierent direction. These xed points are unstable. We will call this
type of unstable xed point a saddle point. In terms of the pendulum, these points represent
the top of the pendulums swing. Theoretically, since this is a rigid pendulum, it can come
145

to rest at the top of its swing. However, any tiny disturbance would put the pendulum in
motion, which is why we refer to these xed points as unstable.
pendulum phase plot
4
theta prime
2

4
theta

2
4

## Figure 3.14: Pendulum going over the top

We illustrate these ideas in Figure 3.14 which shows the solution curve in the phase plane
for a pendulum which almost comes to rest at the top of its swing at the point (, 0), but
has just enough energy to get over the top, and ends up oscillating about, and ultimately
approaching, the rest position at (2, 0).

146

Exercises 3.8
For problems 1-4, solve each initial value problem, and display the exact solution in the
phase plane and also as x(t) and x (t) time plots. Use 0 t 5, and choose appropriate
intervals for x and x . Give an interpretation of each equation and its solution as a massspring system.
1. x + 7x + 12x = 0, x(0) = 0, x (0) = 10 .
2. x + 7x + 12x = 3 cos 3t, x(0) = 0, x (0) = 10 .
3. x + 2x + 17x = 0, x(0) = 5, x (0) = 0 .
4. x + 2x + 17x = 20 sin 10t,

x(0) = 5, x (0) = 0 .

For problems 5-8, redo problems 1-4, but this time generate the plots (phase plot and
two time plots) using a numerical method as in Example 3.8.3 (do not create an entire
phase portrait, just the plots for the one solution curve corresponding to the IVP).
State which numerical method you are using, and any other relevant settings such as
step size or error tolerance. Use whatever technology you have available, or you can
use the applet for graphing and calculating numerical solutions for systems of equations
at uhaweb.hartford.edu/rdecker/MathletToolkit/SystemsBook.htm.
5. Use the IVP from problem 1.
6. Use the IVP from problem 2.
7. Use the IVP from problem 3.
8. Use the IVP from problem 4.
For problems 9-12, sketch a direction eld for each autonomous second-order dierential equation by hand, using a 3 by 3 array of vectors in the region 1 x 1,
1 x 1 as in Example 3.8.2.
9. Use the DE from problem 1.
10. Use the DE from problem 3.
11. x 5x + 6x = 0.
12. x + x 6x = 0.
For problems 13-16 create a phase portrait for the given linear autonomous equation
in the region 5 x 5, 20 x 20. It should include a direction eld and
enough well-chosen solution curves to give a complete picture of the equation on the
specied region. From the picture, determine whether the xed point at the origin is
stable or unstable. Use whatever technology you have available, or you can use the
applet for graphing and calculating numerical solutions for systems of equations at
uhaweb.hartford.edu/rdecker/MathletToolkit/SystemsBook.htm.
13. Use the DE from problem 1.
14. Use the DE from problem 3.
147

15. x 5x + 6x = 0.
16. x + x 6x = 0.

For problems 17-18 create a phase portrait for the given nonlinear autonomous equation
in the given region. Also nd any xed points that occur in that region. Your phase portrait should include a direction eld and enough well-chosen solution curves to give a
complete picture of the equation on the specied region, especially near the xed points.
From the picture, determine which xed points are stable and which are unstable. Use
whatever technology you have available, or you can use the applet for graphing and calculating numerical solutions for systems of equations at uhaweb.hartford.edu/rdecker/MathletToolk
17. y + 2y 17(4 y y 3 ) = 0 on 5 y 5, 20 y 20 (this equation can be used
as a model of a mass-spring system with a repelling force at the origin - explain why,
using your phase portrait).
18.

d2
dt2

+ 2 d
dt + sin = 0 on 7 7, 1 1 (note that this is the pendulum equation from Example 3.8.4 - relate the behavior of the pendulum to your phase
portrait).

148

Chapter 4

## Linear Systems of First-order

Dierential Equations
In the previous chapters we have seen examples of real-world problems which result in models
with not just one dierential equation, but rather with two or more related dierential
equations. For example, the interaction of two biological populations x and y which are
competing for a common resource, and growing logistically, can be modelled by the following
system of two equations:
x
y

## = x(a bx) cxy

= y(d ey) f xy;

and we will look carefully at this system in a later section. A mixing problem with two or
more dierent compartments can also lead to a system of two or more related dierential
equations; one for the amount of pollutant in each of the compartments. We also saw in
Chapter 3 that second-order dierential equations can be written as a system of two related
rst-order equations in x and x .
We will show in this chapter that almost any model involving ordinary dierential equations, no matter how complicated, can be expressed as a system of rst-order dierential
equations. There are two important reasons for writing the model in this form. One is
that many of the numerical dierential equation solvers, programmed for computers or calculators, require the equations to be in this form. Secondly, it will be shown that if the
rst-order system is linear then it can be written as a matrix equation, and powerful results
from Linear Algebra can be used to solve it. In the case of a linear system with constant
coecients, this will provide us with an analytic solution. Even more importantly, it will
greatly add to our understanding of the geometry of phase planes for nonlinear systems.
In the next chapter you will be shown how to apply these techniques to real world
problems in several dierent elds of science.

4.1

Introduction to systems

## The most general system of rst-order dierential equations in n unknown functions

x1 (t), x2 (t), ..., xn (t) can be written in the form
149

dx1 /dt = f1 (t, x1 , x2 , ...xn )

..

(4.1)

## where f1 , f2 , ..., fn are arbitrary functions of t, x1 , x2 , ..., xn .

Any nth-order dierential equation in x(t) can be expressed in the form of a system (4.1)
by dening new variables for x(t) and its derivatives up to order n 1. The technique for
doing this is demonstrated in the example below.
Example 4.1.1 Write the third-order equation x + 4x + 3x = t2 + 1 as a system of three
rst-order equations.
Dene new dependent variables
system

x1 (t) =
x (t) =
2
x3 (t) =

## x1 (t) x(t), x2 (t) x (t) and x3 (t) x (t). Then the

x2 (t)
x3 (t)
3x1 (t) 4x2 (t) + t2 + 1

is a rst-order system which has exactly the same set of solutions as the single third-order
equation; that is, x1 (t) will be the solution x(t), and x2 and x3 will be its derivatives.
Note that we needed to dene three variables x1 , x2 and x3 , since the equation was of
order 3. The derivatives of x1 and x2 are x2 and x3 by denition, and the derivative of x3
d
is dt
(x (t)) x (t). A formula for x in terms of t, x, x , and x can always be obtained
from the original third-order equation.
Systems of simultaneous higher-order dierential equations can also be written as a
rst-order system. The method for doing this is demonstrated in the next example.
Example 4.1.2 Write a system of rst-order dierential equations which is equivalent to
the simultaneous equations: x (t) = y(t) sin(2t), y (t) = x(t) + (y(t))2 .
In this case, it is necessary to dene four new variables: x1 (t) x(t), x2 (t) x (t), x3 (t)
y(t) and x4 (t) y (t), since the equations in x and y are both of second order. Then the
equivalent system can be written in the form:

x = x2
f1 (t, x1 , x2 , x3 , x4 )

1
x2 = x3 sin(2t) f2 (t, x1 , x2 , x3 , x4 )
f3 (t, x1 , x2 , x3 , x4 )
x3 = x4

x4 = x1 + (x3 )2 f4 (t, x1 , x2 , x3 , x4 )
Make sure that you see exactly how the above system was constructed!
As an application, our third example shows how to extend our method for solving the
single-compartment mixing problem, described in Section 2.8, to problems involving more
than one compartment.

150

## Example 4.1.3 A two-compartment mixing problem is shown in the gure below.

A tank (A) is connected to a tank (B) as shown below. Pure water is owing into Tank A at
a rate of 2 gallons/minute. Tank A is initially lled with 50 gallons of water with 5 pounds
of salt dissolved in it. Tank B contains 40 gallons of water with 1 pound of salt dissolved in
it. Solution ows from Tank A to Tank B at 3 gallons/minute and from Tank B to Tank
A (in a separate pipe) at 1 gallon/minute. Thoroughly mixed solution is also being drained
from Tank B at 2 gallons/minute. Let x(t) be the amount of salt in Tank A, and y(t) the
amount of salt in Tank B, at time t. Using rate in - rate out for the rate of change of salt
in each tank (see Section 2.8), write a system of dierential equations for x and y.

2gal/min 0lb/gal

Tank A

Tank B

x(0)=5lb

y(0)=1lb
3gal/min
-

Vol=50gal

1gal/min


Vol=40gal
- 2gal/min
y(t)
40 lb/gal

## The rate equation for Tank A is

dx/dt = rate in - rate out = [2 0 + 1

y(t)
x(t)
] [3
].
40
50

Remember that dx/dt is in pounds per minute. Similarly, the equation for Tank B is
dy/dt = [3

x(t)
y(t)
y(t)
] [1
+2
].
50
40
40

## This leads to the system of equations:

{
x (t) =
y (t) =

3
1
50
x(t) + 40
y(t)
3
3
x(t)

y(t).
50
40

In Section 4.4 you will be shown how to solve this system analytically.

Denition 4.1 If each of the functions fi (t, x1 , x2 , ..., xn ), i = 1, .., n in (4.1) is linear in
the dependent variables xi , that is
fi (t, x1 , ..., xn ) = ai1 x1 + ai2 x2 + ... + ain xn + bi
where aij and bi are arbitrary functions of t, then (4.1) is called a linear system. The
most general n-dimensional linear system of rst-order dierential equations has
the form

x1 = a11 x1 + a12 x2 + ... + a1n xn + b1

## x2 = a21 x1 + a22 x2 + ... + a2n xn + b2

(4.2)
..

xn = an1 x1 + an2 x2 + ... + ann xn + bn
151

If all bi (t) 0, the system is called a homogeneous linear system. The number n of
equations is referred to as the dimension of the system.
The mixing problem in Example 4.1.3 resulted in a homogeneous linear system of dimension 2. It would not be homogeneous if there was any salt in the water being pumped into
Tank A. Do you see why? The system in Example 4.1.1 is linear, but not homogeneous. In
Example 4.1.2 the system is nonlinear because of the term (x3 )2 in the fourth equation. In
the next section it will be shown that any linear system can be expressed, in a very compact
form, in matrix notation.
Exercises 4.1 For each equation or set of equations below, write an equivalent rst-order
system in the form given by (4.1). Determine the dimension of the system and state whether
or not it is linear.
1. x + 5x + 2x = sin(t)
2. x + 2tx + x = 0
3. x + 4x + 3x = 2 + t
4. x(4) = x(x )2 tx
5. x = y, y = x
6. x = x + y, y = 5x
7. x = xy, y = x + y + y 2
8. x = x + z, y = xy, z = y + x + 2z
9. 2y x = x + 3y, x y = 2x 5y
Hint: First solve the two equations for x and y .
10. Write equations for the mixing problem in Example (4.1.3) if the water entering Tank
A contains half a pound of salt per gallon.
11. Write equations for the mixing problem in Example (4.1.3) if the ow rate from Tank
A into Tank B is changed to 2gal/min. The volumes in the two tanks will both be
functions of time.

152

4.2

Matrix Algebra

If you have taken a course in Linear Algebra, this section will be a review. Otherwise, it is
really important at this point that you learn how to work with matrices; in particular, you
need to know how to perform the algebraic operations of addition, scalar multiplication and
matrix multiplication.
Denition 4.2 A matrix A is a rectangular array containing elements arranged in m
rows and n columns. When working with dierential equations it can be assumed that these
elements are either numbers or functions. The notation we will use for a matrix is

## a11 a12 . . . a1n

a21 a22 . . . a2n

A=
.
..

.
am1

am2

...

amn

A matrix with m rows and n columns, for some positive integers m and n, is said to be
of size m by n (written as m n). In the above notation, aij represents the element in the
ith row and jth column of A. It will sometimes be convenient to use the notation A = (aij )
which shows the form of the general element in A.
An m n matrix with n = 1 has a single column, and is also called a column vector;
similarly, an m n matrix with m = 1 is called a row vector. An m n matrix with
m = n is called a square matrix of size n. The zero matrix, of any size, denoted by 0,
is a matrix with the elements in every row and every column equal to 0.
Denition 4.3 Two matrices A = (aij ) and B = (bij ) are said to be equal if they are of
the same size m n, and aij = bij for 1 i m, 1 j n.
The following three basic algebraic operations are dened for matrices: addition, scalar
multiplication, and matrix multiplication.
Addition of Matrices: If A = (aij ) and B = (bij ) are both the same size, say m n, then
their sum C = A + B is dened, and C = (cij ) with cij = aij + bij for 1 i m, 1 j n.
Example:
(
) (
) (
) (
)
4 6
2 2
4 + 2 6 + 2
6 4
+
=
=
.
3 1
0 3
3+0 13
3 2
Addition of matrices is commutative and associative; that is, if A, B, and C are all of
the same size, then A+B = B+A and A+(B+C) = (A+B)+C. The zero matrix acts as
an identity for matrix addition; that is, if A is any m n matrix, then A + 0 = 0 + A = A,
where 0 is the zero matrix of size m n.
Scalar Multiplication: For any matrix A = (aij ), the scalar multiple of A by a scalar k
(which can be either a number or a function) is the matrix kA = (kaij ).
Examples:
(
) (
(
)
) ( rt
)
1 2 3
2 4 6
1 2t
e
2tert
2
=
,
ert
=
.
4 5 6
8 10 12
t2 0
t2 ert
0
153

## Multiplication of Matrices: If A = (aij ) is an mn matrix and B = (bij ) is an np matrix,

then the product C = AB is dened. The i, j element of C is
cij =

aik bkj ,

k=1

and C has size m p. Note that the number of columns of A has to be the same as the
number of rows of B.
Example:
(
)(
) (
) (
)
4 6
2 2
8+0
8 + 18
8 26
=
=
.
3 1
0 3
6 + 0 6 + (3)
6 3
It is easier to remember how to multiply two matrices if you rst recall (from Physics
or Multivariable Calculus) the denition of the dot product of two vectors. Let a =
(a1 , a2 , ..., an ) and b = (b1 , b2 , ..., bn ) be arbitrary vectors, both of length n. Then their
dot product is dened by
a b = a1 b1 + a2 b2 + ... + an bn .
The i, j element in the matrix product AB is the dot product of the ith row of A and the
jth column of B.

R1
1 2 3
0 1
(
)
2 , B = 2 1 C1 C2
Example: Let A = 0 1 2 R
3
2 4 1
3 4
R

where R1 , R2 , and R3 are the three rows of A and C1 and C2 are the two columns of B.
The product AB of the 3 3 matrix A times the 3 2 matrix B is dened and will be of
size 3 2. Computing the product consists of computing six dot products, as shown below.

(
) (
1 C
1
R

AB = R2 C1
3 C
1
R

1 C
2
R

R2 C2 =
3 C
2
R

0+22+33
0 + 1 2 + (2) 3
0+42+13

1 1 + 2 1 + 3 4
0 + 1 1 + (2) 4
2 1 + 4 1 + 1 4

13
4
11

13
7
10

Note that the required condition for multiplication, that the number of columns in A is
the same as the number of rows in B, guarantees that these dot products are dened.

## Properties of addition, and scalar and matrix multiplication:

Whenever the dimensions are such that the following operations are dened, then
A(B + C) = AB + AC
(A + B)C = AC + BC
k(AB) = (kA)B = A(kB)
ABC = (AB)C = A(BC)
Note:
AB = BA in general
154

)
.

There is a simple relation between the three algebraic operations which will be used in
a later section. If A = (aij ) is any m n matrix and X = (xi ) is an n 1 matrix (i.e. a
column vector), then

## a11 x1 + a12 x2 + ... + a1n xn

a11
a1n
a21 x1 + a22 x2 + ... + a2n xn
a21
a2n

x1 . + ... + xn . ; (4.3)
AX =

.
.
.
.

.
.
.
am1 x1 + am2 x2 + ... + amn xn

am1

amn

that is, the matrix product AX can be written as a linear combination of the columns of
A, scalar multiplied by the corresponding entries in the vector X.
The following denition will be needed when we apply matrix methods to solve dierential equations.
Denition 4.4 Given a set of K row or column vectors X1 , X2 , ..., XK , all of the same
dimension, the set is said to be linearly independent if the only linear combination c1 X1 +
c2 X2 +...+cK XK which equals the 0 vector has coecients c1 = c2 = ... = cK = 0. If the set
is not linearly independent it is called a linearly dependent set of vectors. (This denition
should remind you of the denition of linearly independent functions given in Chapter 3).

Example 4.2.1 Show that the set of vectors {(1, 0, 0), (0, 1, 0), (0, 0, 1)} is linearly independent and that the set {(1, 2, 5), (2, 4, 10)} is linearly dependent.
If we set c1 (1, 0, 0) + c2 (0, 1, 0) + c3 (0, 0, 1) = (0, 0, 0), the left side simplies to a single
1 3 row vector (c1 , c2 , c3 ), and using our denition of equality of matrices, it will be equal
to the right side if, and only if, c1 = 0, c2 = 0, and c3 = 0.
For the second set, there is a linear combination 2(1, 2, 5)+1(2, 4, 10) with non-zero
coecients which is equal to the 3 1 zero vector; therefore, the set is linearly dependent.
Note that in the case of two non-zero n-dimensional vectors U and V, U and V are
linearly dependent if and only if they are scalar multiples of each other.
Denition 4.5 If a matrix A has elements which are functions of t, say A = (aij (t)), then
the derivative of A is dened to be the matrix
d
A(t) A (t) = (aij (t)).
dt
(
Example: If A(t) =

t3
e2t
1/t sin(t)

(
then A (t) =

3t2
1/t2

2e2t
cos(t)

)
.

In our work with systems of dierential equations we will usually be dealing with square
matrices of some dimension n. For n n matrices there are some added denitions.

155

## a11 a12 . . . a1n

a21 a22 . . . a2n

A=
..

.
an1 an2 . . . ann

is the diagonal going from top left to lower right, containing the elements a11 , a22 , ..., ann .
For n n matrices there is an identity for matrix multiplication.
Denition 4.7 The n n matrix I = (ij ), with ij = 1 if i = j and ij = 0 if i = j is
called the n-dimensional identity matrix. It satises the condition: IA = AI = A for any
n n matrix A. Note that an identity matrix has ones along the main diagonal and zeros
everywhere else.

## Example 4.2.2 With n = 2, show that IA = A for an arbitrary 2 2 matrix A.

(
IA =

1
0

0
1

)(

a b
c d

(
=

1a + 0c 1b + 0d
0a + 1c 0b + 1d

(
=

a b
c d

)
= A.

Check that multiplying A and I in the opposite order also produces the matrix A.
There are two important functions, called the trace and the determinant, which are
dened only for square matrices.
Denition 4.8 If A = (aij ) is any n n matrix, the trace of A, denoted by tr(A), is
dened by
tr(A) = a11 + a22 + ... + ann ;
that is, the trace of a matrix is the sum of the elements on its main diagonal.

Denition 4.9 The determinant of a square matrix A is denoted by det(A) and is dened for a 2 2 matrix by
(
)
a b
det
c d
This simple way of calculating the determinant does NOT work for matrices of dimension greater than 2. For an n n matrix with n > 2 the determinant can be found using
the Method of Cofactors, which is contained in Appendix C. The denition of the determinant of a square matrix may seem unduly complicated; however, the determinant of A
is simply the quantity which appears in the denominator when solving n linear equations
in n unknowns, with coecient matrix A. Whether the determinant is nonzero or zero
determines whether or not the system of equations has a unique solution for any choice of
the right-hand sides. This will be stated formally in Theorem 4.1 in the next section.
156

With the above denitions, it is now possible to write any linear system
dierential equations (4.2) in matrix form. Consider the matrix equation

x1 (t)
a11 (t) a12 (t) . . . a1n (t)
x1 (t)
b1 (t)
x2 (t)
a21 (t) a22 (t) . . . a2n (t) x2 (t) b2 (t)

.. =
.. + ..
..
.

. .
.
xn (t)

an1 (t)

an2 (t)

...

ann (t)

xn (t)

of rst-order

(4.4)

bn (t)

Using denition
4.5,

the left-hand side of this equation is the n 1 matrix (think column
x1 (t)
x2 (t)

vector) . . If the indicated matrix multiplication and addition are carried out on
..
xn (t)
the right-hand side it becomes the n 1 matrix (column vector)

## a11 x1 (t) + a12 x2 (t) + ... + a1n xn (t) + b1 (t)

a21 x1 (t) + a22 x2 (t) + ... + a2n xn (t) + b2 (t)

;
..

.
an1 x1 (t) + an2 x2 (t) + ... + ann xn (t) + bn (t)
therefore, using the denition of equality of matrices, setting the right-hand side of (4.4)
equal to the left-hand side is exactly equivalent to stating the n equations in the system
(4.2). If we dene the three matrices

x1 (t)
b1 (t)
a11 (t) a12 (t) . . . a1n (t)
x2 (t)
b2 (t)
a21 (t) a22 (t) . . . a2n (t)

=
X
.. , b = .. , and A =
,
..
.
.

.
xn (t)

bn (t)

an1 (t)

an2 (t)

...

ann (t)

then the system (4.4) can be written very compactly in matrix form as
= AX
+ b.
X

Note. In the remainder of the book, we will be using matrix methods to solve systems
of linear dierential equations. For clarity we will use the following notation:
Bold face capital letters, such as A, B,..., will be used to denote square matrices.
and b will be used to denote
Bold face letters, with an arrow above them, such as X
column vectors (that is, n 1 matrices).
Example 4.2.3 Write the third-order equation x + 4x + 3x = t2 + 1 in matrix form.
It was shown in example 4.1.1 that this equation is equivalent to the system

x1 = x2
x = x3
.
2
x3 = 3x1 4x2 + t2 + 1
157

## Check carefully that this system is equivalent to the matrix equation

0
1 0
x1
0
x1
x2 = 0
,
0 1 x2 +
0
x3
x3
3 4 0
t2 + 1

which
can be

x1
x2 , the
x3
0
b =
0
t2 + 1

= AX
+ b, if we
shortened to X

0
1
0
coecient matrix A = 0
3
4

(4.5)

dene
the vector of unknowns X =
0
1 , and the right-hand side vector
0

Exercises
matrices
( 4.2 Given
) the following
(
)
(
2 1
1 2
0
1
A=
,B=
,C=
3 4
1 3
3 4

2
1

)
(
0
,D=
3

1
4

)
;

## Compute each expression 1 - 6 below, if it is dened; otherwise state why it is not

dened.
1. A + B
2. 2A + (3)B
3. C(A + B)
4. (A + B)C
5. ABC
6. A 2I
7. Show that AB = BA.
8. Find the trace and determinant of the matrix A.
9. Find the trace and determinant of the matrix B.
10. If A is an n n matrix and AQ = QA = I for some n n matrix Q, then
Q is called

a b
the multiplicative inverse of A, and is denoted by A1 . Show that if A = c d

## is any 2 2 matrix with non-zero determinant, then A1

d b
= det1 A c a ; that

is, show that both AA1 and A1 A are equal to the 2 2 identity matrix.
Note: if det A = 0, the inverse of A is not dened.
158

11. Use the formula from Exercise 10 to nd inverses of the matrices A, B, and D given
above. In each case, check that the product of the matrix and its inverse is the identity
matrix.
The inverse matrix can be used to solve a system of linear equations Ax = b. If
det A = 0, then x = Ix = (A1 A)x = A1 (Ax) = A1 b; that is, the solution of the
system is the vector x = A1 b. Use this procedure to do problems 12 and 13. You
will have to write the system in matrix form rst.
12. Solve the system
2x + y

= 6

3x + 4y

= 9

x + 2y
x + 3y

= 0
= 5

## 13. Solve the system

Convert each of the linear equations below to a rst-order system and write the system
in matrix form (as in Example 4.2.3):
14. x + 12x + 27x = 0
15. 2x + 4x + 5x = e2t
16. x + 4x = 0
17. x(IV ) + 2x 3x + x x = 0

159

4.3

## Eigenvalues and Eigenvectors

In this section we will examine an analytic method for nding solutions of a homogeneous
linear system
= AX

(4.6)

## with constant coecient matrix A.

As an example, consider the 2-dimensional system
(
)
2 0
=

X
X
(4.7)
1 3
(
)
x1

where X
.
x2
We know that solving this system is equivalent to solving the two simultaneous rst-order
equations
{
x1 = 2x1
.
x2 = x1 + 3x2
The rst equation above is independent of x2 , and our method for separable rst-order
equations can be used to show that the general solution is x1 (t) = Ce2t (Check it). If this
value for x1 is substituted into the second equation, it becomes
x2 = 3x2 + Ce2t ,
which is a linear rst-order equation with general solution x2 (t) = Ce2t + De3t . (Check
it).
The general solution of the system (4.7) can then be written in vector form as
(
) (
)
(
)
( )
x1 (t)
Ce2t
1
0
2t
3t

X(t)
=
Ce
+ De
,
x2 (t)
Ce2t + De3t
1
1
= AX
will be linear combinations of terms of
which suggests that (vector) solutions of X
rt

## the form e U, where U is a constant n-dimensional column vector and r is a scalar.

and substitute X
and its derivative
To see if this assumption is correct, let X(t)
= ert U
into (4.6). Using the properties of scalar multiplication and dierentiation of matrices
= ert U,
is
dened in the previous section, the left-hand side of equation (4.6), with X
rt
rt

e u1
re u1
rt
rt

e
u
2
d rt
d
re u2

X (t) (e U) =

=
= rert U.
..
..
dt
dt

.
.
ert un
rert un
Using the properties for matrix and scalar multiplication, the right-hand side of (4.6) can
be written as
= ert AU.

= A(ert U)
AX
To make the two sides equal we need
= ert AU;

rert U
160

and dividing by the nonzero scalar ert , it can be seen that the two sides of (4.6) will be
can be chosen to satisfy
identical if, and only if, r and U
= rU.

AU

(4.8)

The matrix equation (4.8) arises in many areas of applied mathematics, and is called an
eigenvalue problem for the matrix A. If, for a given matrix A, we can nd a vector
and a corresponding scalar r such that AU
= rU,
then we will have found a solution
U

of our system X
= AX
of dierential equations. The zero vector U
= 0 is
X(t)
= ert U

always a solution of (4.8), but we are looking for non-zero solutions X(t), so we use the
following denition.
that satises
Denition 4.10 Given an n n matrix A, if there exists a non-zero vector U
= rU
for some scalar r, then r is called an eigenvalue of A. The vector U
is called
AU
an eigenvector of A corresponding to the eigenvalue r.
The remainder of this section will show what is involved in nding the eigenvalues and
eigenvectors of a real square matrix A. Once we know how to do this, we will be able
= ert U
for the system of dierential equations X
= AX.
Our
to construct solutions X
examples will concentrate on the case of 2 2 matrices, since we are most interested in
systems of two equations in two unknowns. It will be clear, however, that the method
extends to systems of dimension n > 2, with constant coecient matrix A.
Solving the matrix equation (4.8) for a given matrix A still involves nding both the
however, an important theorem in Linear Algebra makes this
scalar r and the vector U;
possible.
= b
Theorem 4.1 Let M be an nn constant matrix. The system of linear equations MX

has a unique n 1 solution vector X for every choice of the n 1 column vector b if, and
only if, the determinant of the matrix M is unequal to 0.
This was implied in the previous section when the determinant was dened. We will use
this theorem in a negative way to nd the eigenvalues of a matrix.
If the eigenvalue problem (4.8) is rewritten in the form
rU
= 0,
AU
where 0 is the zero vector of length n, then the n-dimensional identity matrix I can be
inserted on the left, and our rule for distributivity of matrix multiplication over matrix
addition can be used to write
rU
AU
rIU
= (A rI)U
= 0.
AU
Note that A rI is just an n n matrix of the

a11 a12 . . . a1n
1 0
a21 a22 . . . a2n 0 1

ArI =
r
..

.
an1

an2

...

ann

0
161

form:
...
...
..
.
...

0
a11 r
a21
0

=

1
an1

a12
a22 r

...
...
..
.

a1n
a2n

an2

...

ann r

## having elements aii r on the main diagonal.

= 0 is an obvious solution of the system of equations (ArI)U
= 0, and by
The vector U
Theorem 4.1 it will be the only solution unless the determinant of the matrix A rI is zero.
is required to be nonzero, this implies that r can be an eigenvalue
Since an eigenvector U
of A only if det(A rI) = 0. For an n n matrix A, det(A rI) is a polynomial of degree
n in r. It is called the characteristic polynomial of the matrix A and its zeros will be
the eigenvalues of A.
Once the eigenvalues are determined, the corresponding eigenvectors are found by setting
= 0 and solving for U.
There will always be non-zero vectors satisfying this
(A rI)U
equation if r is an eigenvalue of A.
(
)
1 3
Example 4.3.1 Find the eigenvalues of the matrix A =
.
4 2
The eigenvalues are found by solving the equation det(A rI) = 0 :
(
)
(
)
(
)
1 3
1 0
1r
3
det(A rI) = det(
r
) = det
4 2
0 1
4
2r
= (1 r)(2 r) 12 = r2 3r 10 = (r + 2)(r 5) = 0;
therefore, r1 = 2 and r2 = 5 are the eigenvalues of A.
for each eigenvalue r we solve the equation
To nd associated eigenvectors U,
= 0.
(A rI)U

(4.9)

First, note that an eigenvalue r makes the determinant of the matrix A rI zero, so the
is not unique. In fact, if U
is any non-zero vector satisfying (4.9) then so
solution vector U

## is any scalar multiple k U. Check this!

(
)
1 3
Example 4.3.2 Find a family of eigenvectors of A =
corresponding to the eigen4 2
value r = 2.
(
)
(
)
(
)
1 3
1 0
3 3
If r = 2, then A rI =
(2)
=
. (Check that this
4 2
0 1
4 4
matrix does have determinant equal to zero). Now set
(
)(
) (
) (
)
3 3
u1
3u1 + 3u2
0
=
(A (2)I)U
=
=
.
4 4
u2
4u1 + 4u2
0
The following two linear equations must be simultaneously satised:
{
3u1 + 3u2 = 0
;
4u1 + 4u2 = 0
but these equations are multiples of each(other)and they are both satised if, and only if,
u1
=
u1 = u2 . Any non-zero vector U
with u1 = u2 is an eigenvector of A,
u2
(
)
1
=
corresponding to the eigenvalue r = 2. We will arbitrarily choose U
, but note
1
162

) (
)
1
k

## will be an eigenvector corresponding to

1
k
the eigenvalue r = 2. Once an eigenvalue and corresponding eigenvector are found, it is
easy to check that they are correct. Compute
(
)(
) (
)
(
)
1 3
1
2
1
=
AU
=
= 2
,
4 2
1
2
1
(

## that for any real number k, k

is equal to 2U
as required. For practice, show that the above procedure
and note that AU
(
)
=k 3
can be used to obtain V
as a family of eigenvectors for r = 5.
4
An eigenvalue, together with a corresponding
eigenvector,
(
)
(
) is called an eigenpair; there1
3
fore, A has the two eigenpairs (2,
) and (5,
). In this process we have also
1
4
(
)
(
)
1
2 (t) = e5t 3
1 (t) = e2t
of the system of
determined two solutions X
and X
4)
1
(
1 3
= AX
with coecient matrix A =
dierential equations X
. At this point it
4 2
would be enlightening to check that the pair of functions x(t) = e2t , y(t) = e2t , and
also the pair x(t) = 3e5t , y(t) = 4e5t , do indeed satisfy both of the equations x = x + 3y
and y = 4x + 2y.
Since the characteristic polynomial of a 2 2 matrix A is a quadratic polynomial, it can
have real unequal roots, two equal real roots, or complex roots. Suppose the characteristic
polynomial det (A rI) has complex roots. If A is a real matrix, these complex roots will
satisfying
occur in complex conjugate pairs i. It is still possible to nd eigenvectors Z
= 0, but the vector Z
will also be complex; that is, Z
can be written as
(A ( i)I)Z
=U
+ iV
for some real vectors U
and V.
Furthermore, it can be easily shown, using
Z

iV

## complex arithmetic, that if U + iV is an eigenvector corresponding to + i then U

will be an eigenvector for i.
(
Example 4.3.3 Find the eigenvalues and eigenvectors of A =

1
1

4
1

)
.

## Setting the characteristic polynomial equal to zero gives

(
)
1 r 4
det (A rI) = det
= (1 r)2 + 4 = r2 2r + 5 = 0,
1
1r
and the quadratic formula can be used to show that the solutions of this quadratic equation
corresponding to the eigenvalue r = 1 + 2i, write
are r = 1 2i. To nd an eigenvector Z
(
)(
)
1 (1 + 2i)
4
z1
=
(A (1 + 2i)I)Z
1
1 (1 + 2i)
z2
(
)(
) (
) (
)
2i 4
z1
2iz1 4z2
0
=
=
=
.
1
2i
z2
z1 2iz2
0

163

Again, the two rows of the matrix A rI are multiples of each other (this is always
true for a 2 2 matrix with zero determinant). Check that each element in the rst row is
2i times the corresponding element in the second row. This means that both of
nal
( the )
2i
=
equations will be satised if, and only if, z1 = 2iz2 . We will arbitrarily pick Z
as
1
our eigenvector. This can be written as
(
) (
)
(
)
0 + 2i
0
2

+ iV.

Z=
=
+i
=U
1 + 0i
1
0
is an eigenpair, by showing that if Z
is multiplied by the matrix
You should check that (r, Z)

A, it multiplies Z by the complex scalar 1 + 2i. You should also check that an eigenvector
that is, U
iV.

## corresponding to the eigenvalue 1 2i is the complex conjugate of Z;

= AX

In the next section you will be shown how to extract two real solutions of X
from a complex pair of eigenvalues and their associated eigenvectors.
The next example shows that our method works for a 3 3 matrix; for larger matrices
there are sophisticated numerical methods for nding both eigenvalues and eigenvectors
which you can learn all about in a course on Numerical Analysis. These methods are
available on computers, and also on many scientic calculators. You need to learn how to
nd eigenvalues and eigenvectors with whatever technology you have available.
Example 4.3.4 Find the eigenvalues of the matrix

1
1 0
A = 2 1 3 ,
0
0 2
and nd an eigenvector corresponding to each eigenvalue.
To compute the characteristic polynomial we need to evaluate

1r
det (A rI) = det 2
0

1
1 r
0

0
3 .
2r

## This can be done by the Method of Cofactors given in Appendix C:

(
)
1r
1
det (A rI) = (2 r) det
= (2 r)(r2 + 1) = 0.
2 1 r
The solutions of this cubic equation
are
r = 2, i, and i. The only real eigenvalue is 2, so
u
= v such that
we must rst nd a vector U
w

1 1 0
u
u + v
0
= 2 3 3 v = 2u 3v + 3w = 0 .
(A 2I)U
0
0 0
w
0
0
164

This
requires
that v = u and 3w = 2u + 3v = 5u; therefore, one eigenvector for r = 2 is
3
= 3 and any scalar multiple of U
will also be an eigenvector. Check that U
satises
U
5
= 2U.

AU
corresponding to the complex eigenvalue r = i, set
To nd an eigenvector Z

1i
1
0
u
(1 i)u + v
0
= 2 1 i
3 v = 2u (1 + i)v + 3w = 0 ,
(A iI)Z
0
0
2i
w
(2 i)w
0
which has the solution w = 0, v = (1 + i)u. Therefore the vector

1
1
0
= 1 + i = 1 + i 1 = U
+ iV

Z
0
0
0
V
is an eigenvector corresponding
is an eigenvector for r = i, and the complex conjugate Ui
to r = i.
Exercises 4.3 For each of the matrices 1 - 6 below, nd the eigenvalues. Find an eigenvector corresponding to each eigenvalue. In each case, do this rst by hand and then use
technology (TI-86, TI-89, Maple, etc.) to check your results.
(
)
2 2
1. A =
1 3
(
)
2 1
2. B =
0 3
(
)
4 2
3. C =
2 0
(
)
1 4
4. D =
4 7
(
)
1 3
5. E =
3 1
(
)
2
8
6. F =
1 2
Use technology to nd the eigenvalues and eigenvectors of the matrices G and H. In
each case, try to obtain eigenvectors with integer coecients.

1 0 0
7. G = 1 2 0
4 6 4

2 0 0
8. H = 1 2 1 One of the eigenvalues of H has algebraic multiplicity 2; that is,
1 0 1
it appears as a double root of the characteristic polynomial. It may have two linearly
independent eigenvectors, or only one. Which seems to be the case here? Explain.
165

9. Most computational algebra systems return eigenvectors which have been normalized
= (u1 , u2 , ..., un ) is the particular eigenvector
to unit length. This means that if U
2
2
returned, it will satisfy |u1 | +|u2 | +...+|un |2 = 1. The table below contains eigenpairs
for the matrix A in Example 4.3.4. Those on the left were calculated by hand and those
on the right were numerically generated by a TI-89 calculator, using the functions
eigVl and eigVc in the math menu under 4:matrix.
computed
byhand
3
(2, 3 )
5

1
(i, 1 + i )
0

1
(i, 1 i )
0

computed
by TI-89

0.45750
(2, 0.45750 )
0.76249

0.40825 0.40825i
)
0.81650
(i,
0

0.40825 + 0.40825i
)
0.81650
(i,
0

a. For each eigenvector on the right, show that it is (approximately) a scalar multiple
of the corresponding vector on the left. The scalar may be either a real or a complex
number.
b. Show that each eigenvector on the right has been normalized to unit length, as
explained above. Note: for a complex number, | + i|2 = 2 + 2 .
c. Use your own technology to compute eigenpairs of the matrix A in Example 4.3.4,
and compare them to those in the table.
= AX
has a solution of the form
10. Show that if the linear homogeneous system X
= ert U,
then X
= ert (k U)
is also a solution for any constant k; therefore, it does
X
not matter which eigenvector you choose for a given eigenvalue, since they are all
scalar multiples of each other.

166

4.4

=AX,
n=2
Analytic solutions of X

In this section we will derive analytic formulas for a general solution of the 2-dimensional
linear homogeneous constant coecient system
(
)
a b

X = AX =
X.
(4.10)
c d
= AX,
of any dimension n, we already
For a linear constant coecient system X
is an eigenpair for A then the vector X
= ert U
is a solution of the
know that if (r, U)
system. Furthermore, since the system is linear it is easy to show, using the properties of
1 , X
2 , ..., Xk are solutions, then so is any linear
matrix algebra (see Exercise 14), that if X

## combination c1 X1 + c2 X2 + ... + ck Xk for any constants c1 , ..., ck .

1 and X
2 are two linearly independent vector
If the system is 2-dimensional, and X

solutions, then X(t) = c1 X1 (t) + c2 X2 (t) will be called a general solution, and it will
be shown that it is always possible
( to nd
) constants
(
) c1 and c2 to satisfy arbitrary initial
x(t0 )
x0

## conditions of the form X(t0 ) =

=
.
y(t0 )
y0
When A is a 22 matrix, the eigenvalues of A are solutions of the characteristic equation
(
)
ar
b
det(A rI) = det
= (a r)(d r) bc = 0.
c
dr
This quadratic equation can be expressed in terms of the trace and determinant of A, as
follows:
det(A rI) = r2 (a + d)r + (ad bc) r2 tr(A)r + det(A) = 0.

(4.11)

It is also useful to note that if r1 and r2 are the roots of this quadratic (that is, the
eigenvalues), then it can be factored into
r2 tr(A)r + det(A) = (r r1 )(r r2 ) = r2 (r1 + r2 )r + r1 r2 .
Comparing coecients of the quadratic polynomials in the above equation, it can be seen
that for any 2 2 matrix A the sum of the eigenvalues is equal to trace(A) and the product
of the eigenvalues is equal to det(A). This information will be needed in the next section,
when we describe the geometric behavior of 2-dimensional systems. It is also a useful way
to check your computation of the eigenvalues.
Using the quadratic formula to nd the solutions of (4.11), we see that the eigenvalues
of A are given by

## tr(A) (tr(A))2 4 det(A)

r=
.
(4.12)
2
There are three cases to consider, depending on the sign of the discriminant K =
(tr(A))2 4 det(A). If K > 0 there will be two real unequal eigenvalues, if K = 0 there is a
single real eigenvalue, and if K < 0 the eigenvalues are complex. For each case we will nd
a formula for the general solution of the system 4.10.
1 ) and
Case 1 (K > 0): Let r1 and r2 be the two real roots dened in (4.12), and let (r1 , U
2 ) be eigenpairs of A. It is shown in Linear Algebra that eigenvectors corresponding
(r2 , U
167

to dierent eigenvalues are linearly independent; therefore, the general solution of (4.10)
can be written in the form

1 + c2 er2 t U
2 .
X(t)
= c1 er1 t U
+ iV
be an
Case 2 (K < 0): Let i be the complex conjugate eigenvalues, and let U
eigenvector corresponding to + i. Two complex solutions of (4.10) are given by
+ iV),

iV).

Z1 (t) = e(+i)t (U
Z2 (t) = e(i)t (U
Using Eulers identity eiz = cos(z) + i sin(z),
+ iV)

## Z1 (t) = et (cos(t) + i sin(t))(U

sin(t)V)
+ iet (cos(t)V
+ sin(t)U).

= et (cos(t)U
Similarly, we can write
sin(t)V)
iet (cos(t)V
+ sin(t)U).

Z2 (t) = et (cos(t)U
sin(t)V)
and 1 (Z1 (t) Z2 (t)) =
The two real vectors 12 (Z1 (t) + Z2 (t)) = et (cos(t)U
2i
+ sin(t)U)
are also solutions of (4.10), and their linear combination gives a
et (cos(t)V
formula for the general solution in terms of real vectors:

sin(t)V]
+ c2 et [cos(t)V
+ sin(t)U].

X(t)
= c1 et [cos(t)U
1 ) be one eigenpair for A, corresponding to the single eigenCase 3 (K = 0): Let (r, U
value r. Then there are two possibilities. It may happen that there is another non-zero
2 , which is not a scalar multiple of U
1 , for which AU
2 = r U
2 . In this case, the
vector U
general solution of (4.10) can be written as

1 + c2 ert U
2 .
X(t)
= c1 ert U
In general this will not be the case, and we will have to nd a second linearly independent
solution in some other way. If we assume a second solution can be written in the form
1 + U
), where U
is to be determined, then the condition for this to be a solution
ert (tU
of (4.10) is
d rt
)) A(ert (tU
1 + U
)).
(e (tU1 + U
dt
The product rule for dierentiation works for matrices, and we have
d rt
) = (rert )(tU
1 + U
) + (ert )(U
1 )
(e (tU1 + U
dt
1 + rert U
+ ert U
1 .
= rtert U
168

(4.13)

## This must be equal to

1 + U
)) = tert AU
1 + ert AU
= tert rU
1 + ert AU
.
A(ert (tU
1 satises AU
1 = r U
1 . Now, if we
Note that we have used the fact that the eigenvector U
rt
set the two sides of (4.13) equal and divide by e ,
1 + r U
+ U
1 = rtU
1 + AU
,
rtU
must satisfy the equation (A rI)U
= U
1 . With
and it can be seen that the vector U
any vector satisfying this equation, the general solution of (4.10) can be written in the
U
form

1 + c2 ert (tU
1 + U
).
X(t)
= c1 ert U
The following three examples demonstrate how to solve a two-dimensional system in
each of the three dierent cases.
Example 4.4.1 Solve the initial-value problem
{

x
y

= x + 3y,
x(0) = 1
.
= 4x + 2y, y(0) = 2

(4.14)
(

= AX
=
This system is equivalent to the matrix equation X

1
4

3
2

and in the
X,
(
)
1
previous section we found that this matrix A has two real eigenpairs (2,
) and
1
(
)
3
(5,
). Since the eigenvalues are real and unequal, we use the general solution for Case
4
1 to write
(
)
(
)
(
) (
)
x(t)
1
3
c1 e2t + 3c2 e5t
5t
2t

X(t)
= c1 e
+ c2 e
=
.
y(t)
1
4
c1 e2t + 4c2 e5t
You should check that if x(t) = c1 e2t +3c2 e5t and y(t) = c1 e2t +4c2 e5t are substituted
into the rst-order system (4.14), both equations are identically satised for all values of t.
To satisfy the initial conditions, we let t = 0 in the general solution and write
(
)
(
)
(
) (
)(
)
x(0)
1
3
1 3
c1

X(0)

= c1 e0
+ c2 e0

.
y(0)
1
4
1 4
c2

The nal equality above uses equation (4.3) in the section on Matrix Algebra.
To obtain c1 and c2 , it is necessary to solve the linear system
(
)(
) (
)
1 3
c1
1
=
.
1 4
c2
2
Remember that such a system has a unique solution if, and only if, the determinant of the
2 2 coecient matrix is non-zero. In this case, the coecient matrix contains eigenvectors
169

of A as its two columns. We know that these eigenvectors are linearly independent, and
any 2 2 matrix with linearly independent columns will have a non-zero determinant; thus,
the initial-value problem can be completed by using a linear equations solver to nd c1 =
10/7, c2 = 1/7. The unique solution of the initial-value problem is given by
(
)
(
)
(
) ( 10 2t 3 5t )
10 2t
1 5t 3
x(t)
1
7e
+ 7e

.
X(t)
= e
+ e
=
4 5t
10 2t
y(t)
1
4
e
+
7
7
7
7e
In the next example the eigenvalues and eigenvectors are complex.
Example 4.4.2 Find the general solution of the system
(
)
1 4
= AX
=

X
X.
1 1

complex
1 2i. An
( eigenvalues
)
0
2

## eigenvector for r = 1 + 2i was found to be U + iV =

+i
. Using the general
1 (
(
)
)0
0
2
=
=
solution for Case 2, with = 1, = 2, U
and V
, gives
1
0
(

X(t)
= c1 et [cos(2t)

0
1

(
sin(2t)

2
0

)
(
)
(
)
2
0
t
] + c2 e [cos(2t)
+ sin(2t)
].
0
1

If the indicated additions and scalar multiplications are performed, this simplies to
(
)
(
)
(
)
x(t)
2 sin(2t)
2 cos(2t)
t
t

X(t)
= c1 e
+ c2 e
.
y(t)
cos(2t)
sin(2t)
For practice, you should check that x(t) = et (2c1 sin(2t)+2c2 cos(2t)) and y(t) = et (c1 cos(2t)+
c2 sin(2t)) satisfy the simultaneous rst-order equations x = x 4y, y = x + y.
As in the previous case, the constants c1 and c2 can be chosen to make x and y satisfy
any given initial conditions.
The next example demonstrates what can happen when the characteristic polynomial
has a double real root.
Example 4.4.3
below:
( Find)general solutions for the two systems
(
)
2
0
2
1
=

(a) X
X
(b) X
X
0 2
0 2
2
Both of these systems have characteristic
(
)equation (r 2) = 0, so they have only one
u
=
eigenvalue r = 2. An eigenvector U
for the system (a) must satisfy
v

(
=(
(A rI)U

2
0

0
2

(
2

170

1
0

0
1

) (
) ( )
u
0
)
=
.
v
0

In this case, A rI is the zero matrix and any 2 1 vector will satisfy this equation.
This means that we can arbitrarily
( for
) eigenvectors two vectors that are not scalar
( ) choose
1
0
and
, and the general solution can then be written
multiples of each other, say
0
1
as
( )
(
)
(
)
1
0
c1
2t
2t
2t

X(t) = c1 e
+ c2 e
=e
.
c2
0
1
Note that the matrix equation (a) is equivalent to the system x = 2x, y = 2y, and
these two dierential equations can be solved independently. From this, it is clear that
x(t) = c1 e2t , y(t) = c2 e2t is the general solution.
In equation (b), any eigenvector must satisfy
(
)
(
) (
) (
)(
) (
) (
)
2 1
1 0
u
0 1
u
v
0
(
2
)
=
=
=
.
0 2
0 1
v
0 0
v
0
0
This says that the only condition(on the
) eigenvector is that its second component v = 0. If we
1
1 =
1 is a scalar multiple
take the eigenvector to be U
, then any other eigenvector k U
0
(
)
w

## of U1 . This means that we need to nd a second vector U =

which satises the
z
= U
1 ; that is,
equation (A 2I)U
(
)(
) (
) (
)
0 1
w
z
1

(A 2I)U =
=
=
.
0 0
z
0
0

## The only condition

(
) on U is that its second component z must equal 1. We will arbitrarily
0
=
take U
. Now the second formula in Case 3 gives
1
(

X(t)
= c1 e2t

1
0

(
+ c2 e2t (t

1
0

## as a general solution of the system (b).

171

(
+

0
1

)
(
)
c1 e2t + c2 te2t
)=
.
c2 e2t

)
)
(
(
2 2
2 1
Exercises 4.4 Let A, B, ..., F be the six matrices A =
, B =
,
1( 3
0 3
(
)
(
)
(
)
)
4 2
1 4
1 3
2
8
C=
,D=
,E=
,F=
. These are the
2 0
4 7
3 1
1 2
matrices for which eigenpairs were found in Exercises 4.3.
Find general solutions in vector form for each of the systems 1-3 below:
= BX

1. X
= DX

2. X
= FX

3. X
Solve the following initial-value problems; give the solutions in vector form:
( )
3

4. X = AX, X(0) =
0
(
)
2

5. X = CX, X(0) =
3
(
)
0

6. X = EX, X(0) =
1
Find solutions to each of the following systems, given in component form. If initial
conditons are not given, nd a general solution. Give the solution in component form
(that is, give expressions for x(t) and y(t)).
7. x = y, y = x.
8. x = y, y = x.
9. x = 2x y, y = y
10. x = x, y = x, x(0) = 1, y(0) = 1.
11. x = x + y, y = x + y, x(0) = 0, y(0) = 1.
12. Solve problem 9 again, without using matrices.
13. Solve problem 10 again, without using matrices.
= AX
i for each n14. Let A be an n n matrix with constant coecients. If X
i

2 + ... + ck X
k
dimensional vector X1 , X2 , ..., Xk , show that the vector X = c1 X1 + c2 X

## also satises X = AX.

Hint: First use the denitions of vector addition and dierentiation to show that
d

## dt (aX(t) + bY(t)) = aX (t) + bY (t).

15. In example 4.1.3 it was shown that for the two-compartment mixing problem shown in
the gure below the amount of salt x(t) in Tank A and the amount y(t) in Tank B, at
any time t, satisfy the system of equations
{
1
3
x(t) + 40
y(t)
x = 50
.
3
3

y = 50 x(t) 40 y(t)
172

2gal/min 0lb/gal

Tank A

Tank B

x(0)=5lb

y(0)=1lb
3gal/min
-

Vol=50gal

1gal/min


Vol=40gal
- 2gal/min
y(t)
40 lb/gal

a) Write the equations above in matrix form and solve the system. Use the given initial
conditions x(0) = 5, y(0) = 1. Keep 4 decimal accuracy in your calculations of the
eigenvalues and eigenvectors. (At this point, you should be using technology to nd
the eigenpairs).
b) Plot x(t) and y(t) for 0 t 100.
c) Does the amount of salt in the two tanks ever become equal? If so, at what value of
t?
d) What limits are x and y approaching as t ? Justify this in terms of the physical
model.
= AX+
b be a nonhomogeneous linear system, and let XH be a solution of
16. Let X
= AX.
Show that if XP is any vector satisfying
the associated homogeneous system X
= XH + XP satises X
= AX
+ b.
the nonhomogeneous system, then the vector X
The result of Exercise 16 can be used to prove that a general solution of a nonhomogeneous linear system can be written in the form
= XH + XP ,
X
where XH is a general solution of the associated homogeneous system and XP is any
particular solution of the nonhomogeneous system.
17. Redo Exercise 15, assuming the solution entering Tank A from the outside has a
concentration of p pounds of salt per gallon.

## a) Show that the system of equations for x(t) and y(t)

( is X) = AX + b, where A is
2p
the coecient matrix found in Exercise 15, and b =
.
0
(
)
a

## b) Assume a particular solution XP =

with undetermined constant coecients
b
a and b. Substitute XP into the nonhomogeneous equation and solve for a and b.

## (Hint: The vector XP is the 0-vector).

c) Add XP to the general solution found in Exercise 15. This will be the general
solution of the nonhomogeneous system. Let p = 0.1 pounds/gallon, and use the same
173

## initial conditions as before, x(0) = 5, y(0) = 1, to determine the constants in the

general solution.
d) Plot x(t) and y(t) for 0 t 100.
e) How did the results change from those in Exercise 15? Can you still justify the
results physically?

174

Chapter 5
Geometry of Autonomous Systems

5.1

## Geometric Behavior of Linear Systems in the Phase Plane

The phase plane, which was described for autonomous second-order dierential equations
in Chapter 3, can be extended to arbitrary autonomous 2-dimensional systems
{
x = f (x, y)
.
(5.1)
y = g(x, y)
In this rst section we will describe in detail the phase planes for 2-dimensional constant
= AX
with x = ax + by, y = cx + dy; and in the next section
coecient linear systems X
these results will be used to help us understand the phase portraits for arbitrary autonomous
2-dimensional systems (5.1).
In Chapter 3 we saw that the phase plane for an autonomous second-order dierential
equation x = F (x, x ) had axes x and x ; and solution curves (also called trajectories) were
drawn as parametric curves (x(t), x (t)) over some range t0 t tmax . Slope lines tangent
to the solution curves were drawn at a grid of points in the plane. Figure 5.1 shows a phase
plane for the over-damped mass-spring equation
x + 12x + 27x = 0,
with tangent vectors v = xi + xj = xi + (27x 12x )j drawn at the grid points. Check

2
1

x
2

1
2
3

## Figure 5.1: Phase plane for x + 12x + 27x = 0

175

that this second-order dierential equation can also be written in matrix form as
(
)
0
1
=

X
X,
27 12
(

)
x
. In fact, in Section 3.6 we rewrote second-order equations as
x
rst-order systems with dependent variables x1 x and x2 x .
In a similar manner, a phase plane for the more general case of autonomous twodimensional systems (5.1) can be constructed, having axes x and y and solutions drawn
as parametric curves of the form (x(t), y(t)), t0 t tmax . A direction eld can be
constructed, just as it was in Chapter 3, by drawing tangent vectors at a grid of points
in the phase plane. The tangent vector to a solution curve at any point (x, y) is just the
vector v = xi + y j = f (x, y)i + g(x, y)j; and, as before, these vectors can be drawn without
solving the system analytically.
( Notice)that the tangent vector v is just the vector we
f (x, y)

have been referring to as X
.
g(x, y)
As we saw in Chapter 3, one of the nice properties of the phase plane for an autonomous
system, if the system satises the conditions of a Uniqueness and Existence Theorem (and
all constant coecient linear systems do), is that its solution trajectories in the phase plane
cannot intersect. If they did, there would be two dierent solutions through the same initial
point. In Figure 5.1, for example, the four trajectories shown all tend to the origin as t ,
but they never intersect each other and they never quite reach (0, 0) (in nite time).
If the 2-dimensional system (5.1) is linear and homogeneous, with constant coecients,
it is possible to describe the phase plane behavior in a very precise manner. This may seem
like a lot of unnecessary work when we already know how to solve these systems analytically.
It will, however, turn out to play an extremely important role in describing the behavior of
solutions of nonlinear systems, and most real world problems are nonlinear.
is the vector
where X

## Denition 5.1 An equilibrium solution of (5.1) is a constant solution x(t) = x

, y(t) =
y for which f (
x, y) and g(
x, y) are simultaneously equal to 0.
In the phase plane, the equilibrium solutions of (5.1) are points (
x, y) (variously called
equilibrium points, xed points, stationary points, critical points) where the tan = 0, the zero vector. If a solution starts at an equilibrium point, it will stay
gent vector X
there forever, since the rate of change of both x and y is zero; therefore, these points in the
phase plane represent parametrically an entire solution curve x(t) x
, y(t) y, < t <
.
= AX,
an equilibrium solution must be a constant
For a linear system of the form X

= AX
= 0; therefore, if the
vector X = (
x, y) which satises the matrix equation X
determinant of the matrix A is not zero, there will be exactly one equilibrium solution
= 0, corresponding to the point (
X
x, y) = (0, 0) in the phase plane.
= AX
can be
The 2-dimensional constant coecient homogeneous linear systems X
classied into six dierent types, in terms of the geometric behavior of solutions around the
equilibrium solution (0, 0) in the phase plane. There are two special cases which will be
treated separately at the end of this section. One special case includes any system for which
det(A) = 0. In section 5.4 we showed that the product of the eigenvalues of a 2 2 matrix
A is equal to det(A), so this special case includes all systems that have at least one zero
176

eigenvalue. The second special case consists of systems for which the two eigenvalues of A
are real and equal.
We will consider, rst, systems with unequal real eigenvalues, and then those with complex eigenvalues. The special cases will be considered last.
Phase plane behavior of linear systems with real (unequal, non-zero) eigenvalues
We know from Section 5.4 that when A has two real unequal eigenvalues r1 and r2 , the
= AX
can be written in the form
general solution of the matrix system X

1 + c2 er2 t U
2,
X(t)
= c1 er1 t U
1 ) and (r2 , U
2 ) are two eigenpairs for the matrix A. It is also known that the
where (r1 , U

eigenvectors U1 and U2 are linearly independent (that is, not constant multiples of each
other).
(
)
ui1

## Let (ri , Ui ) be one of the eigenpairs, with Ui =

. Dene li to be the innite
ui2
line (in the phase plane) determined by the two points (0, 0) and (ui1 , ui2 ) (see Figure 5.2).
i (that is, every eigenvector
Note that every nonzero vector which is a scalar multiple of U
for ri ) lies along the line li .
Theorem 5.1 : Assume the eigenvalues of A are real. If the line li lies along an eigenvector
= AX
that starts at a point (x, y) on the
of A, then in the phase plane any solution of X
line li remains on li for all t; and as t approaches the origin if the eigenvalue ri < 0,
or moves away from the origin if ri > 0.
(
)
x

=
Proof: If (
x, y) = (0, 0) is any point on the line li , the position vector X
from
y
i ; that is, X
= cU
i for some constant
(0, 0) to (
x, y) is some scalar multiple of the vector U
c.
y
l

U
i i
ui2 

1


x



ui1 x


)

ri X


)
y



X
)

 v

## Figure 5.2: Tangent vector v at (

x, y), ri > 0
The tangent vector v to the solution curve through (
x, y) satises
= AX
= A(cU
i ) = c(AU
i ) = c(ri U
i ) = ri (cU
i ) = ri X;

v X
therefore, the tangent vector to the solution curve through (
x, y) is a vector in the direction
if ri > 0, or in the opposite direction if ri < 0. Since the tangent vector
of the vector X
points along the line li , this means that the solution must move along li ; and it will move
away from (0, 0) if ri > 0 or toward (0, 0) if ri < 0.
177

l1

3 y

l2

2
1

x
3

1 0

1
2
3

## Figure 5.3: Real eigenvalues r1 < r2 < 0

Once the direction of the two eigenvectors is determined, the geometry of the phase
plane depends only on the signs of the two eigenvalues r1 and r2 . Remember that it is being
assumed that neither eigenvalue is equal to zero. There are three distinct cases to consider.
Case 1: r1 < r2 < 0. If both eigenvalues are negative, the solutions along both l1 and l2

1 + c2 er2 t U
2 that does not lie along
tend toward (0, 0) as t . A solution X(t)
= c1 er1 t U
either line l1 or l2 will still tend to (0, 0) as t since er1 t and er2 t both approach 0; but as
t increases er1 t tends to zero more quickly than er2 t , and the solution will approach
the origin
(
)
7
2

## in a direction tangent to the line l2 . A phase plane for the system X =

X,
4 5
(
)
(
)
1
1 ) = (9,
2 ) = (3, 1 ), is shown in Figure
with eigenpairs (r1 , U
) and (r2 , U
1
2
5.3. The direction arrows in the phase plane indicate that all solutions are moving toward
the origin. In this case the origin is a stable equilibrium, and is called a sink.
Case 2: r1 > r2 > 0. With both eigenvalues positive, the phase plane will look exactly
like that in Case 1, except all solutions will move away from the origin as t . In this
case the origin is unstable, and is called a source.
1,
Case 3: r1 < 0 < r2 . As t , solutions along the line l1 , determined by U
2 , will move
will tend toward the origin and solutions along the line l2 , determined by U

1 + c2 er2 t U
2 , with c1 and
away from the origin. Solutions of the form X(t)
= c1 er1 t U
c2 both unequal to zero, will tend toward the line l1 as t and
toward
the
(
) line l2
0
1
=
with
as t . Figure 5.4 shows the phase plane for the system X
X,
2
1
(
)
(
)
1 ) = (2, 1 ) and (r2 , U
2 ) = (1, 1 ). Note that no matter how
eigenpairs (r1 , U
2
1
close a solution gets to (0, 0), it will move o to innity as t , unless it lies exactly on
the line l1 . In this case the origin is unstable, since almost all solutions tend away from it
as t , and it is called a saddle point. The line l1 is called a separatrix for the saddle
point. As can be seen in Figure 5.4, it separates solutions which ultimately go in dierent
178

l1

3 y
2
1

l2
3

1 0

x
2

1
2
3

directions.

179

## Phase plane behavior of linear systems with complex eigenvalues

+ iV),
we know that the general solution in
If one complex eigenpair for A is ( + i, U
this case can be written in the form
sin(t)V)
+ c2 et (cos(t)V
+ sin(t)U)

c1 et (cos(t)U
+ [c2 cos(t) c1 sin(t)]V)

## et ([c1 cos(t) + c2 sin(t)]U

sin(t + )V),

et R(cos(t + )U

X(t)
=

where R = c21 + c22 , R cos() = c1 , and R sin() = c2 . Notice that we have used the
same trigonometric substitution that was used in Chapter 3 to write a sum of a sine function
and a cosine function as a single sine or cosine function.
If = 0, it can be shown that the above equation is a parametric equation for an ellipse
about the origin in the (x, y) plane. It is a bit more complicated to show this than it was in
Example 3.8.1 in Chapter 3, since the axes of the ellipse may be rotated about the origin.
For the complex eigenvalue case, there are again three dierent types of solutions in the
phase plane, depending on whether the real part of the eigenvalues is positive, negative
or zero.

3 y
2
1

x
3

1 0

1
2
3

## Case 4: r = i, = 0. Solutions X(t)

in the phase plane will be concentric ellipses
about the origin, and will all be periodic with period 2
. A phase plane for the system
(
)
1
2
=
with eigenvalues 3i, is shown in Figure 5.5. The equilibrium
X
X,
5 1
solution (0, 0) in this case is called a center.
Case 5: r = i, < 0. In this case solutions still cycle periodically about the
origin but the amplitude decreases exponentially as t , due to the factor et . The
solution curves are concentric spirals which
( approach the
) origin as t . An example is
1
2

=
which has complex eigenvalues
shown in Figure 5.6, for the system X
X,
2
0
21

15
2 i.

180

3 y
2
1

x
3

1 0

1
2
3

## Figure 5.6: Complex eigenvalues with real part < 0

Case 6: r = i, > 0. If the complex eigenvalues have positive real part the
solutions will spiral outward as t . The phase plane looks exactly the same as in Case
5 except all of the arrows are reversed. In this case the origin is unstable, and is called a
spiral source.
In Case 4, 5 or 6 the solutions can rotate either clockwise or counterclockwise about the
origin. The direction of rotation is easily determined from the matrix A. At the particular
point (1, 0) in the phase plane, the tangent vector to the solution through (1, 0) is given by
( ) (
)(
) (
)
x
a b
1
a

X =
=
=
,
y
c d
0
c
If the coecient c in the matrix is positive, then at the point (1, 0) y = c is positive and
hence y is increasing. This implies that the solution curve through the point (1, 0) will cut
across the x-axis in an upward direction; therefore, the solution curves will be rotating in a
counter-clockwise (
direction. If)c < 0 the rotation will be clockwise. In Figure 5.5, for the
1
2
system with A =
, the coecient c = 5 and the solutions can be seen to be
5 1
(
)
1 2
rotating clockwise. In Figure 5.6, for the system with A =
, c = 2 and the
2
0
solutions are rotating counterclockwise.
The trace-determinant plane
= AX,
the type of equiFor any 2-dimensional constant coecient linear system X
librium at the origin in the phase plane can be completely determined from the values of
the trace and determinant of the matrix A, without having to solve for the eigenvalues and
eigenvectors. It was previously shown that the sign of K = tr(A)2 4det(A) determines
whether the eigenvalues are real or complex. If K > 0 the eigenvalues r1 and r2 are real,
and they are of the same sign if, and only if, their product r1 r2 det(A) is positive and of
opposite sign if it is negative. If they are of the same sign, the sign of tr(A) r1 + r2 determines whether they are both positive or both negative. If K < 0, so that the eigenvalues
are complex, then we know that the real part is equal to tr(A)/2, and therefore the sign
181

of the trace will distinguish between systems with spiral source, spiral sink or center at the
origin. Note that for complex conjugate eigenvalues, det(A) = ( + i)( i) = 2 + 2
is always positive. All of this information is summarized in Table 5.1 below.
Case
1
2
3
4
5
6

type of equilibrium
sink
source
center
spiral sink
spiral source

eigenvalues
real, r1 < r2 < 0
real, 0 < r1 < r2
real, r1 < 0 < r2
complex, = 0
complex, < 0
complex, > 0

detA r1 r2
+
+

+
+
+

tr(A) r1 + r2

+
arbitrary
0

tr(A)2 4detA
+
+
+

## Table 5.1: Data needed to determine equilibrium type at (0, 0)

This information can be encoded even more succinctly by using a diagram referred to as
a trace-determinant plane. This is a plane in which the trace of a matrix A is plotted

3 det
COMPLEX EIGENVALUES
2

det=tr2 /4

SPIRAL 4 SPIRAL
SINK 1 SOURCE

SINK

2
SOURCE

tr
4

REAL EIGENVALUES
1

## Figure 5.7: The trace-determinant plane

along the horizontal axis and its determinant along the vertical axis (see Figure 5.7). The
parabola det = tr2 /4 (i.e. the set of points where K = 0) plotted in this plane separates
= AX
with real eigenvalues from those having complex eigenvalues. Note that
systems X
a system for which the point (trA, detA) lies exactly on the parabola (i.e. det = tr2 /4) will
have equal real eigenvalues. The phase plane for this special case will be described below.
Using the information in Table 5.1, the six cases described above can be seen to fall into the
six regions of the trace-determinant plane similarly labelled in Figure 5.7. Any system with
det(A) < 0 can be seen to have a saddle point at (0, 0), since the two (real) eigenvalues will
be of opposite sign if, and only if, their product r1 r2 detA is negative. Note that Case 4
(center) occurs only if the point (trA, detA) lies exactly on the positive vertical axis. The
other special cases, to be considered below, occur when the point (trA, detA) lies on the
horizontal axis (i.e. when det(A) = 0) or when it lies on the parabola (det = tr2 /4).
182

)
1
3
. Use the
2 4
trace-determinant plane to see how much information it provides about the system.
(

= AX
with matrix A =
Example 5.1.1 Consider the system X

For this matrix A, the point (tr(A), det(A)) = (3, 2); therefore, it lies in the upper left
quadrant of the trace-determinant plane. A point on the parabola has to satisfy det = (tr)2 /4;
therefore, since det(A) = 2 < (3)2 /4 = 2.25, the point (3, 2) lies below the parabola, and
is in region 1. This tells us that (0, 0) is a sink for this system, and that the eigenvalues
must be real, unequal, and both negative.
Use your calculator to check that the eigenvalues of A are 1 and 2.

## The special cases

Case A: One zero eigenvalue r1 = 0, r2 = 0. This will occur if the point (tr(A), det(A))
lies on the horizontal axis (det = 0) in the trace-determinant plane. If r2 > 0, the trace of
A will be positive, and the point will be in the right half-plane, and if r2 < 0 the point will
be in the left half-plane. The general solution in this case is

1 + c2 er2 t U
2 = c1 U
1 + c2 er2 t U
2.
X(t)
= c1 e0t U
= (
Assume rst that r2 < 0. Any point X
x, y) on the line l1 , that is, any scalar multiple

= r1 X
= 0X
= 0.
of U1 , is an equilibrium point, since X = AX

3 y

l2

l1

2
1

x
3

1 0

1
2
3

## Figure 5.8: One zero eigenvalue

A solution starting on l2 will move toward (0, 0) along l2 , and a solution starting at any
1 . Figure
other point will move along a line parallel to l2 toward
the equilibrium
point at c1 U
(
)
1
1
=
with eigenpairs (r1 , U
1) =
5.8 shows a phase plane for the system X
X
1 1
(
)
(
)
1
1
2 ) = (2,
(0,
) and (r2 , U
). If r2 > 0, all of the arrows along the lines parallel
1
1
to l2 are reversed.
Note: The case where both eigenvalues of A are zero is very interesting and is left for
the student (see Exercise 21 at the end of the section).
183

3 y
2
1

x
3

1 0

1
2
3

## Figure 5.9: Equal real eigenvalues, linearly independent eigenvectors

Case B: Two equal real (nonzero) eigenvalues r1 = r2 = r. This occurs when the
point (tr(A), det(A)) lies on the parabola det = tr2 /4 in the trace-determinant plane. If
1 and U
2 corresponding to the eigenvalue
there are two linearly independent eigenvectors U
1 + c2 U
2 . This
r, then every vector in the plane can be written as a linear combination c1 U
means that every vector in the plane is an eigenvector of A (see Exercise 20).

1 + c2 ert U
2 = ert (c1 U
1 + c2 U
2 ), and therefore
The general solution is X(t)
= c1 ert U
every solution moves along a straight line, either toward
the
origin
if
r
<
0 or away if r > 0.
(
)
2
0
=
which has the single
Figure 5.9 shows a phase plane for the system X
X
0 2
eigenvalue r = 2, and for which every vector in the plane is an eigenvector.

3 y

l1

2
1

x
3

1 0

1
2
3

## Figure 5.10: Equal real eigenvalues, single eigenvector

If only one linearly independent eigenvector exists, then

1 + c2 ert (tU
1+U
)
X(t)
= c1 ert U
is any vector satisfying (A rI)U
= U
1 . If r < 0, solutions along l1 will tend
where U
to (0, 0) as t . Any other solution will be seen to tend to (0, 0) and approach the line
l1 as t . If r > 0, the phase plane has exactly the same form, but with the arrows all
184

)
4 2
which has
X
2 0
a multiple eigenvalue r = 2 and only one(linearly
) independent eigenvector direction. An
1
1 ) = (2,
eigenpair for this matrix is (r, U
). The origin, in this case, is often referred
1
to as an improper node, and it is stable if r < 0 and unstable if r > 0.
(

=
reversed. Figure 5.10 shows a phase plane for the system X

185

Exercises 5.1 For each matrix A below, compute the trace and determinant. Use the trace = AX
has at (0, 0).
determinant plane to decide what type of equilibrium the system X
(
)
1
2
1. A =
2 2
)
(
4 2
2. A =
1 1
)
(
2 3
3. A =
1 0
(
)
1 1
4. A =
1 2
(
)
2
3
5. A =
2 2
(
)
1 2
6. A =
1 3
For each system below, nd the eigenpairs (you will probably want to use technology
for this) and sketch by hand a phase portrait for the system. If the eigenvalues are
real, the eigenvectors should be included in the sketch. Put arrows on each solution
trajectory to denote the direction of motion.
7. x = x + 2y, y = 2x 2y
8. x = 4x + 2y, y = 1 + y
9. x = 2x + 3y, y = x
10. x = x + y, y = x 2y
11. x = 2x + 3y, y = 2x 2y
12. x = x + 2y, y = x + 3y
For each mass-spring equation 13-18 below, write it as a system and use the tracedeterminant plane or eigenvalues to determine the type of equilibrium at (0, 0). How
does the type of the equilibrium compare with the type of damping (undamped, under
damped, critically damped, or over damped)? Can you formulate a general statement
13. x + 4x + 2x = 0
14. x + 9x = 0
15. 3x + 2x + x = 0
16. x + x + 2x = 0
17. x + 5x + 4x = 0
18. x + 2x + x = 0
186

## 19. Write the equation mx + cx + kx = 0 in matrix form (i.e. with y = x ). Show

that the characteristic polynomial of the coecient matrix A has the same roots as the
characteristic polynomial mr2 + cr + k dened in Chapter 3. Can you think of a good
reason why this should be true?
1 and U
2 are two eigenvectors of a matrix A, for the same eigenvalue r, show that
20. If U
1 +c2 U
2 is also an eigenvector corresponding
for any constants c1 and c2 the vector c1 U
to the eigenvalue r.
= AX
around the origin in the
21. Computer Project. The behavior of solutions of X
phase plane has been described for every case except one; that is, when the eigenvalues
r1 and r2 of A are both zero. In this case, both the trace and determinant of A
are zero, and the system is represented in the Trace-determinant plane by the point
(0, 0); therefore, you might expect the phase portrait to look rather strange. A slight
change, no matter how small, in the matrix A could put the system into any one of
the six dierent regions in the Trace-determinant plane, causing a distinct change in
the phase portrait.
a) Show that if both eigenvalues of A are zero, then either A 0 (the zero matrix),
or else it has the form
(
)
a b
, a arbitrary, b = 0.
(5.2)
a2
a
b
(Hint: Just try to construct a matrix with trace and determinant both zero.)
= AX
is an equilibrium
b) If A 0, show that every point in the phase plane of X
).
point (remember that the tangent vector at each point is X
In the remainder of the problem, assume A has the form given in equation (5.2).
(

)
b
is an eigenvector of A corresponding to the
a
double eigenvalue r = 0, and that every other eigenvector must be a scalar multiple of
1 .
U
1 =
c) Show that the vector U

)
0
= U
1 , and write out a
satises (A 0I)U
1
general solution for the system, using the Case 3 formula:
(
)
x(t)

1 + c2 ert (tU
1 + U
) =
X(t)
= c1 ert U
.
y(t)

=
d) Show that the vector U

e) Using your solution from part (d), show that at any time t, x(t) and y(t) are related
by y(t) = ab x(t) c2 ; thus, all of the trajectories in the phase plane lie along parallel
lines of slope ab . The constant c2 depends on the initial conditions.
187

## f ) Show that every point on the line y = ab x c2 with c2 = 0 is an equilibrium point.

Hint: if (x, y) is any point in the phase plane satisfying y = ab x, show that the tangent
at (x, y) must be the zero vector.
vector X
g) If b > 0, show that if a point (x, y) in the phase plane lies above the line y = ab x
(that is, satises y > ab x), then x (t) is negative. This means the solution at that point
is moving to the left. If y < ab x show that x (t) is positive, so the solution through that
point is moving to the right. On the other hand, if b < 0, trajectories above the line
y = ab x move right, and those below the line move left.
h) Use everything you have learned above to draw a complete phase portrait for the
particular system
(
)
1 2

X = AX =
X.
1
1
2
Draw enough trajectories to determine the behavior of every solution in the phase
plane. Describe their behavior, in your own words.
Hard Problem: The matrix A in (h) can be changed very slightly to put it into
dierent regions in the Trace-determinant plane. For each of the four regions 1, 3, 4,
and 5 in Figure 5.7:
Construct a matrix A , very close to A, for which (tr(A ), det(A )) is in the given
= A X.
You should try to visualize
region. Sketch a phase portrait for the system X
the phase portrait morphing from its form when the matrix is A into the form it
takes when the matrix is A .

188

5.2

## Geometric Behavior of Nonlinear Autonomous Systems

Using the results from the previous section, we are now in a position to describe geometrically
the phase plane behavior of solutions of arbitrary two-dimensional autonomous systems of
the form
{
x = f (x, y)
.
(5.3)
y = g(x, y)
In the process of doing this we will refer to three important theorems which have made it
possible to begin to understand the behavior of nonlinear systems.
Numerical Solutions and Computer Generated Graphs
In this section and the next we may need to employ numerical methods to generate graphs
of and values for solutions curves. In Section 3.7 we dened Eulers method for systems of
dierential equations, and briey described how the algorithm for Fourth-Order RungeKutta works. We also showed how to use these methods to create phase and time plots with
a computer or calculator. You may want to review that section now. In particular, recall
the warnings about making sure that the step size is suciently small before you believe
the results of a numerical method (graphs or numerical values). Maple, the TI-89, or the
applet for systems at uhaweb.hartford.edu/rdecker/MathletToolkit/SystemsBook.htm can be
used to create graphs or obtain numerical values.
Consider Figure 5.11 below. It shows a numerically generated phase portrait for the

10
8
y 6
4
2
0

6
x

10

system

x
y

## = f (x, y) = x(2 0.2x) 0.4xy

.
= g(x, y) = y(4 0.4y) 0.8xy
189

(5.4)

## This system is an example of a Lotka-Volterra competing species model, in which

x(t) and y(t) represent the populations at time t of two dierent biological species which
are competing with each other for some resource in their joint ecosystem. Each population
is growing logistically, as dened in Section 2.1, but is negatively inuenced by its interaction with the other population (the two terms 0.4xy and 0.8xy represent this interaction).
Nothing new is involved in drawing a phase plane for this system. The direction vectors at
each point (x, y) are v = f (x, y)i + g(x, y)j and they can be computed without solving
the system. To sketch the trajectories, numerical solutions can be easily computed using
the methods described in Section 3.7.
Suppose a biologist looked at Figure 5.11, and then asked what would happen over the
long term if initially the populations were around the values x(0) = 4, y(0) = 4. Could
you give him an answer? Notice that it appears as though solutions will either end up at
the point (0, 10) or the point (10, 0). In the rst case the population x has been driven to
extinction and only y remains, and in the second case the exact opposite occurs. Knowing
which of these two possibilities will occur could be very important to a population biologist.
In this section we will learn how to nd out precisely what is going on in this phase plane.
Our rst problem will be to nd all of the equilibrium solutions for the system; that is,
the points (x, y) in the phase plane where f (x, y) and g(x, y) are both equal to zero. This
is no longer as simple as it was for linear systems; and one possible technique for nding
them will be described below.
10
In this particular problem, we will nd that one of the equilibrium points is at ( 10
3 , 3 )
(Check this!). Notice that in a small region around this point in the phase plane (indicated
by a circle in Figure 5.11), solutions appear to behave very much like the solutions of a
linear system around a saddle point. This is no coincidence, and we will show below how to
make this statement precise.
A nonlinear system such as (5.4) can have any number of equilibrium solutions, but we
will be able to describe the behavior of the system in a small neighborhood around each
equilibrium by using a very important theorem, called the Hartman-Grobman Theorem,
that was proved less than 100 years ago (incidentally, this is considered a very short time
in mathematical history). Essentially, this theorem says that if an equilibrium point (
x, y)
is moved to the origin in the phase plane by making a change of dependent variables
u=xx
, v = y y
and if all of the non-linear terms in u and v are discarded, then very close to (
x, y) the
nonlinear system behaves very much like the linearized system in u and v at (u, v) = (0, 0).
Basically, this works because when u and v are very close to zero, higher order terms like
u2 , v 2 , uv, etc. are much smaller and can essentially be ignored. There is one restriction;
the equilibrium of the linearized system must not be of a type which lies on one of the
special-case curves in the trace-determinant plane; that is, the eigenvalues cannot be zero
or have zero real part. In these special cases, no matter how small a perturbation is made
in the system, it can change the system from one type to another. Note carefully that a
center is considered to be one of the special cases in this sense, in that it can easily become
either a spiral sink or a spiral source by any change in the equations, no matter how small.

190

## Finding the equilibrium points

In order to nd the equilibrium solutions of the system (5.3), we will require the following
denition.
Denition 5.2 The nullclines for x , in a system 5.3, are all of the curves in the phase
plane along which x = 0. These can be found by setting f (x, y) = 0 and, if possible, solving
for y as a function of x. Similarly, the curves where g(x, y) = 0 are called nullclines for
y .
Note: At any point along a nullcline for x , since f (x, y) = 0, the tangent vector f (x, y)i+
g(x, y)j in the phase plane will be vertical, and along a nullcline for y the tangent vector
will be horizontal. Make sure you see why this is true!
One way to nd all of the equilibrium points is to sketch the nullclines for x and y . Any
point of intersection of an x -nullcline with a y -nullcline will be a point where both f (x, y)
and g(x, y) are zero; therefore, it will be an equilibrium point.

10
8

y=0

y 6
4

x=0
y=0

2 x=0
0

10

## Figure 5.12: Nullclines for the system (5.4)

In our competing species example, to nd the nullclines for x , we set f (x, y) = x(2
0.2x 0.4y) = 0; therefore, the nullclines for x consist of the two curves x 0 (the y-axis)
= 5 21 x. Similarly, the two nullclines for y are y 0 and
and the straight line y = 20.2x
0.4
40.8x
y = 0.4 = 10 2x. These curves are shown as dotted lines in the phase plane for the
system (5.4) in Figure 5.12. Observe carefully that in general the nullclines are not solution
curves. In this particular gure, the tangent vectors in the direction eld have been drawn
with their midpoints at the grid points, and most of them are not exactly at points on the
nullclines. This is why most of the arrows do not appear to be exactly horizontal or vertical
when they cross the nullclines.
191

For the competing species model (5.4) there are four equilibrium points; namely, (
x, y) =
10
(0, 0), (0, 10), (10, 0), and ( 10
,
).
The
fourth
point
was
found
by
solving
2

0.2x

0.4y =
3
3
0, 4 0.4y 0.8x = 0 simultaneously for x and y. Make sure that you see that these are
all of the equilibrium points. Trace along each nullcline in Figure 5.12 and see where it
intersects a nullcline of the opposite type.
Determining the type of an equilibrium
The type of the equilibrium at (
x, y) = (0, 0), for the nonlinear system (5.4), is the
easiest to determine. If we substitute u = x 0 and v = y 0 into the equations, and drop
the nonlinear terms in u and v, the equation u = 2u 0.2u2 0.4uv becomes u 2u.
Similarly the equation v = 4v 0.4v 2 0.8uv reduces to v 4v. These two linearized
equations u 2u, v 4v can be written as a matrix equation
(
)
( )
2 0
u

U
= AU =
U,
v
0 4
and plotting the point (tr(A), det(A)) = (6, 8) in the trace-determinant plane, we see that
this linear system has a source at (0, 0). Check it! The Hartman-Grobman Theorem then
tells us that the system (5.4) also has a source at (x, y) = (0, 0).
In Figure 5.13 it can be seen that close to the origin all of the solutions are moving away,

0.2
0.15
y

0.1
0.05

0.05 0

0.05

0.1
x

0.15

0.2

0.05

## Figure 5.13: Trajectories of the system (5.4) about (0, 0)

and in a very small neighborhood of (0, 0) solutions will actually behave like those around
a linear source. This is exactly what the Hartman-Grobman Theorem says. In fact, the
eigenvectors for r = 2, the smaller eigenvalue of the matrix A, lie along the x-axis (check
it!); therefore, as t goes backwards to solutions tend to (0, 0) in a direction tangent to
the x-axis. This can be seen clearly in Figure 5.13.
To determine the behavior of the system (5.4) at any of the other equilibrium points
(
x, y), it is necessary to substitute u = x x
, v = y y into (5.4) and throw away any
nonlinear terms in u and v. This is a messy calculation, but there is a standard method for
doing it which works at any equilibrium point of a system (5.3), if the functions f and g are
suciently dierentiable . Note that x
and y are constants, while u and v are functions of t;
therefore, d(u(t))/dt = d(x(t) x
)/dt = dx/dt and similarly d(v(t))/dt = d(y(t) y)/dt =
dy/dt. If f and g are suciently dierentiable, they can be expanded in Taylor Series about
192

the point (
x, y). For example,
f (x(t), y(t)) =

f (
x + u(t), y + v(t))
f
f
= f (
x, y) +
u(t) +
v(t) + higher order terms in u and v
x
y
{z
}
|
linear part

where the partial derivatives are all evaluated at the equilibrium point (x, y) = (
x, y); and
g(x, y) has a similar Taylor Series expansion.
Remember that if (
x, y) is an equilibrium point then f (
x, y) and g(
x, y) are both equal
to zero; therefore, when the equation x = f (x, y) is linearized at the equilibrium point,
f
and the nonlinear terms are discarded, it becomes x u f
x u(t) + y v(t). Similarly, the
g
g
u(t)+ y
v(t).
equation for y , under the substitution and linearization, becomes y v x
This gives us an approximating linear system in the new dependent variables u and v of the
form
(
)
(
) ( f f ) (
)
u
u
u
x
y
=J
=
.
g
g
v
v
v
x
y

The matrix J, containing the partial derivatives, is called the Jacobian matrix of the
system (5.3), and when the partial derivatives are evaluated at an equilibrium point (x, y) =
(
x, y), the trace and determinant of J can be used to determine the type of that equilibrium.
The Hartman-Grobman Theorem tells us that if the point (tr(J(
x, y)), det(J(
x, y))) lies
inside one of the regions 1,2,3,5, or 6 in the trace-determinant plane, then in a small region
about the equilibrium point (
x, y) our nonlinear system has the same type of behavior as
the corresponding linear system has around (0, 0). Notice that once the Jacobian matrix is
computed, all of the equilibrium points can be easily tested. The example below shows how
this is done.
Example 5.2.1 Compute the Jacobian matrix for the system (5.4) and use it to determine
10
the type of each of the equilibrium points (0, 10), (10, 0) and ( 10
3 , 3 )
If the equations are written in the form
{
x = f (x, y) = 2x 0.2x2 0.4xy
y = g(x, y) = 4y 0.4y 2 0.8xy,
f
g
the partial derivatives are f
x = 2 0.4x 0.4y,
y = 0.4x,
x = 0.8y,
4 0.8y 0.8x, and the Jacobian matrix at any point (x, y) is
(
)
2 0.4x 0.4y
0.4x
J(x, y) =
.
0.8y
4 0.8y 0.8x

(
At the equilibrium point (x, y) = (0, 10), the Jacobian is J(0, 10) =

2 0
8 4

g
y

)
, with

(tr(J), det(J)) = (6, 8). Since det(= 8 < tr2 /4)= 9, (0, 10) is a sink.
2 4
At (x, y) = (10, 0), J(10, 0) =
, with (tr(J), det(J)) = (6, 8); therefore,
0 4
(10, 0) is also a sink.
193

10
At the point (
x, y) = ( 10
3 , 3 ),

(
J(
x, y) =

23
38

43
43

)
,

10
with (tr(J), det(J)) = (2, 24
x, y) = ( 10
9 ). Since det(J) is negative, the point (
3 , 3 ) is a
saddle point for (5.4).
Note that we could also test the equilibrium point at (0, 0) by computing
(
)
2 0
J(0, 0) =
0 4

Since the point (tr(J), det(J)) = (6, 8) lies in region 2 of the trace-determinant plane, it
conrms our previous statement that (0, 0) is a source for this system.
The sinks, (10, 0) and (0, 10) are stable equilibria, and in a small enough region around
each one all of the solutions will tend toward the equilibrium point.
If a nonlinear system has a saddle point, even more can be learned about the geometry
of the phase plane, using a second theorem called the Stable Manifold Theorem. Re 1 ) and (r2 , U
2)
member that a linear system with a saddle point, having eigenpairs (r1 , U
where r1 < 0 < r2 , has exactly two trajectories which tend to the saddle point as t ;
and all other trajectories eventually tend away from the saddle. The Stable Manifold
1 ) and (r2 , U
2 ) are eigenpairs for the linearized system about
Theorem says that if (r1 , U
(u, v) = (0, 0), and if r1 < 0 < r2 , then there are exactly two trajectories in the phase
plane of the nonlinear system which tend toward (
x, y) as t . They are not necessarily straight line solutions, since nonlinear terms in u and v have been thrown away, and
as we move away from (u, v) = (0, 0) these nonlinear terms become signicant. The theorem, however, says that as t , these two trajectories approach (
x, y) in a direction
1 . Just as the separatrix for the linear
tangent to the eigenvector line l1 corresponding to U
system separates solutions going in dierent directions, these corresponding curves (called
the stable manifold of the saddle point) do the same thing for the nonlinear system.
10
Example 5.2.2 Find eigenpairs for the matrix J( 10
3 , 3 ) in Example 5.2.1 and use them to
draw an approximation to the stable(manifold for)the system (5.4)
23 43
0.5101
Approximate eigenpairs for J =
are (2.915,
)
0.8601
83 43
(
)
0.6446
and (0.915,
). If is very small, good approximations to initial points for
0.7645
10
10
the two pieces of the stable manifold are given by ( 10
3 + 0.5101, 3 + 0.8601) and ( 3
10
0.5101, 3 0.8601). Do you see why? The trajectories through these points must be
computed numerically for negative values of t. Figure 5.14 shows numerically computed
trajectories with = 0.01 and 8 t 0. Solutions have also been drawn through the initial
10
10
10
points ( 10
3 0.6446, 3 + 0.7645) and ( 3 + 0.6446, 3 0.7645). These two trajectories
correspond to the solutions of the linear system along the other eigenvector line l2 .

We see that trajectories in the phase plane have now been clearly separated into two
dierent types; those on the left of the stable manifold end up at the sink (0, 10) and those on
the right end up at (10, 0). Proof of this last statement depends on a third theorem, called the
Poincar
e-Bendixson Theorem, which describes the possible types of limiting behavior
194

10
8
y 6
4
2
0

6
x

10

10
Figure 5.14: Stable manifold of the saddle point at ( 10
3 , 3 )

(in the phase plane) of solutions of two-dimensional autonomous systems. Basically, it says
that as t every solution that remains bounded must approach either an equilibrium
point or a closed orbit in the plane. In the next section, we will see an example of a nonlinear
system which has a closed orbit called a limit cycle.

Exercises 5.2 Four nonlinear models are described below. For each one:
a. Use the x and y nullclines to nd all of the equilibrium points in the given region of
the phase plane.
b. Compute the Jacobian matrix of the system.
c. Determine the type of each equilibrium point (if possible).
d. Use the information from part c to sketch a phase portrait by hand. Show as much
detail as you can.
e. Use technology to draw a phase portrait, and compare it to your sketch from part
d. Plot enough solution curves to determine the behavior of solutions everywhere in the
specied region of the phase plane. Use whatever technology you have available, or use the
applet at uhaweb.hartford.edu/rdecker/MathletToolkit/SystemsBook.htm.
1. Competing species model. The functions x(t) and y(t) represent the population
size, at time t, of two competing species in the same ecosystem. Their growth equations
are given by
x
y

= x(1 x) xy
1
3
= y( y) xy.
4
2
195

## Let x vary between 0 and 1.5, and y between 0 and 1.5.

2. Damped pendulum model. This is similar to the equation that was discussed in
Chapter 3.8. The second-order equation + + 4 sin() = 0 is converted into the
system
x
y

= y
= 4 sin(x) y.

## Let x vary between 8 and 8, and y between 10 and 10.

3. Western grasslands model. This is a model of the competition between good
grass and weeds, on a xed area of rangeland where cattle are allowed to graze. The
two dependent variables g(t) and w(t) represent, respectively, the fraction of the area
colonized by the good (perennial) grass and the weeds at any time t. The model is
given by
g
w

E+g
)
0.31E + g
0.31E + g
= Rw w(1 w 1.07g
).
E+g
= Rg g(1 g 0.6w

The parameters Rg and Rw represent intrinsic growth rates of the grass and weeds,
respectively; and the cattle stocking rate is introduced through the parameter E. For
this problem, assume Rg = 0.27, Rw = 0.4, and E = 0.3. With these parameter
values, there are 3 equilibrium points, (0, 0), (0, 1), (1, 0), on the boundary of the region
; that is, points at which one or both of the species have died out. There are two
more equilibrium points in the interior of the region. One of these latter two is a
sink, and represents a stable situation in which the grass and the weeds both survive
in abundance.
For a very nice write-up of this problem, by the authors Dr. Thomas LoFaro, Dr.
Kevin Cooper and Dr. Ray Huaker, you can go to their web site:
www.sci.wsu.edu/idea/Range.
4. Predator-prey model. In this model, x(t) represents the number of predators at
time t, and y(t) is the number of prey. Notice that the predators are aected positively
by their interactions with the prey, while the aect of the interaction on the prey is
negative. If no prey are available, the predators will die out exponentially.
x

= x + xy

= 4y 2xy.

196

5.3

## Bifurcations for Systems

A second-order dierential equation or system of rst-order equations may have an unspecied parameter in it. In this case we can still often determine the stability of the xed points
using the trace and determinant or the eigenvalues of the Jacobian. Since the trace and
determinant often result in simpler expressions to work with than the eigenvalues, we will
focus on the former approach in this section.
Example 5.3.1 For the system of equations given by
x
y

= x(1 x) + y
= y axy

there is a xed point at x = 1, y = 0. Show this, and then determine the stability of this
xed point. Your answer should depend on the value of a.
To show that x = 1, y = 0 is a xed point, we need only substitute these values into the
right-hand sides of the dierential equations. We get 1(1 1)[+ 0 = 0 and 0 a(1)(0)
] = 0.
1 + 2x
1
The Jacobian matrix for this system would be J(x, y) =
. When
ay ] 1 ax
[
1
1
the Jacobian is evaluated at x = 1, y = 0 we get J(1, 0) =
so that the trace
0 1a
and determinant at x = 1, y = 0 are tr(J(1, 0)) = 2 a and det(J(1, 0)) = 1 a. Since we
know that a xed point is a saddle if the determinant is negative, the xed point at (1, 0)
is a saddle if 1 a < 0 , that is, if a > 1. For a < 1, we have det(J(1, 0)) > 0 and so
tr(J(1, 0)) > 1. Thus the point (1, 0) is either a source or spiral source. To be a spiral
source we would need det(J(1, 0)) > 41 tr(J(1, 0))2 , that is 1 a > 14 (2 a)2 . Solving this
inequality we get a2 < 0. Since this is not true for any real value of a, the point (1, 0) is
never a spiral source. Hence (1, 0) is a source for a < 1. Note: at a = 0 the (trace, det)
point lies on the parabola det = 41 tr2 , which in turn corresponds to equal (and in this case
positive) eigenvalues, which still results in a (non-spiral) source. In Figure 5.15 we show
phase portraits corresponding to values of the parameter a that are below, at, and above the
value a = 1.
In many cases we want to determine the xed points and their stability as the parameter
varies. As with rst-order dierential equations, for systems of rst-order equations we say
that a bifurcation occurs when the number of xed points, or when the stability type of
one or more xed points, changes as the parameter goes through some value (called the
bifurcation value). Thus in Example 5.3.1 we have a bifurcation at a = 1.
In terms of the trace-determinant plane, we are looking for values of the parameter where
the point (trace, det) crosses from one of the key regions of the trace-determinant plane into
another (trace and det refer to the trace and determinant of the Jacobian at a given xed
point). We illustrate these ideas with two more examples.
Example 5.3.2 Consider the damped pendulum model from the exercises of the last section,
given by
x
y

= y
= 4 sin(x) ay.
197

(a) a = 0.5

(b) a = 1

(c) a = 1.5

Figure 5.15: Phase portraits for bifurcations of the system x = x(1 x) + y, y = y axy
where we have added the parameter a to represent the amount of damping in the system.
For a > 0 there is positive damping, and for a < 0 there is negative damping. Negative
damping is not physically realistic in a real pendulum (it tends to speed up the pendulum in
the direction that it is already moving, rather than slowing it down), but we can still study
the mathematics for a either positive or negative.
Determine the bifurcation values in terms of the parameter a, that is, determine the
values of a for which the number of xed points or the stability type of any of the xed points
changes.
First we must determine the equilibrium points in terms of the parameter a. We get
y = 0 and 4 sin(x) ay = 0. This implies that sin(x) = 0, and so the equilibrium
values are given by (0, 0), (, 0), (2, 0), ... or equivalently at (n, 0) where n can be any
nonnegative integer.
[
]
0
1
Next we nd the Jacobian at each equilibrium point. We have J =
. At
[
] 4 cos(x) a
0
1
the points (n, 0) for n even we get Jn even (n, 0) =
and for n odd we get
4
a
[
]
0 1
Jn odd (n, 0) =
.
4 a
Now nd the trace and determinant for each case. For both cases we get trace(J) = a.
For n even we get det(Jn even ) = 4 and for n odd we get det(Jn odd ) = 4. Thus, for n odd
we always have a saddle point. For n even, we can have a source, spiral source, spiral sink
or sink. Thus there will be 3 values of a at which bifurcations occur, all involving the xed
points at (n, 0) for n even.
[
]
0
1
To nd the bifurcation points, we only need to look at Jn even (n, 0) =
. We
4 a
[
]
[
]
0
1
0
1
have trace
= a and det
= 4. Letting a vary from to , the
4 a
4 a
rst bifurcation occurs when the point (trace, det) = (a, 4) crosses from the source region
to the spiral source region . This would be when 4 = 14 a2 (with a < 0), and hence when
a = 4. The next bifurcation occurs when the point (trace, det) = (a, 4) crosses from the
spiral source region to the spiral sink region, which is when trace = a = 0, and hence
198

a = 0. The last bifurcation occurs when the point (trace, det) = (a, 4) crosses from the
spiral sink region to the sink region, which is when 4 = 14 a2 again, but this time with a > 0,
and so a = 4. We illustrate with a number line for the parameter a in Figure 5.16.

## Figure 5.16: Parameter number line for bifurcations of a damped pendulum

It also helps to see what is going on here using a trace-determinant plot. In Figure
5.17 the points along the horizontal line at det = 4 represent the trace and determinant of
Jn even (n, 0) for various values of a. Note that this line is essentially the number line
from Figure 5.16, after being ipped (because the trace of Jn even (n, 0) is a).
9
8
7
6
5
a=4

a=0

a=-4

3
2
1

## Figure 5.17: Bifurcations of a damped pendulum in the trace-determinant plane

In Figure 5.18 we show phase portraits for values of a at and between the bifurcation
values a = 4, a = 0, and a = 4.
Example 5.3.3 The system x = ax(1x)xy, y = 12 y+xy, could be used as a model for
a predator-prey system of two species, with x representing the prey, and y the predators. For
this system, in the absence of predators, we are left with the single equation x = ax(1 x).
For a positive this represents logistic growth with carrying capacity of 1 unit; for a negative
it represents a model where for any initial x value for which 0 < x < 1, the solution goes
asymptotically to zero, and for any initial x value for which x > 1, the solution increases to
innity. In the absence of prey, we get only the equation y = 21 y for which the solution
goes to zero for any initial condition.
For this system, determine all xed points, and then determine all bifurcations for the
entire system (consider all xed points) in terms of the parameter a. Discuss the results in
terms of the predator-prey system.
Solving ax(1 x) xy = 0 and 12 y + xy = 0 simultaneously we get the xed points
(0, 0), (1, 0), and ( 21 , 21 a). The rst xed point represents no predators or prey, the second
prey only, and for positive a, the third xed point represents predators and prey coexisting.
When a is negative the third
realistic. The general Jacobian
[ xed point is not physically
]
a(1 2x) y
x
matrix would be J(x, y) =
.
y
12 + x
199

(a) a = 6

(b) a = 4

(e) a = 2

(c) a = 2

(f) a = 4

(d) a = 0

(g) a = 6

## Figure 5.18: Phase portraits for bifurcations of a damped pendulum

the xed point (0, 0) rst. The Jacobian for this xed point is J(0, 0) =
[ We consider
]
a 0
. Since det(J(0, 0)) = 12 a < 0 for a > 0, the origin is a saddle for positive a.
0 21
For a < 0, det(J(0, 0)) > 0 and tr(J(0, 0)) = a 21 < 0 so the origin is a sink of some
type. The inequality det > 14 tr2 (the condition for a spiral sink) for this xed point becomes
12 a > 14 (a 12 )2 which is equivalent to (a + 21 )2 < 0, and hence has no solutions. Thus for
negative a the origin is a sink, and the bifurcation point is at a = 0.
[
]
a 1
Next we look at the xed point (1, 0). The Jacobian is J(1, 0) =
so that
1
0
2
tr(J(1, 0)) = 21 a and det(J(1, 0)) = 12 a. Thus we get a saddle for a > 0 and source of
some type for a < 0 (det > 0 and tr > 0). The condition det > 41 tr2 for a spiral source
becomes 12 a > 14 ( 12 a)2 which, as we saw above, has no solutions. Therefore we get a
source for a < 0, and again, the bifurcation point is a = 0.
]
[ 1
2 a 12
, tr(J( 21 , 21 a)) = 12 a
Finally, for the xed point
we have
= 1
0
2a
and det(J( 12 , 21 a)) = 14 a. For a < 0 we get a negative determinant and hence a saddle. For
a > 0, det > 0 and tr < 0 and therefore some type of sink. The condition for a spiral sink
is 14 a > 41 ( 12 a)2 , or equivalently, a(a 4) < 0. This will be true if 0 < a < 4. Thus for
0 < a < 4 we get a spiral sink and for a > 4 we get a sink. The bifurcation points are a = 0
and a = 4.
( 12 , 12 a)

J( 12 , 21 a)

200

To summarize the above results, there are 2 bifurcation points in terms of the parameter
a. As a increases we nd that at a = 0 the xed point at (0, 0) changes from a sink to a
saddle, the xed point at (1, 0) changes from a source to a saddle, and the xed point ( 21 , 12 a)
changes from a saddle to a spiral sink. At a = 4 the xed point at ( 21 , 12 a) changes from a
spiral sink to a sink. See Figure 5.19 for phase portraits representing values of a between
and on either side of the bifurcation points.

(a) a = 1

(b) a = 1

(c) a = 6

## Figure 5.19: Phase portraits for bifurcations of a predator-prey model

The parameter a represents the small-population growth (or decay) rate for the prey in the
absence of predators. For positive values of a all positive initial conditions will eventually go
to the equilibrium point at ( 12 , 12 a) . The larger the value of a, the higher the nal population
value of the predators will become, though the prey value will always settle at 12 . For positive
values of a less than 4 the populations will oscillate as they approach the nal values; for
values of a greater than 4 the populations do not oscillate.
For negative values of a, the absence of predators results in a prey population which goes
to zero asymptotically if it starts out below 1, and increases without bound if it starts above
1. For this case, for all positive initial values both populations go extinct (asymptotically).
Note that when there are few predators initially, and the initial prey population is above 1,
the prey increase dramatically at rst, but eventually enough predators enter to drive the
system back to extinction.
Exercises 5.3 For each system below, nd all equilibrium points, and bifurcation values for
the given parameter
1. x = y, y = ax y
2. x = y, y = x by
The dierential equation x + ax + x3 bx = 0 can be used to model a double well
potential mechanical system (in the literature it is referred to as a Dung equation).
An example of such a system would be an upright exible beam, xed at the bottom but
free at the top, with x measuring the distance from the vertical at the top of the beam.
If the beam is exible enough, it will op to the left or right and come to rest there. The
parameter a represents the amount of damping in the system, and b is a measure how
far the beam will op to either side when it comes to rest (a measure of the rigidity of
201

the beam). When put into system form this equation becomes x = y, y = ayx3 +bx
(show this). For the next two problems below, nd all equilibrium points for each
system in terms of the given parameter, and then nd the trace and determinant of
the Jacobian matrix for each xed point. Using this information nd all bifurcation
values in terms of the given parameter for each system. Explain what this means in
terms of the mechanical system. Consider all values of each parameter, even physically
unrealistic ones.
3. x = y, y = ay x3 + x
4. x = y, y = y x3 + bx
The system x = x(1 x) axy, y = y + bxy can be used as a model for a predatorprey system, with x representing the number of prey, and y representing the number
of predators (see the third example from this section). The parameter a represents
the degree to which interactions between the species subtracts from the prey, and b
represents the degree to which interactions between the species adds to the predators.
For the next two problems below, nd all equilibrium points for each system in terms of
the given parameter, and then nd the trace and determinant of the Jacobian matrix
for each xed point. Using this information nd all bifurcations values in terms of the
given parameter for each system. Explain what this means in terms of the predatorprey system. Consider all values of each parameter, even physically unrealistic ones.
5. x = x(1 x) axy, y = y + xy
6. x = x(1 x) xy, y = y + bxy

5.4

Applications

This section contains three applications coming from real world problems in various elds
of science and engineering.
I. The Van der Pol Equation
The nonlinear second-order dierential equation
x + (x2 1)x + x = 0

(5.5)

is named for an electrical engineer, Balthasar Van der Pol (1889-1959), and came out of
work he was doing with oscillator circuits for radios, in 1924. In the early twentieth century
radios were made using vacuum tubes; transistors had not yet been invented.
In Chapter 6 we will see that in a simple linear RLC circuit the current I(t) satises a
dierential equation of the form LI + RI + C1 I = E (t). The term RI is the derivative
of V = RI, the voltage drop across the resistor. In the circuit Van der Pol was studying,
this voltage drop was modelled by a nonlinear function of the form V = f (I) = bI 3 aI.
df dI
2

## The time derivative of this term, by the Chain Rule, is d(fdt(I)) = dI

dt = (3bI a)I (t).
A simple change of variables can be used to reduce the resulting homogeneous equation,
LI + (3bI 2 a)I + C1 I = 0, to the standard form given in (5.5).
202

## Equation (5.5) is a second-order, nonlinear, autonomous equation, and we know that

such an equation can be written as a system by introducing a new variable y = x . In this
case, the equivalent system is
{
x = y
= f (x, y)
.
(5.6)
y = x (x2 1)y = g(x, y)
Notice that this system contains a parameter , and it will be of interest to see how the
behavior of the system depends on the value of .
To nd the equilibrium solutions of (5.6), we set f (x, y) = g(x, y) = 0. The only
point (x, y) in the phase plane for which both f and g are simultaneously zero is the origin
(x, y) = (0, 0). (Check it!) To determine the behavior of the system close to this equilibrium
point, we compute the Jacobian matrix
(
) (
)
f
f
0
1
x
y
J(x, y) =
=
.
g
g
1 + 2xy (x2 1)
x
y
(
At the equilibrium point, J(0, 0) =

0
1

)
, with (tr(J), det(J)) = (, 1). As the

3 det
SPIRAL
SINK 2

SPIRAL
SOURCE

det=tr2 /4

1
SINK

SOURCE

tr
4

2
1

## Figure 5.20: Position in trace-det plane as varies

parameter varies from to , the corresponding point (tr, det) = (, 1) in the tracedet plane moves along the horizontal line det 1 (see Figure 5.20); and a bifurcation occurs
three times, as passes through the values 2, 0, and 2. This means that the origin in the
phase plane is a sink if < 2, a spiral sink if 2 < < 0, a spiral source if 0 < < 2
and a source if > 2. Note that at = 0 the equation becomes the undamped mass-spring
equation x + x = 0 which we know has a center at (0, 0). In the physical problem studied
by Van der Pol the value of is positive, and as a rst example we will look at the behavior
of solutions of equation (5.5) with = 1.
A phase portrait for this equation is shown in Figure 5.21. As expected, the origin is a
spiral source; however, as solutions move away from the origin they all become attracted to
a periodic solution (called a limit cycle). There is actually a way to prove the existence of
a limit cycle in this particular case. Solutions that start outside this cycle also approach it
from outside as t . We might have expected something like this to occur if we think of
the Van der Pol equation as a mass-spring equation with nonconstant damping coecient
203

phase portrait
4

4

y 2

period

x 2

2
x

10

15

20

25

## Figure 5.21: Van der Pols equation with = 1

(x2 1). Since the damping is positive if x > 1, solutions that start with x large are
slowed down, but solutions for which x < 1 are pushed away from the origin (by the negative
damping).
Exercises:
1. Think about what the phase portrait should look like if = 3. Use technology to
construct this phase portrait, and describe, as precisely as you can, how it diers from
the phase portrait shown in Figure 5.21.
2. For = 0.5, 1.0, 2.0, 4.0, and 7.0 draw time plots, through the initial point (x(0), y(0)) =
(2, 1), showing the solution of (5.5) on the interval 0 t 15. For each value of ,
measure the period of the oscillation (refer to Figure 5.21). State as precisely as you
can how the period varies with .
3. Decide what you think should happen when is negative. Construct a phase portrait
for = 1 and describe it in your own words.

204

## II. The Wilson-Cowan Equations

In Section 2.8 we looked at the single neuron equation, which models the behavior
of a neuron (nerve cell) receiving inputs from the cells around it. An extension of this
model was studied by two University of Chicago mathematicians, H. R. Wilson and J. D.
Cowan, in a paper entitled Excitatory and inhibitory interactions in localized populations
of model neurons published in 1972. Their system of equations models the behavior of
two interconnected populations of neurons; a population E of excitatory cells (these have
a positive eect on the cells to which they are connected) and a population I of inhibitory
cells (which have a negative eect on cells to which they are connected).
A very simple form of this system can be written as:
{
x (t) = x(t) + S(ax(t) by(t) x ) = f (x, y)
,
(5.7)
y (t) = y(t) + S(cx(t) dy(t) y ) = g(x, y)
where x(t) and y(t) are the percent of cells active at time t in the populations E and
I, respectively. The function S(z) determines the average response of neurons to a given
amount z of synaptic input, and we will use the response function
S(z) =

1
1 + ez

which was also used in the Single Neuron problem in Section 2.8. This is a highly nonlinear
function which increases monotonically from 0 to 1 as t goes from to +. The positive
constants a, b, c, and d are used to model the eect of the neurons in one population on those
in each of the other two populations. For example, b is a measure of the eect of neurons in
population I on those in population E. The constants x and y represent threshold values
for the excitatory and inhibitory cells, respectively; that is, total input to the cell must be
close to, or above, the threshold value in order to produce a signicant response.
As an example, consider the following system:
{
x (t) = x(t) + S(11x(t) 5.5y(t) 3.1) = f (x, y)
.
(5.8)
y (t) = y(t) + S(8x(t) 3.3y(t) 3.3)
= g(x, y)
The nullcline for x is the curve dened by x = S(11x 5.5y 3.1). In Chapter 2 we showed
S
that the response function S(z) has the inverse z = ln( 1S
); therefore, the nullcline for x
can be written in the form
x
11x 5.5y 3.1 = ln(
).
1x
Solving this for y,
y=

1
x
(11x 3.1 ln(
)).
5.5
1x

(5.9)

Similarly, by setting g(x, y) = 0, the nullcline for y can be written in the form:
x=

1
y
(ln(
) + 3.3y + 3.3).
8
1y

205

(5.10)

1
y=0

0.8

x=0

0.6
0.4
0.2
0

0.2

0.4

0.6
x

0.8

## Figure 5.22: Phase plane for the Wilson-Cowan system (5.8)

These two nullclines are shown (dotted) in the phase plane for (5.8) in Figure 5.22. For
the particular values of the parameters in (5.8), there can be seen to be three equilibrium
solutions; that is, points of intersection of the x and y nullclines. By replacing x in
equation (5.9) with its value in (5.10), a numerical solver can be used to nd the following
three equilibrium points:
P1 (0.065878, 0.050266)
P2 (0.275625, 0.163299)
P3 (0.938135, 0.818282).
To determine the type of each equilibrium, we need the Jacobian matrix of the system (5.7).
The necessary partial derivatives are
f
f
= 1 + aS (ax by x ),
= bS (ax by x )
x
y
g
g
= cS (cx dy y ),
= 1 dS (cx dy y ).
x
y
These can be simplied by remembering the formula for S derived in Chapter 2; that
is, S (z) = S(z)(1 S(z)). Using the fact that at any equilibrium point (
x, y), we have
f (
x, y) = g(
x, y) = 0, we can write
S(a
x b
y x ) = x

and
S(c
x d
y y ) = y;
206

therefore,
(
J(
x, y) =

1 + a
x(1 x
)
c
y (1 y)

b
x(1 x
)
1 d
y (1 y)

)
.

(5.11)

In the exercises below you are asked to use this Jacobian to determine the type of each of
the equilibrium points P1 , P2 , and P3 .
Exercises:
1. Use equation (5.11), with the values of the parameters in system (5.8), to compute
the Jacobian matrix at each of the three equilibrium points P1 , P2 , and P3 . Determine
the type of each of these equilibria.
2. If the equilibrium (
x, y) is a saddle point, nd eigenpairs for the matrix J(
x, y). Use
these to sketch the stable manifold of the saddle point.
3. Using the information obtained in exercises 1 and 2, draw a complete phase portrait
for the system (5.8). Describe, as precisely as you can, how the solutions behave,
depending on their initial values.
4. Suppose the excitatory cells are receiving additional negative input from outside the
two populations of cells. This could be modelled by adding a quantity e(t) to the
argument of the response function in the equation for x (t); that is, by writing x (t) =
x(t) + S(ax(t) by(t) x e(t)). Assuming e(t) = e for some positive constant e,
how would this change the position of the x -nullcline, given by equation (5.9)?
5. Estimate how big e must be to cause a bifurcation of the system (remember that the
value of e is being subtracted ? If e is increased beyond the bifurcation value, how
many equilibrium solutions will there be? Will the resulting level of activity in the
two populations of neurons converge to a limit closer to 0 or to 100%? Explain, and
justify your explanation in terms of the biological model.

207

## III. A Periodically Harvested Logistic Growth Model

Our third application results in a totally dierent type of equation. We originally looked
at the logistic growth equation with harvesting in Chapter 2, when we studied bifurcations
of autonomous rst-order equations. Suppose that, instead of constant harvesting, we want
to study the eects of periodic harvesting. For example, allowing hunting and shing during
specied seasons could produce this type of situation. In this case the resulting dierential
equation might have the form
P
dP
= rP (1 ) H(t),
dt
N

(5.12)

where the harvesting term H(t) is a periodic function of time. Equations of this type
come under the heading of rst-order dierential equations with periodic coecients. Some
books refer to this as an equation of dimension one and a half, and of course it is not an
autonomous dierential equation.
When the magnitude of H(t) in equation (5.12) is small, it can be shown that the two
equilibrium solutions of the autonomous equation, with H equal to a constant, are replaced
by two periodic solutions that oscillate closely about the former equilibrium solutions. As
in the constant case, one of the periodic solutions is stable and the other is unstable. As an
example, consider the equation
dP
P
= 0.2P (1 ) h(1 + 0.3 sin(t)).
dt
4

(5.13)

4
3
P(t) 2
1

10

20
t

30

40

## Figure 5.23: Solutions of (5.13), with small magnitude harvesting h = 0.1

The frequency can be chosen to make the harvesting period a day, a week, a year, etc.
Letting = 1 and the harvesting magnitude h = 0.1, the slope eld for equation (5.13)
is shown in Figure 5.23. It can be seen that there is an upper stable (attracting) solution
and a lower unstable (repelling) solution, both of which are periodic with period 2. Any
solution that has its initial value above a certain positive value is attracted to the stable
208

periodic solution. If the initial population is below that value, the population will become
extinct over time.

4
3
P(t) 2
1

10

20
t

30

40

## Figure 5.24: Solutions of (5.13) with large magnitude harvesting h = 0.3

Just as with constant harvesting, if the value of the parameter h is too large then
the population will become extinct no matter what initial population is assumed. This is
demonstrated in Figure 5.24, where the harvesting magnitude has been increased to h = 0.3.
Question: Is there a bifurcation value h such that if h < h the equation has two periodic
solutions and if h > h the population goes extinct for all values of P (0)?
The answer is yes, and it was shown in a very recent paper that the bifurcation value h can
easily be found numerically to any desired accuracy. For equation (5.13), h 0.1999909,
and Figure 5.25 shows solutions of (5.13) when h = h . Notice that when h = h there is

4
3
P(t) 2
1

20

40

60

80

100

120

## Figure 5.25: Solutions of (5.13) with the harvesting parameter h = h

exactly one periodic solution which attracts solutions from above and repels those below it.
This is exactly analogous to the semi-stable node in the constant harvesting case.

209

Exercises:
In the paper mentioned above, the theorem that allows one to determine the bifurcation
value of the harvesting parameter, states that for an equation in the form
dy
= Ry(1 y) (1 + sin(2 ))
d

(5.14)

R
the bifurcation value of lies between 4(1+)
and R4 , and can be found by varying
between these values until the solution of (5.14) with initial value y(0.25) = 0.5 also satises
the condition y(0.75) = 0.5. The particular solution y( ) satisfying these two conditions is
the single (semi-stable) periodic solution of equation (5.14) for the value = .

## 1. Show that if the change of independent variable t = 2 is made in equation (5.13) it

becomes
dp
= 2[0.2p(1 p/4) h(1 + 0.3 sin(2 ))],
d
where p( ) = P (t). Hint: use the chain rule

dP
dt

(5.15)

dp d
d dt .

2. Substitute y( ) = p( )/4 into equation (5.15), and show that in terms of y the equation
becomes
dy

## = 0.4y(1 y) h(1 + 0.3 sin(2 )).

d
2
This equation has the form given in equation (5.14), with R = 0.4 and =

(5.16)
h
2 .

3. Now use the theorem to nd the bifurcation value h . You know that = h
2 must
R
0.4
0.1
lie between R4 = 0.4
=
0.1
and
=
=
.
Let
y(0.25)
=
0.5
and
4
4(1+)
4(1.3)
1.3
solve equation (5.16) to nd y(0.75). Vary h in the specied interval until the value
of y(0.75) is equal to 0.5.
4. Let h = h and work backwards from the value of y(0) to determine the corresponding
initial value P (0) for equation (5.13). This should be the value of P (0) such that P (t)
is the single semi-stable periodic solution? Does your value of P (0) check out with
Figure 5.25?

210

Chapter 6
Laplace Transforms

In this chapter we introduce yet another method for solving linear dierential equations.
The method applies to linear equations of any order. Although we already have methods for
solving linear equations with constant coecients, the method of Laplace Transforms gives
the solution in a slightly dierent form; instead of arbitrary constants, the solution contains
the initial conditions directly. This method is also very useful for non-homogeneous problems
where the forcing function is dened piecewise, or contains an impulse function (impulse
functions have not been encountered yet). Finally, this method is useful for interpreting
solutions to mass-spring problems and to electrical circuit problems.

6.1

## Simple Laplace Transforms

In this section we introduce the concept of the Laplace transform, and nd a few useful,
but elementary, transforms. We then demonstrate how to solve dierential equations using
Laplace transforms, in cases where the dierential equation is relatively simple.
Denition 6.1 The Laplace transform of a function f (t), t > 0, is a new function F (s)
dened as

F (s) =
est f (t)dt.
0

## We also use the notation

F (s) = L[f (t)]
where L is called the Laplace operator.

## The Laplace transform turns a function of t into a dierent function of s; or, as an

engineer might say, it transforms a function from the t-domain into the s-domain. We will
use the convention that lower case letters such as f , g, and h, represent functions of t,
and the corresponding upper case letters F , G, and H, represent the Laplace transforms of
those functions (and hence are functions of s). Our goal is rst to build a table of Laplace
transforms for the functions that come up frequently in dierential equations; exponential
functions, trig functions, and polynomials. We will also need a few general properties of
Laplace transforms, that apply to arbitrary functions. It will then be shown how to solve
certain dierential equations using these new tools.
211

Note that the integral, in the denition of the Laplace transform, is an improper integral ;
and in Calculus you were taught to evaluate it as a limit:

## est f (t)dt lim

est f (t)dt.

When working with Laplace transforms, we will require that any function f (t) that is to be
transformed must be at least piecewise continuous and of exponential order.
Denition 6.2 A function f (t) is said to be of exponential order if there exist positive
constants M, a and T such that
|f (t)| < M eat for all t T.

t=
With this assumption, the integral 0 est f (t)dt and expressions such as est f (t)|t=0
will always be dened for s large enough; that is, we will not have to worry about the
existence of limits as t .
Theorem 6.1 The Laplace transforms of the functions eat , cos(bt), sin(bt), and tn , as well
as the constant function c, are given in the table below. In the table a, b and c can be any
real numbers, and n 0 is an integer.
function
Laplace transform
formula
f (t)
F (s) = L[f (t)]
c
1
c
s, s > 0
1
2
eat
sa , s > a
s
3
cos(bt)
s2 +b2 , s > 0
b
4
sin(bt)
s2 +b2 , s > 0
n!
5
tn
sn+1 , s > 0
Proof: The rst two formulas are quite easy to establish, and we will prove them here.
The proofs of the next three will be done in the exercises. For 1 we have

t=
c
c

F (s) = L[c] =
est cdt = est
=0+
s
s
t=0
0
provided that s > 0. Similarly for 2

F (s)

at

L[e ] =

e
0

st at

e dt =

(s+a)t

t=

1
(s+a)t
dt =
e

s + a
t=0

1
1
1
e
e0 =
s + a
s + a
sa

## as long as s > a (and hence s + a is negative).

In order to eectively use Laplace transforms we also need a few rules that apply to
functions in general, rather than to specic functions.

212

Theorem 6.2 The Laplace transforms in the table below apply to arbitrary functions f (t)
and g(t), whose Laplace transforms are F (s) and G(s) respectively, and real number constants a and b.
formula
6
7
8
9

function
f (t)
af (t) + bg(t)
f (t)
f (t)

Laplace transform
F (s)
aF (s) + bG(s)
sF (s) f (0)
s2 F (s) sf (0) f (0)

Proof: Six in the table is just the denition of the Laplace transform, included here for
completeness. Seven follows easily from the denition of the Laplace transform and the
properties of integration:

L[af (t) + bg(t)] =
est (af (t) + bg(t))dt = a
est f (t)dt + b
est g(t)dt
0

## = aL[f (t)] + bL[g(t)] = aF (s) + bG(s).

Eight in the table is derived using integration by parts:

t=

st
st

L[f (t)] =
e f (t)dt = e f (t) t=0
sest f (t)dt
0
0

= 0 f (0) + s
est f (t)dt = f (0) + sF (s).
0
st

provided that limt e f (t) = 0 for s > a, for some a (and this can be seen to be true for
any f (t) of exponential order). Nine can be proven using eight; we leave the details to the
exercises.
Comment: Seven is a very important property, called linearity (it implies that the
Laplace operator is a linear operator). Another way to state property seven using the
Laplace operator is
L[af (t) + bg(t)] = aL[f (t)] + bL[g(t)].
The basic idea with linear operators is that you can distribute them, and then pull out
constants.
Example 6.1.1 Find the Laplace transform of 2e3t + 4 sin(5t) 6t7 .
Using linearity we have
L[2e3t + 4 sin(5t) 6t7 ] = 2L[e3t ] + 4L[sin(5t)] 6L[t7 ].
Next we apply formulas 2 (a = 3), 4 (b = 5), and 5 (n = 7):
5
7!
1
+4 2
6 8
s+3
s + 25
s
20
30240
2
+

s + 3 s2 + 25
s8

## 2L[e3t ] + 4L[sin(5t)] 6L[t7 ] = 2

=
213

Example 6.1.2 Find the Laplace transform of both sides of the dierential equation y
2y = 3 cos(4t). Then equate the transforms of both sides and solve for Y (s), the transform
of the solution y(t).
On the left-hand side we use linearity followed by formulas 6 and 8:
L[y 2y] = L[y ] 2L[y] = sY (s) y(0) 2Y (s).
On the right-hand side, we use linearity followed by formula 3 (b = 4):
L[3 cos(4t)] = 3L[cos(4t)] = 3

s
.
s2 + 16

## Equating the transforms of both sides we get

sY (s) y(0) 2Y (s) =

s2

3s
.
+ 16

Then we move terms that do not have Y (s) in them to the right side, and factor out Y (s)
on the left:
3s
Y (s)(s 2) = 2
+ y(0).
s + 16
Finally, we divide by (s 2) and distribute to get
Y (s) =

3s
s2 +16

+ y(0)

s2

(s2

3s
y(0)
+
.
+ 16)(s 2) s 2

## Solving dierential equations and the Inverse Laplace transform

In example 6.1.2 we came close to solving the given dierential equation; all we need
to do is recover the solution y(t) from its transform Y (s). In order to go from the Laplace
transform of a function back to the original function we must apply the inverse Laplace
transform. We use the symbol L1 to denote the inverse Laplace transform operator. Thus,
if F (s) = L[f (t)], then f (t) = L1 [F (s)]. Just as the Laplace transform takes us from
the left column to the right column for formulas 1-9 in Theorems 6.1 and 6.2, the inverse
Laplace transform takes us from the right column to the left column.
Theorem 6.3 The inverse Laplace transform is a linear operator; that is, L1 [aF (s) +
bG(s)] = aL1 [F (s)] + bL1 [G(s)].
Proof. Apply L1 to both sides of L[af (t) + bg(t)] = aL[f (t)] + bL[g(t)].
In order to apply the inverse Laplace transform eectively in solving dierential equations, we need one more tool. Looking back at example 6.1.2, in order to[ nish o the
]
3s
problem and nd the inverse Laplace transform of Y (s) we need to nd L1 (s2 +16)(s2)
.
Since there is no form in the right column of formulas 1-9 in Theorems 6.1 and 6.2 that corresponds to this function of s, we need to apply a procedure that you may have encountered
in a calculus course: partial fractions.
Review of partial fractions
214

The idea of partial fractions is to rewrite a rational function (a ratio of two polynomials),
whose denominator is of higher order than the numerator, by factoring the denominator, and
expressing that rational function as a sum of new rational functions, whose denominators
1
are the factors of the denominator of the original function. For example, (x1)(x2)
can
1
1
3s
be rewritten as x2 x1 (show this). In example 6.1.2, (s2 +16)(s2) can be rewritten as
3
( 12
3/10
5 10 s)
3 1
12
1
3
s
= 10
s2 +
s2 +16
s2 + 5 s2 +16 10 s2 +16 after which the inverse Laplace transform
can easily be found (see the next example).
Partial fractions procedure:
Step 1: Starting with a rational function P (s)/Q(s), with the degree of the polynomial Q(s) greater than that of P (s), factor the denominator into linear and non-factorable
quadratic factors (we consider only real-valued factors). The single linear factors will have
the form as + b and the quadratic factors will have the form as2 + bs + c, with b2 4ac < 0 (if
b2 4ac 0 then the quadratic factor can itself be factored into linear factors). Repeated
linear factors will be of the form (as + b)n for some integer n 2.
A
Step 2: For the partial fraction expansion, assume the form as+b
for each single linear
Bs+C
factor in the denominator, assume the form as2 +bs+c for each single quadratic factor, and
D
E
Z
n
assume the form as+b
+ (as+b)
2 + . . . + (as+b)n for each repeated linear factor (as + b) . We
do not consider repeated quadratic factors, or any higher order factors, although these can
be easily handled by computer algebra systems.
Step 3: Set the rational function from Step 1 equal to the sum of the assumed forms from
Step 2, nd a common denominator, and then equate and multiply out the numerators.
Step 4: Equate coecients of like terms from the equation in Step 3. This will give
you n linear equations in n unknowns A, B, C, ... . Solve the set of equations in Step 3
using a standard technique such as Gaussian elimination, or even better, using a graphing
calculator or computer program.
Example 6.1.3 Find the partial fraction expansion for

s+2
(s+1)(s1)2 (s2 +1) .

## Step 1 is done since the denominator is already factored as much as possible, so we go

to Steps 2 and 3 and assume
s+2
A
Bs + C
D
E
=
+ 2
+
+
.
(s + 1)(s 1)2 (s2 + 1)
s+1
s +1
s 1 (s 1)2
The common denominator is (s + 1)(s 1)2 (s2 + 1) so
s+2
(s + 1)(s 1)2 (s2 + 1)

## A(s 1)2 (s2 + 1)

(Bs + C)(s + 1)(s 1)2
+
2
2
(s + 1)(s 1) (s + 1)
(s + 1)(s 1)2 (s2 + 1)
D(s + 1)(s 1)(s2 + 1)
E(s + 1)(s2 + 1)
+
+
2
2
(s + 1)(s 1) (s + 1)
(s + 1)(s 1)2 (s2 + 1)

s+2

## A 2As + 2As2 2As3 + As4

+C + Bs Cs Bs2 Cs2 Bs3 + Cs3 + Bs4
D + s4 D
+E + sE + s2 E + s3 E
215

Finally we go to Step 4 and equate the coecients of the various powers of s on both sides of
the equation (as well as the constant terms without s, as they can be considered coecients
of s0 = 1). This results in the following 5 linear equations in 5 unknowns:
s4
s3

:
:

0=A+B+D
0 = 2A B + C + E

s2 : 0 = 2A B C + E
s : 1 = 2A + B C + E
0
constants (s ) : 2 = A + C D + E
Solving this system using the solve command of a graphing calculator or computer software
we get
1
3
1
7
3
A = ,B = ,C = ,D = ,E =
8
4
4
8
4
thus we can write
1
3
7
3
s+ 1
s+2
4
= 8 + 42 4 8 +
.
2
2
(s + 1)(s 1) (s + 1)
s+1
s +1
s 1 (s 1)2

The good news is that if we have a computer algebra system available, we can get partial
fraction expansions directly. Most computer algebra systems have a command (such as
expand, on the TI-89 or TI-92) which will take a rational function as argument and produce
its partial fraction expansion. From this point forward in the text, we will not explicitly
derive partial fraction expansions, but will assume that the student is either comfortable
doing them by hand as in the previous example, or has a computer algebra system available
(preferably both).
Three step procedure for solving linear dierential equations using Laplace
transforms:
Step 1
Step 2
Step 3

## Take the Laplace transform of both sides of the dierential equation.

Solve for the transform of the solution Y (s).
Find the inverse Laplace transform of Y (s) to get the solution y(t).

Example 6.1.4 Use Laplace transforms to nd the solution to the dierential equation
y 2y = 3 cos(4t). This is the same dierential equation as in Example 6.1.2.
In Example 6.1.2 we took the Laplace transform of both sides of the dierential equation,
and solved for Y (s) (Steps 1 and 2 above) to get
Y (s) =

3s
s2 +16

+ y(0)

s2

(s2

3s
y(0)
+
.
+ 16)(s 2) s 2

## In order to nd L1 [Y (s)] we need to do a partial fractions expansion. We know that the

form of the expansion will be
A
Bs + C
3s
=
+ 2
.
(s2 + 16)(s 2)
s2
s + 16
216

## We can nd the values of A, B, and C as in Example 6.1.3 (nd a common denominator,

equate numerators, multiply out, equate coecients of like terms, solve the resulting linear
system), or we can use technology (e.g. the expand command of the TI-89). In either case
we get
3
3
10
s + 12
3s
10
5
=
+
.
(s2 + 16)(s 2)
(s 2)
s2 + 16
We next multiply out the second term, apply L1 , and use linearity to get
[
]
3s
1
L
(s2 + 16)(s 2)
[
[
[
]
]
]
3 1
1
s
1
3 1
12 1
=
L
L
+ L
10
(s 2)
10
s2 + 16
5
s2 + 16
The goal is now to get each expression in brackets above into a form where each term appears
in the right column of the table of Laplace transforms in Theorem 6.1 (formulas 1-5). The
rst two terms correspond to formulas
2 and 3 respectively. The third term needs a minor
to
t
formula
4;
we
need
16 = 4 in the numerator, so using linearity we write
[
]
[
]
1
1 1
4
1
L
s2 +16 = 4 L
s2 +16 to get
]
3s
(s2 + 16)(s 2)
[
]
[
]
[
]
3 1
1
3
s
12 1 1
4
L
L1 2
+
L
10
(s 2)
10
s + 16
5 4
s2 + 16
3 2t
3
3
e
cos(4t) + sin(4t).
10
10
5

L1
=
=

Finally, we get
[
]
3s
y(0)
L1 [Y (s)] = L1
+
(s2 + 16)(s 2) s 2
[
]
[
]
3s
y(0)
1
= L1
+
L
(s2 + 16)(s 2)
s2
[
]
[
]
3s
1
1
= L1
+
y(0)L
(s2 + 16)(s 2)
s2
3 2t
3
3
=
e
cos(4t) + sin(4t) + y(0)e2t .
10
10
5

y(t) =

Example 6.1.5 Solve the initial value problem y + y = sin(2t), y(0) = 3, y (0) = 0 using
Laplace transforms.
Here we put it all together, and see the solution to a dierential equation from beginning
to end. Taking the Laplace transform of both sides and using linearity (formula 7, Theorem
6.2) we have
L[y ] + L[y] = L[sin(2t)].
On the left side we use formulas 6 and 9 from Theorem 6.2, and on the right we use formula
4 from 6.1 to get
2
.
s2 Y (s) sy(0) y (0) + Y (s) = 2
s +4
217

## Putting in the initial conditions, and solving for Y (s) we get

s2 Y (s) 3s + Y (s) =
Y (s)(s2 + 1) =
Y (s) =

2
s2 + 4
2
+ 3s
s2 + 4
2
2
3s
s2 +4 + 3s
= 2
+
s2 + 1
(s + 4)(s2 + 1) s2 + 1

As+B
Cs+D
2
Using partial fractions on the rst term, we assume (s2 +4)(s
2 +1) = s2 +4 + s2 +1 and then
solve for the constants, or use the expand command of a computer algebra system to get
2
2
2
3
3
=

+
.
(s2 + 4)(s2 + 1)
s2 + 4 s2 + 1

## We now use the inverse Laplace transform to get

[
]
2
2
3s
y(t) = L1 [Y (s)] = L1 2 3 + 2 3 + 2
s +4 s +1 s +1
[
]
[ 2 ]
[
]
2
3s
1
1
1
3
3
= L
2
+L
+L
s +4
s2 + 1
s2 + 1
[
]
[
]
[
]
1 1
2
2 1
1
s
1
= L
+ L
+ 3L
3
s2 + 4
3
s2 + 1
s2 + 1
2
1
= sin(2t) + sin(t) + 3 cos(t).
3
3
You should determine which formulas were used at each step.

Exercises 6.1 Find the Laplace transforms for the functions in 1-4 below, using formulas
1-5 from Theorem 6.1 and linearity.
1. cos(t) + 2et .
2. 3 2t + 4t2 .
3. sin(3t) 2t5 + 5
4. 3e7t + 4 cos(8t) 3 + 5t2
For exercises 5-8, nd the Laplace transform of both sides of the dierential equation,
and then solve for Y (s).
5. y = y + 2
6. y + 2y = 4 sin(3t)
7. y + 4y = cos(t)
8. y + 4y = cos(2t)
For exercises 9-12, nd the inverse Laplace transform of Y (s) to get y(t).
218

9. Y (s) =

2
s5

3s
s2 +4

1
s2

10. Y (s) =

2
s+5

3
s2 +9

10
s5

11. Y (s) =

2
2s+5

3s
s2 +2

12. Y (s) =

2
3s5

3
2s2 +4

1
5s2

1
3s

For exercises 13-16 solve the dierential equation or initial value problem using the
three step procedure given in the text.
13. y + 4y = cos(t), y(0) = 2, y (0) = 0
14. y + 2y = 4 sin(3t), y(0) = 3
15. y + 4y = 0
16. y = y + 2
Use integration to prove the following formulas.
17. L[cos(bt)] =

s
b2 +s2 .

(formula 3)

Note: If you are familiar with complex numbers, it is easier to nd L[eibt ] and take its
real part.
18. L[sin(bt)] =

b
b2 +s2 .

(formula 4)

19. L[tn ] =

n!
xn+1 ,

## for any integer n 0. (formula 5)

Hint: rst show that L[t0 ] L[1] = 1/s and then use integration by parts to show that
L[tn ] = ns L[tn1 ].
20. Apply formula 8 to the function f (t), to prove the formula L[f (t)] = s2 F (s)sf (0)
f (0).

219

6.2

## Deriving More Laplace Transforms

In order to solve more dierential equations of interest (in the last section all of our second
order equations were missing the y term), we need a few more Laplace transform rules, and
an algebraic technique that you likely rst (and probably last) saw in high school.
We start with two rules that are of the general type; that is, they apply to general
functions f (t) as do the rules from Theorem 6.2 in the previous section. We will then show
how to derive new specic Laplace transform rules using these general rules.
Theorem 6.4 The Laplace transforms in the table below apply to a general function f (t),
whose Laplace transform is F (s), and to the arbitrary constant a.
formula function Laplace transform
10
eat f (t)
F (s a)
n
11
t f (t)
(1)n F (n) (s)
(n)
Note: F (s) represents the nth derivative of F (s)with respect to s .
Proof: The proofs of formulas 10 and 11 are left to the exercises.
Example 6.2.1 Derive rules for the Laplace transforms of eat cos(bt) and eat sin(bt).
We want to apply formula 10 with f (t) = cos(bt), but we rst need to nd F (s). We get
F (s) = L[f (t)] = L[cos(bt)] =

s
s2 + b2

## from formula 3 of Theorem 6.1. Now applying formula 10 we get

L[eat cos(bt)] = F (s a) =

sa
.
(s a)2 + b2

Similarly
L[eat sin(bt)] =
where this time F (s) =

b
s2 +b2

b
(s a)2 + b2

## from formula 4 of Theorem 6.1.

Example 6.2.2 Derive rules for the Laplace transforms of t cos(bt) and t sin(bt).
To nd L[t cos(bt)] we want to apply formula 11 with f (t) = cos(bt); we have F (s) =
s
L[f (t)] = L[cos(bt)] = s2 +b
2 as in the previous example. Now applying formula 11 with
n = 1 we get
L[t cos(bt)] =

## (1)F (s) = (1)

(quotient rule)
s2 b2
2.
(s2 + b2 )
220

(1)(s2 + b2 ) (s)(2s)
2

(s2 + b2 )

## Similarly to nd L[t sin(bt)] we use F (s) =

L[t sin(bt)]

=
=

b
s2 +b2

and hence

(1)F (s) =
2bs
(s2

(0)(s2 + b2 ) (b)(2s)
(s2 + b2 )

2.

+ b2 )

## Example 6.2.3 Derive a rule for the Laplace transform of tn eat .

To nd L[tn eat ] we choose to apply formula 10 from above with f (t) = tn . We have
n!
F (s) = L[f (t)] = L[tn ] = sn+1
from Theorem 6.1, formula 5, and so applying formula 10
we get
n!
L[tn eat ] = F (s a) =
.
(s a)n+1
Note: We could alternatively have used formula 11 from above; we leave this approach
to the exercises.
We summarize the results of the last three examples in Table form:
formula
12
13

function
eat cos(bt)
eat sin(bt)

14

t cos(bt)

15

t sin(bt)

16

tn eat

Laplace transform
sa
(sa)2 +b2
b
(sa)2 +b2
2
s b2
(s2 +b2 )2
2bs
(s2 +b2 )2
n!
(sa)n+1

## Table 1: Derived Laplace transforms

Example 6.2.4 Solve the initial value problem y + 2y + y = 0, y(0) = 3, y (0) = 0
using Laplace transforms.
We use the three step process: take the Laplace transform of both sides, solve for Y (s),
then nd the inverse Laplace transform of Y (s) to get y(t). Applying the Laplace operator
L to both sides of the dierential equation, using linearity, and substituting 3 for y(0) and
0 for y (0) we get
L[y + 2y + y] = L[y ] + 2L[y ] + L[y]
= s2 Y (s) sy(0) y (0) + 2 (sY (s) y(0)) + Y (s)
= s2 Y (s) 3s + 2sY (s) 6 + Y (s) = L[0] = 0.
Then solving the last line above for Y (s) we get
s2 Y (s) + 2sY (s) + Y (s) = 3s + 6
(
)
thus Y (s) s2 + 2s + 1 = 3s + 6
3s + 6
and so Y (s) =
2
s + 2s + 1
221

We now factor the denominator s2 + 2s + 1 = (s + 1)2 and expand the fraction into two
terms to get
3s + 6
3s
6
Y (s) =
=
+
.
(s + 1)2
(s + 1)2
(s + 1)2
Neither of the two terms of Y (s) corresponds to the right column of our Laplace transform
3s
tables exactly as is, so we must make some adjustments. For the rst term (s+1)
2 we observe
that if instead of s in the numerator we had (s + 1), then we could cancel and get a match
with formula 2 from the previous section. Thus we both add and subtract the number 1 as
follows:
3s
(s + 1)2

=
=
=

3(s + 1 1)
3(s + 1) 3
=
(s + 1)2
(s + 1)2
3(s + 1)
3

(s + 1)2
(s + 1)2
3
3

(s + 1) (s + 1)2

Y (s) =
=
=

3s
6
+
2
(s + 1)
(s + 1)2
3
3
6

+
(s + 1) (s + 1)2
(s + 1)2
3
3
.
+
(s + 1) (s + 1)2

## Finally we use linearity to get

y(t) =
=
=

[
]
3
3
L1 [Y (s)] = L1
+
(s + 1) (s + 1)2
[
]
[
]
1
1
3L1
+ 3L1
(s + 1)
(s + 1)2
3et + 3tet

using formula 2 with a = 1 on the rst term and formula 16 with n = 1 and a = 1 on
the second.

Before going much further, we need to review a technique that you probably rst encountered in high school, called completing the square.
Review of Completing the Square
The idea of completing the square is to write a quadratic factor as the sum of a squared
linear factor and a constant (both possibly multiplied by another constant). We illustrate
how to complete the square using 2s2 + 16s + 64 as an example:
1. Factor out the lead coecient a = 2 to get 2(s2 + 8s + 32).
222

2. Take half of the coecient of s in step 1 ( 12 (8) = 4 in this case) and then square that
number (42 = 16).
3. Add and subtract the result from step 2 inside the expression in step 1 to get 2(s2 +
8s + 16 16 + 32).
4. The rst three terms inside the parentheses from step 3 factor as a perfect square
s2 + 8s + 16 = (s + 4)2 , and the last two terms combine as 16 + 32 = 16, so that we
now have 2((s + 4)2 + 16).

This technique is used when you have a quadratic expression that cannot be factored,
appearing in the denominator of an expression for which you want
to nd
] the inverse Laplace
[
1
1
1
transform. For example, suppose that you want to nd L
s2 +2s+2 . Since s2 +2s+2 does
not directly correspond to the right column of our Laplace formulas, and since s2 + 2s + 2
1
cannot be factored (using real numbers), we need to rewrite the expression as s2 +2s+2
=
[
]
[
]
1
1
1
1
1
1
t
sin t from formula
s2 +2s+11+2 = (s+1)2 +1 . Then L
s2 +2s+2 = L
(s+1)2 +1 = e
13 with a = 1 and b = 1.
Note: An irreducible quadratic expression (i.e. one that can not be factored into the
product of two linear factors) is an expression of the form as2 + bs + c for which b2 4ac
is negative. You should factor quadratics that can be factored, and complete the square on
Example 6.2.5 Solve the dierential equation y + 4y + 8y = 0 using Laplace Transforms.
Compare the form of the solution obtained to the form that would be obtained using the
techniques of Chapter 3.
Taking the Laplace transform of both sides we get
( 2
)
s Y sy(0) y (0) + 4 (sY y(0)) + 8Y = 0.
Then we solve for Y as follows:
s2 Y + 4sY + 8Y
(
)
thus s2 + 4s + 8 Y
and so Y

## = sy(0) + y (0) + 4y(0)

= sy(0) + y (0) + 4y(0)
sy(0)
=
+
(s2 + 4s + 8)
4y(0)
y (0)
+
.
2
(s + 4s + 8) (s2 + 4s + 8)

The denominator of each expression s2 + 4s + 8 must either be factored and then expanded
(partial fractions) or it must be transformed by completing the square. Since b2 4ac =
42 (4)(8) = 16 we know that it cannot be factored, so we complete the square. Since
s2 + 4s + 8

= s2 + 4s + 4 4 + 8
= (s + 2)2 + 4
223

we get
Y

sy(0)
+
(s + 2)2 + 4
y (0)
4y(0)
+
.
(s + 2)2 + 4 (s + 2)2 + 4

Then we take the inverse Laplace transform of both sides, and using linearity we get
[
]
[
]
[
]
s
1
1

1
1
y(t) = L1 [Y ] = y(0)L1
+y
(0)L
+4y(0)L
.
(s + 2)2 + 4
(s + 2)2 + 4
(s + 2)2 + 4
(6.1)
The rst term in Equation 6.1 can be transformed to t formula 12 (add and subtract 2),
and the second and third can be transformed to t formula 13 (multiply and divide by 2).
For the rst term
[
]
[
]
s
s+22
1
1
y(0)L
= y(0)L
(s + 2)2 + 4
(s + 2)2 + 4
[
]
[
]
s+2
2
1
1
= y(0)L
y(0)L
(s + 2)2 + 4
(s + 2)2 + 4
=

## y(0)e2t cos 2t y(0)e2t sin 2t

using formulas 13 and 12 respectively (with a = 2 and b = 2). For the second term in
Equation 6.1 we again use formula 12 (with a = 2 and b = 2) to get
[
]
[
]
1
1

1
1
y (0)L
+ 4y(0)L
(s + 2)2 + 4
(s + 2)2 + 4
( )
[
]
( )
[
]
1
2
1
2

1
1
= y (0)
L
+4
y(0)L
2
(s + 2)2 + 4
2
(s + 2)2 + 4
1
=
y (0)e2t sin(2t) + 2y(0)e2t sin(2t).
2
Putting all three terms of Equation 6.1 together we get
y(t) =

## L1 [Y ] = y(0)e2t cos(2t) y(0)e2t sin(2t)

1
+ y (0)e2t sin(2t) + 2y(0)e2t sin(2t).
2

In Chapter 3, to solve y +4y +8y = 0, we would have used the roots of the characteristic
polynomial r2 +4r +8 to write down the general solution. (Do you see a relationship between
this characteristic polynomial and the polynomial Q(s) = s2 + 4s + 8 in the denominator of
Y (s) in the Laplace transform method?) In this case the roots are 2 2i and 2 + 2i, so
the general solution would be C1 e2t cos 2t + C2 e2t sin 2t. By factoring the Laplace solution
we could write
y(t) =

y(0)e2t cos 2t +
)
(
1
y(0) + y (0) + 2y(0) e2t sin 2t
2
224

which shows that C1 = y(0) and C2 = y(0) + 21 y (0) + 2y(0) = y(0) + 12 y (0). The solution
with the arbitrary constants C1 and C2 shows clearly the important concept that with a
second order linear dierential equation you need to nd two linearly independent solutions.
The Laplace solution also has two constants, y(0) and y (0), and the Laplace form shows
how the solution depends on the initial conditions.
We conclude this section with an example that requires several of the techniques that
we have encountered in the last two sections. The reader is invited to determine the details
of which Laplace formulas and techniques are used at each step.
Example 6.2.6 Solve the initial value problem y +4y +8y = 2 cos(t), y(0) = 0, y (0) = 1,
using Laplace Transforms.
Take the Laplace transform of both sides to get
(

)
s2 Y sy(0) 1 + 4 (sY y(0)) + 8Y =

so that

( 2
)
s + 4s + 8 Y =

and hence

2s
+1

s2

2s
+1
s2 + 1

2s
1
+
.
(s2 + 1) (s2 + 4s + 8) s2 + 4s + 8

Y =

Now apply partial fractions to the rst term (expand it) to get
14
8
65 s + 65
s2 + 1

Y =

64
14
1
65 s 65
+ 2
2
s + 4s + 8 s + 4s + 8

## Since s2 + 4s + 8 is irreducible we complete the square to get

Y =

8
14
65 s + 65
s2 + 1

14
65 s
2

64
65

(s + 2) + 4

(6.2)

(s + 2) + 4
14

s+

We can handle the rst term in Equation 6.2 by writing it as a sum of two terms 65s2 +165 =
14 s
8
1
65 s2 +1 + 65 s2 +1 and using formulas 3 and 4. The second term in Equation 6.2 is handled
by expanding it and then applying the add and subtract trick to get it into a form where
we can apply formulas 12 and 13.
14
65 s
2

64
65

(s + 2) + 4

14
s
64
1

65 (s + 2)2 + 4 65 (s + 2)2 + 4

14 (s + 2 2)
1
64

65 (s + 2)2 + 4 65 (s + 2)2 + 4
s+2
14
2
14
+

65 (s + 2)2 + 4 65 (s + 2)2 + 4
64
1

65 (s + 2)2 + 4
(then combing the second two terms)
36
14
s+2
1

2
65 (s + 2) + 4 65 (s + 2)2 + 4
225

## Equation 6.2 now becomes

Y =

14 s
8
1
14
s+2
36
1
1
+

+
65 s2 + 1 65 s2 + 1 65 (s + 2)2 + 4 65 (s + 2)2 + 4 (s + 2)2 + 4

(6.3)

Finally we combine the last two terms of Equation 6.3 and then apply the multiply and
divide trick to get
Y

=
=

8
14
14 s
1
s+2
29
1
+

+
65 s2 + 1 65 s2 + 1 65 (s + 2)2 + 4 65 (s + 2)2 + 4
14 s
8
14
29
1
s+2
2
+

+
65 s2 + 1 65 s2 + 1 65 (s + 2)2 + 4 130 (s + 2)2 + 4

Taking the inverse Laplace transform, and using the appropriate Laplace formulas (3, 4, 12,
13) we get
y(t) =

14
8
14
29 2t
cos(t) +
sin(t) e2t cos(2t) +
e
sin(2t).
65
65
65
130

Exercises 6.2 Solve each initial value problem 1-4 using Laplace transforms.
1. y + 2y + 2y = 0, y(0) = 1, y (0) = 0
2. y 4y + 8y = 0, y(0) = 1, y (0) = 0
3. y + 4y + 8y = cos(4t), y(0) = 0,
4. y + 4y + 4y = 4e2t , y(0) = 1,

y (0) = 0
y (0) = 0

Solve each dierential equation, using Laplace transforms, in terms of the initial conditions y(0) and y (0). Compare your solution to the general solution you would obtain
using the methods of Chapter 3 (identify the constants C1 and C2 ).
5. x + 6x + 9 = 0
6. y + 2y + 5y = 0
7. y + y = 4 cos(t)
8. y + 3y + 2y = 4e2t
9. Redo Example 6.2.3 using formula 11 instead of formula 10.
10. Use the integral denition of the Laplace transform to prove that L[eat f (t)] = F (sa),
where f (s) = L[f (t)].
11. Use the integral denition of the Laplace transform to prove that L[tf (t)] = (1) dF
ds .

226

6.3

## The Unit Step and Delta functions

It is common to encounter mechanical or electrical systems with various types of discontinuities. For an unbalanced engine on an airplane wing (essentially a forced mass-spring
system), whenever the engine is stopped or started, there is a discontinuity in the forcing
function. If the mass of a mass-spring system is hit with a hammer, there is a discontinuity
in the velocity of mass at the moment of impact. In an electrical system, any time a switch is
ipped, a discontinuity can occur in the input voltage. We will introduce two new functions
that help to model such behavior.
The (Heaviside) Unit Step Function
Denition 6.3 The unit step function, U (t), is dened as
{
0 t<0
U (t) =
1 t0
It follows that the shifted unit step function U (t c) (it is shifted c units to the right) would
have the denition
{
0 t<c
U (t c) =
1 tc
The graphs of U (t) and U (t c) are shown in Figure 6.1.
unit step function U(t)
2

## shifted unit step function U(t-c)

2

0
1

0
1

Figure 6.1: The unit step function and shifted unit step function

Note: The unit step function is sometimes called the Heaviside function and denoted
H(t) instead of U (t).
We use the unit step function U (t) and the shifted unit step function U (tc) to represent
functions which are dened piecewise. For example, we can represent the function

0
t<0

g(t) 0 t < a
f (t) =
(6.4)
h(t) a t < b

i(t) b t <
as
f (t) = g(t)U (t) + (h(t) g(t))U (t a) + (i(t) h(t))U (t b)

(6.5)

Of course, the same principle applies for a piecewise function with more than, or fewer than,
three pieces.
227

Note: For our purposes it will not matter how f (t) is dened at the boundary points 0, a,
and b. This is because the Laplace transform of a function involves integration, and the
value of an integral is not changed by altering the integrand at a single point. Thus we
can still use the representation in Equation 6.5 to represent a function of the form given
in Equation 6.4 even when the less than or equal to and strictly less than symbols are
arranged dierently (in fact, f (t) need not even be dened at these points). We will use
this representation for forcing functions in mass-spring systems and electrical systems.
Example 6.3.1 Represent the function

0
t<0

## sin(2t) 0 < t < 5

f (t) =

0
5<t<
using unit step functions. Also sketch a graph of f (t). Note that f (t) could represent, for
example, a sinusoidal forcing function for a mass-spring system, which is turned on at t = 0
and then gets turned o at t = 5.
Referring to equations 6.4 and 6.5, with g(t) = sin(2t), h(t) = 0, and a = 5 (no i(t) or
b, since there are only two pieces) we get
f (t) = sin(2t)U (t) + (0 sin(2t))U (t 5)
There are several ways to plot this function. Your software may have a unit step function
(for example, in Maple it is called Heaviside(t)). If not, the function
{
1 t < 0
sign(t) =
1 t>0
can be used to construct a unit step by writing
U (t)

1
1
sign(t) + .
2
2

5
t
1

228

## The (Dirac) Delta Function

Another function that is useful for representing certain types of forcing functions in
mechanical and electrical systems is called the delta function, denoted (t) (sometimes
called the Dirac function or the Dirac delta function). This function has some rather unusual
properties; in fact it is not really even a function at all in the usual sense. It is used to model
a forcing function which represents a hammer hit on the mass of a mass-spring system,
delivered at time t = 0. It can be thought of as a limit of functions (t), each of which is
t=

(t)dt = 1.
zero except on the time interval < t < , and each of which satises
t=

Thus the functions (t) get narrower and taller as approaches 0, but always with area
under the curve equal to 1. If we dene (t) = lim0 (t), then we get an innitely tall,
innitely narrow function, which is 0 everywhere except at t = 0, and yet has area under
the curve equal to 1. In Figure 6.3 we show a sequence of such functions whose limit is (t).
epsilon=0.3

epsilon=0.2

epsilon=0.1

Figure 6.3: A sequence of functions (t) whose limit as 0 is the delta function (t)

Since (t) cannot be rigorously dened within the scope of this book (it can be rigorously dened using a branch of mathematics called distribution theory which is usually
encountered in graduate level courses), we must be satised with describing its properties.
Properties of (t)
The function (t) satises the following properties:
1. (t) = 0 for all t except t = 0.
2.

t=b

## (t)dt = 1 for any a < 0 and any b > 0.

t=a

3.

t=b

f (t)(t)dt = f (0) for any continuous f (t) and any a < 0 and any b > 0.

t=a

As with the unit step function, the delta function can be shifted c units, so that the
shifted delta function (t c) would represent a hammer hit on the mass of a mass-spring
system at time t = c. Its properties mirror those of the unshifted delta function.
Properties of (t c)
The function (t c) satises the following properties:
229

2.

t=b

## (t c)dt = 1 for any a < c and any b > c.

t=a

3.

t=b

f (t)(t c)dt = f (c) for any continuous f (t) and any a < c and any b > c.

t=a

## We provide an informal proof of Property 3, as we will need that property to nd the

Laplace transform of (t).
Proof of Property Three. If we dene

0
1
(t) =
2
0

t <
t
t>

then we get the sequence of functions pictured in Figure 6.3. Now, for any a < and any
t=b
t=
t=
t= 1
1
b > we have t=a (t)f (t)dt = t= (t)f (t)dt = t= 2
f (t)dt = 2
f (t)dt. We
t=
can represent the integral of a continuous function over an interval as its average
t= value on
that interval, denoted favg , multiplied by the length of the interval. Thus t= f (t)dt =
t=b
1
favg 2 = favg . Now, as 0, (t) (t), and
favg 2 and so t=a (t)f (t)dt = 2
favg f (0) (the average value of a continuous function over a very small interval is about
t=b
equal to the value of the function at the midpoint of the interval). Thus t=a (t)f (t)dt =
t=b
f (0). The proof that t=a (t c)f (t)dt = f (c) is similar.
Physical Interpretation for (t): The delta function will only be used in this text as part
of a forcing function for a driven mass-spring system. In that context, (t c) represents a
unit impulse applied at time t = c. A unit impulse acting on a 1 kilogram mass increases
the velocity instantaneously by 1 meter per second. A unit impulse acting on an m kilogram
1
mass increases the velocity instantaneously by m
meters per second. Finally, N (t c)
represents an impulse of N units applied at time t = c, meaning it increases the velocity of
an m kilogram mass instantaneously by N
m meters per second.
Laplace Transforms of U (t c) and (t c)
In order to solve dierential equations that involve U (t c) and (t c) we need to nd
their Laplace transforms and add them to our list of Laplace transform formulas.
Theorem 6.5
formula
17
18

## The Laplace transforms of U (t c) and (t c) are given in the table below.

function Laplace transform
1 sc
U (t c)
se
(t c)
esc

## Proof: See the exercises at the end of this section.

230

We need one more Laplace transform formula before we can start solving dierential
equations that involve U (t c) and (t c). It is one of the general properties that apply
to any function f (t), such as the properties given in formulas 10 and 11 from Theorem 6.4.
Theorem 6.6 The Laplace transform of f (t c)U (t c) is given in the table below, where
F (s) is the Laplace transform of the function f (t), and c is a real constant.
formula
function
Laplace transform
19
f (t c)U (t c)
ecs F (s)
Table 6.6: Laplace transform of f (tc)U (tc)

Proof:

## L[f (t c)U (t c)] =

f (t c)U (t c)est dt =

f (t c)est dt;

then, substituting u = t c,

s(u+c)
sc
=
f (u)e
du = e
0

## f (u)esu du = ecs F (s).

Note: The graph of the function f (t c)U (t c) is just the graph of f (t), shifted c units
to the right, and set equal to zero up to time t = c.
Formula 19 of Theorem 6.6 is especially useful in nding the inverse Laplace transform
of functions involving an exponential function ecs .
[
]
[
]
Example 6.3.2 Use Theorem 6.6 to nd L1 e2s s2s+9 and L1 e5s (s+1)42 +16 .
For the rst inverse Laplace transform problem, we let F (s) be s2s+9 . We should recognize
F (s) as tting the right-hand side of formula 3 with b = 3, so we have f (t) = L1 [F (s)] =
cos(3t) (left-hand side of formula 3). The e2s part means we need to use formula 19 with
c = 2. Since f (t 2) = cos (3(t 2)) we have
[
]
[
]
s
1
2s
L
e
= L1 e2s F (s) = f (t 2)U (t 2)
s2 + 9
= cos (3(t 2)) U (t 2).
For the second inverse problem, we use F (s) = (s+1)42 +16 , which ts the right-hand side
of formula 13 with a = 1, and b = 4; so from the left-hand side of formula 13 we get
f (t) = e1t sin(4t). Now using formula 19 we have c = 5 (from the e5s term), and with
f (t 5) = e(t5) sin (4(t 5)) we get
[
]
[
]
4
1
5s
L
e
= L1 e5s F (s) = f (t 5)U (t 5)
(s + 1)2 + 9
= e(t5) sin (4(t 5)) U (t 5).

## Lets solve some dierential equations!

231

Example 6.3.3 Solve the initial value problem y + 4y = 10 sin(t 10)U (t 10), y(0) = 3,
y (0) = 0 using Laplace transforms. Sketch both the input (forcing function) and the response
y(t). Discuss the problem and its solution in the context of a mass-spring problem.
For the right-hand side we can use formula 19 with c = 10. Taking the Laplace transform
of both sides we have
(

)
s2 Y sy(0) y (0) + 4Y = 10es10

s2

1
+1

so that after replacing y(0) and y (0) with their numeric values, and isolating the Y terms
on the left we get
1
s2 Y + 4Y = 10es10 2
+ 3s
s +1
and after factoring out Y and dividing by s2 + 4 we get
Y = 10e10s
The term

1
(s2 +4)(s2 +1)

1
3s
+
.
(s2 + 4) (s2 + 1) (s2 + 4)

## needs to be expanded (using partial fractions):

1
1
1
=

(s2 + 4) (s2 + 1)
3 (s2 + 1) 3 (s2 + 4)

so that

)
1
1
3s
Y (s) = 10e

+ 2
3 (s2 + 1) 3 (s2 + 4)
(s + 4)
10 10s 1
10
1
s
=
e
e10s 2
+3 2
.
3
s2 + 1
3
s +4
(s + 4)
10s

## Taking the inverse Laplace transform of both sides yields

[
]
1
10 10s 1
s
1 10 10s
y(t) = L
e
e
+3 2
3
s2 + 1
3
s2 + 4
(s + 4)
[
]
[
]
10 1 10s 1
10 1 1 10s 2
=
L
e

L
e
3
s2 + 1
3 2
s2 + 4
[
]
s
+3L1
(s2 + 4)
For the rst two terms we combine formula 4 (letting F (s) = s21+1 , f (t) = sin(t) for the
rst term and F (s) = s22+4 , f (t) = sin(2t) for the second term) with formula 19 (c = 10).
This is similar to what we did in Example 6.3.2. The third term is just formula 4 alone.
We end up with
y(t)

10
5
sin (t 10) U (t 10) sin (2(t 10)) U (t 10)
3
3
+3 cos(2t)

232

10
y

10
y

5
0
5
10

10

5
0

10

10

## Figure 6.4: Forcing function f (t) and response y(t)

Graphs of the forcing function f (t) = 10 sin(t 10)U (t 10) and the response y(t) =
sin (t 10) U (t 10) 53 sin (2(t 10)) U (t 10) + 3 cos 2t are shown in Figure 6.4.
The dierential equation y + 4y = 10 sin(t 10)U (t 10) models a mass-spring system
with mass 1 kilogram, no damping, and spring constant 4 newtons per meter. The mass is
displaced 3 meters in the positive direction (y(0) = 3) and released (y (0) = 0). A sinusoidal
1
forcing function with frequency 2
and amplitude 10 starts after 10 seconds.
The solution
10
5
y(t) =
sin (t 10) U (t 10) sin (2(t 10)) U (t 10) + 3 cos(2t)
3
3
shows that there is an initial response of 3 cos(2t) which denes the motion of the system
prior to t = 10 seconds. After the forcing function kicks in the response consists of
5
10
the three terms 10
3 sin (t 10) 3 sin (2(t 10)) + 3 cos(2t). The rst term, 3 sin (t 10),
1
5
represents a wave with frequency 2 and the second two terms, 3 sin (2(t 10))+3 cos(2t),
2
combine to form a wave of frequency 2
= 1 (in Section 3.3 we discussed how to combine
trig functions with the same frequency to get a single trig function with that frequency).
Thus the response y(t) after t = 10 consists of the interaction of two waves with dierent
frequencies, producing the results in Figure 6.4.
10
3

Our last example combines the unit step and delta functions.
Example 6.3.4 A mass of 1 kilogram is suspended on a spring with spring constant 145
newtons per meter, and a damping constant of 2 newtons per meter per second. The mass is
hit from above with a hammer giving it an initial velocity of 2 meters per second downward
(at t = 0 seconds). A rocket is red at the mass from below, and impacts the mass at t = 1
second. The impact results in an impulse of 2 units (modeled by 2(t 1)) and a decaying
exponential force which starts at 5 newtons and decays at an instantaneous rate of 20% per
second (modeled by 5e0.2(t1) U (t 1)).
Write the dierential equation which describes this process, and solve it for y(t). Graph
both y(t) and y (t) as functions of t. Describe what happens in these two graphs at t = 1
and after t = 1.
Our mass-spring system has m = 1, c = 2, and k = 145, so the nonhomogeneous equation
(driven system) is
y + 2y + 145y = 2(t 1) + 5e0.2(t1) U (t 1).
The initial conditions are y(0) = 0 and y (0) = 2. Taking the Laplace transform of both
sides of the dierential equation, and using linearity, we get
L[y ] + 2L[y ] + 145L[y] = 2L[(t 1)] + 5L[e0.2(t1) U (t 1)]
233

(6.6)

Using formulas 8 and 9 from section 6.1 for the left-hand side of equation 6.6, and Table 6.5
1
for the rst term on the right-hand side, and Table 6.6 (with f (t) = e0.2t , F (s) = s+0.2
,
c = 1) for the second term on the right-hand side we get
(
)
( 2
)
1
(1)s
1s
s Y s 0 (2) + 2(sY 0) + 145Y = 2e
+5 e
s + 0.2
Now collect Y terms on the left and factor out Y :
( 2
)
s + 2s + 145 Y = 2 + 2es + 5es

1
s + 0.2

## and then divide by s2 + 2s + 145 to get

Y = 2

1
1
1
+ 2es 2
+ 5es 2
s2 + 2s + 145
s + 2s + 145
(s + 2s + 145) (s + 0.2)

(6.7)

For the rst two terms in equation 6.7 we complete the square in the denominator
s2 + 2s + 145 = s2 + 2s + 1 1 + 145 = (s + 1)2 + 144
and for the last term in equation (6.7) we use partial fractions rst, and then complete
the square (turning decimal numbers into fractions is often helpful when using computer
algebra):
1
(
)
(s2 + 2s + 145) s + 15
(
) (
) (
) (
)
1
125
1
25s 45
=

3616
5s + 1
3616
2s + s2 + 145
) ( ) (
) (
)
(
) (
1
125
25s 45
1
1

=
+
3616
5
3616
(s + 1)2 + 144
s + 15
Equation (6.7) now becomes
Y

1
1
+ 2es
2
(s + 1) + 144
(s + 1)2 + 144
((
) ( ) (
) (
) (
))
1
1
125
1
25s 45
s
+5e

3616
5
3616
(s + 1)2 + 144
s + 15
2
12
2
12
=
+
es
12 (s + 1)2 + 144 12
(s + 1)2 + 144

= 2

125
1
es
3616
s+

1
5

5
25s 45
es
3616
(s + 1)2 + 144

(6.8)

after multiplying out and using the standard multiply and divide trick on the rst two
terms. The rst three terms are now set up for the inverse Laplace transformation, but the
last needs some work. We need to split it up and use the add and subtract trick:
25s 45
(s + 1)2 + 144

s+11
1
45
2
(s + 1) + 144
(s + 1)2 + 144
s+1
1
1
= 25
+ 25
45
(s + 1)2 + 144
(s + 1)2 + 144
(s + 1)2 + 144
20
12
s+1

= 25
(s + 1)2 + 144 12 (s + 1)2 + 144
= 25

234

## Substituting this last expression into equation 6.8 we get

Y

2
12
2
12
125 s 1
+ es
+
e
12 (s + 1)2 + 144 12
(s + 1)2 + 144 3616
s+
(
)
s+1
20
12
5 s
e
25

+
3616
(s + 1)2 + 144 12 (s + 1)2 + 144
1
1
12
125 s 1
12
=
+ es
+
e
6 (s + 1)2 + 144 6
(s + 1)2 + 144 3616
s + 15
125 s
s+1
25 s
12

e
.
3616
(s + 1)2 + 144 10 848
(s + 1)2 + 144
=

1
5

To nd the inverse Laplace transform we use formulas 2, 12 and 13, combined with formula
19 when necessary. We get
[
]
[
]
1 1 s
1 1
12
12
1
y(t) = L [Y ] = L
+ L
e
6
(s + 1)2 + 144
6
(s + 1)2 + 144
[
]
[
]
125 1 s 1
125 1 s
s+1
+
L
e

L
e
3616
3616
(s + 1)2 + 144
s + 15
[
]
25
12
1
s

L
e
10 848
(s + 1)2 + 144
1
1
125 1 (t1)
= et sin(12t) + e(t1) sin(12(t 1))U (t 1) +
e 5
U (t 1)
6
6
3616
25 (t1)
125 (t1)
e
cos(12(t 1))U (t 1)
e
sin(12(t 1))U (t 1).

3616
10 848
It is standard to combine like terms, either at this point, or before the inverse Laplace
transform is taken. The nal equation after combining terms is
1
125 1 (t1)
y(t) = et sin(12t) +
e 5
U (t 1)
6
3616
125 (t1)

e
cos(12(t 1))U (t 1)
3616
1783 (t1)
+
e
sin(12(t 1))U (t 1).
10 848
The graphs of y(t) and y (t) are shown in Figure 6.5. One can see from the graph of y(t)
0.1
0.05
0
0.05
0.1
0.15

1.5
1
0.5

0
0.5
1
1.5
2

## Figure 6.5: Position y(t) (left) and Velocity y (t) (right)

that at t = 1, at the time of impact of the rocket, the mass reverses direction from down to
235

up creating a sharp corner in the graph. The graph of y (t) shows a discontinuity at this
point, ipping instantaneously from negative to positive. After t = 1, the rocket continues
to re, but with exponentially decreasing force. This causes the oscillations to become raised
(they are no longer centered on y = 0), but the center of the oscillations is gradually coming
back down towards y = 0 as the rocket force dies out.

We conclude this section with a list of all the Laplace transform formulas that we have
developed up to this point.

236

## TABLE OF LAPLACE TRANSFORMS

1
2
3
4
5
6
7
8
9
10
11
12
13

function
f (t)
c
eat
cos bt
sin bt
tn
f (t)
af (t) + bg(t)
f (t)
f (t)
eatf (t)
tnf (t)
eat cos bt
eat sin bt

14

t cos bt

15

t sin bt

16
17
18
19

tneat
U (t c)
(t c)
f (t c)U (t c)

formula

Laplace transform
F (s) = L[f (t)]
c
s, s > 0
1
sa , s > a
s
,s > 0
2
s +b2
b
,s > 0
s2 +b2
n!
,s > 0
sn+1
F (s)
aF (s) + bG(s)
sF (s) f (0)
s2F (s) sf (0) f (0)
F (s a)
(1)nF (n)(s)

237

sa
(sa)2 +b2
b
(sa)2 +b2
s2 b2
2
(s2+b2)
2bs
2
(s2+b2)
n!
(sa)n+1
1 cs
se
cs

ecsF (s)

Exercises 6.3 In problems 1-6, represent the piecewise-dened function f (t) using the unit
step function U (t). Graph the function f (t) using an appropriate interval. Is f (t) continuous?
{
0
t<
1. f (t) =
sin(2(t )) t
{
0
t<2
2. f (t) =
(t 2)3 + 4 2 t <
{
0
t < 10
3. f (t) =
e0.2(t10) cos(t 10) t 10
{
sin(2t) 0 t <
4. f (t) =
0
t<
{ t
2e
0t<1
5. f (t) =
0
1t<
{
e0.2t cos(t)
0 t < 10
6. f (t) =
0.2(t10)
e
cos(t 10) 10 t <
For problems 7-12, nd each inverse Laplace transform using formula 19 in conjunction with another appropriate Laplace transform formula.
[
]
1
7. L1 e3s s4
[
]
8. L1 e2s 3s
[
]
9. L1 e3s s45
[
]
s
10. L1 e3s (s2 +4)
2
[
]
1
11. L1 e3s (sa)
4
[
]
12. L1 e3s (s1)s2 +16

13.
14.
15.
16.

For problems 13-20, solve the initial value problem using Laplace transforms. Graph
the input (forcing function) and the solution, and interpret the dierential equation,
the initial conditions, and the solution as a model for a mass-spring system.
{
0
t<5
y + 4y = f (t), y(0) = 1, y (0) = 0, where f (t) =
3 cos(t 5) 5 t <
{
0
t<2
y + 9y = f (t), y(0) = 1, y (0) = 0, where f (t) =
(t 2) 2 t <
{
0
t<2
y + 4y + 8y = f (t), y(0) = 1, y (0) = 0, where f (t) =
(t 2)2 2 t <
{
0
t<3
y + 5y + 6y = f (t), y(0) = 0, y (0) = 1, where f (t) =
sin(t 3) 3 t <
238

{
17. y + 3y + 2y = f (t), y(0) = 0, y (0) = 0, where f (t) =

2e3t
0

0t<1
1t<

{
cos(t) 0 t < 5

## 18. y + 2y + 2y = f (t), y(0) = 0, y (0) = 0, where f (t) =

0
5t<
Hint: cos(t) = cos(t 5 + 5) = cos(t 5) cos(5) sin(t 5) sin(5)
19. y + 4y = 3(t 3), y(0) = 1, y (0) = 0
20. y + 3y + 2y = 2(t 3), y(0) = 1, y (0) = 0
For problems 21 and 22, develop a model for the mass-spring system, and solve for
the position y(t). Graph y(t) and y (t) and discuss the graphs in the context of the
mass-spring system.
21. Mass m = 1 kilogram, no damping, spring constant k = 9 newtons per meter. The
mass is displaced 1 meter in the positive direction and released. At t = 5 seconds
1
a sinusoidal forcing function begins, with frequency 2
and amplitude 2 (modeled by
2 sin(t 5)).
22. Mass m = 1 kilogram, damping constant c = 5 newtons per meter per second, spring
constant k = 6 newtons per meter. The mass is hit with a hammer giving it an initial
velocity of 2 meters per second. At t = 2 seconds the mass is hit with a hammer again,
imparting an impulse of 3 units in the downward direction.

23. Use the denition of the Laplace transform to prove that L[U (t c)] =
member that U (t c) is zero except when t > c.

1 sc
.
se

Re-

6.4

## Convolution and Circuits

Denition 6.4 The convolution of two functions f (t) and g(t) is denoted (f g) (t) and is
dened to be
u=t
(f g) (t) =
f (u)g(t u)du
u=0

## Theorem 6.7 (f g)(t) = (g f )(t)

Theorem 6.8 L[(f g)(t)] = F (s)G(s)
Note: We will most often use this theorem in the form L1 [F (s)G(s)] = (f g)(t).
239

## Example 6.4.1 Find L1

using convolution.

1
(s2 +4)2

]
two dierent ways; rst without convolution, then again

To
this] problem without convolution we can employ Laplace formula 14, which is
[ do
2
b2
L1 (ss2 +b
= t cos bt. We use the multiply and divide trick followed by the add and
2 )2
subtract trick. We have
1
(s2 + 4)

1
8
1 4 s2 + s2 + 4
=
2
2
8 (s2 + 4)
8
(s2 + 4)

1 s2 + 4
1 4 s2
+
8 (s2 + 4)2
8 (s2 + 4)2
1 s2 4
1 1
=
+
2
2
8 (s + 4)
8 s2 + 4
=

## from which we get

[
1

(s2 + 4)

[
]
[
]
s2 4
2
1 1
1 1
= L
2 + 16 L
8
s2 + 4
(s2 + 4)
1
1
= t cos (2t) +
sin(2t)
8
16

With convolution we use F (s) = s21+4 and also G(s) = s21+4 . Thus we get f (t) =
L1 [F (s)] = L1 [ 12 s22+4 ] = 12 sin(2t) and so also g(t) = 21 sin(2t). Thus
[
]
1
1
L
= L1 [F (s)G(s)] = (f g)(t)
2
(s2 + 4)
u=t
1
1
=
sin(2u) sin(2(t u))du
2
u=0 2
1
1
sin(2t) t cos(2t)
=
16
8
as we got above (using computer algebra to do the integral). We note that the convolution
method is conceptually simpler, but that the integral that results may not be simple without
computer algebra. In the exercises at the end of this section you are asked to evaluate the
integral above without computer algebra, given some hints.

6.4.1

Electrical Circuits

In electrical circuits that contain resistors, capacitors and inductors, the voltage drop across
any one of these components can be related to the current owing through that component
by simple linear relationship. If we let i(t) represent the current, and v(t) the voltage drop
across a given component, then we have the following proportionalities:
Drop across resistor: v = Ri
Drop across capacitors: C dv
dt = i
240

di
Drop across inductor: v = L dt
The proportionality constants R, C, and L, are called the resistance, the capacitance,
and the inductance respectively. One of the primary means of creating dierential equation
models for circuits is through the use of Kirchos Second Law, which states that the sum
of all of the voltage drops around a closed circuit must equal the voltage gain (due to a
voltage source such as a battery).
A circuit with a resistor, a capacitor, and an inductor in series is called an RLC circuit
(see Figure 6.6). Thus if we have a resistor with voltage drop vr , a capacitor with voltage

## Figure 6.6: RLC circuit

drop vc , an inductor with voltage drop vl and a voltage source vs we would have vr +vc +vl =
vs . If we consider these voltages to be time-dependent, then we can take the derivative of
dvl
dvc
dvs
r
both sides to get dv
dt + dt + dt = dt . Combining this equation with the voltage drop
dvs
d2 i
di
+ C1 i + L dt
proportionalities above we get R dt
2 = dt , or rearranging
L

d2 i
di
1
dvs
+R + i=
2
dt
dt C
dt

(6.9)

which is the second order dierential equation that governs an RLC circuit.
Other common circuits are ones where there is just a resistor and a capacitor (RC circuit)
or just a resistor and an inductor (RL circuit). The dierential equations for these cases
are rst order dierential equations, which can be obtained by dropping out the appropriate
term. Also, the current i is dened as the derivative of the charge q. Using i = dq
dt allows
us to write our dierential equations in terms of q when that is more convenient.
Units: Resistance R is measured in Ohms, capacitance C is measured in Farads, inductance L is measured in Henries, voltage is measured in volts (V ), and current i is measured
in amperes.
Example 6.4.2 An RLC circuit has a capacitance of 12 Farad, a resistance of 2 Ohms, an
inductance of 1 Henry, and a voltage source of sin(t) volts. Find the long-term response of
the system (that is, nd i(t) for large t). What is the amplitude of the long-term response?
s
We have C = 12 , R = 2, L = 1, and vs = sin(t) and hence dv
dt = cos(t). Employing
equation 6.9 we get
d2 i
di
+ 2 + 2i = cos(t).
(6.10)
dt2
dt
Even though we are going to employ Laplace transforms to solve this dierential equation,
we will rst use the techniques of Chapter 3 to observe that the characteristic equation is
r2 + 2r + 2 = 0, which has solutions r = 1 i. Thus the homogeneous solution would be
ih = C1 et cos t + C2 et sin t. As t we have ih 0, so that the long-term response

241

consists of only the particular solution ip . An important consequence of this fact is that the
initial conditions i(0) and i (0) have no aect on the long term behavior of the system. Hence
to make the algebra of Laplace transforms simpler, we can assume i(0) = 0 and i (0) = 0.
Taking the transform of both sides of equation 6.10 we get
s2 I(s) + 2sI(s) + 2I(s) =

s
s2 + 1

## and then solving for I(s) we get

I(s) =

s2

1
s
.
2
+ 1 s + 2s + 2

(6.11)

At this point we could use the techniques of Sections 6.1 and 6.2 (expand, complete the
1
square), but instead we choose convolution. With F (s) = s2s+1 and G(s) = s2 +2s+2
=
1
t
we
have
f
(t)
=
cos
t
and
g(t)
=
e
sin
t.
Thus
2
(s+1) +1
u=t
(f g)(t) = (g f )(t) =
g(u)f (t u)du
u=0
u=t
( u
)
=
e sin u cos(t u)du

i(t) =

u=0

1
2
1
3
cos(t) + sin(t) et cos t et sin t,
5
5
5
5

using computer algebra to do the integral. Thus the long-term response would be given by
ip =

1
2
cos(t) + sin(t).
5
5

Finally, we can combine sine and cosine terms as shown in Section 3.3:
ip (t) =

2
1
sin(t) + cos(t) = D cos(t ).
5
5

( )2 ( )2
1
We have D2 = 25 + 15 = 15 and tan() = 2/5
=
2.
With
D
=
1/5
5 we must choose
= arctan(2) 0.352 (show why = arctan(2) + does not work). Thus

1
cos(t 0. 352 ).
5

## The amplitude of the long-term response is 15 0.447 21.

ip (t)

An important concept that we need to take away from Example 6.4.2 is that whenever
there is non-zero resistance in an RLC circuit, and we are only interested in the long-term
output, we can set the initial conditions to zero. We will take that course for the rest of
this section.

242

6.4.2

## Transfer Functions and the Frequency Domain

Equation 6.11 from Example 6.4.2 provides another important concept that we can apply in
general to electrical circuits (and mechanical systems as well) for which the initial conditions
are zero. When we solve an initial value problem of the form ay + by = f (t), y(0) = 0
(rst-order linear) or of the form ay + by + cy = f (t), y(0) = 0, y (0) = 0 (second-order
linear), we interpret the function f (t) as the input and the solution y(t) as the output (or
the response).
Denition 6.5 For a nonhomogeneous linear dierential equation with input (forcing function) f (t) and output (solution) y(t), and zero initial conditions, the ratio of the Laplace
transform of the output Y (s) to the Laplace transform of the input F (s) is called the transfer
(s)
function. We will denote the transfer function by H(s) = YF (s)
.
Since Y (s) = H(s)F (s), we have y(t) = L1 [Y (s)] = L1 [H(s)F (s)] = (h f )(t). Both
y and f are functions of t (time), hence when we deal with these functions we say that we
are working in the time domain. The functions Y and F are functions of s, so that when we
work with these functions we say we are working in the f requency domain (also called the
s plane). Because multiplication is a simpler operation than convolution, many electrical
engineers prefer working in the frequency domain.
In Example 6.4.2, the input is f (t) = cos t and the Laplace transform of the input is
F (s) = s2s+1 .The Laplace transform of the output is I(s). From equation 6.11, we see that
the transfer function for that example is given by H(s) =

I(s)
F (s)

1
s2 +2s+2 .

Example 6.4.3 An RLC circuit has in input given by F (s) = 5 s2s+9 and transfer function
1
given by H(s) = s2 +2s+5
. Find the output in both the frequency domain (that is Y (s)) and in
the time domain (that is y(t)), and nd the long-term amplitude in the time domain. Also,
nd the initial value problem (dierential equation plus initial conditions) corresponding to
the given input and transfer function, and state the capacitance, resistance, and inductance
of the circuit.
The output in the frequency domain is just the product of the input and the transfer
function, thus
1
s
Y (s) = H(s)F (s) = 2
5 2
.
s + 2s + 5 s + 9
To nd the output in the time domain we use convolution, along with computer algebra to
evaluate the integral. First we need to transform F (s) and H(s) to the time domain. We
have
[
]
s
1
1
5 2
f (t) = L [F (s)] = L
= 5 cos(3t)
s +9
and
h(t)

[
]
]
[
]
1
1
1
1
1
=L
=L
= L [H(s)] = L
2
s2 + 2s + 5
s2 + 2s + 1 + 4
(s + 1) + 4
]
[
1
1
2
= et sin(2t).
= L1
2 (s + 1)2 + 4
2
1

243

Thus
y(t) =
=
=
(N ote

[Y (s)] = L

u=t

## h(t u)f (u)du

u=0

1 (tu)
e
sin(2(t u)) 5 cos(3u)du
0 2
5
5
15
35
sin 3t
cos 3t +
(cos 2t) et
(sin 2t) et
26
13
13
52
T he f orm of y(t) will vary between dif f erent computer algebra systems).

In the long term (that is, as t ), y(t) approaches the steady-state solution 15
26 sin 3t
( )

(
)
2
2
5
15
5
5
+ 13
= 26
13
13 cos 3t. The amplitude of the steady-state solution would be
26
0.693 38.
To determine the dierential equation, we write the equation Y (s) = H(s)F (s) as
1
Y (s) H(s)
= F (s) which becomes
Y (s)(s2 + 2s + 5) = 5

s
s2 + 9

or equivalently

s
.
s2 + 9
We can see that the above equation is the result of taking the Laplce transform of both sides
of the dierential equation
s2 Y (s) + 2sY (s) + 5Y (s) = 5

## y (t) + 2y (t) + 5y(t) = 5 cos(3t)

if we take the initial conditions to be y(0) = 0 and y (0) = 0 (check this). Thus L = 1
Henry, R = 2 Ohms, and C = 15 Farads.

6.4.3

## Filters and the Response Curve

One of the points of Example 6.4.3 is that all of the important information about a circuit
is contained in the transfer function H(s) and the input F (s). If the input is not specied,
then the transfer function tells the whole story; it species how to get from the input to the
output (in either the time or frequency domain).
One important property of an electrical circuit is how the frequency of the input aects
the amplitude of the output (in the long term). In Example 6.4.3, the frequency of the input
3
and the amplitude of the output was about 0.693. The graph of amplitude of the
was 2
output (long term) as a function of the input frequency is referred to as the response curve
of the system.
Example 6.4.4 Consider an RLC circuit, with resistance 2 Ohms, capacitance 15 Farads,
and inductance 1 Henry (this is the same circuit as in Example 6.4.3). Find the (long
term) output amplitude as a function of the parameter if the input is given by the forcing
function f (t) = 5 cos(t), and graph this function. Also, determine the value of that has

the largest ouput amplitude. (Note: is related to the frequency f by the formula f = 2
244

as discussed in Section 3.2; we choose to work with instead of f since the algebra is a bit
simpler).
The dierential equation is y (t) + 2y (t) + 5y(t) = 5 cos(t). Taking the Laplace transform of both sides we get
s
s2 Y + 2sY + 5Y = 5 2
s + 2
where we have assumed y(0) = 0 and y (0) = 0. Solving for Y we get
Y =

s2

s
1
5 2
+ 2s + 5 s + 2

1
s
with H(s) = s2 +2s+5
as the transfer function once again, and F (s) = 5 s2 +
2 the input in
the frequency domain. The solution in the time domain is
u=t
1
y(t) = L [H(s)F (s)] = (h f )(t) =
h(t u)f (u)du
u=0
t
1 (tu)
=
e
sin(2(t u)) 5 cos(u)du
0 2
(
)
(50 10 2 ) cos t + 20 sin t et (25 + 5 2 ) sin 2t + et 10 2 50 cos 2t
=
50 12 2 + 2 4

Eliminating the transient terms (the ones with et ) and rearranging a bit we get
(
)
50 10 2
20
ylong term =
cos t +
sin t.
50 12 2 + 2 4
50 12 2 + 2 4
The amplitude of ylong term would be
(
)2 (
)2
(50 10 2 )
20
5
+
=
2
4
2
4
4
50 12 + 2
50 12 + 2
6 2 + 25

using the fact that the amplitude of C1 cos t + C2 sin t is C12 + C22 (Section 3.3) and a
5
little computer algebra. Graphing the function fomega () = 4 6
we get the curve in
2 +25
5

## Figure 6.7. To nd the maximum value of fomega () = 4 62 +25 , we nd fomega

() =
3

3010

25 4 6 2 +256 2 4 6
+25
2 +25+4 4 62

## and then set fomega

() = 0 to get the three

## solutions = 0, = 3, and = 3. Thus, as can be seen from the graph of

the
response function, for positive the
maximum amplitude of the output occurs at = 3

## 1. 732 1. The frequency would be 23 0.275 66 cycles per second.

We can interpret the response curve in terms of the concept of a lter. We say that values
of for which fomega () is large are passed through, and values of for which fomega ()
is small are ltered out. Looking at Figure 6.7 from Example 6.4.4, we see that values of
larger than about 5 are eectively ltered out (corresponding to frequencies larger than
5
2 0.795 77 cycles per second).

245

1.2
1
0.8
0.6
0.4

6.4.4

5
4 6 2 +25

## Poles and Zeroes

A pole of the transfer function H(s) is a value of s that makes the denominator of H(s)
zero. A zero of H(s) is a value of s that makes the numerator of H(s) zero. The transfer
1
function H(s) = s2 +2s+5
from Examples 6.4.3 and 6.4.4 has no zeroes (since the numerator
can never be zero), and two poles at s = 1 + 2i and s = 1 2i. Complex poles and zeroes
need to be considered; this is why the word plane is used when we refer to the frequency
domain as the s-plane.
Simple RLC circuits will always have either 2 poles or 1 pole (called a double pole) and
no zeroes. More complex circuits, however, can have any number of poles and zeroes. The
poles and zeroes are directly related to the response curve fomega (). Poles tend to boost
certain frequencies, and zeroes tend to eliminate certain frequencies. Circuit designers use
pole-zero plots to help them design circuits with a specic response curve.
In a pole-zero plot the poles are plotted in the complex plane using an x and the zeroes
1
with an o. The pole-zero plot for the transfer function H(s) = s2 +2s+5
is shown in Figure
6.8. In order to correctly interpret pole-zero plots, we need the following Theorem.
w
Theorem 6.9 Consider a simple RLC circuit, with input frequency 2
(the forcing function
has the form f (t) = C1 cos(t) + C2 sin(t)). If the poles of the transfer function H(s)
are at a bi, with a < 0, then the frequency response curve is given by fomega () =
C

## where C is a positive constant, and its maximum occurs at =

(b+)2 +a2 (b)2 +a2

## Proof. The denominator of H(s) can be factored as (s(a+bi))(s(abi)) = s2 2as+

1
a + b2 . Therefore we can write H(s) = K s2 2as+a
2 +b2 , where K is some positive constant.

s
Using f (t) = C1 cos(t) + C2 sin(t) as the input, and hence F (s) = C1 s2 +
2 + C2 s2 + 2 , we
(
)
s

1
C1 s2 +
. From this it follows that the amplitude
have Y (s) = K s2 2as+a
2 +b2
2 + C2 s2 + 2
2 2
K C1 +C2

## of ylong term (t) is given by fresp () =

(to ll in the missing steps, take
2
2
2
2
2

(b+) +a

(b) +a

the inverse Laplace transform of Y (s), eliminate the transient terms, and nd the magnitude
246

1
s2 +2s+5

## of what is left as in the previous example).

Setting the derivative of this expression equal

## 2 a2 , and = 0. When b > |a|, there are local

to zero and solving for

gives

## Note: If we want to graph the frequency response in terms of the frequency f =

C
make the substitution = 2f into fomega () to get ff req (f ) =
2
2
(b+2f ) +a

just
.
2
2

(b2f ) +a

Notice that as a gets close to 0 in Theorem 6.9, then the maximum of the response
occurs at a value very close to b. When a = 0, the transfer function H(s) gets innitly
large at = b; this corresponds to a circuit with no resistance, which is driven at its natral
frequency. This is the condition of resonance. In real-world stable circuits, a will always be
negative. Thus to design a lter which lters out all frequencies, except those near some
specic value of , say 0 , we put a pole at about a + 0 i, with a negative and small in
absolute value compared to 0 . Note: the exact maximum of the response curve of such a
circuit will be a little bit less than 0 .

Example 6.4.5 Design an RLC circuit which allows frequencies near 1000 cycles per second to pass through, and lters out the other frequencies. Sketch the response curve.
1000 cycles per second corresponds to = 2(1000) 6283. We simply create a
pole-zero plot with poles near the imaginary axis, and with imaginary component b near
6283. We choose a = 100 so that it is small in absolute value compared to b. See Figure 6.9.We know from the previous theorem that the response curve will have the form
247

f () =

C
.
(b+)2 +a2 (b)2 +a2

## (f represents frequency) into this expression we get ff req (f ) =

1
,
(b+2f )2 +a2 (b2f )2 +a2

which we graph in Figure 6.10. The denominator of the transfer function would be
(s (100 + 6283i))(s (100 6283i)) = s2 + 200s + 39 486 089.
1
Thus H(s) = s2 +200s+39
486 089 and the corresponding left-side of the dierential equation
would be y + 200y + 39486089. We could use an RLC circuit with L = 1, R = 200, and
1
C = 39486089
.Note: If we want the peak of the response function fomega () to be exactly at

## 62832 + (100)2 6283. 8.

Figure 6.9: Pole-zero plot to let values near 6283 (frequencies near 1000) pass through

8e07

6e07

4e07

2e07

2000

4000

6000

8000

10000

Figure 6.10: Response curve designed to pass only frequencies near 1000 cycles per second

248

Comment: We have focused on transfer functions with complex poles so far. Realvalued poles are also possible: they are plotted on the real axis in a pole-zero plot. Realvalued poles tend to allow very low frequencies to pass through (since the complex component is zero).
Comment: Transfer functions for simple RLC circuits as described in this section do
not have zeroes, but more complex circuits can have any number of zeroes (and poles).
Zeroes tend to eliminate frequencies that are close to the complex component of the zero.
In short, use poles to boost frequencies and zeroes to eliminate frequencies.

Exercises 6.4 In problems 1-4 nd the inverse Laplace transform of each function of s. Do
each problem two ways; once by expanding the expression rst (partial fractions or computer
algebra), and a second time using convolution.
1.

1
1
s1 s2

2.

1
s
s2 +1 s+3

3.

1
1
s2 s2 +4

4.

5
2
(s1)2 +4 s+7

For each RLC circuit in problems 5-8, use convolution to nd an integral representation
of the output i(t). Then evaluate the integral using computer algebra if necessary) and
eliminate the transient terms to obtain the long-term output and the amplitude of the
long-term output.
5. L = 1, R = 4, C =

1
29 ,

## 6. L = 1, R = 3, C = 12 , voltage source vs (t) = 3 sin(5t).

7. L = 1, R = 3, C = 12 , voltage source vs (t) = 3 sin(t).
8. L = 1, R = 4, C =

1
29 ,

## voltage source vs (t) = 3 sin(t).

Find the long-term output i(t) in the time domain, and nd and sketch the response
curve fomega (), given the transfer function H(s) and input F (s) in the frequency
domain. Also give the corresponding dierential equation.
9. H(s) =

1
s2 +2s+10 ,

F (s) =

s
s2 + 2 .

10. H(s) =

1
s2 +4s+13 ,

F (s) =

s2 + 2 .

Use a pole-zero plot to design an RLC circuit which lters out all frequencies except
those near the given frequency f . Then design a second lter which has a wider passband (the response curve is wider), centered at roughly the same frequency f as the
rst lter. Give the values of R, L, and C for each case.
11. Frequency f = 15000 cycles per second.
12. Frequency f = 0 cycles per second.

249

250

Section 1.1

1. x =

d
dt t

1. rst-order

3. y =

1 2
d
2x
dx Ce

d
dt c

## ind. variable t, dep. variable y

xy = xCe 2 x

no parameters

=1+0=1
1

= Ce 2 x (x) = xCe 2 x

## 5. x(t) = t + c, so x(0) = c; therefore,

c = 5. The solution to the I.V.P. is
x(t) = t + 5.

3. rst-order
ind. variable t, dep. variable P

## 7. y(x) = Ce 2 x , so y(0) = C; therefore,

C = 2. The solution to the I.V.P. is
1 2
2e 2 x .

parameters r, k, , and
5. third-order
ind. variable t, dep. variable x

e
9. P (t) = (1 + et )2 et = (1+e
t 2 and
(
) )
parameter
1
1
P (1 P ) = 1+et 1 1+et
( t )
7. second-order
e
= 1+e1 t 1+e
, and P (0) = 12 so the
t
ind. variable t, dep. variable
function provides a solution to the inino parameters
tial value problem . Since 1 + et can
never be zero, there is no nite time
9. x +4x = 4 sin(2t)4 cos(2t)+4(sin(2t)+
blow-up, and P 1 as t .
cos(2t)) 0
t

et 3e3t xy

Ce
11. P (t) = (1 + Cet )2 Cet = (1+Ce
t )2
(
)
1
1
and P (1 P ) = 1+Cet 1 1+Cet
(
)
Cet
1
so the function gives
= 1+Ce
t
t
1+Ce
a general solution to the dierential equation. lim 1/(1 + Cet ) depends on the
t
value of C; for C > 0 we have P 1
as t , for C = 0 the solution is
the constant C = 1. For C <( 0 we
)
have an asymptote at t = ln C1 .
If 1 < C < 0 then the asymptote occurs before t = 0 and P 1 as t ;
if C < 1 the asymptote occurs after
the initial condition at t = 0 and we
get nite time
with P
( blow-up,
)
as t ln C1 .

= (2et +6e3t )

## solution is dened for all t

11. t2 x + 3tx + x =
t2 (t3 (3+2 ln(t)))+3t(t2 (1ln(t)))+
(t1 ln(t)) =
t1 (3+2 ln(t)+33 ln(t)+ln(t)) 0
solution is dened for t > 0
13. P =

rCert
(1+Cert )2
rt

r
1+Ce
1
rP (1 P ) = ( 1+Ce
rt )( 1+Cert )
rCert
(1+Cert )2

C1 , if C < 0
15. x =

d
t
3t
dt (e e ) =
d
t
3t
dt (2e +2e )

y =
4x + y

1, C2 = 1.

## solution is dened for all t

17. y1 = y2 , y2 = y1 2y2

x(t) =
1

Section 1.2

C1
t

C2 ln(t)
,
t

C1 = 0, C2 =

251

## 17. (Using Maple)

P (t) =

17.

1
(1+e(rt) C1)

, C1 = C

dx
dt

= (cos(t))(x), x(0) = 1

## General solution (see Exercise 9):

x(t) = Aesin(t)

Section 2.1

x(0) = Aesin(0) = A = 1

1. No

x(t) = esin(t)

3. Yes

19.

5. x = ( 1t )x
dx 1
x =
t dt
|x| = eln |t|+C = eC |t|; therefore, x =
At where A = eC

7. x = (1)(x + 5)
dx

1dt
x+5 =

dx
dt = (cos(t))(x)
dx
cos(t)dt
x =

where A = e

T (0) = 90 + C = 40 C = 50
T (5) = 9050e5K = 50 K 0.04463

dx
= (1 + 2t + 3t2 )( x1 )
dt

## T (20) = 90 50e0.04463(20) 69.520

= t + t2 + t3 + C

As t , T 900

dx
dt

= t(1 + x2 )

dx
tdt
1+x2 =

C

x2
2

13.

## P (1) = 100er = 150 r 0.40547

As t , P

ln |x| = sin(t) + C

11.

## 21. P (t) = Aert , P (0) = A = 100

|x + 5| = et+C = et eC ; therefore, x =
Aet 5 where A = eC

x(t) = Ae

x(t) = arctan(t2 /2 + t + C)

## x(t) = arctan(t2 /2 + t + tan(1))

ln |x + 5| = t + C

sin(t)

= (t + 1)(cos(x))2 , x(0) = 1

## sec2 (x)dx = (t + 1)dt

tan(x) = t2 /2 + t + C

ln |x| = ln |t| + C

9.

dx
dt

c
25. ln | m
v + g| =

c
m (t

+ K)

mt
v = gm
c + e
c

arctan(x) = t /2 + C

As t , v gm
c

x(t) = tan(t2 /2 + C)

If m = 1, gm
c = 20, then c = 0.49

15. y = y + 1
dy

1dt
y+1 =

v = 20 + e0.49t
v(0) = 0 = 20

ln |y + 1| = t + C
therefore, y = Aet 1 where A = eC

## To get within 1% or terminal velocity,

y(0) = A 1 = 2, A = 3

y = 3et 1
252

Section 2.2

3
x(t) 2
1
3 2

0
1
2
3

m=2 1
3

1 0

1 2 3
t

1 m=2
1 t 2

1
2

## 9. Slope eld for x = t2 x

3. Slope eld for x = x(1 x/2)

3
x(t) 2
1
3 2

0
1
2
3

1 2 3
t

m=2
x 2
1 1
0
1 0
1 t 2
1 1
2 m=2

## 5. Slope eld for x = t/x

11. Slope eld for x + x = t
3
x(t) 2
1
3 2

0
1
2
3

3
2
x(t)
1

1 2 3
t

0
1
2
3

1 2 3
t

## Solution curves that start above the solution curve x = t 1 (corresponding

to the initial condition x(0) = 1) decrease at rst, then increase to innity
as they approach x = t 1. Solution
253

curves that start below x = t 1 increase towards x = t 1 and then follow it to innity. All curves approach
positive innity as t gets large.

Section 2.3
1. Separable
3. Linear and separable
5. Linear and separable

7. Let (t) = e

0
1
2
3

1 2 3
t

## x 0 as t for any value of C.

9. tx + 2x = 1 + t
x + 2t x =
Let = e

1
t

+1

2
t dt

= e2 ln(t) = t2

t2 x + 2tx = t + t2
d 2

2
dt (t x)dt = (t + t )dt
t2
2
= 21

t2 x =

x(t)

t3
3 +C
t
C
3 + t2 .

## For large t, the solution looks like x(t) =

t
1
2 + 3 for any C, which means that
all solutions are asymptotic to the line
x = 12 + 3t , and so all solutions go to
innity linearly.

## 15. Slope eld for x = 1 + t/2

3
2
x(t)
1
0
1
2
3

= e2t

e2t x = sin(t) + C

If x(0) 0, the curve increases to positive innity. If 1/2 < x(0) < 0, the
curve decreases at rst, then increases
to positive innity. If x(0) 1/2, the
curve decreases to negative innity.

2dt

## e2t x + 2e2t x = cos(t)

d 2t

cos(t)dt
dt (e x)dt =

3
2
x(t)
1
3

11. x x = e3t
Let = e

1 2 3
t

(1)dt

= et

et x et x = e2t
d t
2t
e dt
dt (e x)dt =
et x = e2t /2 + C

Solution curves increase to positive innity for all initial values x(0).

## x(t) = e3t /2 + Cet

x(0) =
x(t) =

1
2 +C =2
3 t
1 3t
2e + 2e

C=

13. x + 1t x = t + 1
Let = e

1
t dt

= eln(t) = t

tx + x = t2 + t
254

3
2

= (t2 + t)dt

d
dt (tx)dt

tx =

t3
3

t2
2

y (sin(y))

5. Yes,

y (2xy)

x(1) =

+ 2t + Ct
+ 12 + C

x(t) =

t2
3

c
mv

t
2

7.

5
6t

Let = e
e

c
mt

c
m dt

= emt

c
c m
t
v
me

c
mt

y=

e m t v = ge m t /(c/m) + K
v = gm
c + Ke

F
x
F
y

9.

c
m
t

x2
2

=x+y F =

+ y2 )

+ xy + Q(y)

= x + Q (y) = x + 1 Q (y) = 1

Solving

= ge

c
c
d
m t v)dt =
ge m t dt
dt (e
v +

2
x (x

= 2x =

Q(y) = y F =

= g

x (x cos(y))

= 0 C = 56

15. mv = mg cv
v +

= cos(y) =

+C

t2
3
1
3

x(t) =

3. Yes,

C
x+1

x2
2

+ xy + y

x
2

+ xy + y = C for y gives

x2
2(x+1)

= y + sin(y) F = xy + x sin(y) +
Q(y)
F
x

= x + x cos(y) + Q (y) = 1 + x +
x cos(y)
F
y

Q (y) = 1 Q(y) = y
xy + x sin(y) + y = C (implicit soln.)

Section 2.4
x
1. f (t, x) = 1+t
2 is continuous for all val1
ues of x and t, and f
x = 1+t2 is also
continuous for all x and t; therefore,
the equation has a unique solution through
every initial point (t0 , x0 ). Solutions
cannot intersect anywhere in the plane.

11.

y (1
F
x
F
y

x+

+ xy) = x =

= 1 + xy F = x +
=

x2
2

x2
2 y

3. f (t, x) = x t and
= 2x are both
continuous for all t and x; therefore
there is a unique solution through any
initial point. Solution curves can never
intersect.
f
x

## 5. The theorem only says there is a unique

solution on some (possibly small) interval about the point (t, x) = (0, 1).

y (x

+ y) = 1 =

13.

+ Q (y) Q (y) = 0
=Cy=

2 3
x2 ( 2

y (sin(y))
F
x
F
y

+ Q(y)

2
x2 (C

x)
3
2

x)

x (x cos(y))

= cos(y) =

## = sin(y) F = x sin(y) + Q(y)

= x cos(y) + Q (y) Q (y) = 0

x sin(y) = C y = sin1 ( Cx )
y(1) = sin1 (C) =
y(x) =

C=1

sin1 ( x1 )

15. P = 2P 12 P 2 , N = 2, v 1/P

Section 2.5
1. Yes,

x2
2 y

y(1) = 2(C 1) = 1 C =
y(x) =

1 2
x ( 2 x )

v = 2v + 12 , = e
1
2t
4 + Ce
1
= v1 = 1 +Ce
2t
4

v=

x (x)

P
255

2dt

= e2t

17. y = y + et y 2 , N = 2, v 1/y

v v = e , = e
t

we get

Eulers Method

## v = tet + Cet , v(0) = C = 1

v(t) = (1 t)et y(t) =

Stepsize
1
0.1
0.01
0.001

e
1t

19. y = y + ty 3 , N = 3, v 1/y 2
v 2v = 2t v = t +

1
y = 1v = t+ 1 +Ce
2t

1
2

+ Ce2t

Runga-Kutta

(2

3e

+ Ce

)
4t 1/2

Estimate of x(5)
-0.756802
-0.620916
-0.612134
-0.611281

## the solution will tend to zero if C > 0

and will have a vertical asymptote if
C < 0.
1
2
y(0) = 1
C = (y(0))
2 3 .;
2/3+C

## special solution is y(t) = 32 et/2 .

Stepsize
1
0.5
0.25

Estimate of x(5)
-0.608963
-0.610998
-0.611174

diftol
0.001
0.0001

Estimate of x(5)
-0.611026
-0.611193

Section 2.6
1.

3.

tj
0
0.25
0.5
.75
1.0
1.25
1.5
1.75
2.0

xj
1.0
0.75
0.625
0.59375
0.632813
0.724609
0.855957
1.016968
1.200226

ti
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2

xi
1
0.8125
0.720703
0.703674
0.745058
0.832077
0.954747
1.105271
1.277556

xj
1.0
0.5
0.125
0.15625
0.367188
0.525391
0.644043
0.733032

xj + 14 xj
0.75
0.625
0.59375
0.632813
0.724609
0.855957
1.016968
1.200226

m0 = ti x i
-1
-0.5625
-0.2207
0.046326
0.254942
0.417923
0.545253
0.644729

x
ej+1
0.75
0.671875
0.665527
0.715256
0.808794
0.936557
1.091061
1.266454

256

ej+1
m1 = tj+1 x
-0.5
-0.171875
0.084472656
0.284744263
0.441206455
0.563442543
0.658939487
0.733546474

m=

m0 +m1
2

-0.75
-0.3671875
-0.0681152
0.1655349
0.3480741
0.4906829
0.6020960
0.6891375

xj+1
0.8125
0.720703
0.703674
0.745058
0.832077
0.954747
1.105271
1.277556

(b) dx
= x2
dt
dx

= dt
x2
2
x dx = x1 = t + C

## 7. Using technology (TI, Maple, applet)

we get

Eulers Method
Stepsize
1
0.1
0.01

Estimate of x(5)
1.209600
1.150925
1.146498

x(t) =

x(0) = C1 = 1 C = 1
x(t) =

Runga-Kutta
Stepsize
1
0.5

1
tC

1
1t

## The solution has a vertical asymptote at

t = 1. The solution in part (a) skips right
over this asymptote, because of the large
step size.

Estimate of x(5)
1.146284
1.146036

## 15. With the instruction

diftol
0.001
0.0001

>de1:= diff(x(t),t)=x(t)*x(t);

Estimate of x(5)
1.14587
1.14598

>sol:=dsolve({de1,x(0)=1}, type=numeric);,
the instructions
>x10:=sol(1.0) and >x12:=sol(1.2) both
produced the error message Error (in sol)
cannot evaluate the solution further right
of 1.000, probably a singularity.

3
y(t)

Section 2.7

2
1

4 2 0
1

2t 4

?
4 s sink

2
3

6
0 s source
?

4
y(x) 2
4 2 0

2x 4

2
4

x(1.2) =7.486105
257

6
0 s node
6

## 5. Phase line for

dP
dt

0.7P
= P (1 P5 ) (0.05)
2 +P 2 )

## Equilibria are at P = 0, 0.83795, 4.1584,

and 0.0035872 (this one is hard to see).
?
4.16 t sink
6
0.838 t source

## 11. Bifurcation diagram for x = x(a x).

The bifurcation point is at a = 0. For
a < 0 there is sink at x = 0 and a
source at x = a. For a = 0 there is a
node at x = 0. For x > 0 there is a
source at x = 0 and a sink at x = a.

?
0.0036 t sink
t source
0 6
?

## 13. (a) Write dx

dt = 0.5x(4 x) 2x(1
x/4). Then the carrying capacity is 4,
representing a sh population of 4000.
(b)Let h = 1 (1000 sh harvested per
year). Then the equation is
x = 2x(1 x/4) 1
258

and
are 2
the equilibrium solutions

## 2. The solution 2 + 2 is a sink and

2 2 is a source.
(c) Since
x(0) = 0.5 is below the source
at 2 2, the population will decrease
and reach 0 in nite time. This means
that if 1000 sh are harvested per year,
and there are initially only 500 sh, the
population will go extinct (seems reasonable).
(d) Bifurcation Diagram
?
4 t

?
t

0 t
?

t
?

?
t
6
t
?
1.0

?
t
6
t
?

?
t
?
2.0

x
1
ln( 1x
) for x.
solving x + 0.2 = 10
The equilibrium values of x are given
in the table below:

0.4
0.5
0.52
0.6
0.7
0.8
0.88
0.9
1.0

low sink

source

0.1127(node)
0.328504
0.500000
0.671496
0.8873(node)

0.022401
0.007188
0.002536
0.001114
0.000919
0.000336

high sink
0.999664
0.999081
0.998889
0.997464
0.992812
0.977599

?
-h

## (e) The bifurcation occurs when h is

large enough so that the parabola y =
2x(1 x/4) h just touches the x-axis.
The maximum of 2x(1 x/4) is 2 (at
x = 2), so h = 2 is the bifurcation
value.

Section 2.8

1.0 s

6
s

6
s
s?

s
6
s
?
s

s s
s6
?
s

?
s

0.4

?
s-
1.0

## 5. Plot solutions of x = x + S(x + 0.2(1 +

sin(t)) 0.7) for x(0) near 0.5. Note that
solutions with initial values slightly below
0.5 are attracted to the upper equilibrium
solution (which in this case is periodic).
With constant input 0.2, any solution that
started below x(0) = 0.5 died out.

Section 3.1

## 1. Let r be the ow rate into the tank, and

V (t) = 150 + (r 2)t be the volume at
time t. Solve the IVP
2x
x = 3r
, x(0) = 20
150 + (r 2)t

1. Linear, homogeneous
3. Linear, nonhomogeneous
5. Nonlinear

## for x(t). The values of r and t must

satisfy the two simultaneous conditions
x(t)/V (t) = 1 and 150 + (r 2)t =
160. This results in r 2.4369 and
t 22.89 minutes.

everywhere).

## 3. The equilibrium solutions can be found,

for a given value of , by numerically

259

## 9. 2 < t < 1 because tan(t) is continu1

ous on 2 < t < 2 and 1t
is continuous on < t < 1.

## 13. x1 + x1 = cos(t) + cos(t) = 0

10

x2 + x2 = sin(t) + sin(t) = 0

x1 x2 x2 x1
2

W (x1 , x2 ) =
= (cos t)(cos t) 6
(sin t)( sin t) = cos t + sin2 t = 1, so y
4
x1 and x2 are linearly independent.
2
15. t2 x1 2tx1 +2x1 = t2 (0)2t(1)+2(t) =
0
0

t

## t2 x2 2tx2 + 2x2 = t2 (2) 2t(2t) +

2(t2 ) = 0
W (x1 , x2 ) = x1 x2 x2 x1 = t(2t)
t2 (1) = t2 > 0 on t > 0, so x1 and
x2 are linearly independent.

11. 4r2 4r + 1 = 0
r=

## x (t) = 21 C1 et/2 + C2 ( 12 tet/2 + et/2 )

x(0) = C1 = 0, x (0) = C2 = 1

1. r + 7r + 10 = 0
(r + 5)(r + 2) = 0 r = 2, 5
2t

+ C2 e

x(t) = tet/2

5t

13. r2 2r + 5 = 0

As t , x(t) 0.

r = 1 2i

3. r2 + 6r + 9 = 0

## y(t) = C1 et cos(2t) + C2 et sin(2t)

(r + 3)(r + 3) = 0 r = 3

## +C2 (et 2 cos(2t) + et sin(2t))

As t , x(t) 0.

y(0) = C1 = 1

5. r2 + 2r + 5 = 0

y (0) = C1 + 2C2 = 1 C2 = 0

r = 1 2i

y(t) = et cos(2t)

## y(t) = C1 et cos(2t) + C2 et sin(2t)

y oscillates with decreasing amplitude
as t .
3

is a double root.

## x(t) = C1 et/2 + C2 tet/2

Section 3.2

x(t) = C1 e

1
2

t
1 2 3 4 5 6
0
40

7. r + 3r + 3r + 1 = 0, Solution is: r =
1, (multiplicity 3 using Maple solve y 80
command). x = C1 t2 et + C2 tet +
C3 et . As t , x(t) 0.
120
9. 2r2 + 3r 9 = 0

## 15. r3 + 2r2 + 5r = 0, Solutions are: r = 0,

r = 1 + 2i, r = 1 2i

r = 32 , 3
y(t) = C1 e3t/2 + C2 e3t
y (t) = 32 C1 e3t/2 3C2 e3t

x = C1 + C2 et cos 2t + C3 et sin 2t

y(0) = C1 + C2 = 1

x(0) = C1 + C2 = 2

y (0) = 32 C1 3C2 = 0
C1 = 23 , C2 =
y(t) =

2 3t/2
3e

1
3

1 3t
3e

## C3 (sin 2t) et + 2C3 (cos 2t) et

260

x (0) = C2 + 2C3 = 0

4C3 (cos 2t) e

## 3C2 (cos 2t) e

3. y + 12y + 72y = 0
c2 4mk = 144 288 < 0 under
damped

r2 + 12r + 72 = 0 r = 6 6i

## Solving C2 + 2C3 = 0 and 3C2

4C3 = 0 gives us C2 = C3 = 0.

0 C2 = 1

0.8

0.6
y
0.4

## 17. Assume ar2 + br + c = 0 and b2 4ac =

0;

0.2
0

b
therefore r = 2a
.

1 2t3

5. 3y + 48y + 84y = 0

damped

## x = trert + ert = ert (1 + rt)

x = rert (1 + rt) + ert r = ert (2r + r2 t)

3r2 + 48r + 84 = 0 r = 2, 14

## ax + bx + c = aert (2r + r2 t) + bert (1 +

rt) + cert = ert [(2ar + b) + t(ar2 + br +
c)] = ert [0 + 0] = 0

## y(t) = C1 e2t + C2 e14t

y (t) = 2C1 e2t 14C2 e14t

## Therefore, x = tert is a solution.

y(0) = C1 + C2 = 2,
y (0) = 2C1 14C2 = 0

## 19. (i) B, (ii) C, (iii) A

C1 = 37 , C2 = 13
y(t) = 37 e2t 31 e14t

Section 3.3

2
1.6

1. y + 64y = 0, undamped

1.2
y
0.8

r2 + 64 = 0 r = 0 8i

0.4

## y (t) = 8C1 sin(8t) + 8C2 cos(8t)

y(0) = C1 = 0.3, y (0) = 8C2 = 0
C2 = 0
y(t) = 0.3 cos(8t)

7. y + 20y + 100y = 0
c2 4mk = 400 400 = 0 critically
damped
r2 + 20r + 100 = 0 r = 10

0.3
y 0.2
0.1
0
0.1
0.2
0.3

1 2t3

1 2t3

## y (t) = 10C1 e10t 10C2 te10t +C2 e10t

y(0) = C1 = 0.5
261

y (0) = 10C1 + C2 = 2 C2 = 7
y(t) = 0.5e
t
0
1.0
tions) 2.0
3.0
4.0
5.0

10t

Section 3.4

10t

7te
(no oscillay(t) (meters)
0.5
0.0003405
2.989 108
2.01 1012
1.21 1016
6.85 1021

## 1. Let yp = A cos(2t) + B sin(2t)

(4A cos(2t)4B sin(2t))(A cos(2t)+
B sin(2t)) 4 cos(2t)
(5B) sin(2t)(5A) cos(2t) = (0) sin(2t)+
(4) cos(2t)
B = 0, A = 45
yp (t) = 45 cos(2t)

9. 5y + y + y = 0

## yh (t) = c1 cos(t) + c2 sin(t);

5r + r + 1 = 0 r =
2

y(t) =

1
10

t/10

y (t) = C1 e

1
( 10

1
+C2 et/10 ( 10
sin(

19
10 i

sin(

19
t)+ 1019
10

## Setting yp + yp 0 sin(t) + 4 cos(t),

sin(

5. r2 2r + 1 = 0 r = 1

19
t))
10

1
C1 + 1019 C2
10

=
y(0) = C1 = 1, y (0) =
1 C2 = 919
(
)

## y(t) = et/10 cos( 1019 t) 9 1919 sin( 1019 t)

2
period = 19/10
14.415 sec., frequency 0.064 cycles/sec.

t
0
1.0
2.0
3.0
4.0
5.0

Let yp = A + Bt
yp 2yp +yp = 02(B)+(A+Bt) 2t
(B)t + (A 2B) (2)t + (0)
A = 4, B = 2
y(t) = yh + yp = C1 et + C2 tet + 4 + 2t
7. r2 3r + 2 = (r 1)(r 2) = 0
yh = C1 et + C2 e2t

## 2Aet +tAet 3(Aet +tAet )+2tAet et

2Aet 3Aet = Aet = et A = 1
y(t) = C1 et + C2 e2t tet
9. r2 + 2r + 2 = 0 r = 1 i

## 11. Theroots of mr2 + cr + k are r =

c c2 4mk
. Assume m, c, and k are
2m
all positive.

## (1) if c2 4mk > 0, then c2 4mk <

c2 4mk
c, so c 2m
< 0;
(2) if c 4mk = 0, then r =

yh = C1 et + C2 tet

## Let yp = tAet , since et satises the homogeneous d.e.

y(t) (meters)
1.0
0.031421
0.76719
1.28426
1.47867
1.37423

yp (t) = 2t sin(t)

19
t))
10

cos(

2A = 4, 2B = 0; B = 0, A = 2

19
10 t))

c
2m

yh = C1 et cos(t) + C2 et sin(t)
Let yp = A cos(t) + B sin(t)
yp + 2yp + 2yp = (A + 2B) cos(t)
+(B 2A) sin(t) 2 cos(t) + 0 sin(t)
A + 2B = 2, B 2A = 0 A = 25 , B =
4
5

< 0;

## (3) if c2 4mk < 0 the roots are comc

< 0.
plex and have real part 2m
262

## y(t) = C1 et cos(t)+C2 et sin(t)+ 52 cos(t)+

4
5 sin(t)

y(0) = C1 +

2
5

= 1 C1 =

y (0) = C1 + C2 +
65
et ( 35

y(t) =
4
5 sin(t)

4
5

cos(t) 65

17. r2 + 2r + 1 = (r + 1)2 r = 1

3
5

yh = C1 et + C2 tet

= 1 C2 =

sin(t))+ 25

cos(t)+

## (Aet + 2Bet + Btet ) + 2(Aet + Bet +

Btet ) + (Aet + Btet ) = tet

41 , B = 14

## (Aet ) + 10(Aet ) + 21(Aet ) et A =

1
32

yp = 14 et + 14 tet

## y(t) = C1 et + C2 tet 41 et + 41 tet

(2C)+10(B+2Ct)+21(A+Bt+Ct )
0 + 0t + (1)t2
2

21C = 1 C =

y(0) = C1

20
+ 158
213 212 t +

yh (t) = C1 e + C2 e

5
4

Section 3.5

13. r2 9 = 0 r = 3
3t

5
4

y(t) = 45 et (1 + t) + 14 et (t 1)

## 21B + 20C = 0, 21A + 10B + 2C =

158
20
0 B = 21
2 , A = 213
1 t
32 e

= 1 C1 =

y (0) = C1 + C2 = 0 C2 =

1
21

1 2
21 t

1
4

3t

## sin(ab) = cos(a) sin(b)+cos(b) sin(a)

Let yp1 = A + Bt
sin(ab) = cos(a) sin(b)+cos(b) sin(a)

9(A + Bt) t A = 0, B = 91
yp1 = 19 t

## sin(a + b) sin(a b) = 2 cos(a) sin(b)

Let yp2 = C cos(t) Note: if y is missing, you do not need the term C2 sin(t)

a + b = c, a b = d a =
cd
2

1
C = 10
yp2 =

1
10

## Substituting, sin(c) sin(d)

cd
= 2 cos( c+d
2 ) sin( 2 )

cos(t)
3t

y(t) = C1 e + C2 e
y(0) = C1 + C2 +
3C2 91 = 1

3t

1
10

1
1
9 t + 10

cos(t)

4
| 5

73
127
540 , C2 = 540
73 3t
1
3t
e 127
19 t + 10
= 540
540 e

cos(t)

## 15. Let yp = A cos(2t)+B sin(2t)+t(C cos(2t)+

D sin(2t))
Collecting terms in yp + yp ,

3
6
cos(t) + sin(t)
5
5
|
{z
}

1
0.5

## +t cos(2t)[3C]+t sin(2t)[3D] 3t sin(2t) 0

A = 43 , B = 0, C = 0, D = 1

2
{z 5
transient part

= 0, y (0) = 3C1

C1 =
y(t)

c+d
2 ,

0.5
1

## yp (t) = 43 cos(2t) t sin(2t)

263

5 10 15 20 25 30
t

b=

xp = x1 v1 + x2 v2 = (et + 1) ln(et +
1) 1

## transient part dies out around t = 3

As t , xp (t) 1 + t
5. y(t) =

1
3

sin(2t)

2
3

xp (t) = t.

sin(t)

## 5. (i) B, the solution is x = c1 t1 + c2 t3

and x as t 0. (ii) C, the solution is c1 cos(3 ln(t)) + c2 sin(3 ln(t))
and it oscillates innitely often as t
0. (iii) A, the solution is c1 t + c2 t3
which is zero at t = 0.

0.8
0.4
0
0.4

5 10 15 20 25 30
t

## 7. You are solving x t22 x = 2t , but the

homogeneous equation is the CauchyEuler equation t2 x 2x = 0

0.8

## The roots of the characteristic polynomial r2 r 2 = 0 are 2 and 1. Let

x1 = t2 and x2 = t1 .

7. y(t) = 40
19 cos(10t) +

40
19

cos(9t)

## W (x1 , x2 ) = t2 ( t12 ) 1t (2t) = 3

2f

2
v1 = xW
= 1t 2t 1
3 dt = 3t
2 2 1
x1 f
2
v2 = W = t t 3 dt = t3

4
2
0
2

xp = x1 v1 + x2 v2 = 32 t 13 t = t

## 9. For the homogeneous equation t2 x

2tx + 2x = 0 the roots of the characteristic polynomial r(r 1) 2r +2 = 0
are r = 1 and r = 2. Let x1 = t and
x2 = t2 .

8 12 16
t

4
beats are present

## W (x1 , x2 ) = t(2t) t2 (1) = t2

2f

v1 = xW
= t2 3t t12 dt = 3 ln(t)

Section 3.6
1. W (x1 , x2 ) = et (3e3t )(et )e3t =
2e4t
2f
3t 2et
2t
v1 = xW
= e2e4t
dt = e2
1f
et 2et
e4t
v2 = xW
= 2e
4t dt = 4
xp = x1 v1 +x2 v2 =
xp =

4t
2t
et ( e2 )+e3t ( e4 )

et
4

et
2f
t
= 1+e
v1 = xW
t dt = e +
t
ln(e + 1)
t t )
1f
t
= (e1+e)(e
v2 = xW
t dt = ln(e + 1)
264

v2 =

x1 f
W

t 3t t12 dt = 3t

## xp = x1 v1 +x2 v2 = t(3 ln(t)) 3t (t2 ) =

3t ln(t) 3t
x(t) = c1 t + c2 t2 3t(1 + ln(t)), x (t) =
c1 + 2c2 t 3 3(t( 1t ) + ln(t))
x(1) = c1 + c2 3 = 1, x (1) = c1 +
2c2 6 = 0, c1 = c2 = 2
x(t) = t + 2t2 3t ln(t)
11. For the homogeneous equation 4t2 x +
x = 0, r = 12 is a double root of the
characteristic polynomial. The two so1
1
lutions are x1 = t 2 and x2 = t 2 ln(t).

tn
0
0.25
0.5
.75
1.0

5
4
x3
2

yn
1.0
1.0
1.0
0.966461
0.841919

yn
0
0
0.134156
0.498170
0.921860

yn
0
0.536622
1.456059
1.694759

## 0.5 1 1.5 2 2.5 3

t

y (1) = 0.84043071

## 3. y + 2y + y = sin(2t), y(0) = 0, y (0) =

W (x1 , x2 ) = t 2 (t 2 1t + 12 t 2 ln(t))
1

1
2

1
ln(t)( 12 t 2 )

v1 =
2

t
4

v2 =

=1
Eulers Method, decreasing values of h =
t
1
2
1
= t 2 ln(t)t 2 dt = t2 ln(t)+

x2 f
W

x1 f
W

t 2 t 2 dt =

h
1
0.1
0.01
0.001

t2
2

xp = x1 v1 + x2 v2 = 41 t 2
1

## Estimate y(1) 0.531

x(t) = c1 t 2 + c2 t 2 ln(t) + 41 t 2
x (t) = 12 c1 t 2 +c2 (t 2 1t + 12 t 2 ln(t))+
5 32
8t
1

x(1) = c1 +

1
4

= 0 c1 = 14

+ c2 + = 0 c2 =

5
x(t) = 14 t 12 t ln(t) + 41 t 2
x (1) =

1
2 c1

5
8

## 5. y + 4y = 2 cos(2t), y(0) = 0, y (0) = 0

4th order RK, decreasing values of h =
t

12

h
1
0.5
0.25
0.1

As t 0, x(t) 0
2.5

y(1)
0.36020154
0.44418333
0.45402334
0.45463493

to 4 decimals)

1.5
x
1

0.5
0

y(1)
1.0
0.5279665
0.5311058
0.5313352

## 0.5 1 1.5 2 2.5 3

t

Section 3.7
1. y +3y +2y = 2 cos(3t), y(0) = 1, y (0) =
0
Solution by Eulers Method, t = 0.25
265

dif tol
0.1
0.01
0.001
0.0001

y(1)
0.45305569
0.45305569
0.45383236
0.45455311

## Exact solution is y(1) = 0.45464871 so the

abs. error is 0.0001

Section 3.8
1. For x +7x +12x = 0, x(0) = 0, x (0) =
10 the solution is

x1=x2,x2=12x17x2
10
x2 5
1

0.5

## x(t) = 10e3t 10e4t .

x vs t

Phase Plane

10
8
6
4
2

1
0.8
0.6
0.4
0.2

0.20.40.60.8 1
x

0
1 2t3

x1=x2,x2=17 x1 - 2 x2
10
x2
4
2 5
2 x1 4
0
5
10
15

x vs t

1 2t3

9. x + 7x + 12x = 0
3. For x +2x +17x = 0, x(0) = 5, x (0) =
0 the solution is
x(t) =

0
5
x
10
15

x
1 2 3 4 5

direction field
1.5
1
y
0.5

5 t
e sin(4t) + 5et cos(4t).
4

## Under damped, unforced system, mass

given initial displacement of 5 oscillates
about equilibrium with amplitude of oscillation going to 0 as t .
2

x vs t
5

0
5

0
2

1 2t3

1.5

0
0.5
1
1.5

0.5 1 1.5
x

x vs t

1 2t3

0.5
x1

10

## Over damped, unforced system, mass

given initial velocity 10 returns to equilibrium as t .
10
8
6
x
4
2

0
5

11. x 5x + 6x = 0

10
15

## 5. Phase plot done using DEplot in Maple.

The stepsize is 0.05.

## 7. Phase plot done using DEplot in Maple.

The stepsize is 0.05.

266

direction field
1.5
1
y
0.5
1.5

0
0.5
1
1.5

20 y
10
4

0.5 1 1.5
x

y
2

10
20

13. x + 7x + 12x = 0

Section 4.1
1. Let x1 x, x2 x
{
x1 = x2
x2 = sin(t) 2x1 5x2

20

y 10
4

2 0

2 0
10

3. Let x1 x, x2

x1 =
x =
2
x3 =

2x 4

20

x , x3 x
x2
x3
2 + t 3x1 4x3

## System is linear, dimension 3.

15. x 5x + 6x = 0

## 5. System is already in form (5.1). It is a

linear system, dimension 2.

## The system is unstable.

7. Let x1 x, x2 y, x3 y , x4 y

x = x1 x2

1
x2 = x3

= x4
x

3
x4 = x1 + x4 + x22

20
y 10
4

2 0
10

2x 4

System is nonlinear

20

## 17. Equilibria: (0, 0), (2, 0), (2, 0)

All solutions tend away from the unstable equilibrium at (0, 0) and go to one
of the stable equilibrium points, either
(2, 0) or (2, 0).

267

x = 5x 7y
y = 3x 2y

## System is linear, dimension 2.

10. The system equations are
{
y
x = 2 12 + 40
3
y
x

y = 3 50 3 40

x
50

## 11. The volume in Tank A increases by one

13. In matrix form the system is
(
)(
) ( )
gallon per minute and the volume in
1 2
x
0
=
Tank B decreases by one gallon per minute.
1 3
y
5
Letting V1 = 50 + t and V2 = 40 t,
The
inverse
of
the
matrix
of coecients
( 3 2 )
the system equations are
5
5
, and the solution is
is
1
1

5
5
y
2x
(
) ( 3 2 ) (
) (
)
x = 50+t + 40t
x
0
2
3y
2x
5
5
=
=
y = 50+t
40t
1
1
y
5
1

5
5
This is a two-dimensional linear system
with non-constant coecients

(
15.
(

Section 4.2

17.

1 3
2 7

1. A + B =

3. C(A+B) is not dened since C has dimension 23 and A+B has dimension
2 2.
(
5. ABC =
(
7. AB =

21 29
18 17

1 7
7 6

5
20

)
, BA =

8
7

7
13

(
11. A

4
3
(

1
2

(
=

1
32

)(

x1
x2

x1
0
x2
0

x3 = 0
x4
1

1
0
0
1

(
+

0
e2t

0 0
x1
x2
1 0

0 1 x3
3 2
x4

3. Single eigenpair

4
11
3
11

{
( )}
1
2,
1

5. Complex eigenpairs
{
( )} {
(
)}
1
1
1 + 3i,
, 1 3i,
i
i
1
11
2
11

) ( 3
3 2
5
B =
=
1
1 1
5
(
) ( 4
4 1
1
3
D1 = 0+3
=
3
0
1
1

0
1
5 4

## det B = (1) (3) (1) (2) = 5

1
8+3

{
( )} {
(
)}
2
1
1. Eigenpairs 1,
, 4,
1
1

9. trace(B) = 1 + 3 = 2

Section 4.3

x1
x2

## 7. Eigenpairs for G are

0
0
)
2
4, 0 , 2, 1
5
1
1
1
5

)
1
1
3
1, 1
and
0
2
268

3
0.45750
3 = 0.45750
9. (a) 0.45750
3
5
0.76250

1
(0.40825 0.40825i) 1 + i
0

0.40825 0.40825i

0.81650
=
0

Section 4.4

1. X(t)
= c1 e2t

## (b) (0.45750)2 +(0.45750)2 +(0.76249)2 =

1.000004 1
(0.40825)2 +(0.40825)2 +(0.81650)2 =
1.000008 1
= ert U
is a solution of X
= AX,

10. If X
= rU.
Now
then we know that AU
= ert (k U)
(note that ert k is a
let Y
scalar). Then
d
= kert (rU)
= kert (AU)

Y = krert U
dt
= Aert (k U)
= AY

= A(kert U)
using the properties of scalar and matrix multiplication.

x(t) =
y(t) =

1
0

(
+ c2 e3t

1
5

c1 e2t + c2 e3t
5c2 e3t

(
(
)
(
))
2
2

3. X(t)
= c1 cos(2t)
sin(2t)
1
0
(
(
)
(
))
2
2
+c2 sin(2t)
+ cos(2t)
1
0

x(t)

y(t)

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

5. X(t)
= c1 e2t

1
1
)

( (
(
))
1
1
+c2 e2t t
+
3
1
2
(
)
(
) (
)
1
1
2

X(0)
= c1
+c2
=
3
1
3
2
The solution of this linear system is
c1 = 0, c2 = 2; therefore,
(
)
( (
) (
))
1
x(t)
1
2t

X(t) =
= 2e
t
+
3
y(t)
1
2

7. x (t) = C1 et C2 et , y (t) = C1 et +
C2 et
9. x (t) = C1 et + C2 e2t , y (t) = C1 et
11. x (t) = et sin t, y (t) = et cos t
13. The equation for x(t) is separable:
dx

dx
dt = x
x = dt
ln(x) = t + C x = eC et
269

x(0) = 1 eC = 1 x(t) = et
t

## (d) Both x(t) and y(t) tend to zero as

t , since there is no salt in the
liquid entering Tank A.

= e , y(0) = 1 y(t) = e

dy
dt

(

x
y

)
=

3
50
3
50

1
40
3
40

)(

x
y

## 17. (a) The rate in - rate out equations

3
1
become x = 50
x + 40
y + 2p and y =
3
3
50 x 40 y, which is equivalent to the
matrix equation

## The two eigenpairs of the matrix are:

(
(
))
0.61625
0.02805,
0.78755
(
(
))
0.47001
and 0.10695,
0.88266
The general solution is
(
)
0.61625
0.02805t

X(t) = c1 e
0.78755
(
)
0.47001
0.10695t
+c2 e
0.88266

x
y

3
50

1
40
3
40

3
50

)(

x
y

) (
)
2p
+
.
0

)
p =
, then X
0 =
(
)
(
)
3
1
a
40
Solving 350
p +b.
AX
=
3
b
40
50
(
)
2p
gives a = 50p and b = 40p.
0
p =
(b) If X

)
5
1
can be solved to give c1 = 5.3422, c2 =
3.6336

=

a
b

(
)
0.61625
0.02805t

X(t) = c1 e
0.78755
+c2 e

0.10695t

0.47001
0.88266

) (
)
50p
+
.
40p

## x(t) = 3.2921e0.2805t +1.7078e0.10695t

With p = 0.1,
y(t) = 4.2072e0.2805t 3.2072e0.10695t

X(0)
= c1

(b)

(
+c2

5 lbs.
4
3
2

) (
) (
)
5
5
+
=
.
4
1

2.0225.

x(t)
y(t)

(d)

1
0
1

0.47001
0.88266

0.61625
0.78755

20

40
60
t(min.)

80

## (e) In this case the concentration in

both tanks must approach 0.1 pounds
per gallon as t ; therefore, x(t)
5 and y(t) 4 as t .

100

## (c) The amount of salt in both tanks is

approximately equal to 1.986 pounds at
time t 21.306 minutes.
270

Section 5.1

5 lbs.
4

x(t)

y(t)

y 2
1

3
2

3 2

0
1

1 x2 3

0
1

20

40
60
t(min.)

80

100

y 2
1

3 2

0
1

## 5. tr(A5 ) = 0, det (A5 ) = 2

11. Eigenpairs:

(
))
(

1 ( 22 i
2i,
1

(0, 0) is a CENTER.

7. Eigenpairs:
(
(
))

0.530 0.468i
7
1
2 2 i,
0.707

CENTER at (0, 0)
13. Equation is over damped.
(
) (
)(
)
x
0
1
x
=
y
2 4
y

3
y 2
1
3 2

0
1

1 x2 3

## tr(A) = 4, det (A) = 2

(0, 0) is a SINK.
1 x2 3

(
) (
)(
)
0
1
x
x
=
y
y
13 23

1
3

9. Eigenpairs:
(
(
))
0.402
0.562,
,
0.916
(
(
))
0.977
3.562,
0.214

## 17. Equation is over damped.

(
) (
)(
)
x
0
1
x
=
y
4 5
y
tr(A) = 5, det (A) = 4

## SADDLE POINT at (0, 0)

(0, 0) is a SINK.
271

A mass-spring system is
under damped (0, 0) is a SPIRAL SINK
critically damped (0, 0) is a CENTER
over damped (0, 0) is a SINK
(
19.

x
y

(
=

0
k
m

1
c
m

)(

x
y

(
)
0r
1
det
k
c
m
m
r
=

1
2
m (mr

+ cr + k)

## Since m = 0, this has the same roots

as the characteristic polynomial for the
second-order equation. Note that, in
both cases, these roots turn out to be
the coecients of the exponential terms
in the solution.
21. (a) We must have tr(A) = a d = 0
and det (A) = ad bc = 0; that is,
d = a and bc = a2 . If a = 0, then
neither b nor c can be 0, and the matrix
must have the form given in equation
(5.2). If a = 0, the other 3 forms correspond to b = c = 0; c = 0, b = 0; and
b = 0, c = 0.
(
(b) If A =
= AX

X

0
0
{

0
0

)
, then

x = 0
y = 0

## This says that every point in the phase

plane is an equilibrium point.
(
)
0 b
If A =
, then
0 0
{
{
x = by
y(t) = y0

y = 0
x(t) = x0 + by0 t
Every point on the xaxis (y0 = 0)
is an equilibrium point. Trajectories
through (x0 , y0 ), where y0 = 0, are horizontal lines, moving right if by0 > 0
and left if by0 < 0.
272

)
(
0 0
If A =
, then
c 0
{
{
x =0
x(t) = x0

y = cx
y(t) = y0 + cx0 t
Every point on the yaxis (x0 = 0)
is an equilibrium point. Trajectories
through (x0 , y0 ), where x0 = 0, are vertical lines, moving up if cx0 > 0 and
down if cx0 < 0.
(c) An eigenvector corresponding
to
eigen-)
(
)(
a
b
u
2
value 0 must satisfy
v
ab a
(
) ( )
au + bv
0
2
=
=
0
ab u av
Every vector that satises this equation must have au
( = bv,
) and hence
b
be of the form K
for some cona
stant K.
(
)(
)
a
b
0

2
(d) AU =
=
1
ab a
(
)
b
; therefore, the general solua
tion of the system is
(
)

1 + c2 e0t tU
1+U
=
X(t)
= c1 e0t U
(
)
( (
) (
))
b
b
0
c1
+c2 t
+
a
a
1
(
) (
)
b(c1 + c2 t)
x(t)
=
=
a(c1 + c2 t) c2
y(t)
(e) From the solution obtained in (d),
we see that y(t) = ab x(t) c2 .
(f) If y = ab x, then
)(
(
)
a
b
x
(t) =
2
X
=
ab x
ab a
( )
0
0
(g) Assume rst that the trajectory lies
above the line y = ab x; then, at any

## point on the trajectory, y = ab x +

, > 0. The tangent vector at the
(t) =
point is X
(
)(
) (
)
a
b
x
b
2
=
.
ab x +
a
ab a

## If b > 0, x = b > 0 so the trajectory

is moving right. If b < 0 it is moving
left. The case where the trajectory lies
below the line can be treated similarly.

(
=
(h) Phase plane for X

1
1
2

2
1

2
y

1
0

x
1
2

## The four phase planes below show what

happens if the entries in the second row
of the matrix are changed by very small
amounts. In each case, the values of
c and d are chosen to make the point
(tr(A), det (A)) lie just inside the appropriate region.
SINK at (0, 0)

2
y

1
0

1
2

## The entries in the second row of the

matrix were changed to c = 12 + 2 +
2
16 , d = 1
SPIRAL SINK at (0, 0)

2
y

1
0

1
2

## The entries in the second row of the

matrix were changed to c = 12 + 2 +
273

2
4 ,d

= 1

Section 5.2

CENTER at (0, 0)
1. The equilibrium points are:
(0, 0), SOURCE

## (1, 0) and (0, 34 ), SADDLES

( 12 , 21 ), SINK

1
2

## The entries in the second row of the

matrix were changed to c = 12 + 2 , d =
1

0.8

0.6
y

0.4

0.2

2
y

0
3

0.2

0.4

0.6
x

1
2

## The entries in the second row of the

matrix were changed to c = 12 2 , d =
1

274

0.8

(0, 0), SOURCE

n st

= t

=0+

e
s

n
s

|
0 +

est tn dt

est
n1
dt
s nt

est tn1 dt =

n
n1
)
s L(t

0.8

Section 6.2
0.6
weeds
0.4

1. Y (s) =

s+1
(s+1)2 +1

1
(s+1)2 +1

0.2

## y(t) = et cos(t) + et sin(t)

0.2

0.4

0.6
grass

0.8

3. Y (s) =

Section 6.1
1.

s
s2 +1

2
s1

3. s23+9

240
s6

1 2t
3 2t
y(t) = 40
e
cos(2t) 40
e
sin(2t)
1
1
40 cos(4t) + 20 sin(4t)

5
s

5. Y (s) =

2+y(0)
s1

7. Y (s) =

sy(0)+y (0)
s2 +4

s
(s2 +1)(s2 +4)

5. Y (s) =

## 9. y(t) = 2e5t 3 cos(2t) + t

5
11. y(t) = e 2 t 3 cos( 2t) + 15 t
13. y(t) = 2 cos(2t) +

s
(s2 +16)((s+2)2 +22 )

1
3

cos(t)

1
3

(s+3)+3
(s+3)2 y(0)

(s+3)2 y (0)

cos(2t)

7. Y (s) =

## 17. Using eibt = cos(bt) + i sin(bt),

(
)
L(cos(bt)) = 0 eibt est dt
( t(s+ib) )
= e s+ib |
0
)
(
1
s
1
= ( sib
) = s+ib
s+ib sib = s2 +b2

sy(0)+y (0)
s2 +1

4s
(s2 +1)2

## y(t) = y(0) cos(t)+y (0) sin(t)+2t sin(t)

275

1
11. Let f (t) = 16 t3 eat = L1 ( (sa)
4 ); then

Section 6.3

1
1
3 a(t3)
L1 (e3s (sa)
4 ) = U (t3) 6 (t3) e

0.5

0

## The mass in an undamped system is

displaced 1m and let go. At time t =
5, an oscillatory input with twice the
natural period is introduced.

10

0.5

discontinuous
1

input

2
1 y(t)
0
1

0.8

0.6

0.4

8 t 12

16

20

0.2

10

12

14

16

18

20

t
0.2

## Response: y(t) = e2t (cos 2t+sin 2t)+

1
1
32 8 (t 2)
1

+ 8 (t 2)2

U (t2)
1 e2(t2) cos 2(t 2)
32
1 2(t2)
+ 32
e
sin 2(t 2)

0.4

## The mass in an undamped system is

displaced 1m and let go. At time t = 2
a parabolic forcing function is introduced.

1.5

4
3

0.5

2
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

1
7. Let f (t) = e4t = L1 ( s4
)
1
Then L1 (e3s s4
) = U (t 3)e4(t3)

Then

input

L1 (e3s s45 )

= U (t

y(t)
1

4
t

4
3) (t3)
6

276

## (e2t + 2e12t e3t )U (t 1)

The mass in an over damped system is
initially at rest, and is forced by a decaying exponential function. The forcing ceases at time t = 1.

2
y

input

1 y(t)
0

8 10 12 14

2
1.5
1 input

## 23. L(U (t c)) =

st
e (1)dt =
c

0.5
y(t)
0

2
t

st

e
s

est U (t c)dt =
esc
|
c = s .

Section 6.4
Convolution integrals below are done using computer algebra.

## 19. Input: f (t) = 3(t 3)

Response: y(t) = cos(2t) + 3/2U (t
3) sin(2t 6)
The mass in an undamped system is
displaced 1m and let go. At time t =
3 the system receives an impulse of 3
units in the positive direction.

## 1. f (t) = e2t , g(t) = et ,

t
f g(t) = 0 e2u etu du = e2t et
3. f (t) = 12 sin(2t), g(t) = t, f g(t) =
t 1
sin(2u)(t u)du = 14 t 81 sin 2t
0 2
5. Dierential equation is

2
y

i + 4i + 29i =

input

= 15 cos(5t)

## Use i(0) = 0, i (0) = 0

1 y(t)
0

d
dt 3 sin(5t)

4 t 6

s
Laplace: s2 I + 4sI + 29I = 15 s2 +25

10

I=

1
15s
s2 +4s+29 s2 +25

1
15s
(s+2)2 +25 s2 +25

## f (t) = 15 cos(5t), g(t) = 15 e2t sin(5t)

t
i(t) (
= 0 51 e2u sin(5u)15 cos(5(tu))du
=
)
2t
15
(cos
5t)

e
81
sin
5t
1
104
e2t 15 cos 5t + 75 (sin 5t)

## 21. Input: f (t) = U (t 5) 2 sin(t 5)

Response: y(t) = cos(3t)+1/12(3 sin(t
5) sin(3t 15))U (t 5)
The mass initially oscillates with period 2
3 . At time t = 5 a sinusoidal
forcing function of period 2 is introduced. This alters the steady state oscillation.
277

15
Long term: ilt = 104
(cos 5t + 5 sin 5t)

2
2
Amplitude is (15/104) + (75/104) =

15
104 26 0.73544

7. Dierential equation is
i + 3i + 2i =

d
dt 3 sin(t)

## Use i(0) = 0, i (0) = 0

= 3 cos(t)

s
Laplace: s2 I + 3sI + 2I = 3 s2 +
2

I=

1
3s
s2 +3s+2 s2 +25

0.16

0.14

1
3s
(s+1)(s+2) s2 + 2

0.12

)
t(
2u
i(t) = 0 eu

e
3 cos((tu))du

6 12et + 6 3
3 t

2t
6 (cos t) e2t
e

3 e +
= 4+5
2 + 4

3 3 (cos t) e2t
+9 2 (sin t) e2t

0.1

0.08

0.06

0.04

0.02

10

12

14

16

18

20

Long term:
ilt =

( (

1
4+5 2 + 4

)
)
6 3 3 (cos t)
+9 2 (sin t)

## L = 1 Henry, R = 2000 ohms, C

For a wider pass band, let a = 10000,
then

(9 2 )2 +(63 3 )2
Amplitude is
4+5 2 + 4
3
= 52 +4 +4 = 2 3 2
( +4)( +1)

## L = 1, R = 20000, C 1.162 1010

the response curves are shown below

9. DE is i + 2i + 10i = cos(t).
f (t) = cos(t), h(t) = 13 (sin 3t) et
t
i(t) = 0 13 (sin 3u) eu cos((t u))du

30 cos t + 6 sin t

30et cos 3t

10et sin 3t
1

= 30048
2 +3 4
3 2 cos t

+3 2 et cos 3t
2 et sin 3t

4e09

2e09

)
)
( (
10 2 cos t
ilt =
+2 sin t

(2)2 +(10 2 )2
Amplitude is fomega () = 100162 +4
1
10016 2 + 4

4 16 2 +100

1
(6+ 2 +10)( 2 6+10)

Graph of fomega () is
11. Let the poles be a bi = 1000
2f i = 1000 92248i
H(s) =

1
(s(a+bi))(s(abi))

1
s2 2as+(a2 +b2 )

The equation is
i + 2000i + 8.5107 109 i = cos(t)
278

4e10
a=1000
b=92248
50000 150000
w

2e10

a=10000
b=92248
50000 150000
w

## Appendix B. Derivative and Integral Formulas

The following formulas are the ones that you should have committed to memory. Having
to use a calculator to do these simple derivatives and integrals makes work in dierential
equations much too tedious.
Dierentiation Formulas

Integration Formulas

d
dx

(C) = 0, C a constant

d
dx

d
dx

d
dx

d
dx

f (x)
g(x)

)
=

d
dx

(f (x))

## g(x)f (x)g (x)f (x)

(g(x))2

d
dx

d
(xn ) = nxn1 , and dx
(x) = 1

d
dx

(sin(x)) = cos(x)

d
dx

(cos(x)) = sin(x)

d
dx

(ex ) = ex

d
dx

(ln(x)) =

d
dx

( 1 )
tan (x) =

d
dx

## (f (g(x))) = f (g(x))g (x), Chain Rule

1
x
1
1+x2

adx = ax + C
(c1 f (x) + c2 g(x)) dx = c1
xn dx =
1
x dx

xn+1
n+1

f (x)dx + c2

if n = 1

+ C,

= ln |x| + C

ex dx = ex + C
sin(x)dx = cos(x) + C
cos(x)dx = sin(x) + C
1
1+x2 dx

= tan1 (x) + C

1
a+bx dx

ln |a+bx|
b

udv = uv

+C

279

eax dx =

eax
a

+C

g(x)dx

## Appendix C. Cofactor Method for Determinants

The formula for the determinant of a 2 2 matrix is
)
(
a b
= a d b c,
det
c d
and it is very simple to compute. To nd the determinant of an n n matrix with n > 2,
there are various methods, all of which are fairly complicated and involve a lot of arithmetic.
The Method of Cofactors, described here, reduces the determinant of an n n matrix to
a sum of n determinants of size n 1 n 1. For relatively small values of n, this can
sometimes be useful, especially if a large percentage of the elements in the matrix are zero.
It is rst necessary to give two denitions.
Denition 6.6 For an n n matrix A, the minor Mij of the element aij in the ith row
and jth column, is the matrix obtained from A by deleting its ith row and jth column.

## a11 a12 a13

1 2 3
Example 6.4.6 If A = a21 a22 a23 = 4 5 6 , then the minors of a12 and
(
) a31 a32 (a33
) 7 8 9
4 6
2 3
a31 are M12 =
and M31 =
.
7 9
5 6
Denition 6.7 The cofactor of an element aij in the matrix A is denoted by Aij and is
dened as
Aij = (1)i+j det Mij (Note: the cofactor is a scalar, not a matrix.)
In the above example, the cofactors A12 and A31 are
(
)
4 6
A12 = (1)1+2 det (M12 ) = (1)3 det
= (36 42) = 6,
7 9
(

and
3+1

A31 = (1)

## det (M31 ) = (1) det

2 3
5 6

)
= 12 15 = 3.

The determinant of a square matrix can now be dened as a weighted sum of its cofactors.
Theorem 6.10 For any n n matrix A = (aij ), the determinant of A can be written as
det A =

aij Aij ,

j=1

det A =

i=1

## where j can be any column index.

280

aij Aij ,

Example 6.4.7 Find the determinant of the matrix A in the previous example, rst by
expanding in cofactors along the second row of A and then by cofactors of the third column.
Using row 2,
det A = a21 A21 + a22 A22 + a23 A23
(
)
(
)
(
)
2 3
1 3
1 2
2+1
2+2
2+3
= 4(1)
det
+ 5(1)
det
+ 6(1)
det
8 9
7 9
7 8
= 4(18 24) + 5(9 21) 6(8 14) = 24 60 + 36 = 0.
Using column 3,
(
= 3(1)1+3 det

)
(
)
(
)
4 5
1 2
1 2
2+3
3+3
+ 6(1)
det
+ 9(1)
det
7 8
7 8
4 5

## = 3(32 35) 6(8 14) + 9(5 8) = 9 + 36 27 = 0.

You should check that you get the same value for the determinant by using any other
row or column.

Note: In Chapter 4, the claim is made that the characteristic polynomial P () = det (A I),
of an n n matrix A, is a polynomial of degree n in . This is easy to see when the Method
of Cofactors is used to evaluate the determinant. When n = 2,
(
P2 () = det

a
b
c
d

)
= (a )(d ) bc = 2 (a + d) + (ad bc).

## For n = 3, if we expand the determinant

a11
P3 () = det a21
a31

a12
a13
a22
a23
a32
a33

by cofactors of the rst row, we are essentially adding together 3 polynomials of degree 2
multiplied either by a constant or the term a11 ; therefore, P3 () = 3 +a polynomial of
degree 2. Induction on n then implies that for any positive integer n 2, Pn () = ()n +
a polynomial of degree n 1; that is, Pn is a polynomial of degree n in .

281

## Appendix D. Cramers Rule for Solving Systems of Linear Equations

Given a system of n linear

a11
a21

A
x=

an1

a12 . . . a1n
x1
b1
x2 b2
a22 . . . a2n

.. = ..
..
. .
.
an2

...

ann

xn

matrix form as

= b,

bn

## it is possible to obtain the solution x

in terms of the determinant of the matrix A and
The following
determinants of matrices formed from A and the right-hand side vector b.
theorem is usually proved in a course in Linear Algebra.
of n equations in n
Theorem 6.11 (Cramers Theorem) Given the system A
x = b
unknowns x1 , x2 , , xn , if det A = 0, the solution can be written as:
xj =

det (Mj )
, j = 1, 2, , n,
det (A)

where Mj is the matrix A with the jth column replaced by the column vector b.
Example 6.4.8 Solve the system of equations

1
3
x1 + 3x2 x3
= 6
4x1 x2
= 7
4 1
1 1
x1 + x2 + 5x3 = 6

6
1
= 7
0 x
=b
6
5

We rst use the Method of Cofactors (see Appendix C) to nd the determinant of the
matrix A. Expanding about the third column,

1
3 1
det A = det 4 1 0
1 1
5
(
)
(
)
4 1
1 3
= (1)(1)1+3 det
+ 0 + 5(1)3+3 det
1 1
4 1
= (4 1) + 5(1 12) = 68 = 0.
Since det A = 0, we can now write

3 1
1 0
det
1
5
((1)(7 6) + 5(6 21))
136
x1 =
=
=
=2
det A
68
68

1
1
0
det 4
1 5
((1)(24 + 7) + 5(7 24))
68
=
=
=1
x2 =
det A
68
68
282

1
3

det 4 1
1 1
((1)(6 7) 3(24 + 7) + 6(4 1))
68
x3 =
=
=
= 1.
det A
68
68
Note: In solving for x3 , the determinant in the numerator was evaluated using cofactors
of the rst row.
You should check that the values x1 = 2, x2 = 1, and x3 = 1 in the above example
satisfy all three of the given equations.

283