Anda di halaman 1dari 331

Dierential Equations and Applications Using Mathematica

R _
Ulrich A Hoensch
Rocky Mountain College
1511 Poly Drive
Billings, MT 59102, USA
hoenschu@rocky.edu
December 18, 2012
2
Contents
0 Introduction 7
0.1 Introduction to This Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
0.2 Introduction to Mathematica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1 First-Order Dierential Equations 13
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.2 Separable Dierential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3 Homogeneous Dierential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.4 Linear Dierential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.5 Exact Dierential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.6 Equilibrium Solutions and Phase Portraits . . . . . . . . . . . . . . . . . . . . . . . . 27
1.7 Slope Fields and Eulers Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.8 Existence and Uniqueness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
1.9 Bifurcations of Autonomous First-Order Dierential Equations . . . . . . . . . . . . 37
1.10 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
2 Applications of First-Order Dierential Equations 51
2.1 Population Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.2 Electric Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.3 Chemical Reaction Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.4 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3 Higher-Order Linear Dierential Equations 65
3.1 Introduction to Homogeneous Second-Order Linear Equations . . . . . . . . . . . . . 65
3.2 Homogeneous Second-Order Linear Equations with Constant Coecients . . . . . . 66
3.3 Case I: Two Real Distinct Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.4 Case II: One Repeated Real Root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.5 Case III: Complex Conjugate Roots . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.6 Method of Undetermined Coecients . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.7 Higher-Order Linear Equations with Constant Coecients . . . . . . . . . . . . . . . 83
3.8 The Structure of the Solution Space for Linear Equations . . . . . . . . . . . . . . . 85
3.9 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
3.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
3
4 CONTENTS
4 Applications of Second-Order Linear Equations 95
4.1 Mechanical Vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
4.2 Linear Electric Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
4.3 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5 First-Order Linear Autonomous Systems 115
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.2 Eigenvalues and Eigenvectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.3 Case I: Two Real Distinct Non-Zero Eigenvalues . . . . . . . . . . . . . . . . . . . . 117
5.4 Case II: One Real Repeated Non-Zero Eigenvalue . . . . . . . . . . . . . . . . . . . . 124
5.5 Case III: Complex Conjugate Eigenvalues . . . . . . . . . . . . . . . . . . . . . . . . 127
5.6 Case IV: Zero Eigenvalues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
5.7 The Trace-Determinant Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
5.8 Bifurcations of Linear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
5.9 Solutions to Matrix Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
5.10 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
5.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
6 Two-Dimensional Non-Linear Systems 147
6.1 Equilibrium Points and Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
6.2 Linearization and Hartmans Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 149
6.3 Polar Coordinates and Nullclines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
6.4 Limit Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
6.5 Existence and Nonexistence of Limit Cycles . . . . . . . . . . . . . . . . . . . . . . . 163
6.6 Hamiltonian Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
6.7 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
6.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
7 Applications of Systems of Dierential Equations 179
7.1 Competing Species Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
7.2 Predator-Prey Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
7.3 The Forced Damped Pendulum and Chaos . . . . . . . . . . . . . . . . . . . . . . . . 189
7.4 The Lorenz System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
7.5 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
7.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
7.7 Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
8 Laplace Transforms 211
8.1 Introduction to Laplace Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
8.2 The Laplace Transform of Selected Functions . . . . . . . . . . . . . . . . . . . . . . 213
8.3 Solving Initial Value Problems Using Laplace Transforms . . . . . . . . . . . . . . . 218
8.4 Discontinuous and Periodic Forcing Functions . . . . . . . . . . . . . . . . . . . . . . 220
8.5 Dirac Functions and Impulse Forcing . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
8.6 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
8.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
CONTENTS 5
9 Further Methods of Solving Dierential Equations 239
9.1 Power Series Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
9.2 Numerical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
9.3 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
9.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
10 Introduction to Partial Dierential Equations 265
10.1 DAlemberts Formula for the One-Dimensional Wave Equation . . . . . . . . . . . . 265
10.2 The One-Dimensional Wave Equation and Fourier Series . . . . . . . . . . . . . . . . 269
10.3 The One-Dimensional Heat Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
10.4 The Schrodinger Wave Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
10.5 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
10.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
A Answers to Exercises 293
B Linear Algebra Prerequisites 319
B.1 Vectors, Matrices, and Linear Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 319
B.2 Linear Independence and Determinants . . . . . . . . . . . . . . . . . . . . . . . . . 320
B.3 Eigenvalues and Eigenvectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
B.4 Projections onto Subspaces and Linear Regression . . . . . . . . . . . . . . . . . . . 323
C Results from Calculus 325
C.1 The Second Derivative Test for Functions of Two Variables . . . . . . . . . . . . . . 325
C.2 Taylor Series for Selected Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
6 CONTENTS
Chapter 0
Introduction
0.1 Introduction to This Text
Dierential equations are of central importance in modeling problems in engineering, the natural
sciences and the social sciences. The virtue of dierential equations models rests in their ability to
capture the time-evolution of processes that exhibit elements of (instantaneous) feedback. We use
the following simple example to illustrate this point. Consider an account that pays 6% interest
every year. If A(t) is the amount of money after the t-th year, we have the recurrence equation
A(t + 1) = 1.06A(t). (1)
The feedback is represented by the fact that the amount in the t-th year determines the amount in
the (t + 1)-st year. We can rewrite (1) as a dierence equation in the form
A(t + 1) A(t) = 0.06A(t). (2)
In this interpretation, the change in A from time t to time t + 1 is determined by the value of A
at time t. We may consider other time increments than one year. For example, if the interest is
compounded in intervals of length t, then the dierence equation (2) becomes
A(t + t) A(t) = 0.06tA(t), (3)
where 0.06t represents an annual interest rate of 6% applied over a period of length t years (e.g.
t = 1/12 for monthly compounding). Dividing (3) by t gives
A(t + t) A(t)
t
= 0.06A(t),
and letting t 0 yields the dierential equation
dA
dt
= 0.06A(t). (4)
The parameter r = 0.06 can now be interpreted as the instantaneous (or continuous) rate of
compounding. The beauty of the dierential equation model is that it is rather exible when
incorporating additional assumptions. For example, if in addition to the compounding of interest,
7
8 CHAPTER 0. INTRODUCTION
$100 per year are continuously withdrawn from the account, the new dierential equation is obtained
from (4) by subtracting this additional rate of change from the right-hand side:
dA
dt
= 0.06A(t) 100. (5)
This text introduces the reader to most standard approaches to analyzing and solving dierential
equations. In our example, solving the dierential equation means we seek functions A(t) that
satisfy the given dierential equations (4) or (5). For equation (4), it can be checked that A(t) =
A
0
e
0.06t
is a solution; A
0
is a parameter and can be interpreted as the amount of money in the
account at time t
0
= 0.
Chapter 1 presents standard methods of solving rst-order dierential equations and introduces
the concept of equilibrium solutions, numerical methods of solving dierential equations, existence
and uniqueness results, and bifurcations of rst-order equations. Chapter 2 covers applications of
rst-order dierential equations.
Chapter 3 deals with second-order and higher-order linear dierential equations; solution meth-
ods using the characteristic equation are presented. Chapter 4 presents applications to second-order
linear equations, in particular mechanical vibrations and electric circuits.
Chapters 5 and 6 cover systems of linear and non-linear systems of equations. We mostly
limit ourselves to two-dimensional systems, although higher-dimensional examples are also given.
Chapter 7 presents applications of these topics.
Chapter 8 presents Laplace transforms and how they can be used to solve linear systems. Chap-
ter 9 presents additional methods of solving dierential equations, namely power series methods
and numerical methods.
Chapter 10 oers a brief introduction to partial dierential equations. Some methods of solving
partial dierential equations are presented by analyzing the wave equation and the heat equation.
The chapter also discusses Schrodingers wave equation.
Overall, this book emphasizes qualitative (geometric) methods over symbolic or numerical ways
of solving dierential equations. To this end, equilibrium solutions, their types, and their bifurca-
tions are discussed. Although it is anticipated that readers will initially focus on worked examples,
a denition-theorem-proof approach is threaded throughout the text. Exercises are given at the
end of each chapter, and answers to selected exercises can be found in Appendix A. (These exer-
cises are marked with the symbol .) We make use of the computer algebra system Mathematica
throughout the text, including some of the exercises. Prerequisites to this text are vector calculus
and elementary linear algebra. The linear algebra material required in this text is mainly knowledge
about determinants, eigenvalues and eigenvectors. Appendix B provides a very condensed overview
of the necessary linear algebra concepts.
0.2 Introduction to Mathematica
Mathematica is a computer algebra system (CAS) developed by Wolfram Research (www.wolfram.
com). Other similar CAS are for example Maple (www.maplesoft.com) and Matlab (www.mathworks.
com). In addition, many modern hand-held calculators, such as the Texas Instruments TI-89 or TI-
Nspire, have a CAS kernel. In this section, we present a deliberately brief introduction to working
with Mathematica. In later sections, we will get to know Mathematica methods that are relevant
to the analysis of dierential equations. Generally, Mathematica is extremely powerful software for
0.2. INTRODUCTION TO MATHEMATICA 9
mathematical analysis, symbolic manipulation and computation. To appreciate the full scope of
this software, readers are directed to the many tutorials available, for example [27]. Mathematica
notebooks used in conjunction with this text are available at:
http://cobalt.rocky.edu/
~
hoenschu/DiffEqBook/Mathematica.
Comments, Evaluation, and Arithmetic
Comments are delimited by ( and ). Commands are entered in lines which are evaluated by
pressing Shift+Enter. Arithmetic is performed using the usual symbolic operators. Note that
Mathematica will perform exact arithmetic with integers and rational numbers, and oating point
arithmetic with oating point numbers.
Exact Arithmetic
7 5^14 2^10
42724609375
1024
Floating Point Arithmetic at least one number is a floatingpoint number
7.0 5^14 2^10
4.17233 10
7
Convert the output in line 1 to a floatingpoint number
NOut1
4.17233 10
7
Use Postfix version of the N command
Out1 N
4.17233 10
7
Calculus and Functions
Take the derivative of the function of x
D3 x^2 5 x 1, x
5 6 x
Define the function fx, and take the derivative
fx_ : 3 x^2 5 x 1;
Dfx, x
5 6 x
Take the second partial derivative with
respect to x and the first partial with respect to y
Dx^3 y x^2 y^2, x, 2, y, 1
6 x 4 y
10 CHAPTER 0. INTRODUCTION
Integrate the function fx
Integratefx, x
x
5 x
2
2
x
3
Compute the definite integral
Integratefx, x, 0, 3
15
2
Perform numerical integration
NIntegrateExpt^2, t, 0, 10
0.886227
Plotting Graphs
Plot the graph of the function fx
Plotfx, x, 2, 3
2 1 1 2 3
5
10
15
20
0.2. INTRODUCTION TO MATHEMATICA 11
Plot a parametrized curve
ParametricPlott Cost, t Sint, t, 0, 2 Pi
2 2 4 6
4
3
2
1
1
Plot a curve given implicitly
ContourPlotx^2 y^2 0.1, x, 2, 2, y, 2, 2
2 1 0 1 2
2
1
0
1
2
Solving Equations
Solve an equation symbolically
Solvex^2 12 x 11 0, x
x 1, x 11
12 CHAPTER 0. INTRODUCTION
Solve an equation numerically
solution NSolvex^4 x^3 2, x
x 1., x 0.228155 1.11514 , x 0.228155 1.11514 , x 1.54369
Retrieve solution of previous equation
x . solution
1., 0.228155 1.11514 , 0.228155 1.11514 , 1.54369
Retrieve fourth solution of previous equation
x . solution4
1.54369
Quit the kernel
Quit
Chapter 1
First-Order Dierential Equations
1.1 Introduction
A rst-order dierential equation is an equation of the form
F
_
x, y, y

_
= 0, (1.1)
where at least y

occurs explicitly on the left-hand side of (1.1). A solution to (1.1) is a function


y = f(x) so that F(x, f(x), f

(x)) = 0 for all x in some open interval I. In particular, we require


the solution function to be dierentiable, and hence continuous on I.
We will usually deal with dierential equations where (1.1) is solvable for y

; these can be
written in the form
y

= G(x, y) . (1.2)
An initial value problem for a rst-order dierential equation is a consists of the dierential
equation together with the specication of a value of the solution. That is, initial value problems
are of the general form
F
_
x, y, y

_
= 0, y(x
0
) = y
0
. (1.3)
The function y = f(x) is a solution to this initial value problem if it is a solution to F(x, y, y

) = 0,
x
0
is in the domain of f(x), and f(x
0
) = y
0
.
Example 1.1.1. The dierential equation (y

)
2
y = 0 has the solution y = (1/4)(x
2
+2x+1), since
y

= (1/2)(x + 1) and
(y

)
2
y =
_
1
2
(x + 1)
_
2

_
1
4
(x
2
+ 2x + 1)
_
=
1
4
_
x
2
+ 2x + 1
_

1
4
_
x
2
+ 2x + 1
_
= 0.
This solution is dened for all real numbers: I = R. More generally, we can check that y =
(1/4)(x
2
+ 2xC +C
2
) is a solution for any C R. For the initial value problem
(y

)
2
y = 0, y(0) = 1, (1.4)
we can nd the corresponding value of C by solving y(0) = 1 for C:
(1/4)(0
2
+ 2(0)C +C
2
) = 1 gives C = 2.
Thus, y = (1/4)(x
2
+ 4x + 4) and y = (1/4)(x
2
4x + 4) are solutions to (1.4).
13
14 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Example 1.1.2. Consider the following situation: A stone is dragged using a rope of length 1. If
the stone is initially at the point (1, 0), and the person dragging the stone moves along the positive
y-axis, what is the path of the stone?
The curve described here is also called a tractrix (from Latin trahere: to pull; to drag). We
can describe this curve via a dierential equation as follows. Let f(x) we the (unknown) function
so that the curve (x, f(x)) describes the tractrix. The tangent line to the graph of y = f(x) at the
point (x, f(x)) is given by the equation
y(t) = f(x) +f

(x)(t x).
The tangent line intersects the y-axis when t = 0, that is at the point (0, f(x)+f

(x)(x)) (see also


Figure 1.1) We know that the distance from the point (x, f(x)) to the point (0, f(x) +f

(x)(x))
Figure 1.1: The curve in example 1.1.2.
l
e
n
g
t
h

1
0.5 1.0 1.5 2.0
0.5
1.0
1.5
2.0
is always 1:
1 =
_
(x 0)
2
+ (f(x) (f(x) +f

(x)(x)))
2
=
_
x
2
+x
2
(f

(x))
2
.
This means x
2
(1 + (f

(x))
2
) = 1, or
f

(x) =
_
1 x
2
x
2
.
The negative sign was chosen since f(x) is clearly a decreasing function of x. Since f(1) = 0, the
unknown function is described by the initial value problem
f

(x) =
_
1 x
2
x
2
, f(1) = 0.
1.2. SEPARABLE DIFFERENTIAL EQUATIONS 15
In this case, the right-hand side of the dierential equation does not depend on y, which means
that to solve the initial value problem, we need to nd the integral
f(x) =

x
1
_
1 t
2
t
2
dt =

1
x
_
1 t
2
t
2
dt
for 0 < x 1. Using e.g. the trigonometric substitution t = sin gives
f(x) = log
_
1 +
_
1 x
2
_
log x
_
1 x
2
.
(We use log to denote the natural logarithm .)
In sections 1.2, 1.3, 1.4, 1.5, we present various methods of solving rst-order dierential equa-
tions. It should be pointed out, however, that for a randomly selected dierential equation, we
cannot expect to obtain a solution in a closed algebraic form (i.e. in terms of the usual elementary
functions). In other words, none of the methods in those sections will then help us to nd the
solution. This can be seen from the fact that solving a dierential equation is at least as hard as
nding the antiderivative of a function (consider simple dierential equations of the form y

= f(x);
see also example 1.1.2).
Section 1.6 provides us with methods to analyze the geometric behavior of solutions to au-
tonomous rst-order dierential equations (i.e. dierential equations of the form y

= f(y)). This
section is probably the most important section in this chapter. Section 1.7 introduces a simple
numerical method for solving rst-order dierential equations, namely Eulers method. Section 1.8
discusses issues surrounding the existence and uniqueness of solutions, and section 1.9 explores how
the geometric behavior of one-parameter families of autonomous dierential equations depends on
the parameter.
1.2 Separable Dierential Equations
A rst-order dierential equation is separable if it can be written in the form
y

= g(x)h(y). (1.5)
Separable dierential equations can be solved in the following manner. If we interpret the derivative
y

= dy/dx as a quotient and separate variables, then


dy
dx
= g(x)h(y)
becomes
dy
h(y)
= g(x) dx. (1.6)
Formally integrating both sides gives

dy
h(y)
=

g(x) dx.
If H(y) is an antiderivative of 1/h(y) and G(x) is an antiderivative of g(x), we obtain
H(y) = G(x) +C.
16 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
If H(y) is invertible, then
y = H
1
(G(x) +C) .
Note that working with equation (1.6) as we just did could be rather spurious: after all, a derivative
is not a quotient of the dierentials dy and dx. While it is sometimes convenient to use the
formalism provided by dierentials
1
, we try to avoid their use and provide more rigorous proofs of
corresponding results. Our rst theorem (and its proof) tells us that the method just developed
does indeed work.
Theorem 1.2.1. Suppose dy/dx = g(x)h(y) is a separable dierential equation; suppose H

(y) =
1/h(y) and H(y) is invertible; and suppose G

(x) = g(x). Then for any real number C the function


f(x) = H
1
(G(x) +C) is a solution to dy/dx = g(x)h(y).
Proof. We need to verify that if f(x) = H
1
(G(x) +C), then f

(x) = g(x)h(f(x)). Observe that


H(f(x)) = G(x) +C. When dierentiating both sides of this equation and applying the chain rule,
we obtain
H

(f(x)) f

(x) = G

(x).
This is equivalent to 1/h(f(x)) f

(x) = g(x) or f

(x) = g(x)h(f(x)), as required.


Example 1.2.1. Find a solution to each of the following initial value problems.
(a) (1 +x
2
)(dy/dx) 1 = 0, y(0) = 0. Solving the dierential equation for dy/dx gives dy/dx =
1/(1 + x
2
). In this case, we simply integrate both sides to obtain y = tan
1
(x) + C. Since
y(0) = 0, 0 = tan
1
(0) + C, or C = 0. The solution to the initial value problem is y =
tan
1
(x), x R.
(b) dy/dx = y 1, y(0) = 0. Separating variables gives dy/(y 1) = dx, and integrating both
sides

dy
y 1
=

dx,
which results in log [y1[ = x+C (recall that log denotes the natural logarithm). This means
that y = e
x+C
+ 1. Observing that e
x+C
= e
x
e
C
, we may re-label the constant e
C
as C. We obtain the solution y = Ce
x
+1, where C R. (Note that technically C ,= 0, since
e
C
,= 0; however, if C = 0, the function y = 1 is also a solution to the dierential equation
dy/dx = y 1.) If y(0) = 0, 0 = C + 1, or C = 1. Thus, the solution to the initial value
problem is y = 1 e
x
, x R.
(c) y

= sin x y, y(0) = 1. Separating variables gives dy/y = sin xdx, or

dy
y
=

sin xdx.
This means log [y[ = cos x + C, or y = Ce
cos x
(absorbing the constant e
C
into C as in
part (b) above). y(0) = 1 gives 1 = Ce
1
, or C = e. The solution to the initial value problem
is y = e
1cos x
, x R.
1
The philosopher George Berkeley (1685-1753) called them ghosts of departed quantities.
1.2. SEPARABLE DIFFERENTIAL EQUATIONS 17
(d) y

= x/y, y(0) = r, r 0. Separating variables gives y dy = xdx, or

y dy =

xdx.
This means y
2
/2 = x
2
/2 + C, or x
2
+ y
2
= C (absorbing the constant 2C into C). The
initial condition y(0) = r gives C = r
2
. The solution curves are the circles x
2
+y
2
= r
2
.
(e)
dy
dt
= y(1 y), y(0) = y
0
. (1.7)
Separating variables yields

dy/(y(1 y)) =

dt. (1.8)
The integral of the left side can be found by using partial fractions, as follows:

dy
y(1 y)
=

1
y

1
y 1
dy = log

y
y 1

+C.
The right side of (1.8) is t+C. Combining these, we obtain the equation log [y/(y 1)[ = t+C.
Exponentiating both sides and absorbing the constant gives y/(y 1) = Ce
t
, which means
y = Ce
t
(y1) or yCe
t
y = Ce
t
. Solving for y gives y = Ce
t
/(1Ce
t
) = Ce
t
/(Ce
t
1) =
1/(1 Ce
t
) (absorbing 1/C into C). If y(0) = y
0
, y
0
= 1/(1 C), or C = (y
0
1)/y
0
. This
tells us that the solution to the initial value problem (1.7) is
y =
y
0
y
0
(y
0
1)e
t
. (1.9)
Remark 1.2.1. Note that in part (d) of example 1.2.1, the solution has not been expressed as a
function of x; rather, the implicit solution x
2
+ y
2
= r
2
gives us solution curves that are more
general than when we express y as a function of x.
Remark 1.2.2. Figure 1.2 shows solution curves to (1.7) for various initial conditions. We make the
following observations about these solutions.
(a) If y
0
= 0, then y = 0 for all t; if y
0
= 1, then y = 1 for all t. That is, we can think of the
solutions with initial conditions y
0
= 0 or y
0
= 1 as stationary solutions.
(b) If y
0
> 0, then y 1 as t ; if y
0
< 1, then y 0 as t . In words: Solutions with
an initial condition of y
0
> 0 approach the line y = 1 going forward; solutions that start with
y
0
< 1 approach the line y = 0 going backward.
(c) Some solutions (namely those where y
0
> 1 or y
0
< 0) have vertical asymptotes. If we
interpret the variable t as time (as we frequently will), we can say that these solutions approach
innity in nite time.
We will see in section 1.6 how to obtain results like the ones in (a) and (b) without having to solve
the dierential equation.
18 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Figure 1.2: Several solution curves to the equation dy/dt = y(1 y).
4 2 2 4
2
1
1
2
3
1.3 Homogeneous Dierential Equations
A homogeneous dierential equation is of the form
dy
dx
= F
_
y
x
_
. (1.10)
This means, the rate with which the function y changes depends only on the ratio y/x. Homoge-
neous dierential equations can be solved by using the substitution v = y/x, where v is a function
of x. Then xv = y, and taking derivatives with respect to x, v + x(dv/dx) = dy/dx. Substitution
of dy/dx = v +x(dv/dx) and v = y/x into (1.10) gives
v +x
dv
dx
= F (v) ,
or
dv
dx
=
F (v) v
x
, (1.11)
which is separable and can thus be solved using the method in section 1.2.
Example 1.3.1. Find a solution to the initial value problem dy/dx = 1 + (y/x), y(1) = 0. If we
make the substitution v = y/x, F(v) = 1 +v, and converting the dierential equation to the form
(1.11), we obtain
dv
dx
=
(1 +v) v
x
=
1
x
.
Integrating both sides gives v = log [x[ + C. Re-substitution of v = y/x gives y = xlog [x[ + Cx.
The initial condition y(1) = 0 implies that C = 0. Clearly, y = xlog [x[ is not dened when x = 0;
this leaves us with two choices for the domain of denition of the solution: x R : x > 0 or
x R : x < 0. Since x
0
= 1 is in the rst set, the solution to the initial value problem is
y = xlog x, x > 0.
1.4. LINEAR DIFFERENTIAL EQUATIONS 19
Example 1.3.2. Solve the dierential equation dy/dx = (x
2
+y
2
)/(xy). Note that (x
2
+y
2
)/(xy) =
(x/y) + (y/x), so the equation is homogeneous and the substitution v = y/x leads to F(v) =
(1/v) +v. Using (1.11) gives
dv
dx
=
(1/v) +v v
x
=
1
vx
.
Separating variables leads to v
2
/2 = log [x[ +C. Re-substitution of v = y/x gives y
2
= 2x
2
log [x[ +
Cx
2
(we absorbed the constant 2C into the new constant C). Given an initial condition with
y(x
0
) > 0, the explicit solution would be of the form y =
_
2x
2
log [x[ +Cx
2
. If y(x
0
) < 0, we
would have y =
_
2x
2
log [x[ +Cx
2
.
Substitution methods are not limited to homogeneous dierential equations. Exercises 1.3 and
1.4 present other situations in with a substitution makes a dierential equation integrable.
1.4 Linear Dierential Equations
First-order linear dierential equations are of the form
dy
dx
+p(x)y = q(x). (1.12)
The origin of this name can be seen as follows. If the right-hand side of this equation is represented
by the dierential operator
L[y] = y

+p(x)y,
then this operator is linear in y:
L[ry
1
+sy
2
] = rL[y
1
] +sL[y
2
],
where y
1
, y
2
are functions of x, and r, s R.
First-order linear dierential equations may be solved by using an integrating factor. The idea
is to multiply both sides of (1.12) by a function r(x) so that the left side of the resulting equation
is the derivative of r(x)y. Suppose we multiply both sides of (1.12) by r(x). The equation becomes
r(x)
dy
dx
+r(x)p(x)y = r(x)q(x). (1.13)
If the left side is to be obtained by dierentiating r(x)y, it will be of the formr(x)(dy/dx)+(dr/dx)y.
Comparing this to the left side of (1.13) yields the dierential equation
dr
dx
= r(x)p(x),
which is separable. Its solution is obtained by separation of variables as follows. Since

dr
r
=

p(x) dx,
it follows that log [r[ =

p(x) dx. This means an integrating factor is r(x) = e


P(x)
, where P(x) is
an antiderivative of p(x). Thus, the equation (1.13) becomes
d
dx
_
e
P(x)
y
_
= e
P(x)
q(x).
20 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Integrating both sides gives
e
P(x)
y =

e
P(x)
q(x) dx,
or
y = e
P(x)
_
e
P(x)
q(x) dx
_
. (1.14)
The following theorem summarizes how to solve linear dierential equations.
Theorem 1.4.1. Suppose dy/dx + p(x)y = q(x) is a linear dierential equation and suppose
P

(x) = p(x). Dene r(x) = e


P(x)
. Suppose further that G

(x) = r(x)q(x). Then for any real


number C the function
f(x) =
G(x) +C
r(x)
is a solution to dy/dx +p(x)y = q(x).
Proof. Suppose f(x) = (G(x) + C)/r(x). Then r(x)f(x) = G(x) + C. When dierentiating
both sides of this equation and applying the product rule and the fact that G

(x) = r(x)q(x), it
follows that r(x)f

(x) + r

(x)f(x) = r(x)q(x). Now, r

(x) = e
P(x)
P

(x) = r(x)p(x), so we obtain


r(x)f

(x) + r(x)p(x)f(x) = r(x)q(x). Since r(x) > 0, we may divide both sides by r(x) to obtain
f

(x) +p(x)f(x) = q(x).


Example 1.4.1. Find a solution to each of the following initial value problems.
(a) dy/dx = x y, y(0) = 0. The dierential equation is equivalent to dy/dx + y = x, so we
have p(x) = 1 and q(x) = x. We can choose P(x) = x, and consequently r(x) = e
x
. Since
q(x) = x,

r(x)q(x) dx =

xe
x
dx = xe
x

e
x
dx = xe
x
e
x
+C,
using integration by parts. So we can choose G(x) = xe
x
e
x
. According to theorem 1.4.1,
or using equation (1.14),
y =
xe
x
e
x
+C
e
x
= x 1 +Ce
x
is a solution to the dierential equation. The initial condition y(0) = 0 gives 0 = 1 +C 1,
or C = 1, and y = x 1 +e
x
, x R is a solution to the initial value problem.
(b) x(dy/dx) y = 2x
3
, y(1) = 0. Rewriting the dierential equation as (dy/dx) (y/x) = 2x
2
allows us to identify p(x) = 1/x and q(x) = 2x
2
. Since x
0
= 1 > 0, we need only consider
positive values for x, and so we can choose P(x) = log x and r(x) = e
log x
= e
log(1/x)
= 1/x.
Since q(x) = 2x
2
,

r(x)q(x) dx =

2xdx = x
2
+ C and we may choose G(x) = x
2
. Using
theorem 1.4.1,
y =
x
2
+C
1/x
= x
3
+Cx
is a solution to the dierential equation. The initial condition y(1) = 0 gives 0 = 1 + C, so
C = 1. We observe that y = x
3
x is a solution to the initial value problem for all x R
(not just for x > 0), since x(dy/dx) y = x(3x
2
1) (x
3
x) = 2x
3
for any real number x.
1.4. LINEAR DIFFERENTIAL EQUATIONS 21
Structure of the Solution Space
Denition 1.4.1. A rst-order linear dierential equation of the form
dy
dx
+p(x)y = q(x)
is called homogeneous if q(x) = 0 for all x. Otherwise, the equation is non-homogeneous.
The meaning of the term homogeneous in the current context is dierent from how this
word was used in section 1.3. Here, it means that the right-hand side of a linear equation is zero.
This is exactly the same meaning as for a system of algebraic linear equations. Indeed, results
analogous to the ones encountered in a linear algebra course apply. The following theorem asserts
that the solutions to a homogeneous linear equation form a vector space, and the solutions to a
non-homogeneous linear equation form an ane space.
Theorem 1.4.2. (a) If y
1
and y
2
are solutions to the homogeneous equation dy/dx +p(x)y = 0,
then so is any linear combination y
h
= ry
1
+sy
2
, r, s R.
(b) If y
p
is a solution to the non-homogeneous equation dy/dx +p(x)y = q(x) and y
h
is solution
to the corresponding homogeneous equation dy/dx+p(x)y = 0, then y
p
+y
h
is also a solution
to dy/dx +p(x)y = q(x).
Proof. Suppose y
1
, y
2
both satisfy dy/dx +p(x)y = 0, and y
h
= ry
1
+sy
2
. Then,
dy
h
dx
+p(x)y
h
= r
dy
1
dx
+s
dy
2
dx
+r(p(x)y
1
) +s(p(x)y
2
)
= r
_
dy
1
dx
+p(x)y
1
_
+s
_
dy
2
dx
+p(x)y
2
_
= r(0) +s(0) = 0.
This proves part (a). To see part (b), observe that since dy
h
/dx+p(x)y
h
= 0 and dy
p
/dx+p(x)y
p
=
q(x),
d(y
p
+y
h
)
dx
+p(x)(y
p
+y
h
) =
dy
p
dx
+p(x)y
p
+
dy
h
dx
+p(x)y
h
= q(x) + 0 = q(x).
An application of theorem 1.4.2 is given in the following.
Linear Dierential Equations with Constant Coecients
A rst-order linear dierential equation of the form (1.12) has constant coecients if the coecient
function p(x) is constant. Consequently, these equations are of the form
dy
dx
+ay = q(x). (1.15)
Since p(x) = a, and so P(x) = ax, it can be seen from theorem 1.4.1 that the solution of (1.15) can
be expressed as
y = e
ax
_
e
ax
q(x) dx
_
. (1.16)
22 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
In the homogeneous case, we obtain y
h
= Ce
ax
, C R. Non-homogeneous linear dierential equa-
tions with constant coecients may now be solved using the method of undetermined coecients,
as explained in the following example.
Example 1.4.2. Find the solution to each initial value problem.
(a) (dy/dx) + 2y = 3x
2
2x + 5, y(0) = 3. Here a = 2, and q(x) = 3x
2
2x + 5. When using
(1.16), we would need to evaluate the integral

e
2x
(3x
2
2x + 5) dx. An alternative is to
observe that if (dy/dx) + 2y is to equal the second order polynomial 3x
2
2x + 5, then y
should be a polynomial of degree at most 2. Thus, it makes sense to use a trial solution of
the form y
p
= A
2
x
2
+A
1
x +A
0
, where A
0
, A
1
, A
2
are coecients that we need to determine.
Then,
dy
p
dx
+ 2y
p
= (2A
2
x +A
1
) + 2(A
2
x
2
+A
1
x +A
0
)
= 2A
2
x
2
+ (2A
2
+ 2A
1
)x + (A
1
+ 2A
0
).
Comparing this to the right-hand side of the dierential equation leads to the equations
2A
2
= 3, 2A
2
+ 2A
1
= 2, and A
1
+ 2A
0
= 5. Successively solving this linear system gives
A
2
= 3/2, A
1
= 5/2, A
0
= 15/4. Thus, y
p
= (3/2)x
2
(5/2)x + (15/4) is a solution
to the dierential equation. However, it does not satisfy the initial condition. We now use
theorem 1.4.2: solutions to the homogeneous equation (dy/dx) + 2y = 0 are y
h
= Ce
2x
, so
y
p
+y
h
= (3/2)x
2
(5/2)x+(15/4)+Ce
2x
is a solution to the non-homogeneous equation for
any C R. Since y(0) = 3, we obtain (3/2)0
2
(5/2)0 + (15/4) +Ce
2(0)
= (15/4) +C = 3
or C = 3/4. Thus, y = (3/2)x
2
(5/2)x + (15/4) (3/4)e
2x
is a solution to the initial
value problem.
(b) (dy/dx) y = 2 sin(3x), y(0) = 1. Here, we choose the trial solution y
p
= Acos(3x) +
Bsin(3x), since derivatives linear combinations of cos(3x) and sin(3x) are again expressed by
such a linear combination. Then the dierential equation gives
dy
p
dx
y
p
= (3Asin(3x) + 3Bcos(3x)) (Acos(3x) +Bsin(3x))
= (3B A) cos(3x) (3A+B) sin(3x).
Writing the right-hand side of the dierential equation in the form (0) cos(3x) + (2) sin(3x)
and comparing coecients leads to the system 3B A = 0, 3A+B = 2. Solving this gives
A = 3/5. B = 1/5, so y
p
= (3/5) cos(3x) (1/5) sin(3x) is a solution to the dierential
equation. The solution to the homogeneous equation (dy/dx) y = 0 is y
h
= Ce
x
, so we
consider solutions of the form y
p
+y
h
= (3/5) cos(3x) (1/5) sin(3x) +Ce
x
. Using y(0) = 1
gives (3/5) +C = 1 or C = 8/5. Consequently, y = (3/5) cos(3x) (1/5) sin(3x) +(8/5)e
x
is a solution to the initial value problem.
Remark 1.4.1. Solving an initial value problem of the form (dy/dx) +ax = q(x), y(x
0
) = y
0
using
the method of undetermined coecients as in example 1.4.2 leads to the following steps:
1. Identify a trial solution y
p
and determine any unknown coecients in the trial solution by
using the dierential equation.
1.5. EXACT DIFFERENTIAL EQUATIONS 23
2. Add the solution to the homogeneous equation (dy/dx) + ax = 0, i.e. y
h
= Ce
ax
to y
p
to
obtain y = y
p
+y
h
.
3. Use the initial condition to determine the value of C.
The crucial step is, of course, to set up a trial solution that works. The method of undetermined
coecients will be revisited in section 3.6 in more detail in the context of second-order linear
dierential equations with constant coecients.
1.5 Exact Dierential Equations
We consider rst-order dierential equations of the form
M(x, y) dx +N(x, y) dy = 0, (1.17)
which we may interpret in the following ways.
(a) By formally dividing both sides by dx, we can transform (1.17) into a dierential equation of
the form
dy
dx
=
M(x, y)
N(x, y)
,
whose solutions are functions y = f(x).
(b) By formally dividing both sides by dy, we can transform (1.17) into a dierential equation of
the form
dx
dy
=
N(x, y)
M(x, y)
,
whose solutions are functions x = g(y).
(c) We can also think of the solution to (1.17) to be given implicitly (as in part (d) of example
1.2.1) by the curves F(x, y) = C, where

x
F(x, y) = M(x, y),

y
F(x, y) = N(x, y). (1.18)
The logic of this point of view can be seen as follows. Suppose x = x(t) and y = y(t) are
parametrized by the variable t. Then F(x(t), y(t)) = C for all t; taking the derivative with
respect to t and using the chain rule for functions of two independent variables ([28], theorem
6 of section 14.4), we obtain

x
F(x(t), y(t))
_
dx
dt
_
+

y
F(x(t), y(t))
_
dy
dt
_
= 0.
By formally multiplying this equation by dt, and using (1.18), we obtain (1.17).
In the language of vector calculus, F(x, y) is a potential function for the vector eld M(x, y) dx+
N(x, y) dy, and the solution curves are level curves of F(x, y). If there exists a function F(x, y)
that satises the conditions in (1.18), then the dierential equation (1.17) is said to be exact.
24 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
The next theorem states necessary and sucient conditions for a dierential equation to be
exact. We omit its proof (refer to e.g. [28], section 16.3.)
Theorem 1.5.1. Suppose M(x, y) and N(x, y) together with their rst-order partial derivatives are
dened and continuous on some open and simply connected subset U of R
2
. Then the dierential
equation M(x, y) dx +N(x, y) dy = 0 is exact if and only if

y
M(x, y) =

x
N(x, y). (1.19)
Remark 1.5.1. We are interested in nding the potential function. One method to accomplish this
is to rst integrate M(x, y) with respect to x:
F(x, y) =

x
x
0
M(, y) d +g
0
(y). (1.20)
The function g
0
(y) appears on the right-hand side instead of the customary integration constant.
Clearly, (/x)F(x, y) = M(x, y) (Fundamental Theorem of Calculus). Also,

y
F(x, y) =

x
x
0
M
y
(, y) d +g

0
(y) (1.21)
=

x
x
0
N
x
(, y) d +g

0
(y)
= N(x, y) N(x
0
, y) +g

0
(y),
where we used that M
y
= N
x
and again the Fundamental Theorem of Calculus. Since we require
(/y)F(x, y) = N(x, y) and also F(x
0
, y
0
) = C
0
, (1.20) and (1.21) imply that
g

0
(y) = N(x
0
, y), g
0
(y
0
) = C
0
.
Thus,
g
0
(y) = C
0
+

y
y
0
N(x
0
, ) d
and using (1.20),
F(x, y) = C
0
+

y
y
0
N(x
0
, ) d +

x
x
0
M(, y) d. (1.22)
In eect, we compute the line integral along the straight-line path from (x
0
, y
0
) to (x
0
, y) and then
to (x, y). More generally, we can use any curve from (x
0
, y
0
) to (x, y) to compute the potential
function. However, it is important to ensure that this curve lies entirely in the simply connected
domain U.
Example 1.5.1. Find a solution to each initial value problem.
(a) 2xdx + 3y
2
dy = 0, y(0) = 1. The dierential equation is exact since (/y)2x = 0 =
(/x)3y
2
. It can be solved by separating variables and integrating: 3y
2
dy = 2xdx yields
y
3
= x
2
+ C, or x
2
+ y
3
= C. The initial condition gives 0
2
+ 1
3
= C, or C = 1. The
1.5. EXACT DIFFERENTIAL EQUATIONS 25
(implicit) solution is x
2
+ y
3
= 1, which may be solved for y to obtain y =
3

1 x
2
, x R.
Alternatively, we may nd the potential function using equation (1.20):
F(x, y) =

x
0
2 d +g
0
(y) = x
2
+g
0
(y).
Since (/y)F(x, y) = g

0
(y) must equal 3y
2
, we obtain g
0
(y) = y
3
+C, thus F(x, y) = x
2
+y
3
as above.
(b) (3x
2
9y) dx+(3y
2
9x) dy = 0, y(0) = 0. The dierential equation is exact since (/y)(3x
2

9y) = 9 = (/x)(3y
2
9x). Equation (1.20) gives
F(x, y) =

x
0
3
2
9y d +g
0
(y)
=
_

3
9y
_

=x
=0
+g
0
(y)
= x
3
9xy +g
0
(y).
Now, we take the derivative with respect to y of the last equation and compare to N(x, y) =
3y
2
9x. It follows that g

0
(y) 9x = 3y
2
9x, or g

0
(y) = 3y
2
. This means that we may
choose g
0
(y) = y
3
, and consequently F(x, y) = x
3
+y
3
9xy. The general solution curves are
x
3
+y
3
9xy = C. Now y(0) = 0 implies C = 0, so the solution to the initial value problem
is given by the curve x
3
+y
3
9xy = 0. Parts of this curve are shown in Figure 1.3.
The potential function may also be computed via a line integral using the path x(t) = tx and
y(t) = ty, 0 t 1, from (x
0
, y
0
) = (0, 0) to (x, y). Then, dx = xdt, dy = ydt, and
F(x, y) =

1
0
(3(tx)
2
9(ty))x + (3(ty)
2
9(tx))y dt
= (x
3
+y
3
)

1
0
3t
2
dt 9xy

1
0
2t dt
= x
3
+y
3
9xy.
Integrating Factor for Inexact Equations
What can be done if the dierential equation is not exact, that is if M
y
,= N
x
? If we multiply both
sides of (1.17) by r(x, y), we obtain
r(x, y)M(x, y) dx +r(x, y)N(x, y) dy = 0. (1.23)
We hope to choose the integrating factor r(x, y) in such as way that (1.23) is exact. In general,
this means that r(x, y) should be chosen in such as way that

y
(r(x, y)M(x, y)) =

x
(r(x, y)N(x, y)) . (1.24)
This leads to a partial dierential equation involving r(x, y), solving which is beyond the scope of
this text. If, however, we assume that the integrating factor is either a function of x only or a
function of y only, we may be able to convert (1.17) into an exact equation.
26 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Figure 1.3: Parts of the solution curve to (3x
2
9y) dx + (3y
2
9x) dy = 0, y(0) = 0.
2 0 2 4
2
0
2
4
We observe that if r(x, y) = r(x), then

y
(r(x)M(x, y)) = r(x)M
y
(x, y),

x
(r(x)N(x, y)) = r

(x)N(x, y) +r(x)N
x
(x, y).
Equation (1.24) becomes r(x)M
y
(x, y) = r

(x)N(x, y)+r(x)N
x
(x, y), or r

(x)N(x, y) = r(x)(M
y
(x, y)
N
x
(x, y)), or:
r

(x)
r(x)
=
M
y
(x, y) N
x
(x, y)
N(x, y)
.
In other words, if (M
y
(x, y) N
x
(x, y))/N(x, y) = g(x) is a function of x only, then the integrating
factor is r(x) = e

g(x) dx
. By also performing a similar calculation if r(x, y) = r(y) (or simply
interchanging the roles of M, N and x, y), we obtain the following result.
Theorem 1.5.2. Consider the equation M(x, y) dx +N(x, y) dy = 0.
(a) If (M
y
(x, y)N
x
(x, y))/N(x, y) is a function of x only, and G(x) satises G

(x) = (M
y
(x, y)
N
x
(x, y))/N(x, y), then r(x) = e
G(x)
is an integrating factor; that is, r(x)M(x, y) dx +
r(x)N(x, y) dy = 0 is an exact equation.
(b) If (N
x
(x, y)M
y
(x, y))/M(x, y) is a function of y only, and H(y) satises H

(y) = (N
x
(x, y)
M
y
(x, y))/M(x, y), then r(y) = e
H(y)
is an integrating factor; that is, r(y)M(x, y) dx +
r(y)N(x, y) dy = 0 is an exact equation.
Example 1.5.2. Solve each dierential equation.
1.6. EQUILIBRIUM SOLUTIONS AND PHASE PORTRAITS 27
(a) (y +e
x
) dx +dy = 0. Here,
M
y
(x, y) N
x
(x, y)
N(x, y)
=
1 0
1
= 1
can be viewed as a function of x only, r(x) = e

1 dx
= e
x
is an integrating factor, and the
dierential equation
e
x
(y +e
x
) dx +e
x
dy = 0
is exact. So,
F(x, y) = g
0
(y) +

e
x
(y +e
x
) dx
= g
0
(y) +

e
x
y + 1 dx
= g
0
(y) +e
x
y +x.
Since F
y
(x, y) = g

0
(y)+e
x
and also F
y
(x, y) = e
x
, we have g

0
(y) = 0. The curves e
x
y+x = C
constitute implicit solutions to (y +e
x
) dx +dy = 0. Solving for y gives y = xe
x
+Ce
x
.
(b) For (2xy
3
+y
4
) dx + (xy
3
2) dy = 0,
N
x
(x, y) M
y
(x, y)
M(x, y)
=
y
3
(6xy
2
+ 4y
3
)
2xy
3
+y
4
=
3(2xy
2
+y
3
)
y(2xy
2
+y
3
)
=
3
y
is a function of y only, r(y) = e

(3/y) dy
= e
3 log y
= y
3
is an integrating factor, and the
equivalent dierential equation (2x +y) dx +(x 2y
3
) dy = 0 is exact. The solution can be
found in the usual way as follows:
F(x, y) = g
0
(y) +

2x +y dx
= g
0
(y) +x
2
+xy.
F
y
(x, y) = x 2y
3
gives g

0
(y) = 2y
3
and we can choose g
0
(y) = y
2
. The solutions are
given by y
2
+x
2
+xy = C, C R.
1.6 Equilibrium Solutions and Phase Portraits
Denition 1.6.1. An autonomous rst-order dierential equation is of the form
dy
dt
= F(y). (1.25)
We assume that the right-hand function F(y) is at least continuous. Note that the rate of change
of the function y depends only on the state y, and not on t. (We choose t to denote the independent
variable rather than x, since thinking of the independent variable as time aids the understanding of
the concepts that follow.) An equilibrium solution or stationary solution to the dierential equation
(1.25) is a solution that is a constant function y = y

; since dy/dt = 0 for a constant function, we


obtain equivalently that for an equilibrium solution F(y

) = 0.
28 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Finding equilibrium solutions, and determining their type is a good way of gaining insight into
the qualitative behavior of solution curves. As indicated in the denition above, nding equilibrium
solutions is equivalent to solving the equation F(y

) = 0, which is usually a lot easier than solving


a dierential equation. We illustrate the process of equilibrium point analysis by re-visiting part
(e) of example 1.2.1.
Example 1.6.1. Find and describe the nature of all equilibrium solutions of the logistic equation
dy
dt
= y(1 y). (1.26)
Here, F(y) = y(1 y) which is zero precisely when y

= 0 or y

= 1. Figure 1.4 shows the graph


of F(y) = y(1 y).
Figure 1.4: The graph of dy/dt = y(1 y).
0.5 0.5 1.0 1.5
y
0.4
0.2
0.2
0.4
dydt
The equilibrium solutions correspond to the points of intersection of the graph with the y-axis
(which is the horizontal axis in this case). We further observe that the values on the vertical axis
represent values of dy/dt. In particular, this means:
(a) If y < 0, then dy/dt < 0, so the function y is decreasing. If the initial value of y is negative,
then the values of the solution become smaller (more negative) with time.
(b) If 0 < y < 1, then dy/dt > 0, so the function y is increasing. If the initial value is between 0
and 1, the values of y increase with time.
(c) If y > 1, then dy/dt < 0, so the function y is decreasing. If the initial value is greater than 1,
the values of y get smaller with time.
The observations (a)-(c), together with the equilibrium solutions, give us information on the quali-
tative/geometric/asymptotic behavior of the solution curves. This information may be summarized
1.6. EQUILIBRIUM SOLUTIONS AND PHASE PORTRAITS 29
graphically in a phase portrait. The phase portrait for the logistic equation is given by Figure 1.5.
The equilibrium solution y

= 0 is a source, y

= 1 is a sink.
Figure 1.5: The phase portrait for dy/dt = y(1 y).
0 1
y
Denition 1.6.2. An equilibrium solution y = y

is:
(a) A sink if dy/dt > 0 for all y-values close to, but less than y = y

, and if dy/dt < 0 for all


y-values close to, but greater than y = y

.
(b) A source if dy/dt < 0 for all y-values close to, but less than y = y

, and if dy/dt > 0 for all


y-values close to, but greater than y = y

.
(c) A node if dy/dt > 0 for all y-values close to, but not equal to y = y

; or if dy/dt < 0 for all


y-values close to, but not equal to y = y

.
Figure 1.6 shows the phase portraits near each type of critical point.
Figure 1.6: Classication of Equilibrium Points.
y

y
y

y
Sink Source
y

y
y

y
Node Node
Remark 1.6.1. This means that solutions that start near a sink will approach the sink as t increases;
solutions starting near a source will move away from it as t increases (and towards it if going
backward in time); solutions near a node will move in one direction only. Note that under fairly
general conditions (namely that F

(y) in (1.25) is continuous), these solutions will never actually


reach the equilibrium point in nite time. This last fact is addressed more rigorously in section 1.8.
Although the denition of a sink, source, or node only involves local behavior of solution curves,
it can be easily extended to a larger set of initial conditions. Consider for example the phase portrait
in Figure 1.5. At rst glance, it may be conceivable that a solution curve starting at, e.g., y = 2
decreases in forward time, but does not become arbitrarily close to the equilibrium point y

= 1.
30 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Suppose y y
min
as t . Then dy/dt 0 and the continuity of F(y) implies F(y
min
) = 0.
Since there is no equilibrium point between y = 1 and y = 2, y
min
= y

, and y

= 1 must attract
all solution curves starting at y > 1 in forward time.
Example 1.6.2. Find and classify all equilibrium solutions and draw the phase portrait. Also,
determine the asymptotic behavior of the solution with the given initial values.
(a) dy/dt = 3y
2
(2 y), y(0) = 1. Here, F(y) = 0 precisely if y

= 0 or y

= 2. The graph of
F(y) = 3y
2
(2 y) (Figure 1.6a) shows that if y < 0 or 0 < y < 2, dy/dt > 0; and if y > 2,
dy/dt < 0. This means that y

= 0 is a node and y

= 2 is a sink. Figure 1.7a shows the


phase portrait for this dierential equation on the y-axis. Since the initial value y(0) = 1 lies
between 0 and 2, we have
lim
t
y(t) = 2, lim
t
y(t) = 0.
(b) dx/dt = x
3
x
2
3x + 3, x(0) = 2. The equation x
3
x
2
3x + 3 = 0 can be solved by
grouping and yields the equilibrium solutions x

= 1 and x

3. Figure 1.7b shows the


graph of F(x) = x
3
x
2
3x +3 together with the phase portrait. The equilibrium solution
x

= 1 is a sink and x

3 are both sources. Since x(0) = 2 >

3,
lim
t
x(t) = , lim
t
x(t) =

3.
Figure 1.7: The graphs of the right-hand side, together with the corresponding phase portraits for
example 1.6.2: (a) dy/dt = 3y
2
(2 y) (left); dx/dt = x
3
x
2
3x + 3 (right).
1 1 2 3
y
1
1
2
3
4
dydt
3
3
1
3
3
x
1
1
2
3
4
5
dxdt
1.7 Slope Fields and Eulers Method
As seen in the previous section, phase portraits are appropriate graphs for autonomous dierential
equations. In the case of a more general non-autonomous dierential equation y

= G(x, y), we
may use a slope eld to obtain information on the qualitative behavior of solution curves. The
following example illustrates how a slope eld is generated.
1.7. SLOPE FIELDS AND EULERS METHOD 31
Example 1.7.1. Consider the dierential equation dy/dx = y
2
x. The idea when creating a slope
eld is to pick a set of points in the xy-plane, and draw a short line segment that represents the slope
dy/dx at each point (i.e. it represents the slope of the solution curve passing through that point).
Figure 1.8a shows how this is done for the point (2, 1), where the slope is dy/dx = 1
2
2 = 1;
and for the point (1, 2), where the slope is dy/dx = 2
2
1 = 3. If this process is done (preferably
by using a grapher) for a large grid of points, we obtain the slope eld in Figure 1.8b.
Figure 1.8: Slopes dy/dx for dy/dx = y
2
x: (a) slopes at two selected points (left); (b) slope eld
using a large grid of points (right).
slope1
2
21
slope2
2
13
1 1 2 3
x
1
1
2
3
y
3 2 1 1 2 3
x
3
2
1
1
2
3
y
Example 1.7.2. Determine which of the following eight dierential equations correspond with which
of the four slope elds given in Figure 1.9.
(i) dy/dx = x 1 (ii) dy/dx = 1 y
2
(iii) dy/dx = y
2
x
2
(iv) dy/dx = 1 x
(v) dy/dx = 1 y (vi) dy/dx = x
2
y
2
(vii) dy/dx = 1 +y (viii) dy/dx = y
2
1
Observe that in slope eld (a), the slopes are the same along each vertical line; that is, the
slope depends only on x, not on y. This tells us that the corresponding dierential equation must
be of the form dy/dx = g(x). The two choices are hence (i) and (iv). Since for x = 0, the slopes
are positive in slope eld (a), we match it with dierential equation (iv).
Slope eld (b) corresponds to an autonomous dierential equation (slopes are the same along
horizontal lines), and y

= 1 is its one and only equilibrium solution. Dierential equation (v) is


the only one that ts this description.
Slope eld (c) also corresponds to an autonomous dierential equation, and has y

= 1 as its
equilibrium solutions. Dierential equations (ii) and (viii) are both candidates, but (viii) is the one
that also has negative slopes when y = 0.
We observe that in slope eld (d), dy/dx = 0 for points that appear to be on the lines y = x.
This narrows things down to dierential equations (iii) or (vi). Since the slopes are all non-positive
along the x-axis (that is, when y = 0), dierential equation (iii) matches with slope eld (d).
32 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Figure 1.9: The slope elds for example 1.7.2.
3 2 1 1 2 3
x
3
2
1
1
2
3
y
3 2 1 1 2 3
x
3
2
1
1
2
3
y
(a) (b)
3 2 1 1 2 3
x
3
2
1
1
2
3
y
3 2 1 1 2 3
x
3
2
1
1
2
3
y
(c) (d)
1.7. SLOPE FIELDS AND EULERS METHOD 33
Eulers Method
Eulers Method is a numerical method that, roughly speaking, follows the slope eld starting at
an initial point (x
0
, y
0
) to obtain approximate solutions to the initial value problem y

= G(x, y),
y(x
0
) = y
0
. More precisely, given a point (x
0
, y
0
) and a step size x, the solution y = g(x) to this
initial value problem is approximated as follows.
Let x
i
= x
0
+k x for k = 1, 2, 3, . . .. Using the tangent line approximation
g(x + x) g(x) +g

(x)x, (1.27)
we can approximate g(x
1
) = g(x
0
+ x) as g(x
1
) g(x
0
) + g

(x
0
)x. But now g(x
0
) = y
0
and
g

(x
0
) = G(x
0
, y
0
) (since g(x) is a solution to the initial value problem y

= G(x, y), y(x


0
) = y
0
).
Thus the rst step in Eulers Method is to approximate g(x
1
) by y
1
= y
0
+ G(x
0
, y
0
)x. This is
equivalent to following a line passing through the point (x
0
, y
0
) with slope G(x
0
, y
0
) for x units
horizontally to the point (x
1
, y
1
); see Figure 1.10a. From this point, we follow the line with slope
G(x
1
, y
1
) for x units, and obtain the new point (x
2
, y
2
); we repeat this process by starting at
(x
2
, y
2
) with slope G(x
2
, y
2
), etc. Figure 1.10b illustrates this process.
Figure 1.10: Illustration of Eulers Method: (a) the rst step (left); (b) the rst and second step
(right).
slopeGx
0
,y
0

x
0
x
1
x
0
x
x
y
0
y
1
y
0
Gx
0
,y
0
x
y
slopeGx
0
,y
0

slopeGx
1
,y
1

x
0
x
1
x
2
x
y
0
y
1
y
0
Gx
0
,y
0
x
y
2
y
1
Gx
1
,y
1
x
y
In eect, we compute approximations y
k
to the values of the actual solution g(x
k
) by using the
iterative scheme
y
k+1
= y
k
+G(x
k
, y
k
)x. (1.28)
Example 1.7.3. Consider the initial value problem dy/dx = y
2
x, y(0) = 1. We use Eulers
method to approximate the solution for 0 x 2 using x = 0.2. Note that y
0
= 1, x
0
= 0,
and x
1
= 0.2, x
2
= 0.4, x
3
= 0.6, . . . , x
10
= 2.0. Also, G(x, y) = y
2
x. According to equation
(1.28), y
1
= 1 + ((1)
2
0) 0.2 = 0.8, y
2
= 0.8 + ((0.8)
2
0.2) 0.2 = 0.712, y
3
=
0.712 +((0.712)
2
0.4) 0.2 = 0.690611, . . . . The results are shown in Table 1.1. Figure 1.11
shows the polygonal path obtained from plotting these points.
34 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Table 1.1: The results of Eulers method for dy/dx = y
2
x, y(0) = 1 using x = 0.2.
k x
k
y
k
0 0.00 1.0000
1 0.20 0.8000
2 0.40 0.7120
3 0.60 0.6906
4 0.80 0.7152
5 1.00 0.7729
6 1.20 0.8534
7 1.40 0.9478
8 1.60 1.0481
9 1.80 1.1484
10 2.0 1.2446
It is reasonable to expect that if x is chosen to be small, then Eulers method will usually give
a good approximation of the actual solution to the given initial value problem. However, there are
exceptions, as the following example illustrates.
Example 1.7.4. Consider the initial value problem
dy
dx
= e
x
cos(e
x
1), y(0) = 0.
It can be seen by integration that the solution is y = sin(e
x
1). However, the numerical solution
when using Eulers method will eventually become unbounded, no matter how small x is chosen.
Figure 1.12 shows the numerical solution in red for 0 x 4 with x = 0.25, and Figure 1.13
shows the numerical solution in red for 0 x 5 with x = 0.1. The actual solution is shown in
blue.
The reason for this behavior is that the actual solution exhibits higher and higher frequencies
as x becomes large. Thus, at some point, the tangent line used for approximation will become so
steep that it overshoots the horizontal strip H = (x, y) : 1 y y even for a small step size,
and then lands well outside H. In fact, Figure 1.12 shows that even before the numerical solution
becomes unstable, it tends to bounce around this strip without really following the exact solution
any more.
1.8 Existence and Uniqueness
Example 1.8.1. Consider the initial value problem dy/dx = xy
2/3
, y(0) = 0. The dierential
equation is separable, so we may use the method in section 1.2 to solve it. Separating variables
gives dy/y
2/3
= xdx; integrating both sides gives 3y
1/3
= (x
2
/2) +C, or y = ((x
2
/6) +C)
3
. Using
y(0) = 0 provides C = 0, so a solution to the initial value problem is y = x
6
/216. However, the
constant function y = 0 is also a solution to this initial value problem, and so are the piecewise
1.8. EXISTENCE AND UNIQUENESS 35
Figure 1.11: The polygonal path traced out by the points when using Eulers method for dy/dx =
y
2
x, y(0) = 1 with x = 0.2.
0.5 1.0 1.5 2.0
x
2.0
1.5
1.0
0.5
y
Figure 1.12: The numerical solution (red) versus the actual solution (blue) in example 1.7.4: (a)
x = 0.25 (left); (b) x = 0.1 (right).
1 2 3 4
5
5
10
15
1 2 3 4 5
25
20
15
10
5
5
36 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
dened functions
y =
_
0 if x < 0
x
6
/216 if x 0
and y =
_
x
6
/216 if x < 0
0 if x 0
.
We observe that the initial value problem in example 1.8.1 does not have a unique solution.
From an applications point of view, this is rather problematic, especially in physical applications
where only one solution is observed. In other words, the initial value problem dy/dx = xy
2/3
,
y(0) = 0 would not be a good mathematical model for a situation in which a unique solution is
expected. The following theorem states a condition under which a unique solution to a given initial
value problem can be guaranteed.
Theorem 1.8.1. Suppose the function G(x, y) and its partial derivative (G/y)(x, y) are contin-
uous on some open rectangle containing the point (x
0
, y
0
). Then there exists a unique solution to
the initial value problem
dy
dx
= G(x, y), y(x
0
) = y
0
. (1.29)
The proof of this theorem involves graduate level work, and is consequently omitted. Note that
the unique solution in theorem 1.8.1 need not be dened over the entire width of the rectangle
where G(x, y) and (G/y)(x, y) are continuous. In general, this solution is only dened on a
possibly smaller open interval I containing x
0
.
Example 1.8.2. Use theorem 1.8.1 to investigate the uniqueness of solutions to each initial value
problem.
(a) dy/dx = xy
2
, y(0) = 1. Here, G(x, y) = xy
2
and (G/y)(x, y) = 2xy are continuous on all
of R
2
. Thus, there is a unique solution to the initial value problem. Note that the existence of
a unique solution to an initial value problem and the fact that G(x, y) and (G/y)(x, y) are
continuous for all values of x and y does not imply that this solution is dened everywhere.
Here, the solution (which is y = 2/(2 x
2
)) is undened at x =

2.
(b) dy/dx = 3y
2/3
, y(0) = 0. The partial derivative (G/y)(x, y) = 2y
1/3
is not continuous
at y = 0, so theorem 1.8.1 does not assert the existence of a unique solution. Indeed, it can
be seen that the functions y = x
3
and y = 0 are both solutions the initial value problem.
Additionally, the initial value problem has innitely many solutions of the form
y =
_
0 if x < C
(x C)
3
if x C
for C > 0
or
y =
_
(x C)
3
if x < C
0 if x C
for C < 0.
(c) dy/dx = [y[, y(0) = 0. Clearly, the constant function y = 0 is a solution to this initial value
problem. The absolute value function G(y) = [y[ is not dierentiable at y = 0, so theorem
1.8.1 cannot guarantee that y = 0 is the only solution. However, it does not assert that there
must be others. In fact, using the following elementary arguments, it can be seen that y = 0
is indeed the only solution to dy/dx = [y[, y(0) = 0.
1.9. BIFURCATIONS OF AUTONOMOUS FIRST-ORDER DIFFERENTIAL EQUATIONS 37
Suppose there exists a solution y(x) to dy/dx = [y[, y(0) = 0 with y ,= 0. This means there
exists a value x
0
so that y
0
= y(x
0
) ,= 0. First consider the case y
0
> 0. The solution satises
the initial value problem dy/dx = y, y(x
0
) = y
0
which has the by theorem 1.8.1 unique
solution y(x) = y
0
e
xx
0
dened on some open interval about x
0
. Since y(0) = y
0
e
x
0
,= 0,
y(x) must at some point be dierent from y(x). The only way this can be accomplished
is by having a point of discontinuity for y(x). However, by virtue of being a solution to a
dierential equation, y(x) is dierentiable and thus must be continuous. The case y
0
< 0 is
treated similarly.
Remark 1.8.1. A geometric consequence of having a unique solution to a given initial value problem
is that solution curves corresponding to dierent initial values are either identical or they do not
intersect. In particular, this means that for an autonomous dierential equation, transient solutions
can never reach an equilibrium solution in nite time. This fact was already mentioned in remark
1.6.1.
1.9 Bifurcations of Autonomous First-Order Dierential Equa-
tions
We now consider rst-order dierential equations of the form
dy
dt
= F

(y) (1.30)
where is a parameter; that is, is a value that may be chosen freely, but is xed when solving
the dierential equation. Technically, equations of the form (1.30) are one-parameter families of
autonomous dierential equations. Autonomous dierential equations were covered in section 1.6.
In this section, we will investigate how dierent values of the parameter inuence the qualitative
structure of solutions to (1.30).
Example 1.9.1. Consider the one-parameter family
dy
dt
= y
2
2y +. (1.31)
The graph of F

(y) = y
2
2y + for various values of is shown in Figure 1.13. Since the eect of
the parameter is that of lifting the graph of y y
2
2y, we expect that there is a unique value

0
so that the following hold.
If >
0
, there are no equilibrium solutions, and dy/dt > 0 for any solution y.
If =
0
, there is exactly one equilibrium solution y

, which is a node.
If <
0
, there are two equilibrium solutions y

1
< y

2
. The equilibrium solution y

1
is a sink;
y

2
is a source.
The value
0
is called the bifurcation value or bifurcation parameter. A bifurcation occurs if there
is a fundamental change in the dynamics of a dierential equation. In this example, the bifurcation
occurs precisely when the parabola y
2
2y+ touches the y-axis: at
0
, a sink and a source collide,
38 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Figure 1.13: The graph of F

(y) = y
2
2y + for = 1, 0, 1, 2.
2 1 1 2 3 4
y
2
2
4
6
8
10
dydx
2
1
0
1
and after the collision, the equilibrium solutions have vanished (the sink and the source cancel
out at
0
). From Figure 1.13,
0
= 1. We can also compute
0
analytically by observing that the
vertex of F

(y) occurs at y = 1 (when F

(y) = 2y 2 = 0). The dy/dt-coordinate of the vertex is


F

(1) = 1
2
2(1) + = 1. Thus, dy/dt = 0 if = 1.
Continuing this example, we would now like to generate a bifurcation diagram for the one-
parameter family F

(y) = y
2
2y + . The horizontal axis of this bifurcation diagram represents
values of the parameter . The vertical axis represents the equilibrium solutions y

. Dashed curves
in the bifurcation diagram give the locus of sources, solid curves represent the locus of sinks. The
bifurcation diagram of the one-parameter family of dierential equations (1.31) is shown in Figure
1.14. It is obtained qualitatively from Figure 1.13 as follows. If <
0
= 1, the graph in Figure
1.13 has two points of intersection with the y-axis, representing two equilibrium solutions: the sink
y

1
with y

1
< 1, and the source y

2
with y

2
> 1. If =
0
= 1, there is one point of intersection
with the y-axis, which represents an equilibrium solution which is a node. If >
0
= 1, there are
no intersections with the y-axis, and hence no equilibrium solutions.
A bifurcation where a source and a sink collide and subsequently disappear is called a saddle-
node bifurcation, or a tangent bifurcation. Note that the curves in Figure 1.14 may be found
analytically as follows. Since an equilibrium solution occurs when dy/dt = 0, we need to set (1.31)
equal to zero, and solve
(y

)
2
2y

+ = 0. (1.32)
This yields y

= 1

1 , which represents the two branches in the bifurcation diagram. By


evaluating F

(y) along each branch, we can determine whether we have a sink (F

(y) < 0) or a
source (F

(y) > 0). It should be pointed out that generally, due to possible algebraic complica-
tions, we prefer to obtain the bifurcation diagram qualitatively (as from Figure 1.13), rather than
analytically.
Example 1.9.2. Find the bifurcation values and draw the bifurcation diagram for each of the fol-
lowing one-parameter families of dierential equations.
1.9. BIFURCATIONS OF AUTONOMOUS FIRST-ORDER DIFFERENTIAL EQUATIONS 39
Figure 1.14: The bifurcation diagram of dy/dt = y
2
2y +.
source
sink
node
0.5 0.5 1.0 1.5
0.5
1.0
1.5
2.0
(a) dy/dt = y
3
y. Figure 1.15a shows the graph of F

(y) = y
3
y for > 0. In this case
there are three equilibrium solutions: y

1
= 0, which is a sink, and y

2/3
=

, which are
sources. Figure 1.15b shows the graph of F

for < 0; there, y

1
= 0 is the only equilibrium
solution, and a source. The bifurcation diagram is given in Figure 1.16. In this example, we
have a pitchfork bifurcation at
0
= 0: as changes sign from negative to positive, the source
ips into a sink, and two new sources are created.
Figure 1.15: The graphs of F

(y) = y
3
y: (a) > 0 (left); (b) < 0 (right).

y
dydx
y
dydx
(b) dx/dt = x(1 x)
2
+ . The graph of F

(x) = x(1 x)
2
+ , with = 0, in Figure 1.17a
shows that we have two tangent bifurcations, one at
0
= 0, and the other occurs where
F

(x) has its local maximum. Elementary analysis yields that this occurs when x = 1/3, so
40 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Figure 1.16: The bifurcation diagram of dy/dt = y
3
y.
0.5 0.0 0.5 1.0
1.0
0.5
0.0
0.5
1.0

1
= (1/3)(1 (1/3)) = 4/27. The bifurcation diagram is shown in Figure 1.17b.
Figure 1.17: (a) The graph of F
0
(x) = x(1 x)
2
(left); (b) the bifurcation diagram of dx/dt =
x(1 x)
2
+ (right).
0.5 1.0 1.5
x
0.2
0.2
0.4
dxdt
0.4 0.2 0.2 0.4

0.5
0.5
1.0
1.5
x

Bifurcation Diagrams and Phase Portraits


A bifurcation diagram can be interpreted as a collection of phase portraits, as illustrated by re-
visiting part (a) of example 1.9.2; the only caveat is that the phase portraits now appear in the
vertical direction.
Example 1.9.3. We use the bifurcation diagram in Figure 1.16 to draw the phase portrait and
determine the asymptotic behavior of solutions for the dierential equation
dy/dt = y
3
y. (1.33)
(a) = 0.5, y(0) = 1. If = 0.5, there is a source at y

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


1.10. MATHEMATICA USE 41
lim
t
y(t) = and lim
t
y(t) = 0. The phase portrait when = 0.5 is shown in
Figure 1.18.
(b) = 0.5, y(0) = 0.2. If = 0.5, there is a sink at y

0
= 0 > 0.2 and a source y

1
< 0.2.
This means lim
t
y(t) = 0 and lim
t
y(t) = y

1
. The phase portrait when = 0.5 is also
shown in Figure 1.18.
Figure 1.18: The bifurcation diagram and phase portraits of dy/dt = y
3
y if = 0.5 and
= 0.5.
0.5 0.0 0.5 1.0
1.0
0.5
0.0
0.5
1.0

1.10 Mathematica Use


Solving Dierential Equations
Dierential equations and initial value problems can be solved symbolically using the DSolve com-
mand.
Example 1.10.1. (a) The solution to the dierential equation dy/dx = xy is y = Ce
x
2
/2
. The
double equal sign must be used for equations; the single equal sign is an assignment operator
and will produce an error. Also, the solution function must be written as y[x], not just as y.
DSolvey'x x yx, yx, x
yx
x
2
2
C1
(b) The solution to the initial value problem dy/dx = xy, y(0) = 5 is y = 5e
x
2
/2
. The rst
argument is a list containing the two equations.
DSolvey'x x yx, y0 5, yx, x
yx 5
x
2
2

42 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
(c) The dierential equation need not be solved for y(x) when entering it using DSolve.
DSolvey'x^2 yx 0, yx, x
yx
1
4
x
2
2 x C1 C1
2
, yx
1
4
x
2
2 x C1 C1
2

To obtain a numerical solution, use the NDSolve command. The output is an interpolating
function which must be evaluated separately.
Example 1.10.2. The numerical solution to the initial value problem dy/dx = y
2
x, y(0) = 1, is
produced and assigned the name solution. Note that a range must be specied for the independent
variable.
solution NDSolvey'x yx^2 x, y0 1, yx, x, 0, 2
yx InterpolatingFunction0., 2., x
The solution can be evaluated as follows.
solution . x 2
y2 1.25132
We can plot the solution, as well.
Plotyx . solution, x, 0, 2
0.0 0.5 1.0 1.5 2.0
1.2
1.1
1.0
0.9
0.8
Drawing Slope Fields
The function PlotSlopeField can be used to generate slope elds. It is available in the Slope-
Fields.nb le at http://cobalt.rocky.edu/
~
hoenschu/DiffEqBook/Mathematica. The usage
for this function is
PlotSlopeFieldformula_, xRange_List, yRange_List, nPoints_List
1.10. MATHEMATICA USE 43
where formula is the right-hand side of the dierential equation (a function of x and y); xRange is a
list that contains the minimum and maximum x-value (in that order); yRange is a list that contains
the minimum and maximum y-value (in that order); and nPoints is a list that contains the number
of grid points used to in the x-direction and the number of grid points used to in the y-direction,
respectively.
Example 1.10.3. Generate a slope eld for the dierential equation dy/dx = x(y x) using the
viewing window 3 x 3 and 3 y 3, with 24 grid points in each direction. First, press
Shift+Enter in the cell containing the denition of the PlotSlopeField function. The name of
the function turns from blue to black. Mathematica now knows this function. Then, dene the
right-hand side e.g. as f1:
f1x_, y_ : x y x;
The slope eld is produced as follows.
g1 PlotSlopeFieldf1, 3, 3, 3, 3, 24, 24
3 2 1 1 2 3
x
3
2
1
1
2
3
y
Eulers Method Using NDSolve
We can instruct Mathematica to use Eulers Method when solving an initial value problem numer-
ically.
Example 1.10.4. The numerical solution to the initial value problem dy/dx = y
2
x, y(0) = 1
when using Eulers Method with step size x = 0.2 is generated and assigned the name solution.
44 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
solution NDSolvey'x yx^2 x, y0 1, yx, x, 0, 2,
StartingStepSize 0.2, Method "FixedStep", Method "ExplicitEuler"
yx InterpolatingFunction0., 2., x
A table for the solution is produced as follows.
Tableyx . solution, x, 0, 2, 0.2
1., 0.8, 0.712, 0.690611, 0.715222, 0.772914,
0.853435, 0.947765, 1.04811, 1.1484, 1.24464
1.11 Exercises
Exercise 1.1. Solve each initial value problem by using an appropriate method.
(a)
dx
dt
=
x + 1
t
, x(1) = 0
(b)
dx
dt
= t
2
x
2
, x(2) = 1
(c)
dx
dt
= e
t+x
, x(0) = 0
(d)
dy
dx
=
xy
x
2
+y
2
, y(0) = 1
(e) (t
2
+ 1)
dx
dt
+ 2tx = 1, x(0) = 0
(f) t
dx
dt
+x = e
t
, x(1) = 1
(g) 2xdx + 4y
3
dy = 0, y(1) = 2
(h) e
y
dx + (xe
y
sin y) dy = 0, y(0) = 0
(i) (xy 1) dx+(x
2
xy) dy = 0, y(1) = 0 (Hint: nd an integrating factor of the form r(x).)
Exercise 1.2. Solve each initial value problem by using an appropriate method.
(a)
dy
dx
= 0, y(0) = 5
(b)
dy
dx
=
2y
x
, y(1) = 2
(c)
dx
dt
=
1 x
2
t
, x(1) = 0
(d)
dy
dx
=
y
2
+xy
x
2
, y(1) = 1
1.11. EXERCISES 45
(e)
dy
dx
= 3x
2
y, y(0) = 5
(f)
dx
dt
=
x
2
t
, x(1) = 1
(g)
dx
dt
+ 4x = 1, x(0) = 0
(h) xy

+ 2y = 3x, y(1) = 0
(i) xy
2
y

y
3
= x
3
, y(1) = 0
(j) (3x
2
y
3
+y
4
)dx + (3x
3
y
2
+y
4
+ 4xy
3
)dy = 0, y(1) = 2
(k) y

=
_
x +y + 1 1, y(0) = 1 (Hint: look at exercise 1.3 rst.)
(l) x
dy
dx
+ 6y = 3xy
4/3
, y(1) = 1 (Hint: look at exercise 1.4 rst.)
(m) y dx + (2x ye
y
) dy = 0, y(0) = 1 (Hint: nd an integrating factor of the form r(y).)
Exercise 1.3.
(a) Prove that a dierential equation of the form
dy
dx
= F(ax +by +c)
will become separable if the substitution v = ax +by +c is used.
(b) Use the substitution in (a) to solve the initial value problem
dy
dx
= (x + 4y 1)
2
, y(0) = 1/8.
(c) Use the substitution in (a) to solve the initial value problem
dy
dx
= (y + 4x + 1)
2
, y(0) = 1.
Exercise 1.4. Consider Bernoullis Equation. It is a dierential equation of the form
dy
dx
= A(x)y +B(x)y
n
, (n ,= 0, 1).
(a) Show that the substitution z = y
1n
transforms Bernoullis Equation into a linear dier-
ential equation of the form
dz
dx
= (1 n)A(x)z + (1 n)B(x).
46 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
(b) Use the substitution in (a) to solve the initial value problem
dy
dx
+x
1
y = xy
2
, y(1) = 1.
Exercise 1.5. For each dierential equation, determine all equilibrium solutions, their type (sink,
source, node), and sketch the phase portrait. Also, determine the asymptotic behavior of the
solutions given by the initial conditions.
(a)
dy
dt
= y
2
y 6; y(0) = 0, y(0) = 4.
(b)
dy
dt
= y
3
2y
2
; y(0) = 1, y(0) = 1.
(c)
dx
dt
= x
3
x
2
3x + 3; x(0) = 1, x(0) = 2.
(d)
dx
dt
= sin x; x(0) = 1, x(0) = .
Exercise 1.6. Provide a justication for the following rst-derivatives test for classifying equilibrium
solutions. Suppose dy/dt = F(y), and F(y

) = 0.
If F

(y

) > 0, then y

is a source;
if F

(y

) < 0, then y

is a sink;
if F

(y

) = 0, then the test is inconclusive.


Also, provide one example each for a dierential equation where F

(y

) = 0, and y

is a source, a
sink, or a node.
Exercise 1.7. Use Mathematica and the module provided in the le SlopeFields.nb to plot the
slope elds of the following dierential equations.
(a)
dy
dx
= x(y x), 3 x, y 3, grid dimensions: 24, 24.
(b)
dy
dx
= x
2
y, 3 x, y 3, grid dimensions: 24, 24.
(c)
dy
dx
= xy
2
, 3 x, y 3, grid dimensions: 24, 24.
(d)
dy
dx
= y/x, 3 x, y 3, grid dimensions: 24, 24.
Exercise 1.8. Use Eulers Method to approximate the solution to each initial value problem at the
given value of the independent variable.
(a)
dy
dx
= x(y x), y(0) = 1, at x = 1 if x = 0.5.
1.11. EXERCISES 47
(b)
dy
dx
= x
2
y, y(0) = 0, at x = 1 if x = 0.25.
(c)
dy
dx
= y
2
x, y(0) = 1, at x = 1 if x = 0.2.
(d)
dy
dt
= y
2
t
2
, y(1) = 1, at t = 2 if t = 0.25.
(e)
dy
dt
= ty y
3
, y(0) = 1, at t = 1 if t = 0.25.
(f)
dy
dt
= sec
2
t, y(0) = 0, at t = 1 if t = 0.2.
Exercise 1.9. For each of the following initial value problems, determine whether the Existence
and Uniqueness Theorem guarantees that there is a unique solution passing through the initial
condition.
(a)
dy
dt
= y
2
, y(0) = 0.
(b)
dy
dt
= 4ty
3/4
, y(0) = 1.
(c)
dy
dt
= 4ty
3/4
, y(1) = 0.
(d)
dy
dt
=
1
(y + 1)(t 2)
, y(0) = 0.
(e)
dy
dx
= tan y, y(0) = 0.
(f)
dy
dx
=
y
x
2
, y(1) = 0.
(g)
dy
dx
=
y
x
2
, y(0) = 0.
(h)
dy
dx
=
x
(y 1)
2
, y(0) = 0.
Exercise 1.10. We have seen in example 1.1.1 that the initial value problem
(y

)
2
y = 0, y(0) = 1
has two dierent solutions y = (1/4)(x
2
+ 4x + 4) and y = (1/4)(x
2
4x + 4). Are any of the
conditions in theorem 1.8.1 is violated in this case? How do you explain the result of the non-unique
solution?
Exercise 1.11. Draw the bifurcation diagram for each one-parameter family of dierential equations.
Label all axes correctly, and nd all bifurcation values.
48 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
(a)
dy
dt
= y y
2
.
(b)
dy
dt
= y
2
(1 y
2
) +.
(c)
dx
dt
= x
3
2x
2
+.
(d)
dx
dt
= (x
2
+)x.
(e)
dx
dt
= x
2
+x +
2
1.
Exercise 1.12. Write a Mathematica module that implements Eulers method. You may want to
adapt the code of the SlopeFields module.
Exercise 1.13. Show that a function y = f(x) is a solution of the initial value problem
dy
dx
= G(x, y), y(x
0
) = y
0
(1.34)
precisely when y = f(x) satises the integral equation
y = y
0
+

x
x
0
G(t, y) dt. (1.35)
Note that this means you need to show that if y = f(x) satises (1.34), then it also satises
(1.35); and if y = f(x) satises (1.35), then it also satises (1.34).
Exercise 1.14. (Picard Iteration) Consider again the initial value problem
dy
dx
= G(x, y), y(x
0
) = y
0
.
Dene a sequence of functions
0
(x),
1
(x),
2
(x), . . . as follows.

0
(x) = y
0

n+1
(x) = y
0
+

x
x
0
G(t,
n
(t)) dt for n = 1, 2, . . ..
(a) Show that for dy/dx = y, y(0) = 1,
0
(x) = 1,
1
(x) = 1+x,
2
(x) = 1+x+(x
2
/2!),. . . ,
n
(x) =
1 + x + (x
2
/2!) + . . . + (x
n
/n!). Thus,
n
(x) e
x
, which is the solution to the initial value
problem.
(b) Find
0
(x),
1
(x),
2
(x),
3
(x) for the initial value problem dy/dx = y
2
x, y(0) = 0, and
use
3
(x) to approximate the solution at x = 0.5.
Exercise 1.15. The following method, called variation of parameters, is another method that can
be used to solve linear rst-order dierential equations of the form
y

+p(x)y = q(x). (1.36)


1.11. EXERCISES 49
(a) Let y
h
be the solution to the corresponding homogeneous equation; i.e. y

h
+p(x)y
h
= 0. Show
that y
h
= Ce
P(x)
, where P(x) is an antiderivative of p(x) and C is a constant parameter.
(b) The idea behind the variation of parameters method is to assume that when looking for a
solution to the non-homogeneous equation (1.36), the constant C in part (a) is actually a
function of x. Thus, we assume that the solution to (1.36) is of the form
y = c(x)e
P(x)
.
Show that c(x) satises the dierential equation c

(x)e
P(x)
= q(x), and that the solution y
is given by equation (1.14). Thus, the method of variation of parameters and the integrating
factor method are equivalent.
50 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS
Chapter 2
Applications of First-Order
Dierential Equations
This chapter presents various applications of rst-order dierential equations. Most examples we
consider will be autonomous equations of the form dy/dt = f(y), rather than the more general form
dy/dt = f(t, y) considered previously. The reason for this is that in most physical applications, there
is no absolute time-dependence of the rate of change of the quantity y (exceptions are situations in
which there is external forcing, as for example the presence of an extraneous voltage source in
electric circuits see section 2.2). In other words, the time-evolution of, for example, a chemical
experiment will not depend on when (in which year, at what time of day) the experiment was
conducted; the outcome will depend only on how much time has elapsed since the experiment was
started.
2.1 Population Models
We consider the following general model for the growth (or decay) of a single population.
Let denote the birth rate of the population over a xed period lasting one unit of time (say,
a year); that is,
=
number of individuals who were born
total number of individuals
.
Let denote the death rate of the population over the same xed period of time; consequently,
=
number of individuals who died
total number of individuals
.
The change in the population P over the time period t (say, one month or t = 1/12) is:
P(t + t) P(t) = P(t) t P(t) t, (2.1)
or
P(t + t) P(t)
t
= ( ) P(t). (2.2)
51
52 CHAPTER 2. APPLICATIONS OF FIRST-ORDER DIFFERENTIAL EQUATIONS
Letting t 0 in equation (2.2), we obtain the dierential equation
dP
dt
= ( ) P. (2.3)
Generally, we can look at the following cases, based on how birth and death rates depend either
on time or on the current population.
The case , = constant. This leads to exponential growth or decay (see below).
The case = (t) and = (t). This corresponds to a form of externally forced growth or
decay which is not usually suciently realistic in population models. The reason for this is
that while population growth rates may be inuenced by external factors (such as seasonal
variations in temperature, water supply, etc.), the are also inuenced by the size to the
population itself.
The case = (P) and = (P). In this situation there is feedback; the current population
determines the birth and death rates. An important model is logistic growth, which is in-
vestigated below. This is a closed model; there are no external (explicitly time-dependent)
factors that inuence the growth rate.
The case = (t, P) and = (t, P). This is the most general situation when there is
only one isolated population. We do not analyze this situation here. However, it should
be pointed out that external inuences can usually be easily incorporated in a dierential
equations model (see e.g. exercise 2.1). In chapter 7, we will analyze higher-dimensional
population models that incorporate interaction among two or more populations (for example,
a predator species and a prey species).
We now present two models based on equation (2.3).
Exponential Growth or Decay
Suppose both birth and death rates are constant. Then the relative growth rate (dP/dt)/P is
constant. In this situation, the initial value problem (dP/dt) = ( )P, P(0) = P
0
has the
solution
P(t) = P
0
e
()t
. (2.4)
If the net reproduction rate = is positive, then we have exponential growth of the pop-
ulation; if is negative, then we have exponential decay. Exponential growth and decay models
are applicable only under very special or articial conditions (such as growing bacteria on a Petri
dish), and exponential population growth is clearly not sustainable long term. The following model
is much more realistic.
Logistic Growth
Now we assume that the relative growth rate is a decreasing linear function of P. This means,
dP
dt
= (a +bP) P, (2.5)
2.1. POPULATION MODELS 53
where a > 0 and b < 0. If P 0, (dP/dt)/P a; so small populations growth exponentially with
relative growth rate a. As the population grows, its relative growth rate will decrease linearly. This
decrease can be interpreted as being due to increased competition among members of the species
for natural resources when the population size increases.
Equilibrium point analysis shows that (2.5) has the two equilibrium solutions P

= 0, which is
a source; and P

= a/b > 0, which is a sink. The equilibrium solution L = a/b is called the
limiting capacity or the carrying capacity of the population described by equation (2.5). It is the
population that can be supported by the environment in the long run. The solution to the initial
value problem dP/dt = (a +bP) P, P(0) = P
0
can be found by separation of variables. We obtain
P(t) =
ae
at
P
0
bP
0
(1 e
at
) +a
. (2.6)
Example 2.1.1. Five hundred animals of a species are introduced to an environment. In the be-
ginning, when the population is still small, it grows exponentially with a net reproduction rate of
10% per year. Eventually, the population will approach its carrying capacity of 15,000 animals.
Find the values of a and b, and nd the formula for the population t years after the species was
introduced.
Solution. a = 0.1, and L = a/b = 15000 gives b = 1/150000. Since P
0
= 500, we obtain the
solution
P(t) =
0.1e
0.1t
500
(1/150000) 500 (1 e
0.1t
) + 0.1
,
which simplies to
P(t) =
15000e
0.1t
29 +e
0.1t
.
Figure 2.1 shows the graph of P(t). We observe, for example, that it takes about 60 years for the
population to be within 1,000 of the carrying capacity.
Figure 2.1: The solution to example 2.1.1.
20 40 60 80 100
2000
4000
6000
8000
10000
12000
14000
Example 2.1.2. Table 2.1 shows the population of the United States, starting with the census in
1790. We would like to use a logistic growth model for the data. To this end, we need to estimate
54 CHAPTER 2. APPLICATIONS OF FIRST-ORDER DIFFERENTIAL EQUATIONS
coecients a and b so that (dP/dt)/P = a+bP. This means, we have to express the relative growth
rate as a linear function of the population. This can be done using linear regression as follows. Let
P
i
, i = 0, 1, . . . be the population in the year 1790, 1800, . . ., and let t = 10 years.
Table 2.1: Historical U.S. populations based on census data (Source: www.wikipedia.org).
Census Year Population
1790 3,929,214
1800 5,236,631
1810 7,239,881
1820 9,638,453
1830 12,866,020
1840 17,069,453
1850 23,191,876
1860 31,443,321
1870 38,558,371
1880 49,371,340
1890 62,979,766
1900 76,212,168
1910 92,228,496
1920 106,021,537
1930 123,202,624
1940 132,164,569
1950 151,325,798
1960 179,323,175
1970 203,211,926
1980 226,545,805
1990 248,709,873
2000 281,421,906
2010 308,745,538
The population for the midyears 1795, 1805, . . . is approximated by P
i
= (P
i
+ P
i1
)/2 for
i = 1, 2, . . .. For example, this means that the population in the year 1795 is approximated by the
average of the populations of the years 1790 and 1800, which is (5.236 + 3.929)/2 = 4.583 million
people. The relative annual growth rate for the midyears is approximated as
dP/dt
P

(P
i
P
i1
)/t
P
i
. (2.7)
For the year 1795, the relative annual growth rate would be approximately (5.2363.929)/10/4.583 =
0.02852 = 2.852%. The regression line of (P
i
+ P
i1
)/t/P
i
against P
i
has intercept a = 0.0276
and the slope is b = 7.73 10
5
. A more detailed explanation of how this calculation is done is
given in the Mathematica section of this chapter.
Consequently, we need to solve the initial value problem dP/dt = (0.0276 7.73 10
5
P) P,
P(0) = 3.929 (t = 0 corresponds to the year 1790, P is in millions). It has the solution P =
2.1. POPULATION MODELS 55
(276000e
0.0276t
)/(69473.9 + 773e
0.0276t
). Figure 2.2 shows this function, together with the actual
population data. There appears to be a denite break in the growth pattern around the year 1930.
In exercise 2.3 you will be asked to recompute the logistic model starting with the year 1930.
Figure 2.2: U.S. census data and its logistic approximation. The horizonal axis gives the year; the
vertical axis the population in millions.
1850 1900 1950 2000
50
100
150
200
250
300
Example 2.1.3. Suppose a sh population grows logistically according to the model
dP
dt
= (0.5 0.00025P) P.
If a constant rate of harvesting is introduced into the model, the dierential equation becomes
dP
dt
= (0.5 0.00025P) P . (2.8)
We want to investigate the bifurcations the system undergoes as the rate of harvesting is increased
starting with = 0.
The equilibrium solutions to the dierential equation (2.8) can be found by solving (0.5
0.00025P) P = 0 for P. This gives P

= 1000

1000000 4000. Figure 2.3a shows the


graph of (2.8) when = 100. Note that the left equilibrium point P

= 1000

1000000 4000
is a source, and the right equilibrium point P

= 1000 +

1000000 4000 is a sink. The sink is


the only observable equilibrium point: if is constant, then the population of sh will stabilize at
this equilibrium value. The bifurcation diagram is shown in Figure 2.3b. We have a saddle node
bifurcation at
0
= 250. If > 250, the entire graph of (2.8) will be below the P-axis, which means
that dP/dt < 0.
An interpretation of this model is that, if the harvesting rate is at the bifurcation value
0
,
any increase in harvesting will not only lead to a decrease in the sh population, but will, more
alarmingly, lead to a loss of any stable population and to a theoretically unbounded decrease in
the population. In other words, a little more shing will, in the long run, not lead to just a small
number of sh fewer than the 1,000 at
0
, but to the total disappearance of all sh.
56 CHAPTER 2. APPLICATIONS OF FIRST-ORDER DIFFERENTIAL EQUATIONS
Figure 2.3: The population model in example 2.1.3: (a) graph of the dierential equation if = 100
(left); (b) bifurcation diagram (right).
500 1000 1500 2000
P
50
100
150
200
250
dPdt
50 100 150 200 250 300

500
1000
1500
2000
P

2.2 Electric Circuits


In this section we will consider simple electrical circuits that contain a resistor and an inductor (see
Figure 2.4). These circuits (also called RL circuits) are governed by the following physical laws.
Figure 2.4: A simple RL circuit.
L R
E
Ohms Law
Ohms Law states that the voltage drop or potential dierence U
R
(in volts, V ) across a resistor is
U
R
= R I, (2.9)
where I is the current (in amperes, A) and R is the resistance (in ohms, ).
2.2. ELECTRIC CIRCUITS 57
Faradays Law
Faradays Law states that the voltage drop across an inductor is
U
L
= L
dI
dt
, (2.10)
where dI/dt is the change in the current (in amperes per second) and L is the inductance (in
henries, H). This is because a changing electric current, e.g. in a coil, creates a magnetic eld
which, in turn, induces a voltage drop.
Kirchhos Voltage Law
Kirchhos Voltage Law states that the sum of the voltage drops in a closed electric circuit must
be zero. If the RL circuit has the (time-dependent) voltage source E(t), then U
L
+ U
R
= E(t).
This leads to the following linear dierential equation.
L
dI
dt
+R I = E(t). (2.11)
Remark 2.2.1. If the initial current is I
0
, and there is no external voltage source (E(t) = 0), then
the current remaining in the circuit decays exponentially as given by the the initial value problem
dI
dt
=
R
L
I, I(0) = I
0
.
Example 2.2.1. Ordinary household voltage in the U.S. is 120 volt alternating current at 60 Hz,
that is, it can be modeled as E(t) = 120 sin(120t). Suppose that R = 10 and L = 5 H, and that
the initial current in the circuit is I
0
= 0 A. Then the current I = I(t) in the circuit at time t (in
seconds) satises the dierential equation
5
dI
dt
+ 10 I = 120 sin(120t).
Dividing by 5 gives the linear dierential equation (dI/dt) + 2I = 24 sin(120t). An integrating
factor is r(t) = e
2t
, so the dierential equation becomes
d
dt
(e
2t
I) = 24e
2t
sin(120t).
The general antiderivative of the right-hand side can found by applying integration by parts twice.
We obtain
e
2t
I =
12e
2t
3600
2
+ 1
(sin(120t) 60 cos(120t)) +C.
Using I(0) = 0 gives C = 720/(3600
2
+ 1). Consequently,
I =
12
3600
2
+ 1
(sin(120t) 60 cos(120t)) +
720
3600
2
+ 1
e
2t
. (2.12)
Figure 2.5a shows the current I for the rst 500 milliseconds. In the long run, the term
(720/(3600
2
+ 1))e
2t
in equation (2.12) will approach zero, and the current will settle down
to become the alternating current I

(t) 0.062 sin(120t + t) (Figure 2.5b), where t is some


phase shift which is uninteresting in practical applications.
58 CHAPTER 2. APPLICATIONS OF FIRST-ORDER DIFFERENTIAL EQUATIONS
Figure 2.5: The graph of I(t) in (2.12): (a) initial current from 0 to 500 milliseconds (left); (b)
long-term current from 2,500 to 3,000 milliseconds (right).
0.1 0.2 0.3 0.4 0.5
t
0.05
0.10
I
2.6 2.7 2.8 2.9 3.0
t
0.05
0.05
I
2.3 Chemical Reaction Equations
In this section we will model chemical reactions based on their reaction rates. For simplicity, we
will work under the assumption that reaction rates are constant. In reality, physical parameters
such as temperature, pressure and rates of mixing will inuence rates of chemical reactions.
Law of Mass Action
The Chemical Law of Mass Action states that the rate at which the concentrations of various
products in a chemical reaction change is proportional to the products of the concentrations of
the reactants, raised to their respective reaction orders. The reaction orders can be obtained
experimentally or looked up in a table. A simple example will illustrate this concept.
Example 2.3.1. [18] Consider the chemical reaction of nitrous oxide and oxygen which forms nitrogen
dioxide,
2NO + O
2
2NO
2
. (2.13)
The law of mass action asserts that the rate of change in the concentration of nitrogen dioxide is
proportional to the product of the square of the concentration of nitrous oxide and the concentration
of oxygen. The rate law for this reaction takes the form d[NO
2
]/dt = k[NO]
2
[O
2
] (see Table 2.2).
The constant of proportionality k is called the rate constant. (We use the notation [A] to denote
the concentration of the substance A.)
Let [NO]
0
be the initial concentration of nitrogen oxide and let [O
2
]
0
be the initial concentration
of oxygen. Then [NO
2
] satises the following dierential equation.
d[NO
2
]
dt
= k ([NO]
0
[NO
2
])
2
_
[O
2
]
0

[NO
2
]
2
_
(2.14)
To understand the right-hand side of this equation, note that the initial amount of NO is reduced
by an equal amount of NO
2
that is produced during the reaction, so [NO] = [NO]
0
[NO
2
]. The
initial amount of O
2
is reduced by one half the amount of NO
2
, since one unit of O
2
yields two
units of NO
2
.
2.3. CHEMICAL REACTION EQUATIONS 59
To make things a little more concrete, let us suppose that the initial concentrations are [NO]
0
=
4 M/l, [O
2
]
0
= 1 M/l, and [NO
2
]
0
= 0 M/l. At 25

C, the rate constant for this reaction is k =


0.00713 l
2
/(M
2
s). The dierential equation (2.14) yields the following initial value problem.
d[NO
2
]
dt
= 0.00713 (4 [NO
2
])
2
_
1
[NO
2
]
2
_
, [NO
2
](0) = 0 (2.15)
Although the dierential equation is separable, it cannot be solved explicitly for the concentration
of nitrogen dioxide. Using NDSolve in Mathematica, we obtain a numerical solution to (2.15), whose
graph is shown in Figure 2.6. Not surprisingly, the amount of nitrogen dioxide that can be produced
in the long run is limited, in this case, by the available amount of oxygen.
Figure 2.6: The concentration of nitrogen dioxide [NO
2
] in example 2.3.1. The horizontal axis
shows the time (in seconds) after the reaction has started.
50 100 150 200 250 300
t
0.5
1.0
1.5
2.0
2.5
C
Table 2.2: Rate laws for various reactions (Source: [14]).
Reaction Rate Law
2NO + O
2
2NO
2
Rate = k[NO]
2
[O
2
]
2NO + 2H
2
2N
2
+ 2H
2
O Rate = k[NO]
2
[H
2
]
2ICl + H
2
2HCl
2
+ I
2
Rate = k[ICl][H
2
]
2N
2
O
5
4NO
2
+ O
2
Rate = k[N
2
O
5
]
2NO
2
+ F
2
2NO
2
F Rate = k[NO
2
][F
2
]
2H
2
O
2
2H
2
O + O
2
Rate = k[H
2
O
2
]
H
2
+ Br
2
2HBr Rate = k[H
2
][Br
2
]
1/2
O
3
+ Cl O
2
+ ClO Rate = k[O
3
][Cl]
60 CHAPTER 2. APPLICATIONS OF FIRST-ORDER DIFFERENTIAL EQUATIONS
Example 2.3.2. Table 2.3 shows data from three experiments involving the chemical reaction
H
2
+ I
2
2HI. (2.16)
Table 2.3: Hydrogen Gas and Iodine Gas Initial Rate Data at 700K (Source: [14])
.
Experiment [H
2
]
0
(M) [I
2
]
0
(M) Rate (M/sec)
1 0.10 0.10 3.00 10
4
2 0.20 0.10 6.00 10
4
3 0.20 0.20 1.19 10
3
Using these data, we may determine the reaction orders m and n for the rate law d[HI]/dt =
k[H
2
]
m
[I
2
]
n
, as follows. Using the data from the rst two experiments, we obtain the two equations
3 10
4
= k(0.10)
m
(0.10)
n
6 10
4
= k(0.20)
m
(0.10)
n
.
Division of these equations yields 2 = (0.20)
m
/(0.10)
m
= 2
m
, so m = 1. Using the second and the
third equation in a similar manner gives n = 1. Finally, we may determine the reaction rate k by
using, for example, the rst equation: 3 10
4
= k(0.10)(0.10) gives k = 3.00 10
2
. The dierential
equation for the concentration of the product is consequently
d[HI]
dt
= 0.03
_
[H
2
]
0

[HI]
2
__
[I
2
]
0

[HI]
2
_
. (2.17)
This dierential equation can now be solved and analyzed in a manner similar to example 2.3.1
(see also exercise 2.9).
2.4 Mathematica Use
Example 2.4.1. The initial value problem dP/dt = ((1/10)(1/150000)P)P, P(0) = 500 in example
2.1.1 can be solved as follows.
DSolveP't 1 10 1 150000 Pt Pt, P0 500, Pt, t Simplify Quiet
Pt
15000
t10
29
t10

The command Simplify simplies the algebraic form of the solution P(t) and the command Quiet
suppresses the output of a warning. Note that these commands appear in postx form. The
equivalent prex form would be:
QuietSimplifyDSolveP't 1 10 1 150000 Pt Pt, P0 500, Pt, t
Pt
15000
t10
29
t10

2.5. EXERCISES 61
In our next example, we provide details on the analysis of the census data of example 2.1.2.
Example 2.4.2. The census data (in millions) are placed chronologically into the list data.
data 3929214, 5236631, 7239881, 9638453, 12866020, 17069453, 23191876, 31443321,
38558371, 49371340, 62979766, 76212168, 92228496, 106021537, 123202624, 132164569,
151325798, 179323175, 203211926, 226545805, 248709873, 281421906, 308745538;
data data 1000000.0;
We now proceed to set up the regression model. As mentioned in example 2.1.2, we prefer to
estimate the relative rate of change (dP/dt)/P by using the two-sided estimate for the derivative
dP/dt and the mid-year estimates for the population P. Using one-sided estimates results only
in a slightly dierent model. The list regressionData contains the chronological list of the pairs
P, (dP/dt)/P. Finally, the command LinearModelFit creates a linear regression model of the
form (dP/dt)/P = a +bP.
t 10;
midpoints Dropdata, 1 Dropdata, 1 2;
RelChange Dropdata, 1 Dropdata, 1 t midpoints;
regressionData Threadmidpoints, RelChange;
LinearModelFitregressionData, P, P
FittedModel
0.0275917 0.0000773111 P

2.5 Exercises
Exercise 2.1. A non-native beetle species threatens the health of a certain species of conifer-
ous tree. Suppose the beetle population grows exponentially, but the net reproduction rate is
inuenced by seasonal variations (e.g. cold temperatures in the winter, warm temperatures in the
summer). Specically,
(t) = 0.1 0.2 cos((/6)t),
where t is in months and t = 0 corresponds to the beginning of January. This means the average
net reproduction rate is 10%, but there are variations with amplitude 20% over the course of a
year.
Suppose the estimated number of beetles is 200,000 in January. Solve the initial value problem
for the population P(t) after t months and compare the graph of P(t) to the graph of the solution
if there is no seasonal variation (i.e. the net reproduction rate is constant at 10%).
Exercise 2.2. A deer population grows logistically; i.e., the size P of the population satises the
dierential equation
dP
dt
= (a +bP) P.
The population numbers for three years are given by this table.
Year Number of Deer
0 1,500
1 2,300
2 2,700
62 CHAPTER 2. APPLICATIONS OF FIRST-ORDER DIFFERENTIAL EQUATIONS
(a) Determine the values for the parameters a and b and nd the formula that gives the deer
population at time t (in years). Hint: Use Mathematicas FindRoot method with starting
values a
0
= 1 and b
0
= 0.001.
(b) Suppose that additionally, 100 deer are killed per year by hunters. How does this change the
dierential equation describing the size of the population? In particular, what is the size of
the population in the long run?
Exercise 2.3. Examination of Figure 2.2 leads to the observation that at around the year 1930,
there seems to be a break from the logistic pattern. Rework the census data for the U.S. population
starting with t = 0 corresponding to the year 1930. What is the carrying capacity of this new
model and how does it compare to the carrying capacity in example 2.1.2?
Exercise 2.4. Newtons Law of Heating/Cooling states that the rate with which the temperature
of an object changes is proportional to the dierence between the ambient temperature A and the
temperature of the object. That is, the temperature y of the object satises a dierential equation
of the form
dy
dt
= k(Ay). (2.18)
Use Newtons Law to model the following situation. Suppose you are driving through Death Valley
(air temperature 40

C), and your car overheats. You stop and the coolant temperature gauge
shows 120

C. After 20 minutes, the gauge is down to 110

C. Using Newtons Law of Cooling,


predict how long it will take for the coolant to cool down to 80

C.
Exercise 2.5. Consider the following scenario: you have two thermally similar liquids; liquid
1 has volume V
1
and initial temperature y
0
1
; liquid 2 has volume V
2
and initial temperature y
0
2
(e.g. 200 ml tea at 80

C and 50 ml milk at 5

C). The ambient temperature for both uids is A


(e.g. 25

C). By thermally similar, we mean that the constant k appearing in Newtons Law of
Heating/Cooling (2.18) is the same for both liquids (e.g. k = 0.2

C/min).
Suppose you have the option of mixing the two liquids immediately (thus having an average
initial temperature of y
0
= (V
1
/(V
1
+V
2
))y
0
1
+(V
2
/(V
1
+V
2
))y
0
2
for the mixture) and then waiting T
units of time (e.g. 5 minutes); or of waiting T units of time, and then mixing the liquids. Assuming
Newtons Law, which strategy will result in a lower temperature of the mixture?
Exercise 2.6. Suppose a container is completely lled with a uid (gas or liquid) and has volume
V . At time t = 0, a certain substance is mixed into the uid with initial concentration C
0
= Q
0
/V .
Fluid without the substance enters the container at rate r, and completely and instantaneously
mixes with the uid in the container. At the same time, the same amount of uid with the
substance mixed in ows out of the container (hence keeping the volume constant). The quantity
Q of the substance satises the following initial value problem.
dQ
dt
=
r
V
Q, Q(0) = Q
0
.
Use this model in the following situation. During a blizzard, you are conned to a log cabin
with a faulty heater. The heater emits 80 milligrams of carbon monoxide (CO) per minute into
the interior of the cabin which completely and instantaneously mixes with the cabin air. People
develop clinical symptoms of carbon monoxide poisoning if the concentration of CO exceeds 110
milligrams per cubic meter. The volume of the cabin is 300 cubic meters.
2.5. EXERCISES 63
(a) How long does it take for the cabin air to become toxic, if the cabin is ventilated by outside
air at a rate of 0.5 cubic meters per minute?
(b) How much ventilation would be needed to keep the CO-concentration just below toxicity
levels?
Exercise 2.7. Suppose the volume of an object decreases at a rate proportional to the surface area
of the object. Assume the surface area always has the shape of a sphere in R
3
. For example, this
situation could apply in the case of the evaporation of a raindrop that is ideally assumed to be
spherical. Show that the radius of the object decreases at a constant rate.
Exercise 2.8. Find the formula and plot the graph of for the current I(t) in the following RL
circuit. Use that I(0) = 0.
L12H R8
Et220 cos100t
Exercise 2.9. Solve the dierential equation (2.17) in example 2.3.2 using that initially, the con-
centration of HI was zero, and the initial concentrations of hydrogen and iodine were 3 M and 1
M, respectively. How long will it take to produce 2 M HI? What is the long-term concentration of
HI, and why is this result not surprising?
Exercise 2.10. [14] The reaction 2N
2
O
5
4NO
2
+O
2
was found in a study to have the rate law
rate = 0.070[N
2
O
5
].
(a) If the initial concentrations are [N
2
O
5
]
0
= 10 M/l and [NO
2
]
0
= [O
2
]
0
= 0 M/l, set up the
initial value problems that describe the concentrations [N
2
O
5
](t), [NO
2
](t) and [O
2
](t).
(b) Solve the initial value problems and plot the solutions all in the same graph.
Exercise 2.11. We investigate the following generalization of example 2.2.1. What happens if an
RL circuit is connected to an alternating voltage source E(t) = Asin(t)? This leads to the initial
value problem
L
dI
dt
+RI = Asin(t), I(0) = 0. (2.19)
(a) Find the solution to (2.19) and express it in the form
I(t) = e
t
+
1
cos(t) +
2
sin(t),
where > 0 and I
trans
(t) = e
t
is the transient term (decays with time) and I

(t) =

1
cos(t) +
2
sin(t) is the equilibrium term.
64 CHAPTER 2. APPLICATIONS OF FIRST-ORDER DIFFERENTIAL EQUATIONS
(b) Show that the current surge, i.e. the quotient of the maximal current divided by the amplitude
of I

is given by
= 1 +
1
_
1 +
_
R
L
_
2
.
Hint: Use that f(t) =
1
cos(t)+
2
sin(t) can be written in the formf(t) =
_

2
1
+
2
2
cos(t+
t), where t is some phase shift see theorem 3.5.2 for details.
Exercise 2.12. The following dierential equation can be used to model the free fall with friction
of an object with mass m in the presence of a (constant) gravitational eld with gravitational force
g; the frictional force is assumed to be proportional to the speed of the object:
m x +c x = g, (2.20)
where x is the position of the object at time t, and the dot-notation is used for derivatives with
respect to time. By letting v = x, equation (2.20) becomes the rst-order equation m v +cv = g.
(a) Find the equilibrium solution to m v +cv = g; this is the terminal velocity of the object.
(b) Find the general formula of the solution to the initial value problem
m x +c x = g, x(0) = x
0
, x(0) = v
0
,
and identify all transient terms. Hint: nd the solution to m v + cv = g, v(0) = v
0
rst, and
then integrate once more.
(c) Suppose (more realistically) that the frictional force is proportional to the square of the
velocity of the object. What is the terminal velocity now, and how does it compare to the
one in part (a)?
Exercise 2.13. Consider the following assumptions made about how a certain piece of information
(e.g a rumor) spreads across a population of N individuals. Let I(t) be the number of individuals
who know the information at time t.
The number of people a given individual encounters during a period of time (say, one day) is
proportional to the size of the population, and the encounters are random (i.e. an individual
does not encounter the same or most of the same individuals every day).
The probability that two individuals who encounter each other will exchange the information
is constant.
(a) What is the dierential equation that models I(t)?
(b) Suppose individuals also forget the information with a constant relative rate; how does this
change the model in part (a)? Also, what is the number of people who know about the
information in the long run?
Chapter 3
Higher-Order Linear Dierential
Equations
3.1 Introduction to Homogeneous Second-Order Linear Equations
Recall that the rst-order linear dierential equations we encountered in section 1.4 were of the
form dy/dx +p(x)y = q(x). We can multiply both sides by a function a
1
(x) to obtain the slightly
more general form
a
1
(x)
dy
dx
+a
0
(x)y = f(x). (3.1)
Note that the name linear comes from the fact that the left-hand side of the equation (3.1) is
linear in the independent variable y and the derivative dy/dx. We may generalize this to higher
order dierential equations, as follows. A general second-order linear dierential equation is of the
form
a
2
(x)
d
2
y
dx
2
+a
1
(x)
dy
dx
+a
0
(x)y = f(x), (3.2)
where a
2
(x) is not identically zero. Similarly, an n-th order linear dierential equation can be
written as
a
n
(x)
d
n
y
dx
n
+. . . +a
2
(x)
d
2
y
dx
2
+a
1
(x)
dy
dx
+a
0
(x)y = f(x), (3.3)
with a
n
,= 0. The functions a
0
(x), a
1
(x), . . . , a
n
(x) are called the coecient functions of the dif-
ferential equation. The dierential equation is called homogeneous if the right-hand side function
in (3.3) is zero for all x. In this chapter, we will focus mostly on homogeneous second-order linear
dierential equations (sections 3.2 to 3.5); in section 3.6 we will consider non-homogeneous second-
order linear dierential equations; and in section 3.7 we will look at higher-order linear equations.
The dierential equations considered in all of these sections will have constant coecient functions.
Section 3.8 presents the structure of the solution space of dierential equations of the form (3.3).
In this last section, general (non-constant) coecient functions will be considered.
65
66 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
3.2 Homogeneous Second-Order Linear Equations with Constant
Coecients
We start with an introductory example that captures most aspects of what we encounter when
solving homogeneous second-order linear dierential equations with constant coecient functions.
Example 3.2.1. Consider the second-order equation
d
2
y
dx
2
5
dy
dx
+ 4y = 0. (3.4)
We see if we can nd a solution to (3.4) by using the trial solution y = e
x
. (That is, we are
guessing that at least one solution is an exponential function. This is a rather educated guess.
However, since exponential functions occurred quite often as solutions in chapters 1 and 2, they
are natural candidates to be considered.)
If y = e
x
, then the dierential equation (3.4) yields
d
2
dx
2
e
x
5
d
dx
e
x
+ 4e
x
= 0.
Since (d/dx)e
x
= e
x
and (d
2
/dx
2
)e
x
=
2
e
x
, we obtain
2
e
x
5e
x
+ 4e
x
= 0, and
multiplying both sides by e
x
yields

2
5 + 4 = 0. (3.5)
This equation is called the characteristic equation of (3.4). Its solutions are
1
= 1 and
2
= 4.
Consequently, y
1
= e
x
and y
2
= e
4x
are solutions to the dierential equation. Even more than
that is true: if y = c
1
y
1
+ c
2
y
2
= c
1
e
x
+ c
2
e
4x
, then y is a solution to (3.4), as well. This can be
seen as follows: dy/dx = c
1
e
x
+ 4c
2
e
4x
, d
2
y/dx
2
= c
1
e
x
+ 16c
2
e
4x
, so d
2
y/dx
2
5(dy/dx) + 4y =
c
1
e
x
+ 16c
2
e
4x
5c
1
e
x
20c
2
e
4x
+ 4c
1
e
x
+ 4c
2
e
4x
= 0.
The following theorem summarizes the insights gained in the previous example.
Theorem 3.2.1. Consider the homogeneous second-order linear dierential equation with constant
coecients
a
d
2
y
dx
2
+b
dy
dx
+cy = 0, (3.6)
where a ,= 0. If is a (real or complex) solution to the associated characteristic equation
a
2
+b +c = 0, (3.7)
then the function y = e
x
is a solution to (3.6). Furthermore, if y
1
and y
2
are solutions to (3.6),
then so is any linear combination y = c
1
y
1
+c
2
y
2
(c
1
, c
2
are arbitrary real or complex numbers).
Proof. Let be a solution to (3.7) and let y = e
x
. Then y

= e
x
= y, y

=
2
e
x
=
2
y, and
ay

+by

+cy = (a
2
+b +c)y = 0. So, y = e
x
is a solution to (3.6).
If y
1
and y
2
are solutions to (3.6), and c
1
, c
2
are arbitrary, then for y = c
1
y
1
+c
2
y
2
, ay

+by

+cy =
a(c
1
y

1
+c
2
y

2
) +b(c
1
y

1
+c
2
y

2
) +c(c
1
y
1
+c
2
y
2
) = c
1
(ay

1
+by

1
+cy
1
) +c
2
(ay

2
+by

2
+cy
2
) = 0.
3.2. HOMOGENEOUS SECOND-ORDER LINEAR EQUATIONS WITHCONSTANT COEFFICIENTS67
Example 3.2.2. Consider the dierential equation
d
2
y
dx
2
+ 4y = 0. (3.8)
The characteristic equation is
2
+4 = 0 which has the complex solutions = 2i. Two complex-
valued solutions to the dierential equation are y = e
2ix
and its complex conjugate y = e
2ix
.
However, we are interested in real-valued solutions. To obtain them, recall that for s, t R,
e
s+it
= e
s
(cos t +i sin t) (Eulers Formula). In the present situation, taking y = e
2ix
, we get
y = e
2ix
= cos(2x) +i sin(2x).
Since y = e
2ix
= cos(2x) +i sin(2x) = cos(2x) i sin(2x), addition of these two solutions gives
that 2 cos(2x) and consequently that the real part y
1
= cos(2x) of y = e
2ix
is a solution to (3.8).
Similarly, it can be seen that the imaginary part y
2
= sin(2x) of y = e
2ix
is also a solution. It is
then clear that all linear combinations c
1
cos(2x) +c
2
sin(2x) are real-valued solutions to (3.8).
It appears that we have two-parameter families of solutions to second-order dierential equa-
tions, as opposed to one-parameter families for rst-order equations. Consequently, we need two
initial condition equations to specify the values of these two parameters.
The question that arises is of which form the initial conditions should be. Based on the rst-order
situation, one would be inclined to guess that specifying two initial values of the form y(x
0
) = y
0
,
y(x
1
) = y
1
will work. However, we can see in the previous example that choosing, for instance,
y(0) = 0 and y() = 0 would yield innitely many solutions y = c sin(2x); on the other hand, there
is no solution if y(0) = 0 and y() = 1.
To see the validity of the last statement assume for the moment that all solutions to (3.8) are
of the form y = c
1
cos(2x) + c
2
sin(2x). Then y(0) = 0 would give c
1
= 0, so y = c
2
sin(2x). But
now y() is always zero and in particular cannot be one.
We will see from the existence and uniqueness theorem in section 3.8 that the correct initial
conditions for second-order dierential equations are of the form y(x
0
) = y
0
and y

(x
0
) = y
1
;
that is, we need to specify a value of the solution and its rst derivative at the same initial value
of the independent variable. Also, it follows from this theorem that the solutions of the form
y = c
1
cos(2x)+c
2
sin(2x) found in example 3.2.2 are the only solutions to the dierential equation.
Example 3.2.3. Find a solution to the initial value problem
2
d
2
x
dt
2
+ 5
dx
dt
12x = 0, x(0) = 1, x

(0) = 2. (3.9)
The characteristic equation is 2
2
+ 5 12 = 0 whose solutions are = 3/2 and = 4;
x = c
1
e
(3/2)t
+ c
2
e
4t
are solutions for c
1
, c
2
R. The derivative is x

= (3/2)c
1
e
(3/2)t
4c
2
e
4t
.
The initial condition x(0) = 1 gives c
1
+ c
2
= 1, and the initial condition x

(0) = 2 gives
(3/2)c
1
4c
2
= 2. Solving these two linear equations yields c
1
= 4/11 and c
2
= 7/11, so the
solution we are looking for is x = (4/11)e
(3/2)t
+ (7/11)e
4t
.
In the next three sections we investigate the three dierent cases that can occur when solving
the characteristic equation a
2
+ b + c = 0: there are either two real distinct roots, one real
repeated root, or two non-real complex conjugate roots.
68 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
3.3 Case I: Two Real Distinct Roots
Theorem 3.3.1. Suppose the coecients of the homogeneous second-order linear dierential equa-
tion with constant coecients ay

+by

+cy = 0, a ,= 0, satisfy b
2
4ac > 0.
Then the characteristic equation has two real distinct roots
1
,=
2
and the initial value problem
ay

+by

+cy = 0, y(x
0
) = y
0
, y

(x
0
) = y
1
(3.10)
has a solution of the form y = c
1
e

1
x
+c
2
e

2
x
, where c
1
and c
2
are real numbers that are uniquely
determined by the initial conditions.
Proof. The solutions to the characteristic equation a
2
+b+c = 0 are
1,2
= (b

b
2
4ac)/(2a),
so there are two real distinct solutions if and only if the discriminant b
2
4ac > 0. Theorem 3.2.1
tells us that y = c
1
e

1
x
+c
2
e

2
x
are solutions to the dierential equation ay

+by

+cy = 0 for any


c
1
, c
2
R.
If y = c
1
e

1
x
+c
2
e

2
x
, then y

= c
1

1
e

1
x
+c
2

2
e

2
x
, and the initial conditions y(x
0
) = y
0
and
y

(x
0
) = y
1
lead to the following linear system of equations.
c
1
e

1
x
0
+c
2
e

2
x
0
= y
0
c
1

1
e

1
x
0
+c
2

2
e

2
x
0
= y
1
,
or, using matrix-vector notation,
_
e

1
x
0
e

2
x
0

1
e

1
x
0

2
e

2
x
0
__
c
1
c
2
_
=
_
y
0
y
1
_
. (3.11)
The determinant of the matrix in equation (3.11) is (
2

1
)e

1
x
0
e

2
x
0
, which is non-zero because

1
,=
2
. Hence the system (3.11) has a unique solution (c
1
, c
2
).
Example 3.3.1. Solve each of the following initial value problems. Also, determine the limit of each
solution as t + and t .
(a) x

7x

+6x = 0, x(0) = 0, x

(0) = 1. The solutions to the characteristic equation


2
7+6 =
0 are
1
= 1 and
2
= 6. Setting x = c
1
e
t
+ c
2
e
6t
and using that x

= c
1
e
t
+ 6c
2
e
6t
, and
x(0) = 0, x

(0) = 1 gives the system


c
1
+c
2
= 0
c
1
+ 6c
2
= 1.
Its solutions are c
1
= 1/5 and c
2
= 1/5, so x = (1/5)e
t
+ (1/5)e
6t
. Since both e
t
0 and
e
6t
0 as t , we have lim
t
x = 0. Also, x = ((1/5)e
5t
(1/5))e
t
. Both factors
approach + as t +, so lim
t+
x = +. Figure 3.1 shows the graph of the solution
function x = x(t).
(b) x

+x

6x = 0, x(0) = 1, x

(0) = 0. The solutions to the characteristic equation


2
+6 = 0
are
1
= 2 and
2
= 3. Setting x = c
1
e
2t
+c
2
e
3t
and using that x

= 2c
1
e
2t
3c
2
e
3t
, and
x(0) = 1, x

(0) = 0 gives the equations c


1
+c
2
= 1, 2c
1
3c
2
= 0. Its solutions are c
1
= 3/5 and
c
2
= 2/5, so x = (3/5)e
2t
+ (2/5)e
3t
. As t , one of the terms (3/5)e
2t
and (2/5)e
3t
will always approach +, while the other will approach 0; hence, lim
t
x = +. Figure
3.2 shows the graph of x = x(t). (Note: despite appearances, the graph is not a parabola.)
3.3. CASE I: TWO REAL DISTINCT ROOTS 69
Figure 3.1: The solution to x

7x

+ 6x = 0, x(0) = 0, x

(0) = 1.
2.0 1.5 1.0 0.5 0.5 1.0
t
0.4
0.2
0.2
0.4
0.6
0.8
1.0
x
Figure 3.2: The solution to x

+x

6x = 0, x(0) = 1, x

(0) = 0.
1.0 0.5 0.5 1.0
t
0.5
1.0
1.5
2.0
2.5
3.0
x
70 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
(c) 6x

+ 5x

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

(1) = 1. The solutions to the characteristic equation


6
2
+ 5 + 1 = 0 are
1
= 1/2 and
2
= 1/3. The initial conditions yield the equations
c
1
e
1/2
+c
2
e
1/3
= 2
(1/2)c
1
e
1/2
(1/3)c
2
e
1/3
= 1,
whose solutions are c
1
= 2e
1/2
and c
2
= 0. The solution to the initial value problem is
x = 2e
1/2
e
(1/2)t
= 2e
(1t)/2
. The solution is simply a decreasing exponential function, so
lim
t
x = + and lim
t+
x = 0. Its graph is shown in Figure 3.3.
Figure 3.3: The solution to 6x

+ 5x

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

(1) = 1.
1.0 0.5 0.5 1.0 1.5 2.0
t
1
2
3
4
5
x
(d) x

= 0, x(0) = 5, x

(0) = 0. The solutions to the characteristic equation


2
= 0 are

1
= 0 and
2
= 1. The zero eigenvalue indicates that a constant function is a solution, and
x = e
t
is another. Since x(0) = 5 and x

(0) = 0, we see that x = 5 is the solution of the form


x = c
1
+c
2
e
t
that applies to the initial value problem.
3.4 Case II: One Repeated Real Root
Example 3.4.1. Consider the dierential equation
d
2
y
dx
2
+ 2
dy
dx
+y = 0. (3.12)
The characteristic equation is
2
+ 2 + 1, and this equation has one repeated real root
0
= 1.
By Theorem 3.2.1, y
1
= e
x
is a solution to the dierential equation. The question is, what is
the second solution y
2
we expect to have and that corresponds to the second root we had in the
previous section?
To nd this second solution, we adopt the following formal correspondence between a second-
order dierential equation and its characteristic equation. We introduce the dierential operator
D = d/dx, as follows:
3.4. CASE II: ONE REPEATED REAL ROOT 71
Dierential Operators
If y is a dierentiable function, then Dy is the derivative function of y, that is, Dy = y

. The
symbol D acts as operator: its input is a function, and its output is also a function (in this case
the derivative). We observe the following properties regarding linear combinations of dierential
operators.
D(cy) = c(Dy) for c R;
D(y
1
+y
2
) = (Dy
1
) + (Dy
2
).
The rst property reects the simple fact from dierential calculus that the derivative of a constant
multiple of a function is equal to the same constant multiple of the derivative function. The second
property is the sum rule for derivatives. Now, we dene a product (or perhaps more aptly a
composition) of dierential operators, as follows: D
2
y = D(Dy), that is D
2
(y) = y

. So, D
2
is
really the repeated application of the dierential operator. Let I be the identity operator; that is,
Iy = y. We now have the following distributive properties.
D(aD +bI) = aD
2
+Db,
(aD +bI)D = aD
2
+Db and consequently,
(aD +bI)(cD +dI) = acD
2
+ (ad +bc)D + (bd)I.
Again, these properties are just formalizations of basic facts about derivatives. However, this formal
approach gives us a handle on how to nd the second solution in example 3.4.1.
Example 3.4.2. We again consider the dierential equation
d
2
y
dx
2
+ 2
dy
dx
+y = 0. (3.13)
Using dierential operator notation, it becomes (D
2
+2D+I)y = 0, or simply D
2
+2D+1 = 0. We
may factor the operator on the left to obtain (D + I)(D + I) = 0. Note that the multiplication
really represents sequential application of the dierential operators. Observe that the solution
y
1
= e
x
we found in example 3.4.1 satises (D+I)y
1
= 0. The crucial observation is the following:
If we can nd a function y
2
that satises (D +I)y
2
= y
1
, then (D +I)(D +I)y
2
= (D +I)y
1
= 0;
that is, y
2
is our second solution!
The formal expression (D+I)y
2
= y
1
corresponds, in this example, to the dierential equation
dy
2
dx
+y
2
= e
x
, (3.14)
which is a non-homogeneous rst-order linear dierential equation and can be solved using the
integrating factor r(x) = e
x
. Then, equation (3.14) becomes (d/dx)(e
x
y) = 1, or y = xe
x
+Ce
x
.
Since we already have y
1
= e
x
, we may choose C = 0. The second solution to (3.13) is consequently
y
2
= xe
x
, and y = c
1
e
x
+c
2
xe
x
is a solution for any choice of c
1
, c
2
R.
The following theorem generalizes the results found in examples 3.4.1 and 3.4.2.
72 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
Theorem 3.4.1. Suppose the coecients of the homogeneous second-order linear dierential equa-
tion with constant coecients ay

+by

+cy = 0, a ,= 0, satisfy b
2
4ac = 0.
Then the characteristic equation has one repeated real root
0
and the initial value problem
ay

+by

+cy = 0, y(x
0
) = y
0
, y

(x
0
) = y
1
(3.15)
has a solution of the form y = c
1
e

0
x
+c
2
xe

0
x
, where c
1
and c
2
are real numbers that are uniquely
determined by the initial conditions.
Proof. The characteristic equation a
2
+ b + c = 0 has exactly one solution if and only if the
discriminant b
2
4ac = 0. In this case the solution is
0
= b/(2a). Theorem 3.2.1 asserts that
y
1
= e

0
x
is a solution, and also that c
1
y
1
+c
2
y
2
is a solution for any c
1
, c
2
R, if y
1
, y
2
are arbitrary
solutions to the dierential equation. But y
2
= xe

0
x
is also a solution to this dierential equation:
y

2
= (1+x
0
)e

0
x
, y

2
= (2
0
+
2
0
x)e

0
x
; since
0
= b/(2a) and
0
is a solution to the characteristic
equation, ay

+by

+cy = (2a
0
+a
2
0
x+b+bx
0
+cx)e

0
x
= ((2a
0
+b)+x(a
2
0
+b
0
+c))e

0
x
= 0.
If y = c
1
e

0
x
+c
2
xe

0
x
, then y

= c
1

0
e

0
x
+c
2
(1+
0
x)e

0
x
, and the initial conditions y(x
0
) = y
0
and y

(x
0
) = y
1
lead to the system
_
e

0
x
0
x
0
e

0
x
0

0
e

0
x
0
(1 +
0
x
0
)e

0
x
0
__
c
1
c
2
_
=
_
y
0
y
1
_
, (3.16)
whose determinant is ((1 +
0
x
0
)
0
x
0
)e
2
0
x
0
= e
2
0
x
0
,= 0. So the system (3.16) has a unique
solution (c
1
, c
2
).
Example 3.4.3. Solve the initial value problem 9x

6x

+x = 0, x(0) = 1, x

(0) = 0 and determine


the limit of the solution as t + and t .
The characteristic equation has the single solution
0
= 1/3. Setting x = c
1
e
t/3
+ c
2
te
t/3
and
using that x

= (c
1
/3 +c
2
)e
t/3
+ (c
2
/3)te
t/3
, and x(0) = 1, x

(0) = 0 gives the system


c
1
= 1
c
1
/3 +c
2
= 0.
This means x = e
t/3
(1/3)te
t/3
= (1(t/3))e
t/3
. As t +, the rst factor approaches and
the second factor approaches +, so lim
t+
x = . As t , we may rewrite the solution
as x = (1 (t/3))/e
t/3
and use LHopitals Rule to obtain lim
t
x = 0. Figure 3.4 shows the
graph of the solution function x = x(t).
3.5 Case III: Complex Conjugate Roots
We now look at the case when the characteristic equation a
2
+b +c = 0 has complex conjugate
solutions. Example 3.2.2 dealt with a situation of this type, and the general approach is to obtain
complex-valued solution functions, and then take the real and imaginary parts to get real-valued
solutions. The following theorem summarizes the relevant information in this case.
Theorem 3.5.1. Suppose the coecients of the homogeneous second-order linear dierential equa-
tion with constant coecients ay

+by

+cy = 0, a ,= 0, satisfy b
2
4ac < 0.
3.5. CASE III: COMPLEX CONJUGATE ROOTS 73
Figure 3.4: The solution to 9x

6x

+x = 0, x(0) = 1, x

(0) = 0.
4 2 2 4
t
1.5
1.0
0.5
0.5
1.0
x
Then the characteristic equation has two complex conjugate roots i, ,= 0, and the initial
value problem
ay

+by

+cy = 0, y(x
0
) = y
0
, y

(x
0
) = y
1
(3.17)
has a solution of the form y = c
1
e
x
cos(x) +c
2
e
x
sin(x), where c
1
and c
2
are real numbers that
are uniquely determined by the initial conditions.
Proof. The solutions to the characteristic equation a
2
+b+c = 0 are
1,2
= (b

b
2
4ac)/(2a),
so there are two complex conjugate solutions if and only if the discriminant b
2
4ac < 0. Write

1,2
= i, where , R, ,= 0, and let z
1/2
= e

1,2
x
= e
xix
= e
x
(cos(x) i sin(x)).
Theorem 3.2.1 tells us that z = c
1
z
1
+c
2
z
2
are (complex-valued) solutions to the dierential equation
az

+ bz

+ cz = 0 for any c
1
, c
2
C. In particular, y
1
= Re(z
1
) = (z
1
+ z
1
)/2 = (z
1
+ z
2
)/2 =
e
x
cos(x) and y
2
= Im(z
1
) = (z
1
z
1
)/(2i) = (z
1
z
2
)/(2i) = e
x
sin(x) are solutions to (3.17).
If y = c
1
e
x
cos(x)+c
2
e
x
sin(x), then y

= c
1
e
x
cos(x)c
1
e
x
sin(x)+c
2
e
x
sin(x)+
c
2
e
x
cos(x), and the initial conditions y(x
0
) = y
0
and y

(x
0
) = y
1
lead to the following equation:
_
e
x
0
cos(x
0
) e
x
0
sin(x
0
)
e
x
0
(cos(x
0
) sin(x
0
)) e
x
0
(sin(x
0
) + cos(x
0
))
__
c
1
c
2
_
=
_
y
0
y
1
_
. (3.18)
The determinant of the matrix in equation (3.18) is e
2x
0
(cos(x
0
) sin(x
0
) + cos
2
(x
0
))
e
2x
0
(cos(x
0
) sin(x
0
) sin
2
(x
0
)) = e
2x
0
(cos
2
(x
0
) + sin
2
(x
0
)) = e
2x
0
, which is non-
zero because ,= 0. Hence the system (3.18) has a unique solution (c
1
, c
2
).
Example 3.5.1. Solve each of the following initial value problems.
(a) x

+2x

+2x = 0, x(0) = 0, x

(0) = 1. The solutions to the characteristic equation


2
+2+2 =
0 are
1,2
= 1 i. Consequently, x
1
= e
t
cos t and x
2
= e
t
sin t are real-valued solutions.
Setting x = c
1
e
t
cos t +c
2
e
t
sin t and using that x

= c
1
e
t
(cos t sin t) +c
2
e
t
(sin t +
cos t), and x(0) = 0, x

(0) = 1 gives the system


c
1
= 0
c
1
+c
2
= 1.
74 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
So, c
1
= 0 and c
2
= 1, and x = e
t
sin t. The solution is a sine function with exponentially
decreasing amplitude. Figure 3.5 shows the graph of the solution function x = x(t).
Figure 3.5: The solution to x

+ 2x

+ 2x = 0, x(0) = 0, x

(0) = 1.
2 4 6 8
t
0.2
0.1
0.1
0.2
0.3
x
(b) x

4x

+ 404x = 0, x(0) = 5, x

(0) = 0. The solutions to the characteristic equation are

1,2
= 220i. Setting x = c
1
e
2t
cos(20t)+c
2
e
2t
sin(20t) and using that x

= c
1
e
2t
(2 cos(20t)
20 sin(20t)) +c
2
e
2t
(2 sin(20t) + 20 cos(20t)), and x(0) = 5, x

(0) = 0 gives the equations


c
1
= 5
2c
1
+ 20c
2
= 0.
Its solutions are c
1
= 5 and c
2
= 1/2, so x = 5e
2t
cos(20t) (1/2)e
2t
sin(20t). Figure 3.6
shows the graph of x = x(t), which has exponentially increasing amplitude.
Figure 3.6: The solution to x

4x

+ 404x = 0, x(0) = 5, x

(0) = 0.
1.0 0.5 0.5
t
15
10
5
5
10
15
x
(c) x

+ 16
2
x = 0, x(0) = 2, x

(0) = 20. The solutions to the characteristic equation are


3.5. CASE III: COMPLEX CONJUGATE ROOTS 75

1,2
= 4i, so x = c
1
cos(4t) +c
2
sin(4t). The initial conditions yield
c
1
= 2
4c
2
= 20,
whose solutions are c
1
= 2 and c
2
= 5/. The solution to the initial value problem is
x = 2 cos(4t) (5/) sin(4t). Its graph is shown in Figure 3.7. The solution curve has
amplitude A 2.5 and period p = (2)/(4) = 0.5.
Figure 3.7: The solution to x

+ 16
2
x = 0, x(0) = 2, x

(0) = 20.
1.0 0.5 0.5
t
3
2
1
1
2
3
x
The second theorem in this section is a renement of the results of theorem 3.5.1, and provides
a general framework for the dierent geometric behavior observed for the solutions in parts (a)-(c)
of example 3.5.1.
Theorem 3.5.2. Suppose the characteristic equation of the homogeneous second-order linear dif-
ferential equation ax

+bx

+cx = 0, a ,= 0, has the complex conjugate solutions = i, > 0.


Suppose that the dierential equation has the initial conditions x(0) = x
0
and x

(0) = v
0
. Then the
solution to the initial value problem is
x(t) = x
0
e
t
cos(t) + ((v
0
x
0
)/)e
t
sin(t) (3.19)
Let s
0
= (v
0
x
0
)/. Dene A(t) = e
t
_
x
2
0
+s
2
0
. Dene = tan
1
(s
0
/x
0
) if x
0
> 0; and
= tan
1
(s
0
/x
0
) + if x
0
< 0. If x
0
= 0, let = /2 if s
0
> 0; and = /2 if s
0
< 0. Then we
may rewrite the solution in the form
x(t) = A(t) cos(t ). (3.20)
Furthermore,
(a) If < 0, then x(t) oscillates about the t-axis with period 2/ and exponentially decreasing
amplitude (see Figure 3.8).
(b) If > 0, then x(t) oscillates about the t-axis with period 2/ and exponentially increasing
amplitude (see Figure 3.9).
76 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
Figure 3.8: The solution in theorem 3.5.2 for < 0 (solid curve); the dashed curves are the
amplitude functions A(t) = e
t
_
x
2
0
+s
2
0
.
6 4 2 2 4
t
x
Figure 3.9: The solution in theorem 3.5.2 for > 0 (solid curve); the dashed curves are the
amplitude functions A(t) = e
t
_
x
2
0
+s
2
0
.
6 4 2 2 4
t
x
3.5. CASE III: COMPLEX CONJUGATE ROOTS 77
Figure 3.10: The solution in theorem 3.5.2 for = 0 (solid curve); the dashed lines give the
amplitude
_
x
2
0
+s
2
0
.
2 2 4
t
x
(c) If = 0, then x(t) oscillates about the t-axis with period 2/ and xed amplitude
_
x
2
0
+s
2
0
(see Figure 3.10).
Remark 3.5.1.
(a) Theorem 3.5.2 applies only to the situation when the initial conditions are specied at t
0
= 0.
In practice, this involves no loss of generality since we can always re-dene our starting time
to be t = 0.
(b) If a = 1 in theorem 3.5.2, then the dierential equation takes the form x

2x

+(
2
+
2
)x =
0. This is because the characteristic equation can then be written as ( ( +i))( (
i)) =
2
2 +
2
+
2
.
(c) The quantity / is the phase shift of the solution. If / > 0, the graph of A(t) cos(t) is
shifted / units to the right to obtain the graph of the solution; if / < 0, the graph of
A(t) cos(t) is shifted [/[ units to the left. The phase shift is undened if both x
0
and s
0
are zero. Of course, in this case the solution is simply the zero function x = 0.
Proof. Obviously, x(t), as given in equation (3.19), satises the initial condition x(0) = x
0
. The
derivative x

(t) = e
t
v
0
cos(t) + e
t
((v
0
x
0
(
2
+
2
))/) sin(t) satises the initial condition
x

(0) = v
0
. It is straightforward to check that x(t) satises the dierential equation (use that i
are solutions to the characteristic equation).
To prove equation (3.20), rst observe that we may use polar coordinates to write
x
0
=
_
x
2
0
+s
2
0
cos (3.21)
s
0
=
_
x
2
0
+s
2
0
sin . (3.22)
It follows that we may write x(t) = e
t
_
x
2
0
+s
2
0
(cos cos(t) + sin sin(t)). Using the trigono-
metric identity cos( ) = cos cos + sin sin , x(t) becomes x(t) = e
t
_
x
2
0
+s
2
0
cos(t )
78 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
which is equation (3.20). Dividing equation (3.22) by equation (3.21) gives tan = s
0
/x
0
. Note
that = tan
1
(s
0
/x
0
) if is an angle in either quadrant I or quadrant IV; that is, if x
0
> 0.
Also, = tan
1
(s
0
/x
0
) + if is in either quadrant II or III; that is, if x
0
< 0. In the case that
x
0
= 0, the solution is x(t) = s
0
e
t
sin(t). If s
0
> 0,
_
x
2
0
+s
2
0
= s
0
and cos(t (/2)) = sin(t).
If s
0
< 0,
_
x
2
0
+s
2
0
= s
0
and cos(t + (/2)) = sin(t). Statements (a)-(c) are immediate
consequences of equation (3.20).
Example 3.5.2. Revisiting example 3.5.1, we obtain the following information about the solution
from theorem 3.5.2.
(a) x

+ 2x

+ 2x = 0, x(0) = 0, x

(0) = 1. Since = 1 i, = 1 and = 1. Also, x


0
= 0
and s
0
= (v
0
x
0
)/ = (1 (1)(0))/1 = 1. Thus,
_
x
2
0
+s
2
0
= 1, A(t) = e
t
, = /2,
and the solution expressed in the form (3.20) is
x = e
t
cos(t (/2)).
Geometrically, the solution has period 2/ = 2 and exponentially decreasing amplitude
given by A(t) = e
t
.
(b) x

4x

+ 404x = 0, x(0) = 5, x

(0) = 0. Here, = 2 20i, so = 2, = 20. The


initial conditions give x
0
= 5 and s
0
= (0 (2)(5))/20 = 1/2. Consequently, A(t) =
e
2t
_
5
2
+ (1/2)
2
= e
2t
(

101/2), = tan
1
((1/2)/5) = tan
1
(1/10), and the solution is
x = e
2t
(

101/2) cos
_
20t + tan
1
(1/10)
_
.
This is a function with exponentially increasing amplitude and period /10.
(c) x

+ 16
2
x = 0, x(0) = 2, x

(0) = 20. The eigenvalues = 4i give = 0, = 4, and


x
0
= 2, v
0
= 20 give s
0
= 5/,
_
x
2
0
+s
2
0
=

4
2
+ 25/ and = tan
1
(5/(2)). Thus
the solution is
x = (
_
4
2
+ 25/) cos
_
4t + tan
1
(5/(2))
_
.
The amplitude is A =

4
2
+ 25/ 2.56 and the period is 1/2.
3.6 Method of Undetermined Coecients
In this section, we look at dierential equations of the form
a
d
2
y
dx
2
+b
dy
dx
+cy = f(x), (3.23)
where a ,= 0. That is, we deal with non-homogeneous second-order linear dierential equations with
constant coecients. The function on the right-hand side of (3.23) is sometimes called the forcing
function. (We will see why in section 4.1.) Our rst theorem in this section shows how solutions
of the corresponding homogeneous dierential equation (3.6) are related to those of (3.23).
Theorem 3.6.1. Suppose y
h
is a solution to the homogeneous second-order linear dierential
equation with constant coecients a(d
2
y/dx
2
) +b(dy/dx) +cy = 0 (a ,= 0) and y
p
is a solution to
the non-homogeneous equation (3.23).
Then y = y
p
+y
h
is also a solution to (3.23).
3.6. METHOD OF UNDETERMINED COEFFICIENTS 79
Proof. The proof is easy: since ay

h
+by

h
+cy
h
= 0 and ay

p
+by

p
+cy
p
= f(x), y = y
p
+y
h
satises
ay

+by

+cy = a(y

p
+y

h
) +b(y

p
+y

h
) +c(y
p
+y
h
) = ay

p
+by

p
+cy
p
+ay

h
+by

h
+cy
h
= f(x) +0 =
f(x).
We have seen in the previous sections how to solve homogeneous equations and we obtained
solutions of the form y
h
= c
1
y
1
+ c
2
y
2
, c
1
, c
2
R. Theorem 3.6.1 tells us that if we can nd one
particular solution y
p
to the non-homogeneous equation, then y = y
p
+c
1
y
1
+c
2
y
2
are all solutions
to this non-homogeneous equation. Also, having two free parameters allows us to solve initial value
problems in the non-homogeneous case.
The general idea of the method of undetermined coecients is that the solution y
p
to (3.23) is
of the same kind as the forcing function f(x). For example, if f(x) is an exponential function,
then we expect that y
p
is also an exponential function; if f(x) is a polynomial function, then we
expect y
p
to be a polynomial function; etc. We will see in what follows that this idea is a good
guideline, but does not oer a complete description of how to nd a particular solution to (3.23).
Exponential Forcing
Example 3.6.1. Consider the dierential equation y

+ 5y

+ 4y = f(x).
(a) If f(x) = e
2x
, we use the trial solution y
p
= Ce
2x
. This gives 4Ce
2x
+10Ce
2x
+4Ce
2x
= e
2x
,
or 18Ce
2x
= e
2x
, that is C = 1/18. So, y
p
= (1/18)e
2x
.
(b) If f(x) = e
x
, the use of y
p
= Ce
x
fails, since e
x
is already a solution to the homogeneous
dierential equation y

+5y

+4y = 0. In this situation, we may use dierential operators to


nd another trial solution. The dierential equation takes the form (D + 4)(D + 1)y = e
x
.
Observe that then (D + 4)(D + 1)
2
y = 0; we have seen in section 3.4 that a solution to
(D+1)
2
y = 0 is y = xe
x
. This solution has the property that (D+1)y = e
x
, just what we
require. Consequently, we use the trial solution y
p
= Cxe
x
. Since y

p
= Ce
x
Cxe
x
and
y

p
= 2Ce
x
+Cxe
x
, this gives 2Ce
x
+Cxe
x
+ 5Ce
x
5Cxe
x
+ 4Cxe
x
= e
x
, or
C = 1/3. The particular solution is y
p
= (x/3)e
x
.
By nding all solutions to the homogeneous dierential equation, as well as a particular solution
to the non-homogeneous equation, we may solve initial value problems for the non-homogeneous
equation.
Example 3.6.2. Consider the dierential equation y

+ 4y

+ 4y = f(x). Its characteristic equation


is ( + 2)
2
= 0, so y
h
= c
1
e
2x
+c
2
xe
2x
.
(a) Suppose f(x) = 3e
5x
, and the initial conditions are y(0) = 1, y

(0) = 1.
Since = 5 is not a solution to the characteristic equation, we use the trial solution y
p
=
Ce
5x
. This gives 25Ce
5x
20Ce
5x
+4Ce
5x
= 3e
5x
, so C = 1/3. Then y
p
= (1/3)e
5x
and y = (1/3)e
5x
+ c
1
e
2x
+ c
2
xe
2x
. The derivative is y

= (5/3)e
5x
2c
1
e
2x
+
c
2
e
2x
2c
2
xe
2x
. Using y(0) = 1 and y

(0) = 1 gives (1/3) + c


1
= 1, so c
1
= 2/3; and
(5/3)2(2/3)+c
2
= 1, so c
2
= 2. The solution to the initial value problem is consequently
y = (1/3)e
5x
+ (2/3)e
2x
+ 2xe
2x
.
(b) Suppose f(x) = 4e
2x
, and the initial conditions are y(0) = 2, y

(0) = 0.
80 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
In this case = 2 is a solution to the characteristic equation, and it is in fact a solution
of multiplicity 2. This means we should use the trial solution y
p
= Cx
2
e
2x
. Then y

p
=
2Cxe
2x
2Cx
2
e
2x
, and y

p
= 2Ce
2x
8Cxe
2x
+ 4Cx
2
e
2x
. The dierential equation
becomes Ce
2x
(2 8x + 4x
2
+ 8x 8x
2
+ 4x
2
) = 4e
2x
, which simplies to 2C = 4, or
C = 2. Hence y
p
= 2x
2
e
2x
, and y = 2x
2
e
2x
+ c
1
e
2x
+ c
2
xe
2x
. Its derivative is
y

= 4x
2
e
2x
4xe
2x
2c
1
e
2x
+ c
2
e
2x
2c
2
xe
2x
. Using y(0) = 2 and y

(0) = 0 yields
c
1
= 2 and c
2
= 4. The solution to the initial value problem is y = 2x
2
e
2x
+2e
2x
+4xe
2x
.
The previous two examples suggest the following general approach is we have an exponential
forcing function. Note that when solving an initial value problem, we need to rst nd the parameter
involved in the trial solution, and then determine the constants associated with the general solution
to the homogeneous dierential equation.
Method of Undetermined Coecients for Exponential Forcing Functions
If the dierential equation is of the form ay

+by

+cy = de
x
, then use:
the trial solution y
p
= Ce
x
if is not a solution to the characteristic equation a
2
+b+c = 0;
the trial solution y
p
= Cxe
x
if is a solution, but not a repeated solution, to the characteristic
equation a
2
+b +c = 0;
the trial solution y
p
= Cx
2
e
x
if is a repeated solution to the characteristic equation
a
2
+b +c = 0.
In short, if the multiplicity of is m, then the trial solution is y
p
= Cx
m
e
x
.
Polynomial Forcing
If the right-hand side of a dierential equation of the form ay

+ by

+ cy = f(x) is a polynomial
function of degree d, then it stands to reason that the trial solution for y
p
should also be a polynomial
function, and with the same degree as f(x). This is because taking a second derivative of a
polynomial function decreases its degree, and so the largest degree on the left-hand side would be
the degree of y
p
, which must equal the degree of the right-hand side. We will see in the following
examples that this works as intended, unless = 0 is a solution to the characteristic equation.
Example 3.6.3. Find solutions of the form y = y
p
+y
h
for each dierential equation.
(a) y

5y

+ 4y = x
2
x. The characteristic equation has solutions = 1 and = 4, so
y
h
= c
1
e
x
+ c
2
e
4x
. We use the trial solution y
p
= A
2
x
2
+ A
1
x + A
0
. Then y

p
= 2A
2
x + A
1
and y

p
= 2A
2
. The dierential equation gives 2A
2
10A
2
x 5A
1
+ 4A
2
x
2
+ 4A
1
x + 4A
0
=
(4A
2
)x
2
+ (10A
2
+ 4A
1
)x + (2A
2
5A
1
+ 4A
0
) = x
2
x. Comparing coecients gives
4A
2
= 1, so A
2
= 1/4; (10/4) + 4A
1
= 1, so A
1
= 3/8; and (2/4) (15/8) + 4A
0
= 0, so
A
0
= 11/32. This yields the particular solution y
p
= (x
2
/4) + (3x/8) + (11/32).
(b) y

3y

= 2 + 2x 3x
2
. The characteristic equation has solutions = 0 and = 3,
so y
h
= c
1
+ c
2
e
3x
. Since any constant function is already a solution to the homogeneous
dierential equation, we try solutions of the form y
p
= A
3
x
3
+ A
2
x
2
+ A
1
x. (We need three
coecients since the left-hand side has three coecients.) Then y

p
= 3A
3
x
2
+ 2A
2
x + A
1
3.6. METHOD OF UNDETERMINED COEFFICIENTS 81
and y

p
= 6A
3
x + 2A
2
. The dierential equation gives 6A
3
x + 2A
2
9A
3
x
2
6A
2
x 3A
1
=
(9A
3
)x
2
+ (6A
3
6A
2
)x + (2A
2
3A
1
) = 3x
2
+ 2x + 2. Comparing coecients gives
A
3
= 1/3, A
2
= 0 and A
1
= 2/3. This yields the particular solution y
p
= (1/3)x
3
(2/3)x.
Note that we could alternatively have integrated both sides of the dierential equation y

3y

= 2+2x3x
2
to obtain y

3y = 2x+x
2
x
3
+c
1
. We can solve the resulting rst-order
linear dierential equation by using the integrating-factor method.
(c) 5y

= x
4
1. The characteristic equation is 5
2
= 0, so = 0 is a solution with multiplicity 2,
and y
h
= c
1
+c
2
x. In this situation, the trial solution y
p
= A
6
x
6
+A
5
x
5
+A
4
x
4
+A
3
x
2
+A
2
x
2
will work. However, it is much easier to simply integrate 5y

= x
4
1 twice: we obtain
5y

= (x
5
/5) x +c
2
and 5y = (x
6
/30) (x
2
/2) +c
2
x +c
1
. So, y
p
= (x
6
/150) (x
2
/10).
Method of Undetermined Coecients for Polynomial Forcing Functions
If the dierential equation is of the form ay

+by

+cy = p(x), where p(x) is a polynomial function


of degree d, then use:
the trial solution y
p
= A
d
x
d
+ A
d1
x
d1
+ . . . + A
1
x + A
0
if = 0 is not a solution to the
characteristic equation;
the trial solution y
p
= A
d+1
x
d+1
+ A
d
x
d
+ . . . + A
1
x if = 0 is a simple solution to the
characteristic equation;
the trial solution y
p
= A
d+2
x
d+2
+ A
d+1
x
d+1
+ . . . + A
2
x
2
if = 0 is a repeated solution to
the characteristic equation.
Sinusoidal Forcing
A sinusoidal function is a function of the form y = A
1
cos(Bx)+A
2
sin(Bx). True to the philosophy
of the method of undetermined coecients, as it appeared above, if the right-hand side f(x) of an
equation of the form ay

+ by

+ cy = f(x) is a sinusoidal function, then so should be the trial


solution. We expect this approach to work unless the trial solution is already a solution to the
corresponding homogeneous equation. In that case, a multiplication by the independent variable
is called for. The following example illustrates this.
Example 3.6.4. Find solutions of the form y = y
p
+y
h
for each dierential equation.
(a) y

2y

+ 5y = 4 cos(3x). The characteristic equation has solutions = 1 2i, so


y
h
= c
1
e
x
cos(2x) + c
2
e
x
sin(2x). The trial solution is y
p
= A
1
cos(3x) + A
2
sin(3x). Note
that both a cosine and a sine term are used, although there is only a cosine on the right-
hand side of the dierential equation. This is because the derivative of a sine is a cosine,
so cos(3x) and sin(3x) are in the same class as far as dierentiation is concerned. Then
y

p
= 3A
1
sin(3x) +3A
2
cos(3x) and y

p
= 9A
1
cos(3x) 9A
2
sin(3x). The dierential equa-
tion gives 9A
1
cos(3x)9A
2
sin(3x)+6A
1
sin(3x)6A
2
cos(3x)+5A
1
cos(3x)+5A
2
sin(3x) =
4 cos(3x). After combining like terms, cos(3x)(4A
1
6A
2
) + sin(3x)(6A
1
4A
2
) =
4 cos(3x). Comparing coecients gives the system of linear equations
4A
1
6A
2
= 4
6A
1
4A
2
= 0
82 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
which yields A
1
= 4/13 and A
2
= 6/13. The particular solution is y
p
= (4/13) cos(3x) +
(6/13) sin(3x).
(b) y

+ 4y = 5 cos(2x) sin(2x). The characteristic equation has solutions = 2i, so y


h
=
c
1
cos(2x) + c
2
sin(2x). Since the right-hand side is contained in y
h
, we must use the trial
solution y
p
= A
1
xcos(2x)+A
2
xsin(2x). Then y

p
= cos(2x)(2A
2
x+A
1
)+sin(2x)(2A
1
x+A
2
)
and y

p
= cos(2x)(4A
1
x + 4A
2
) + sin(2x)(4A
2
x 4A
1
). The dierential equation gives
4A
2
cos(2x) 4A
1
sin(2x) = 5 cos(2x) sin(2x). Comparing coecients gives A
1
= 1/4 and
A
2
= 5/4. The particular solution is y
p
= (1/4)xcos(2x) + (5/4)xsin(2x).
Combinations of Forcing Functions
The following theorem generalizes the results on the individual forcing functions studied above. Its
proof is somewhat tedious and consequently omitted.
Theorem 3.6.2. Suppose the forcing function f(x) of the second-order linear dierential equa-
tion with constant coecients ay

+ by

+ cy = f(x), a ,= 0, is of the form p(x)e


x
cos(x) +
q(x)e
x
sin(x), where p(x) and q(x) are polynomial functions. Then a particular solution y
p
has
the form
y
p
= x
m
(A
0
+A
1
x + +A
n
x
n
)e
x
cos(x) +x
m
(B
0
+B
1
x + +B
n
x
n
)e
x
sin(x), (3.24)
where m is the multiplicity of + i as a solution to the characteristic equation (m = 0 if + i
is not a solution); and n is the larger of the degrees of the polynomial functions p(x) and q(x).
The next theorem, sometimes called the principle of superposition, shows us how to deal with
forcing functions that are sums of functions of the form given in theorem (3.6.2).
Theorem 3.6.3. If y
p,1
is a solution to the dierential equation ay

+by

+cy = f
1
(x) and if y
p,2
is a solution to the dierential equation ay

+by

+cy = f
2
(x), then y
p,1
+y
p,2
is a solution to the
dierential equation ay

+by

+cy = f
1
(x) +f
2
(x).
Proof. The result follows immediately from observing that (y
p,1
+ y
p,2
)

= y

p,1
+ y

p,2
and (y
p,1
+
y
p,2
)

= y

p,1
+y

p,2
.
Example 3.6.5. For each dierential equation, set up solutions of the form given in equation (3.24).
(a) x

+ 2x

+ 10x = (3t
3
2t + 5)e
t
cos(3t) t
2
e
t
sin(3t). The characteristic equation has
solutions = 1 3i, which correspond to the sinusoidal factors e
t
cos(3t) and e
t
sin(3t)
on the right-hand side. Thus, m = 1. Since then highest degree of the polynomial factor is
three, we have n = 3, the trial solution will take the form
x
p
= t(A
0
+A
1
t +A
2
t
2
+A
3
t
3
)e
t
cos(3t) +t(B
0
+B
1
t +B
2
t
2
+B
3
t
3
)e
t
sin(3t).
(b) 4x

4x

+x = t
3
e
t/2
+e
t/2
cos t. Here, = 1/2 is a zero of multiplicity m = 2, which means
the rst term has the corresponding trial solution t
2
(A
0
+A
1
t +A
2
t
2
+A
3
t
3
)e
t/2
. The second
term has trial solution B
0
e
t/2
cos t +C
0
e
t/2
sin t. According to the principle of superposition,
the overall trial solution is
t
2
(A
0
+A
1
t +A
2
t
2
+A
3
t
3
)e
t/2
+B
0
e
t/2
cos t +C
0
e
t/2
sin t.
3.7. HIGHER-ORDER LINEAR EQUATIONS WITH CONSTANT COEFFICIENTS 83
Note that the factor t
2
does not appear in the second trial solution, since = (1/2) +i is not
a solution to the characteristic equation.
(c) x

= t
3
1 + t
2
e
t
5te
2t
sin(3t). The characteristic equation is
2
= 0, so =
0 and = 1 are solutions. The particular solution corresponding to the term t
3
1 is
t(A
0
+A
1
t +A
2
t
2
+A
3
t
3
) ( = = 0, m = 1, n = 3 in theorem 3.6.2); the particular solution
for t
2
e
t
is t(B
0
+B
1
t+B
2
t
2
)e
t
( = 1, = 0, m = 1, n = 2 in theorem 3.6.2); for 5te
2t
sin(3t),
the particular solution is (C
0
+C
1
t)e
2t
cos(3t) + (D
0
+D
1
t)e
2t
sin(3t) ( = 2, = 3, m = 0,
n = 1). The overall particular solution is composed of the sum of these particular solutions.
3.7 Higher-Order Linear Equations with Constant Coecients
In this section, we will generalize methods for solving second-order linear dierential equations with
constant coecients, both homogeneous and non-homogeneous, to dierential equations of higher
order. The relevant theorems are given here. The proofs are straightforward generalizations of the
corresponding proofs in section 3.6.
The theorems in this section refer either to homogeneous n-th order equations
a
n
d
n
y
dx
n
+a
n
d
n1
y
dx
n1
+. . . +a
1
dy
dx
+a
0
y = 0, (3.25)
or to the corresponding non-homogeneous version
a
n
d
n
y
dx
n
+a
n
d
n1
y
dx
n1
+. . . +a
1
dy
dx
+a
0
y = f(x). (3.26)
The following theorem provides a higher-order analogue to theorems 3.2.1, 3.3.1, 3.4.1, and
3.5.1.
Theorem 3.7.1. Consider the homogeneous n-order linear dierential equation with constant co-
ecients (3.25) where a
n
,= 0. The characteristic equation
a
n

n
+a
n1

n1
+. . . +a
1
+a
0
= 0, (3.27)
has the (real or complex) solutions
1
,
2
, . . . ,
n
. Then each of the functions y = e

i
x
, i =
1, 2, . . . , n is a solution to (3.25). In addition:
(a) If is a real zero with multiplicity m, then y = e
x
, xe
x
, . . . , x
m1
e
x
are solutions to the
dierential equation (3.25).
(b) If = i, ,= 0, is a pair of complex conjugate zeros with multiplicity m, then y =
e
x
cos(x), e
x
sin(x), xe
x
cos(x), xe
x
sin(x), . . . , x
m1
e
x
cos(x), x
m1
e
x
sin(x) are
solutions to the dierential equation (3.25).
If y
1
, y
2
, . . . , y
n
is the full set of distinct solutions in (a) and (b) above, then for any choice of
real numbers c
1
, c
2
, . . . , c
n
, the function y = c
1
y
1
+c
2
y
2
+. . . +c
n
y
n
is a solution to (3.25).
Furthermore, these numbers are uniquely determined by initial conditions of the form
y(x
0
) = y
0
, y

(x
0
) = y
1
, . . . , y
(n1)
(x
0
) = y
n1
. (3.28)
84 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
Theorem 3.6.1, theorem 3.6.2 (method of undetermined coecients) and theorem 3.6.3 (principle
of superposition) now take the following form.
Theorem 3.7.2. (1) If y
h
is a solution to the homogeneous equation (3.25) and y
p
is a solution
to the non-homogeneous equation (3.26), then y = y
p
+y
h
is also a solution to (3.26).
(2) Suppose the forcing function f(x) in (3.26) of the form p(x)e
x
cos(x) + q(x)e
x
sin(x),
where p(x) and q(x) are polynomial functions. Then a particular solution y
p
has the form
y
p
= x
m
(A
0
+A
1
x+ +A
n
x
n
)e
x
cos(x) +x
m
(B
0
+B
1
x+ +B
n
x
n
)e
x
sin(x), (3.29)
where m is the multiplicity of + i as a solution to the characteristic equation (m = 0 if
+ i is not a solution); and n is the larger of the degrees of the polynomial functions p(x)
and q(x).
(3) If y
p,1
is a solution to the dierential equation a
n
y
(n)
+a
n1
y
(n1)
+. . . a
1
y

+a
0
y = f
1
(x) and
if y
p,2
is a solution to the dierential equation a
n
y
(n)
+ a
n1
y
(n1)
+ . . . a
1
y

+ a
0
y = f
2
(x),
then y
p,1
+y
p,2
is a solution to the dierential equation a
n
y
(n)
+a
n1
y
(n1)
+. . . a
1
y

+a
0
y =
f
1
(x) +f
2
(x).
Example 3.7.1. Consider the initial value problem
x

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

(0) = 0, x

(0) = 1. (3.30)
We rst look at the corresponding homogeneous dierential equation x

+x = 0, whose
characteristic equation is
3

2
+ 1 = (
2
1)( 1) = ( + 1)( 1)
2
= 0. Using part (a)
of theorem 3.7.1, we obtain the solution x
h
= c
1
e
t
+c
2
e
t
+c
3
te
t
.
By the method of undetermined coecients, the trial solution for the term e
t
is x
p
= At
2
e
t
since = 1 has multiplicity 2 in the characteristic equation; the trial solution for e
t
is x
p
= Bte
t
since = 1 has multiplicity 2; and the trial solution for t
2
is x
p
= C
0
+ C
1
t + C
2
t
2
since = 0 is
not a solution to the characteristic equation. Using the principle of superposition, the overall trial
solution, and its rst, second and third derivatives, are of the form:
x
p
= At
2
e
t
+Bte
t
+C
0
+C
1
t +C
2
t
2
,
x

p
= At
2
e
t
+ 2Ate
t
Bte
t
+Be
t
+C
1
+ 2C
2
t,
x

p
= At
2
e
t
+ 4Ate
t
+ 2Ae
t
+Bte
t
2Be
t
+ 2C
2
,
x

p
= At
2
e
t
+ 6Ate
t
+ 6Ae
t
Bte
t
+ 3Be
t
.
Using the dierential equation, and equating like terms yields the following equations.
6Ae
t
2Ae
t
= e
t
3Be
t
+ 2Be
t
Be
t
= e
t
C
2
t
2
= t
2
2C
2
t +C
1
t = 0
2C
2
C
1
+C
0
= 0
3.8. THE STRUCTURE OF THE SOLUTION SPACE FOR LINEAR EQUATIONS 85
Note that the terms containing t
2
e
t
, te
t
and te
t
automatically cancel out; that is, result in
identities of the form 0 = 0. The equations above give A = 1/4, B = 1/4, C
2
= 1, C
1
= 2 and
C
0
= 4, so a particular solution is x
p
= (t
2
/4)e
t
(t/4)e
t
+t
2
+ 2t + 4.
Now, we need to use the initial conditions to determine the constants c
1
, c
2
, c
3
in the solution
x = (t
2
/4)e
t
(t/4)e
t
+t
2
+ 2t + 4 +c
1
e
t
+c
2
e
t
+c
3
te
t
.
Taking rst and second derivatives gives
x

= ((t
2
/4) + (t/2))e
t
+ ((t/4) (1/4))e
t
+ 2t + 2 c
1
e
t
+ (c
2
+c
3
)e
t
+c
3
te
t
x

= ((t
2
/4) + (3t/4) + (1/2))e
t
+ ((t/4) + (1/2))e
t
+ 2 +c
1
e
t
+ (c
2
+ 2c
3
)e
t
+c
3
te
t
.
Using x(0) = 1, x

(0) = 0, x

(0) = 1 yields the linear equations 4 + c


1
+ c
2
= 1, (1/4) + 2
c
1
+c
2
+c
3
= 0, and (1/2) + (1/2) + 2 +c
1
+c
2
+ 2c
3
= 1. The solutions to these equations are
c
1
= 7/8, c
2
= 17/8, and c
3
= 1/2. Consequently, the solution to the initial value problem is
x = (t
2
/4)e
t
(t/4)e
t
+t
2
+ 2t + 4 (7/8)e
t
(17/8)e
t
(1/2)te
t
.
Example 3.7.2. Find the general form of solutions for each dierential equation.
(a) x
(4)
16x = cos(2t) + e
2t
e
2t
sin(2t). The characteristic equation is
4
16 = (
2

4)(
2
+ 4) = ( 2)( + 2)( 2i)( + 2i) = 0. Solutions to the homogeneous equation
are consequently of the form y
h
= c
1
e
2t
+ c
2
e
2t
+ c
3
cos(2t) + c
4
sin(2t). Using the method
of undetermined coecients, a particular solution will be of the form y
p
= A
1
t cos(2t) +
A
2
t sin(2t) +Bte
2t
+C
1
e
2t
cos(2t) +C
2
e
2t
sin(2t).
(b) x
(5)
+2x

+x

= 3 sin tt+4e
2t
. The characteristic equation is
5
+2
3
+ = (
4
+2
2
+1) =
(
2
+ 1)
2
= ( i)
2
( +i)
2
= 0. Solutions to the homogeneous equation are consequently
of the form y
h
= c
1
+c
2
cos t +c
3
sin t +c
4
t cos t +c
5
t sin t. Using the method of undetermined
coecients, a particular solution will be of the form y
p
= A
1
t
2
cos t +A
2
t
2
sin t +B
1
t +B
2
t
2
+
Ce
2t
.
3.8 The Structure of the Solution Space for Linear Equations
In this section, we investigate the general structure of the solutions to n-th order linear dierential
equations (homogeneous and non-homogeneous). In particular, the coecients of the equations
studied here are not assumed to be constant. That is, we consider equations of the form
a
n
(x)
d
n
y
dx
n
+a
n1
(x)
d
n1
y
dx
n1
+. . . +a
2
(x)
d
2
y
dx
2
+a
1
(x)
dy
dx
+a
0
(x)y = 0 (3.31)
(homogeneous case), or
a
n
(x)
d
n
y
dx
n
+a
n1
(x)
d
n1
y
dx
n1
+. . . +a
2
(x)
d
2
y
dx
2
+a
1
(x)
dy
dx
+a
0
(x)y = f(x) (3.32)
(non-homogeneous case), where a
n
(x) is not identically zero. Our rst result concerns the question
of existence and uniqueness of solutions. We will not provide a proof for this theorem, for the same
reasons as in the case of the existence and uniqueness theorem for general rst-order equations
(theorem 1.8.1).
86 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
Theorem 3.8.1. Suppose the coecient functions a
n
(x), a
n1
(x), . . . , a
1
(x), a
0
(x) and the right-
hand side f(x) in equation (3.32) are all continuous at x
0
, and suppose a
n
(x
0
) ,= 0. Then for any
choice of y
0
, y
1
, . . . , y
n1
, the initial value problem
a
n
(x)y
(n)
+. . . +a
1
(x)y

+a
0
(x)y = f(x), y(x
0
) = y
0
, y

(x
0
) = y
1
, . . . , y
(n1)
(x
0
) = y
n1
(3.33)
has a unique solution which is dened on some open interval containing x
0
.
The following theorem asserts that solutions to a homogeneous linear equation form a vector
space, and that solutions to a non-homogeneous linear equation form an ane space.
Theorem 3.8.2. If y
1
and y
2
are solutions to the homogeneous equation (3.31) and r, s R,
then ry
1
+ sy
2
is also a solution to the homogeneous equation. If y
p
is a solution to the non-
homogeneous equation (3.32) and y
h
is a solution to the homogeneous equation (3.31), then y
p
+y
h
is also a solution to the non-homogeneous equation.
Proof. Both statements follow from the fact that dierentiation is a linear operator. More explicitly,
a
n
(x)(ry
1
+sy
2
)
(n)
+a
n1
(x)(ry
1
+sy
2
)
(n1)
+. . .+a
1
(x)(ry
1
+sy
2
)

+a
0
(x)(ry
1
+sy
2
) = r(a
n
(x)y
(n)
1
+
a
n1
(x)y
(n1)
1
+. . . +a
1
(x)y

1
+a
0
(x)y
1
) +s(a
n
(x)y
(n)
2
+a
n1
(x)y
(n1)
2
+. . . +a
1
(x)y

2
+a
0
(x)y
2
) =
r0+s0 = 0. Also, a
n
(x)(y
p
+y
h
)
(n)
+a
n1
(x)(y
p
+y
h
)
(n1)
+. . .+a
1
(x)(y
p
+y
h
)

+a
0
(x)(y
p
+y
h
) =
(a
n
(x)y
(n)
p
+a
n1
(x)y
(n1)
p
+. . . +a
1
(x)y

p
+a
0
(x)y
p
) +(a
n
(x)y
(n)
h
+a
n1
(x)y
(n1)
h
+. . . +a
1
(x)y

h
+
a
0
(x)y
h
) = f(x) + 0 = f(x).
The next theorem states that solutions to a homogeneous n-th order linear equation form an
n-dimensional vector space. In particular, this theorem gives us more concrete information how
the unique solution in theorem 3.8.1 looks like.
Theorem 3.8.3. Suppose the coecient functions a
n
(x), a
n1
(x), . . . , a
1
(x), a
0
(x) in equation (3.31)
are all continuous at x
0
, and suppose a
n
(x
0
) ,= 0.
Then there exist n linearly independent solution functions y
1
, y
2
, . . . , y
n
, dened on some open
set containing x
0
, to the n-th order linear homogeneous equation (3.31); and any solution to (3.31)
can be written uniquely as a linear combination y = c
1
y
1
+c
2
y
2
+. . . c
n
y
n
.
Proof. Let y
i
be the, according to theorem 3.8.1, unique solution to (3.31) subject to the initial
values
y
i
(x
0
) = 0, y

i
(x
0
) = 0, . . . , y
(i2)
i
(x
0
) = 0, y
(i1)
i
(x
0
) = 1, y
(i)
i
(x
0
) = 0, . . . , y
(n1)
i
(x
0
) = 0.
That is, the (i 1)-st derivative of y
i
at x
0
is 1, all others are zero. If y is an arbitrary solution
to the homogeneous equation, let c
1
= y(x
0
), c
2
= y

(x
0
), . . . c
n
= y
(n1)
(x
0
). Then we claim that
y = y, where y = c
1
y
1
+c
2
y
2
+. . . +c
n
y
n
.
To see this, observe that y(x
0
) = c
1
y
1
(x
0
)+c
2
y
2
(x
0
)+. . . +c
n
y
n
(x
0
) = c
1
1+c
2
0+. . . +c
n
0 =
c
1
= y(x
0
). Also, y

(x
0
) = c
1
y

1
(x
0
)+c
2
y

2
(x
0
)+. . .+c
n
y

n
(x
0
) = c
1
0+c
2
1+. . .+c
n
0 = c
2
= y

(x
0
).
In general, we have that y
(i)
(x
0
) = y
(i)
(x
0
) for i = 0, 1, . . . , n1. Using the uniqueness of solutions
in theorem 3.8.1, this means y = y.
So far, we have shown that the functions y
1
, y
2
, . . . y
n
span the solution space to the homogeneous
dierential equation (3.31). To see that they are linearly independent, we need to show that if
c
1
y
1
+ c
2
y
2
+ . . . c
n
y
n
= 0, then c
1
= c
2
= . . . = c
n
= 0. (Then these functions constitute a basis
3.8. THE STRUCTURE OF THE SOLUTION SPACE FOR LINEAR EQUATIONS 87
of the solution space.) Suppose now that c
1
y
1
(x) + c
2
y
2
(x) + . . . c
n
y
n
(x) = 0. If we substitute in
x = x
0
, and use that y
1
(x
0
) = 1, and y
i
(x
0
) = 0 for i = 2, 3, . . . , n, we get c
1
= 0. Then, we take
the rst derivative, and evaluate at x = x
0
: c
2
y

2
(x
0
) +c
3
y

3
(x) +. . . c
n
y

n
(x) = 0. Since y

2
(x
0
) = 1
and y

i
(x
0
) = 0 all all other is, c
2
= 0. By taking further derivatives and substituting in x = x
0
,
we obtain c
1
= c
2
= . . . = c
n
= 0.
Remark 3.8.1. A solution of the form y
h
= c
1
y
1
+c
2
y
2
+. . . c
n
y
n
to the n-th order linear homogeneous
equation (3.31) with y
1
, y
2
, . . . , y
n
linearly independent function is called a general solution to (3.31).
To check for linear independence of functions, we may use the criterion given in lemma 3.8.1
below. To state its result, we need the following denition.
Denition 3.8.1. Let
1
,
2
, . . . ,
n
be functions. Then we dene the Wronskian determinant (or
simply the Wronskian) of these functions as
W(
1
,
2
, . . . ,
n
) = det
_
_
_
_
_

1

2

n

n
.
.
.
.
.
.
.
.
.

(n1)
1

(n1)
2

(n1)
n
_
_
_
_
_
. (3.34)
Lemma 3.8.1. Suppose the Wronskian of the functions
1
,
2
, . . . ,
n
is non-zero at some value
x
0
. Then the functions are linearly independent.
Proof. Suppose W(
1
,
2
, . . . ,
n
)(x
0
) ,= 0 and c
1

1
+ c
2

2
+ . . . + c
n

n
= 0 for c
1
, c
2
, . . . , c
n
R.
We need to show that c
1
= c
2
= . . . = c
n
= 0. Taking derivatives and evaluating at x
0
, we obtain
the following equations.
c
1

1
(x
0
) +c
2

2
(x
0
) +. . . +c
n

n
(x
0
) = 0
c
1

1
(x
0
) +c
2

2
(x
0
) +. . . +c
n

n
(x
0
) = 0
.
.
.
.
.
.
c
1

(n1)
1
(x
0
) +c
2

(n1)
2
(x
0
) +. . . +c
n

(n1)
n
(x
0
) = 0
This is a linear system with the unknowns c
1
, c
2
, . . . , c
n
and coecient matrix (
(i)
j
)
i=0,...,n1;j=1,...,n
.
The determinant of this matrix is the Wronskian W(
1
,
2
, . . . ,
n
)(x
0
), which is non-zero. So the
linear system has a unique solution, namely c
1
= c
2
= . . . = c
n
= 0.
Example 3.8.1. Consider the functions
1
(t) = 1,
2
(t) = t,
3
(t) = t
2
,
4
(t) = t
3
, . . . ,
n
(t) = t
n1
for xed n. The Wronskian is
W(
1
,
2
, . . . ,
n
)(t) = det
_
_
_
_
_
_
_
1 t t
2
t
3
t
n1
0 1 2t 3t
2
(n 1)t
n2
0 0 2 6t (n 1)(n 2)t
n3
.
.
.
.
.
.
.
.
.
.
.
.
0 0 0 0 (n 1)!
_
_
_
_
_
_
_
= 0!1!2!3! (n1)! ,= 0,
because the determinant of an upper triangular matrix is the product of the diagonal entries. Hence
the functions are linearly independent.
88 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
Example 3.8.2. Consider the functions
1
(t) = e

1
t
,
2
(t) = e

2
t
, . . . ,
n
(t) = e
nt
for xed n and
distinct real or complex values
1
,
2
, . . . ,
n
. The Wronskian is
W(
1
,
2
, . . . ,
n
)(t) = det
_
_
_
_
_
_
_
e

1
t
e

2
t
e
nt

1
e

1
t

2
e

2
t

n
e
nt

2
1
e

1
t

2
2
e

2
t

2
n
e
nt
.
.
.
.
.
.
.
.
.

n1
1
e

1
t

n1
2
e

2
t

n
n1
e
nt
_
_
_
_
_
_
_
.
If t = 0, the Wronskian is the determinant of the the Vandermonde matrix
_
_
_
_
_
_
_
1 1 1

1

2

n

2
1

2
2

2
n
.
.
.
.
.
.
.
.
.

n1
1

n1
2

n1
n
_
_
_
_
_
_
_
.
Its determinant is

1i<jn
(
j

i
) (see example B.2.3 in appendix B.) Since the
i
are distinct,
the determinant is non-zero, and the functions are linearly independent.
Returning to linear equations with constant coecients, we can now prove that the solutions
listed in parts (a) and (b) of theorem 3.7.1 form a basis of the solution space.
Theorem 3.8.4. Consider the homogeneous n-th order linear dierential equation with constant
coecients a
n
y
(n)
+a
n1
y
(n1)
+. . . +a
1
y

+a
0
y = 0 where a
n
,= 0. If the characteristic equation
has the (real or complex) solutions
1
,
2
, . . . ,
n
, counted with multiplicity, then the following set
of functions forms a basis for the solution space of this dierential equation.
(a) y = e
x
, xe
x
, . . . , x
m1
e
x
in the case that is a real zero with multiplicity m;
(b) y = e
x
cos(x), e
x
sin(x), xe
x
cos(x), xe
x
sin(x), . . . , x
m1
e
x
cos(x), x
m1
e
x
sin(x)
in the case that = i, ,= 0 is a pair of complex conjugate zeros with multiplicity m.
This theorem can be proven by showing that the Wronskian is non-zero at, e.g., x = 0. This
proof requires calculations similar to the ones in examples 3.8.1 and 3.8.2; it is, however, more
technical and we omit it (but see exercise 3.8).
3.9 Mathematica Use
Solving dierential equations and initial value problems was already discussed in section 1.10. Here,
we mention two methods that might be useful in bringing the solution to a dierential equation in
a more manageable form: Expand and TrigReduce.
Example 3.9.1. When solving the dierential equation in part (b) of example 3.6.1, the algebraic
result is return in factored form.
DSolvey''x 5 y'x 4 yx Expx, yx, x
yx
1
9

x
1 3 x
4 x
C1
x
C2
3.10. EXERCISES 89
This can be changed by applying Expand to the expression.
ExpandDSolvey''x 5 y'x 4 yx Expx, yx, x
yx

x
9

x
x
3

4 x
C1
x
C2
Example 3.9.2. Similarly, Mathematica sometimes returns trigonometric expressions in a rather
idiosyncratic form. For instance, the dierential equation in example 3.6.4, part (a) is evaluated as
follows.
DSolvey''x 2 y'x 5 yx 4 Cos3 x, yx, x
yx
x
C2 Cos2 x
x
C1 Sin2 x
1
26
13 Cosx Cos2 x 5 Cos2 x Cos5 x 13 Cos2 x Sinx 13 Cosx Sin2 x
Cos5 x Sin2 x 13 Sinx Sin2 x Cos2 x Sin5 x 5 Sin2 x Sin5 x
Applying TrigReduce simplies this expression.
TrigReduceDSolvey''x 2 y'x 5 yx 4 Cos3 x, yx, x
yx
1
13
13
x
C2 Cos2 x 4 Cos3 x 13
x
C1 Sin2 x 6 Sin3 x
Finally, Expand distributes the constant factor.
ExpandTrigReduceDSolvey''x 2 y'x 5 yx 4 Cos3 x, yx, x
yx
x
C2 Cos2 x
4
13
Cos3 x
x
C1 Sin2 x
6
13
Sin3 x
Note that in both these examples, the solution parameters appear as C[1] and C[2].
3.10 Exercises
Exercise 3.1. Find a solution to each of the following initial value problems.
(a) x

7x

+ 6x = 0, x(0) = 1, x

(0) = 1
(b) x

+x

2x = 0, x(0) = 0, x

(0) = 1
(c) 5x

= 0, x(1) = 0, x

(1) = 1
(d) 9x

12x

+ 4x = 0, x(0) = 1, x

(0) = 0
(e) x

+ 25x = 0, x(0) = 4, x

(0) = 0
90 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
(f) 4x

+ 4x

+ 5x = 0, x(0) = 2, x

(0) = 3
(g) x

+x = 0, x(0) = 1, x

(0) = 0, x

(0) = 1
Exercise 3.2. Find a solution to each of the following initial value problems.
(a) y

5y

14y = 0, y(0) = 1, y

(0) = 3
(b) y

4y

= 0, y(0) = 1, y

(0) = 2
(c) 2y

5y

3y = 0, y(1) = 0, y

(1) = 1
(d) y

2y

+y = 0, y(0) = 2, y

(0) = 1
(e) 4y

+ 81y = 0, y(0) = 1, y

(0) = 2
(f) y

+ 4y

+ 53y = 0, y(0) = 1, y

(0) = 3
(g) y

20y

= 0, y(0) = 1, y

(0) = 1, y

(0) = 1
(h) 4y

8y

+ 21y

17y = 0, y(0) = 0, y

(0) = 1, y

(0) = 0
Exercise 3.3. Find the general solution x
h
to each of the following homogeneous linear equations.
(a) x

+ 4x

+ 4x = 0
(b) x

+ 4x

+ 5x = 0
(c) x

3x

+ 3x

x = 0
(d) x
(4)
+ 8x

+ 16x = 0
(e) 8x

+ 10x

3x = 0
(f) 81x

18x

+ 2x = 0
(g) x

+ 4x

3x

18x = 0
(h) x
(4)
4x

+ 6x

4x

+ 5x = 0
Exercise 3.4. Find a homogeneous linear equation that has the given general solution.
(a) y
h
= c
1
cos(5x) +c
2
sin(5x)
(b) y
h
= c
1
e
x
cos(x/2) +c
2
e
x
sin(x/2)
(c) y
h
= c
1
e
3x
+c
2
e
x
+c
3
xe
x
(d) y
h
= c
1
e
2x
+c
2
+c
3
x +c
4
x
2
Exercise 3.5. Find a particular solution x
p
to each of the dierential equations.
(a) x

7x

+ 6x = 3 sin(2t)
3.10. EXERCISES 91
(b) 5x

= t
2
4
(c) 9x

12x

+ 4x = e
2t/3
(d) x

+ 25x = 2 cos(5t) sin(5t)


(e) x

= e
2t
(f) 4x

4x

+x = 3 sin t
(g) 9x

= t t
2
(h) x

4x

+ 4x = e
t
cos(3t)
Exercise 3.6. Set up the general form of the trial solution for x
p
. You need not nd the values of
the coecients or solve the dierential equations.
(a) x

+x = t
3
e
t
te
t
(b) 4x

+ 4x

+ 5x = (2t t
2
) sin(2t) +te
t/2
cos(2t)
(c) x

+x

= 2t 1 e
t
(d) x

2x

+ 5x = e
t
cos(2t) sin(2t)
Exercise 3.7. Find the solution to each initial value problem.
(a) 2y

9y

5y = xe
5x
, y(0) = 0, y

(0) = 1
(b) y

2y

+ 10y = sin(3x), y(0) = 1, y

(0) = 0
(c) y

+ 2y

+ 10y = e
x
sin(3x), y(0) = 0, y

(0) = 0
(d) y

+ 3y

= x
2
e
3x
, y(0) = 1, y

(0) = 1, y

(0) = 0
Exercise 3.8. Use the Wronskian determinant to check that the following functions are linearly
independent.
(a)
1
(t) = cos(t),
2
(t) = sin(t),
3
(t) = cos(t),
4
(t) = sin(t); for ,= , , ,= 0.
(b)
1
(t) = e
t
,
2
(t) = te
t
,
3
(t) = t
2
e
t
.
(c)
1
(t) = e
t
cos(t),
2
(t) = e
t
sin(t); for ,= 0.
(d)
1
(t) = cos(t),
2
(t) = sin(t),
3
(t) = t cos(t),
4
(t) = t sin(t); for ,= 0.
Exercise 3.9. In this problem we consider second-order Euler equations. They are of the form
at
2
x

+btx

+cx = 0,
where a, b, c are constants.
92 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
(a) Show that if x = t
r
, then r satises the indicial equation
ar
2
+ (b a)r +c = 0.
(b) Show that if the indicial equation has a repeated root r, then x = t
r
log t is the second
solution.
(c) Show that if the indicial equation has a the complex conjugate root r = + i, then x =
t

cos( log t) and x = t

sin( log t) are solutions.


Exercise 3.10. Use the methods in exercise 3.9 to solve each of the following initial value problems.
(a) t
2
x

+tx

x = 0, x(1) = 1, x

(1) = 0
(b) t
2
x

tx

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

(1) = 2
Exercise 3.11. Let
1
(x),
2
(x) be two solutions to the second-order nonlinear homogeneous dif-
ferential equation
d
2
y
dx
2
+p(x)
dy
dx
+q(x)y = 0. (3.35)
(a) Show that the Wronskian W(x) = W(
1
,
2
)(x) satises the rst-order equation
dW
dx
= p(x)W(x).
(b) Deduce that the Wronskian of the solutions
1
(x),
2
(x) to (3.35) is either always zero or
never zero.
Exercise 3.12. Suppose
1
(x) is a known non-zero solution to
a
2
(x)
d
2
y
dx
2
+a
1
(x)
dy
dx
+a
0
(x)y = 0. (3.36)
Show that if
2
(x) = v(x)
1
(x), and
2
(x) is also a solution to (3.36), then w(x) = v

(x) satises
the rst-order linear dierential equation
a
2
(x)
1
(x)w

(x) + (2a
2
(x)

1
(x) +a
1
(x)
1
(x))w(x) = 0. (3.37)
Thus, if we know one solution to (3.36), we may nd a second one by solving (3.37). This method
is called reduction of order.
Exercise 3.13. Use the method in exercise 3.12 to solve each of the following dierential equations.
(a) xy

+ (x 1)y

y = 0, given that
1
(x) = e
x
is a solution.
(b) y

2y

+y = 0, given that
1
(x) = e
x
is a solution.
(c) x
2
y

+ 3xy

+y = 0, given that
1
(x) = 1/x is a solution.
3.10. EXERCISES 93
Exercise 3.14. Lemma 3.8.1 can also be stated as saying that if the functions
1
,
2
, . . . ,
n
are
linearly dependent, then their Wronskian must be identically zero. Show that the converse does
not hold by considering the functions
1
(x) = x
2
(1 + sgn(x)) and
2
(x) = x
2
(1 sgn(x)), where
sgn(x) is the sign function; i.e.: sgn(0) = 0, sgn(x) = 1 if x < 0, and sgn(x) = 1 if x > 0. In
particular, show that:
(a)
1
(x) and
2
(x) are dierentiable on all of R, and nd their derivatives.
(b) The Wronskian W(
1
,
2
)(x) is zero for all x R.
(c)
1
(x) and
2
(x) are linearly independent.
Exercise 3.15. The following method can be used to nd a particular solution to a non-homogeneous
second-order linear dierential equation of the form
y

+p(x)y

+q(x)y = f(x). (3.38)


The method is based on variation of parameters, as explained here. Let y
h
= c
1
y
1
+ c
2
y
2
be the
(known) general solution to the corresponding homogeneous equation; i.e. y

1
+p(x)y

1
+q(x)y
1
= 0
and y

2
+p(x)y

2
+q(x)y
2
= 0. We assume the (unknown) particular solution is of the form
y = c
1
(x)y
1
+c
2
(x)y
2
. (3.39)
That is, the parameters are replaced by functions of the independent variable. We now aim to
determine c
1
(x) and c
2
(x) by using that y satises (3.38). Since this constitutes only one condition
on two functions, we formulate the additional condition
c

1
(x)y
1
+c

2
(x)y
2
= 0. (3.40)
Show that equations (3.39) and (3.40) imply
c

1
(x) =
f(x)y
2
W(y
1
, y
2
)
and c

2
(x) =
f(x)y
1
W(y
1
, y
2
)
. (3.41)
Exercise 3.16. Use the method of variation of parameters in exercise 3.15 to nd the general solution
to each dierential equation.
(a) y

+y = sec x
(b) x
2
y

+ 3xy

+y = x
r
, given that y
1
= 1/x, y
2
= log x/x, and x > 0.
94 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS
Chapter 4
Applications of Second-Order Linear
Equations
4.1 Mechanical Vibrations
Most of the discussion in this section will center around a concrete physical model that of the
mass-spring system. This may lead the reader to assume that what follows ts only into a rather
narrow context. To avoid this impression, we will initially take a much more general approach:
that of restoration of equilibrium.
We understand from the discussion in section 1.6 that an equilibrium point x

of a rst-order
autonomous dierential equation that is a sink will attract nearby orbits. In other words, solutions
whose initial values are close to x

will move, or be moved, towards the equilibrium. Here, we will


investigate a less immediate form of restoring equilibrium: we look at situations in which there
is a force that aims to move nearby points toward the equilibrium. This restoring force may be
counteracted by a large enough escape velocity. We graphically represent this model in Figure 4.1
and Figure 4.2.
Figure 4.1: Illustration of a restoring force to equilibrium.
x

xx

F0 xx

F0
F F
In one dimension, the general mathematical model for the force F is
F = h(x x

), (4.1)
where h : R R is a function with h(0) = 0, h(x x

) < 0 if x > x

and h(x x

) > 0 if x < x

.
The situation discussed extensively below corresponds to the simplest possible form of h(x x

);
namely that h(x x

) = k(x x

) = k(x

x) for some constant k > 0.


Recall that Newtons Law states that a force acting on an object corresponds to a change
in momentum of that object; that is F = (d/dt)(mv). This formula becomes F = m(d/dt)v =
m(d
2
/dt
2
)x if the mass m is constant (v is the velocity and x is the displacement of the object upon
95
96 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
Figure 4.2: Another illustration of a restoring force to equilibrium; an object may have a velocity
that is large enough to escape from being drawn in by the sink.
F F
v

escape
which the force is acting). In our situation, displacement means displacement from equilibrium.
Thus equation (4.1) becomes m(d
2
/dt
2
)(x x

) = h(x x

), or simply:
m x = h(x x

). (4.2)
(In this section, we use the notation x for x

and x for x

when taking derivatives with respect to


time.)
The Mass-Spring Model
If a mass is attached to to a spring that satises Hookes Law, namely that the magnitude of the
force exerted by the spring on the mass is proportional to the displacement from equilibrium, then
equation (4.2) takes the form
m x = k(x x

), (4.3)
where k > 0 is the spring constant. Whether the spring rests on a horizontal surface (Figure 4.3)
or is suspended vertically (Figure 4.4) is of no real importance to the mathematical model.
Figure 4.3: A mass-spring system resting on a horizontal surface.
Another physical model that (approximately) ts into this context is that of a vibrating beam
with small displacements from equilibrium (Figure 4.5).
4.1. MECHANICAL VIBRATIONS 97
Figure 4.4: A mass-spring system suspended vertically.
Figure 4.5: The displacement of the end of a vibrating beam satises equation (4.3) for small
displacements.
98 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
Free Response without Friction
If the equilibrium of the mass-spring system is x

= 0, then we may rewrite equation (4.3) as


m x +kx = 0. (4.4)
This equation represents a mass-spring system without friction and without external forcing; we
also call (4.4) the free-response equation for an undamped mass-spring system. A system described
by the equation (4.4) is also called a harmonic oscillator.
Theorem 4.1.1. The general solution to equation (4.4) is of the form
x = c
1
cos
_
_
k
m
t
_
+c
2
sin
_
_
k
m
t
_
. (4.5)
Proof. The characteristic equation is m
2
+k = 0. Since m, k > 0, the solutions to the characteristic
equation are = i
_
k/m. By theorem 3.8.4, the functions cos(
_
k/mt) and sin(
_
k/mt) form
a basis of the solution space of (4.4), so any solution to (4.4) can be written uniquely as a linear
combination of these two basis functions.
Remark 4.1.1. The number
0
=
_
k/m is called the (circular) eigenfrequency of the system (4.4).
It is the circular frequency of the oscillations of the free-response equation in the absence of friction.
The functions cos(
0
t) and sin(
0
t) are sometimes called the eigenfunctions of the free-response
equation. Eigenfrequencies of vibrations may be heard, for example when using tuning forks (Figure
4.6). Although the vibrations of the fork die down after time, the frictional eects are small and not
immediately noticeable. Note that circular frequencies are expressed in terms of the number of
radians per unit of time, rather than the number of cycles per unit of time, as for regular frequencies
f; hence, f = /(2), or = 2f.
Free Response with Friction
Suppose we want to include in our model the presence of frictional forces. As a rst approximation,
we may assume that these frictional forces are proportional to the speed of the mass, and act in
the direction opposite to the direction of motion; that is, F = c x, where c > 0 is the frictional
constant. Combining this equation with (4.4) gives the following free-response equation for a damped
mass-spring system.
m x +c x +kx = 0. (4.6)
A physical model that corresponds to this situation would perhaps have a dashpot added to the
undamped mass-spring system (see Figure 4.7). A more concrete model is that of an automobile
suspension (Figure 4.8).
Theorem 4.1.2. We distinguish the following three cases for the general solution to the dierential
equation m x +c x +kx = 0.
(a) Under-damping: c
2
4km < 0. Let =
_
(4kmc
2
)/(4m
2
). The general solution is of the
form
x = c
1
e
c/(2m)t
cos(t) +c
2
e
c/(2m)t
sin(t). (4.7)
4.1. MECHANICAL VIBRATIONS 99
Figure 4.6: A tuning fork serves as a model of a vibrating system with small frictional eects (Image
source: wikipedia.com)
Figure 4.7: A mass-spring system with a dashpot.
100 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
Figure 4.8: An automobile suspension; note the vertical coil/spring and strut/dashpot assembly.
(Image source: www.automotive-illustration.co.uk)
4.1. MECHANICAL VIBRATIONS 101
(b) Critical Damping: c
2
4km = 0. The general solution is of the form
x = c
1
e
c/(2m)t
+c
2
te
c/(2m)t
. (4.8)
(c) Over-damping: c
2
4km > 0. Let
1,2
= c/(2m)
_
(c
2
4km)/(4m
2
). The general
solution is of the form
x = c
1
e

1
t
+c
2
e

2
t
. (4.9)
Proof. The solutions to the characteristic equation m
2
+c+k = 0 are = (c

c
2
4km)/(2m) =
c/(2m)
_
(c
2
4km)/(4m
2
). Theorem 3.8.4 gives us the following results: if c
2
4km < 0, then
the two solutions are conjugate complex numbers, and the general solution to the dierential equa-
tion is given by equation (4.7); if c
2
4km = 0, then there is the repeated solution = c/(2m)
to the characteristic equation, and the general solution is given by (4.8); if c
2
4km > 0, there are
two distinct real solutions, and the general solution is (4.9).
Remark 4.1.2. (a) In the under-damped case, we have oscillating motion as for the undamped
mass-spring system, except that the amplitude is now exponentially decreasing (see also the-
orems 3.5.1 and 3.5.2). Note that the system still has a well-dened and constant (circular)
eigenfrequency, namely =
_
(4kmc
2
)/(4m
2
). Of course, as c 0, we obtain the un-
damped case in theorem 4.1.1. Figure 4.9 shows a typical solution for the under-damped
case.
Figure 4.9: Typical free-response solution for an under-damped mass-spring system. The (circular)
eigenfrequency is =
_
(4kmc
2
)/(4m
2
).
2 4 6 8
t
x
(b) As c

4km (i.e. c
2
4km 0), the eigenfrequency approaches zero, or equivalently, the
period of the motion becomes innitely large. This marks the transition to the over-damped
case where the bifurcation occurs for the critically damped case c
2
4km = 0. Both in the
critically damped and the over-damped case, the dierential equation admits at most one up-
and-down (or left-and right) movement before the system returns to equilibrium (see Figure
4.10).
102 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
Figure 4.10: Typical free-response solutions for a critically damped or over-damped mass-spring
system.
t
x
Forced Response
We now introduce external forcing to the mass-spring system given by equations (4.4) or (4.6). This
may be done physically by shaking the mass-spring system, or inducing external vibrations, such
as road irregularities in the case of an automobile suspension. Consequently, we obtain equations
of the form
m x +kx = f(t) (4.10)
in the undamped case, and
m x +c x +kx = f(t) (4.11)
in the damped case. The mathematical theory that describes these two situations is largely covered
by the method of undetermined coecients (section 3.6). If the forcing function is of a dierent
type than the ones covered in section 3.6, Laplace Transform methods (as described in chapter 8)
can be used to nd solutions. Of particular importance is the case when the forcing function is a
sinusoid function with a given circular frequency . We will investigate the undamped and damped
cases for this type of forcing function.
Forced Response without Damping
We are interested in equations of the form
m x +kx = a cos(t) +b sin(t), (4.12)
where we assume that ,=
0
. The (circular) eigenfrequency of the free response equation is

0
=
_
k/m (remark 4.1.1), and the general solution to the homogeneous system is c
1
cos(
0
t) +
c
2
sin(
0
t). According to the method of undetermined coecients, we need to use a trial solution
of the form x
p
= Acos(t) + Bsin(t) for nding a particular solution (assuming ,=
0
). Since
x
p
= A sin(t) +B cos(t) and x
p
= A
2
cos(t) B
2
sin(t), equation (4.12) becomes
mA
2
cos(t) mB
2
sin(t) +kAcos(t) +kBsin(t) = a cos(t) +b sin(t).
4.1. MECHANICAL VIBRATIONS 103
Combining like terms and comparing coecients gives A = a/(k m
2
) and B = b/(k m
2
).
Using
2
0
= k/m further yields A = a/(m(
2
0

2
)) and B = b/(m(
2
0

2
)). Hence the solutions
to (4.12) are of the form
x =
1
m(
2
0

2
)
(a cos(t) +b sin(t)) +c
1
cos(
0
t) +c
2
sin(
0
t). (4.13)
Using polar coordinates as in the proof of theorem 3.5.2, we can see that the amplitude of the
forcing function in (4.12) is

a
2
+b
2
; the amplitude of the homogeneous solution is
_
c
2
1
+c
2
2
. The
amplitude of the inhomogeneous terms (which can be understood as the response to the forcing
function) of the solution to (4.12) is

a
2
+b
2
/(m[
2
0

2
[). We may therefore dene the quotient
of the amplitude of the response function to the amplitude of the forcing function as
response amplitude
forcing amplitude
=
1
m[
2
0

2
[
. (4.14)
The graph of the function 1/(m[
2
0

2
[) is given in Figure 4.11. The graph is called the
response diagram for equation (4.12). Note that the graph has a vertical asymptote as
0
.
Figure 4.11: The response diagram for the sinusoidally forced undamped mass-spring system.

1m
0
2

Example 4.1.1. We want to nd the formula and draw the graph of the solution to the initial value
problem
0.01 x + 0.25x = cos(t), x(0) = 5, x(0) = 0 (4.15)
for various frequencies of the forcing function.
(a) If = 0.5, the solution is x = (400/99) cos(0.5t) + (95/99) cos(5t); the graph of the solution
is given in Figure 4.12a. The graph is a superposition of the (low frequency, large amplitude)
forced response x
p
= (400/99) cos(0.5t) with the (high frequency, small amplitude) eigen-
function x
h
= (95/99) cos(5t) (Figure 4.12b). The quotient of the amplitude of the response
function to that of the forcing function is 1/(0.01(5
2
0.5
2
)) = (400/99) 1 4.04.
(b) If = 3, the solution is x = (25/4) cos(3t)(5/4) cos(5t); the graph of the solution is given in
Figure 4.13a. It is a superposition of the (large amplitude) forced response x
p
= (25/4) cos(3t)
104 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
Figure 4.12: (a): the solution of equation (4.15) for = 0.5 (left); (b): the solution is the superposi-
tion of the forced response (blue) and the eigenfunction of the homogeneous system (purple)(right).
5 10 15 20 25
t
4
2
2
4
x
5 10 15 20
t
4
2
2
4
x
with the (small amplitude) eigenfunction x
h
= (5/4) cos(5t), which have roughly the same
frequency (Figure 4.13b). The quotient of the amplitude of the response function to that of
the forcing function is 1/(0.01(5
2
3
2
)) = (25/4) 1 = 6.25.
Figure 4.13: (a): the solution of equation (4.15) for = 3 (left); (b): the solution is the super-
position of the forced response (blue) and the eigenfunction of the homogeneous system (purple)
(right).
5 10 15 20 25
t
6
4
2
2
4
6
x
5 10 15 20
t
6
4
2
2
4
6
x
(c) If = 4.5, the solution is x = (400/19) cos(4.5t) (305/19) cos(5t); the graph of the solution
is given in Figure 4.14a. It is a superposition of two nearly equifrequent cosine waves with
roughly equal amplitudes (Figure 4.14b). Beats occur. The quotient of the amplitude of the
response function to that of the forcing function is 1/(0.01(5
2
4.5
2
)) = (400/19)1 21.05.
(d) The graphs of the solution for = 4.6, 4.7, 4.8, 4.9 are shown in Figure 4.15; the beats
become more prominent, and increase in amplitude and wavelength as approaches the
eigenfrequency
0
= 5. The phenomenon of beats is investigated further in exercise 4.3.
4.1. MECHANICAL VIBRATIONS 105
Figure 4.14: (a): the solution of equation (4.15) for = 4.5 notice the pattern of beats (left);
(b): the solution is the superposition of the forced response (blue) and the eigenfunction of the
homogeneous system (purple) of similar amplitude and frequency (right).
5 10 15 20 25
t
30
20
10
10
20
30
x
5 10 15 20
t
20
10
10
20
x
Figure 4.15: The solution of equation (4.15) for = 4.6, 4.7, 4.8, 4.9 (left to right, top to bottom).
5 10 15 20 25
t
40
20
20
40
x
5 10 15 20 25
t
60
40
20
20
40
60
x
5 10 15 20 25
t
100
50
50
100
x
5 10 15 20 25
t
150
100
50
50
100
150
x
106 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
Resonance
As the frequency of the forcing function approaches the eigenfrequency of the free-response
system, resonance occurs. Equation (4.12) takes the form
m x +kx = a cos((
_
k/m)t) +b sin((
_
k/m)t). (4.16)
To obtain the general solution to this equation, we must use the trial solution x
p
= At cos(
0
t) +
Bt sin(
0
t), where
0
=
_
k/m. Then x
p
= Acos(
0
t) A
0
t sin(
0
t) +Bsin(
0
t) +B
0
t cos(
0
t)
and x
p
= 2A
0
sin(
0
t) A
2
0
t cos(
0
t) +2B
0
cos(
0
t) B
2
0
t sin(
0
t). Using (4.16), we obtain
A = b/(2m
0
) and B = a/(2m
0
). The general solution to (4.16) is consequently
x =
b
2m
0
t cos(
0
t) +
a
2m
0
t sin(
0
t) +c
1
cos(
0
t) +c
1
sin(
0
t). (4.17)
Example 4.1.2. For the initial value problem
0.01 x + 0.25x = cos(5t), x(0) = 5, x(0) = 0 (4.18)

0
=
_
0.25/0.01 = 5, so the solution is of the form x = 1/(2 0.01 5)t sin(5t) + c
1
cos(5t) +
c
2
sin(5t) = 10t sin(5t) + c
1
cos(5t) + c
2
sin(5t). The initial conditions give c
1
= 5 and c
2
= 0.
The solution is x = 10t sin(5t) + 5 cos(5t), whose graph is shown in Figure 4.16. The solution is a
function with circular frequency =
0
= 5 and linearly increasing amplitude.
Figure 4.16: The solution to example 4.1.2; resonance is present in the system.
5 10 15 20 25
t
200
100
100
200
x
If a system is near resonance, small amplitudes of the forcing function will result in large
amplitudes of the response function. At resonance, the amplitudes of the response function will
increase linearly with time and so approach innity. Of course, in a physical system, innite
amplitudes are not possible. Most likely, resonance will lead to the physical destruction of the
system. A famous example is that of the (rst) Tacoma Narrows Bridge (a.k.a. Galloping Gertie).
Figure 4.17 shows this bridge when it collapsed in November 1940.
1
Another example of a resonance
phenomenon are the tides in the Bay of Fundy, Nova Scotia, which are among the highest on Earth.
1
According to [2] resonance was not the actual cause of the bridge collapse. Rather, it was due to aerodynamically
induced self-excitation.
4.2. LINEAR ELECTRIC CIRCUITS 107
There, the amount of time needed for large waves to travel from the mouth of the bay to the inner
shore and back is close to the principal lunar semidiurnal constituent, which is one half the average
time it takes the Earth to rotate once relative to the moon, and the largest frequency component
inuencing large bodies of water [11, 21].
Figure 4.17: Collapse of the Tacoma Narrows Bridge in 1940; video footage is available at www.
youtube.com/watch?v=j-zczJXSxnw (Image source: wikipedia.com).
Our next objective is to investigate sinusoidally forced systems that include damping. We
will investigate this case in the context of electric circuits. The mathematical results carry over
without modications to the mechanical situation. As we will see in the next section, introduction
of frictional forces reduces, but does not eliminate the phenomenon of resonance.
4.2 Linear Electric Circuits
In this section we continue our discussion of electric circuits which was begun in section 2.2. We
will now consider electric circuits that, in addition to a resistor and an inductor, also contain a
capacitor (see Figure 4.18).
Coulombss Law states that the voltage drop U
C
across a capacitor is proportional to the
charge on the capacitor. Since the current I builds up the charge on the capacitor over time, the
total charge at time t is given by the integral Q(t) = Q
0
+

t
t
0
I() d, where Q
0
is the charge at
time t
0
. This gives
U
C
=
1
C
_
Q
0
+

t
t
0
I() d
_
, (4.19)
where C is the capacitance (in Farads, F). The constant of proportionality is 1/C instead of, for
instance, C to indicate that a large capacitance will incur a small voltage drop.
As seen previously, Kirchhos Voltage Law states that sum of the voltage drops in a closed
electric circuit must be zero. If the RLC circuit has the (time-dependent) voltage source E(t), then
108 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
Figure 4.18: An RLC circuit.
L R
C
E
U
L
+U
R
+U
C
= E(t). This leads to the dierential equation
L
dI
dt
+R I +
1
C
Q = E(t).
Using the fact that I = dQ/dt, and dierentiating both sides, we obtain a second-order linear
dierential equation with constant coecients for the current I = I(t) at time t:
L
d
2
I
dt
2
+R
dI
dt
+
1
C
I = E

(t). (4.20)
Note the resemblance of this equation with that of the forced mass-spring system with friction
and external forcing, as given by equation (4.11). In fact, the inductance L corresponds to the mass
m, the resistance R to the frictional constant, and the reciprocal of the capacitance to the spring
constant. As mentioned at the end of the previous section, we want to investigate equation (4.20) for
sinusoidal forcing functions; i.e., the external voltage source is given by E(t) = c
1
cos(t)+c
2
sin(t).
Since E

(t) = c
2
cos(t) c
1
sin(t), the equation (4.20) becomes
L
d
2
I
dt
2
+R
dI
dt
+
1
C
I = c
2
cos(t) c
1
sin(t). (4.21)
The free-response equation without friction is
L
d
2
I
dt
2
+
1
C
I = 0, (4.22)
which has the circular eigenfrequency
0
= 1/

LC. We expect to be able to detect resonance if


the forcing frequency approaches
0
. As in equation (4.14) we investigate the quotient of the
response amplitude and the forcing amplitude.
4.2. LINEAR ELECTRIC CIRCUITS 109
From equation (4.21), we see that the amplitude of the forcing function is
_

2
(c
2
1
+c
2
2
). On
the other hand, a particular solution to (4.21) can be obtained via the method of undetermined
coecients by using the trial solution I
p
= Acos(t) + Bsin(t). It can be shown that A =
(C)(c
2
+ c
1
RC c
2
CL
2
)/(1 2CL
2
+ C
2

2
(R
2
+ L
2

2
)) and B = (C)(c
1
+ c
2
RC +
c
1
CL
2
)/(12CL
2
+C
2

2
(R
2
+L
2

2
)). The amplitude of the response function is consequently
_
A
2
+B
2
=

C
2

2
(c
2
1
+c
2
2
)
1 2CL
2
+C
2

2
(R
2
+L
2

2
)
(4.23)
and
response amplitude
forcing amplitude
=

C
2
1 2CL
2
+C
2

2
(R
2
+L
2

2
)
=
1
_
(1/C)
2
2(L/C)
2
+
2
(R
2
+L
2

2
)
.
Using that (1/C)
2
2(L/C)
2
+
4
L
2
= ((1/C)L
2
)
2
= L
2
(1/(LC)
2
)
2
and that
0
= 1/

LC
leads to
response amplitude
forcing amplitude
=
1
_
L
2
(
2
0

2
)
2
+R
2

2
. (4.24)
This quantity is obviously maximal if =
0
, and its maximal value is 1/
_
R
2

2
0
=

LC/R.
For electric circuits, this resonance phenomenon actually has very useful practical applications
(as opposed to the destructive nature it exhibits in the mechanical situation). If the input voltage
of an RLC circuit is received in the form of electromagnetic waves, then the signal that will receive
maximal amplication is the one at the eigenfrequency of the circuit. This is, in principle, how
radio works. In particular, a variable capacitor like the one in Figure 4.19 can be used to tune in
to the desired radio station.
Figure 4.19: A variable capacitor for use as a radio tuner. (Image source: www.stormwise.com)
110 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
Example 4.2.1. An RLC circuit is to be tuned to receive a 767 kHz electromagnetic (radio) wave
signal. The inductor of the circuit has an inductance of 360 H.
(a) We want to nd the capacitance needed to achieve resonance at the given frequency. We
convert f = 767 kHz = 767, 000 Hz into a circular frequency by using that
0
= 2f =
4.82 10
6
(radians per second). The formula
0
= 1/

LC becomes C = 1/(L
2
0
) = 1/(360
10
6
(4.82 10
6
)
2
) 1.2 10
10
= 120 pF (picofarads).
(b) We can use equation (4.24) to draw a response diagrams for resistance R = 100, 10, 1,
as shown in Figure 4.20. As expected, a lower resistance leads to a larger amplication of
the signal (which is maximal at
0
). However, R has to be extremely (and unrealistically)
small to provide a meaningful amplication of the received frequency. The solution is to use
a parallel RLC circuit instead of the series RLC circuit shown in Figure 4.18. See exercise
4.4 for more information.
Figure 4.20: Response diagrams for example 4.2.1 with R = 100, 10, 1.
2.010
6
4.010
6
6.010
6
8.010
6
1.010
7
1.210
7
t
5. 10
10
1. 10
9
1.510
9
2. 10
9
I
2.010
6
4.010
6
6.010
6
8.010
6
1.010
7
1.210
7
t
5. 10
9
1. 10
8
1.510
8
2. 10
8
I
R = 100 R = 10
2.010
6
4.010
6
6.010
6
8.010
6
1.010
7
1.210
7
t
5. 10
8
1. 10
7
1.510
7
2. 10
7
I
R = 1
4.3 Mathematica Use
We present an example that illustrates how we can generate a parametrized solution, and how to
plot graphs of solution curves for multiple parameters.
4.3. MATHEMATICA USE 111
Example 4.3.1. To compute solutions to the initial value problem (4.15) for various values of the
forcing frequency , we dene the solution as a function of . Note the underscore after the
parameter name.
soln_ : DSolve1 100 x''t 1 4 xt Cos t, x0 5, x'0 0, xt, t;
Now we can generate a table (list) of the plots shown for the parameter values in example 4.1.1.
TablePlotEvaluatext . soln, t, 0, 25, LabelStyle Medium,
AxesLabel "t", "x", , 0.5, 3, 4.5, 4.6, 4.7, 4.8, 4.9
The plots are shown here.
5 10 15 20 25
t
4
2
2
4
x
5 10 15 20 25
t
6
4
2
2
4
6
x
5 10 15 20 25
t
30
20
10
10
20
30
x
5 10 15 20 25
t
40
20
20
40
x
5 10 15 20 25
t
60
40
20
20
40
60
x
5 10 15 20 25
t
100
50
50
100
x
112 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
5 10 15 20 25
t
150
100
50
50
100
150
x
4.4 Exercises
Exercise 4.1. Consider the damped free response system
10 x +c x +kx = 0. (4.25)
(a) If c = 10 and k = 2, nd the general solution to (4.25).
(b) Find the value of k if c = 1, and if we want the motion to be under-damped with circular
frequency = 2.
(c) In the situation of the damped free-response mass-spring system, the transition from under-
damping to over-damping is another example of a bifurcation. Draw the bifurcation diagram
for (4.25) in the ck-plane.
Exercise 4.2. Consider the damped free response system
m x +c x +kx = c
1
cos(t) +c
2
sin(t). (4.26)
(a) Show that the quotient of the response amplitude and the forcing amplitude is
=
1
_
m
2
(
2
0

2
)
2
+c
2

2
,
where
0
=
_
k/m.
(b) Suppose m = 1 and = 1. What combinations of c and k will yield an amplication factor
of = 0.1, 1, 10?
Exercise 4.3. We investigate the occurrence of beats for the initial value problem
x +
2
0
x = sin(t), x(0) = x(0) = 0, (4.27)
with
0
> 0 as we increase the forcing frequency
0
.
(a) Show that the solution is given by
x =
1

2
0

2
(sin(t) sin(
0
t)) +
1

0
(
0
+)
sin(
0
t). (4.28)
Observe that the rst term x
b
= (1/(
2
0

2
))(sin(t) sin(
0
t)) of (4.28) will have much
larger amplitude as
0
than the second term of (4.28).
4.4. EXERCISES 113
(b) Use a trigonometric identity to show that
x
b
=
2

2
0

2
cos
_
+
0
2
t
_
sin
_

0
2
t
_
. (4.29)
That is, the dominant term in (4.28) is the product of a cosine with period 4/( +
0
) (the
period of the inner function of the beats) and a sine of period 4/(
0
) and amplitude
2/(
2
0

2
) (the period and amplitude of the envelope of the beats).
(c) Conrm the ndings in part (b) by graphing the solution to (4.27) for
0
= 1 and =
0.9, 0.95, 0.99.
Exercise 4.4. We consider the parallel RLC circuit shown in Figure 4.21. It can be shown that in
this situation, we have that the free-response equation for the voltage V = V (t) across the circuit
is
C
d
2
V
dt
2
+
1
R
dV
dt
+
1
L
V = 0. (4.30)
Figure 4.21: A parallel RLC circuit.
L R C E
(a) Find the solution to the characteristic equation and identify the over-damped, critically
damped, and under-damped cases.
(b) Find the general solution in each of the cases and describe the time evolution of the voltage
across the circuit.
(c) What is the circular frequency for which the quotient of the response amplitude and the
sinusoidal forcing amplitude is maximal?
Exercise 4.5. Rework part (b) of example 4.2.1 for the parallel RLC circuit in the previous example.
That is, draw the response diagrams for the parallel RLC circuit when R = 100, 10, 1, and
L = 360 10
6
H, C = 120 10
12
F.
Exercise 4.6. Show that each of the following hold.
114 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS
(a) If x = x(t) is a real-valued solution to the initial value problem x +
2
x = 0, x(0) = x
0
,
x(0) = v
0
, then the complex-valued function z = x + i x is a solution to the initial value
problem z +iz = 0, z(0) = x
0
+iv
0
.
(b) If z = z(t) is a complex-valued solution to the initial value problem z+iz = 0, z(0) = z
0
, then
the real-valued function x = (1/)Re(z) is a solution to the initial value problem x+
2
x = 0,
x(0) = (1/)Re(z
0
), x(0) = Im(z
0
).
Thus, the harmonic oscillator described by x +
2
x = 0 can equivalently be described by the
rst-order dierential equation z +iz = 0 for the complex-valued function z.
Exercise 4.7. (a) Find the formula of the potential energy of the harmonic oscillator given by the
dierential equation m x + kx = 0, where m, k > 0. Hint: Review which physical quanti-
ties/which law of physics lead to this dierential equation.
(b) Suppose V (x) is any potential energy function with a local minimum at x

= 0 and V (x

) = 0.
Suppose also that the minimum is non-degenerate (i.e. V

(x

) > 0). Show that near x

, any
mechanical system can be described by a harmonic oscillator.
Chapter 5
First-Order Linear Autonomous
Systems
5.1 Introduction
A two-dimensional system of rst-order linear autonomous dierential equations is of the form
dx
dt
= a
1,1
x +a
1,2
y (5.1)
dy
dt
= a
2,1
x +a
2,2
y.
In this situation, t is the independent variable, and x and y are functions of t. The system
being linear means that each of the two equations of (5.1) is linear in x and y; the system being
autonomous means the coecients a
i,j
do not depend on t. In other words, we can equivalently
describe (5.1) as a two-dimensional linear system with constant coecients.
It is interesting to note that a second-order linear dierential equation of the form
a
d
2
x
dt
2
+b
dx
dt
+cx = 0 (5.2)
(a ,= 0) can be transformed into a two-dimensional rst-order system by the following process of
reduction of order. Let y = dx/dt; then dy/dt = d
2
x/dt
2
= (b/a)(dx/dt) (c/a)x = (c/a)x
(b/a)y, and equation (5.2) becomes:
dx
dt
= y (5.3)
dy
dt
=
c
a
x
b
a
y.
In this sense, the methods presented in this chapter generalize the methods presented in sections
3.2, 3.3, 3.4, and 3.5. As we will see shortly, the idea of solving a characteristic equation carries
over to the present situation.
We may also think of the system (5.1) as a rst-order dierential equation involving a matrix-
vector system. If x = (x, y) and we let
A =
_
a
1,1
a
1,2
a
2,1
a
2,2
_
,
115
116 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
then (5.1) becomes dx/dt = Ax.
We will now state the applicable existence and uniqueness theorem for rst-order linear systems.
The proof will be, as usual for these types of results, omitted.
Theorem 5.1.1. A rst-order linear autonomous system of the form (5.1), together with the initial
conditions x(t
0
) = x
0
and y(t
0
) = y
0
has a unique solution that is dened for all t R.
5.2 Eigenvalues and Eigenvectors
Recall that for a matrix A, an eigenvalue of A is a (real or complex) number so that there exists
a non-zero (real or complex) vector v with the property that
Av = v. (5.4)
The non-zero vector v in (5.4) is called an eigenvector of A corresponding to the eigenvalue .
Note that if v is an eigenvector of A, then so is any non-zero multiple of v; this is because cv
satises equation (5.4) as well: A(cv) = c(Av) = c(v) = (cv). If Av = v for v ,= 0, then
the linear system (A I)v = 0 has the non-zero solution v (I denotes the identity matrix); and
vice versa. In other words, is an eigenvalue of the matrix A if and only if the determinant of the
matrix AI is zero. The equation
det(AI) = 0 (5.5)
is called the characteristic equation of the matrix A. If A is an n n matrix, the left-hand side
is a polynomial of degree n in . Note that solutions to (5.5) may have multiplicity greater than
one (this multiplicity is the algebraic multiplicity); also, for a given eigenvalue of multiplicity m,
there are k linearly independent eigenvectors, where k may be any number between 1 and m (k is
called the geometric multiplicity). An overview of linear algebra results used in this text is given
in Appendix B.
The concepts of eigenvalue and eigenvector of a matrix are related to the problem of solving a
system of the form dx/dt = Ax, due to the following observation.
Theorem 5.2.1. If is an eigenvalue of the matrix A and v is a corresponding eigenvector, then
the system
dx
dt
= Ax (5.6)
has the vector-valued function
x(t) = e
t
v (5.7)
as a solution. Also, if x
1
(t) and x
2
(t) are solutions to (5.6), then so is any linear combination
c
1
x
1
(t) +c
2
x
2
(t), for any real or complex numbers c
1
, c
2
.
Proof. Suppose Av = v and let x(t) = e
t
v. Then dx/dt = (e
t
v) = e
t
(v) = e
t
(Av) =
A(e
t
v) = Ax(t). Also, if dx
1
/dt = Ax
1
and dx
2
/dt = Ax
2
, then d(c
1
x
1
+c
2
x
2
)/dt = c
1
(dx
1
/dt)+
c
2
(dx
2
/dt) = c
1
Ax
1
+c
2
Ax
2
= A(c
1
x
1
+c
2
x
2
).
5.3. CASE I: TWO REAL DISTINCT NON-ZERO EIGENVALUES 117
Remark 5.2.1. Although the current chapter (with the exception of section 5.9) deals only with
22 systems of dierential equations, it should be noted that theorem 5.2.1 holds for nn systems.
(In fact, the dimension of the system is never mentioned or used in the proof.) Also, the solution
in (5.7) may be complex-valued. In this situation, it is important to note that both the real part
Re(x) = (x +x)/2 and the imaginary part Im(x) = (x x)/(2i) are also solutions to (5.6).
5.3 Case I: Two Real Distinct Non-Zero Eigenvalues
In this section we consider the situation when the matrix of a two-dimensional system has two real,
distinct, and non-zero eigenvalues. The following result applies.
Theorem 5.3.1. Suppose A is a 22 matrix with the two real eigenvalues
1
,=
2
and correspond-
ing eigenvectors v
1
and v
2
, respectively. Then any solution to the dierential equation dx/dt = Ax
is of the form
x(t) = c
1
e

1
t
v
1
+c
2
e

2
t
v
2
, (5.8)
where c
1
, c
2
R. Furthermore, the initial value problem dx/dt = Ax, x(t
0
) = x
0
, y(t
0
) = y
0
has a
unique solution.
Proof. Theorem 5.2.1 tells us that both e

1
t
v
1
and e

2
t
v
2
are solutions, as well as any linear
combination of these two functions. This establishes that any function of the form (5.8) is a
solution to the system dx/dt = Ax. Theorem 5.1.1 asserts that the given initial value problem has
a unique solution.
It remains to be shown that any solution to dx/dt = Ax is of the form (5.8). This can be
established as follows. If x(t) is a solution, then, for a xed but arbitrary value t
0
in the domain
of x, let x
0
= x(t
0
) and y
0
= y(t
0
). We claim that we can obtain a solution of the form (5.8) by
nding values of c
1
and c
2
so that the resulting function satises these initial conditions.
As indicated, let x(t) = (x(t), y(t)) be a solution to dx/dt = Ax, and let x
0
= x(t
0
) and
y
0
= y(t
0
). A standard result from linear algebra (see theorem B.3.1 in Appendix B) tells us that
eigenvectors corresponding to dierent eigenvalues are linearly independent, so there exist (unique)
values d
1
, d
2
so that d
1
v
1
+ d
2
v
2
= x
0
= (x
0
, y
0
). Let c
1
= e

1
t
0
d
1
and c
2
= e

2
t
0
d
2
. Then
c
1
e

1
t
0
v
1
+c
2
e

2
t
0
v
2
= x
0
and the solution x(t) is of the form (5.8),
Remark 5.3.1. Since any solution to the system dx/dt = Ax can be written in the form (5.8), we
call a solution of this form the general solution to the dierential equation dx/dt = Ax.
Example 5.3.1. Find the general solution of each of the following dierential equations.
(a)
_
dx/dt
dy/dt
_
=
_
3 0
0 2
__
x
y
_
(5.9)
In this situation,
1
= 3 and
2
= 2 are the eigenvalues; v
1
= (1, 0) and v
2
= (0, 1)
are the respective eigenvectors. We used that for an upper or lower triangular matrix, the
eigenvalues appear as the entries on the main diagonal. The general solution is consequently
_
x(t)
y(t)
_
= c
1
e
3t
_
1
0
_
+c
2
e
2t
_
0
1
_
=
_
c
1
e
3t
c
2
e
2t
_
.
118 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
Of course, we could have also obtained this solution by observing that the dierential equation
(5.9) can be written as two independent rst-order linear dierential equations dx/dt = 3x
and dy/dt = 2y, which we may solve separately. For this reason, we say that a system of
equations dx/dt = Ax is (completely) decoupled, if the matrix A is a diagonal matrix.
(b)
_
dx/dt
dy/dt
_
=
_
2 3
0 4
__
x
y
_
(5.10)
In this situation,
1
= 2 and
2
= 4 are the eigenvalues. For
1
= 2, we obtain the
eigenvector v
1
= (1, 0). For
2
= 4, we need to nd a vector v
2
= (v
1
, v
2
) so that
__
2 3
0 4
_
(4)
_
1 0
0 1
___
v
1
v
2
_
=
_
6 3
0 0
__
v
1
v
2
_
=
_
6v
1
+ 3v
2
0
_
=
_
0
0
_
,
which means we may choose an eigenvector to be v
2
= (1/2, 1).
The general solution is
_
x(t)
y(t)
_
= c
1
e
2t
_
1
0
_
+c
2
e
4t
_
1/2
1
_
=
_
c
1
e
2t
(1/2)c
2
e
4t
c
2
e
4t
_
.
Here, we could have also obtained this solution by observing that the second equation of
(5.10) is dy/dt = 4y, which has the general solution y = c
2
e
4t
. Then, the rst equation
of (5.10) becomes dx/dt = 2x + 3c
2
e
4t
, which may be solved using the integrating factor
method for rst-order linear equations. For this reason, we say the system (5.10) is partially
decoupled.
(c)
_
dx/dt
dy/dt
_
=
_
2 2
1 3
__
x
y
_
(5.11)
In this situation, the eigenvalues can be computed by solving the characteristic equation
det(AI) = 0 for . In this example, the characteristic equation is
det
_
2 2
1 3
_
= (2 )(3 ) 1 2 =
2
5 + 4 = 0,
which has the solutions
1
= 1 and
2
= 4. The eigenvectors can be obtained using the
method in part (b) of this example: For
1
= 1, we need to nd a vector v
1
= (v
1
, v
2
) so that
__
2 2
1 3
_
(1)
_
1 0
0 1
___
v
1
v
2
_
=
_
1 2
1 2
__
v
1
v
2
_
=
_
v
1
+ 2v
2
v
1
+ 2v
2
_
=
_
0
0
_
,
which means we may choose an eigenvector to be v
1
= (2, 1). Similarly, an eigenvector
v
2
= (v
1
, v
2
) corresponding to
2
= 4 can be found as follows:
__
2 2
1 3
_
(4)
_
1 0
0 1
___
v
1
v
2
_
=
_
2 2
1 1
__
v
1
v
2
_
=
_
2v
1
+ 2v
2
v
1
v
2
_
=
_
0
0
_
.
5.3. CASE I: TWO REAL DISTINCT NON-ZERO EIGENVALUES 119
Thus, we can choose v
2
= (1, 1). Note that the two equations 2v
1
+2v
2
= 0 and v
1
v
2
= 0
are constant multiples of each other, so we really only have to work with one of them. This
will always be the case when determining eigenvectors for two-dimensional systems.
Using this information, the general solution is
_
x(t)
y(t)
_
= c
1
e
t
_
2
1
_
+c
2
e
4t
_
1
1
_
=
_
2c
1
e
t
+c
2
e
4t
c
1
e
t
+c
2
e
4t
_
.
Equilibrium Solutions and Phase Portraits
We want to extend the concepts of equilibrium solutions and phase portraits encountered in section
1.6 to the present situation. As before, we understand an equilibrium solution to the system
dx/dt = Ax to be a constant solution x(t) = x

. Consequently dx/dt = 0, so we obtain Ax

= 0.
Obviously, x

= 0 is always an equilibrium solution. We may have others if the matrix A is


singular. However, recall that in this section, we consider the situation when both eigenvalues are
non-zero (the rst time we use this assumption), so A cannot be singular. We thus obtain that
x

= 0 is the only equilibrium solution in the situation considered in this section.


Phase Portraits for dx/dt = Ax are obtained by plotting solution curves in the plane for
various initial conditions and indicating the direction of motion along these curves by arrows. We
will sketch phase portraits for the dierential equations encountered in the previous example.
Example 5.3.2. (a) As we saw in example 5.3.1, the general solution to the system
_
dx/dt
dy/dt
_
=
_
3 0
0 2
__
x
y
_
is x(t) = c
1
e
3t
, y(t) = c
2
e
2t
. If x(0) = x
0
and y(0) = y
0
, we obtain x(t) = x
0
e
3t
,
y(t) = y
0
e
2t
. By drawing solution curves for various dierent initial conditions, we obtain
the phase portrait in Figure 5.1.
We make the following geometric observations.
As t , both x(t) 0 and y(t) 0; this justies the direction of the arrows in
Figure 5.1, and also means that the origin is a sink.
The lines
1
= R(1, 0) (the x-axis) and
2
= R(0, 1) (the y-axis), i.e. the lines spanned
by the two eigenvectors, are invariant: any solution that starts on one of these lines
will remain on that line forever. We call the line
1
the eigenspace associated with the
eigenvalue
1
= 3, and
2
the eigenspace associated with the eigenvalue
2
= 2.
Since x(t) = c
1
e
3t
approaches zero more quickly than y(t) = c
2
e
2t
, we place double
arrows on the line
1
, and single arrows on
2
.
Note that
x = x(t) = c
1
e
3t
= c
1
(e
2t
)
3/2
= c
1
(c
1
2
y(t))
3/2
= c
1
c
3/2
2
y
3/2
= cy
3/2
.
(The constant c
1
c
3/2
2
was absorbed into a single constant c.) This conrms that the
solution curves are all tangent to the y-axis.
120 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
Figure 5.1: The phase portrait for part (a) of example 5.3.1; the origin is a sink.
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
(b) The general solution to the system
_
dx/dt
dy/dt
_
=
_
2 3
0 4
__
x
y
_
is x(t) = c
1
e
2t
(1/2)c
2
e
4t
, y(t) = c
2
e
4t
. By drawing solution curves for various dierent
initial conditions, we obtain the phase portrait in Figure 5.2.
Figure 5.2: The phase portrait for part (b) of example 5.3.1; the origin is a saddle.
2 1 1 2
x
2
1
1
2
y
Note the following:
The lines
1
= R(1, 0) and
2
= R(1/2, 1) spanned by the two eigenvectors are again
5.3. CASE I: TWO REAL DISTINCT NON-ZERO EIGENVALUES 121
invariant; if (x
0
, y
0
) is a point on
1
, then its x-coordinate approaches or as
t ; if (x
0
, y
0
) is a point on
2
, then it moves to the origin as t . For these
reasons,
1
is called the unstable eigenspace and
2
the stable eigenspace. The origin is
a saddle.
As t , y(t) 0; this justies the direction of the arrows in Figure 5.2.
(c) For the system
_
dx/dt
dy/dt
_
=
_
2 2
1 3
__
x
y
_
the general solution is x(t) = 2c
1
e
t
+c
2
e
4t
, y(t) = c
1
e
t
+c
2
e
4t
. The phase portrait is given
in Figure 5.3.
Figure 5.3: The phase portrait for part (c) of example 5.3.1; the origin is a source.
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
As t , both x(t) 0 and y(t) 0; this justies the direction of the arrows in
Figure 5.3, and also means that the origin is a source.
The lines
1
= R(2, 1) and
2
= R(1, 1) spanned by the two eigenvectors are invariant;
if (x
0
, y
0
) is a point on any of these lines, it moves away from the origin as t . Note
that all other solution curves are tangent to the slower eigenspace at the origin; that is,
to the eigenspace spanned by the smaller eigenvalue
1
= 1.
We now make the necessary denitions concerning dierent types of equilibrium solution.
Denition 5.3.1. Suppose x(t) is the solution to the initial value problem dx/dt = Ax, x(0) = x
0
.
Then the origin x

= 0 is called:
a sink if for any initial condition the solution x(t) satises lim
t
x(t) = x

;
a source if for any initial condition the solution x(t) satises lim
t
x(t) = x

;
a saddle if lim
t
x(t) = x

for some initial conditions, and lim


t
x(t) = x

for others.
122 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
The next theorem establishes that the geometric features of the solution curves that were
observed in example 5.3.2 are the only ones present in the general situation considered in this
section. We omit its proof (and the proofs of similar theorems that follow).
Theorem 5.3.2. Suppose A is a 2 2 matrix with the two real, distinct, and non-zero eigenvalues

1
and
2
and corresponding eigenvectors v
1
and v
2
, respectively. Then the origin is the only
equilibrium solution of the dierential equation dx/dt = Ax and the following holds.
(a) If
1
,
2
are both negative, then lim
t
((x(t), y(t)) = (0, 0) for any solution (x(t), y(t)); in
particular, the origin is a sink. If an initial value (x
0
, y
0
) lies in either of the eigenspaces
Rv
1
or Rv
2
, then the solution curve remains in the eigenspace. All other solution curves are
tangent at the origin to the eigenspace corresponding to the eigenvalue with smaller absolute
value.
(b) If
1
,
2
are both positive, then lim
t
((x(t), y(t)) = (0, 0) for any solution (x(t), y(t)); in
particular, the origin is a source. If an initial value (x
0
, y
0
) lies in either of the eigenspaces
Rv
1
or Rv
2
, then the solution curve remains in the eigenspace. All other solution curves are
tangent at the origin to the eigenspace corresponding to the smaller eigenvalue.
(c) If
1
and
2
have dierent signs, then the origin is a saddle. If an initial value (x
0
, y
0
) lies
in the eigenspace corresponding to the negative eigenvalue, then the solution curve remains in
the eigenspace and approaches the origin as t ; this eigenspace is the stable eigenspace.
If an initial value (x
0
, y
0
) lies in the eigenspace corresponding to the positive eigenvalue, then
the solution curve remains in the eigenspace and approaches the origin as t ; this
eigenspace is the unstable eigenspace. All other solution curves become unbounded as t
and t ; they approach he unstable eigenspace as t and the stable eigenspace as
t .
Theorem 5.3.2 enables us to determine which type of equilibrium solution the origin is and also
to sketch phase portraits for a given dierential equation by only computing the eigenvalues and
eigenvectors of the coecient matrix. The following example demonstrates how this works.
Example 5.3.3. Classify the origin as to its type (saddle/sink/source) and sketch the phase portrait.
(a) dx/dt = 2x3y, dy/dt = 2x+y. The coecient matrix is A =
_
2 3
2 1
_
; its eigenvalues
are
1
= 4 and
2
= 1. Consequently, the origin is a saddle. Corresponding respective
eigenvectors are v
1
= (3, 2) and v
2
= (1, 1). The phase portrait is shown in Figure 5.4.
(b) dx/dt = 3x 4y, dy/dt = x + 5y. The matrix is A =
_
3 4
1 5
_
and its eigenvalues
are
1
= 4 +

5 and
2
= 4

5, which are both positive. So the origin is a source.


Corresponding eigenvectors are v
1
= (1

5, 1) and v
2
= (1 +

5, 1). The phase portrait is


shown in Figure 5.5.
5.3. CASE I: TWO REAL DISTINCT NON-ZERO EIGENVALUES 123
Figure 5.4: The phase portrait for part (a) of example 5.3.3; the origin is a saddle, the stable
eigenspace is
s
= R(1, 1), the unstable eigenspace is
u
= R(3, 2).
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
Figure 5.5: The phase portrait for part (b) of example 5.3.3; the origin is a source, the eigenspaces
are
1
= R(1

5, 1) and
2
= R(1 +

5, 1).
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
124 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
5.4 Case II: One Real Repeated Non-Zero Eigenvalue
We now investigate the case when the matrix A of a 2 2 linear system dx/dt = Ax has a real,
repeated, non-zero eigenvalue. In the following example we will encounter this situation in two
simple cases that serve as prototypes of the general case.
Example 5.4.1. Find the general solution of each of the following dierential equations.
(a)
_
dx/dt
dy/dt
_
=
_
2 0
0 2
__
x
y
_
(5.12)
Here, = 2 is an eigenvalue of multiplicity 2, and v
1
= (1, 0) and v
2
= (0, 1) are linearly
independent eigenvectors. Consequently, two solutions are x
1
(t) = e
2t
(1, 0) and x
2
(t) =
e
2t
(0, 1), and because they are linearly independent, span the solution space of the dierential
equation. The general solution is
_
x(t)
y(t)
_
= c
1
e
2t
_
1
0
_
+c
2
e
2t
_
0
1
_
=
_
c
1
e
2t
c
2
e
2t
_
.
The phase portrait of this dierential equation is shown in Figure 5.6. We can see that all
solution curves are straight lines through the origin. This can also be deduced from the
solution x = x(t) = c
1
e
2t
, y = y(t) = c
2
e
2t
because y/x = c
2
/c
1
is constant. Also, the origin
is a source.
Figure 5.6: The phase portrait for part (a) of example 5.4.1; the origin is a source; all solutions are
straight-line solutions.
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
(b)
_
dx/dt
dy/dt
_
=
_
2 1
0 2
__
x
y
_
(5.13)
5.4. CASE II: ONE REAL REPEATED NON-ZERO EIGENVALUE 125
Here, = 2 is an eigenvalue of multiplicity 2. Since A I =
_
2 1
0 2
_
=
_
0 1
0 0
_
when = 2, we obtain that v
2
= 0 for any eigenvector v = (v
1
, v
2
). This gives
that, e.g., (1, 0) is an eigenvector of A, and x
1
= e
2t
(1, 0) is a solution to the dierential
equation.
We need a second linearly independent vector w to obtain a general solution. To accomplish
this, note that the system is partially decoupled. The equation dy/dt = 2y gives y = c
2
e
2t
.
Now, we obtain dx/dt = 2x + y = 2x + c
2
e
2t
, which can be solved using, e.g., the
integrating factor method to obtain x = c
1
e
2t
+ c
2
te
2t
. Putting this together, the general
solution is
x = c
1
_
1
0
_
e
2t
+c
2
_
t
1
_
e
2t
. (5.14)
The phase portrait of this dierential equation is shown in Figure 5.7. As t , x(t) 0
and y(t) 0, so the origin is a sink. The line = R(1, 0) is the only straight-line solution.
Note that perhaps despite appearances all solution curves will becomes tangent to as
t . This follows from the fact that for x = c
1
e
2t
+ c
2
te
2t
and y = c
2
e
2t
, we have
x = c
1
c
1
2
y +ty, or y/x = 1/(c
1
c
1
2
+t), which approaches 0 as t .
Figure 5.7: The phase portrait for part (b) of example 5.4.1; the origin is a sink, and all solution
curves become tangent to the x-axis as they approach the origin.
2 1 1 2
x
2
1
1
2
y
The following theorem provides all necessary information related to the situation considered in
this section.
Theorem 5.4.1. Suppose A is a 2 2 matrix with the one real, repeated, and non-zero eigenvalue
. Then the origin is the only equilibrium solution of the dierential equation dx/dt = Ax and the
following holds.
126 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
(a) If has two linearly independent eigenvectors v
1
and v
2
, then any solution to the dierential
equation dx/dt = Ax is of the form
x(t) = c
1
e
t
v
1
+c
2
e
t
v
2
. (5.15)
Furthermore, the initial value problem dx/dt = Ax, x(t
0
) = x
0
, y(t
0
) = y
0
has a unique
solution. Every solution is a straight-line solution. Also,
if is negative, then lim
t
((x(t), y(t)) = (0, 0) for any solution (x(t), y(t)); in partic-
ular, the origin is a sink;
if is positive, then lim
t
((x(t), y(t)) = (0, 0) for any solution (x(t), y(t)); in partic-
ular, the origin is a source.
(b) If has only one linearly independent eigenvector v, and w is a vector so that (AI)w = v,
then any solution to the dierential equation dx/dt = Ax is of the form
x(t) = c
1
e
t
v +c
2
e
t
(w+tv). (5.16)
Furthermore, the initial value problem dx/dt = Ax, x(t
0
) = x
0
, y(t
0
) = y
0
has a unique
solution. Only = Rv is a straight-line solution. Also,
if is negative, then lim
t
((x(t), y(t)) = (0, 0) for any solution (x(t), y(t)); in partic-
ular, the origin is a sink. As t , all solution curves become tangent to .
If is positive, then lim
t
((x(t), y(t)) = (0, 0) for any solution (x(t), y(t)); in par-
ticular, the origin is a source. As t , all solution curves become tangent to .
Remark 5.4.1. In part (a) of the theorem above, the algebraic and geometric multiplicity of the
eigenvalue are both two; in part (b), the algebraic multiplicity is two, but the geometric multi-
plicity is one (one-dimensional eigenspace).
For a matrix A with eigenvalue and corresponding eigenvector v, a vector w with the property
that (A I)w = v is called a (second) generalized eigenvector. In part (b) of example 5.4.1, we
saw that v = (1, 0), and we can compute that (AI)w = v for w = (w
1
, w
2
) implies w
2
= 1, so
we may choose w = (0, 1), and equation (5.16) yields the solution (5.14).
As indicated in the previous section, we omit a formal proof of theorem 5.4.1. Many of the
results are clear from previous results. The verication of part (b) is the object of exercise 5.8.
Example 5.4.2. Find the general solution and sketch the phase portrait of the dierential equation
dx/dt = 5x+y, dy/dt = x+3y. The matrix is A =
_
5 1
1 3
_
; its only eigenvalue is
1
= 4. The
matrix A4I is
_
1 1
1 1
_
, so an eigenvector is v = (1, 1). We nd a generalized eigenvector
w = (w
1
, w
2
) by solving
_
1 1
1 1
__
w
1
w
2
_
=
_
1
1
_
,
which yields w
1
+w
2
= 1, so we may choose w
1
= 1 and w
2
= 0. According to equation (5.16), the
general solution is
_
x(t)
y(t)
_
= c
1
e
4t
_
1
1
_
+c
2
e
4t
__
1
0
_
+
_
t
t
__
,
5.5. CASE III: COMPLEX CONJUGATE EIGENVALUES 127
or x(t) = (c
1
+ c
2
+ c
2
t)e
4t
, y(t) = (c
1
tc
2
)e
4t
. The phase portrait is shown in Figure 5.8. The
origin is a source, and all solutions become tangent to the line : R(1, 1) as t . Note
that all solutions besides the straight-line solution appear to undergo a 180 degree rotation. The
orientation of this rotation can be established by choosing a test vector. For example, at the point
(0, 1), we obtain from the dierential equation that dx/dt = 1 and dy/dt = 3. Thus the tangent
vector to the solution curve through the point (0, 1) is (1, 3) which establishes a clockwise rotation
of the solution curves.
Figure 5.8: The phase portrait for example 5.4.2.
2 1 1 2
x
2
1
1
2
y
5.5 Case III: Complex Conjugate Eigenvalues
Example 5.5.1. Consider the system of linear equations
dx/dt = 2x + 5y (5.17)
dy/dt = 5x + 6y.
The characteristic equation is
2
4 + 13 = ( 2)
2
+ 9 = 0, so the matrix has the complex
conjugate eigenvalues = 2 3i. The corresponding eigenvectors can be found as usual. Suppose
= 2 + 3i; then we solve the system
_
2 5
5 6
__
v
1
v
2
_
=
_
2 (2 + 3i) 5
5 6 (2 + 3i)
__
v
1
v
2
_
=
_
0
0
_
.
This gives the equations (4 3i)v
1
+ 5v
2
= 0 and 5v
1
+ (4 3i)v
2
= 0, which are complex
number multiples of each other. Choosing v
1
= 5 and v
2
= 4 + 3i in the rst equation, we obtain
that v
1
= (5, 4 + 3i) is an eigenvector corresponding to
1
= 2 + 3i. It can easily be seen that
v
2
= (5, 4 3i) is an eigenvector corresponding to
2
= 2 3i. Theorem 5.2.1 tells us that z
1
(t) =
e
(2+3i)t
(5, 4+3i) and z
2
(t) = e
(23i)t
(5, 43i) are (complex) solutions to (5.17). Remark 5.2.1 gives
128 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
that their real and imaginary parts are also solutions. Since e
(2+3i)t
= e
2t
(cos(3t) + i sin(3t)), we
obtain that z
1
(t) = (5(e
2t
cos(3t) +e
2t
i sin(3t)), (4 + 3i)(e
2t
cos(3t) +e
2t
i sin(3t))) = (5e
2t
cos(3t) +
i5e
2t
sin(3t)), 4e
2t
cos(3t)3e
2t
sin(3t)+i(3e
2t
cos(3t)+4e
2t
sin(3t))). Extracting real and imaginary
parts, the general solution is
x(t) = c
1
_
5e
2t
cos(3t)
4e
2t
cos(3t) 3e
2t
sin(3t)
_
+c
2
_
5e
2t
sin(3t)
3e
2t
cos(3t) + 4e
2t
sin(3t)
_
.
The phase portrait of the system (5.17) is shown in Figure 5.9. The origin is a spiral source.
Figure 5.9: The phase portrait for example 5.5.1.
2 1 1 2
x
2
1
1
2
y
The relevant results regarding two-dimensional linear systems whose coecient matrix has com-
plex conjugate eigenvalues are stated here.
Theorem 5.5.1. Suppose A is a 2 2 matrix with two complex conjugate eigenvalues = i
( ,= 0) and corresponding complex conjugate eigenvectors v = (v
1
w
1
i, v
2
w
2
i). Then, a
complex-valued solution to the dierential equation dx/dt = Ax is of the form
z(t) = e
(+i)t
_
v
1
+w
1
i
v
2
+w
2
i
_
. (5.18)
Any solution to dx/dt = Ax can be expressed as a linear combination of the real and the imaginary
parts of (5.18). Furthermore, the initial value problem dx/dt = Ax, x(t
0
) = x
0
, y(t
0
) = y
0
has a
unique solution.
The origin is the only equilibrium solution of the dierential equation dx/dt = Ax and the
following holds.
(a) If > 0, then the solution curves spiral away from the origin and the origin is a spiral source.
(b) If < 0, then the solution curves spiral toward the origin and the origin is a spiral sink.
5.5. CASE III: COMPLEX CONJUGATE EIGENVALUES 129
(c) If = 0, then the solution curves are ellipses centered at the origin; i.e., the solutions are
periodic and the origin is a center.
In any case the period of the motion is T = 2/. In cases (a) and (b) this means that the
rst-return time to, e.g., the positive x-axis is T.
Remark 5.5.1. The orientation of the solution curves (clockwise or counter-clockwise) can be de-
termined by using a conveniently chosen test vector, as demonstrated in the following example.
Example 5.5.2. Find the general solution and sketch the phase portrait of each dierential equation.
(a)
_
dx/dt
dy/dt
_
=
_
1 2
2 1
__
x(t)
y(t)
_
.
The eigenvalues are = 1 2i, and corresponding eigenvectors are v = (i, 1). A complex
solution is
z(t) = e
(1+2i)t
_
i
1
_
= e
t
(cos(2t) +i sin(2t))
_
i
1
_
=
_
e
t
sin(2t) +ie
t
cos(2t)
e
t
cos(2t) +ie
t
sin(2t)
_
.
The real part of z(t) is x
1
(t) = (e
t
sin(2t), e
t
cos(2t)), and the imaginary part is x
2
(t) =
(e
t
cos(2t), e
t
sin(2t)). The general solution is x(t) = c
1
x
1
(t) +c
2
x
2
(t). Since the real part
of the eigenvalues = 12i is negative, the origin is a sink. The phase portrait is shown in
Figure 5.10a. Note that the orientation of the solution curves (in this case counter-clockwise)
can be determined from the original dierential equation by computing the tangent vector at
e.g. the point (0, 1). At that point, (dx/dt, dy/dt) = ((1) 0 + (2) 1, 2 0 + (1) 1) =
(2, 1), so the direction of the solution curve must be counter-clockwise (see also Figure
5.10b).
(b)
_
dx/dt
dy/dt
_
=
_
1 5
1 1
__
x(t)
y(t)
_
.
The eigenvalues are = 2i, and corresponding eigenvectors are v = (1 2i, 1). A complex
solution is
z(t) = e
2it
_
1 2i
1
_
= (cos(2t) +i sin(2t))
_
1 2i
1
_
=
_
cos(2t) + 2 sin(2t) +i(2 cos(2t) + sin(2t))
cos(2t) +i sin(2t)
_
.
By extracting the real and imaginary part, we see that the general solution is
x(t) = c
1
_
cos(2t) + 2 sin(2t)
cos(2t)
_
+c
2
_
2 cos(2t) + sin(2t)
sin(2t)
_
.
Since the real part of the eigenvalues = 2i is zero, the origin is a center. Testing for
orientation at, e.g., (1, 0) results in the tangent vector (dx/dt, dy/dt) = (1, 1), so the
motion is clockwise. The phase portrait is shown in Figure 5.11.
130 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
Figure 5.10: Left: the phase portrait for part (a) of example 5.5.2; the origin is a spiral sink.
Right: the tangent vector at the point (0, 1) (in black) gives that the direction of motion is counter-
clockwise.
2 1 1 2
x
2
1
1
2
y
2 1 1 2
x
2
1
1
2
y
Figure 5.11: The phase portrait for part (b) of example 5.5.2; the origin is a center and the direction
of motion is clockwise.
2 1 1 2
x
1.0
0.5
0.5
1.0
y
5.6. CASE IV: ZERO EIGENVALUES 131
5.6 Case IV: Zero Eigenvalues
Recall that a matrix A is singular precisely when it has = 0 as an eigenvalue. If v is a correspond-
ing eigenvector, then A(cv) = 0 for any c R. From the point of view of the dierential equation
dx/dt = Ax this means that every point on the line Rv is xed; that is, an equilibrium point. This
is fundamentally dierent from the situation encountered in the previous sections, where the origin
was the only equilibrium point. The following theorem summarizes the relevant information for a
2 2 matrix with zero eigenvalues.
Theorem 5.6.1. Suppose A is a 2 2 matrix with at least one zero eigenvalue.
(a) If the eigenvalue
1
= 0 has multiplicity 1 and corresponding eigenvector v
1
, and
2
,= 0 is
the other eigenvalue with corresponding eigenvector v
2
, then the initial value problem dx/dt =
Ax, x(t
0
) = x
0
has a unique solution that can be expressed in the form
x(t) = c
1
v
1
+c
2
e

2
t
v
2
. (5.19)
In particular, every point on the line = Rv
1
is a xed (equilibrium) point. If x
0
, , then
the solution to dx/dt = Ax, x(t
0
) = x
0
is a straight-line solution that approaches as t
if
2
< 0; and approaches as t if
2
> 0.
(b) If = 0 has multiplicity 2, then the matrix A is the zero matrix, and every point x is xed.
In other words, the initial value problem dx/dt = Ax, x(t
0
) = x
0
has the constant solution
x(t) = x
0
.
Example 5.6.1. Given the system
dx/dt = 2x y
dy/dt = 6x + 3y,
we can compute that the associated matrix has eigenvalues
1
= 0 and
2
= 5. Corresponding
respective eigenvectors are v
1
= (1, 2) and v
2
= (1, 3). The general solution is x(t) = c
1
c
2
e
5t
,
y(t) = 2c
1
+ 3c
2
e
5t
, and the phase portrait is shown in Figure 5.12.
5.7 The Trace-Determinant Plane
The theorems in the preceding sections gave us algebraic formulas for the solution of two-dimensional
linear systems with constant coecients. These formulas involved computing the eigenvalues and
eigenvectors of the coecient matrix. In this section, we focus on extracting geometric information
about the phase portrait without having to completely solve the system. As before, consider the
system
_
dx/dt
dy/dt
_
=
_
a b
c d
__
x
y
_
. (5.20)
Its characteristic equation is
det
_
a b
c d
_
=
2
(a +d) +ad bc =
2
T +D = 0, (5.21)
132 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
Figure 5.12: The phase portrait for example 5.6.1; the line = R(1, 2) consists entirely of xed
points.
2 1 1 2
x
2
1
1
2
y
where T = a + d is the trace, and D = ad bc is the determinant of the matrix in (5.20). The
eigenvalues of the matrix A are

1,2
=
T

T
2
4D
2
. (5.22)
Obviously, T =
1
+
2
and D =
1

2
. We consider the following cases.
Case I: D < 0. Since T
2
4D > T
2
0, the matrix A has two real, distinct eigenvalues.
Also, D =
1

2
< 0 implies that the eigenvalues of A are non-zero and have dierent signs.
It follows from theorem 5.3.2, part (c), that the origin is the only equilibrium solution, and a
saddle.
Case II: D > 0, T
2
4D > 0. We have that the eigenvalues of A are real and distinct, and
D =
1

2
> 0 implies that both eigenvalues have the same sign and are non-zero.
(a) If T > 0, T +

T
2
4D > 0. This means
1
> 0 and consequently
2
> 0. Part (b) of
theorem 5.3.2 gives that the origin is the only equilibrium solution, and a source.
(b) If T < 0, T

T
2
4D < 0. This means
2
< 0 and also
1
< 0. Part (a) of theorem
5.3.2 gives that the origin is the only equilibrium solution, and a sink.
Case III: D > 0, T
2
4D < 0. The matrix has complex conjugate eigenvalues
1,2
= i
( ,= 0). Note that in this situation, the trace of the matrix is T =
1
+
2
= 2.
(a) If T > 0, then > 0, so part (a) of theorem 5.5.1 shows that the origin is the only
equilibrium solution, and a spiral source.
(b) If T < 0, then < 0, so part (b) of theorem 5.5.1 shows that the origin is the only
equilibrium solution, and a spiral sink.
5.7. THE TRACE-DETERMINANT PLANE 133
(c) If T = 0, then = 0, so part (c) of theorem 5.5.1 shows that the origin is the only
equilibrium solution, and a center.
Case IV: D > 0, T
2
4D = 0. In this case, the matrix has a repeated, real eigenvalue
= T/2.
(a) If T > 0, then > 0, and theorem 5.4.1 asserts that the origin is the only equilibrium
solution, and a source.
(b) If T < 0, then < 0; theorem 5.4.1 asserts that the origin is the only equilibrium
solution, and a sink.
Case V: D = 0. In this case, the matrix is singular, and has innitely many equilibrium
solutions. Also,
1,2
= (T [T[)/2. Consequently, one eigenvalue is always zero, and the
other is equal to T.
(a) If T > 0, then A has a positive and a zero eigenvalue, and theorem 5.6.1 tells us that
there is a line comprised of equilibrium solutions, and all other solution curves move
towards this line as t .
(a) If T < 0, then A has a negative and a zero eigenvalue; theorem 5.6.1 tells us that there
is a line comprised of equilibrium solutions, and all other solution curves move towards
this line as t .
(c) If T = 0, then A has two zero eigenvalues (and thus is the zero matrix) every point is
an equilibrium point.
The information derived above can be summarized in a single graph the trace-determinant
plane. It is shown in Figure 5.13. Note that the parabola is given by the equation D = T
2
/4, or
T
2
4D = 0. Also, a point (T, D) lies below this parabola precisely when T
2
4D > 0.
Figure 5.13: The trace-determinant plane.
saddle
source sink source
spiral
source
spiral
sink
T
D
c
e
n
t
e
r
The trace-determinant plane provides a sort of (geographical) map that shows us the type of
equilibrium point depending on two coordinates: the trace and the determinant of the coecient
134 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
matrix. Any of the examples in the preceding sections of this chapter can be re-worked and the type
of the equilibrium points can be determined by simply reading out the trace and the determinant
of the coecient matrix. Computing eigenvectors and perhaps other test vectors provides more
geometric information, if applicable, about the exact location of straight line solutions or the
orientation of motion. The importance of the trace-determinant plane for geometric analysis of
two-dimensional autonomous systems cannot be over-emphasized: it completely classies the phase
portraits of linear systems. We will see the the next chapter that it can also be used (with some
additional generic assumptions) to analyze non-linear two-dimensional systems.
5.8 Bifurcations of Linear Systems
Suppose we have a two-dimensional system of the form dx/dt = A

x where is a real parameter


independent of x or t, and for a xed value of , A

is a constant coecient matrix. Then, the


trace and the determinant of this matrix depend on , and their values form a path (T

, D

) in
the trace-determinant plane (Figure 5.13). Whenever this path moves from one of the dierently
colored regions in the trace-determinant plane to another, a bifurcation (i.e. a fundamental change
in the orbit structure) occurs. Thus, the locus of (T

, D

) constitutes a bifurcation diagram for the


system dx/dt = A

x.
In the next example, we investigate how the phase portrait of a one-parameter family of linear
systems changes by considering a damped mass-spring system without external forcing (see also
section 4.1).
Example 5.8.1. Consider the free-response equation for a damped mass-spring system:
m x +c x +kx = 0. (5.23)
(This is equation (4.6) in section 4.1.)
Suppose the mass is m = 4 and the spring constant is k = 1. We vary the frictional coecient
c = 0. Then (5.23) becomes 4 x + x + x = 0 which we can convert to a rst-order linear
system using reduction of order as described in section 5.1. That is, let v = x; then, v = x and
4 x + x +x = 0 becomes v = (1/4)x (/4)v. Thus, the one-parameter family of linear systems
to investigate is
_
x
v
_
=
_
0 1
1/4 /4
__
x
v
_
. (5.24)
Its trace is T = /4, and its determinant is D = 1/4. Suppose we start with = 0 and increase
the value of (that is, we start with the frictionless mass-spring system, and progressively add
more damping to the system). Note that in this example T
2
4D = 0 corresponds to
2
/161 = 0,
or = 4. We observe the following geometric behavior for the solution curves.
If = 0, T = 0, D > 0, and T
2
4D < 0. The origin is a center (case III (c) in section 5.7).
Physically, this corresponds to the undamped case (constant amplitude motion for x).
If 0 < < 4, T < 0, D > 0, and T
2
4D < 0; The origin is a spiral sink (case III (b) in
section 5.7), and the system is under-damped (part (a) of theorem 4.1.2). The amplitude of
the motion decreases, and the displacement x oscillates about the equilibrium x

= 0.
5.9. SOLUTIONS TO MATRIX SYSTEMS 135
If = 4, T < 0, D > 0, and T
2
4D = 0. The origin is a sink (part (b) of case IV in section
5.7), and the system is critically damped (part (b) of theorem 4.1.2). The displacement x
returns to equilibrium without oscillations.
If > 4, T < 0, D > 0, and T
2
4D > 0. The origin is a sink (part (b) of case II in section
5.7), and the system is over-damped (part (c) of theorem 4.1.2). The displacement x returns
to equilibrium without oscillations.
To summarize: as we increase starting with = 0, we observe the following bifurcations: at
= 0, the center becomes a spiral sink; at = 4, the spiral sink becomes a regular sink. The
bifurcation path can be drawn into the trace-determinant as shown in Figure 5.14.
Figure 5.14: The path and the bifurcation values in the trace-determinant plane for example 5.8.1.
saddle
source sink source
spiral
source
spiral
sink
T
D
c
e
n
t
e
r
0
4
5.9 Solutions to Matrix Systems
We now consider matrix-vector systems dx/dt = Ax where x is an n-dimensional vector-valued
function of t, A is an n n matrix with constant coecients, and n may be greater than 2.
To formulate the results in this situation, we rst need to dene the exponential function of a
square matrix. Recall from calculus that the (scalar) exponential function is dened analytically
as
e
x
= 1 +x +
x
2
2!
+. . . +
x
k
k!
+. . . =

k=0
x
k
k!
.
Similarly, we dene:
Denition 5.9.1. If A is a square matrix, then
e
A
= I +A+
A
2
2!
+. . . +
A
k
k!
+. . . =

k=0
A
k
k!
. (5.25)
This leads to the following result about the solution to a matrix system.
136 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
Theorem 5.9.1. The system dx/dt = Ax has the solutions x(t) = e
At
x
0
, where x
0
is an n-
dimensional vector and x(0) = x
0
.
Proof. Obviously, x(0) = x
0
. We observe that
(d/dt)e
At
=
d
dt
_

k=0
(At)
k
k!
_
=

k=0
A
k
_
d
dt
__
t
k
k!
_
=

k=1
A
k
_
t
k1
(k 1)!
_
=

k=0
A
k+1
_
t
k
k!
_
= A

k=0
A
k
_
t
k
k!
_
= Ae
At
.
Hence, (d/dt)x(t) = (d/dt)e
At
x
0
= Ae
At
x
0
= Ax(t).
The question arises as to how we compute e
At
without using innite series. The following
results apply.
Theorem 5.9.2. (a) If = diag(
1
, . . . ,
n
) is a diagonal matrix, then
e
t
= diag(e

1
t
, . . . , e
nt
). (5.26)
(b) If U is invertible, and A = UBU
1
, then
e
At
= Ue
Bt
U
1
. (5.27)
Proof. Since (t)
k
= diag((
1
t)
k
, . . . , (
n
t)
k
),
e
t
=

k=0
(t)
k
k!
=

k=0
diag
_
(
1
t)
k
k!
, . . . ,
(
n
t)
k
k!
_
= diag
_

k=0
(
1
t)
k
k!
, . . . ,

k=0
(
n
t)
k
k!
_
= diag(e

1
t
, . . . , e
nt
).
Also, if A = UBU
1
, then
A
k
=
k times
..
(UBU
1
)(UBU
1
) . . . (UBU
1
) = UB
k
U
1
.
This means that
e
At
=

k=0
(At)
k
k!
=

k=0
U(Bt)
k
U
1
k!
= U
_

k=0
(Bt)
k
k!
_
U
1
= U(e
Bt
)U
1
.
Remark 5.9.1. Equations (5.26) and (5.27) can be used to nd the solutions to matrix systems
dx/dt = Ax where the matrix A is diagonalizable. A sucient condition for diagonalizability is
that an n n matrix has n distinct eigenvalues
1
, . . . ,
n
(see also theorem B.3.1 in appendix
B). In this case, the matrix U whose column vectors are the respective eigenvectors v
1
, . . . , v
n
is
invertible and A = U(diag(
1
, . . . ,
n
))U
1
. If the eigenvalues are all real, this method of nding
solutions is equivalent to the one used in section 5.3 for 2-dimensional systems.
5.9. SOLUTIONS TO MATRIX SYSTEMS 137
Example 5.9.1. Consider the initial value problem
x

(t) = 8x(t) 4y(t) 4z(t)


y

(t) = x(t) 7y(t) +z(t)


z

(t) = 13x(t) + 7y(t) z(t),


x(0) = 10, y(0) = 20, z(0) = 30. The eigenvalues of the corresponding matrix A are
1
= 12,

2
= 8,
3
= 4, with respective eigenvectors v
1
= (1, 0, 1), v
2
= (0, 1, 1), v
3
= (1, 1, 2).
Thus, if U = (v
1
, v
2
, v
3
), A = UU
1
, where = diag(12, 8, 4). By equation (5.26),
e
t
= diag(e
12t
, e
8t
, e
4t
). By equation (5.27), e
At
= U(diag(e
12t
, e
8t
, e
4t
))U
1
. According to
theorem 5.9.1, the solution to the initial value problem is
e
At
(10, 20, 30) = U(diag(e
12t
, e
8t
, e
4t
))U
1
(10, 20, 30)
= (15e
4t
5e
12t
, 5e
8t
+ 15e
4t
, 5e
8t
+ 30e
4t
+ 5e
12t
).
Generally, for any initial condition (x(0), y(0), z(0)) = (x
0
, y
0
, z
0
) = x
0
, we can write the solution
in the form
e
At
x
0
= U(diag(e
12t
, e
8t
, e
4t
))d
= d
1
e
12t
v
1
+d
2
e
8t
v
2
+d
3
e
4t
v
3
where d = (d
1
, d
2
, d
3
) = U
1
x
0
. Geometrically, this means:
If d
1
= 0, meaning that x
0
= U(0, d
2
, d
3
) = d
2
v
2
+ d
3
v
3
is in the plane T spanned by the
eigenvectors v
2
and v
3
, then the solution x(t) = e
At
x
0
will remain in T for any t R.
Furthermore since
2
= 8 and
3
= 4 are negative, lim
t
x(t) = 0 and lim
t
[x(t)[ =
if x
0
,= 0. The plane T is the stable eigenspace of the origin.
If d
2
= d
3
= 0, meaning that x
0
= U(d
1
, 0, 0) = d
1
v
1
is on the line spanned by the
eigenvector v
1
, then the solution x(t) = e
At
x
0
will remain in for any t R. Furthermore
since
1
= 12 is positive, lim
t
[x(t)[ = and lim
t
x(t) = 0 if x
0
,= 0. The line is
the unstable eigenspace of the origin.
Solutions with any other initial conditions x
0
,= 0 become unbounded both as t and
t . However, x(t) will approach the unstable eigenspace as t and the stable
eigenspace T as t .
If the matrix is not diagonalizable, the theory is not quite that straightforward. In general, any
square matrix A can be almost diagonalized, in the sense that we can nd a invertible matrix
U (possibly with complex number entries) so that A = UJU
1
, where J = + N with being
a diagonal matrix containing the (possibly complex, possibly repeated) eigenvalues of A, and N
being an n n matrix with zero entries except possibly 1s on the diagonal directly above the
main diagonal. J is the Jordan normal form of A. The matrix U is obtained by choosing the
eigenvectors and if necessary, the generalized eigenvectors as column vectors. Rather than delving
into the general theory of solving matrix systems like this, we will present three examples that
illustrate possible issues we may encounter.
138 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
Example 5.9.2. The matrix of the system
x

(t) = 2x(t) + 3y(t) 3z(t)


y

(t) = 6x(t) +y(t) + 3z(t)


z

(t) = 6x(t) + 3y(t) +z(t)


has the eigenvalue
1
= 8 and the repeated eigenvalue
2
= 4. An eigenvector associated with
1
is
v
1
= (1, 1, 1), and
2
has two linearly independent eigenvectors v
2
= (1, 0, 2) and v
3
= (1, 2, 0).
In this situation, the matrix A is diagonalizable in the same way as in example 5.9.1.
Proceeding as above, we obtain the general solution
e
At
x
0
= U(diag(e
8t
, e
4t
, e
4t
))U
1
x
0
= d
1
e
8t
v
1
+d
2
e
4t
v
2
+d
3
e
4t
v
3
where U = (v
1
, v
2
, v
3
) and d = (d
1
, d
2
, d
3
) = U
1
x
0
.
Here, the stable eigenspace is the line spanned by v
1
; the unstable eigenspace is the plane T
spanned by v
2
and v
3
. As before, these eigenspaces are invariant, i.e. solutions that start in these
sets stay in these sets. The asymptotic behavior of solutions is the following.
If x
0
, x
0
,= 0, then lim
t
x(t) = 0 and lim
t
[x(t)[ = .
If x
0
T, x
0
,= 0, then lim
t
[x(t)[ = and lim
t
x(t) = 0.
If x
0
, T, then lim
t
[x(t)[ = . In addition x(t) T as t and x(t) as
t .
Example 5.9.3. The matrix of the system
x

(t) = 0.5x(t) 1.5y(t) + 1.5z(t)


y

(t) = 0.5x(t) 2.5y(t) + 0.5z(t)


z

(t) = x(t) 2y(t)


has the eigenvalue
1
= 1 and the repeated eigenvalue
2
= 2. An eigenvector associated with

1
is v
1
= (1, 0, 1), and
2
has only one linearly independent eigenvector v
2
= (0, 1, 1). The
generalized eigenvector w associated with
2
= 2 is a solution to (A
2
I)w = v
2
, so we need
to nd w = (w
1
, w
2
, w
3
) so that
1.5w
1
1.5w
2
+ 1.5w
3
= 0
0.5w
1
0.5w
2
+ 0.5w
3
= 1
w
1
2w
2
+ 2w
3
= 1.
One solution is w = (1, 0, 1). For U = (v
1
, v
2
, w), we observe that
U
1
AU =
_
_
1 0 0
0 2 1
0 0 2
_
_
=
_
_
1 0 0
0 2 0
0 0 2
_
_
+
_
_
0 0 0
0 0 1
0 0 0
_
_
= +N.
5.9. SOLUTIONS TO MATRIX SYSTEMS 139
Now, we need to compute (+N)
k
. Since N = N and N
2
= 0
1
, we have by the binomial
theorem that (+N)
k
=
k
+k
k1
N. Dividing by k! gives
(+N)
k
k!
=

k
k!
+

k1
N
(k 1)!
=
_
_
1
k
/k! 0 0
0 (2)
k
/k! (2)
k1
/(k 1)!
0 0 (2)
k
/k!
_
_
for k > 0. Finally,
e
(+N)t
=
_
_

k=0
(t
k
/k!) 0 0
0

k=0
(2t)
k
/k! t

k=1
(2t)
k1
/(k 1)!
0 0

k=0
(2t)
k
/k!
_
_
=
_
_
e
t
0 0
0 e
2t
te
2t
0 0 e
2t
_
_
.
The appearance of the factor t in association with the repeated eigenvalue should not be sur-
prising. The general solution is
e
At
x
0
= Ue
(+N)t
U
1
x
0
= d
1
e
t
v
1
+d
2
e
2t
v
2
+d
3
e
2t
(w+tv
2
).
where U = (v
1
, v
2
, w) and d = (d
1
, d
2
, d
3
) = U
1
x
0
. Note the similarity with equation (5.16).
The geometry of the solution space is the following. The unstable eigenspace is the line spanned
by the eigenvector v
1
, the stable eigenspace is the plane spanned by the eigenvector v
2
and the
generalized eigenvector w.
Example 5.9.4. The matrix of the system
x

(t) = x(t) 2z(t)


y

(t) = x(t) +y(t) + 2z(t)


z

(t) = x(t) +z(t)


has the real eigenvalue
1
= 1 and the complex conjugate eigenvalues
2,3
= i. An eigenvector
associated with
1
is v
1
= (0, 1, 0), and v
2,3
= (1 i, i, 1) are eigenvectors for
2,3
= i.
We follow the usual steps using complex numbers along the way. Let U = (v
1
, v
2
, v
3
). Then,
U
1
AU = diag(1, i, i) = . Now, e
t
= diag(e
t
, e
it
, e
it
) and
Ue
t
U
1
=
_
_
(1/2)(e
it
+e
it
) + (i/2)(e
it
e
it
) 0 i(e
it
e
it
)
e
t
(1/2)(e
it
+e
it
) e
t
e
t
(1/2)(e
it
+e
it
) (i/2)(e
it
e
it
)
(i/2)(e
it
e
it
) 0 (1/2)(e
it
+e
it
) (i/2)(e
it
e
it
)
_
_
.
Since (1/2)(e
it
+e
it
) = cos t and (i/2)(e
it
e
it
) = sin(t), we obtain
e
At
= Ue
t
U
1
=
_
_
cos t sin t 0 2 sin t
e
t
cos t e
t
e
t
cos t + sin t
sin t 0 cos t + sin t
_
_
and x(t) = e
At
x
0
as usual.
1
Due to the fact that a nite power of N is the zero matrix, N is sometimes referred to as the nilpotent component
of the Jordan normal form.
140 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
Note that if x
0
= c
1
v
1
= (0, c
1
, 0), then x(t) = (0, c
1
e
t
, 0), so = Rv
1
is the unstable eigenspace
of the origin. Let w
1
= (1, 0, 1) be the real part of v
2
= (1+i, i, 1) and w
2
= (1, 1, 0) be the
imaginary part of v
2
= (1+i, i, 1). Then e
At
w
1
= (cos tsin t, sin t, cos t) = cos tw
1
sin tw
2
,
and e
At
w
2
= (cos t sin t, cos t, sin t) = sin tw
1
+ cos tw
2
. Thus, for x
0
= c
1
w
1
+ c
2
w
2
in the
plane T spanned by w
1
and w
2
, the trajectories e
At
x
0
: t R are circles in the w
1
w
2
-coordinate
system and ellipses in T.
The geometry of the solution space looks like this.
If x
0
, x
0
,= 0, then lim
t
[x(t)[ = and lim
t
x(t) = 0.
If x
0
T, x
0
,= 0, then the solution curves are bounded and periodic (ellipses). The plane T
is called the center eigenspace of the origin. Figure 5.15 shows trajectories in both and T.
If x
0
, T, then by the principle of superposition, the solutions x(t) spiral around and
become unbounded (albeit with bounded distance to ) as t ; if t , x(t) spiral
around , approach T, and follow the ellipses in T. Figure 5.16 shows two typical trajectories
in this situation.
Figure 5.15: Trajectories in the unstable eigenspace (the straight line) and in the center eigenspace
(ellipses) for example 5.9.4.
10
5
0
5
10
x
10
5
0
5
10
y
10
5
0
5
10
z
The methods described in this section provide a kind of royal road to solving any linear
system with constant coecients, and to investigating the geometric and asymptotic behavior of
solution curves. Thus, we can completely understand a linear dierential equation by re-casting it
into a linear algebra problem. This understanding will be fundamental for analyzing the non-linear
systems covered in the next chapter.
5.10. MATHEMATICA USE 141
Figure 5.16: Trajectories x(t) with x
0
= (6, 1, 6) and x
0
= (4, 2, 4) in example 5.9.4.
10
5
0
5
10
x
20
0
20
y
10
5
0
5
10
z
5.10 Mathematica Use
We present several examples involving Mathematica methods related to nding eigenvalues, eigen-
vectors, and solutions to matrix systems.
Example 5.10.1. Consider the system in example 5.9.1. Its matrix is entered as a list of row vectors.
The command MatrixForm displays the matrix in standard form.
A 8, 4, 4, 1, 7, 1, 13, 7, 1
A MatrixForm
8, 4, 4, 1, 7, 1, 13, 7, 1
8 4 4
1 7 1
13 7 1
The list l contains the eigenvectors and the matrix U the eigenvectors as row vectors (hence the
use of the Transpose command.
l EigenvaluesA
U TransposeEigenvectorsA
12, 8, 4
1, 0, 1, 0, 1, 1, 1, 1, 2
We dene the diagonal matrix e
t
and generate the solution.
142 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
S DiagonalMatrixMapExp, l t
U.S.InverseU.10, 20, 30 Simplify Expand

12 t
, 0, 0, 0,
8 t
, 0, 0, 0,
4 t

15
4 t
5
12 t
, 5
8 t
15
4 t
, 5
8 t
30
4 t
5
12 t

Alternatively, we can solve the initial value problem using DSolve. Note that A[[i]] refers to
the ith row of the matrix A.
DSolvex't A1.xt, yt, zt,
y't A2.xt, yt, zt, z't A3.xt, yt, zt,
x0 10, y0 20, z0 30, xt, yt, zt, t Expand
xt 15
4 t
5
12 t
, yt 5
8 t
15
4 t
, zt 5
8 t
30
4 t
5
12 t

Example 5.10.2. For the system in example 5.9.3, there is only one linearly independent eigenvector
corresponding to the eigenvalue = 2.
A 1 2, 3 2, 3 2, 1 2, 5 2, 1 2, 1, 2, 0;
l EigenvaluesA
EigenvectorsA
2, 2, 1
0, 1, 1, 0, 0, 0, 1, 0, 1
We can nd the generalized eigenvector by solving the corresponding linear system and choosing
e.g. z = 1.
SolveA 2 IdentityMatrix3.x, y, z 0, 1, 1, x, y, z Quiet
x 1, z 1 y
Example 5.10.3. In example 5.9.4, we have complex conjugate eigenvalues and eigenvectors. We
arrange them in a slightly dierent order than Mathematica does.
A 1, 0, 2, 1, 1, 2, 1, 0, 1
l TableEigenvaluesAi, i, 3, 1, 2
U TransposeTableEigenvectorsAi, i, 3, 1, 2
1, 0, 2, 1, 1, 2, 1, 0, 1
1, ,
0, 1 , 1 , 1, , , 0, 1, 1
The (complex, un-simplied) solution is produced here.
5.11. EXERCISES 143
S DiagonalMatrixMapExp, l t;
B U.S.InverseU Expand

1
2

1
2

t
, 0,
t

t
,

1
2

t
2

t
,
t
,
1
2

1
2

t

t
,

1
2

t

1
2

t
, 0,
1
2

1
2

The command ComplexExpand reduces to real variables.


B U.S.InverseU ComplexExpand
Cost Sint, 0, 2 Sint,

t
Cost,
t
,
t
Cost Sint, Sint, 0, Cost Sint
Finally, the graphs in Figures 5.15 and 5.16 may be produced as follows.
ParametricPlot3D
TableB.c, c, 0, 2, 0, 0, 2, 0, 2, 0, 2, 4, 0, 4, 6, 0, 6, 8, 0, 8,
t, 10, 10, PlotStyle Thick, LabelStyle Medium,
PlotRange 12, 12, 12, 12, 12, 12, AxesLabel "x", "y", "z"
ParametricPlot3DTableB.c, c, 6, 1, 6, 4, 2, 4,
t, 20, 20, PlotStyle Thick, Blue, LabelStyle Medium,
PlotRange 12, 12, 32, 32, 12, 12, AxesLabel "x", "y", "z"
5.11 Exercises
Exercise 5.1. Find the general solution and sketch the phase portrait for each system of linear dif-
ferential equations. Include important features of the phase portrait, such as straight-line solutions,
and direction and orientation of motion (whenever applicable).
(a)
dx/dt = 3x + 2y
dy/dt = 2y
(b)
dx/dt = 2x 2y
dy/dt = x 3y
(c)
dx/dt = 2y
dy/dt = 2x
(d)
dx/dt = x + 2y
dy/dt = x y
(e)
dx/dt = 2x 4y
dy/dt = x y
144 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
(f)
dx/dt = 2x 6y
dy/dt = 2x +y
(g)
dx/dt = 12x + 4y
dy/dt = x 8y
(h)
dx/dt = x y
dy/dt = y x
(i)
dx/dt = y
dy/dt = x
(j)
dx/dt = x 2y
dy/dt = 2y
(k)
dx/dt = x +y
dy/dt = 2x
(l)
dx/dt = x 5y
dy/dt = x 3y
Exercise 5.2. Compute the trace and the determinant for each of the systems in exercise 5.1 and
use the trace-determinant plane to conrm the general shape of the phase portraits.
Exercise 5.3. Given the eigenvalues and eigenvectors of the matrix A, write down the general
solution to the system dx/dt = Ax.
(a)
1
= 2, v
1
= (1, 1);
2
= 1, v
2
= (0, 1)
(b)
1,2
= 2 3i, v
1,2
= (1 i, 2)
(c)
1
= 3, v
1
= (2, 1);
2
= 2, v
2
= (1, 1)
(d)
1,2
= 1 i, v
1,2
= (1, i)
Exercise 5.4. Sketch the phase portrait of the systems dx/dt = Ax given in exercise 5.3. If
applicable, include all straight-line solutions and appropriate tangencies.
Exercise 5.5. Describe the sequence of bifurcations of the one-parameter family of linear equations.
Include a trace-determinant diagram and nd the exact values of where the bifurcations occur.
(a)
dx/dt = 2x +y
dy/dt = x + 5y
(b)
dx/dt = x +y
dy/dt = x
(c)
dx/dt = 2x +y
dy/dt = x y
(d)
dx/dt = x +y
dy/dt = x y
5.11. EXERCISES 145
Exercise 5.6. Consider the family of linear systems
dx
dt
= (6 cos )x (9 sin )y (5.28)
dy
dt
= (4 sin )x + (6 cos )y,
where 0 .
(a) Use the trace-determinant plane to describe the sequence of bifurcations as increases from
0 to .
(b) Consider the function V (x, y) = (x/3)
2
+ (y/2)
2
. Compute the derivative
d
dt
V (x(t), y(t))
for solution curves to (5.28). Interpret this result, and conrm the observations in part (a).
Hint: Observe that the contour curves V (x, y) = C are ellipses. If a solution curve starts on
one of these ellipses, how does C change?
Exercise 5.7. Prove the tangency statements in parts (a) and (b) of theorem 5.3.2. Hint: Look at
the quotient dy/dx = (dy/dt)/(dx/dt).
Exercise 5.8. Prove part (b) of theorem 5.4.1. You may assume uniqueness of the solution to the
initial value problem.
Exercise 5.9. Let v
1
, w
1
, v
2
, w
2
be as in equation (5.18). Let = v
1
w
2
v
2
w
1
. Show that if v
2
/ < 0
or w
1
/ < 0, then the orientation of motion is counter-clockwise; if v
2
/ > 0 or w
1
/ > 0, then
the orientation of the motion is clockwise. Hint: use (1, 0) and (0, 1) as test vectors when t = 0.
Exercise 5.10. Let C : (x(s), y(s)) be a curve in the plane which is parametrized by arc length. If
(s) is the curvature of C, then the following dierential equations hold:
x

(s) = (s)y

(s)
y

(s) = (s)x

(s).
Suppose C : (x(s), y(s)) has constant curvature. Show that C must be a circle of radius 1/. Hint:
parametrization by arc length means that (x

(s))
2
+ (y

(s))
2
= 1.
Exercise 5.11. Find the general solution each system of linear dierential equations. Determine the
geometry of the solution space by identifying stable, unstable, or center eigenspaces, and state the
asymptotic behavior of solutions.
(a)
dx/dt = 5x
dy/dt = 2y 2z
dz/dt = y 3z
(b)
dx/dt = x/

2 +y/

2
dy/dt = x/

2 +y/

2
dz/dt = z
146 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS
(c)
dx/dt = x y
dy/dt = y
dz/dt = 2z
(d)
dx/dt = 2x 2y 10z
dy/dt = 3x y + 15z
dz/dt = x +y +z
(e)
dx/dt = 2.8x + 3.2y + 1.6z
dy/dt = 2.2x + 3.8y + 1.4z
dz/dt = 2x 2y
(f)
dx/dt = 3x 2y 2z
dy/dt = 13x 7y 11z
dz/dt = 14x + 8y + 11z
Exercise 5.12. Provide a classication of three-dimensional linear systems with constant coecients
based on their spectra, that is on their set of eigenvalues, for the following situations.
(a) The origin is a sink.
(b) The origin is a source.
(c) The origin has a two-dimensional center eigenspace and a one-dimensional unstable eigenspace.
(d) The origin has a two-dimensional unstable eigenspace and a one-dimensional stable eigenspace.
Exercise 5.13. Using the classications in exercise 5.12, and perhaps other similar results, to inves-
tigate the bifurcations of the linear system
dx/dt = (1 +)x + 2z
dy/dt = x +y
dz/dt = x z
for 0 1.
Chapter 6
Two-Dimensional Non-Linear Systems
6.1 Equilibrium Points and Stability
We now consider two-dimensional, autonomous non-linear rst-order systems of dierential equa-
tions. They can be written in the form
dx/dt = f(x, y) (6.1)
dy/dt = g(x, y).
We begin this section by stating (without proof) the existence and uniqueness theorem for the
systems considered here.
Theorem 6.1.1. Suppose the functions f(x, y) and g(x, y) and their partial derivatives (f/x)(x, y),
(f/y)(x, y), (g/x)(x, y) and (g/y)(x, y) are continuous on some open rectangle containing
the point (x
0
, y
0
). Then there exists a unique solution (x(t), y(t)) to the initial value problem
dx/dt = f(x, y), dy/dt = g(x, y), (x(t
0
), y(t
0
)) = (x
0
, y
0
) (6.2)
dened on some open interval containing t
0
.
It is almost never possible to nd an algebraic solution for a given non-linear system, so we will
have to usually restrict ourselves to establishing a phase portrait. To accomplish this, we take an
approach similar to the one in chapter 5 we nd the equilibrium points and then determine their
type to draw the phase portrait. This leads to the following denitions.
Denition 6.1.1. An equilibrium point (or critical point) of the system (6.1) is a point (x

, y

) so
that f(x

, y

) = 0 and g(x

, y

) = 0.
In other words, if (x

, y

) is an equilibrium point, then (x(t), y(t)) = (x

, y

) is a constant solu-
tion to (6.1). For linear systems with constant coecients whose matrix has non-zero eigenvalues,
the origin is the only equilibrium point; otherwise, the linear system has a whole line consisting of
equilibrium points, or the entire plane consists of equilibrium points
1
. Non-linear systems, on the
other hand, may have any number (none, nitely many or innitely many) equilibrium points.
1
In other words, for linear systems, the set of equilibrium points is a linear subspace of R
2
.
147
148 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Example 6.1.1. To nd all equilibrium points of the system
dx/dt = 2x + 2x
2
dy/dt = 3x +y + 3x
2
.
We need to solve the system of equations 2x + 2x
2
= 0, 3x + y + 3x
2
= 0. The rst equation
becomes 2(x
2
x) = 2x(x 1) = 0, which has the solutions x

1
= 0 and x

2
= 1. Using x

1
= 0 in
the second equation gives y

1
= 0 and using x

2
= 1 in the second equation gives y

2
= 0. Hence, the
equilibrium points are (x

1
, y

1
) = (0, 0) and (x

2
, y

2
) = (1, 0).
In this example, the equilibrium points were easy to nd algebraically, partially because the
system is decoupled the rst equation depends only on x. Generally, nding the equilibrium
points of a system of the form (6.1) requires solving a non-linear system of two equations.
In chapter 5 we saw that equilibrium points for linear systems may be classied according to
their geometric type. That is, an equilibrium point for a linear system might be a sink, a spiral sink,
a saddle, etc. For non-linear systems, we are interested in whether an equilibrium point is stable,
asymptotically stable, or unstable (see the following denition). This classication is coarser than
for the linear case; however, there are many more dierent geometric types of equilibrium solutions
for non-linear systems, and the analysis to completely classify them is much more onerous than for
linear systems.
Denition 6.1.2. Let (x

, y

) be an equilibrium point of a non-linear system and let (x(t), y(t)) be


the solution to the initial value problem dx/dt = f(x, y), dy/dt = g(x, y), (x(t
0
), y(t
0
)) = (x
0
, y
0
).
(a) The equilibrium point (x

, y

) is stable if for any > 0 there exists a > 0 so that whenever


an initial condition (x
0
, y
0
) satises
_
(x

x
0
)
2
+ (y

y
0
)
2
< , then
_
(x

x(t))
2
+ (y

y(t))
2
< (6.3)
for all t t
0
.
(b) The equilibrium point (x

, y

) is asymptotically stable if it is stable and there exists a


0
> 0
so that whenever an initial condition (x
0
, y
0
) satises
_
(x

x
0
)
2
+ (y

y
0
)
2
<
0
, then lim
t
(x(t), y(t)) = (x

, y

). (6.4)
(c) The equilibrium point (x

, y

) is unstable if it is not stable.


Remark 6.1.1. In other words, an equilibrium point is stable if we can guarantee that forward
trajectories starting near the equilibrium point (measured by the distance ) will stay arbitrarily
close to the equilibrium point (measured by the distance ). Asymptotic stability means that, in
addition, if we are suciently close to the equilibrium point, the forward trajectories will actually
converge to the equilibrium point.
If we consider the types of critical points we encountered in chapter 5 for linear systems, we
can conclude that sinks and spiral sinks are asymptotically stable; a center is stable, but not
asymptotically stable; and sources, spiral sources, and saddles are unstable.
The following example shows that the geometric types present for linear systems are not the
only possible ones for non-linear systems.
6.2. LINEARIZATION AND HARTMANS THEOREM 149
Example 6.1.2. The phase portrait for the system
dx/dt = 2xy +x
2
(6.5)
dy/dt = y
2
+ 2xy
is shown in Figure 6.1. Note that (0, 0) is the only equilibrium point. We can deduce some of the
information in the phase portrait by observing the following.
If x = 0, then dx/dt = 0 and dy/dt = y
2
; so the y-axis is a straight-line solution and the
origin is a node for this solution.
If y = 0, then dy/dt = 0 and dx/dt = x
2
; so the x-axis is a straight-line solution and the
origin is a node for this solution.
If y = x, then dx/dt = 3x
2
and dy/dt = 3x
2
, so dy/dx = (dy/dt)/(dx/dt) = 1. This
means the line y = x is a straight-line solution and the origin is a node for this solution.
If y = x, then dx/dt = x
2
and dy/dt = x
2
; so dy/dx = 1 and all solutions passing through
the line y = x are orthogonal to y = x.
If x < 0 and y > 0, then dx/dt > 0 and dy/dt < 0, thus dy/dx < 0; the same is true for x > 0
and y < 0. In other words, in the interior of quadrant II or IV, the solution curves always
have negative slope.
Note that we used that dy/dx = (dy/dt)/(dx/dt) to deduce some geometric information about
solution curves. Generally, we can think of the system (6.5) as being equivalent to the single
rst-order dierential equation
dy
dx
=
y
2
+ 2xy
2xy +x
2
.
At rst glance, this might suggest that we should turn to chapter 1 for methods of solving or
analyzing systems of the form (6.1) since they can be written as rst-order (non-autonomous)
dierential equations dy/dx = g(x, y)/f(x, y). However, as we will see shortly, the integration
methods in that chapter are usually inadequate to solving these systems. Indeed, in the next
section, we will develop a beautiful and powerful structure theory for equations of the form (6.1).
6.2 Linearization and Hartmans Theorem
We would like to analyze the geometric behavior of solution curves of non-linear autonomous
systems near an equilibrium point. The main tool we will use is that of using a linear approximation
of the non-linear function (x, y) (f(x, y), (g(x, y)) near the equilibrium point. The following
denition makes this more precise.
Denition 6.2.1. If dx/dt = f(x, y), dy/dt = g(x, y) is a non-linear system and (x

, y

) is an
equilibrium point for this system, then the linearized system or the linearization near (x

, y

) is
dx/dt = f
x
(x

, y

)x +f
y
(x

, y

)y (6.6)
dy/dt = g
x
(x

, y

)x +g
y
(x

, y

)y.
150 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Figure 6.1: The phase portrait for example 6.1.2.
2 1 1 2
x
2
1
1
2
y
Note that the linearized system is a linear system of dierential equations with coecient matrix
A = A
(x

,y

)
=
_
f
x
(x

, y

) f
y
(x

, y

)
g
x
(x

, y

) g
y
(x

, y

)
_
. (6.7)
Thus, (x, y) A
(x

,y

)
(x, y) is the total derivative of the function (x, y) (f(x, y), (g(x, y)) at
the equilibrium point. We compute the linearization of the system in example 6.1.1.
Example 6.2.1. We saw that the equilibrium points of the system
dx/dt = 2x + 2x
2
(6.8)
dy/dt = 3x +y + 3x
2
are (x

1
, y

1
) = (0, 0) and (x

2
, y

2
) = (1, 0). Since f(x, y) = 2x + 2x
2
and g(x, y) = 3x + y + 3x
2
,
the matrix in (6.7) becomes
A
(x,y)
=
_
f
x
(x, y) f
y
(x, y)
g
x
(x, y) g
y
(x, y)
_
=
_
2 + 4x 0
3 + 6x 1
_
.
If (x

1
, y

1
) = (0, 0), then A
(0,0)
=
_
2 0
3 1
_
. If we analyze the associated linear system
(dx/dt, dy/dt) = A
(0,0)
(x, y), we see that the coecient matrix has the eigenvalues
1
= 2
and
2
= 1, and associated eigenvectors are v
1
= (1, 1) and v
2
= (0, 1). The origin is a
saddle, and the phase portrait of the linearized system near (0, 0) is shown in Figure 6.2a.
If (x

1
, y

1
) = (1, 0), then A
(1,0)
=
_
2 0
3 1
_
. The coecient matrix A
(1,0)
of the associated
linear system has the eigenvalues
1
= 2 and
2
= 1, and associated eigenvectors are v
1
=
(1, 3) and v
2
= (0, 1). The origin is a source, and the phase portrait of the system is shown
in Figure 6.2b.
6.2. LINEARIZATION AND HARTMANS THEOREM 151
Figure 6.2: The phase portraits for the linearized systems: (a) near (0, 0) (left); (b) near (1, 0)
(right) in example 6.2.1.
2 1 1 2
x
2
1
1
2
y
2 1 1 2
x
2
1
1
2
y
If we assume (and for this example, we will be justied in this assumption by Hartmans theorem
which is stated below) that near each equilibrium point, the linearized system looks like the non-
linear system, then we may merge the two phase portraits in Figure 6.2 into a single phase portrait
for the non-linear system. Keep in mind that the origin for the phase portrait in Figure 6.2b
corresponds to the equilibrium point (1, 0). This process indeed gives us a plausible phase portrait
for the non-linear system (6.8) which is shown in Figure 6.3.
The observation that the phase portrait near an equilibrium point looks like the phase portrait
of the linearized system is the subject of the next theorem. It provides the perhaps most powerful
tool in analyzing non-linear systems. Before we can accurately state it, we need to make some
denitions.
Denition 6.2.2. Let (x

, y

) be an equilibrium point of a non-linear system of the form dx/dt =


f(x, y), dy/dt = g(x, y). The equilibrium point is called hyperbolic if none of the eigenvalues of the
associated matrix A
(x

,y

)
in equation (6.7) have zero real part.
Remark 6.2.1. Recall that if the matrix A
(x

,y

)
has trace T and determinant D, then the eigen-
values are given by
=
T
2

T
2
4D
2
.
Thus an equilibrium point is non-hyperbolic if and only if the associated matrix has either D = 0
(corresponding to the T-axis in the trace-determinant plane) or T = 0 and D > 0 (corresponding
to the positive D-axis in the trace-determinant plane).
Denition 6.2.3. Suppose (x

, y

) is an equilibrium point of a non-linear system of the form


dx/dt = f(x, y), dy/dt = g(x, y).
(a) Let W
s
(x

, y

) denote the set of all initial points (x


0
, y
0
) so that the corresponding solution
(x(t), y(t)) has the property that lim
t
(x(t), y(t)) = (x

, y

). This set is called the stable


manifold of the equilibrium point (x

, y

).
152 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Figure 6.3: The phase portrait for example 6.2.1. Note that near the equilibrium (0, 0), the phase
portrait looks like the one in Figure 6.2a; near (1, 0), it looks like the one in Figure 6.2b.
1.5 1.0 0.5 0.5 1.0 1.5 2.0
x
1.5
1.0
0.5
0.5
1.0
1.5
2.0
y
(b) Let W
u
(x

, y

) denote the set of all initial points (x


0
, y
0
) so that (x(t), y(t)) has the property
that lim
t
(x(t), y(t)) = (x

, y

). This set is called the unstable manifold of the equilibrium


point (x

, y

).
Example 6.2.2. For the system in example 6.2.1, both equilibrium points are hyperbolic. The
unstable manifold of the origin is the y-axis: W
u
(0, 0) = (x, y) : x = 0. The unstable man-
ifold of the equilibrium point (1, 0) is the entire half-plane to the right of the y-axis; that is,
W
u
(1, 0) = (x, y) : x > 0. The stable manifold of (1, 0) consists only of the equilibrium point
itself: W
s
(1, 0) = (1, 0). The stable manifold W
s
(0, 0) of the origin is shown in red in Figure 6.4.
The curves W
s
(0, 0), W
u
(0, 0) and = (1, 0) + R(0, 1) are separatrices. They separate the phase
portrait into ve open regions or sectors, as shown in Figure 6.5. The branch of W
s
(0, 0) in the
rst quadrant it is called a connecting separatrix because it connects the two equilibrium points
(0, 0) and (1, 0). Note that the asymptotic behavior of x(t) and y(t) depends on which sector the
initial point is in, as detailed here.
If (x
0
, y
0
) lies in sector I, then x(t) 0 and y(t) as t ; in particular, the
forward trajectories approach the unstable manifold W
u
(0, 0) of the origin. Also, as t ,
x(t), y(t) , and (x(t), y(t)) W
s
(0, 0).
If (x
0
, y
0
) lies in sector II, then x(t) 0 and y(t) as t , in particular (x(t), y(t))
W
u
(0, 0). If t , x(t), y(t) , and (x(t), y(t)) W
s
(0, 0).
If (x
0
, y
0
) lies in sector III, then x(t) 0 and y(t) as t , in particular
(x(t), y(t)) W
u
(0, 0). As t , (x(t), y(t)) W
s
(1, 0) = (1, 0).
If (x
0
, y
0
) lies in sector IV, then x(t) and y(t) as t . Also, (x(t), y(t)) (1, 0)
as t .
6.2. LINEARIZATION AND HARTMANS THEOREM 153
If (x
0
, y
0
) lies in sector V, then x(t) 0 and y(t) as t , in particular (x(t), y(t))
W
u
(0, 0). Also, (x(t), y(t)) (1, 0) as t .
Figure 6.4: The phase portrait for example 6.2.1 the stable manifold of the equilibrium point
(0, 0) is shown in red.
1.5 1.0 0.5 0.5 1.0 1.5 2.0
x
1.5
1.0
0.5
0.5
1.0
1.5
2.0
y
We need to make precise what it means for two phase portraits to look like each other.
Denition 6.2.4. A matrix-valued function P : R
2
R
22
is said to be a continuous change of
coordinates of R
2
if:
(a) for any (x, y), the 2 2 matrix P(x, y) is invertible;
(b) both (x, y) P(x, y) and (x, y) P
1
(x, y) are continuous.
Note that the fact that P : R
2
R
22
, (x, y) P(x, y) is continuous means that each of the
four components of P(x, y) is a continuous function of (x, y).
In eect, the statement that one phase portrait looks like another can be expressed as saying
that there is a continuous change of coordinates so that one phase portrait is the image of the other
under this change of coordinates. The application of P(x, y) distorts the phase portrait near the
equilibrium point, but its geometric type is preserved. We are now in a position to state Hartmans
theorem.
Theorem 6.2.1. (Hartman) Suppose (x

, y

) is a hyperbolic equilibrium point of the non-linear


system dx/dt = f(x, y), dy/dt = g(x, y). Then there exists a continuous change of coordinates
P(x, y) with the property that P(0, 0) = (x

, y

) and so that near the equilibrium point (x

, y

)
the phase portrait of the non-linear system is the image under P(x, y) of the phase portrait of the
linearized system (dx/dt, dy/dt) = A
(x

,y

)
(x, y).
In addition, if we restrict ourselves to a (possibly small) neighborhood of (x

, y

), the change of
coordinates P(x, y) is not very much dierent from the shift transformation P
0
(x, y) = (x+x

, y +
y

).
In particular, we have that an equilibrium point (x

, y

) is:
154 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Figure 6.5: The ve sectors for example 6.2.1.
I
II III
IV
V
1.5 1.0 0.5 0.5 1.0 1.5 2.0
x
1.5
1.0
0.5
0.5
1.0
1.5
2.0
y
(a) asymptotically stable if both eigenvalues
1
,
2
of the associated matrix A
(x

,y

)
have real
parts less than zero;
(b) unstable if at least one of the eigenvalues
1
,
2
of the associated matrix A
(x

,y

)
has real part
greater than zero.
Remark 6.2.2. The proof of Hartmans theorem is beyond the scope of this undergraduate text.
We are however able to deduce the results about the stability of the equilibrium points. The
results in chapter 5 tell us that for a linear system, the origin is a sink or a spiral sink, and hence
asymptotically stable, if both eigenvalues have negative real parts; also, if the origin is a saddle, a
source, or a spiral source, then at least one eigenvalue has positive real part. By the rst part of
Hartmans theorem, this carries over to the non-linear system. Note however, that if an eigenvalue
has zero real part, the equilibrium point in question is not hyperbolic, and theorem 6.2.1 does not
apply.
The second paragraph in Hartmans theorem tells us that if we are close enough to a hyperbolic
equilibrium point the phase portrait of the linearized system is shifted from the origin to the
equilibrium point (x

, y

) with negligible distortion. In other words, we may obtain a picture of


the orbit structure near a hyperbolic equilibrium point by simply taking the phase portrait near
the origin of the linearized system and cut-and-paste it without any rotations or other distortion
into the phase portrait of the non-linear system. Refer to Figure 6.2 and 6.3 for an illustration of
this process. In particular this means that the actual solution curves of the non-linear system are
tangent to the corresponding solution curves of the linearized systems at the equilibrium point.
Remark 6.2.3. If the matrix A
(x

,y

)
has a pair of complex conjugate eigenvalues with zero real part

1,2
= i and ,= 0, then the trace of A
(x

,y

)
is zero, and the determinant is positive. Although
(x

, y

) is non-hyperbolic in this case, it can be shown that (x

, y

) can be either a center, a spiral


source, or a spiral sink. This is plausible, since these cases correspond to being on the positive
D-axes, or in one of the regions adjacent to the positive D-axis in the trace-determinant plane (see
Figure 5.13).
6.2. LINEARIZATION AND HARTMANS THEOREM 155
The next example shows us a case in which this linearization method fails because the equilib-
rium point is non-hyperbolic.
Example 6.2.3. The system dx/dt = 2xy +x
2
, dy/dt = y
2
+2xy in example 6.1.2 has (x

, y

) =
(0, 0) as its only equilibrium point. The linearization matrix is
A
(x

,y

)
=
_
2y

+ 2x

2x

2y

2y

+ 2x

_
,
which becomes the zero matrix when (x

, y

) = (0, 0). So the origin is non-hyperbolic, and Hart-


mans theorem does not apply. Indeed, we already saw that the phase portrait of this system
(Figure 6.1) does not look like any of the possible phase portraits for linear systems.
The example presented next serves of how the linearization method (as justied by Hartmans
theorem) is employed. It involves three steps:
(1) Find all equilibrium points.
(2) Establish the local phase portrait near each hyperbolic equilibrium point.
(3) Merge the local information into a plausible phase portrait for the non-linear system.
Example 6.2.4. We use the linearization method to extract as much information as possible about
the phase portrait of the system
dx/dt = 2x +y (6.9)
dy/dt = y +x
2
.
(1) We rst nd all equilibrium points. We need to solve the non-linear system 2x + y = 0,
y +x
2
= 0. Addition of these two equations gives x
2
2x = 0, which means x = 0 or x = 2.
If x = 0, the rst (or the second) equation gives y = 0; if x = 2, the rst (or the second)
equation gives y = 4. So the two equilibrium points are (x

1
, y

1
) = (0, 0) and (x

2
, y

2
) = (2, 4).
(2) The matrix of the linearized system is
A
(x

,y

)
=
_
2 1
2x

1
_
.
(a) If (x

1
, y

1
) = (0, 0), this matrix is
_
2 1
0 1
_
, which has eigenvalues
1
= 2 and

2
= 1; so the origin is a hyperbolic equilibrium point and Hartmans theorem applies.
Since both eigenvalues are negative, the origin is a sink. Corresponding eigenvectors
are v
1
= (1, 0) and v
2
= (1, 1). All solution curves near the origin approach the origin
and are tangent to the line
2
= R(1, 1) (the slower eigenspace of the linearized system),
except the two solution curves that correspond to the faster eigenspace
1
= R(1, 0) of
the linearized system (i.e. the x-axis) and are tangent to
1
.
(b) If (x

1
, y

1
) = (2, 4), the matrix is
_
2 1
4 1
_
; it has eigenvalues
1,2
= (3

17)/2,
i.e.
1
0.56 and
2
3.56. This equilibrium point is hyperbolic and a saddle. Cor-
responding eigenvectors are v
1
(0.39, 1) and v
2
= (0.64, 1). The unstable manifold
W
u
(2, 4) is tangent to the curve (2, 4) +Rv
1
at (2, 4), and the stable manifold W
s
(2, 4)
is tangent to the curve (2, 4) +Rv
2
at (2, 4).
156 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
(3) The phase portrait of the system (6.9) is shown in Figure 6.6. We observe that if (x
0
, y
0
) is
an initial condition that is below the separatrix W
s
(2, 4), then (x(t), y(t)) (0, 0) as t ;
if the initial condition is above this separatrix, the curves will become unbounded either as
t or as t .
Figure 6.6: The phase portrait for example 6.2.4.
1 1 2 3 4
x
1
1
2
3
4
5
6
y
6.3 Polar Coordinates and Nullclines
As we have seen in the previous section, the linearization method oers reliable geometric infor-
mation about the phase portrait near hyperbolic equilibrium points. In this section, we will get to
know additional and alternative methods of obtaining information about the phase portrait of a
non-linear system of the form dx/dt = f(x, y), dy/dt = g(x, y).
Polar Coordinates
Example 6.3.1. Consider the non-linear system
dx/dt = y (x
2
+y
2
)x (6.10)
dy/dt = x (x
2
+y
2
)y.
The only equilibrium point is (x

, y

) = (0, 0) and the linearization method in section 6.2 fails


because the matrix A
(0,0)
=
_
0 1
1 0
_
of the linearized system has eigenvalues = i, so the
origin is a non-hyperbolic equilibrium point and Hartmans theorem cannot be used to obtain the
phase portrait near the origin. Remark 6.2.3, however, tells us that the origin is either a center, a
spiral sink, or a spiral source.
6.3. POLAR COORDINATES AND NULLCLINES 157
To nd out which geometric type is actually present, introducing polar coordinates might be
useful. We consequently express the functions x(t) and y(t) as
x(t) = r(t) cos (t), y(t) = r(t) sin (t). (6.11)
This results in a system of dierential equations for the functions r = r(t) 0 and = (t), as
follows. Dierentiation of r
2
= x
2
+y
2
with respect to t gives
2r(dr/dt) = 2x(dx/dt) + 2y(dy/dt) (6.12)
= 2x(y (x
2
+y
2
)x) + 2y(x (x
2
+y
2
)y)
= 2xy 2x
2
(x
2
+y
2
) 2xy 2y
2
(x
2
+y
2
)
= 2(x
2
+y
2
)
2
= 2r
4
.
So r(t) satises the dierential equation dr/dt = r
3
which can be solved using separation of vari-
ables: r(t) = r
0
/
_
1 + 2r
2
0
t, where r(0) = r
0
0. Since tan = y/x, or xtan = y, dierentiation
with respect to t gives (dx/dt) tan + xsec
2
(d/dt) = dy/dt. Using that sec
2
= (x
2
+ y
2
)/x
2
yields (dx/dt)(y/x) + ((x
2
+y
2
)/x)(d/dt) = dy/dt, or
r
2
(d/dt) = x(dy/dt) y(dx/dt) (6.13)
= x(x (x
2
+y
2
)y) y(y (x
2
+y
2
)x)
= x
2
xy(x
2
+y
2
) y
2
+xy(x
2
+y
2
)
= x
2
y
2
= r
2
,
So we simply have d/dt = 1. Using this result together with the formula for r(t) lets us actually
nd the explicit solution to (6.10) when expressed in polar coordinates:
r(t) = r(0)/
_
1 + 2r(0)
2
t, (t) = t +(0).
In particular, we see that the phase portrait will consist of solution curves that spiral towards the
origin in a clockwise motion with period 2. The phase portrait of this dierential equation is
shown in Figure 6.7.
Remark 6.3.1. Equations (6.12) and (6.13) can be used in general to convert a dierential equation
using xy-coordinates into an equation using polar coordinates. In the previous example, the eect
of switching to polar coordinates was to decouple the system (6.10) and bring it in the form
dr/dt = r
3
, d/dt = 1.
Nullclines
We can further analyze a system of dierential equations of the form dx/dt = f(x, y), dy/dt =
g(x, y) by nding the location of the points where the solution curves either have horizontal or
vertical tangents. This leads to the following denition.
Denition 6.3.1. Consider a system of the form dx/dt = f(x, y), dy/dt = g(x, y).
(a) A connected component of the locus of all points (x, y) with f(x, y) = 0 is called an x-nullcline
of the system. It represents all points where the solution curves have vertical tangents.
158 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Figure 6.7: The phase portrait for example 6.3.1.
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
(b) A connected component of the locus of all points (x, y) with g(x, y) = 0 is called a y-nullcline
of the system. It represents all points where the solution curves have horizontal tangents.
Remark 6.3.2. An x- and a y-nullcline will of course intersect in a equilibrium point. Also, note
that if an x-nullcline is a vertical line , and dy/dt ,= 0 on this line, then is a straight-line
solution. Similarly, if a y-nullcline is a horizontal line , and dx/dt ,= 0 on this line, then is also
a straight-line solution.
Example 6.3.2. We consider the system
dx/dt = x
_
2
x
2
y
_
, dy/dt = y (x 1 y) .
The x-nullclines are the line x = 0 (the y-axis) and the line y = 2 (x/2). The y-nullclines are
the x-axis and the line y = x1. Finding all pairwise intersections of x-nullclines with y-nullclines
gives the four equilibrium points (0, 0), (4, 0), (0, 1), and (2, 1).
Note that if x

= 0, then dy/dt = y(1 y); this last equation may be analyzed using the
methods in section 1.6. In this way we nd the phase portrait restricted to the y-axis. The point
y

= 0 is a sink and y

= 1 is a source. If y

= 0, a similar analysis shows that relative to the


x-axis, x

= 0 is a source and x

= 4 is a sink. The information obtained from the nullclines is


shown in Figure 6.8a. We now use the linearization method in section 6.2 to determine the type of
the equilibrium points.
The linearization matrix is
A
(x,y)
=
_
f
x
(x, y) f
y
(x, y)
g
x
(x, y) g
y
(x, y)
_
=
_
2 x y x
y x 1 2y
_
.
At the origin, the matrix A
(x,y)
has eigenvalues
1
= 2 and
2
= 1, so the origin is a saddle.
Corresponding eigenvectors are v
1
= (1, 0) and v
2
= (0, 1). Note that these eigenvectors span
the straight line solutions found above.
6.4. LIMIT CYCLES 159
For the equilibrium point (4, 0), the matrix A
(4,0)
has eigenvalues
1
= 3 and
2
= 2, so
(4, 0) is also a saddle. Corresponding eigenvectors are v
1
= (4, 5) and v
2
= (1, 0).
The matrix A
(0,1)
has eigenvalues
1
= 3 and
2
= 1, so (0, 1) is a source. Corresponding
eigenvectors are v
1
= (2, 1) and v
2
= (0, 1).
The matrix A
(2,1)
has the complex conjugate eigenvalues
1,2
= 1

2 i. Since they have


negative real parts, the point (2, 1) is a spiral sink.
Putting all of this information together yields the phase portrait in Figure 6.8b. Note that if a
solution curve intersects an x-nullcline, then dx/dt = 0; if it intersects a y-nullcline, then dy/dt = 0.
Figure 6.8: (a): the nullclines in example 6.3.2 dashed lines indicate nullclines that are not
solution curves (left); (b): the phase portrait for example 6.3.2 (right).
2 2 4 6
x
2
2
4
y
2 2 4 6
x
2
2
4
y
6.4 Limit Cycles
We analyze another example of a non-linear system using some of the methods we encountered
previously.
Example 6.4.1. We consider the following system of equations.
dx/dt = x +y x
3
(6.14)
dy/dt = 0.5x.
The x-nullcline is x+yx
3
= 0, that is y = x
3
x; the y-nullcline is x = 0. Note that the y-nullcline
is not a straight line solution, since it is not a horizontal line. In other words, the solutions pass
through, rather than move along this nullcline. The nullclines partition the phase portrait into four
regions. We look at these regions in more detail.
(A) If y > x
3
x, then dx/dt = x +y x
3
> 0; if x > 0, then dy/dt = 0.5x < 0.
160 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
(B) If y > x
3
x, then dx/dt > 0; if x < 0, then dy/dt > 0.
(C) If y < x
3
x, then dx/dt < 0; if x < 0, then dy/dt > 0.
(D) If y < x
3
x, then dx/dt < 0; if x > 0, then dy/dt < 0.
Figure 6.9 shows the nullclines, regions (A)-(D), and the direction of motion along the nullclines.
The intersection of these two nullclines is the origin, which consequently is the only equilibrium
point. Linearization yields the matrix
A
(x,y)
=
_
1 3x
2
1
0.5 0
_
.
Figure 6.9: The nullclines and the regions in example 6.4.1.
A B
C D
2 1 1 2
x
4
2
2
4
y
The matrix A
(0,0)
has the eigenvalues (1/2) (1/2)i, so there is a spiral source at the origin.
When generating the phase portrait numerically as in Figure 6.10, we also observe that initial
conditions some distance away from the origin spiral towards it. These two motions meet at a
stable limit cycle, that is a closed solution curve that nearby solution curves approach as t .
This is a new behavior of solution curves which we have so far not yet encountered in any of the
previous examples.
Denition 6.4.1. A limit cycle is a periodic solution curve C that is isolated: that is, there are
no other nearby periodic solution curves. A limit cycle is
(a) stable, if the solution curves for all nearby initial conditions approach C as t ;
(b) unstable, if the solution curves for all nearby initial conditions approach C as t ;
(c) semi-stable, if the solution curves for all nearby points on one side of C approach C as t ,
and the solution curves for all nearby points on the other side of C approach C as t .
6.4. LIMIT CYCLES 161
Figure 6.10: The phase portrait for example 6.4.1.
2 1 1 2
x
2
1
1
2
y
Remark 6.4.1. A curve C is a periodic solution if there is a real number T > 0 (the period) so
that for any initial condition (x
0
, y
0
) C, the solution curve (x(t), y(t)) has the property that
(x(0), y(0)) = (x(T), y(T)) = (x
0
, y
0
), and (x(t), y(t)) ,= (x
0
, y
0
) for all 0 < t < T. This means C
is a simple closed curve, also known as a Jordan curve. The Jordan curve theorem asserts that a
limit cycle has indeed two sides: a bounded connected interior region, and an unbounded connected
exterior region. This was implicitly used in the denition of a semi-stable limit cycle.
Note that the loops in the phase portrait for example 6.1.2 (Figure 6.1) are not periodic solutions
since it takes innite time to complete the loop. Also, requiring that a limit cycle be isolated means
the solution curves surrounding a linear center (see e.g. Figure 5.11) are not limit cycles.
Example 6.4.2. Consider the following system of polar coordinate dierential equations.
dr/dt = r(r 1)
2
(r 2)
d/dt = 1.
The second equation tells us that we have counter-clockwise rotation of solution curves and the
period of the motion is 2. The rst equation gives the graph in Figure 6.11. In particular,
dr/dt = 0 if r

= 0, r

= 1, or r

= 2. We see that the origin, which corresponds to r

= 0, is the
only equilibrium solution of the system. We have limit cycles when r

= 1 and r

= 2. Since r

= 0
is a sink relative to the r-axis in Figure 6.11, r

= 1 is a node, and r

= 2 is a source, the origin is a


spiral sink, the limit cycle corresponding to r

= 1 is semi-stable, and the limit cycle corresponding


to r

= 2 is unstable. The phase portrait of this system (relative to the xy-coordinate system) is
shown in Figure 6.12.
162 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Figure 6.11: The graph of dr/dt = r(r 1)
2
(r 2) in 6.4.2.
0.5 0.5 1.0 1.5 2.0 2.5
r
0.4
0.2
0.2
0.4
drdt
Figure 6.12: The phase portrait for example 6.4.2; limit cycles and the equilibrium point are shown
in black.
3 2 1 1 2 3
x
3
2
1
1
2
3
y
6.5. EXISTENCE AND NONEXISTENCE OF LIMIT CYCLES 163
6.5 Existence and Nonexistence of Limit Cycles
We turn our attention to results that assert either the existence or non-existence of limit cycles for
systems of the form
_
dx/dt
dy/dt
_
=
_
f(x, y)
g(x, y)
_
. (6.15)
We may interpret the right side of (6.15) as a vector eld F(x, y) = (f(x, y), g(x, y)), and rewrite
the equation as (dx/dt, dy/dt) = F(x, y). Recall that the divergence of the vector eld F(x, y) =
(f(x, y), g(x, y)) is
(div F)(x, y) = ( F)(x, y) = f
x
(x, y) +g
y
(x, y), (6.16)
where = (/x, /y) is the gradient vector.
Recall also that the divergence of a vector eld at the point (x, y) measures the amount of
outow from an innitesimally small square centered at (x, y). Thus, in the language of calculus,
(x, y) is a sink if (div F)(x, y) < 0 and a source (div F)(x, y) > 0.
2
The ux of a vector eld at
a point on a simple closed curve is the dot product of the vector eld with the outer unit normal
vector to the curve. Greens Theorem asserts that the total divergence of the region enclosed by a
simple closed curve C is equal to the total ux across C. More precisely, Greens Theorem states:
Theorem 6.5.1. Suppose C is a positively oriented simple closed curve in R
2
, R is its interior
region, and F(x, y) = (M(x, y), N(x, y)). Then,

R
M
x
+N
y
dA =

C
M dy N dx. (6.17)
Remark 6.5.1. If F(x, y) = (M(x, y), N(x, y)) gives the direction of a ow at the point (x, y),
and (r(t), s(t)), a t b, is a parametrization of C, then, by denition of the line integral,

C
M dy N dx =

b
a
M(r(t), s(t))s

(t) N(r(t), s(t))r

(t) dt
=

b
a
F(r(t), s(t))) n(t) dt,
where n(t) = (s

(t), r

(t)) is the outer normal of the positively oriented curve C.


If, as in the case of equation (6.15), F(x, y) = (f(x, y), g(x, y)), then F represents the tangent
vector to the solution curve (x(t), y(t)). If C is a limit cycle (and hence a simple closed curve)
parametrized by the solution curve (x(t), y(t)), 0 t T, then
f dy g dx = f(x(t), y(t))y

(t) g(x(t), y(t))x

(t) dt = x

(t)y

(t) y

(t)x

(t) = 0. (6.18)
Thus, if C is a limit cycle for (6.15) and R is the interior of C, then

R
div FdA = 0.
2
These denitions come from uid dynamics. The connection with our denition of sinks and sources is remote.
First, according to our denition sinks and sources must be equilibrium points, whereas divergence is dened every-
where. We recognize that (6.16) is the trace of the linearization at (x, y). However, a positive trace at an equilibrium
point does not necessarily mean that the equilibrium point is a source. Already for linear systems, the determinant
must also be positive to have a source.
164 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Example 6.5.1. Consider the system
dx/dt = x y x
_
x
2
+y
2
, dy/dt = x +y y
_
x
2
+y
2
. (6.19)
Then,
(div F)(x, y) =

x
_
x y x
_
x
2
+y
2
_
+

y
_
x +y y
_
x
2
+y
2
_
=
_
1
_
x
2
+y
2

x
2
_
x
2
+y
2
_
+
_
1
_
x
2
+y
2

y
2
_
x
2
+y
2
_
= 2 3
_
x
2
+y
2
.
When switching to polar coordinates using equations (6.12) and (6.13), we see that (6.19) becomes
dr/dt = r(1 r), d/dt = 1,
and thus r

= 1 is a stable limit cycle. Indeed, we can see that if R is the unit disk,

R
(div F)(x, y) dA(x, y) =

R
2 3
_
x
2
+y
2
dA(x, y)
=

2
0

1
0
(2 3r)r dr d
= 2

1
0
2r 3r
2
dr
= 2
_
r
2
r
3
_

r=1
r=0
= 0.
(Here we used the well-known result that dA(x, y) = rdrd when switching to polar coordinates.)
The results of the next theorem, known as Bendixsons Criteria, relate the divergence of the
vector eld F to the existence or non-existence of limit cycles.
Theorem 6.5.2. Consider a system of the form (dx/dt, dy/dt) = F(x, y).
(a) Suppose D is a closed simply connected set. (This means the interior of D is connected and
has no holes, or equivalently, its boundary is a simple closed curve.) Suppose also that
(div F)(x, y) is always positive or always negative for all (x, y) in an open neighborhood of D.
Then D cannot contain any limit cycles.
(b) Suppose D is a closed annular region. (This means the interior of D has one hole, i.e. the
interior of D lies between two simple closed curves, one of which is contained in the interior
of the other.) Suppose also that (div F)(x, y) is always positive or always negative for all
(x, y) in an open neighborhood of D. Then D contains at most one limit cycle.
Proof. If (div F)(x, y) ,= 0 for all (x, y) D, then because of the continuity of (div F)(x, y), either
(div F)(x, y) > 0 for all (x, y) D or (div F)(x, y) < 0 for all (x, y) D. In particular,

R
div F(x, y) dA(x, y) ,= 0 (6.20)
6.5. EXISTENCE AND NONEXISTENCE OF LIMIT CYCLES 165
for any subset R of D.
For part (a), suppose C is a limit cycle contained in D. The simple connectivity of D implies that
the interior R of C is a subset of D. By remark 6.5.1, however,

R
div FdA = 0, a contradiction
to (6.20).
For part (b), suppose C
1
and C
2
are two distinct limit cycles contained in D. Uniqueness of
solutions ensures that the limit cycles cannot intersect. Using part (a), a limit cycle must contain
the hole in its interior. (If this were not the case, the limit cycle must lie in a simply connected
subset of D, which is not possible by part (a).) Thus, we assume that one limit cycle, say C
2
, lies
in the interior of the other and they both cycle around the hole. Let > 0, and let C be the path
obtained by connecting the limit cycles via two straight-line paths, e.g. parallel to the x-axis, that
are units apart. Hence C = C
1,
L

C
2,
U

and we choose these paths so that C is positively


oriented. See Figure 6.13.
Figure 6.13: The paths involved in the proof of part (b) of theorem 6.5.2; the shaded area is the
domain D.
hole
C
1,
C
2,
L

Let R be the interior of C. Then R is contained in D, and equation (6.20) applies. By Greens
theorem,

R
div F(x, y) dA(x, y) =

C
f(x, y) dy g(x, y) dx.
The line integral can be written as

C
f(x, y) dy g(x, y) dx =

C
1,
f(x, y) dy g(x, y) dx +

L
f(x, y) dy g(x, y) dx
+

C
2,
f(x, y) dy g(x, y) dx +

U
f(x, y) dy g(x, y) dx.
The rst and the third line integral of the right side are zero because C
1,
, C
2,
are parts of solution
curves (see (6.18)). As 0, L

, thus

C
f(x, y) dy g(x, y) dx =

L
f(x, y) dy g(x, y) dx +

U
f(x, y) dy g(x, y) dx 0.
166 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
This again gives a contradiction to equation (6.20).
Example 6.5.2. For the system in example 6.5.1, we computed that (div F)(x, y) = 2 3r if r =
_
x
2
+y
2
. Thus, on the simply connected region D
1
= 0 r 0.5, (div F)(x, y) 2 3(0.5) =
0.5 > 0, so theorem 6.20 asserts that the system has no limit cycles contained in D
1
.
On the annulus D
2
= 0.8 r 2, (div F)(x, y) 2 3(0.8) = 0.4 < 0, so theorem 6.20
asserts that there is no more than one limit cycle in D
2
(there is indeed one, when r = 1). Also, if
D
3
= 1.5 r 2, (div F)(x, y) 2 3(1.5) = 2.5 < 0, but there are no limit cycles contained
in D
3
.
We state two more results (without proof) addressing the existence and non-existence of limit
cycles. The rst result uses index theory, the second result is known as the Poincare-Bendixson
Theorem.
Theorem 6.5.3. A limit cycle must contain at least one equilibrium point in its interior region.
If the limit cycle contains only one equilibrium point, then it cannot be a saddle.
3
Theorem 6.5.4. Suppose (x(t), y(t)) is a solution curve that lies in a closed and bounded region
D for t t
0
. Then the solution curve must either get arbitrarily close to a critical point or it must
approach a limit cycle.
Remark 6.5.2. Thus, in the situation of the Poincare-Bendixson Theorem 6.5.4, if the region D
contains no equilibrium points, then D contains a limit cycle C, and (x(t), y(t)) approaches C as
t . In particular, the limit cycle is stable or semi-stable. A corresponding version of theorem
6.5.4 holds for solution curves that lie in a closed and bounded region for t t
0
.
Example 6.5.3. The system
x = y x
3
y = x +y +y
3
has equilibrium points when y = x
3
and 0 = x +x
3
+x
9
= x(1 +x
2
+x
8
); that is, the origin is the
only equilibrium point. Since the linearization
A
(x,y)
=
_
3x
2
1
1 1 + 3y
2
_
has determinant D = 1 when (x, y) = (0, 0), the origin is a saddle, and by theorem 6.5.3, the
system cannot have a limit cycle.
Example 6.5.4. The system
x = 2xy y
2
y = x
2
y
2
+xy
2
has divergence (div F)(x, y) = 2xy. Part (a) of theorem 6.5.2 asserts that it is not possible to have
a limit cycle that is contained in any of the four (open) quadrants. Clearly, a limit cycle cannot
3
The full version of this theorem is: the sum of the indices of the critical points contained in the interior region
of a limit cycle must be +1. The index of a source, sink or center is +1, the index of a saddle is 1.
6.6. HAMILTONIAN SYSTEMS 167
pass through the origin, since that is an equilibrium point. Note that if x = 0, x = y
2
0. That
is, all solution curves cross the y-axis from right to left. This implies that a limit cycle cannot pass
from the left half-plane (x, y) : x < 0 to the right half-plane (x, y) : x > 0 or vice versa (if it
leaves the right half-plane, it cannot return). Thus, any potential limit cycles are conned to these
half-planes. Similarly, the fact that if y = 0, y = x
2
0 shows that limit cycles are also conned to
the upper or lower half-planes. This leaves us only with the possibility of having limit cycles that
are fully contained in the quadrants a possibility we have already ruled out.
Example 6.5.5. Consider the van der Pol equation which can be used as a model for an oscillating
electrical circuit containing a vacuum tube.
d
2
x
dt
2
+ (x
2
)
dx
dt
+
2
x = 0, (6.21)
where , > 0 are parameters. Letting y = dx/dt and reducing the order gives the two-dimensional
non-linear system
dx
dt
= y (6.22)
dy
dt
=
2
x + ( x
2
)y.
The only equilibrium solution is (x

, y

) = (0, 0). The linearization of (6.22) is given by the matrix


A
(x,y)
=
_
0 1

2
2xy x
2
_
,
so for (x, y) = (0, 0), we have trace T = and determinant
2
. Using the trace-determinant plane
(or the fact that the eigenvalues of A
(0,0)
are
1,2
= (
_

2
4
2
)/2), we see that the origin is
a source if
2
> 4
2
and a spiral source if
2
< 4
2
.
The divergence of F(x, y) = (y,
2
x +( x
2
)y) is (div F)(x, y) = x
2
, so (div F)(x, y) > 0
in the open vertical strip R
1
= (x, y) :

< x <

and (div F)(x, y) < 0 on R
2
= (x, y) :
[x[ >

.
When looking for a limit cycle C (if it exists at all), theorem 6.5.3 tells us that it must cycle
around the origin. On the other hand, part (a) of theorem 6.5.2 says that C cannot be fully
contained in R
1
, thus C must intersect at least one of the lines x =

or x =

. If we can
nd a solution curve (x(t), y(t)) that is bounded for t t
0
, then by theorem 6.5.4, there is a limit
cycle, and this solution curve will nd, that is approach, the limit cycle as t . (Note that
the solution curve cannot approach the origin since that is source/spiral source.)
Analytically, it is rather hard (or impossible) to establish the existence of a bounded forward
orbit. Let us use Mathematica for e.g. = 1 and = 1. We start by plotting various solution
curves for initial values, e.g. (x
0
, y
0
) = (1, 1), (1, 2), (1, 2), (1, 2). The solution curves are
shown in Figure 6.14. We indeed see that for the parameters = = 1, a limit cycle exists.
6.6 Hamiltonian Systems
Once again, we consider the non-linear system
dx
dt
= f(x, y),
dy
dt
= g(x, y). (6.23)
168 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Figure 6.14: The phase portrait for the van der Pol equation in example 6.5.5 with = = 1.
4 2 2 4
x
4
2
2
4
y
Formally, we may rewrite (6.23) as dy/dx = g(x, y)/f(x, y) or as
g(x, y) dx +f(x, y) dy = 0. (6.24)
As seen in section 1.5, the equation (6.24) is exact if we can nd a function H(x, y) so that
H
x
= g(x, y) =
dy
dt
and
H
y
= f(x, y) =
dx
dt
.
In this case, the curves H(x(t), y(t)) = C (with C being a constant) constitute solution curves to
(6.23). This leads to the following denition.
Denition 6.6.1. A system of dierential equations is called Hamiltonian if it can be written in
the form
dx
dt
=
H
y
,
dy
dt
=
H
x
, (6.25)
where H(x, y) is a twice continuously dierentiable function, called the Hamiltonian function or
total energy function.
The following result is clear.
Theorem 6.6.1. The solutions to the initial value problem
dx
dt
=
H
y
,
dy
dt
=
H
x
, (x(t
0
), y(t
0
)) = (x
0
, y
0
) (6.26)
satisfy H(x(t), y(t)) = H(x
0
, y
0
).
6.6. HAMILTONIAN SYSTEMS 169
Remark 6.6.1. In other words, the total energy is constant along solution curves, or
d
dt
H(x(t), y(t)) = 0. (6.27)
For mechanical systems that exhibit conservation of energy (that is, mechanical systems without
energy losses due to friction), the Hamiltonian function takes the form
H(x, y) = E
k
(x, y) +E
p
(x, y)
where E
k
(x, y) is the kinetic energy of the system at state (x, y), and E
p
(x, y) is the potential
energy at state (x, y).
Example 6.6.1. Consider the mass-spring system without friction or external forcing. As we have
seen in section 4.1, it is descibed by the second-order linear dierential equation m x + kx = 0,
where m > 0 is the mass and k > 0 is the spring constant. Introducing the momentum as p = m x
gives the two-dimensional rst-order system
x =
p
m
, p = kx. (6.28)
In this case the Hamiltonian function satises H/p = x = p/m, so we obtain by integration
that H(x, p) = (p
2
/2m) + h(x), and since h

(x) = H/x = p = kx, we can conclude (up to a


constant) that
H(x, p) =
p
2
2m
+
kx
2
2
.
If we use that the momentum p = mv where v is the velocity, we recognize the usual formulas for
kinetic energy (mv
2
/2) and potential energy (kx
2
/2) and the Hamiltonian function takes the form
H(x, v) =
mv
2
2
+
kx
2
2
. (6.29)
The solution curves to (6.28) are ellipses of the form
p
2
2m
+
kx
2
2
= E,
where E 0 is the total energy of the mass-spring system. Figure 6.15 shows the phase portrait
for the system (6.28).
Note that higher energy solutions correspond to oscillations in x with higher amplitude.
Observe that if (x

, y

) is an equilibrium solution for a Hamiltonian system, then H


x
(x

, y

) =
H
y
(x

, y

) = 0, so (x

, y

) is a critical point of the Hamiltonian function z = H(x, y). The following


theorem rules out certain types of critical points for Hamiltonian systems.
Theorem 6.6.2. Suppose (x

, y

) is a critical point for the Hamiltonian system (6.25) so that the


linearization matrix
A
(x

,y

)
=
_

2
H
xy
(x

, y

)

2
H
y
2
(x

, y

2
H
x
2
(x

, y

)

2
H
yx
(x

, y

)
_
(6.30)
has no zero eigenvalues. Then, (x

, y

) is either a saddle point or a center.


170 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Figure 6.15: The phase portrait for example 6.6.1.
E12
E1
E2
E0
1
k
2
k
4
k

1
k

2
k

4
k
x
m
2 m
4 m
m
2 m
4 m
p
Proof. The trace of A
(x

,y

)
is zero. Suppose the critical point is not a saddle; then according to the
trace-determinant plane, the determinant of A
(x

,y

)
must be positive. (It cannot be zero since the
linearization is assumed to have no zero eigenvalues.) By remark 6.2.3, (x

, y

) is either a center,
a spiral sink, or a spiral source. Suppose (x

, y

) is a spiral sink. Then, for a point (x


0
, y
0
) near
(x

, y

), the solution curve to (6.26) satises H(x


0
, y
0
) = H(x(t), y(t)) for all t by theorem 6.6.1.
Also,
H(x

, y

) = lim
t
H(x(t), y(t)) = H(x
0
, y
0
). (6.31)
Since the determinant D = H
xx
(x

, y

)H
yy
(x

, y

) (H
xy
(x

, y

))
2
is positive, according to the
second derivatives test C.1 in appendix C, (x

, y

) is either a strict local maximum or a strict


local minimum of H(x, y). This contradicts (6.31), and the critical point cannot be a spiral sink.
Similarly, we can see that (x

, y

) cannot be a spiral source either by taking the limit as t


in (6.31).
Example 6.6.2. Consider a pendulum with an object of mass m attached to a weightless (or very
much lighter) rigid swing arm of length .
4
See Figure 6.16a. The force due to gravity acting on the
object has magnitude mg, where g is the gravitational acceleration. Let be the angle (in radians)
that the arm of the pendulum makes with the downward vertical, and let x = be the length of
the arc made by the pendulum. The force acting on the object in its direction of motion is
m x = mg sin ,
thus

+
g

sin = 0. (6.32)
4
Alternatively: The distance of the center of mass of the swing arm to the pivot is .
6.7. MATHEMATICA USE 171
Letting =

, we obtain the nonlinear rst order system

= (6.33)

=
g

sin .
Note that this model excludes any frictional forces. Thus, we have conservation of mechanical
energy, and can think of (6.33) as a Hamiltonian system.
To nd the Hamiltonian function H(, ), proceed as in example 6.6.1:

= H/ gives
H/ = , and so H(, ) =
2
/2+h(). Since

= H/ = h

(), we get h

() = (g/) sin ,
and so h() = (g/) cos . The Hamiltonian can be chosen as
H(, ) =

2
2

g

cos . (6.34)
The phase portrait is the contour plot of H(, ) and is shown in Figure 6.16b. Note that it is
periodic (with period 2) in . We restrict ourselves to (, ]. The stable equilibrium occurs
if

= 0, corresponds to the (negative) value of Hamiltonian H(0, 0) = g/, and is a center.


The unstable equilibrium occurs at = , = 0 and is a saddle. Here, the pendulum balances
vertically on top of its pivot. The high-energy solutions in the upper and lower portion of the phase
portrait correspond to the pendulum going over the top of the pivot.
Figure 6.16: (a): the pendulum in example 6.6.2 (left); (b): the phase portrait for the pendulum
(right).
mg

2 2

6.7 Mathematica Use


Generating the phase portraits shown in previous sections of this chapter is actually a quite tedious
exercise. We demonstrate how, for example, the phase portrait in Figure 6.10 was obtained.
172 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Example 6.7.1. First, we dene a function that nds the numerical solution to the dierential
equation (6.14), given an initial point (x
0
, y
0
) and a range specication t
min
t t
max
(both given
as pairs of real numbers).
fx_, y_ : x y x^3, 0.5 x;
solniCond_, tRange_ : NDSolvex't fxt, yt1, y't fxt, yt2,
x0 iCond1, y0 iCond2, xt, yt, t, tRange1, tRange2;
The vector eld is dened by f[x,y]. The function that generates the solution is soln. Then,
we dene a function that generates a plot of the solution curve with the given initial condition and
t-range.
GeneratePlotiCond_, tRange_ : ParametricPlot
Evaluatext, yt . solniCond, tRange, t, tRange1, tRange2,
PlotRange 2.2, 2.2, 2.2, 2.2, PlotStyle Thick, LabelStyle Medium;
We now create a list of pairs x
0
, y
0
, t
min
, t
max
and generate a graph that shows solution
curves corresponding to the initial conditions by mapping the function GeneratePlot onto the list.
list 0, 2, 1, 10, 0, 1.5, 1.3, 10,
0, 1, 2.7, 10, 0, 0.5, 10, 10, 0, 2, 1, 10,
0, 1.5, 1.3, 10, 0, 1, 2.7, 10, 0, 0.5, 10, 10;
g1 MapGeneratePlot, list;
Finally, we create a second graph that contains the arrows required for the phase portrait. The
function arrowAt Displaying both graphs yields Figure 6.10.
arrowAtx_, y_ : Arrowx, y 0.1 fx, y Normfx, y, x, y;
g1 MapGeneratePlot, list;
g2 GraphicsBlue, Thick, Arrowheads0.06,
ApplyarrowAt, Transposelist1, 1;
Showg1, g2
Remark 6.7.1. Note that the range of t-values must be chosen correctly to avoid numerical errors.
If we choose the t-range for the initial condition (x
0
, y
0
) = (0, 2) to be 2 t 10 instead of
1 t 10, then Mathematica will give us the following error, and the graph of the corresponding
solution will not be drawn.
list 0, 2, 2, 10, 0, 1.5, 1.3, 10,
0, 1, 2.7, 10, 0, 0.5, 10, 10, 0, 2, 1, 10,
0, 1.5, 1.3, 10, 0, 1, 2.7, 10, 0, 0.5, 10, 10;
g1 MapGeneratePlot, list;
NDSolve::ndsz : At t 1.02201, step size is effectively zero; singularity or stiff system suspected.
InterpolatingFunction::dmval :
Input value 1.99976 lies outside the range of data in the interpolating function. Extrapolation will be used.
InterpolatingFunction::dmval :
Input value 1.99976 lies outside the range of data in the interpolating function. Extrapolation will be used.
6.8. EXERCISES 173
A sti system is encountered by the numerical method employed to solve the dierential equa-
tion. Since this error occurs at t = 1.02201, it is a good idea to reduce the value of t
min
to
1. Admittedly, this process of weeding out numerical errors can become quite time-consuming.
Numerical methods for solving dierential equations, and the phenomenon of sti systems are
addressed in section 9.2.
Example 6.7.2. The phase portrait in example 6.6.2 can be generated using the ContourPlot func-
tion:
g1 ContourPlot^2 2 Cos, , Pi, Pi, , Pi, Pi,
Contours 0.6, 0, 0.5, 1, 2, 3.5, ContourShading False, Axes True, True,
ContourStyle Blue, AxesLabel "", "", LabelStyle Medium,
Ticks Pi 2, "2", Pi, "", Pi 2, "2", Pi, "", None,
AspectRatio Automatic, Frame False;
g2 GraphicsBlue, Disk0, 0, 0.07, 0.07;
Showg1, g2
6.8 Exercises
Exercise 6.1. Find all equilibrium solutions and nullclines of the non-linear system
dx
dt
= y
3
+ 1,
dy
dt
= x
2
+y.
Sketch a graph of the nullclines and indicate the motion along the nullclines.
Exercise 6.2. The non-linear system
dx
dt
= x(1 y
2
),
dy
dt
= x +y
has the three equilibrium points (0, 0), (1, 1) and (1, 1). Use the linearized system and the
trace-determinant plane to determine the type of each equilibrium point.
Exercise 6.3. Consider the non-linear system
dx/dt = x
_
1
x
2
y
_
, dy/dt = y
_
x 1
y
2
_
.
(a) Find all equilibrium points nullclines.
(b) Find the eigenvalues and eigenvectors of the linearized system and determine the type of each
equilibrium point.
(c) Use the information in parts (a) and (b) to sketch a phase portrait for the system.
Exercise 6.4. Consider the non-linear system
dx/dt = x x
2
, dy/dt = x y.
(a) Find all nullclines and the motion along nullclines that are straight-line solutions.
174 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
(b) Find all equilbrium points and the linearization matrix at each equilibrium point.
(c) Use the eigenvalues and eigenvectors of the linearization matrix to determine the type of each
equilibrium point. Then, use all presently available information to sketch the phase portrait
of the non-linear system.
Exercise 6.5. Consider the non-linear system
dx
dt
= x +y +x
2
,
dy
dt
= y x.
(a) Find all equilibrium points and nullclines.
(b) Find the eigenvalues and eigenvectors of the linearized system and determine the type of each
equilibrium point.
(c) Use the information in parts (a) and (b) to sketch a phase portrait for the system.
Exercise 6.6. Consider the non-linear system
dx/dt = x
2
1
dy/dt = y(x
2
+ 1).
(a) Find all equilibrium points.
(b) Find the nullclines of the system and indicate the motion of the solutions along each nullcline.
(c) Find the linearized system at each equilibrium point and compute the eigenvalues and eigen-
vectors of each linear system.
(d) Use the information in parts (a), (b), and (c) to sketch the phase portrait of the non-linear
system.
Exercise 6.7. A redacted version of the phase portrait of the system dx/dt = x 2y, dy/dt =
4y x
2
is shown in Figure 6.17.
(a) Find all equilbrium points and the linearization matrix at each equilibrium point.
(b) Fill in the blanks use the eigenvalues and eigenvectors of the linearized systems or the
trace-determinant plane, as appropriate.
(c) Add arrows to each solution curve to indicate the direction of motion and shade the set W
of initial conditions dened by
W =
_
(x
0
, y
0
) : lim
t
(x(t), y(t)) = (0, 0)
_
.
Exercise 6.8. Use polar coordinates nd all equilibrium solutions and limit cycles, and their type.
Then, sketch the phase portrait.
(a)
dx/dt = x x(x
2
+y
2
)
2
dy/dt = y y(x
2
+y
2
)
2
.
6.8. EXERCISES 175
Figure 6.17: The partial phase portrait for exercise 6.7.
3 2 1 1 2 3 4
x
3
2
1
1
2
3
4
y
(b)
dx/dt = y +x(x
2
+y
2
(x
2
+y
2
)
2
)
dy/dt = x +y(x
2
+y
2
(x
2
+y
2
)
2
).
Exercise 6.9. Find a system for which the origin is a spiral sink, the circle with radius 1 is an
unstable limit cycle, and the circle with radius 3 is a stable limit cycle. Hint: Express the system
in polar coordinates.
Exercise 6.10. Consider the one-parameter family of non-linear systems
x = y x
2
y = y 2x .
(a) Find the bifurcation parameter
0
for the number of equilibrium points. How many equilib-
rium points does the system have if >
0
( <
0
)?
(b) For = 0 and = 1, nd all equilibrium points, analyze the linear system near each
equilibrium point, nd the nullclines, and use this information along with Mathematica plots
to sketch the phase portrait.
Exercise 6.11. Use the criteria in section 6.5 to show that none of the following systems has any
limit cycles.
(a) x = 1 +y
2
, y = xy
(b) x = x y
2
, y = y xy
(c) x = x +y
2
, y = y +x
2
y
176 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
(d) x = 2xy 2y
4
, y = x
2
y
2
xy
3
(e) x = y, y = x (1 +x
2
)y
(f) x = x
2
+y
2
, y = 1 xy
(g) x = 2x y
2
, y = 2x
2
y + 4y 3
(h) x = x x
2
+ 2y
2
, y = xy +y
Exercise 6.12. Show that the one-parameter family
x = y +x xy
2
y = y x y
3
undergoes a bifurcation at = 0. Describe the nature of the bifurcation. Note that this type of
bifurcation is unlike any of the bifurcations observed in section 1.9. It is called a Hopf bifurcation.
Exercise 6.13. Prove Dulacs Criteria: Suppose (dx/dt, dy/dt) = F(x, y), and let (x, y) be a
continuously dierentiable function.
(a) Suppose D is a closed simply connected set. Suppose also that (div F)(x, y) is continuous
and non-zero for all (x, y) in an open neighborhood of D. Then D cannot contain any limit
cycles.
(b) Suppose D is a closed annular region. Suppose also that (div F)(x, y) is continuous and
non-zero for all (x, y) in an open neighborhood of D. Then D contains at most one limit
cycle.
Thus, Dulacs Criteria yield Bendixsons Criteria (theorem 6.5.2) if (x, y) = 1.
Exercise 6.14. Use Dulacs Criteria in exercise 6.13 to show that none of the following system can
have a limit cycle.
(a) x = x(1 x y), y = y(2x x
2
2) using = 1/(xy).
(b) x = x(a bx cy), y = y(d ey fx) using = 1/(xy) where a, b, c, d, e, f > 0 and
x, y > 0.
(c) x = x(1 4x y), y = y(2x y 2) using = x
m
y
n
. Hint: nd powers m and n so that
(div F)(x, y) = C where C is a constant.
(d) x = x(5 2x +y), y = y(x y 2) using = 1/(x
4
y
5
).
Exercise 6.15. One class of non-linear systems are given by the Lienard equations
x +f(x) x +g(x) = 0, (6.35)
where f(x) is the damping term and g(x) is the restoring force or stiness. Thus, (6.35) can be seen
as a general oscillator model with state-dependent feedback. The harmonic oscillator is obtained
when f(x) an g(x) are constant (and positive); the van der Pol equation (6.21) corresponds to
f(x) = x
2
and g(x) =
2
x.
6.8. EXERCISES 177
The system corresponding to (6.35) is
x = y (6.36)
y = g(x) f(x)y.
Use Mathematica to graph the limit cycle for the Lienard systems with g(x) = x, f(x) = x
2

800x
4
+ 4000x
6
.
Exercise 6.16. Use theorem 6.5.4 to show that the system
dx/dt = y 8x
3
dy/dt = 2y 4x 2y
2
has a limit cycle. Then, use Mathematica to graph the limit cycle. Hint: show that the solution
curves will always move to the inside of the rectangle R with vertices (1, 2). Then, show that
the origin is the only equilibrium point and a spiral source; thus, there exists a small open disk U
so that all solution curves will move out of U. Letting D = R U completes the argument.
Exercise 6.17. Find the Hamiltonian function for each system, identify all critical points and their
type, and use the ContourPlot function in Mathematica to sketch the phase portrait.
(a) x = y y
2
, y = x
(b) x = x
2
+ 2y, y = 2x 2xy
(c) x = y, y = x
3
x
(d) x = 2y + 4xy, y = x
2
2x 2y
2
Exercise 6.18. Find a criterion that let you decide whether a given system of the form x = f(x, y),
y = g(x, y) is Hamiltonian, without having to explicitly nd the Hamiltonian function H(x, y).
Then, apply this criterion to determine which of the following systems is Hamiltonian.
(a) x = y, y = x
3
x
(b) x = xe
xy
, y = ye
xy
(c) x = y +x
2
y
2
, y = x 2xy
(d) x = 2xy sin x, y = y cos x y
2
+ 3x
2
Exercise 6.19. Consider the one-parameter family of Hamiltonian systems given by
H(x, y) = x
2
+y
2
x
2
y.
Describe the bifurcations of the system for 0 by keeping track of the critical points and their
type.
178 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS
Exercise 6.20. Recall from vector calculus that for a function z = F(x, y), the gradient (F)(x, y) =
((F/x)(x, y), (F/y)(x, y)) always points in the direction of the greatest increase of the depen-
dent variable z. Thus, a gradient system of the form
x = (F/x)(x, y) (6.37)
y = (F/y)(x, y)
can be used to nd the lines of steepest descent of the surface given by z = F(x, y). Sketch the
phase portrait of the gradient system given by the surface z = 4x
2
y x
4
y
4
by nding the
equilibrium solutions and their type. Compare the phase portrait to the 3-dimensional plot of the
surface in Figure 6.18.
Figure 6.18: The surface in exercises 6.20 and 6.21.
Exercise 6.21. Continuing exercise 6.20, we note that the contour curves F(x, y) = C are perpen-
dicular to the gradient (F)(x, y). Thus, the contour curves are solutions to the system
x = (F/y)(x, y) (6.38)
y = (F/x)(x, y).
Sketch the phase portrait of (6.38) for the surface z = 4x
2
y x
4
y
4
by nding the equilibrium
solutions and their type. Compare the phase portrait to the 3-dimensional plot of the surface in
Figure 6.17.
Chapter 7
Applications of Systems of
Dierential Equations
7.1 Competing Species Models
We saw in section 2.1 that a realistic model for the growth of the population P of a single species
of plant or animal in the presence of limited resources is logistic growth, which can be expressed
via the dierential equation
dP
dt
= (a bP) P, (7.1)
where a, b > 0. Now, we develop a model that describes the interaction of two species as they com-
pete for common resources such as food, shelter, etc. The model should incorporate the following
information.
If one of the populations is zero, the other will grow logistically.
The rate of decline in either population due to competition with the other is proportional to
the product of the sizes of both populations.
These requirements lead to the following system of equations for the size P, Q of the populations
of two competing species.
dP
dt
= (a bP)P cPQ (7.2)
dQ
dt
= (d eQ)QfPQ, (7.3)
where a, b, c, d, e, f are all positive constants. We now analyze the system given by (7.2) and (7.3).
Nullclines
We have that dP/dt = (abP)P cPQ = P(abP cQ) = 0 either if P = 0, or if abP cQ = 0.
In the rst case, dQ/dt = (d eQ)Q, so the Q-axis is a straight-line solution; Q

= 0 is a source,
and Q

= d/e is a sink relative to this straight-line solution.


Similarly, dQ/dt = (deQ)QfPQ = Q(deQfP) = 0 implies Q = 0 or deQfP = 0.
The P-axis is a straight-line solution; P

= 0 is a source, and P

= a/b is a sink relative to this


straight-line solution.
179
180 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
Equilibrium Points and Linearization
Finding all pairwise intersections of the P-nullclines P = 0, a bP cQ = 0 with the Q-nullclines
Q = 0, d eQfP = 0 gives the following equilibrium points.
S

1
= (0, 0), S

2
=
_
0,
d
e
_
, S

3
=
_
a
b
, 0
_
, S

4
=
_
D
2
D
1
,
D
3
D
1
_
, (7.4)
where we let D
1
= becf, D
2
= aecd, and D
3
= bdaf for convenience of notation. Linearization
yields the matrix
A
(P,Q)
=
_
a 2bP cQ cP
fQ d 2eQfP
_
. (7.5)
To keep this general analysis concise, we will use only the trace-determinant plane to nd the
type of each equilibrium solution. However, it is possible to extract more information about the
phase portrait from nding eigenvalues and eigenvectors (as explained in chapter 6). For example,
if an equilibrium point is a saddle, we could use the eigenvectors of the linearized system to nd
the location of the tangents of the stable and and unstable manifolds of the non-linear system.
The situation presently of interest to us is if the fourth equilibrium point, S

4
, lies in the rst
quadrant. Examples of other cases can be found in exercise 7.2. S

4
is in quadrant I if either
I. D
1
, D
2
, D
3
are all positive, or if
II. D
1
, D
2
, D
3
are all negative.
(a) For S

1
= (0, 0), the linearization matrix is
A
(0,0)
=
_
a 0
0 d
_
.
Since the trace of this matrix is T = a +d > 0, the determinant is D = ad > 0, and we have
that T
2
4D = (a +d)
2
4ad = (a d)
2
0; so the origin is a source.
(b) If S

2
= (0, d/e), the linearization matrix is
A
(0,d/e)
=
_
a c(d/e) 0
f(d/e) d 2e(d/e)
_
=
_
D
2
/e 0
fd/e d
_
.
The trace of this matrix is T = (D
2
/e) d and the determinant is D = D
2
(d/e). We have
that T
2
4D = ((D
2
/e) d)
2
4D
2
(d/e) = ((D
2
/e) +d)
2
0. In case I., the equilibrium
point S

2
is a saddle because D < 0; in case II., S

2
is a sink because D > 0 and T < 0.
(c) For S

3
= (a/b, 0), the linearization matrix is
A
(a/b,0)
=
_
a 2b(a/b) c(a/b)
0 d f(a/b)
_
=
_
a c(a/b)
0 D
3
/b
_
.
The trace is T = (D
3
/b) a and the determinant is D = D
3
(a/b). We have that T
2
4D =
((D
3
/b) a)
2
4D
3
(a/b) = ((D
3
/b) + a)
2
0. In case I., the equilibrium point S

3
is a
saddle because D < 0; in case II., S

3
is a sink because D > 0 and T < 0.
7.1. COMPETING SPECIES MODELS 181
(d) Finally, if S

4
= (D
2
/D
1
, D
3
/D
1
), the linearization matrix is
A
(a/b,0)
=
1
D
1
_
aD
1
2bD
2
cD
3
cD
2
fD
3
dD
1
2eD
3
fD
2
_
=
1
D
1
_
bD
2
cD
2
fD
3
eD
3
_
,
where we used that aD
1
2bD
2
cD
3
= abeacf 2abe+2bcdbcd+acf = bcdabe = bD
2
,
and similarly dD
1
2eD
3
fD
2
= eD
3
.
The trace is T = (bD
2
eD
3
)/D
1
and the determinant is D = (beD
2
D
3
cfD
2
D
3
)/(D
1
)
2
=
(be cf)D
2
D
3
/(D
1
)
2
= D
2
D
3
/D
1
. Also,
T
2
4D =
_
bD
2
eD
3
D
1
_
2
4
_
D
2
D
3
D
1
_
=
b
2
D
2
2
+ 2beD
2
D
3
+e
2
D
2
3
4D
1
D
2
D
3
D
2
1
=
b
2
D
2
2
+ 2beD
2
D
3
+e
2
D
2
3
4(be cf)D
2
D
3
D
2
1
=
b
2
D
2
2
2beD
2
D
3
+e
2
D
2
3
+ 4cfD
2
D
3
D
2
1
=
_
bD
2
eD
3
D
1
_
2
+
4cfD
2
D
3
D
2
1
.
This quantity is always positive since in either of the two cases considered here, D
2
and D
3
have the same sign. In case I., the equilibrium point S

4
is a sink because D > 0 and T < 0;
in case II., S

4
is a saddle because D < 0.
We can now use these general results to analyze systems of the form (7.2),(7.3) when specic
values of the parameters are given.
Example 7.1.1. We want to sketch the phase portrait of the competing species model and determine
the long-term behavior (i.e. the behavior as t ) of initial populations P(0), Q(0) > 0. The
model is
dP
dt
= (8 2P)P PQ,
dQ
dt
= (10 5Q)Q2PQ.
We have that D
1
= be cf = 2 5 1 2 = 8, D
2
= ae cd = 8 5 1 10 = 30, D
3
= bd af =
2 10 8 2 = 4, so case I applies. The equilibrium points are (0, 0) (source), (0, 2) (saddle), (4, 0)
(saddle), and (30/8, 4/8) = (3.75, 0.5) (sink). Note that the P and Q-axes are invariant. The phase
portrait is shown in Figure 7.1. It follows that for any two initial populations P(0), Q(0) > 0, the
individual populations of the two species will stabilize at (3.75, 0.5).
Example 7.1.2. For the system
dP
dt
= (1.5 0.5P)P 2PQ,
dQ
dt
= (10 10Q)Q5PQ,
we again want to sketch the phase portrait and determine the long-term behavior given various
initial conditions P(0), Q(0) > 0.
182 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
Figure 7.1: The phase portrait for example 7.1.1.
1 2 3 4 5 6
P
1
2
3
4
Q
We have D
1
= be cf = 5, D
2
= ae cd = 5, and D
3
= bd af = 2.5, so case II
applies. The equilibrium points are (0, 0) (source), (0, 1) (sink), (3, 0) (sink), and (1, 0.5) (saddle).
The phase portrait is shown in Figure 7.2. The separatrices associated with the saddle (1, 0.5) are
shown in red. If P(0), Q(0) > 0 are initial populations that lie to the left of the stable separatrix of
this point, the solution curves will approach the point (0, 1); if P(0), Q(0) > 0 are initial populations
that lie to the right of the stable separatrix, the solution curves will approach the point (3, 0). Thus,
the model predicts the extinction of one species and a stable population for the other.
Figure 7.2: The phase portrait for example 7.1.2.
1 2 3 4
P
0.5
1.0
1.5
2.0
Q
Note that the tangents to the separatrices at the equilibrium point (1, 0.5), and thus the approxi-
mate direction of the separatrices themselves, can be found by computing the eigenvectors of the lin-
earization at that point. They are v
1
(0.35, 0.94) for the stable separatrix and v
2
(0.91, 0.42)
for the unstable separatrix.
Example 7.1.3. Consider the one-parameter family of competing species models given by
dP
dt
= (4 P)P PQ,
dQ
dt
= (5 2Q)QPQ,
7.2. PREDATOR-PREY MODELS 183
where 0. We investigate the bifurcations of this family as increases. First, we compute
the values of D
1
, D
2
, D
3
. They are D
1
= 2 , D
2
= 8 5, D
3
= 1. The equilibrium points
are consequently S

1
= (0, 0), S

2
= (0, 5/2), S

3
= (4, 0), and S

4
= ((8 5)/(2 ), 1/(2 )).
Linearization shows that regardless of the value of the parameter , S

1
is a source, and S

3
is a
saddle.
For 0 < 8/5, D
1
, D
2
, D
3
are all positive, so case I. applies. In particular, S

2
and S

3
are
saddles, and S

4
is a sink. In the long run, all points with positive coordinates approach this
sink.
If = 8/5, the fourth equilibrium has coordinates S

4
= (0, 2.5), and thus coincides with S

2
.
This equilibrium point is non-hyperbolic.
For > 8/5, S

4
has left the rst quadrant and is not relevant for the dynamics of points with
non-negative coordinates. The value of D
2
is now negative, and we are in territory unexplored
by the general discussion above. However, the linearization at S

2
shows that this equilibrium
point is now a sink, and any point with positive coordinates approaches this sink as t .
In real terms, what happens here is that when the interaction of the second species (Q) on the
growth of the rst species (P) reaches a certain intensity, given by the bifurcation value
0
= 8/5,
the rst species is no longer viable, and thus becomes extinct in the long run.
7.2 Predator-Prey Models
We turn our attention to modeling the populations of two species, where one species preys on the
other. One of the simplest models in this context is the Lotka-Volterra model which is analyzed in
the following.
The Lotka-Volterra Model
Suppose the size of the predator population P and the size of the prey population Q are described
by the following general model.
dP
dt
= aPQbP (7.6)
dQ
dt
= cQdPQ, (7.7)
where a, b, c, d > 0. This model states that in the absence of prey (Q = 0), the predator population
will decrease exponentially; in the absence of predators (P = 0), the prey population will increase
exponentially. The interaction term aPQ in (7.6) indicates that the increase in the predator
population is proportional to the product of both populations. The interaction orders are (1, 1).
More generally, the model may be extended to have interaction orders (i, j); the interaction term
would then be aP
i
Q
j
. (Models of this more general type are presented in exercise 7.4. The
concept of interaction orders can also be applied to the competing species model in section 7.1.)
Similarly, the interaction term dPQ in (7.7) indicates that the decrease in the prey population is
proportional to the product of both populations.
184 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
As we did for the competing species model in section 7.1, we will analyze the Lotka-Volterra
model by nding the nullclines and linearizing near the equilibrium points.
We have dP/dt = 0 precisely when P = 0 or Q = b/a; in the rst case, dQ/dt = cQ, so the
Q-axis is invariant and Q

= 0 is a source. Also, dQ/dt = 0 if and only if Q = 0 or P = c/d; the


P-axis is invariant and P

= 0 is a sink. This also shows that the equilibrium points are


S

1
= (0, 0), S

2
=
_
c
d
,
b
a
_
. (7.8)
The linearization matrix is
A
(P,Q)
=
_
aQb aP
dQ c dP
_
. (7.9)
If (P, Q) = (0, 0), the matrix A
(0,0)
has negative determinant, so the origin is a saddle. The matrix
A
(c/d,b/a)
has trace T = 0 and determinant D = bc > 0; consequently, the matrix is non-hyperbolic,
and Hartmans Theorem does not apply. By remark 6.2.3, S

2
is either a spiral sink, spiral source,
or a center. To decide which type applies, observe the following.
If we divide equation (7.6) by (7.7), we obtain
dP
dQ
=
aPQbP
cQdPQ
=
P(aQb)
Q(c dP)
.
Note that the dP on the right is part of the derivative, whereas the dP in the denominator
on the left simply means that the size of the predator population is multiplied by the parameter d.
The equation is separable and can be solved as follows.
_
c dP
P
_
dP =
_
aQb
Q
_
dQ,

_
c
P
d
_
dP =
_
a
b
Q
_
dQ,
c log P dP = aQb log Q+C.
Exponentiating both sides of the last equation and absorbing the constant gives the implicit solution
P
c
Q
b
= Ce
aQ+dP
. (7.10)
It can be seen that the curves described in the PQ-plane by this last equation are closed curves
around the equilibrium point S

2
= (c/d, b/a). Consequently, S

2
is a center and the phase portrait
for the Lotka-Volterra equations consists of periodic solutions that ll out the rst quadrant.
Example 7.2.1. Suppose a = 2, b = 10, c = 6 and d = 1 in (7.6), (7.7). Then the center equilibrium
point is (c/d, b/a) = (6, 5). Equation (7.10) becomes
P
6
Q
10
e
P
e
2Q
= C.
Graphing these curves for various values of C (using e.g. the ContourPlot function in Mathematica)
gives the phase portrait in Figure 7.3.
7.2. PREDATOR-PREY MODELS 185
Figure 7.3: The phase portrait for example 7.2.1. The curves correspond to C =
100, 1000, 10000, 30000 in equation (7.10); the larger C is, the closer the solution is to the equilib-
rium point (6, 5).
5 10 15 20
P predators 0
2
4
6
8
10
12
14
Q prey
Remark 7.2.1. Note that the orientation of the solution curves is always clockwise. This can be
seen mathematically as follows. Since dP/dt = P(aQ b), we see that if P > 0, then dP/dt > 0
whenever Q is greater than its equilibrium value of b/a, and dP/dt < 0 whenever Q is less than
b/a. Of course, conceptually, we expect the same behavior. If there are too many prey (measured
relative to the equilibrium value), then the predator population increases; if there are too few prey,
the predator population decreases.
We now investigate two aspects of the Lotka-Volterra model that expose it as being a rather
unrealistic model for real-world populations. The rst aspect is that of robustness (also called
structural stability): a model is robust if small perturbations in the equations do not change the
qualitative behavior of the solutions. As we will see in the example that follows, adding a small
perturbation term to equations (7.6), (7.7) will cause the closed solution curves to disappear.
Example 7.2.2. Consider equations of the form
dP/dt = 2QP 10P (7.11)
dQ/dt = 6QPQ+Asin(2t).
This is the model in example 7.2.1 with the addition of the perturbation term Asin(2t) in (7.7)
which can be interpreted as a seasonal variation with amplitude [A[ in the growth of the prey
population. When we plot solution curves using e.g. NDSolve in Mathematica, we obtain the phase
portraits shown in Figure 7.4 and Figure 7.5.
We observe that a small positive value of A (A = 0.05; Figure 7.4a) leads to a spiraling of
the solution curves towards the equilibrium point. A larger positive value for A shows a more
pronounced version of this phenomenon (A = 0.5; Figure 7.4b). If A is negative, the solutions
curves spiral away from the equilibrium point (A = 0.05, Figure 7.5a; and A = 0.5, Figure
7.5b). Note that the time scales are the same for these four phase portraits; in each case 0 t 50.
186 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
Certainly, it is true that the solutions appear to spiral away slowly from the orbits that correspond
to A = 0. Nevertheless, there is a qualitative change in the long-term behavior of the solution
curves. In particular, the equilibrium point in the rst quadrant is now either a spiral sink (for
positive values of A) or a spiral source (for negative values of A).
Figure 7.4: The phase portrait for example 7.2.2 with: (a) A = 0.05 (left) and (b) A = 0.5 (right)
for 0 t 50. The solution curves spiral towards the equilibrium point.
5 10 15 20
P predators 0
2
4
6
8
10
12
14
Q prey
5 10 15 20
P predators 0
2
4
6
8
10
12
14
Q prey
The second aspect that renders the Lotka-Volterra model problematic is that the period and
the amplitude of a solution curve depend on the initial conditions. This is in conict with observed
phenomena of predator-prey populations in the eld, where periodic behavior is quite common,
but the period and amplitude are always roughly the same. The next example illustrates this
shortcoming of the Lotka-Volterra model.
Example 7.2.3. We consider the equations in example 7.2.1:
dP/dt = 2QP 10P, dQ/dt = 6QPQ.
If we plot either the solution P(t) against t or Q(t) against t (or both, as in Figure 7.6), we can
see that the period of these solutions varies with the initial populations of predators and prey. If
the initial condition is (P(0), Q(0)) = (6, 10), the period appears to be about 0.85 units of time,
whereas if (P(0), Q(0)) = (6, 30), the period is about 1.5 units of time. The amplitudes are also
substantially dierent this can of course already be seen in Figure 7.3.
As mentioned above, real-world observations are generally not compatible with the situation
shown in Figure 7.3, where each initial condition lies on its own closed solution curve. Rather, the
empirical data indicate the presence of either a stable limit cycle or an attracting xed point. This
is the case for the Holling-Tanner model which we explore next.
7.2. PREDATOR-PREY MODELS 187
Figure 7.5: The phase portrait for example 7.2.2 with: (a) A = 0.05 (left) and (b) A = 0.5
(right) for 0 t 50. The solution curves spiral away from the equilibrium point.
5 10 15 20
P predators 0
2
4
6
8
10
12
14
Q prey
5 10 15 20
P predators 0
2
4
6
8
10
12
14
Q prey
Figure 7.6: The graph of the predator population (in blue) and the prey population (red) with
initial condition: (a) (P(0), Q(0)) = (6, 10) (left) and (b) (P(0), Q(0)) = (6, 30) (right).
1 2 3 4 5
t
5
10
15
20
P,Q
1 2 3 4 5
t
10
20
30
40
50
60
P,Q
188 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
The Holling-Tanner Model
The Holling-Tanner model for the predator (P) and prey (Q) interaction is of the form
dP
dt
= aP
_
1
NP
Q
_
(7.12)
dQ
dt
= bQ
_
1
Q
Q
max
_

cPQ
d +Q
, (7.13)
where a, b, c, d, N, Q
max
> 0 are the parameters of the model. We may interpret the model given
by the equations (7.12), (7.13) as follows.
If P = 0, the prey population grows logistically according to the model dQ/dt = bQ(1
(Q/Q
max
)), where, as usual, Q
max
is the carrying capacity.
The term cPQ/(d + Q) represents a reduction in the growth of the prey population due
to predation; if the the prey population is large, this term approaches cP, which is the
maximal rate of predation. The parameter d may be interpreted as the time required for a
predator to search and nd prey.
The factor (1 (NP/Q)) indicates that there will be stable predator population if 1
(NP/Q) = 0, or alternatively N = Q/P; thus, the parameter N can be interpreted as
the number of prey that support one individual predator at this equilibrium.
Instead of presenting a general analysis, we look at the following example.
Example 7.2.4. Let us investigate the model when a = 0.2, b = 0.8, c = 1, d = 1.2, N = 0.5,
Q
max
= 10.
We have dP/dt = 0 if P = 0 (in which case dQ/dt = 0.8Q(1 (Q/10)), and the Q-axis is
invariant with Q

= 0 being a source and Q

= 10 being a sink). We also have dP/dt = 0 if


P = Q/N = 2Q. Thus, all solution curves P(t), Q(t) have vertical tangent on the line Q = P/2.
The equation dQ/dt = 0 implies either Q = 0 or 0.8(1 (Q/10)) (P/(1.2 +Q)) = 0. In the rst
case, the rst equation (7.12) becomes undened.
This establishes that there are two equilibrium points with non-negative coordinates, S

1
=
(0, 10), and S

2
whose coordinates can be found by solving the system P = 2Q, 0.8(1 (Q/10))
(P/(1.2 +Q)) = 0. This gives S

2
(1.42, 0.71).
The linearization is given by the matrix
A
(P,Q)
=
_
0.2
0.2P
Q
0.1P
2
Q
2

Q
1.2+Q
0.8 0.16Q
1.2P
(1.2+Q)
2
_
(7.14)
If S

1
= (0, 10), A
S

1

_
0.2 0
0.89 0.8
_
has negative determinant, and so S

1
is a saddle. Also,
A
S

2

_
0.2 0.4
0.37 0.22
_
. Its determinant D is positive, its trace T is positive, and T
2
4D < 0;
so S

2
is a spiral source.
When plotting the phase portrait, we observe the existence of a stable limit cycle (Figure
7.7). The long term behavior of the solution curves in this example is that the predator and prey
populations approach the limit cycle and undergo periodic variations with xed amplitude and
period.
7.3. THE FORCED DAMPED PENDULUM AND CHAOS 189
Figure 7.7: The phase portrait for the Holling-Tanner model in example 7.2.4; the stable limit cycle
and the unstable equilibrium point are shown in red.
1 2 3 4 5 6
P predators 0
1
2
3
4
5
6
Q prey
Generally, it is incorrect to assume that a Holling-Tanner model will have a stable limit cycle.
Typically, the equilibrium point S

2
with positive coordinates turns out to be either a sink or a
spiral sink (see exercise 7.5). In those situations, the sizes of the predator and prey populations
settle down at xed equilibrium values.
7.3 The Forced Damped Pendulum and Chaos
We now turn our attention to a concrete mechanical situation. Consider the unforced pendulum
without friction in example 6.6.2. The dierential equation for its angle of displacement is
d
2

dt
2
+
g

sin = 0.
If we add in frictional forces that are proportional to the angular velocity d/dt and external
sinusoidal forcing, we arrive at an equation of the form
d
2

dt
2
+r
d
dt
+
g

sin = Asin(t), (7.15)


where all parameters are positive. In this section, we investigate the dynamics of the forced damped
pendulum given by (7.15). We rst consider the free-response case (i.e. where A = 0).
190 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
The Damped Pendulum without Forcing
If there is no external forcing, (7.15) reduces to the two-dimensional autonomous system
d
dt
= (7.16)
d
dt
=
g

sin r
The equilibrium points (

) with [0, 2) are S

1
= (0, 0) and S

2
= (, 0). Equilibrium point
analysis shows that both equilibrium points are hyperbolic, and that S

1
is a spiral sink and S

2
is
a saddle. The phase portrait with g/ = 1 and r = 0.2 is shown in Figure 7.8. We represent the
angle modulo 2, so the high energy solution curves shown in red approach S

1
as t .
Figure 7.8: The phase portrait of the system 7.16.
3 2 1 1 2 3

4
2
2
4

These ndings are not surprising. In example 6.6.2, we saw that the undamped unforced
pendulum can be expressed as a Hamiltonian system, i.e. a system where mechanical energy is
conserved. In that case, S

1
= (0, 0) was a center and S

2
= (, 0) a saddle. Adding friction
eventually turns all of the mechanical energy into heat and thus we expect S

1
to be the long-term
solution of the system.
Now we come to the situation we are really interested in this section: what happens if we
have friction, but we also add energy to the system by external forcing? Physically, this can be
accomplished e.g. by shaking the pendulum. We look at what happens if this external forcing
occurs with a xed period and amplitude.
7.3. THE FORCED DAMPED PENDULUM AND CHAOS 191
The Forced Damped Pendulum
We may rewrite equation (7.15) as a two-dimensional rst-order non-autonomous system:
d
dt
= (7.17)
d
dt
=
g

sin r +Asin(t).
The pendulum is driven by a sine function with amplitude A and circular frequency . In
the remainder of this section, we x the values of all parameters except A and see what happens
when A is small (examples 7.3.1 and 7.3.2) and when A is large (example 7.3.3).
Example 7.3.1. Let g/ = 1, r = 0.2, A = 0.5 and = 2. Figure 7.9 shows the orbit of the solution
curve with (0) = 1, (0) = 1, t(0) = 0 over 3 periods (i.e. for 0 t 6). Figure 7.10a shows the
same orbit over 10 periods where the time variable is reduced modulo 2. The black dots indicate
the location of the orbit when t = 0, 2, 4, . . . , 20, or in other words, where the orbit intersects
the surface S = [, ) R0. Figure 7.10b shows the returns to S in the (, )-plane only. It
appears that the orbit starting at ((0), (0)) = (1, 1) approaches the xed point S

(1, 1.2)
when t is a multiple of 2 and t .
Figure 7.9: The orbit of (, ) = (1, 1) in example 7.3.1 over 3 periods.
0
5
10
15

2
1
0
1
2

1
0
1

We will analyze the dynamics given by (7.17) graphically by plotting the solutions at the
times t
n
= t
0
+ np, where n = 0, 1, 2, . . . and p = 2/ is the period of the forcing function
f(t) = Asin(t). Thus, we may think of sampling a solution curve ((t), (t)) at equally spaced
time intervals and obtaining data of the form ((t
n
), (t
n
), t
n
). Identifying all times t
n
modulo p
with the initial time t
0
gives a set S which lies in the plane S = [, ) R t
0
. This plane is
called a stroboscopic surface of section or a Poincare surface of section.
By considering the returns of the initial point (
0
,
0
) to S, we are dening a discrete orbit
((t
n
), (t
n
)) where ((t
0
), (t
0
)) = (
0
,
0
) and t
n
= t
0
+np. Studying this orbit gives us qualita-
tive information about the continuous three-dimensional orbit ((t), (t), t). We can think of this
192 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
Figure 7.10: The orbit of (, ) = (1, 1) in example 7.3.1 over 10 periods with t = 0, 2, . . . , 20:
(a) the three-dimensional plot with the surface of section in the foreground (left); (b) the returns
to the section in the (, )-plane (right).
0
2
4
6

2 0 2

2
1
0
1
2

3 2 1 0 1 2 3
2
1
0
1
2

discrete orbit as being generated by the two-dimensional map M : R


2
R
2
, where M(, ) is the
solution at t = p = 2/ to the dierential equation (7.17) with initial value (, ). Thus,
((t
n
), (t
n
)) = M
n
((t
0
), (t
0
)).
In other words, given a state (, ) of the forced damped pendulum, M(, ) is the state after
one period of the forcing function. The map M is called the Poincare map of the forced damped
pendulum.
The Poincare map will serve as a tool for analyzing the dynamics of the pendulum. We focus
on the forced damped pendulum with g = = 1, r = 0.2 and = 1. The amplitude A serves as
a parameter, and we can study the dynamics of the pendulum for various values of the amplitude
A. Physically, we can think of A as corresponding to the amount of energy that is introduced by
external forcing.
Example 7.3.2. We continue example 7.3.1; that is when A = 0.5. Recall that the plot in Figure
7.10b shows the rst ten iterates of (
0
,
0
) = (1, 1) of the Poincare map M when t
0
= 0. To
eliminate the merely transient behavior of the initial condition from its long-term behavior, we
will now plot orbits starting at a higher iterate. For example, Figure 7.11 shows the orbit of
(
0
,
0
) = (1, 1) under M using 100 n 200 iterates. There is nothing much to see: the orbit
has settled down at the xed point S

(1, 1.2).
It can be seen numerically (e.g. by using the Mathematica code provided in section 7.5) that in
fact this behavior applies to any initial condition (
0
,
0
), not just (
0
,
0
) = (1, 1): for any initial
value,
lim
n
M
n
(
0
,
0
) = S

. (7.18)
In other words, if A = 0.5, the xed point S

is globally attracting. Physically, the eect of the


external forcing is that in the long run, the pendulum will enter a periodic motion, and in particular
at time t
n
= 2n, for n large, it is in state S

.
If we use a starting time other than t
0
= 0, we observe the same behavior, except that the
equilibrium point will be located elsewhere. Figure 7.12a shows the full solution curve ((t), (t))
7.3. THE FORCED DAMPED PENDULUM AND CHAOS 193
Figure 7.11: Iterates 100 n 200 of (, ) = (1, 1) under the Poincare map of the forced damped
pendulum for A = 0.5. We observe only a single attracting xed point.
3 2 1 0 1 2 3
2
1
0
1
2

to (7.17) for the initial condition (


0
,
0
) = (0, 0) when 0 t 200; Figure 7.12b shows only the
long-term periodic solution when 100 t 200. The black dot indicates the long term state of the
system when t = 0, 2, 4, . . ..
In this example, the forcing function literally drives the pendulum: the input is a periodic
function of period p = 2, the output is a periodic motion of the pendulum with the same period.
This is in many ways the best situation we can encounter. It is present for many values of A, as
long as they do not get too large. In the next example, we look at the opposite end of the spectrum,
i.e. the worst situation. This occurs when the motion of the pendulum is chaotic.
Example 7.3.3. Now, suppose A = 2.2. If we plot the iterates M
n
(
0
,
0
) of the initial point
(
0
,
0
) = (0, 0) under the Poincare map M for 100 n 500, we obtain the picture shown
in Figure 7.13a. We observe a denite pattern. This pattern persists if a dierent initial point
is chosen: in Figure 7.13b, we see the iterates under M for 100 n 500 for the initial point
(
0
,
0
) = (1, 1). In fact, we obtain a set like the ones in Figure 7.13 for almost all initial conditions
1
.
The set observed is actually an attractor, just like the single xed point S

in example 7.3.2.
Thus we have that for almost all (
0
,
0
),
lim
n
M
n
(
0
,
0
) = . (7.19)
More explicitly, the limit statement means that given (
0
,
0
), then for every > 0 there exists a
N N so that for every n N, there exists a point S so that the distance between M
n
(
0
,
0
)
and S is less than . Figure 7.14 shows a higher resolution image of using 250,000 iterates
2
.
It can be shown that the set is invariant under the Poincare map. This means that if a point
S lies in , then so will any iterate M
n
(S), n = 1, 2, . . .. Equation (7.19) tells us in the long run,
1
By almost all we mean that if we choose an initial point at random, then with probability one the long-term
iterates under the Poincare map of this initial point will exhibit this pattern.
2
Generating this image took about 10 minutes of computing time on the authors personal computer.
194 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
Figure 7.12: The solution to (7.15) when g/ = 1, r = 0.2, = 1, A = 0.5, and (0) = 0,
(0) =

(0) = 0 : (a) transient and long-term solution for 0 t 200 (left); (b) the long-term
solution for 100 t 200 (right). The black dot shows the long term solution in Figure 7.11.
3 2 1 0 1 2 3
2
1
0
1
2

3 2 1 0 1 2 3
2
1
0
1
2

Figure 7.13: Iterates 100 n 500 of: (a) (, ) = (0, 0) (left) and (b) (, ) = (1, 1) (right) under
the Poincare map of the forced damped pendulum for A = 2.2. We observe a set that acts as an
attractor.
3 2 1 0 1 2 3
5
4
3
2
1
0
1

3 2 1 0 1 2 3
5
4
3
2
1
0
1

7.3. THE FORCED DAMPED PENDULUM AND CHAOS 195


Figure 7.14: The chaotic attractor in example 7.3.3.
and regardless of its initial state, the pendulum will settle into a motion that follows the dynamics
on . Thus, we still need to understand the behavior of iterates under the Poincare map of points
in . In a word, the dynamics on are what is usually called chaotic, and the attractor is called
a chaotic attractor for the Poincare map. We describe two of its principal properties.
(1) It exhibits sensitive dependence on initial conditions. This means that if S
1
and S
2
are
two points (the initial conditions) in with S
1
,= S
2
that are close together, then under
iteration by the Poincare map the distance between the iterates M
n
(S
1
) and M
n
(S
2
) will
increase rapidly. This behavior also applies in the long run to any two distinct points that are
not necessarily in : since iterates of these points will eventually end up near , the sensitive
dependence on will apply. To illustrate this point, consider the numerical example in Table
7.1.
In this table, we see how the origin S
1
= (0, 0) and the nearby point S
2
= (0, 10
5
) diverge
under subsequent applications of the Poincare map. After 24 iterates the separation of the
iterates is almost as large as the size of the attractor (which can be roughly approximated
as the diagonal of its bounding box, i.e.
_
4
2
+ (2)
2
7.5). After that, predicting the
coordinates of the iterate of one point from the same iterate of the other is impossible. Figure
7.15 shows the iterates from Table 7.1 for n = 26, 27, 28, 29, 30.
In practical terms, sensitive dependence means that due to roundo errors in intermediate
calculations, it is numerically impossible to determine the position of a high iterate of an initial
condition (
0
,
0
) under the Poincare map. What we can say, however, is that eventually all
iterates will lie near, or for all practical purposes in, the chaotic attractor . That is, the
196 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
Table 7.1: The iterates of the points S
1
= (0, 0) and S
2
= (0, 10
5
) and the absolute error [M
n
(S
1
)
M
n
(S
2
)[ under the Poincare map in example 7.3.3.
Iterate Point 1 Point 2 Error
0 (0.00000, 0.00000) (0.00000, 0.00001) 0.00001
1 (1.52924, 1.71307) (1.52924, 1.71308) 0.00001
2 (0.80685, 1.13357) (0.80684, 1.13353) 0.00004
3 (1.27222, 1.92275) (1.27223, 1.92277) 0.00002
4 (0.80187, 0.97229) (0.80186, 0.97223) 0.00006
5 (1.31431, 2.01361) (1.31433, 2.01364) 0.00003
6 (0.77795, 0.63866) (0.77795, 0.63855) 0.00011
7 (1.37238, 2.17672) (1.37239, 2.17678) 0.00006
8 (1.22174, 0.00771) (1.22212, 0.00783) 0.00040
9 (0.21825, 2.73969) (0.21692, 2.73968) 0.00133
10 (1.66456, 0.03919) (1.66426, 0.03922) 0.00030
11 (0.72287, 2.53291) (0.72222, 2.53318) 0.00069
12 (2.73884, 1.31651) (2.74272, 1.31315) 0.00513
13 (1.09729, 3.78887) (1.10837, 3.78910) 0.01109
14 (2.31954, 2.59970) (2.32111, 2.60090) 0.00197
15 (0.56977, 3.75345) (0.57336, 3.75012) 0.00490
16 (2.28422, 2.51057) (2.28028, 2.51815) 0.00854
17 (0.56023, 3.88413) (0.55320, 3.88143) 0.00753
18 (2.27612, 2.19497) (2.27617, 2.19678) 0.00181
19 (2.48972, 1.61299) (2.35082, 1.72921) 0.18111
20 (1.33692, 3.54730) (1.60933, 3.44689) 0.29032
21 (2.02943, 2.79465) (2.16144, 2.81131) 0.13306
22 (0.45553, 3.86021) (0.62642, 3.67690) 0.25061
23 (2.25560, 2.16756) (2.14696, 2.64800) 0.49257
24 (1.74765, 0.36396) (0.51834, 3.88766) 4.18941
25 (0.26020, 2.67438) (2.25055, 2.14329) 2.05999
26 (1.40214, 0.02365) (1.47699, 0.57220) 0.55363
27 (0.17901, 2.69618) (0.80245, 2.56472) 0.99022
28 (1.82534, 0.10699) (1.55758, 0.00598) 0.29061
29 (0.63762, 2.55246) (0.68605, 2.55367) 0.04845
30 (3.04843, 0.89506) (2.94064, 1.14219) 5.99416
7.3. THE FORCED DAMPED PENDULUM AND CHAOS 197
Figure 7.15: The last 5 ve points in Table 1; red dots are the iterates of Point 1, blue dots of Point
2.
best we can say about a high iterate of a point under the Poincare map is that is somewhere
in , but we cannot determine where in it is. It should be noted that this randomness
is not due to external random input (the forcing function in the system given by equation
(7.17) is completely deterministic), but intrinsic to the dynamics of this system.
(2) The second property that we will briey address is that the attractor has fractal dimension.
This can be explained as follows. We see from Figure 7.14 that the attractor appears to
consist of curves. This means its dimension is at least one. If we look more closely we observe
that these curves are actually bands of other curves. Figure 7.17 shows magnications of two
areas the locations of which are shown in Figure 7.16.
More specically, every curve in Figure 7.14 actually consists of two curves. Subsequent
magnications show that each of these curves again consists of two curves, and so on ad
innitum. This bunching together of curves actually leads to the dimension of the attractor
being greater than one, but less than two. (Dimension two would mean that the attractor
occupies an actual area which it does not.) Thus, the attractor has what is called fractal
(i.e. non-integer) dimension.
198 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
Figure 7.16: The attractor in example 7.3.3 and the regions magnied in Figure 7.17.
Figure 7.17: Magnication of the regions shown in red in Figure 7.16. Each curve is actually a
band two curves.
7.4. THE LORENZ SYSTEM 199
7.4 The Lorenz System
The Lorenz system is a three-dimensional autonomous non-linear system of dierential equations
of the form
dx
dt
= (y x) (7.20)
dy
dt
= x y xz
dz
dt
= xy z.
This system was developed by the meteorologist Edward Lorenz in 1963 as a simple convection
model. Specically, it is used to describe the convective ow of a uid in column where the
temperature at the bottom is greater than at the top. See [17] and [18], p. 158-159 for more
details. The variables x, y, z are functions of t, and , , are parameters. We will analyze this
system for the values = 10, = 8/3, = 28.
3
The equilibrium points of (7.20) with these parameters are S
1
= (0, 0, 0), S
2,3
= (6

2, 6

2, 27).
Linearization yields the matrix
A
(x,y,z)
=
_
_
10 10 0
28 z 1 x
y x 8/3
_
_
. (7.21)
The eigenvalues of A
(0,0,0)
are
1
11.8,
2
22.8,
3
2.7, so the equilibrium point
S
1
= (0, 0, 0) has a 1-dimensional unstable manifold tangent to the eigenvector v
1
(0.5, 1, 0) and
a 2-dimensional stable manifold tangent to the plane spanned by the eigenvectors v
2
(0.8, 1, 0)
and v
3
= (0, 0, 1).
The eigenvalues of A
(6

2,6

2,27)
are
1
13.9,
2,3
0.1 10.2i, so the equilibrium points
S
2,3
have a 1-dimensional stable manifold tangent to the eigenvector v
1
(2.1, 0.8, 1) and a
2-dimensional unstable manifold that exhibits a weak (since the real part of
2,3
is 0.1) outward
spiralling motion. In particular, all three equilibrium points are hyperbolic and unstable.
We now plot solution curves using Mathematica. Figure 7.18 show the solution curve with the
initial condition (1, 1, 1). The solution curve consists of two wings, the centers of which are given
by the equilibrium points S
2
and S
3
. We make the following observations.
(1) The long-term picture for a solution curve remains the same for almost all initial points.
Figure 7.19 shows the solution curves for (x(0), y(0), z(0)) = (1, 1, 1) and (x(0), y(0), z(0)) =
(1, 0, 0) when 30 t 50. Thus, in the long run, the solutions to the Lorenz system approach
a subset of R
3
, called the Lorenz attractor.
(2) Just like the attractor for the pendulum in section 7.3, the Lorenz attractor exhibits sensitive
dependence on initial conditions. Numerically, we can see this by comparing values of the so-
lution curves when (x(0), y(0), z(0)) = (1, 0, 0) and for the slightly perturbed initial condition
(x(0), y(0), z(0)) = (1, 10
5
, 0). These are shown in Table 7.2. As in the case of the damped
forced pendulum, we have that although in the long run, orbits lie in the attractor , their
numerical behavior is essentially unpredictable.
3
These are the classical parameters for the Lorenz system; see e.g. [17], [6] and [3], p. 219.
200 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
Figure 7.18: The solution curve for the Lorenz system (7.20) with = 10, = 8/3, = 28 and
initial condition (x(0), y(0), z(0)) = (1, 1, 1).
10
0
10
20
x
20
0
20
y
0
10
20
30
40
z
Table 7.2: The values of the solution curves x
1
(t), x
2
(t) for the Lorenz system (7.20) with = 10,
= 8/3, = 28 and the initial points S
1
= (1, 0, 0), S
2
= (1, 10
5
, 1), respectively, and the absolute
error.
t x
1
(t) x
2
(t) [x
1
(t) x
2
(t)[
0 (1.00000, 0.00000, 0.00000) (1.00000, 0.00000, 0.00001) 0.00001
5 (6.97457, 7.02106, 25.1196) (6.97457, 7.02107, 25.1196) 0.00001
10 (5.85769, 5.83109, 23.9321) (5.85769, 5.8311, 23.9321) 0.00002
15 (10.3069, 4.45104, 35.0946) (10.3069, 4.45099, 35.0945) 0.00007
20 (8.01922, 11.9008, 19.8586) (8.01934, 11.901, 19.8586) 0.00030
25 (1.03908, 2.6014, 20.6255) (1.03577, 2.59156, 20.6044) 0.02349
30 (13.1875, 8.32776, 37.6842) (13.7505, 8.26909, 38.907) 1.34744
35 (2.29864, 4.30523, 21.4955) (3.33662, 5.31776, 14.8073) 6.84362
40 (11.0076, 3.79179, 36.9488) (0.389129, 1.26705, 21.9339) 19.0733
45 (4.52864, 7.53851, 14.2328) (9.95544, 9.96483, 28.8963) 15.8226
50 (10.7827, 1.42218, 40.1382) (11.0023, 11.4043, 29.7352) 26.1237
7.5. MATHEMATICA USE 201
Figure 7.19: The long-term solution curves (30 t 50) for the Lorenz system (7.20) with = 10,
= 8/3, = 28 and initial conditions (x(0), y(0), z(0)) = (1, 1, 1) (left) and (x(0), y(0), z(0)) =
(1, 0, 0) (right).
10
0
10
x
20
10
0
10
20
y
10
20
30
40
z
10
0
10
x
20
10
0
10
20
y
10
20
30
40
z
(3) Again, it is plausible from Figure 7.19 that the Lorenz attractor has a fractal dimension
between one and two: It is obviously made up of the solution curves themselves (thus ensuring
a dimension of at least one), but these curves accumulate onto each other so that subsequent
magnications (such as the one in Figure 7.20) yield the same banding structure at all scales.
As in the previous section, it can be shown that the solution curves occupy a set that is
larger (in a suitable sense
4
) than a nite collection of curves, but smaller than a surface
in 3-space.
7.5 Mathematica Use
We present some of the Mathematica code used in section 7.3 and section 7.4.
Example 7.5.1. The following denes the Poincare map for the forced damped pendulum. The
input of the function Poincare are a point (, ) and a value for the parameter A. The parameters
g, , r, are also dened; they are xed in the analysis in section 7.3, and thus need not appear as
arguments of the Poincare function.
g 1; l 1; r 0.2; 1;
Poincare_, _, A_ :
FlattenEvaluateModxt, 2 Pi, Pi, yt . NDSolvex't yt,
y't g l Sinxt r yt A Sin t, x0 , y0 ,
xt, yt, t, 0, 2 Pi . t 2 Pi ;
4
This can be done using Hausdor measures a technique that is outside the scope of this text.
202 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
Figure 7.20: The Lorenz attractor when = 10, = 8/3, = 28 with a box indicating the region
to be magnied (left); the magnication (right).
10
0
10
x
20
10
0
10
20
y
10
20
30
40
z
16
14
12
10
x
12
10
8
6
y
34
36
38
40
42
z
Note that what this function solves the dierential equation (7.17) using the initial condition
((0), (0)) = (, ) over one period of the forcing function, and then evaluates this solution at
the end of this period (i.e at T = 2/). The -coordinate is evaluated modulo 2 with domain
[, ). The Flatten function gets rid of extra set braces that occurred in the evaluation.
The next function creates a list of iterates of the point (, ) under the Poincare map. In the
notation from section 7.3, the output is the ordered list
(M
n
(, ) : nMin n nMax) .
PList_, _, A_, nMin_, nMax_ : ModuleM, n, M0 : , ;
Mn_ : Mn PoincareMn 1, A; TableMn, n, nMin, nMax;
To create the graph in Figure 7.13a we use the following code.
ListPlotPList0, 0, 2.2, 100, 500, LabelStyle Medium,
FrameLabel "", "", PlotRange Pi, Pi, 5, 1,
PlotStyle PointSize0.025, Black, Frame True, AspectRatio 1, Axes False
Generating the data used for the detailed picture of the attractor in Figure 7.14 took 650
seconds. The Timing function keeps track of how long an evaluation takes.
Timinglist PList0, 0, 2.2, 100, 250000;
650.508, Null
7.5. MATHEMATICA USE 203
The array list now contains the data. Various plots can be generated without having to
recompute the iterates.
Example 7.5.2. The solutions to the Lorenz equations in section 7.4 can be generated and plotted as
follows. First, we dene the right-hand side of equation (7.20) using the standard parameters =
10, = 8/3, and = 28. Then, we dene the solution using the initial condition (x(0), y(0), z(0)) =
(x, y, z) for 0 t 50.
Fx_, y_, z_ : 10 y x, 28 x y x z, x y 8 3 z;
solnx0_, y0_, z0_ : NDSolvex't Fxt, yt, zt1,
y't Fxt, yt, zt2, z't Fxt, yt, zt3,
x0 x0, y0 y0, z0 z0, xt, yt, zt, t, 0, 50;
The Lorenz attractor can be plotted by graphing the solution curve to the Lorenz equations
with e.g. initial point (1, 1, 1) and 30 t 50. The 3-dimensional plot can be rotated by clicking
and dragging the graphics output, providing, for example, a birds eye view.
ParametricPlot3DEvaluatext, yt, zt . soln1, 1, 1, t, 30, 50,
PlotStyle Thick, Blue, LabelStyle Medium, AxesLabel "x", "y", "z"
10
20
30
40
z
10 0 10
x
20
10
0
10
20
y
The following code creates the data regarding sensitive dependence on initial conditions in Table
7.2.
204 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
list1
FlattenTableEvaluatext, yt, zt . soln1, 0, 0 . t i, i, 0, 50, 5, 1;
list2 FlattenTableEvaluatext, yt, zt . soln1, 0.00001, 0 . t i,
i, 0, 50, 5, 1;
errors MapNorm, list1 list2;
MapThreadList, Tablei, i, 0, 50, 5, list1, list2, errors TableForm
7.6 Exercises
Exercise 7.1. Find all equilibrium points and determine their type for the following competing
species models. Then, sketch the phase portrait and describe the long-term behavior of various
initial conditions with positive coordinates.
(a)
dP
dt
= (3 P)P 0.5PQ,
dQ
dt
= (4 2Q)QPQ
(b)
dP
dt
= (3 0.5P)P 2PQ,
dQ
dt
= (5 2Q)QPQ
(c)
dP
dt
= (6 P)P 2PQ,
dQ
dt
= (4 Q)QPQ
(d)
dP
dt
= (6 2P)P 0.5PQ,
dQ
dt
= (4 3Q)QPQ
Exercise 7.2. Investigate the following example of cases not covered in the discussion about compet-
ing species in section 7.1. Find all equilibrium points with non-negative coordinates, determine their
type, and sketch the phase portrait. Describe the long-term behavior of various initial conditions
with positive coordinates.
(a)
dP
dt
= (5 P)P PQ,
dQ
dt
= (4 2Q)QPQ
(b)
dP
dt
= (4 P)P PQ,
dQ
dt
= (6 Q)QPQ
(c)
dP
dt
= (10 2P)P 3PQ,
dQ
dt
= (6 Q)QPQ
(d)
dP
dt
= (4 P)P 0.5PQ,
dQ
dt
= (5 2Q)Q2PQ
Exercise 7.3. Describe the bifurcations aecting the orbits of initial points with positive coordinates
of the following competing species models.
(a)
dP
dt
= (4 P)P 0.5PQ,
dQ
dt
= (4 Q)QPQ, 0.
(b)
dP
dt
= (3 0.5P)P 2PQ,
dQ
dt
= (5 2Q)QPQ, 0.
(c)
dP
dt
= (4 P)P PQ,
dQ
dt
= (6 2Q)QPQ, 0.
7.6. EXERCISES 205
(d)
dP
dt
= (4 P)P PQ,
dQ
dt
= (6 Q)Q
2
PQ, 0.
Exercise 7.4. Sketch the phase portrait of the following predator-prey models. Hint: nd an implicit
solution similar to the one given in equation 7.10, and use the ContourPlot function to draw the
phase portrait.
(a) dP/dt = 0.5PQ
2
2P, dQ/dt = 2Q PQ. Use contours for C = 0.01, 0.1, 0.5, 0.75, and
viewing window 0 P 10, 0 Q 6.
(b) dP/dt = PQ
2
2P, dQ/dt = 4Q P
2
Q. Use contours for C = 0.01, 0.1, 0.5, 1, and viewing
window 0 P 5, 0 Q 5.
(c) dP/dt = 0.1PQ2P, dQ/dt = 4QP
2
Q. Use appropriate contours and viewing window.
(d) dP/dt = 0.1PQ
4
0.5P, dQ/dt = 2Q 0.5P
2
Q. Use appropriate contours and viewing
window.
Exercise 7.5. Identify all equilibrium points with non-negative coordinates and their type, and
sketch the phase portrait of the following Holling-Tanner models.
(a)
dP
dt
= 0.2P
_
1
10P
Q
_
,
dQ
dt
= 0.1Q
_
1
Q
20
_

PQ
1 +Q
(b)
dP
dt
= 0.5P
_
1
2P
Q
_
,
dQ
dt
= 5Q
_
1
Q
10
_

2PQ
1 +Q
(c)
dP
dt
= 0.5P
_
1
2P
Q
_
,
dQ
dt
= 4Q
_
1
Q
10
_

2PQ
2 +Q
(d)
dP
dt
= P
_
1
0.5P
Q
_
,
dQ
dt
= 2Q
_
1
Q
20
_

PQ
1 +Q
Exercise 7.6. In this exercise, we use the Animate function in Mathematica to explore visually what
happens to solutions of the dierential equation (7.17) that describes the forced damped pendulum.
In particular, we want to graph the long-term behavior of solution curves as the amplitude of the
forcing function is increased from A = 0 (no forcing) to A = 2.2 (the chaotic situation described in
section 7.3). The following Mathematica code will be used.
In[1]:= g1A_ :
ParametricPlotEvaluateModxt, 2 Pi, Pi, yt . NDSolvex't yt, y't
Sinxt 0.2 yt A Sint, x0 0, y0 0, xt, yt, t, 0, 200,
t, 100, 200, PlotStyle Blue, Thick, PlotRange Pi, Pi, Pi, Pi,
Frame True, AspectRatio 1, Axes False;
g2A_ : GraphicsTextA, 2.5, 2.75;
206 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
In[3]:= AnimateShowg1A, g2A, A, 0, 2.2, AnimationRunning False
Out[3]=
A
0.148
3 2 1 0 1 2 3
3
2
1
0
1
2
3
The Graphics object g1 contains the graph of the solution curve for 100 t 200 of (7.17)
when (0) = (0) = 0 and given a specic value of A. The object g2 simply shows the value of
A in the bottom left corner of the plot. The Animate function creates a collection of objects for
0 A 2.2 that can be displayed using the slider bar or can be shown as a movie using the
controls next to the slider bar.
Run the animation and address the following questions.
(a) What kinds of qualitatively dierent behavior do you observe? Can you describe this behavior
in words?
(b) Identify the ranges of the parameter A for which the dierent types of dynamics in part (a)
occur.
(c) Display the information in part (b) by creating a one-dimensional map (or what should
perhaps more properly be called a bifurcation diagram) that shows the forced damped pen-
7.7. PROJECTS 207
dulums path to chaos. As you can observe, it is a complicated and not very straightforward
journey.
Exercise 7.7. The Rossler system is a three-dimension autonomous system of dierential equa-
tions of the form
dx
dt
= y z (7.22)
dy
dt
= x +ay
dz
dt
= b cz xz,
where a, b, c are parameters.
(a) Use Mathematica to plot solution curves to (7.22) when a = b = 0.2, and c = 2, 3, 4, 5. Use
an initial point of (1, 0, 0) and 50 t 200.
(b) Describe the geometric nature of the plots in part (a).
(c) What happens to if you perturb the initial point in part (a), e.g. from (1, 0, 0) to (1.01, 0, 0)?
What does this say about the nature of the plots in part (a)?
Exercise 7.8. Another physical system that exhibits chaotic behavior for certain parameter values
is Chuas circuit. The dierential equations describing this electric circuit (which like the forced
damped pendulum can be explored in a laboratory) can be written as
dx
dt
= a(y x g(x)) (7.23)
dy
dt
= x y +z
dz
dt
= by,
where
g(x) = cx + 0.5(d c) ([x + 1[ [x 1[)
and a, b, c, d are parameters. See [1] or [18], p. 160-162 for more details.
Use Mathematica to plot solution curves to (7.23) when a = 15, b = 25, c = 6 and d decreases
from d = 1 to d = 1.2. Use an initial point of (0, 0, 1) and 0 t 100. Also, a viewing box of
3 x 3, 0.5 y 0.5, 4 z 4 is recommended.
7.7 Projects
Project 7.1. We consider the following model for the interaction of a species of predator and a
species of prey. Let P(t) denote the size of the predator population at time t and let Q(t) denote
the size of the prey population at time t. The equations describing the time-evolution of these
populations are
208 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
dP
dt
= aP +bPQ (7.24)
dQ
dt
= (c dQ)QePQ
where a, b, c, d, e > 0.
(1) Describe the equations in (7.24) verbally; that is, indicate the type of growth in the predator
population if there are no prey, and vice versa.
(2) Assume that bc > ad.
(a) Find all nullclines and determine the motion along the nullclines that are invariant.
(b) Find all equilibrium points that lie in the rst quadrant.
(c) Use the linearized system at each equilibrium point to determine its type. Using the
trace-determinant plane is sucient for this purpose.
(d) Use the information in (a), (b) and (c) to construct a general sketch of the phase portrait
for system (7.24).
(3) Assume now that bc < ad. Repeat the steps in (2) to obtain the general phase portrait in
this situation.
(4) Use Mathematica to create a phase portrait for the system
dP
dt
= 3P +PQ (7.25)
dQ
dt
= (8 2Q)Q0.5PQ.
Use a viewing window of 0 x 8, 0 y 6. Choose a sucient number of initial
conditions to yield a detailed phase portrait. The direction of motion along solution curves
must be indicated by arrows in the phase portrait you may add these by hand to the printout
of the graph.
(5) Consider the system
dP
dt
= 3P + (1 +)PQ (7.26)
dQ
dt
= (8 2Q)Q0.5(1 +)PQ.
For = 0, this coincides with system (7.25). If > 0, predators benet more from an
encounter with prey, and prey suer more. If < 0, the opposite is true.
Investigate the bifurcations the equilibrium point S

lying in the rst quadrant undergoes for


dierent values of . More specically, determine the values of for which the equilibrium
point reaches the boundary of the rst quadrant; and also the values of for which there is
a change in the type of S

(as indicated by the trace-determinant plane).


7.7. PROJECTS 209
(6) Find the values of in part (5) for which: (a) the predator population will be maximal in
the long run; (b) the prey population will be maximal in the long run.
Project 7.2. In the following, we consider the experiment of Moon and Holmes. It involves a steel
beam which is suspended equidistantly between two magnets of equal strength. See Figure 7.21.
Figure 7.21: The experiment of Moon and Holmes. A steel beam (light blue) is suspended above
two magnets (red).
If this apparatus is shaken horizontally with xed amplitude and period 2, the horizontal
strain on the beam can be modeled using the forced Dung equation
d
2
y
dt
2
+
dy
dt
+y
3
y = sin t, (7.27)
where > 0 and 0 are parameters. Equivalently, we can write (7.27) as
dy
dt
= v (7.28)
dv
dt
= v y
3
+y + sin t.
(1) If = 0, nd all equilibrium points of (7.28) and use the corresponding linearized systems to
nd the type of each equilibrium point. Why are the results not surprising?
(2) Adapt the code in section 7.5 to dene the Poincare map for (7.28).
(3) Let = 0.05 and = 2.8. Plot the iterates of the point (y, v) = (1, 0) under the Poincare
map for n = 1, 2, . . . , 5000. Use an appropriate viewing window.
210 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS
(4) Using the parameters in part (3), compute the iterates of P
0
= (1, 0) and P
1
= (1.01, 0),
P
2
= (1.001, 0), P
3
= (1.0001, 0), P
4
= (1.00001, 0) under the Poincare map. For i = 1, 2, 3, 4,
how many iterates does it take for the error [P
0
P
i
[ to reach a magnitude of the order of
the size of the attractor?
(5) Repeat part (3) using = 0.02 and = 1.3. Compare the plot to the one obtained in part (3),
especially regarding the thickness of the plot. How can this be explained by interpreting
the equations in (7.28) in relation to the experiment they describe?
Chapter 8
Laplace Transforms
8.1 Introduction to Laplace Transforms
Laplace transforms can be used as an alternative to the methods for solving linear equations
with constant coecients that were considered in chapter 3. Recall that in that chapter, we
used the characteristic equation method to solve homogeneous linear systems, and the method of
undetermined coecients for non-homogeneous linear systems.
The basic idea of using Laplace transforms is to apply an (as yet undened) transform /
to both sides of a dierential equation, thus converting the dierential equation into an algebraic
equation. Then, the algebraic equation is solved for the transform of the unknown function, and the
inverse transform /
1
is applied to both sides of the solved equation, thus yielding the solution
to the dierential equation.
Schematically, this process can be illustrated starting with, for example, a second order linear
dierential equation with constant coecients, as follows.
ay

+by

+cy = f
(apply /)
/(ay

+by

+cy) = /(f)
(solve for /(y))
/(y) = G
(apply /
1
)
y = /
1
(G)
Of course, some details need to be addressed for this to make sense. In particular, we need to
express the left side /(ay

+by

+cy) in terms of /(y). In this section, we present a single example


which can be thought of as a prototype for the processes involved when using Laplace transforms
for solving linear dierential equations.
We now dene the Laplace transform of a function. In section 8.2, we will compute the Laplace
transform of selected functions, particularly of those that frequently appear as forcing functions for
non-homogeneous linear equations. In section 8.3, we will show how to use Laplace transforms to
solve initial value problems.
211
212 CHAPTER 8. LAPLACE TRANSFORMS
Denition 8.1.1. Let y = f(x) be a function dened for x 0. Then the Laplace transform of
f(x) is the function
F(s) = /(f)(s) =


0
e
sx
f(x) dx. (8.1)
Throughout this chapter, we will disregard issues of existence of Laplace transforms (that is,
issues regarding convergence of the improper integral in (8.1)) or their inverse transforms. Rather,
we take the practical approach of using Laplace transforms as formal methods of nding possible
solutions to a dierential equation. Whether a function we obtained formally is actually a solution
to a given dierential equation can of course be veried by performing a simple check (although we
will routinely omit these checks).
We look at a simple example that illustrates the process involved in applying the Laplace
transform method as outlined above.
Example 8.1.1. Consider the initial value problem
y

2y = e
5x
, y(0) = 3. (8.2)
This is a rst order linear dierential equation which may also be solved using the integrating
factor method from section 1.4. Applying the Laplace transform of both sides, the left side of (8.2)
becomes
/(y

2y)(s) =


0
e
sx
(y

2y) dx
=


0
e
sx
y

dx 2


0
e
sx
y dx
=


0
e
sx
y

dx 2/(y)(s).
Using integration by parts, and assuming that lim
x
e
sx
y = 0 for the yet unknown solution y,
we obtain


0
e
sx
y

dx = e
sx
y

x=
x=0
+s


0
e
sx
y dx
= y(0) +s/(y)(s).
Thus, /(y

2y)(s) = y(0) + (s 2)/(y)(s). The Laplace transform of the right side of (8.2) is
computed as follows:
/(e
5x
)(s) =


0
e
sx
e
5x
dx
=


0
e
(5s)x
dx
=
1
5 s
e
(5s)x

x=
x=0
=
1
s 5
,
as long as 5 s < 0, or s > 5.
8.2. THE LAPLACE TRANSFORM OF SELECTED FUNCTIONS 213
The initial value problem (8.2) becomes:
y(0) + (s 2)/(y)(s) =
1
s 5
3 + (s 2)/(y)(s) =
1
s 5
/(y)(s) =
_
1
s 5
__
1
s 2
_
+
_
3
s 2
_
/(y)(s) =
1
3
_
1
s 5
_

1
3
_
1
s 2
_
+
_
3
s 2
_
/(y)(s) =
1
3
_
1
s 5
_
+
8
3
_
1
s 2
_
,
where partial fraction decomposition was used to get from the third to the fourth line. Since
/(e
5x
)(s) = 1/(s 5), we have /
1
(1/(s 5))(x) = e
5x
, and similarly /
1
(1/(s 2))(x) = e
2x
.
Using (or assuming) linearity of the inverse Laplace operator, we obtain:
y = /
1
/(y)(x)
=
1
3
/
1
_
1
s 5
_
(x) +
8
3
/
1
_
1
s 2
_
(x)
=
1
3
e
5x
+
8
3
e
2x
,
which indeed provides a solution to (8.2).
8.2 The Laplace Transform of Selected Functions
We now establish a series of results regarding the Laplace transform of functions we have en-
countered as forcing functions or solution functions of dierential equations, particularly of those
encountered in chapter 3. These results are given by the examples that follow or assigned as
exercises. Table 8.1 contains a list of Laplace transforms.
Example 8.2.1. Let f(x) = e
x
, where is a real number. Then,
/(e
x
)(s) =


0
e
sx
e
x
dx
=


0
e
(s)x
=
1
s
e
(s)x

x=
x=0
=
1
s
,
where s > . In particular, if = 0, we obtain
/(1) =
1
s
for s > 0.
214 CHAPTER 8. LAPLACE TRANSFORMS
Example 8.2.2. If f(x) = cos(x) with R, we have
/(cos(x))(s) =


0
e
sx
cos(x) dx
=
_
e
sx
sin(x)
s
2
+
2

se
sx
cos(x)
s
2
+
2
_

x=
x=0
=
s
s
2
+
2
,
where s > 0. The antiderivative of e
sx
cos(x) can be found by using integration by parts twice.
Similarly, for s > 0,
/(sin(x))(s) =

s
2
+
2
.
Example 8.2.3. If f(x) = x, then
/(x)(s) =


0
e
sx
xdx
=
e
sx
(1 +sx)
s
2

x=
x=0
=
1
s
2
,
for s > 0. Again, integration by parts, and also the fact that lim
x
e
sx
x
n
= 0 for s > 0 were
used.
1
In addition, for s > 0,
/(x
n+1
)(s) =


0
e
sx
x
n+1
dx
=
1
s
e
sx
x
n+1

x=
x=0
+
n + 1
s


0
e
sx
x
n
dx
=
n + 1
s
/(x
n
).
Thus, /(x
2
)(s) = (2/s)/(x) = 2/s
2
, /(x
3
)(s) = (3/s)/(x
2
)(s) = (3)(2)/s
3
, and in general, we have
for n = 0, 1, 2, 3, . . . and s > 0,
/(x
n
)(s) =
n!
s
n+1
.
The result in the following example is sometimes called the shifting theorem.
Example 8.2.4. If g(x) = e
x
f(x) and F(s) = /(f)(s), then
/(g)(s) =


0
e
sx
e
x
f(x) dx
=


0
e
(s)x
f(x) dx
= /(f)(s ) = F(s ).
In words, this result says that if we multiply a function by e
x
, then the graph of the Laplace
transform of that function is shifted units to the right (if > 0) and units to the left (if
< 0).
1
The limit statement can be obtained by using LH opitals Rule.
8.2. THE LAPLACE TRANSFORM OF SELECTED FUNCTIONS 215
Table 8.1: Laplace transforms of selected functions.
f(x) /(f)(s)
1
1
s
e
x
1
s
cos(x)
s
s
2
+
2
sin(x)

s
2
+
2
x
1
s
2
x
n
n!
s
n+1
e
x
f(x) /(f)(s )
xf(x)
d
ds
/(f)(s)
x
n
f(x) (1)
n
d
n
ds
n
/(f)(s)
x
n
e
x
n!
(s )
n+1
f

(x) s/(f)(s) f(0)


f

(x) s
2
/(f)(s) sf(0) f

(0)
f
(n)
(x) s
n
/(f)(s) s
n1
f(0) s
n2
f

(0) . . . sf
(n2)
(0) f
(n1)
(0)
H(x a)
e
as
s
, a 0
f(x a)H(x a) e
as
/(f)(s), a 0
f(x) : f(x +T) = f(x)

T
0
e
sx
f(x) dx
1 e
sT

k=0
f(x kT)H(x kT)
/(f)(s)
1 e
sT

k=0
(1)
k
f(x kT)H(x kT)
/(f)(s)
1 +e
sT
(x a) e
as
, a 0
216 CHAPTER 8. LAPLACE TRANSFORMS
Example 8.2.5. If g(x) = xf(x) and F(s) = /(f)(s), then
/(g)(s) =


0
e
sx
xf(x) dx
=


s
e
sx
f(x) dx
=
d
ds
_

0
e
sx
f(x) dx
_
= F

(s).
We used that (/s)e
sx
= xe
sx
. The transition from the partial derivative in the second line to
the derivative of the integral in the third line is justied by results from calculus. If h(x) = x
2
f(x)
and we let G(s) = /(g)(s), then we have G(s) = F

(s) and thus


/(h)(s) = G

(s) = F

(s).
Repeated application of this result leads to the formula
/(x
n
f(x))(s) = (1)
n
F
(n)
(s).
We also have linearity of the Laplace transform and of the inverse Laplace transform.
Theorem 8.2.1. For f
1
(x), f
2
(x) let F
1
(s) = /(f
1
)(s) and F
2
(s) = /(f
2
)(s). Then,
/(c
1
f
1
(x) +c
2
f
2
(x))(s) = c
1
/(f
1
(x))(s) +c
2
/(f
2
(x))(s) = c
1
F
1
(s) +c
2
F
2
(s). (8.3)
Also,
/
1
(c
1
F
1
(s) +c
2
F
2
(s))(x) = c
1
/
1
(F
1
(s))(x) +c
2
/
1
(F
2
(s))(x) = c
1
f
1
(x) +c
2
f
2
(x). (8.4)
Proof. The rst result follows from the linearity of the integral:
/(c
1
f
1
(x) +c
2
f
2
(x))(s) =


0
e
sx
(c
1
f
1
(x) +c
2
f
2
(x)) dx
= c
1


0
e
sx
f
1
(x) dx +c
2


0
e
sx
f
2
(x) dx
= c
1
F
1
(s) +c
2
F
2
(s).
Applying /
1
to the previous equation and using that /
1
/(f) = f gives (8.4).
Example 8.2.6. As an application of the previous example, let f(x) = e
x
. Then, F(s) = 1/(s )
and
/(x
n
e
x
)(s) = (1)
n
d
n
ds
n
_
1
s
_
= (1)
n
(1)
n
(n!)
1
(s )
n+1
=
n!
(s )
n+1
.
8.2. THE LAPLACE TRANSFORM OF SELECTED FUNCTIONS 217
Linearity gives
/
_
x
n
e
x
n!
_
(s) =
1
(s )
n+1
,
so
/
1
_
1
(s )
n+1
_
(x) =
x
n
e
x
n!
. (8.5)
Our last result deals with the Laplace transform of derivative functions. This is important
since we need to take Laplace transforms of both sides of dierential equations to solve them (see
example 8.1.1).
Theorem 8.2.2. Suppose F(s) = /(f)(s). Then,
/(f

)(s) = sF(s) f(0) (8.6)


/(f

)(s) = s
2
F(s) sf(0) f

(0) (8.7)
/(f
(3)
)(s) = s
3
F(s) s
2
f(0) sf

(0) f

(0)
. . .
/(f
(n)
)(s) = s
n
F(s) s
n1
f(0) s
n2
f

(0) . . . sf
(n2)
(0) f
(n1)
(0). (8.8)
Proof. Using integration by parts, we obtain
/(f

)(s) =


0
e
sx
f

(x) dx
= e
sx
f(x)

x=
x=0
+s


0
e
sx
f(x) dx
= f(0) +sF(s).
This establishes (8.6). We used (or rather assumed) that lim
x
e
sx
f(x) = 0. The result about
this limit follows if convergence/existence of the Laplace transform of f(x) is assumed. Now, using
(8.6) for f

instead of f, we get
/(f

)(s) = s/(f

)(s) f

(0)
= s(sF(s) f(0)) f

(0) = s
2
F(s) sf(0) f

(0).
In general, assume that the truth of the statement (8.8) has been established for a particular n.
We wish to show that the statement is then also true for n + 1. Thus we can establish that (8.8)
is true for all n.
2
Using (8.6) for f
(n)
instead of f,
/(f
n+1
)(s) = s/(f
(n)
)(s) f
(n)
(0)
= s(s
n
F(s) s
n1
f(0) . . . f
(n1)
(0)) f
(n)
(0)
= s
n+1
F(s) s
n
f(0) . . . sf
(n1)
(0) f
(n)
(0).
2
This argument uses the principle of mathematical induction ask your instructor for details.
218 CHAPTER 8. LAPLACE TRANSFORMS
8.3 Solving Initial Value Problems Using Laplace Transforms
We pick up the thread started with example 8.1.1 and apply our knowledge of nding Laplace
transforms to solving initial value problems. The examples below can already be solved using the
characteristic equation and the method of undetermined coecients, as explained in chapter 3. In
this sense, the current section does not provide us with anything new. However, the virtue of the
Laplace transform method becomes apparent in the next section, where we deal with piecewise
dened, in particular discontinuous, functions.
On a technical level, using Laplace transforms instead of the methods in chapter 3 substitutes
solving quadratic or polynomial equations and linear systems with, essentially, performing partial
fraction decomposition. Ironically, nding coecients for partial fractions again leads to factoring
polynomials and solving systems of linear equations.
Example 8.3.1. Solve the initial value problem
y

5y

+ 4y = e
2x
, y(0) = 0, y

(0) = 5.
Letting Y (s) = /(y)(s), using theorem 8.2.2, and y(0) = 0, y

(0) = 5 gives
/(y

)(s) = s
2
Y (s) sy(0) y

(0) = s
2
Y (s) 5
/(y

)(s) = sY (s) y(0) = sY (s).


Thus, applying the Laplace transform to the left side yields
/(y

5y

+ 4y)(s) = /(y

)(s) 5/(y

)(s) + 4/(y)(s)
= (s
2
Y (s) 5) 5(sY (s)) + 4Y (s)
= (s
2
5s + 4)Y (s) 5, (8.9)
Note the appearance of the characteristic equation (in terms of s instead of ) as the coecient
for Y (s). Regarding the right side of the dierential equation, /(e
2x
) = 1/(s + 2). Solving the
resulting equation Y (s)(s
2
5s + 4) 5 = 1/(s + 2) for Y (s) leads to
Y (s) =
5
s
2
5s + 4
+
1
(s + 2)(s
2
5s + 4)
.
In order to nd the inverse Laplace transform of the right-hand side, we need to nd the partial
fraction decompositions of 5/(s
2
5s + 4) and 1/((s + 2)(s
2
5s + 4)).
We remind the reader how to do this for the rst term. After factoring s
2
5s+4 = (s4)(s1),
we can use the cover-up method, as follows: we need to nd coecients A and B so that
5
(s 4)(s 1)
=
A
s 4
+
B
s 1
.
Multiplying by (s 4)(s 1) gives 5 = A(s 1) +B(s 4). Substitution of s = 4 implies A = 5/3
and substituting in s = 1 gives B = 5/3. Also, it can be seen that
1
(s + 2)(s 4)(s 1)
=
_
1
18
__
1
s + 2
_
+
_
1
18
__
1
s 4
_

_
1
9
__
1
s 1
_
.
8.3. SOLVING INITIAL VALUE PROBLEMS USING LAPLACE TRANSFORMS 219
Thus,
Y (s) =
_
1
18
__
1
s + 2
_
+
_
31
18
__
1
s 4
_

_
16
9
__
1
s 1
_
.
Now, applying /
1
leads to
y = (1/18)e
2x
+ (31/18)e
4x
(16/9)e
x
.
Remark 8.3.1. Two remarks are in order here. First, to use the method of Laplace transforms
(as explained here), the initial conditions must always be specied at x
0
= 0. This is no real
restriction of generality since we may always re-scale our x-units so that x = x
0
corresponds to
x = 0. Second, the Laplace transform method does provide us with general solutions, as well. In
the above example, we may let y(0) = y
0
and y

(0) = v
0
, in which case (8.9) takes the form
/(y

5y

+ 4y)(s) = Y (s)(s
2
5s + 4) (s + 5)y
0
v
0
.
Proceeding in the same way leads to the solution
y = (1/18)e
2x
+ ((1/18) (1/3)y
0
+ (1/3)v
0
)e
4x
+ ((1/9) + (4/3)y
0
(1/3)v
0
)e
x
.
Choosing c
1
and c
2
appropriately gives the general solution y = (1/18)e
2x
+c
1
e
4x
+c
2
e
x
.
Example 8.3.2. Find the equation of motion for the linear oscillator given by
9 x + 10 x +x = cos(2t), x(0) = x(0) = 0.
Letting X(s) = /(x)(s) and using the initial conditions, leads to Laplace transform equation
(9s
2
+ 10s + 1)X(s) =
s
s
2
+ 4
,
or
X(s) =
s
(9s
2
+ 10s + 1)(s
2
+ 4)
=
s
(s + 1)(9s + 1)(s
2
+ 4)
.
The partial fraction decomposition may again be obtained by using the cover-up method, when
factoring s
2
+ 4 as (s + 2i)(s 2i), setting up the decomposition as
s
(s + 1)(9s + 1)(s + 2i)(s 2i)
=
A
s + 1
+
B
9s + 1
+
C
s + 2i
+
D
s 2i
, (8.10)
multiplying both sides by (s+1)(9s+1)(s+2i)(s2i), and then substituting in s = 1, 1/9, 2i, 2i.
This gives
s
(s + 1)(9s + 1)(s + 2i)(s 2i)
=
1
40
s + 1
+

81
2600
9s + 1
+
7+4i
650
s + 2i
+
74i
650
s 2i
. (8.11)
We combine the last two terms in (8.11) to the common denominator s
2
+4; this yields the numerator
(7/325)s + (8/325). The partial fraction decomposition can be written as
X(s) =
_
1
40
__
1
s + 1
_

_
9
2600
__
1
s + (1/9)
_
+
_
4
325
__
2
s
2
+ 4
_

_
7
325
__
s
s
2
+ 4
_
.
The right side is set up in such a way so that the inverse Laplace transforms can be easily read out
from Table 8.1. Applying /
1
gives the solution:
x = (1/40)e
t
(9/2600)e
(1/9)t
+ (4/325) sin(2t) (7/325) cos(2t).
220 CHAPTER 8. LAPLACE TRANSFORMS
Example 8.3.3. Consider the initial value problem
y

+ 2y

+y = te
t
, y(0) = 1, y

(0) = 1.
The Laplace transform of the left side is Y (s)(s
2
+ 2s + 1) s 1. The Laplace transform of
te
t
can be found by observing that F(s) = /(e
t
)(s) = 1/(s + 1) and /(te
t
)) = F

(s) =
(d/ds)(1/(s + 1)) = 1/(s + 1)
2
. Thus,
Y (s) =
s + 1
s
2
+ 2s + 1
+
1
(s + 1)
2
(s
2
+ 2s + 1)
=
1
s + 1
+
1
(s + 1)
4
.
The right side already represents the partial fraction decomposition. The inverse Laplace transform
of 1/(s + 1) is e
t
. Since /
1
(1/(s + 1)
4
) = t
3
e
t
/6 (equation (8.5)), the solution to the initial
value is
y = e
t
+ (1/6)t
3
e
t
.
8.4 Discontinuous and Periodic Forcing Functions
The goal of this section is to address the situation when the forcing function of a linear dierential
equation (with constant coecients) is piecewise dened or periodic. The piecewise dened case is
totally out of the reach of the methods discussed in chapter 3. Also, we will consider much more
general periodic forcing functions than the sinusoidal functions covered in that chapter.
Discontinuous Forcing Functions
We begin by dening an elementary piecewise-dened function, the Heaviside function.
Denition 8.4.1. The Heaviside function is
H(x) =
_
0 if x < 0
1 if x 0
. (8.12)
The graph of y = H(x) is shown in Figure 8.1. We now make a couple of observations that
address the connection between Heaviside functions and more general piecewise dened functions.
Observe that
H(x a) =
_
0 if x a < 0
1 if x a 0
=
_
0 if x < a
1 if x a
. (8.13)
The graph of y = H(x a) is shown in Figure 8.2. Suppose a < b. Then,
H(x a) H(x b) =
_

_
0 if H(x a) = 0 and H(x b) = 0
0 if H(x a) = 1 and H(x b) = 1
1 if H(x a) = 1 and H(x b) = 0
1 if H(x a) = 0 and H(x b) = 1
=
_

_
0 if x < a and x < b
0 if x a and x b
1 if x a and x < b
1 if x < a and x b
=
_
_
_
0 if x < a
1 if a x < b
0 if x b
. (8.14)
8.4. DISCONTINUOUS AND PERIODIC FORCING FUNCTIONS 221
Figure 8.1: The graph of the Heaviside function y = H(x).
x
1
y
Figure 8.2: The graph of the shifted Heaviside function y = H(x a).
a
x
1
y
222 CHAPTER 8. LAPLACE TRANSFORMS
Figure 8.3 shows the graph of the function in (8.14). Also, we have that
1 H(x a) =
_
1 if x < a
0 if x a
, (8.15)
see Figure 8.4. We have thus established the following results relating Heaviside functions and
piecewise dened functions.
Figure 8.3: The graph of y = H(x a) H(x b), a < b.
a b
x
1
y
Figure 8.4: The graph of the function y = 1 H(x a).
a
x
1
y
Theorem 8.4.1. Let f(x) be a piecewise dened function of the form
f(x) =
_

_
f
1
(x) if x < x
1
f
2
(x) if x
1
x < x
2
f
3
(x) if x
2
x < x
3
.
.
.
f
n1
(x) if x
n2
x < x
n1
f
n
(x) if x x
n1
. (8.16)
8.4. DISCONTINUOUS AND PERIODIC FORCING FUNCTIONS 223
Then,
f(x) = f
1
(x)(1 H(x x
1
)) (8.17)
+ f
2
(x)(H(x x
1
) H(x x
2
))
+ f
3
(x)(H(x x
2
) H(x x
3
))
+ . . .
+ f
n1
(x)(H(x x
n2
) H(x x
n1
))
+ f
n
(x)H(x x
n1
).
Thus, Heaviside functions can be used to turn on the functions f
1
(x), f
2
(x), . . . , f
n
(x) over
their domains. If we can nd the Laplace transform of Heaviside functions, then we can hope to
nd the Laplace transform of functions of the form (8.16). The following two examples deal with
Laplace transforms of Heaviside functions.
Example 8.4.1. If a 0, then
/(H(x a))(s) =


0
e
sx
H(x a) dx
=


a
e
sx
dx
=
1
s
e
sx

x=
x=a
=
e
as
s
, if s > 0.
Example 8.4.2. If a 0, then
/(g(x)H(x a))(s) =


0
e
sx
g(x)H(x a) dx
=


a
e
sx
g(x) dx (let t = x a)
=


0
e
s(t+a)
g(t +a) dt
= e
sa


0
e
st
g(t +a) dt
= e
as
/(g(x +a))(s).
By considering g(x) = f(x a), we may write
/(f(x a)H(x a))(s) = e
as
/(f(x))(s). (8.18)
Example 8.4.3. We would like to compute the Laplace transform of the tent function shown in
Figure 8.5. The function can be expressed as the piecewise dened function
f(x) =
_

_
0 if x < 0
x if 0 x < 1
2 x if 1 x < 2
0 if x 2
.
224 CHAPTER 8. LAPLACE TRANSFORMS
Using theorem 8.4.1, we may write f(x) using Heaviside functions in the form
f(x) = x(H(x) H(x 1)) + (2 x)(H(x 1) H(x 2)).
Alternatively, for x 0,
f(x) = x 2(x 1)H(x 1) + (x 2)H(x 2). (8.19)
Using equation (8.18) and that /(x)(s) = 1/s
2
, the Laplace transform is
/(f) = /(x) 2/((x 1)H(x 1)) +/((x 2)H(x 2))
=
1
s
2

2e
s
s
2
+
e
2s
s
2
.
Figure 8.5: The graph of the function in example 8.4.3.
1 1 2 3
x
0.5
0.5
1.0
1.5
y
Example 8.4.4. Consider the initial value problem
y

+
2
y = f(x), y(0) = y

(0) = 0, (8.20)
where f(x) is the tent function in example 8.4.3. Physically, the dierential equation represents an
undamped linear oscillator with f(x) as the external forcing function and circular eigenfrequency

0
= .
To solve (8.20), we take the Laplace transform of both sides. Letting Y (s) = /(y)(s), we obtain
Y (s) =
1 2e
s
+e
2s
s
2
(s
2
+
2
)
. (8.21)
The partial fraction decomposition of 1/(s
2
(s
2
+
2
)) is
1
s
2
(s
2
+
2
)
=
_
1

2
__
1
s
2
_

_
1

2
__
1
s
2
+
2
_
.
Thus, for x 0,
/
1
_
1
s
2
(s
2
+
2
)
_
(x) =
_
x

2

sin(x)

3
_
H(x).
8.4. DISCONTINUOUS AND PERIODIC FORCING FUNCTIONS 225
Also,
/
1
_
e
s
s
2
(s
2
+
2
)
_
(x) =
_
x 1

2

sin((x 1))

3
_
H(x 1),
/
1
_
e
2s
s
2
(s
2
+
2
)
_
(x) =
_
x 2

2

sin((x 2))

3
_
H(x 2).
Taking the inverse Laplace transform of both sides of (8.21) gives the solution y = y
1
+y
2
, where:
y
1
=
x 2(x 1)H(x 1) + (x 2)H(x 2)

2
=
f(x)

2
(here we used equation (8.19)). Also, since sin((x 1)) = sin(x) and sin((x 2)) = sin(x),
y
2
=
sin(x)

3
(H(x) + 2H(x 1) +H(x 2))
=
sin(x)

3
(H(x) H(x 1) + 3(H(x 1) H(x 2)) + 4H(x 2))
=
_

_
0 if x < 0
sin(x)/
3
if 0 x < 1
3 sin(x)/
3
if 1 x < 2
4 sin(x)/
3
if x 2
.
Figure 8.6 shows the graph of the solution. It is the superposition of a constant multiple of the
forcing function (y
1
, shown in Figure 8.7a), and a piecewise dened sinusoid function (y
2
, shown in
Figure 8.7b). If x > 2, the solution is simply
y

=
4 sin(x)

3
.
Figure 8.6: The graph of the solution in example 8.4.4.
2 4 6 8 10
x
0.15
0.10
0.05
0.05
0.10
0.15
y
226 CHAPTER 8. LAPLACE TRANSFORMS
Figure 8.7: The graph of (a): the piecewise linear part of the solution in example 8.4.4 (left); (b):
the piecewise sinusoid part (right).
2 4 6 8 10
x
0.15
0.10
0.05
0.05
0.10
0.15
y
2 4 6 8 10
x
0.15
0.10
0.05
0.05
0.10
0.15
y
Periodic Forcing Functions
We now turn our attention to periodic forcing; in particular, it might be interesting to periodically
extend the forcing function in example 8.4.4 to have period 2. Then the circular frequency of
the forcing function is the same as the eigenfrequency of the free-response system, and from the
discussion in chapter 4, we expect to observe resonance phenomena. The example below shows that
we will not be disappointed. First, however, we present two results that help us compute Laplace
transforms and inverse Laplace transforms of periodic functions.
Theorem 8.4.2. If y = f(x) is periodic with period T > 0 (i.e. f(x +T) = f(x) for all x), then
/(f)(s) =

T
0
e
sx
f(x) dx
1 e
sT
. (8.22)
Proof. Let I =

T
0
e
sx
f(x) dx. Then,
/(f)(s) =


0
e
sx
f(x) dx
=

T
0
e
sx
f(x) dx +


T
e
sx
f(x) dx
= I +


0
e
s(x+T)
f(x +T) dx
= I +e
sT


0
e
sx
f(x) dx
= I +e
sT
/(f)(s).
Solving for /(f)(s) gives the result.
Theorem 8.4.3. For a function of the form
Y (s) =
F(s)
1 e
sT
, s, T > 0, (8.23)
8.4. DISCONTINUOUS AND PERIODIC FORCING FUNCTIONS 227
the inverse Laplace transform is
y(x) =

k=0
f(x kT)H(x kT). (8.24)
Proof. Observe that due to the fact that 0 < e
sT
< 1, we may expand 1/(1e
sT
) as a geometric
series:
1
1 e
sT
=

k=0
e
ksT
.
So,
/
1
_
F(s)
1 e
sT
_
=

k=0
/
1
(e
ksT
F(s)).
But now by equation (8.18),
/
1
(e
ksT
F(s)) = f(x kT)H(x kT).
Example 8.4.5. Consider the initial value problem
y

+
2
y = f(x), y(0) = y

(0) = 0, (8.25)
where f(x) is the periodic extension of the function y = f(x) in example 8.4.4 (see Figure 8.8).
According to theorem 8.4.2, the Laplace transform of f(x) is
/(f)(s) =

2
0
e
sx
f(x) dx
1 e
2s
=


0
e
sx
f(x) dx
1 e
2s
=
1
s
2

2e
s
s
2
+
e
2s
s
2
1 e
2s
=
1 2e
s
+e
2s
s
2
(1 e
2s
)
.
Letting Y (s) = /(y)(s), (8.25) gives
Y (s) =
1 2e
s
+e
2s
s
2
(s
2
+
2
)(1 e
2s
)
=
F(s)
1 e
2s
.
We have already seen in example 8.4.4 that
y
0
(x) = /
1
(F(s))(x) =
f(x)

2

sin(x)

3
(H(x) + 2H(x 1) +H(x 2)),
228 CHAPTER 8. LAPLACE TRANSFORMS
where f(x) = x 2(x 1)H(x 1) + (x 2)H(x 2). By theorem 8.4.3, the solution to (8.25) is
y(x) =

k=0
y
0
(x 2k)H(x 2k) = y
0
(x) +y
0
(x 2)H(x 2) +y
0
(x 4)H(x 4) +. . . . (8.26)
Figure 8.9 shows the graph of the solution function. Note the linearly increasing amplitude: this
is same type of resonance phenomenon we observed in example 4.1.2. If we want to compute the
solution for, say, 0 x < 10 only, we may replace the innite sum in (8.26) by the sum from k = 0
to k = 4 (that is, we use only the rst 5 terms). This is because the remaining terms are multiplied
by H(x 2k) with k 5, which makes them zero for x < 10.
Figure 8.8: The graph of the forcing function y = f(x) in example 8.4.5.
2 4 6
x
0.5
0.5
1.0
1.5
y
Figure 8.9: The graph of the solution in example 8.4.5.
2 4 6 8 10
x
0.4
0.2
0.2
0.4
0.6
y
8.5. DIRAC FUNCTIONS AND IMPULSE FORCING 229
8.5 Dirac Functions and Impulse Forcing
Suppose we have an RLC circuit as in section 4.2. The dierential equation governing the current
I(t) in this circuit is
L
d
2
I
dt
2
+R
dI
dt
+
1
C
I = E

(t). (8.27)
The units involved in both sides of this equation can be chosen to be volts per second. We
want to model the situation that at time t = t
0
, there is a voltage surge of, say, 1,000 volts. This
means that over a short period of time, 1,000 volts enter the circuit. Thus we need to choose as
f(t) = E

(t) 0 on the right of equation (8.27) a function that is non-zero only in a small interval,
say [t
0
t, t
0
+ t], and whose total integral is

f(t) dt =

t
0
+t
t
0
t
f(t) dt = 1000.
Of course, there are many functions that t this description. One of the easiest ways of obtaining
such a function is to use a piecewise constant function, that is,
f(t) =
_
_
_
0 if t < t
0
t
1000/(2t) if t
0
t t < t
0
+ t
0 if t t
0
+ t
Note that this function can also be written in terms of Heaviside functions, as follows:
f(t) = (1000/(2t)) (H(t (t
0
t)) H(t (t
0
+ t))) .
More generally, we can consider functions of the form
f(t) =
E
2t
(H(t (t
0
t)) H(t (t
0
+ t))) , (8.28)
where E, t > 0. For t small, f(t) provides what we can think of as impulse forcing to the
linear dierential equation (8.27). We are interested in two aspects regarding f(t): rst, what is
its Laplace transform; and second, what happens as t 0?
To answer these questions, we rst consider a normalized form of f(t) in (8.29), namely when
E = 1 and t
0
= 0. Thus, we consider the function
d
t
(t) =
1
2t
(H(t + t) H(t t)) . (8.29)
Figure 8.10 shows the graph of d
t
(t) when t = 0.1 and t = 0.05.
Since the Laplace transform of the Heaviside function H(x a) is e
as
/s, we have
/(d
t
)(s) =
1
2t
_
e
st
s

e
st
s
_
=
1
s
_
e
st
e
st
2t
_
.
230 CHAPTER 8. LAPLACE TRANSFORMS
Figure 8.10: The graph of the function d
t
(t) in (8.29) when t = 0.1 (blue) and t = 0.05
(purple).
0.2 0.1 0.1 0.2
t
2
4
6
8
10
y
We recognize that the dierence quotient approaches the derivative of the function s e
st
at t = 0.
Thus,
lim
t0
e
st
e
st
2t
=
d
dt

t=0
e
st
= s.
and consequently
lim
t0
/(d
t
)(s) = 1. (8.30)
Also, note that

d
t
(t) dt = 1
for all t > 0, thus
lim
t0

d
t
(t) dt = 1, (8.31)
Even more than that is true: if g(t) is any (continuous) function, then since for small t, g(t) g(0)
when t t t, we have

g(t)d
t
(t) dt =

t
t
(1/(2t))g(t) dt
(2t)(1/(2t))g(0) = g(0).
Consequently,
lim
t0

g(t)d
t
(t) dt = g(0). (8.32)
Now, if the order of the Laplace transform or integration and the limit in equations (8.30),
(8.31) or (8.32) are interchanged, we can think of having obtained a function (t) = lim
t0
d
t
(t)
whose Laplace transform and total integral are both 1, that is zero everywhere except at t = 0,
where it is undened (or ). Also, if this function is multiplied by an arbitrary function g(t),
then the total integral of this product reads out the value of g(t) when t = 0.
8.5. DIRAC FUNCTIONS AND IMPULSE FORCING 231
Of course, it is hard to understand this function in the customary sense. However, as we
have seen, it is useful to have at least a formal approach when considering functions that represent
impulses in physical models (e.g. voltage surges or hammer blows). This leads to the following
denition.
Denition 8.5.1. We dene the Dirac delta function (or simply the delta function) as
(t) = lim
t0
d
t
(t), (8.33)
where the convergence is understood in the sense that

g(t)(t) dt = lim
t0

g(t)d
t
(t) dt (8.34)
for all continuous functions g(t).
The following theorem summarizes the properties of the delta function we need to be aware of.
Theorem 8.5.1. We have

g(t)(t a) dt = g(a). (8.35)


Also, for a 0, the Laplace transform of the shifted delta function is
/((t a))(s) = e
as
, (8.36)
Proof. If we apply (8.32) for g
a
(x) = g(x +a), then
g(a) = g
a
(0)
= lim
t0

g
a
(x)d
t
(x) dx
= lim
t0

g(x +a)d
t
(x) dx
= lim
t0

g(t)d
t
(t a) dx,
where we used the substitution t = x +a. Now, using (8.34), we obtain (8.35).
If a = 0, equation (8.36) follows from (8.30) and (8.34). If a > 0,
/((t a))(s) =


0
e
st
(t a) dt
=

e
st
(t a) dt
= e
as
by (8.35). We used that (t a) is zero except when t = a > 0, thus we where able to extend the
domain of integration. A second way of obtaining (8.36) is to perform a direct calculation similar
to the one leading to equation (8.30) see exercise 8.7.
232 CHAPTER 8. LAPLACE TRANSFORMS
Example 8.5.1. Consider an RLC circuit as described by the dierential equation (8.27) that is
initially at rest, but that at time t = 10 seconds experiences a voltage surge of 1,000 volts. Suppose
L = 10, R = 2 and C = 1. This leads to the initial value problem
10
d
2
I
dt
2
+ 2
dI
dt
+I = 1000 (t 10), I(0) = I

(0) = 0. (8.37)
The Laplace transform of the left side is (10s
2
+s +1)J(s), where J(s) = /(I)(s), and the Laplace
transform of the right side is 1000e
10s
. Thus,
J(s) =
1000e
10s
10s
2
+ 2s + 1
.
Completing the square yields
10s
2
+ 2s + 1 = 10
_
s
2
+
1
5
s +
1
10
_
= 10
_
_
s +
1
10
_
2
+
_
3
10
_
2
_
,
and thus
1000
10s
2
+ 2s + 1
=
100
_
s +
1
10
_
2
+
_
3
10
_
2
=
_
1000
3
_
_
3
10
_
s +
1
10
_
2
+
_
3
10
_
2
_
.
Using /(sin(t))(s) = /(s
2
+
2
) and the shifting property /(e
t
f(t))(s) = /(f(t))(s ), we see
that
/
1
_
1000
10s
2
+ 2s + 1
_
=
_
1000
3
_
e
t/10
sin((3/10)t).
Finally, if the Heaviside property /
1
(e
as
F(s)) = /
1
(F)(t a)H(t a) is applied, we see that
the solution to the initial value problem (8.37) is
I = /
1
_
1000e
10s
10s
2
+ 2s + 1
_
=
_
1000
3
_
e

t10
10
sin
_
3(t 10)
10
_
H(t 10)
=
_
1000
3
_
e
(1/10)t+1
sin((3/10)t 3)H(t 10).
Figure 8.11 shows the graph of the function I(t). Note that due to the presence of the 2 Ohm
resistor, the voltage surge is dissipated and the current in the RLC circuit eventually returns to
zero.
Example 8.5.2. Suppose the circuit in the previous example experiences a voltage surge of 1,000
volts every T = 10 seconds, with the rst surge at t = 10. The initial value problem is now
10
d
2
I
dt
2
+ 2
dI
dt
+I = 1000

k=1
(t 10k), I(0) = I

(0) = 0. (8.38)
As before, the Laplace transform of the left side is (10s
2
+ s + 1)J(s), where J(s) = /(I)(s), and
the Laplace transform of the right side is:
1000
_

k=1
e
10ks
_
= 1000e
10s
_

k=0
_
e
10s
_
k
_
=
1000e
10s
1 e
10s
.
8.5. DIRAC FUNCTIONS AND IMPULSE FORCING 233
Figure 8.11: The graph of the solution in example 8.5.1.
10 20 30 40 50
t
100
50
50
100
150
200
250
I
The geometric series formula

k=0
x
k
= 1/(1 x) when 1 < x < 1 was used in the previous
calculation. We need to nd the inverse Laplace transform of the function
J(s) =
1000e
10s
(10s
2
+ 2s + 1)(1 e
10s
)
.
This can be done in a manner similar to the example above, and incorporating the formula
/
1
(F(s)/(1 e
sT
)) =

k=0
f(t kT)H(t kT) to obtain
I(t) =
_
1000
3
_

k=1
e
(1/10)t+k
sin((3/10)t 3k)H(t 10k).
The graph of I(t) is shown on Figure 8.12. Repeated kicks occur every time the current has
almost returned to zero. Exercise 8.4 deals with a situation when these kicks occur more frequently.
Figure 8.12: The graph of the solution in example 8.5.2: (a) for 0 t 50 (left); (b) for 0 t 200
(right).
10 20 30 40 50
t
100
50
50
100
150
200
250
I
50 100 150 200
t
100
50
50
100
150
200
250
I
234 CHAPTER 8. LAPLACE TRANSFORMS
8.6 Mathematica Use
Example 8.6.1. The Laplace transform and inverse Laplace transform of a function are computed
in Mathematica as follows.
LaplaceTransformExp5 x, x, s
1
5 s
InverseLaplaceTransform1 s 2, s, x

2 x
The partial fraction decomposition of a rational function can be found using the Apart function.
Apart1 s 2 s^2 5 s 4
1
18 4 s

1
9 1 s

1
18 2 s
Note that the gamma function interpolates the factorial; i.e, (n + 1) = n!
LaplaceTransformx^n, x, s
s
1n
Gamma1 n
Example 8.6.2. The following code denes the periodic piecewise dened function in example 8.4.5.
HeavisideTheta denotes the Heaviside function H(x).
In[4]:= fx_ : x HeavisideThetax HeavisideThetax 1
2 x HeavisideThetax 1 HeavisideThetax 2;
fbarx_ : Sumfx 2 k HeavisideThetax 2 k, k, 0, 4;
The solution to the initial value problem in that example can be obtained using DSolve as usual.
The following code also plots the solution curve.
soln DSolvey''x Pi^2 yx fbarx, y0 0, y'0 0, yx, x;
Plotyx . soln, x, 0, 10, AxesLabel "x", "y",
LabelStyle Medium, PlotStyle Blue, Thick
Example 8.6.3. The solution for 0 t 10(n + 1) in example 8.5.2 can be dened as follows.
DiracDelta denotes the delta function (x).
solnn_ : DSolve10 i''t 2 i't it 1000 SumDiracDeltat 10 k, k, 1, n,
i0 0, i'0 0, it, t;
The following code then computes and plots the solution curve for 0 t 50 (i.e. n = 4).
PlotEvaluateit . soln4, t, 0, 50, AxesLabel "t", "I",
LabelStyle Medium, PlotStyle Blue, Thick, PlotRange 100, 250
8.7. EXERCISES 235
8.7 Exercises
Exercise 8.1. Use the information in Table 8.1 to nd the Laplace transform of each of the following
functions.
(a) f(x) = sinh(x)
(b) f(x) = cosh(x)
(c) f(x) = e
x
cos(x)
(d) f(x) = e
x
sin(x)
(e) f(x) = xcos(x)
(f) f(x) = xsin(x)
(g) f(x) = xe
x
cos(x)
(h) f(x) = xe
x
sin(x)
Exercise 8.2. Solve the following initial value problems using the Laplace transform method.
(a) y

3y = cos(5t), y(0) = 0
(b) y

+ 5y = e
t
sin(t), y(0) = 1
(c) 2y

3y = e
2t
H(t 1), y(0) = 0
(d) y

y = (0) +(2) +(4), y(0) = 0


(e) y

2y

+y = e
5t
, y(0) = 1, y

(0) = 0
(f) y

5y

+ 4y = te
t
, y(0) = 0, y

(0) = 0
(g) y

+y = (2t t
2
)(H(t) H(t 1)), y(0) = 0, y

(0) = 0
(h) y

+ 7y

+ 6y = 2(t 1) + 5(t 2), y(0) = 0, y

(0) = 0
Exercise 8.3. Solve the following initial value problems using the Laplace transform method, and
plot the solution curve.
(a) y

+
2
y = f(x), y(0) = y

(0) = 0, where f(x) is the sawtooth function shown here.


2 4 6 8 10
x
0.5
0.5
1.0
1.5
y
236 CHAPTER 8. LAPLACE TRANSFORMS
(b) y

+
2
y = f(x), y(0) = y

(0) = 0, where f(x) is the switching function shown here.


2 4 6 8 10
x
1.5
1.0
0.5
0.5
1.0
1.5
y
(c) y

+ 4
2
y =

n=1
(x n), y(0) = y

(0) = 0.
(d) y

+ 4
2
y =

n=1
(1)
n+1
(x n), y(0) = y

(0) = 0.
Exercise 8.4. Consider what happens to the circuit in example 8.5.2 if a voltage surge of 1,000
volts occurs every 5 seconds, starting at t = 5 seconds. Graph the solution function I(t).
Exercise 8.5. Consider an initial value problem of the form
ay

+by

+cy = 0, y(0) = y
0
, y

(0) = v
0
. (8.39)
This is a second-order homogeneous dierential equation with constant coecients. Find the solu-
tion to (8.39) using the Laplace transform method. Consider the following three cases:
(a) The characteristic equation has two distinct, real roots;
(b) the characteristic equation has one repeated real root;
(c) the characteristic equation has two non-real, complex conjugate roots.
Exercise 8.6. Show that
/
1
_
F(s)
1 +e
sT
_
=

k=0
(1)
k
f(x kT)H(x kT),
where f = /
1
(F).
Exercise 8.7. Show directly using an argument like the one leading to equation (8.30) that /((t
a))(s) = e
as
.
Exercise 8.8. Show that

x

(t) dt = H(x).
Thus, we can think of the delta function as being the derivative of the Heaviside function.
8.7. EXERCISES 237
Exercise 8.9. Use only that /(e
x
)(s) = 1/(s ) to derive the formula /(x
n
)(s) = n!/s
n+1
, as
follows. Write the exponential function as a power series:
e
x
=

n=0
_
x
n!
_
n
.
Then, take the Laplace transform of both sides, and write the left side as a power series, as well,
and compare coecients.
238 CHAPTER 8. LAPLACE TRANSFORMS
Chapter 9
Further Methods of Solving
Dierential Equations
9.1 Power Series Methods
In this section, our goal is to nd solutions to n-th order linear dierential equations of the form
y
(n)
(x) +a
n1
(x)y
(n1)
(x) +. . . +a
1
(x)y

(x) +a
0
(x)y(x) = f(x). (9.1)
The corresponding initial conditions are
y(x
0
) = y
0
, y

(x
0
) = y
1
, . . . , y
(n1)
(x
0
) = y
n1
. (9.2)
We assume that the solution to an initial value problem given by (9.1), (9.2) can be written as
a power series centered at x = x
0
; that is, the solution is of the form
y(x) =

n=0
a
n
(x x
0
)
n
= a
0
+a
1
(x x
0
) +a
2
(x x
0
)
2
+. . . . (9.3)
In the following, some basic facts about power series are reviewed.
1. For a function of the form (9.3), there exists a number 0 R , called the radius of
convergence, with these properties.
If 0 < R and 0 < r < R, then the series (9.3) converges absolutely and uniformly
on the closed disk D = x : [x x
0
[ r. In particular, on D, all derivatives y
(n)
exist, and can be computed by dierentiating the right side of (9.3) term-by-term. The
resulting power series will again converge absolutely and uniformly on D. For example,
y

(x) =

n=1
na
n
(x x
0
)
n1
= a
1
+ 2a
2
(x x
0
) + 3a
3
(x x
0
)
2
+. . . , (9.4)
y

(x) =

n=2
n(n 1)a
n
(x x
0
)
n2
= 2a
2
+ (3)(2)a
3
(x x
0
) +. . . . (9.5)
239
240 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
If 0 R < , then the series (9.3) diverges whenever [x x
0
[ > R.
If 0 < R < then the series (9.3) might converge absolutely, converge conditionally, or
diverge if x = x
0
R (there might be dierent behavior at the two x-values).
The radius of convergence may be computed using either the formula
R =
1
lim
n
n
_
[a
n
[
(9.6)
or
R = lim
n

a
n
a
n+1

, (9.7)
provided the limits in (9.6), (9.7) exist.
2. If f(x) =

n=0
a
n
(x x
0
)
n
is a power series with radius of convergence R
1
> 0 and g(x) =

n=0
b
n
(x x
0
)
n
is a power series with radius of convergence R
2
> 0, then for [x x
0
[ <
minR
1
, R
2
:
The following identity principle holds: If f(x) = g(x), then a
n
= b
n
for all n = 0, 1, 2, . . ..
In other words, we can compare coecients for two power series that are equal.
f(x) +g(x) =

n=0
(a
n
+b
n
)(x x
0
)
n
.
f(x) g(x) =

n=0
(a
n
b
n
)(x x
0
)
n
.
f(x)g(x) =

n=0
c
n
(x x
0
)
n
, where c
n
=

n
k=0
a
k
b
nk
.
3. If y = f(x) is a function so that all derivatives f

(x
0
), f

(x
0
), . . . exist, then the formal power
series is given by its Taylor series
T
f
(x) =

n=0
f
(n)
(x
0
)
n!
(x x
0
)
n
.
Note that in general, T
f
(x) may have zero radius of convergence R, and even if R > 0, we
might have f(x) ,= T
f
(x).
In short, power series behave very much like polynomial functions, except that their domain
might not be all real numbers. The following are the two most important examples of functions
and their power series expansions.
1. The geometric series
1
1 x
= 1 +x +x
2
+x
3
+. . . =

n=0
x
n
, for [x[ < 1.
2. The exponential function e
x
= 1 +x +
x
2
2!
+
x
3
3!
+. . . =

n=0
x
n
n!
, for x R.
Additional power series expansions of known functions are given in appendix C.2. Note that, for
example, the series for cos x and sin x can be obtained by expanding e
ix
and using Eulers formula.
The following examples demonstrate how power series methods can be used when solving initial
value problems.
9.1. POWER SERIES METHODS 241
Example 9.1.1. Consider the initial value problem
dy
dx
= 2xy, y(0) = 5. (9.8)
This dierential equation is separable, and is most easily solved using separation of variables as in
section 1.2. It can be seen that y = 5e
x
2
. The purpose of this example is to illustrate how the
power series method would be used in this simple setting.
Let y =

n=0
a
n
x
n
. (Since the initial condition is specied at x = 0, we use x
0
= 0.) Then
dy
dx
=

n=1
na
n
x
n1
=

n=0
(n + 1)a
n+1
x
n
and
2xy = (2x)

n=0
a
n
x
n
=

n=0
2a
n
x
n+1
=

n=1
2a
n1
x
n
.
Using the identity principle (that is, comparing the coecients of the powers of x), we obtain from
(9.8) that for n = 1, 2, 3, . . ., (n + 1)a
n+1
= 2a
n1
, or
a
n+1
=
2
n + 1
a
n1
. (9.9)
Note that a
0
= y(0) = 5 and a
1
= y

(0) = 2(0)y(0) = 0. The recurrence equation (9.9) can now


be used to establish that a
n
= 0 if n is odd; if n is even,
a
2
=
2
2
a
0
= 5, a
4
=
2
5
a
2
=
5
2
, a
6
=
2
6
a
4
=
5
2 3
, a
8
=
2
8
a
6
=
5
2 3 4
, . . . .
In general, a
2n
= (1)
n
(5/n!), and the solution to (9.8) is

n=0
(1)
n
5
n!
x
2n
= 5

n=0
1
n!
(1)
n
(x
2
)
n
= 5

n=0
1
n!
(x
2
)
n
= 5e
x
2
.
Example 9.1.2. Consider a forced harmonic oscillator given by the dierential equation
d
2
x
dt
2
+x = cos t, (9.10)
where, say, x(0) = 1, x

(0) = 0, and the value of is as yet not specied. Letting x =

n=0
a
n
t
n
and using the series expansion of cos x in Appendix C, (9.10) becomes

n=2
n(n 1)a
n
t
n2
+

n=0
a
n
t
n
=

k=0
(1)
k
(t)
2k
(2k)!
242 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
or

n=0
((n + 2)(n + 1)a
n+2
+a
n
) t
n
=

k=0
(
2
)
k
(2k)!
t
2k
.
If n is odd, the coecients on the right side are zero, and it follows from a
1
= x

(0) = 0 and
(n + 2)(n + 1)a
n+2
+ a
n
= 0 that a
n
= 0 for n = 1, 3, 5, . . .. If n = 2k is even, equating the
corresponding coecients of x
2k
leads to the equation
(2k + 2)(2k + 1)a
2k+2
+a
2k
=
(
2
)
k
(2k)!
.
Thus, we have the recurrence equation
a
2k+2
=
(
2
)
k
(2k + 2)!

a
2k
(2k + 2)(2k + 1)
=
(
2
)
k
(2k)!a
2k
(2k + 2)!
.
Since a
0
= 1,
a
2
=
1 1
2!
= 0
a
4
=

2
(2!)(0)
4!
=

2
4!
a
6
=
(
2
)
2
(4!)(
2
/4!)
6!
=

4
+
2
6!
a
8
=
(
2
)
3
(6!)((
4
+
2
)/6!)
8!
=

6

2
8!
a
10
=
(
2
)
4
(8!)((
6

2
)/8!)
10!
=

8
+
6
+
4
+
2
10!
.
Thus,
a
2k+2
=
(1)
k
(2k + 2)!
k

i=1

2i
. (9.11)
If ,= 1, using

k
i=1

2i
= (
2k+2

2
)/(
2
1) leads to the formula
a
2k+2
=
(1)
k
(2k + 2)!

2k+2

2
1
,
9.1. POWER SERIES METHODS 243
so the solution is

k=0
a
2k
t
2k
= 1 +

k=1
a
2k
t
2k
= 1 +
1

2
1
_

k=1
(1)
k1
(2k)!
(
2k

2
)t
2k
_
=
1

2
1
_
1

k=1
(1)
k
(2k)!
(t)
2k
+
2
+
2

k=1
(1)
k
(2k)!
t
2k
_
=
1

2
1
_

k=0
(1)
k
(2k)!
(t)
2k
+
2

k=0
(1)
k
(2k)!
t
2k
_
=

2
cos(t) cos(t)

2
1
.
If = 1, equation (9.11) gives that a
2k+2
= (1)
k
k/(2k + 2)! for k = 0, 1, 2, . . .. We write the
solution as

k=0
a
2k
t
2k
= 1 +

k=1
a
2k
t
2k
= 1 +

k=1
(1)
k1
(k 1)
(2k)!
t
2k
= 1 +

k=1
(1)
k
(2k)!
t
2k
+
1
2

k=1
(1)
k1
2k
(2k)!
t
2k
=

k=0
(1)
k
(2k)!
t
2k
+
t
2

k=1
(1)
k1
(2k 1)!
t
2k1
=

k=0
(1)
k
(2k)!
t
2k
+
t
2

k=0
(1)
k
(2k + 1)!
t
2k+1
= cos t +
t sin t
2
.
If ,= 1, we get a bounded periodic solution, whereas if = 1, we have resonance: the solution
becomes unbounded with amplitude t. See also the discussion in section 4.1.
Even if the power series method does not lead to a closed-form solution, it may be useful in
approximating the solution to an initial value problem, as the following example shows.
Example 9.1.3. Find the rst four non-zero terms of the power series solution to the initial value
problem
(1 x
2
)y

+y = 0, y(0) = 0, y

(0) = 1. (9.12)
244 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
If y =

n=0
a
n
x
n
, y

n=2
n(n 1)a
n
x
n2
, and the dierential equation becomes
0 =

n=2
n(n 1)a
n
x
n2

n=2
n(n 1)a
n
x
n
+

n=0
a
n
x
n
=

n=0
(n + 2)(n + 1)a
n+2
x
n

n=2
n(n 1)a
n
x
n
+

n=0
a
n
x
n
= (2a
2
+a
0
) + (6a
3
+a
1
)x +

n=2
((n + 2)(n + 1)a
n+2
n(n 1)a
n
+a
n
) x
n
= (2a
2
+a
0
) + (6a
3
+a
1
)x +

n=2
_
(n + 2)(n + 1)a
n+2
(n
2
n 1)a
n
_
x
n
.
Setting all coecients equal to zero and using a
0
= 0, a
1
= 1 leads to a
2
= 0, a
3
= 1/6, and the
recurrence
a
n+2
=
n
2
n 1
(n + 2)(n + 1)
a
n
(9.13)
for n = 2, 3, 4, . . . gives a
n
= 0 if n is even, and
a
5
=
3
2
3 1
(3 + 2)(3 + 1)
a
3
=
_
1
4
__

1
6
_
=
1
24
a
7
=
5
2
5 1
(5 + 2)(5 + 1)
a
5
=
_
19
42
__

1
24
_
=
19
1008
.
We have
y(x) x
x
3
6

x
5
24

19x
7
1008
. (9.14)
Figure 9.1 shows the exact solution to (9.12) and the approximation given by (9.14). Recurrence
Figure 9.1: The exact solution to (9.12) (blue solid curve) and an approximation using the rst
four non-zero terms of the power series (dashed red curve).
1.0 0.5 0.5 1.0
x
0.6
0.4
0.2
0.2
0.4
0.6
y
equations like (9.13) can also be solved in Mathematica. The methods are explained in section 9.3.
9.2. NUMERICAL METHODS 245
Remark 9.1.1. Note that general solutions may also be found using the power series method. For
example, using y(0) = y
0
in example 9.1.1 leads to the general solution y = y
0
e
x
2
. Similar remarks
apply to example 9.1.2 and even example 9.1.3.
9.2 Numerical Methods
In this section, we look at methods to numerically approximate solutions to initial value problems.
Methods like these have been present behind the scenes whenever we used the NDSolve command
in Mathematica. The general initial value problem considered in this section is of the form
dx/dt = f (t, x), x(t
0
) = x
0
, (9.15)
where x = x(t) is a function of the real variable t R with values in R
n
. Also, f (t, x) maps RR
n
to R
n
.
In addition to describing the algorithms involved in the methods, we will also consider two
key properties of a numerical method, namely its accuracy and its stability. These concepts are
described below.
Eulers Method
We have already encountered Eulers Method in section 1.7. The algorithm, suitably generalized
to the higher-dimensional situation, and allowing variable step sizes, is summarized here.
Algorithm 9.2.1. Given the initial value problem (9.15) and a sequence of increments in t:
(t)
0
, (t)
1
, . . ., the algorithm for Eulers Method is given as
x
k+1
= x
k
+f (t
k
, x
k
)(t)
k
(9.16)
t
k+1
= t
k
+ (t)
k
.
This algorithm results in a sequence of points (t
k
, x
k
), where, if the (t)
k
s are small, we expect
that x
k
x(t
k
) (x(t) is the exact solution to (9.15)). Figure 9.2 shows a graphical representation
of Eulers Method in one dimension. As explained in section 1.7, Eulers method is based on
successive tangent line approximation. At each computed point of the numerical solution, the
next point is found by following the tangent line.
Example 9.2.1. Consider the initial value problem
dx/dt = Ax, x(0) = x
0
, (9.17)
where
A =
_
3 4
4 3
_
and x
0
= (1, 1). This is a linear autonomous dierential equation which we can certainly solve
using the methods described in chapter 5. We use this example to illustrate how Eulers Method
works.
246 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
Figure 9.2: Graphical presentation of Eulers Method in one dimension: (a) the rst step (left); (b)
the rst and the second step. Note that in general (t)
0
,= (t)
1
.
slopef t
0
,x
0

t
0
t
1
t
0
t
0
t
x
0
x
1
x
0
f t
0
,x
0
t
0
x
slopef t
0
,x
0

slopef t
1
,x
1

t
0
t
1
t
2
t
x
0
x
1
x
0
f t
0
,x
0
t
0
x
2
x
1
f t
1
,x
1
t
1
x
(a) (b)
Suppose we use algorithm 9.2.1 with the xed step size t = 0.1. Then:
x
1
= x
0
+Ax
0
(t) =
_
1
1
_
+
_
3 4
4 3
__
1
1
_
(0.1) =
_
1.7
1.1
_
x
2
= x
1
+Ax
1
(t) =
_
1.7
1.1
_
+
_
3 4
4 3
__
1.7
1.1
_
(0.1) =
_
2.65
1.45
_
x
3
= x
2
+Ax
2
(t) =
_
2.65
1.45
_
+
_
3 4
4 3
__
2.65
1.45
_
(0.1) =
_
4.025
2.075
_
.
.
.
In eect, we are applying powers of the matrix I + (t)A to x
0
. Thus,
x
k
= (I + (t)A)
k
x
0
. (9.18)
We can also use this formula for negative integers k to nd the backward solution. Figure 9.3
shows the numerical solution for t = 0.1 and t = 0.05, and the exact solution of the initial value
problem.
Remark 9.2.1. It appears in Figure 9.3 that the numerical solution approximates the exact solution
rather well if, say, t = 0.05. It is very important to understand that this is not actually the case!
While the numerical trajectory is close to the trajectory of the exact solution, the corresponding
times actually diverge quite rapidly. In other words: it is true that in Figure 9.3 the red curve is
close to the blue curve for small t, but these two curves are not in the same place at the same
time. This is illustrated in Table 9.1 where we compare the numerical and the exact solution at
9.2. NUMERICAL METHODS 247
Figure 9.3: The exact solution to the initial value problem in example 9.2.1 (in blue) and the
polygonal path given by the numerical solution for: (a) t = 0.1 (left); (b) t = 0.05 (right).
2 1 1 2 3 4
x
1
1
2
3
4
x
2
2 1 1 2 3 4
x
1
1
2
3
4
x
2
(a) (b)
t
k
= kt for t = 0.05. We can see that the dierence between the numerical and the exact
solution grows rapidly with time.
Table 9.1: The values of the numerical solution x
k
, the exact solution x(t
k
), and the magnitude of
the global error in example 9.2.1 using t = 0.05.
t
k
x
k
x(t
k
) [x
k
x(t
k
)[
0.00 (1.00000, 1.00000) (1.00000, 1.00000) 0.00000
0.05 (1.35000, 1.05000) (1.38507, 1.08194) 0.04743
0.10 (1.76250, 1.16250) (1.85716, 1.23185) 0.11734
0.15 (2.25937, 1.34063) (2.44593, 1.45915) 0.22102
0.20 (2.86641, 1.59141) (3.18836, 1.77812) 0.37218
0.25 (3.61465, 1.92598) (4.13111, 2.20881) 0.58884
0.30 (4.54204, 2.36001) (5.33340, 2.77827) 0.89509
0.35 (5.69535, 2.91442) (6.87077, 3.52227) 1.32329
0.40 (7.13253, 3.61632) (8.83980, 4.48757) 1.91672
0.45 (8.92568, 4.50038) (11.3642, 5.73480) 2.73316
0.50 (11.1646, 5.61046) (14.6026, 7.34233) 3.84954
In order to investigate issues regarding the quality of a numerical method, we dene two types
of errors and the accuracy of the numerical method.
Denition 9.2.1. Suppose (x
k
, t
k
) is the kth step in a numerical method designed to approximate
the solution to the initial value problem (9.15), and suppose x(t) is the exact solution to (9.15).
The global error at the kth step is
E
k
= x
k
x(t
k
). (9.19)
248 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
If x
k1
(t) is the exact solution to the initial value problem
dx/dt = f (t, x), x(t
k1
) = x
k1
,
then the local error at the kth step is
e
k
= x
k
x
k1
(t
k
). (9.20)
A numerical method is accurate of order p if for xed k,
e
k+1
= O((t)
p+1
k
). (9.21)
Remark 9.2.2. The global error is the total deviation between the approximate solution and the
true solution to (9.15) at t = t
k
. The denition of the local error is more subtle. It captures only
the error encountered in the kth step by comparing the value of the numerical method at the kth
step, x
k
, with the exact solution we would have obtained had we started at the previous step, x
k1
.
Remark 9.2.3. Equation (9.21) means that [e
k+1
[ C(t)
p+1
k
. The exponent p+1 appears instead
of p, because the local error per step size is e
k+1
/(t)
k
= O((t)
p
k
). If a xed step size t is
chosen, we have that for the local error e
t
k
with that step size, e
t
k
C(t)
p+1
. To make this
more concrete, suppose we choose steps sizes t and t/10. Then we expect that
[e
t/10
10k
[
[e
t
k
[

C(t/10)
p+1
C(t)
p+1
= (1/10)
p+1
. (9.22)
In other words, if a numerical method is accurate of order p, dividing the step size by 10 will reduce
the local error by a factor of (1/10)
p+1
. However, since we need to perform 10 steps with t/10
for every step of size t, we expect that the decrease at comparable times is by a factor of (1/10)
p
.
Of course, we are primarily interested in the global error. However, as we shall see below, the
global error is inuenced by factors other than the numerical method used. The local error can
usually be estimated theoretically using a Taylor series expansion, and the accuracy of a numerical
method can thus be determined. See theorem 9.2.1 below concerning the accuracy of Eulers
Method.
Example 9.2.2. We investigate the numerical solutions using Eulers Method for the linear system
dx/dt = Ax, x(0) = x
0
, where
A =
_
1 2
2 1
_
and x
0
= (1, 1). Using equation (9.18) allows easy calculations of all iterates for Eulers Method.
Figure 9.4 shows the numerical solution for t = 0.1 and t = 0.01, and the exact solution of
the initial value problem. We observe that the forward iterates approach the origin (which is a
spiral sink), but rather slowly, especially if the step size is small. The backward iterates follow the
spiralling motion of the true solution, but the errors become large.
Table 9.2 shows the magnitude of the local error [e
k
[ and the magnitude of the global error [E
k
[
for t = 0.1. The errors for the forward orbit approach zero. This is to be expected, since the
orbits are drawn into the spiral sink at the origin. On the other hand, the errors increase for the
backward orbit, and the global error increases much more rabidly than the local error (or the sum
9.2. NUMERICAL METHODS 249
Figure 9.4: The exact solution to the initial value problem in example 9.2.2 (in blue) and the
polygonal path given by the numerical solution for: (a) t = 0.1 (left); (b) t = 0.01 (right).
1 1 2
x
1
2
1
1
2
x
2
1 1 2
x
1
2
1
1
2
x
2
(a) (b)
Table 9.2: The magnitude of the local error and the global error in example 9.2.2 using t = 0.1.
t
k
[e
k
[ [E
k
[
5.00 2.15496 173.994
4.00 0.95617 56.1964
3.00 0.42426 17.0219
2.00 0.18825 4.58399
1.00 0.08353 0.92595
0.00 0.03706 0.00000
1.00 0.01644 0.15114
2.00 0.00730 0.12214
3.00 0.00324 0.07403
4.00 0.00144 0.03989
5.00 0.00064 0.02016
6.00 0.00028 0.00979
7.00 0.00013 0.00462
8.00 0.00006 0.00214
250 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
of the local errors). This is due to the fact that the origin is unstable as t : the solutions of
nearby initial conditions diverge rapidly.
The accuracy of Eulers Method is investigated numerically in Table 9.3. We compare the
magnitude of the local error [e
t
k
[ when t = 0.1 and when t = 0.01. The quotient
[e
0.01
10k
[
[e
0.1
k
[
0.01 =
_
0.01
0.1
_
2
,
so equation (9.22) indicates that p + 1 = 2, or p = 1. The following theorem conrms that the
order of Eulers Method is indeed one.
Table 9.3: The magnitudes of the local errors when using t = 0.1 and t = 0.01, and their
quotients in example 9.2.2.
t
k
[e
0.1
k
[ [e
0.01
10k
[ [e
0.01
10k
[/[e
0.1
k
[
0.50 0.05564 0.0005822 0.01046
0.40 0.05130 0.0005276 0.01029
0.30 0.04729 0.0004782 0.01011
0.20 0.04360 0.0004333 0.00994
0.10 0.04020 0.0003927 0.00977
0.00 0.03701 0.0003559 0.00960
0.10 0.03417 0.0003225 0.00944
0.20 0.03150 0.0002923 0.00928
0.30 0.02904 0.0002648 0.00912
0.40 0.02678 0.0002400 0.00896
0.50 0.02469 0.0002175 0.00881
Theorem 9.2.1. Eulers Method is accurate of order 1; that is, the local error at the kth step
satises
e
k+1
= O((t)
2
k
).
Proof. Using the Taylor series
x(t + t) = x(t) +x

(t)t +O((t)
2
),
we obtain for t = t
k
and t = (t)
k
:
x(t
k+1
) = x(t
k
) +f (t
k
, x(t
k
))(t)
k
+O((t)
2
k
),
Eulers Method gives
x
k+1
= x
k
+f (t
k
, x
k
)(t)
k
.
Subtraction of the previous two equations yields
x
k+1
x(t
k+1
) = [x
k
x(t
k
)] + [f (t
k
, x
k
) f (t
k
, x(t
k
))](t)
k
+O((t)
2
k
).
If x = x
k
is the solution passing through the point (t
k
, x
k
), the bracketed expressions become zero,
and we obtain e
k+1
= O((t)
2
k
).
9.2. NUMERICAL METHODS 251
The stability of a numerical method is dened in a similar vein as that of a critical point (see
denition 6.1.2). We will state the criteria somewhat informally.
The method is stable if small perturbations do not cause the method to diverge without
bound.
The method is asymptotically stable if the method converges to the same values for small
perturbations.
The stability or instability of a numerical method may be caused by the stability or instability
of the solution. For example, if dx/dt = 2x, then the actual solutions are of the form x(t) = Ce
2t
,
which diverge as t . Hence, any numerical method which approximates the actual solution
within nite bounds will necessarily be unstable. However, it is possible that a numerical method
is unstable even though the solution is stable. We will see an example of this presently for Eulers
method.
Example 9.2.3. We investigate Eulers Method when applied to the simple initial value problem
dz
dt
= z, z(0) = z
0
, (9.23)
where C and z is a complex-valued function of the real variable t. Using complex numbers is
a concise way of capturing two-dimensional dierential equations.
The exact solution to this initial value problem is z(t) = z
0
e
t
and this solution is stable if
and only if the real part Re() 0, and asymptotically stable if and only if Re() < 0. Applying
Eulers Method with xed step size t gives
z
k+1
= z
k
+z
k
t = (1 +t)z
k
,
hence
z
k
= (1 +t)
k
z
0
.
The sequence (z
k
):
converges to zero if [1 + t[ < 1 (here, [x + iy[ =
_
x
2
+y
2
is the modulus (norm) of a
complex number);
remains bounded if [1 +t[ = 1;
becomes unbounded if [1 +t[ > 1.
Now, [1 + t[ < 1, or, equivalently, [ + 1/t[ < 1/t implies that must lie in the open disk
with center z = 1/t and radius 1/t. If is real, this is equivalent to 2/t < < 0. Since
t > 0, we require
t < 2/ (9.24)
for Eulers Method to converge. Figure 9.5 shows the region in the parameter space for where
the numerical solution to 9.23 is stable. On the other hand, the region where the actual solution
z(t) = z
0
e
t
is (asymptotically) stable is shown in Figure 9.6.
To make the point more clearly, consider the (one-dimensional, real) initial value problem
dy
dt
= 20y, y(0) = 1. (9.25)
252 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
Figure 9.5: The parameter region in the complex plane where Eulers Method for dz/dt = z is
stable (for a given step size t).
1t 2t
Re
Im
Figure 9.6: The parameter region in the complex plane where the solution to dz/dt = z is stable
is the entire left half plane.
1t 2t
Re
Im
9.2. NUMERICAL METHODS 253
The exact solution is y = e
20t
which is stable and approaches the stable solution y

= 0 rapidly.
Equation (9.24) says that the numerical solution will do the same thing only if t < 2/(20) =
0.1. If t is too large, the numerical solution will overshoot. See exercise 9.4 where you are asked to
compute the numerical trajectory when using Eulers Method for (9.25) with t = 0.1, 0.05, 0.02.
Backward (Implicit) Euler Method
The regular (forward, or explicit) Euler Method uses the value of the numerical solution (t
k
, x
k
)
and the slope at that point to nd the next value of the numerical solution (t
k+1
, x
k+1
) by moving
(t)
k
units forward. What if we want to use a backward estimate in the following sense: choose
as the next approximation the point (t
k+1
, x
k+1
) so that if we used the slope at the new point,
and moved (t)
k
units backward, we would end up at (t
k
, x
k
). This is how the following algorithm
works.
Algorithm 9.2.2. Given the initial value problem (9.15) and a sequence of increments in t:
(t)
0
, (t)
1
, . . ., the algorithm for the Backward Euler Method is given as
x
k+1
= x
k
+f (t
k+1
, x
k+1
)(t)
k
(9.26)
t
k+1
= t
k
+ (t)
k
.
Remark 9.2.4. A (technical) weakness of this algorithm is that in order to compute x
k+1
, we need to
solve the (usually non-linear) equation x
k+1
= x
k
+f (t
k+1
, x
k+1
)(t)
k
. In other words, a computer
program implementing the Backward Euler Method would need to employ a non-linear equation
solver. This is illustrated in the following example.
Example 9.2.4. Consider the initial value problem
dx/dt = x
3
, x(0) = 1, t = 0.5.
The general step when using the Backward Euler Method (9.26) is
x
k+1
= x
k
(x
k+1
)
3
(t).
The rst step is to solve
x
1
= 1 (x
1
)
3
0.5,
using, e.g. Newtons method with starting value x
0
= 1. The solution is x
1
0.7709. In the next
step, we need to solve
x
2
= x
1
(x
2
)
3
0.5
for x
2
, which gives x
2
0.6399. Continuing in this manner, we obtain this numerical solution:
(t
1
, x
1
) = (0.5, 0.7709 . . .)
(t
2
, x
2
) = (1.0, 0.6399 . . .)
(t
3
, x
3
) = (1.5, 0.5546 . . .)
(t
4
, x
4
) = (1.5, 0.4942 . . .)
.
.
.
254 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
We investigate the stability of the Backward Euler Method using the test initial value problem
used in example 9.2.3.
Example 9.2.5. As before, we look at the initial value problem
dz/dt = z, z(0) = z
0
with C and constant step size t. Then (9.26) becomes
z
k+1
= z
k
+z
k+1
t.
This is equivalent to
z
k+1
=
z
k
1 t
, or
z
k
=
_
1
1 t
_
k
z
0
.
The Backward Euler method is stable if

1
1 t

1,
[1 t[ 1,
[ 1/t[ 1/t.
The region of stability is shown in Figure 9.7.
Figure 9.7: The parameter region in the complex plane (in gray) where the Backward Euler Method
for dz/dt = z is stable (for a given step size t).
1t 1t
Re
Im
Now, the Backward Euler Method is stable whenever the exact solution z(t) = z
0
e
t
is stable
(see Figure 9.6), which is an improvement over the forward Euler Method. But ironically, the
Backward Euler Method is stable when the actual solution is not. This is explored in more detail
in exercise 9.5.
The accuracy of the Backward Euler Method is the same as for the forward method.
9.2. NUMERICAL METHODS 255
Theorem 9.2.2. The Backward Euler Method is accurate of order 1; that is, the local error at the
kth step satises
e
k+1
= O((t)
2
k
).
The proof uses Taylor series expansions and is similar to that of theorem 9.2.1.
Trapezoid Method
It seems reasonable to expect that averaging the (forward) Euler Method and the backward Euler
Method would cause the regions of stability in Figure 9.5 and Figure 9.7 to cancel out and then
coincide with the region of stability of the actual solution. This is indeed the case. The reader is
asked to verify this in exercise 9.6. The method obtained by this averaging is called the Trapezoid
Method. The name of this method may be familiar: when applied to the initial value problem
x

(t) = f(t), x(0) = x


0
,
it becomes the method of using trapezoids to approximate the value of the integral x(t) = x
0
+

t
x
0
f() d.
1
Algorithm 9.2.3. Given the initial value problem (9.15) and a sequence of increments in t:
(t)
0
, (t)
1
, . . ., the algorithm for the Trapezoid Method is given as
x
k+1
= x
k
+
_
f (t
k+1
, x
k+1
) +f (t
k
, x
k
)
2
_
(t)
k
(9.27)
t
k+1
= t
k
+ (t)
k
.
As an additional bonus, we have that the Trapezoid Method is accurate of order 2.
Theorem 9.2.3. The Trapezoid Method is accurate of order 2; that is, the local error at the kth
step satises
e
k+1
= O((t)
3
k
).
The proof of this theorem is again obtained by using appropriate Taylor series expansions. A
disadvantage of the Trapezoid Method is the same as for the Backward Euler Method. Finding the
next iterate in (9.27) involves solving this equation for x
k+1
.
Example 9.2.6. Consider the initial value problem
dx/dt = x
2
t
2
, x(0) = 1, t = 0.1.
Here, we have to solve the quadratic equation
x
k+1
= x
k
+
_
(x
2
k+1
t
2
k+1
) + (x
2
k
t
2
k
)
2
_
(t)
for x
k+1
in each step. In the rst step, this leads to
x
1
= 1
_
x
2
1
0.1
2
+ 1
2
0
2
2
_
0.1,
1
In fact, for this integration problem, the forward Euler Method corresponds to computing left-hand Riemann
sums, and the backward Euler Method to computing right-hand Riemann sums.
256 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
which has the solutions x
1
1.1112 and x
1
18.8889. Clearly, we take the rst solution as our
rst iterate. In the next step, we need to solve
x
2
= 1.1112
_
x
2
2
0.2
2
+ 1.1112
2
0.1
2
2
_
0.1,
for x
2
, which gives x
2
1.2484 as the valid solution. Continuing in this manner, we obtain this
numerical solution:
(t
1
, x
1
) = (0.1, 1.1112 . . .)
(t
2
, x
2
) = (0.2, 1.2484 . . .)
(t
3
, x
3
) = (0.3, 1.4207 . . .)
(t
4
, x
4
) = (0.4, 1.6444 . . .)
.
.
.
Runge-Kutta Methods
The classical Runge-Kutta Method is a forward method that has fourth order of accuracy. The
algorithm is as follows.
Algorithm 9.2.4. Given the initial value problem (9.15) and a sequence of increments in t:
(t)
0
, (t)
1
, . . ., the algorithm for the fourth-order explicit Runge-Kutta Method is given as
x
k+1
= x
k
+
k
1
+ 2k
2
+ 2k
3
+k
4
6
(t)
k
(9.28)
t
k+1
= t
k
+ (t)
k
,
where:
k
1
= f (t
k
, x
k
),
k
2
= f (t
k
+ ((t)
k
/2), x
k
+k
1
((t)
k
/2)),
k
3
= f (t
k
+ ((t)
k
/2), x
k
+k
2
((t)
k
/2)),
k
4
= f (t
k
+ (t)
k
, x
k
+k
3
(t)
k
).
The method in algorithm 9.2.4 becomes Simpsons Method when applied to the integration
problem x

= f(t). Given any p N, a Runge-Kutta Method can be devised that achieves order of
accuracy p. Furthermore, explicit (forward) and implicit (backward) variants are dened. Refer,
for example, to [13] for more details.
Stiness
We have encountered the term of a sti dierential equation when using NDSolve in Mathematica.
The meaning of this term is explained in the following example.
Example 9.2.7. Consider the linear dierential equation
dx/dt = 49x + 51y
dy/dt = 51x 49y.
9.2. NUMERICAL METHODS 257
The eigenvalues of the matrix
A =
_
49 51
51 49
_
are
1
= 2 and
2
= 100. Corresponding eigenvectors are v
1
= (1, 1) and v
2
= (1, 1). For the
initial value x(0) = 1, y(0) = 1, the solution is x(t) = e
2t
, y(t) = e
2t
. This is a straight line solution
that moves away from the origin at exponential speed given by
1
= 2. At the same time, however,
there are nearby solutions (called transient solutions) that approach this straight line solution at
an angle of approximately 90 degrees; they approach at exponential speed, as well, but at the much
faster rate [
2
[ = 100. If a transient solution starts far away from the line y = x, it does not change
direction much, and actually it appears to be a straight line. Once it gets close to the line y = x, it
is required to change direction very quickly. (It cannot actually hit the line y = x since that would
contradict the uniqueness property of the solutions.) See Figure 9.8.
Figure 9.8: The phase portrait in example 9.2.7.
4 2 2 4
x
4
2
2
4
y
Figure 9.9 shows the numerical trajectory of the initial point (2, 0) when using Eulers Method
with step sizes t = 0.02, t = 0.0175 and t = 0.01. For the largest step size, the numerical
solution (in red) consistently overshoots the unstable exact solution (in blue) it should follow. Using
the slightly smaller step size t = 0.0175 still results in overshooting the actual solution, but the
amplitude of this solution becomes smaller with t. If t = 0.01, the numerical trajectory follows
the actual solution closely. Small deviations persist due to rounding errors.
Remark 9.2.5. The step size t = 0.02 can be thought of as the critical step size, in the following
sense: If t < 0.02, the numerical solution eventually follows the actual solution. If t > 0.02,
the numerical solution becomes unstable. This last behavior can be observed in Figure 9.10 which
shows the numerical solutions with t = 0.0201 and t = 0.021. Note that in this linear dierential
equation, the critical step size is
t
critical
= [
1

1
2
[. (9.29)
258 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
Figure 9.9: Eulers Method in 9.2.7 for (a) t = 0.02 (left); (b) t = 0.0175 (center); and t = 0.01.
1 2 3 4
x
1
2
3
4
y
1 2 3 4
x
1
2
3
4
y
1 2 3 4
x
1
2
3
4
y
(a) (b) (c)
Figure 9.10: Eulers Method in 9.2.7 for (a) t = 0.0201 (left); (b) t = 0.021.
1 2 3 4
x
1
2
3
4
y
1 2 3 4
x
1
2
3
4
y
(a) (b)
9.3. MATHEMATICA USE 259
Thus, we may think of a two-dimensional autonomous system to be sti if the eigenvalues of
the linearized system satisfy

2
< 0 and [
1

1
2
[ 1, (9.30)
where 0 < [
1
[ [
2
[. The rst condition states that the linearization is of saddle type. The second
condition expresses, as we have seen above, that the critical step size is small, and thus a small
step size is need for the numerical method to be stable. The problem, in practice, is that it is hard
to tell a priori which step size is small enough to work.
9.3 Mathematica Use
Using the power series method in section 9.1 requires solving recurrence equations. This can be
done in two ways in Mathematica. The RSolve function attempts to nd an explicit formula for the
terms of the implicitly dened sequence. In the other hand, we can also nd the values of such a
sequence by dening it recursively. These methods are explained in the following two examples.
Example 9.3.1. The recursively dened sequence given by equation (9.9) in example 9.1.1 can be
generated as follows.
soln RSolvean 1 2 n 1 an 1, a0 5, a1 0, an, n
an
5
n
1 1
n

2 Gamma1
n
2


Note that the output is a little bit hard to interpret. If n is odd, then (1 + (1)
n
) = 0, so the
terms with odd indices are all zero. If n = 2k is even, then i
2k
= (1)
k
, (1 + (1)
n
) = 2, and
gamma function becomes (1 +k) = k! Thus, a
2k
= (1)
k
(5/k!). The values of the sequence may
be tabulated as follows.
Tablean . soln, n, 0, 10
5, 0, 5, 0,
5
2
, 0,
5
6
, 0,
5
24
, 0,
1
24

Example 9.3.2. Using RSolve for the recurrence equation in example 9.1.3 leads to the following
(not very helpful) output.
soln RSolvean 2 n^2 n 1 n 2 n 1 an, a0 0, a1 1, an, n
a[n] 2
2n
(1 (1)
n
) Gamma
1
4

5
4

n
2
Gamma
1
4

5
4

n
2
,
Gamma
1
4

5
4
Gamma
1
4

5
4
Gamma[1 n]
Alternatively, we may dene the sequence directly, as follows.
an_ : n 2^2 n 2 1 n n 1 an 2;
a0 0;
a1 1;
260 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
The rst non-zero terms of the sequence are then:
Tablean, n, 0, 7
0, 1, 0,
1
6
, 0,
1
24
, 0,
19
1008

We now briey address how various numerical methods discussed in section 9.2 can be used in
Mathematica.
Example 9.3.3. In example 9.2.1, we used the forward (explicit) Euler Method with t = 0.1 The
numerical trajectory can be produced directly using NDSolve by specifying the step size and the
method attributes.
soln
NDSolvex't 3 xt 4 yt, y't 4 xt 3 yt, x0 1, y0 1, xt, yt,
t, 0, 1, StartingStepSize 0.1, Method "FixedStep", Method "ExplicitEuler";
The following table then gives the sequence of iterates x
k
.
Tablext, yt . soln, t, 0, 0.5, 0.1
1., 1., 1.7, 1.1, 2.65, 1.45,
4.025, 2.075, 6.0625, 3.0625, 9.10625, 4.56875
The data in Table 9.1 can be produced using the following code.
solnEuler
NDSolvex't 3 xt 4 yt, y't 4 xt 3 yt, x0 1, y0 1, xt, yt,
t, 0, 1, StartingStepSize 0.05, Method "FixedStep", Method "ExplicitEuler";
solnExact DSolvex't 3 xt 4 yt, y't 4 xt 3 yt, x0 1, y0 1,
xt, yt, t;
Tablet, X1 xt, yt . solnEuler, X2 xt, yt . solnExact, NormX1 X2,
t, 0, 0.5, 0.05 TableForm
0. 1. 1. 1. 1. 0.
0.05 1.35 1.05 1.38507 1.08194 0.0474322
0.1 1.7625 1.1625 1.85716 1.23185 0.117342
0.15 2.25938 1.34063 2.44593 1.45915 0.221018
0.2 2.86641 1.59141 3.18836 1.77812 0.37218
0.25 3.61465 1.92598 4.13111 2.20881 0.588835
0.3 4.54204 2.36001 5.3334 2.77827 0.895091
0.35 5.69535 2.91442 6.87077 3.52227 1.32329
0.4 7.13253 3.61632 8.8398 4.48757 1.91672
0.45 8.92568 4.50038 11.3642 5.7348 2.73316
0.5 11.1646 5.61046 14.6026 7.34233 3.84954
Example 9.3.4. There is no built-in implementation of the backward (implicit) Euler Method in
Mathematica. The following code generates the numerical trajectory for the initial value problem
in example 9.2.4.
9.4. EXERCISES 261
fx_ : y . NSolvey x y^3 0.5, y, Reals;
NestListf, 1, 4
1, 0.770917, 0.639904, 0.554608, 0.494242
This perhaps requires some explanation. The function f[x] nds the real solution to the cubic
equation that appears in the backward Euler algorithm. If this function is given the iterate x
k
then
its output is the next iterate x
k+1
of the numerical orbit. The step size is xed at t = 0.5. The
function NestList simply repeats this process four times, starting with x
0
= 1, and returns the list
containing these iterates.
Example 9.3.5. To obtain the next iterate in example 9.2.6, we need to solve a quadratic equation
which in general has two solutions. We want (or expect) to use the solution closer to the previous
iterate as our next iterate, so we use the FindRoot function instead of the NSolve function to obtain
a numerical solution. The list of the rst four iterates would be generated as follows.
ft_, x_ : t t, y . FindRooty x y^2 t t^2 x^2 t^2 2 t, y, x;
t 0.1;
NestListf, 0, 1, 4
0, 1, 0.1, 1.11124, 0.2, 1.24841, 0.3, 1.42077, 0.4, 1.6444
9.4 Exercises
Exercise 9.1. Find the solution to each initial value problem using the power series method. Express
each solution in closed form, that is in terms of elementary functions.
(a) y

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

= y x
2
, y(0) = 2.
(c) y

= y x, y(0) = 2.
(d) y

= y x
2
, y(0) = 1.
(e) y

= x +xy, y(0) = 1.
(f) y

= x
3
2xy, y(0) = 0.
(g) y

+y = e
x
, y(0) = 1, y

(0) = 1.
(h) y

y = e
x
, y(0) = 0, y

(0) = 0.
(i) y

4y = x, y(0) = 0, y

(0) = 0.
(j) y

+ 4y = x, y(0) = 0, y

(0) = 0.
Exercise 9.2. Approximate the power series expansion of the solution to each initial value problem.
Include the rst four non-zero terms.
(a) y

y = e
x
2
, y(0) = 0.
262 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
(b) y

+y = e
x
2
, y(0) = 1.
(c) y

+xy = x
2
, y(0) = 1.
(d) y

+xy = e
x
, y(0) = 0.
(e) y

xy = 0, y(0) = 1, y

(0) = 1. (This is Airys equation.)


(f) y

+x
2
y = 0, y(0) = 1, y

(0) = 1.
(g) y

xy

+y = 0, y(0) = 1, y

(0) = 0.
(h) y

2xy

+ 2y = 0, y(0) = 1, y

(0) = 0.
(i) (1 x
2
)y

2xy

+ 2y = 0, y(0) = 1, y

(0) = 1.
(j) (1 x
2
)y

xy

+y = 0, y(0) = 1, y

(0) = 0.
Exercise 9.3. Consider the dierential equation y

2xy

+ (K 1)y = 0.
(a) Using a power series expansion of the form y(x) =

n=0
a
n
x
n
, nd the recursion formula
for the coecients a
n
. For which values of K does the series terminate? (This means the
solution y(x) is then a polynomial.)
(b) If a
1
= 0, nd the rst three polynomial solutions (i.e. with degree d = 0, 2, 4). If the leading
coecient is chosen to be 2
d
, then these solutions are the rst three even Hermite polynomials.
(c) If a
0
= 0, nd the rst three polynomial solutions (i.e. with degree d = 1, 3, 5). If the leading
coecient is chosen to be 2
d
, then these solutions are the rst three odd Hermite polynomials.
Exercise 9.4. Use Eulers Method to compute the numerical trajectory corresponding to the
initial value problem dy/dt = 20y, y(0) = 1 when t = 0.1, 0.05, 0.02, and 0 t 1. Also, plot
the polygonal path of this numerical trajectory.
Exercise 9.5. Use the Backward Euler Method to compute the numerical trajectory corresponding
to the initial value problem dy/dt = 20y, y(0) = 1 when t = 0.02, 0.1, 0.2, and 0 t 1. Also,
plot the polygonal path of this numerical trajectory.
Exercise 9.6. Use the class of initial value problems
dz/dt = z, z(0) = z
0
with , z
0
, z(t) C to show that the region of stability for the Trapezoid Method is as given in
Figure 9.6.
Exercise 9.7. Find the rst four iterates of the numerical solution to each initial value problem.
Use the indicated method and step size.
(a) dx/dt = (x t)
2
, x(0) = 0, Eulers Method, t = 0.2.
(b) dx/dt = cos(xt), x(0) = 1, Eulers Method, t = 0.1.
(c) dx/dt = sin(t
2
x), x(0) = 1, Eulers Method, t = 0.2.
9.4. EXERCISES 263
(d) dx/dt = e
x
2
t
, x(0) = 1, Eulers Method, t = 0.2.
(e) dx/dt = x
2
t
2
, x(0) = 0, Backward Euler Method, t = 0.2.
(f) dx/dt = t
3
+x
3
, x(0) = 0, Backward Euler Method, t = 0.2.
(g) dx/dt = log(1 +x
2
), x(0) = 1, Backward Euler Method, t = 0.1.
(h) dx/dt = log(t
2
+x
2
), x(0) = 0, Backward Euler Method, t = 0.1.
(i) dx/dt = x t
2
, x(0) = 2, Trapezoid Method, t = 0.2.
(j) dx/dt = x
3
t, x(0) = 1, Trapezoid Method, t = 0.1.
(k) dx/dt = sin(x
2
t
2
), x(0) = 1, Trapezoid Method, t = 0.2.
(l) dx/dt = 1/(x
2
+t
2
), x(0) = 2, Trapezoid Method, t = 0.1.
Exercise 9.8. Consider the initial value problem
dx/dt = 100x + 100t + 101, x(0) = 1.
(a) Find the exact solution of the initial value problem.
(b) Determine the critical step size t
critical
using equation (9.24).
(c) Demonstrate numerically that Eulers Method is unstable if t > t
critical
.
(d) Demonstrate numerically that the Backward Euler Method is stable even if t > t
critical
.
264 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
Chapter 10
Introduction to Partial Dierential
Equations
In all of this book so far, we have always considered a (perhaps vector-valued) quantity x that
depends on only one (scalar) variable, which we usually interpreted as time, t. Thus, x(t) represents
the time-evolution of this quantity and we used an ordinary dierential equation (ODE) of the form
(d/dt)x = f (x, t) to describe how this quantity depends on time.
In the present chapter, we will consider the more general situation in which a quantity depends
on more than one independent variable. We could have a situation in which a certain quantity u
(representing, for example, the vertical position or the temperature of an object) depends both on
its horizontal position x and time t. Thus, u = u(x, t). The dierential equations that occur in
describing the space and time-evolution of u will generally involve partial derivatives with respect
to both x and t. They are naturally called partial dierential equations (PDE).
It is clear that this generalization opens up an whole new level of mathematical complexity, and
indeed, the mathematical methods involved in analyzing and solving partial dierential equations
are really best covered in a separate text. Nevertheless, in this chapter, we will look at two standard
types of PDE, the one-dimensional wave equation in sections 10.1 and 10.2, and the one-dimension
heat equation in section 10.3. Both have intrinsic physical importance, and the methods involved
in producing solutions to these equations can also be applied to other situations. Additionally, we
will briey look at the Schrodinger wave equation in section 10.4.
10.1 DAlemberts Formula for the One-Dimensional Wave Equa-
tion
In this section, we describe the propagation of waves along a one-dimensional medium. A physical
model that corresponds to this situation is the motion of a violin string. More specically, we would
like to model the (vertical) displacement u of the string as a function of the (horizontal) location x
along the string and time t. Of course, this also requires us to specify certain initial conditions. We
will look at two standard situations: wave propagation along an innite string which is described
by an initial value problem similar to the ones we encountered for ordinary dierential equations;
and standing waves occurring over a xed length L of string where initial values and boundary
values are specied.
265
266 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
It can be shown that
1
, at least for small vertical displacements, the motion of a vibrating string
can be modeled via the one-dimensional wave equation, which takes the form
u
tt
= c
2
u
xx
, (10.1)
where c > 0. Note that u
tt
is the second-order partial derivative of the function u = u(x, t) with
respect to t; similarly for u
xx
. Physically, the constant c is the propagation speed of the wave, and
is related to the tension of the string. (You can see that this is plausible by considering the units
involved in equation (10.1).)
The following result, which is due to dAlembert, shows us that solutions to the wave equation
are both surprisingly simple and abundant.
Theorem 10.1.1. Let f(y) and g(y) be any two (twice continuously dierentiable) real-valued
functions. Then any function of the form
u(x, t) = f(x +ct) +g(x ct) (10.2)
is a solution to (10.1).
Proof. If u(x, t) = f(x +ct) +g(x ct),
u
t
= cf

(x +ct) cg

(x ct)
u
tt
= c
2
f

(x +ct) +c
2
g

(x ct)
u
x
= f

(x +ct) +g

(x ct)
u
tt
= f

(x +ct) +g

(x ct).
Thus, obviously u
tt
= c
2
u
xx
.
Equation (10.2) says that if we consider a xed displacement u
0
, say at time t
0
= 0 and position
x
0
= 0 (that is, u
0
= f(0)+g(0)), then we will have the same displacement along the lines x+ct = 0
and x ct = 0 in the xt-plane.
Example 10.1.1. Suppose g(y) = 1 + cos y for y , g(y) = 0 everywhere else, and f(y) = 0
for all y R. Suppose also c = 1. Then, u(x, t) = g(xt) and the graph of u is simply a translation
of the graph of g(y) along the line x = t. See Figure 10.1.
Another way of looking at this is to observe that the initial wave given by u(x, 0) = g(x) is
translated in the direction of the positive x-axes when t is positive, and and in the direction of the
negative x-axis when t is negative. The result is a traveling wave, and since c = 1, it travels one
x-unit per t-unit. Figure 10.2 illustrates this.
With this example in mind, we can see that equation (10.2) says that the solution u(x, t) is the
superposition of forward-moving waves (with speed c) given by g(y) and backward moving waves
(also with speed c) given by f(y).
1
This is done e.g. in [25], p.244-246.
10.1. DALEMBERTS FORMULA FOR THE ONE-DIMENSIONAL WAVE EQUATION 267
Figure 10.1: The solution u(x, t) = g(x t) in example 10.1.1.
Figure 10.2: The traveling wave in example 10.1.1.
xct,t0 xct,t0
x
u
268 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
The Initial Value Problem for the Wave Equation
Now, we specify the vertical displacement at time t = 0 via an initial condition of the form
u(x, 0) = u
0
(x) and also the initial vertical velocity as u
t
(x, 0) = u
1
(x). The functions f(y) and
g(y) in (10.2) can be determined as follows.
Since u(x, t) = f(x +ct) +g(x ct), the relevant equations are
f(x) +g(x) = u
0
(x) (10.3)
cf

(x) cg

(x) = u
1
(x). (10.4)
If we integrate the second equation, we obtain
cf(x) cg(x) =

x
0
u
1
() d +C. (10.5)
Multiplying (10.3) by c and adding to (10.5) gives
2cf(x) = cu
0
(x) +

x
0
u
1
() d +C,
and thus
f(x) =
u
0
(x)
2
+
1
2c

x
0
u
1
() d +
C
2c
.
Similarly,
g(x) =
u
0
(x)
2

1
2c

x
0
u
1
() d
C
2c
.
Now, using u(x, t) = f(x +ct) +g(x ct), we obtain the solution
u(x, t) =
u
0
(x +ct) +u
0
(x ct)
2
+
1
2c
_
x+ct
0
u
1
() d

xct
0
u
1
() d
_
=
u
0
(x +ct) +u
0
(x ct)
2
+
1
2c

x+ct
xct
u
1
() d.
We have thus established the following result.
Theorem 10.1.2. The initial value problem
u
tt
= c
2
u
xx
(10.6)
u(x, 0) = u
0
(x)
u
t
(x, 0) = u
1
(x).
has a solution given by
u(x, t) =
u
0
(x +ct) +u
0
(x ct)
2
+
1
2c

x+ct
xct
u
1
() d. (10.7)
Equation (10.7) is known as dAlemberts formula.
10.2. THE ONE-DIMENSIONAL WAVE EQUATION AND FOURIER SERIES 269
Example 10.1.2. For the initial value problem u
tt
= 4u
xx
, u(x, 0) = 2 sin x, u
t
(x, 0) = sin x, the
solution given by (10.7) is
u(x, t) =
2 sin(x + 2t) + 2 sin(x 2t)
2
+
1
4

x+2t
x2t
(sin ) d
= sin(x + 2t) + sin(x 2t) +
cos(x + 2t) cos(x 2t)
4
= 2 sin xcos(2t)
sin xsin(2t)
2
.
We used the trigonometric identities
sin u + sin v = 2 sin
_
u +v
2
_
cos
_
u v
2
_
cos u cos v = 2 sin
_
u +v
2
_
sin
_
u v
2
_
.
Note that if x is an integer multiple of , then sin x = 0, and thus u(x, t) = 0 for all t. Since the
solution is 2-periodic in x and -periodic in t, it is enough to consider the domain < x ,
0 t < . Figure 10.3 shows the graph of u(x, t) in that x-range, and for various times t [0, ).
Figure 10.3: The solutions in example 10.1.2.
3 2 1 1 2 3
x
2
1
1
2
u
t56
t23
t2
t3
t6
t0
The solution in the previous example can also be interpreted as a standing wave that is con-
strained by the boundary conditions u(, t) = u(0, t) = 0. In the next section, we consider wave
equations that in addition to initial conditions also have boundary conditions.
10.2 The One-Dimensional Wave Equation and Fourier Series
The Initial/Boundary Value Problem for the Wave Equation
To model the motion u(x, t) of, e.g., a violin string of length L with both endpoints xed at x = 0
and x = L, we would consider the wave equation u
tt
= c
2
u
xx
, together with the initial conditions
270 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
u(x, 0) = u
0
(x) and u
t
(x, 0) = u
1
(x) as in the previous section, and the boundary value conditions
u(0, t) = u(L, t) = 0 for all t.
First o, it is clear that the initial value and boundary value conditions cannot be chosen
completely independently: we certainly need that u
0
(0) = u(0, 0) = 0 and u
0
(L) = u(L, 0) = 0.
Also, u
1
(0) = u
t
(0, t) = 0 and u
1
(L) = u
t
(0, L) = 0. Given these compatibility conditions, we
expect from the physical setting that a solution exists.
In summary, we will consider the following initial/boundary value problem for the wave equation.
u
tt
= c
2
u
xx
(10.8)
u(x, 0) = u
0
(x)
u
t
(x, 0) = u
1
(x)
u(0, t) = 0
u(L, t) = 0,
where 0 x L, and u
0
(0) = u
0
(L) = 0. More generally, initial/boundary value problems with
time-dependent endpoints u(0, t) = a(t), u(L, t) = b(t) can also be studied. We restrict ourselves
to the situation of xed endpoints at u = 0 as described by the equations in (10.8). To solve this
initial/boundary value problem, the method of separation of variables can be used. It is explained
in the following.
First, assume that the solution to (10.8) can be written in the form
u(x, t) = X(x)T(t). (10.9)
Then, the wave equation u
tt
= c
2
u
xx
gives X(x)T

(t) = c
2
X

(x)T(t), or
T

(t)
T(t)
= c
2
X

(x)
X(x)
.
The crucial observation is now that in this equation, the function T

(t)/T(t) of t only is always


equal to the function c
2
X

(x)/X(x) of x only. This implies that both sides must be equal to


the same constant. (Indeed, if a(t) = b(x) for all t and all x, then a(t
1
) = b(x) = a(t
2
) and
b(x
1
) = a(t
1
) = b(x
2
).)
Let the common constant be . Then,
T

(t) = T(t)
X

(x) = (/c
2
)X(x).
Using the initial conditions u(0, t) = u(L, t) = 0 for all t, (10.9) leads to the X(0)T(t) = X(L)T(t) =
0 for all t. Except in the trivial case when T(t) = 0 for all t, we may conclude that X(0) = X(L) = 0.
Thus, we have established that the function X(x) satises the boundary value problem
X

(x) = (/c
2
)X(x), X(0) = X(L) = 0. (10.10)
Now, it can be seen that any sine function with period L/(2n), n = 1, 2, 3, . . ., will satisfy the
boundary value conditions. If X(x) = sin(nx/L), then
X

(x) =

2
n
2
L
2
X(x).
10.2. THE ONE-DIMENSIONAL WAVE EQUATION AND FOURIER SERIES 271
Thus, we have /c
2
=
2
n
2
/L
2
, or
=

2
c
2
n
2
L
2
.
We write /c
2
= (n)
2
, where
=

L
. (10.11)
The values n are called the eigenfrequencies and
X
n
(x) = sin(nx) (10.12)
are the eigenfunctions of the initial/boundary value problem (10.8). Now, the dierential equation
T

(t) = T(t) = (cn)


2
T(t) has the general solution
T(t) = C
1
cos(cnt) +C
2
sin(cnt).
Using a simple superposition/linearity argument leads to the following result.
Theorem 10.2.1. For n = 1, 2, . . ., any function of the form
u
n
(x, t) = sin(nx) cos(cnt) (10.13)
or of the form
v
n
(x, t) = sin(nx) sin(cnt) (10.14)
is a solution to the wave equation u
tt
= c
2
u
xx
and satises the boundary conditions u(0, t) =
u(L, t) = 0 for all t, where = /L. The same is true for any linear combination of the form
u(x, t) =
N

n=1
c
n
u
n
(x, t) +d
n
v
n
(x, t). (10.15)
We now turn our attention to incorporating the initial conditions u(x, 0) = u
0
(x) and u
t
(x, 0) =
u
1
(x). First, we look at an example.
Example 10.2.1. Consider the initial/boundary value problem u
tt
= u
xx
, u(x, 0) = 3 sin(2x),
u
t
(x, 0) = 0, u(0, t) = u(, t) = 0. Thus, c = 1 and L = , and
=

L
= 1.
We are looking for solutions of the form
u(x, t) = c
1
sin(x) cos(t) +d
1
sin(x) sin(t) +c
2
sin(2x) cos(2t) +d
2
sin(2x) sin(2t)
+. . . +c
N
sin(Nx) cos(Nt) +d
N
sin(Nx) sin(Nt).
The initial condition u(x, 0) = 3 sin(2x) indicates that c
2
= 3, and c
1
= c
3
= . . . = c
N
= 0. Since
u
t
(x, t) = c
1
sin(x) sin(t) +d
1
sin(x) cos(t) 2c
2
sin(2x) sin(2t) + 2d
2
sin(2x) cos(2t)
. . . Nc
N
sin(Nx) sin(Nt) +Nd
N
sin(Nx) cos(Nt),
u
t
(x, 0) = 0 gives d
1
= d
2
= . . . = d
N
= 0. Thus, we nd the solution
u(x, t) = 3 sin(2x) cos(2t).
272 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
We can see that in order for a function of the form (10.15) to satisfy the initial condition
u(x, 0) = u
0
(x), we need to be able to write u
0
(x) as
u
0
(x) =
N

n=1
c
n
sin(nx).
Similarly, u
t
(x, 0) = u
1
(x) leads to the condition
u
1
(x) =
N

n=1
d
n
sin(nx).
In general, and for most choices of functions u
0
(x) and u
1
(x), using nite sums is not enough. In
the following we describe how to expand a given function f(x) in the form
f(x) =

n=1
c
n
sin(nx). (10.16)
The series on the right is called the Fourier sine series of f(x). In the following, we show how to
nd the coecients c
n
.
Fourier Series
We address the (slightly more general) question as to how a given function f : [L, L] R can be
expressed in the form
f(x) =
a
0
2
+

n=1
a
n
cos(nx) +b
n
sin(nx), (10.17)
where = pi/L. We will ignore two issues that are more appropriate for a graduate level text:
First, under which conditions does the series in (10.17) converge? Second, for which functions f(x)
does the series converge to f(x) over the entire domain [L, L]?
2
The reason why we choose the
domain of the function f(x) to be [L, L] instead of [0, L] will become clear in the discussion below.
When replacing the innite sum in (10.17) by a nite sum, we obtain the following.
A (real) trigonometric polynomial of degree N is of the form
p(x) =
a
0
2
+
N

n=1
a
n
cos(nx) +b
n
sin(nx), (10.18)
where a
0
, a
1
, . . . , a
N
, b
1
, . . . , b
N
R. Note that cos(nx) and sin(nx) both have period 2L/n, so,
the common period for all functions in (10.18) is 2L; in other words, the function p(x) may be
assumed to have domain [L, L]. The use of a
0
/2 for the constant term is customary.
2
The short answer to these questions is that (10.17) holds for practically all functions that we might encounter
as initial conditions to a PDE. Another question is the nature of the convergence. This is again best treated in a
higher-level text. See, for example chapter 4 of [24].
10.2. THE ONE-DIMENSIONAL WAVE EQUATION AND FOURIER SERIES 273
To nd the coecients a
0
, a
1
, . . . , a
N
, b
1
, . . . , b
N
in (10.18), we use that

L
L
sin(nx) cos(kx) dx = 0 (n, k = 0, 1, . . .)

L
L
cos(nx) cos(kx) dx =
_
L if n = k
0 if n ,= k
(n, k = 1, 2, . . .)

L
L
sin(nx) sin(kx) dx =
_
L if n = k
0 if n ,= k
(n, k = 1, 2, . . .)
In this way, we can multiply (10.18) by cos(kx) and sin(kx) and integrate from 0 to L to ush
out the coecients, as follows. For
p(x) =
a
0
2
+
N

n=1
a
n
cos(nx) +b
n
sin(nx),
we have

L
L
p(x) dx =

L
L
a
0
2
dx +
N

n=1
a
n
_
L
L
cos(nx) dx
_
+b
n
_
L
L
sin(nx) dx
_
= a
0
L.
Thus, a
0
/2 = (1/(2L))

L
L
p(x) dx. In the same way,

L
L
p(x) cos(kx) dx =

L
L
a
0
2
cos(kx) dx +
N

n=1
a
n
_
L
0
cos(nx) cos(kx) dx
_
+b
n
_
L
L
sin(nx) cos(kx) dx
_
= a
k
L
gives a
k
= (1/L)

L
L
p(x) cos(kx) dx for k = 1, 2, . . . , N. Similarly, we obtain the formula b
k
=
(1/L)

L
L
p(x) sin(kx) dx for k = 1, 2, . . . , N.
If we now have an arbitrary function f(x) instead of a trigonometric polynomial, then the
formulas for the coecients in the Fourier series (10.17) are
a
0
2
=
1
2L

L
L
f(x) dx (10.19)
a
n
=
1
L

L
L
f(x) cos(nx) dx (10.20)
b
n
=
1
L

L
L
f(x) sin(nx) dx (10.21)
for n = 1, 2, . . .. In this way we can approximate an arbitrary function with trigonometric polyno-
mials:
f(x) p
N
(x) =
a
0
2
+
N

n=1
a
n
cos(nx) +b
n
sin(nx).
274 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
An important observation is that if f(x) is an odd function, then the integrals in (10.19) and
(10.20) are zero, and f(x) can be expressed as the Fourier sine series

n=1
b
n
sin(nx). (10.22)
Example 10.2.2. Consider the function f : [0, 1] R, where
f(x) =
_
1 if 0.25 t 0.75
0 otherwise.
The graph of y = f(x) is shown Figure 10.4a. We can extend f(x) to the odd function f
odd
(x) on
the interval [1, 1] by letting f
odd
(x) = f(x) for 1 x < 0. In other words, the odd extension
is
f
odd
(x) =
_
_
_
1 if 0.75 t 0.25
1 if 0.25 t 0.75
0 otherwise.
Its graph is shown in Figure 10.4b.
Figure 10.4: The graph of (a): y = f(x) in example 10.2.2 (left) and (b): its odd extension (right).
0.2 0.4 0.6 0.8 1.0
x
0.4
0.2
0.2
0.4
0.6
0.8
1.0
y
1.0 0.5 0.5 1.0
x
1.0
0.5
0.5
1.0
y
We can now compute the Fourier coecients as follows. Note that = /L = . Since f
odd
(x)
10.2. THE ONE-DIMENSIONAL WAVE EQUATION AND FOURIER SERIES 275
is an odd function, a
0
= a
1
= a
2
= . . . = 0. Also,
b
1
=

1
1
f(x) sin(x) dx 0.9003,
b
3
=

1
1
f(x) sin(3x) dx 0.3001,
b
5
=

1
1
f(x) sin(5x) dx 0.1800,
b
7
=

1
1
f(x) sin(7x) dx 0.1286,
b
9
=

1
1
f(x) sin(9x) dx 0.1000,
.
.
.
In this example, b
k
= 0 for k even. Alternatively, to nd the b
k
s, we could have integrated each
function from 0 to 1, and then doubled the result (since the integrand is an even function). The
rst ve trigonometric polynomial approximations are consequently:
p
1
(x) = 0.9003 sin(x)
p
3
(x) = p
1
(x) 0.3001 sin(3x)
p
5
(x) = p
3
(x) 0.1800 sin(5x)
p
7
(x) = p
5
(x) + 0.1286 sin(7x)
p
9
(x) = p
9
(x) + 0.1000 sin(9x).
The graphs of these approximations are shown in Figure 10.5. Figure 10.6 shows the original
function f(x) (dened on the interval [1, 1]), and the high-order Fourier sine series approximation
p
25
(x).
We return to the initial/boundary value problem for the wave equation, (10.8). Extending the
formula in theorem 10.2.1, we assume that the solution can be written in the form
u(x, t) =

n=1
c
n
sin(nx) cos(cnt) +d
n
sin(nx) sin(cnt). (10.23)
Consequently,
u
t
(x, t) =

n=1
cnc
n
sin(nx) sin(cnt) +cnd
n
sin(nx) cos(cnt). (10.24)
To nd the coecients c
n
and d
n
we need to write the functions giving the initial conditions
u
0
(x) = u(x, 0) and u
1
(x) = u
t
(x) as Fourier sine series, and then compare coecients. The next
example illustrates this process.
276 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
Figure 10.5: The rst 5 approximations by trigonometric polynomials of the function y = f
odd
(x)
in example 10.2.2.
1.0 0.5 0.5 1.0
x
1.0
0.5
0.5
1.0
y
n9
n7
n5
n3
n1
Figure 10.6: The approximation of the function y = f(x) in example 10.2.2 by its Fourier sine
series using the trigonometric polynomial of degree 25.
0.2 0.4 0.6 0.8 1.0
x
0.2
0.4
0.6
0.8
1.0
y
10.2. THE ONE-DIMENSIONAL WAVE EQUATION AND FOURIER SERIES 277
Example 10.2.3. Consider the initial/boundary value problem u
tt
= 4u
xx
, u(x, 0) = f(x), u
t
(x, 0) =
0, u(0, t) = u(1, t) = 0, where f : [0, 1] R is the piecewise-dened function in example 10.2.2.
That is,
f(x) =
_
1 if 0.25 x 0.75
0 otherwise
Here, c = 2, L = 1, and = /L = .
From example 10.2.2,
f(x) 0.9 sin(x) 0.3 sin(3x) 0.18 sin(5x) + 0.13 sin(7x) + 0.1 sin(9x).
If u(x, t) is of the form (10.23), u(x, 0) =

N
n=1
a
n
sin(nx). Comparing coecients, c
1
0.9,
c
3
0.3, c
5
0.18, c
7
0.13, c
9
0.1; coecients c
n
with even indices are zero, and, by way
of approximation, we assume that c
11
, c
13
, . . . 0. Equation (10.24) and the fact that u
t
(x, 0) = 0
gives that all d
n
s are zero.
The solution to the initial/boundary value problem can be approximated as
u(x, t) 0.9 sin(x) cos(2t) 0.3 sin(3x) cos(6t) 0.18 sin(5x) cos(10t)
+0.13 sin(7x) cos(14t) + 0.1 sin(9x) cos(18t).
A better approximation, if desired, can easily be obtained by using more terms in the Fourier sine
series approximation of the function f(x). Figure 10.7 shows the graph of the function u(x, t) when
using a high-order approximation of degree 25. The function has period T = 1 in t. Figure 10.8
shows several cross-sections at xed times.
Figure 10.7: The solution in example 10.2.3 using an approximation of order 25.
278 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
Figure 10.8: The solution u(x, t) in example 10.2.3 using an approximation of order 25, for (a):
t = 0, 0.1, 0.2 (left); (b): t = 0.3, 0.4, 0.5 (right).
0.2 0.4 0.6 0.8 1.0
x
1.0
0.5
0.5
1.0
u
t0.2
t0.1
t0
0.2 0.4 0.6 0.8 1.0
x
1.0
0.5
0.5
1.0
u
t0.5
t0.4
t0.3
10.3 The One-Dimensional Heat Equation
The physical situation we are modeling in this section is the one-dimensional propagation of heat,
e.g. along a metal rod with small cross-sectional area compared to its length, L. Let u(x, t) be
the temperature at position x along the rod and at time t. An appropriate model is given by the
one-dimensional heat equation, as follows.
u
t
= ku
xx
, (10.25)
where k > 0 is the constant of heat conductivity. Before presenting a method of nding solutions
to the heat equation, let us investigate some qualitative properties of (10.25), and compare them
to plausible properties we would expected in the physical situation.
3
Equation (10.25) says, in words, that at time t
0
and at the position x
0
along the rod, the change
in temperature with time is proportional to the concavity at x
0
of the temperature distribution
along the rod. This is illustrated in Figure 10.9. In other words, the heat equation represents the
(observed or imagined) property of the heat ow to ll in any non-linear holes in the spatial
temperature distribution. The heat conductivity constant k species how quickly the temperature
changes in response to a deviation from linearity.
Another way to analyze equation (10.25) is to look at equilibrium distributions of the temper-
ature along the rod; i.e. the functions u

(x, t) so that (/t)u

(x, t) = 0 for all t. In other words,


at a xed position along the rod, the temperature is constant at equilibrium. Hence, we may write
u

(x, t) = u

(x). This analysis requires a look at what happens at the ends of the rods. We consider
two basic situations in this setting.
(a) The temperature is held constant at both ends of the rod: u(0, t) = u
0
and u(L, t) = u
L
for
3
Or, if this were a physics text, can be backed up using experimental data.
10.3. THE ONE-DIMENSIONAL HEAT EQUATION 279
Figure 10.9: The change in temperature with time in the heat equation (10.25), if the spatial
distribution of the temperature is (a): concave up (left); (b): concave down (right).
u
t
0
x
u
u
t
0
x
u
all t. Then, u

t
= 0 gives that u

xx
= 0, so u

(x) is a linear function of x, and we have


u

(x) = u
0
+
u
L
u
0
L
x. (10.26)
(b) The ends of the rod are insulated. It is then plausible that at equilibrium, the temperature
is constant and the same at both ends, and u

(x) is a constant function.


In the following, we consider for simplicity that the temperature is zero at both ends of the rod,
and that the initial temperature distribution along the rod is given. This leads to the following
initial/boundary value problem for the wave equation.
u
t
= ku
xx
(10.27)
u(x, 0) = u
0
(x)
u(0, t) = 0
u(L, t) = 0,
where k > 0. To nd a solution to this problem, we again employ the method of separation of
variables. As in section 10.2, assume rst that the solution u(x, t) to (10.25) is separable:
u(x, t) = X(x)T(t). (10.28)
Then an argument similar to the one for the wave equation (see exercise 10.6) establishes the
following result.
Theorem 10.3.1. For n = 1, 2, . . ., any function of the form
u
n
(x, t) = e
kn
2

2
t
sin(nx), (10.29)
where = /L, is a solution to the wave equation u
t
= ku
xx
and satises the boundary conditions
u(0, t) = u(L, t) = 0 for all t. The same is true for any linear combination of the form
u(x, t) =
N

n=1
c
n
u
n
(x, t). (10.30)
280 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
As for the wave equation, we in general need an innite sum in (10.30). Then, since
u(x, 0) =

n=1
c
n
sin(nx),
we again need to nd a Fourier sine series expansion for the initial temperature distribution. This
is illustrated in the following example.
Example 10.3.1. Suppose u
t
= u
xx
, u(x, 0) = x(1 x), u(0, t) = u(1, t) = 0. Then k = L = 1
and = . To nd a Fourier sine series representing u
0
(x) = x(1 x), we need to extend
f(x) = x(1 x) into an odd function f
odd
(x), and then use formula (10.21) with f
odd
(x) in place
of f(x). The coecients b
n
can be computed using the formula
b
n
=

1
1
f
odd
(x) sin(nx) dx
= 2

1
0
f(x) sin(nx) dx
= 2

1
0
x(1 x) sin(nx) dx.
These integrals can be evaluated using integration by parts or Mathematica. The formula for the
coecients is b
n
= 0 if n is even and b
n
= 8/(n
3

3
) if n is odd. We write
f(x) = x(1 x) =

i=0
8
(2i + 1)
3

3
sin((2i + 1)x).
The approximation is already very good when only 2 terms are used. See Figure 10.10.
Figure 10.10: Approximation of the initial temperature distribution (in red) in example 10.3.1
using Fourier sine series (in blue). (a): rst-order approximation f(x) (8/
3
) sin(x) (left); (b):
rst-order approximation f(x) (8/
3
) sin(x) + (8/(27
3
) sin(3x) (right).
0.2 0.4 0.6 0.8 1.0
x
0.05
0.10
0.15
0.20
0.25
y
0.2 0.4 0.6 0.8 1.0
x
0.05
0.10
0.15
0.20
0.25
y
The solution to the initial/boundary value problem for the heat equation is thus:
u(x, t) =

i=0
8
(2i + 1)
3

3
e
(2i+1)
2

2
t
sin((2i + 1)x).
10.4. THE SCHR

ODINGER WAVE EQUATION 281


Figure 10.11 shows the graph of the second-order approximation
u(x, t)
8

3
e

2
t
sin(x) +
8
27
3
e
9
2
t
sin(3x)
when 0 x 1 and 0 t 0.2. Not surprisingly, the temperature decays exponentially to zero
from its distribution at time t = 0.
Figure 10.11: The solution in example 10.3.1 using an approximation of order 2.
10.4 The Schr odinger Wave Equation
In this section, we will present some aspects related to Schrodingers wave equation. The phys-
ical interpretations will of necessity be somewhat vague. An excellent introduction to quantum
mechanics is presented in [12]. Here is Schrodingers wave equation:
u
t
=
i
2m

2
u
x
2

i

V u, (10.31)
where:
u(x, t) is the complex-valued Schrodinger wave function;
i =

1;
= h/(2), where h is Plancks constant;
V (x, t) is the real-valued potential energy function. In the following, we consider only the
case if V = V (x) is a function of x alone; then, (10.31) is called the the time-independent
Schrodingers wave equation.
The function u(x, t) describes a particle of mass m at position x and time t. The nature of this
description will be explored in the following.
4
4
Understanding of the material that follows requires familiarity with basic principles concerning random variables;
e.g. their distribution and expected value.
282 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
Statistical Interpretation
The square modulus
[u(x, t)[
2
= u(x, t)u(x, t)
of the wave function is interpreted as the probability density of the position X of the particle.
5
This
means that given two values x = a and x = b, the probability that the particle is between a and b
is
P(a X b) =

b
a
[u(x, t)[
2
dx. (10.32)
For this to work as intended, the function [u(x, t)[
2
must have the properties associated with a
probability density function. Specically, we need [u(x, t)[
2
0 (this is obviously true), and we
also need that

[u(x, t)[
2
dx = 1 (10.33)
for all t. This means the probability that the particle is somewhere is one at any time t. We rst
check that the integral on the left in equation (10.33) is equal to the same constant for all values
of t. Dierentiating the integral in (10.33) and using the product rule gives
d
dt

[u(x, t)[
2
dx =

t
[u(x, t)[
2
dx
=

u
t
(x, t)u(x, t) +u(x, t)
u
t
(x, t) dx.
Schrodingers wave equation
u
t
=
i
2m

2
u
x
2

i

V u
implies
u
t
=
i
2m

2
u
x
2
+
i

V u.
Thus,
u
t
u +u
u
t
=
i
2m

2
u
x
2
u +
i

V uu +
i
2m

2
u
x
2
u
i

V uu
=
i
2m
_

2
u
x
2
u

2
u
x
2
u
_
=
i
2m
_

2
u
x
2
u +
u
x
u
x

u
x
u
x


2
u
x
2
u
_
=
i
2m

x
_
u
x
u
u
x
u
_
.
We have established that

t
[u(x, t)[
2
=
i
2m

x
_
u
x
u
u
x
u
_
. (10.34)
5
In keeping with custom from probability theory, we use capital letters for random variables; i.e., quantities whose
values are subject to a probability distribution.
10.4. THE SCHR

ODINGER WAVE EQUATION 283


This means that
d
dt

[u(x, t)[
2
dx =
i
2m
_
u
x
u
u
x
u
_

x=
x=
.
Assuming lim
x
u(x, t) = 0 and at least boundedness of u/x gives that there exists a constant
A so that

[u(x, t)[
2
dx = A
for all t. Unless u(x, t) is identically zero (which is a trivial solution which we may exclude),
A > 0. If A < , we normalize the solution u(x, t) by dividing it by

A. This obviously still


gives us a solution to (10.31). Thus, we have established that if there exists a non-zero solution to
Schrodingers wave equation and the integral of the square modulus of u(x, t) is nite, then we can
normalize it to satisfy condition (10.33).
Expected Values of Position and Momentum
Denition 10.4.1. If X is a random variable with probability densitity function (x), then the
expected value of X is
E(X) =

x(x) dx. (10.35)


The expected value is also called the mean and denoted by
X
or simply . In general, if h(X) is
a function of the random variable X, then
E(h(X)) =

h(x)(x) dx. (10.36)


Since [u(x, t)[
2
represents the probability density of the position X of the particle, its expected
position is given by
E(X) =

x[u(x, t)[
2
dx. (10.37)
This formula allows us to nd the expected position of the particle of a function of t. This is
the sense in which the wave equation describes where the particle is at time t. Along the same
lines, it would be plausible to understand the expected velocity to be given by the time derivative
of equation (10.37). That is,
d
dt
E(X) =
d
dt

x[u(x, t)[
2
dx
=

x

t
[u(x, t)[
2
dx
=
i
2m

x

x
_
u
x
u
u
x
u
_
dx
=
i
2m
_
x
u
x
u x
u
x
u
_

x=
x=

i
2m

u
x
u
u
x
udx
=
i
2m

u
x
u
u
x
udx.
284 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
We used equation (10.34), integration by parts, and the assumption lim
x
xu(x, t) = 0 and
boundedness of partial derivatives with respect to x in the derivation. Another integration by
parts gives

u
x
udx = uu[
x=
x=

u
x
udx
=

u
x
udx.
Thus,
d
dt
E(X) =
i
m

u
u
x
dx =
1
m

u
_

x
_
udx. (10.38)
Technically, it would be cleaner to nd the probability distribution of the velocity dX/dt, and
then nd the expected value using this distribution. It can be shown that the results are the same;
i.e. that (d/dt)E(X) = E(dX/dt) (see [12], chapter 3). Thus, the expected value of the momentum
P = m(dX/dt) can be computed as
E(P) =

u
_

x
_
udx. (10.39)
Observe that the expected value of the position (10.37) can be written as
E(X) =

u(x) udx. (10.40)


Thus, we may formally identify the operator of multiplying a function by x with the position and the
operator of dierentiating a function with respect to x and multiplying by /i with the momentum.
In general, we can use this approach to dene the expected value of any dynamical variable.
Denition 10.4.2. Suppose Q(x, p) is a function of the position x and momentum p of a quantum
particle. Then the expected value of Q is dened as
E(Q) =

u
_
Q
_
x,

x
__
udx. (10.41)
Example 10.4.1. The total energy (kinetic energy plus potential energy) of the particle is given by
the Hamiltonian function
H(x, p) =
p
2
2m
+V (x).
(Cf. example 6.6.1.) The expected value for the total energy is thus:
E(H) =

u
_
1
2m
_

x
_
2
+V (x)
_
udx
=

ui
_
i
2m
_

x
_
2

V (x)
_
udx
= i

uu
t
dx, (10.42)
where we used Schrodingers wave equation (10.31) in the last step. Formula (10.42) can be used
to compute the expected energy in specic situations.
10.4. THE SCHR

ODINGER WAVE EQUATION 285


Solutions to the Time-Independent Schr odinger Wave Equation
Now, let us see if the method of separation of variables, already used successfully for the regular
wave equation and the heat equation, produces solutions to the (time-independent) Schrodinger
wave equation. As usual, we assume
u(x, t) = X(x)T(t).
Then (10.31) leads to
X(x)T

(t) =
i
2m
X

(x)T(t)
i

V (x)X(x)T(t)
or
T

(t)
T(t)
=
i
2m
X

(x)
X(x)

i

V (x).
Dividing both sides by i/ (and thus producing units of energy on both sides), we get
i
T

(t)
T(t)
=

2
2m
X

(x)
X(x)
+V (x).
As seen before, both sides must be constant. We denote this constant by E. We have produced
two (ordinary) dierential equations:
1. The time-component satises
T

(t)
T(t)
=
E
i
= i
E

,
whose general solution is
T(t) = Ce
i(E/)t
. (10.43)
Note that E is a real number (see exercise 10.12). Thus, (10.43) does not represent a decay
with time. Rather, since
e
i(E/)t
= cos((E/)t) i sin((E/)t),
T(t) is itself a complex-valued wave function with amplitude C and circular frequency E/.
Without loss of generality, we can assume that C = 1 (simply move over the multiplicative
constant to the space-component X(x)).
2. The space-component satises


2
2m
X

(x)
X(x)
+V (x) = E,
or
X

(x) +
2m

2
(E V (x))X(x) = 0. (10.44)
This is a linear second-order homogeneous dierential equation (albeit in general with noncon-
stant coecients). Finding solutions may get quite complicated, depending on the formula for
the potential energy function V (x). We demonstrate how to nd a solution to Schrodingers
wave equation for a simple potential. The scenario, analyzed in the following example, is
called the innite square well.
286 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
Example 10.4.2. Let
V (x) =
_
0 if 0 x 1
+ otherwise.
(10.45)
Physically, this means that the potential energy of the particle is zero when it is located between
positions x = 0 and x = 1. That is, the bottom of the well is at. The particle would need to have
innite energy to reach or be located at all other positions, which is not physically possible, and thus
the probability that we will nd the particle outside the well 0 x 1 is zero. Mathematically,
this implies that the probability density [u(x, t)[
2
is non-zero only if 0 x 1. Since u(x, t) is
the solution to a dierential equation, it is continuous, and so is [u(x, t)[
2
. This implies that at the
boundary of the well, u(0, t) = u(1, t) = 0 for all t.
We now have enough information to solve equation (10.44). Since V (x) = 0 for 0 x 1, we
need to solve the boundary value problem
X

(x) +
2mE

2
X(x) = 0, X(0) = X(1) = 0. (10.46)
An argument similar to the one following equation (10.10) shows that the basic solutions to this
boundary value problem are constant multiples of the eigenfunctions
X
n
(x) = sin(nx), (10.47)
where on the one hand, = to satisfy the boundary conditions; on the other hand,
n =

2mE

to satisfy the dierential equation. Thus, we conclude that there can only be a discrete set of
possible values for the separation constant E; they are called allowed energies, and we denote them
by E
n
. They need to satisfy the equation

2mE
n
/ = n, or
E
n
=

2
n
2

2
2m
. (10.48)
This result exhibits the fundamental dierence between quantum mechanics and classical mechan-
ics, namely that there is a smallest allowed unit of energy E
1
that can occur in a quantum system
(see exercise 10.11). The quantity E
1
= (
2

2
)/(2m) is called the ground state of the system.
We have established that the solutions for the innite square well are linear combinations or
innite sums of functions of the form
u
n
(x, t) = Ae
i(En/)t
sin(nx). (10.49)
Normalization gives:
1 =

1
0
u(x, t)u(x, t) dx
=

1
0
Ae
i(En/)t
sin(nx)Ae
i(En/)t
sin(nx) dx
= A
2

1
0
sin
2
(nx) dx
= A
2
(1/2),
10.4. THE SCHR

ODINGER WAVE EQUATION 287


thus A =

2, and
u
n
(x, t) =

2e
i(En/)t
sin(nx). (10.50)
If additional initial conditions are given for u(x, t), i.e. u(x, 0) = u
0
(x), then a Fourier sine series
expansion of u
0
(x) and equations (10.50) and (10.48) can be used to piece together a solution to
the initial value problem.
Standard Deviations and the Uncertainty Principle
In addition to looking at the expected position and velocity of a particle, we may also be interested
in the amount of variability in these quantities, or put dierently, we would like to measure the
uncertainty about these quantities. This leads to the following denitions.
Denition 10.4.3. If X is a random variable with probability densitity function (x) and expected
value , then the variance of X is

2
=
2
X
= E
_
(X )
2
_
. (10.51)
The standard deviation is then the positive square root of the variance:
=

2
. (10.52)
Thus, the variance is the expected square deviation from the mean. If most values of a random
variable are close to the mean, it will have a small variance; conversely, if the values are spread out
a lot, the variance will be a large number. It is easy to show that the following shortcut formula
for the variance applies:

2
= E
_
X
2
_
(E(X))
2
. (10.53)
Example 10.4.3. Let us compute the standard deviation of the position and the velocity for the
innite square well. The expected value of the solution given by the eigenfunction (10.50) is
E(X
n
) =

1
0
x[u
n
(x, t)[
2
dx
=

1
0
x

2e
i(En/)t
sin(nx)

2e
i(En/)t
sin(nx) dx
= 2

1
0
xsin
2
(nx) dx
= 1/2.
This is not at all surprising, since x = 1/2 is the center of the well. Also,
E(X
2
n
) =

1
0
x
2
[u
n
(x, t)[
2
dx
= 2

1
0
x
2
sin
2
(nx) dx
=
1
3

1
2n
2

2
.
288 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
Thus, the variance is
2
Xn
= E(X
2
n
) E(X
n
)
2
= (1/12) (1/(2n
2

2
)), and the standard deviation
is

Xn
=
_
1
12

1
2n
2

2
.
Using formula (10.41) we can also compute that the momentum P
n
= m(d/dt)X
n
of the n-th
solution has expected values E(P
n
) = 0 and E(P
2
n
) =
2
n
2

2
, and thus the standard deviation of
the momentum is

Pn
= n.
We observe that the quantity

Xn

Pn
=
_
n
2

2
12

1
2
is minimal for the ground state and slightly larger than /2.
In general, it can be shown that the position X and the momentum P of any solution to
Schrodingers wave equation must satisfy Heisenbergs uncertainty principle:

P


2
. (10.54)
See [12] for a derivation of this result. The uncertainty principle states that there is a fundamental
trade-o between the precision with which we can determine the position vs. the momentum of
a quantum particle: the more information we want about the position of the particle, the less
information we will have about its momentum, and vice versa.
10.5 Mathematica Use
Solving partial dierential equations in Mathematica is not quite as straightforward as nding
solutions for ordinary dierential equations. We demonstrate how to obtain the solution in example
10.2.3 using the Fourier series method.
Example 10.5.1. Given the initial/boundary value problem u
tt
= 4u
xx
, u(x, 0) = f(x), u
t
(x, 0) = 0,
u(0, t) = u(1, t) = 0, with
f(x) =
_
1 if 0.25 t 0.75
0 otherwise
,
we rst dene the initial value function and the relevant parameters.
fx_ : Piecewise1, 0.25 x 0.75;
L 1;
c 2;
Pi L;
The coecients for the Fourier sine series of the function f(x) are computed and displayed as
follows.
bn_ : 2 L Integratefx Sin n x, x, 0, L;
Tablebn, n, 1, 25 N
0.900316, 0., 0.300105, 0., 0.180063, 0., 0.128617,
0., 0.100035, 0., 0.0818469, 0., 0.0692551, 0., 0.0600211, 0.,
0.0529598, 0., 0.0473851, 0., 0.0428722, 0., 0.0391442, 0., 0.0360127
10.6. EXERCISES 289
Finally, the approximate solution is computed and graphed.
10.6 Exercises
Exercise 10.1. Use dAlemberts formula (10.7) to solve each initial value problem, and sketch the
graph of u(x, t) at the indicated values of t.
(a) u
tt
= u
xx
, u(x, 0) = e
x
2
, u
t
(x, 0) = 0 (t = 0, 1, 2, 3).
(b) u
tt
= u
xx
, u(x, 0) = 0, u
t
(x, 0) = 2xe
x
2
(t = 0, 1, 2, 3).
(c) u
tt
= 4u
xx
, u(x, 0) = x
2
/(1 +x
2
), u
t
(x, 0) = 0 (t = 0, 1, 2, 3).
(d) u
tt
= 4u
xx
, u(x, 0) = 1, u
t
(x, 0) = x/(1 +x
2
) (t = 0, 1, 2, 3).
(e) u
tt
= 4u
xx
, u(x, 0) = x
2
/(1 +x
2
), u
t
(x, 0) = 1 (t = 0, 1, 2, 3).
(f) u
tt
= u
xx
, u(x, 0) = 1, u
t
(x, 0) = (1 x
2
)/(1 +x
2
)
2
(t = 0, 4, 8, 12).
Exercise 10.2. Show each of the following regarding the initial value problem given by (10.6).
(a) If cu

0
(x) +u
1
(x) = 0, then the solution u(x, t) is a forward-moving wave only.
(b) If cu

0
(x) u
1
(x) = 0, then the solution u(x, t) is a backward-moving wave only.
(c) If u
0
(x) is even and u
1
(x) = 0, then the function x u(x, t) is even for all t.
(d) If u
0
(x) is odd and u
1
(x) = 0, then the function x u(x, t) is odd for all t.
(e) If u
1
(x) is even and u
0
(x) = 0, then the function x u(x, t) is even for all t.
290 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
(f) If u
1
(x) is odd and u
0
(x) = 0, then the function x u(x, t) is odd for all t.
Exercise 10.3. Find the rst ve non-zero terms of the Fourier sine series (10.22) of each function
and graph the function and its Fourier sine series.
(a) f(x) = x, 0 x 1.
(b) f(x) = 1 x
2
, 0 x 1.
(c) f(x) = 2x if 0 x 0.5, and f(x) = 2 2x if 0.5 x 1.
(d) f(x) = 2x if 0 x 0.5, and f(x) = 2x 2 if 0.5 x 1.
Exercise 10.4. Find the rst three non-zero terms of the solution (10.23) to each initial/boundary
value problem. Then, graph the solution over the given domain.
(a) u
tt
= u
xx
, u(x, 0) = f(x), u
t
(x, 0) = 0, u(0, t) = u(1, t) = 0, where f(x) is the function in
part (c) of exercise 10.3; domain: 0 x 1, 0 t 2.
(b) u
tt
= u
xx
, u(x, 0) = x(1x), u
t
(x, 0) = 0, u(0, t) = u(1, t) = 0; domain: 0 x 1, 0 t 2.
(c) u
tt
= 4u
xx
, u(x, 0) = 0, u
t
(x, 0) = f(x), u(0, t) = u(1, t) = 0, where f(x) is the function in
part (c) of exercise 10.3; domain: 0 x 1, 0 t 2.
(d) u
tt
= 4u
xx
, u(x, 0) = 0, u
t
(x, 0) = x(1 x), u(0, t) = u(1, t) = 0; domain: 0 x 1,
0 t 2.
Exercise 10.5. Consider the heat equation where the temperature is constant, but in general non-
zero at both endpoints of the rod. This is described by the initial/boundary value problem
u
t
= ku
xx
(10.55)
u(x, 0) = u
0
(x)
u(0, t) = u
0
(0)
u(L, t) = u
0
(L).
(a) Show that if u(x, t) is a solution to (10.55) and u

(x) is as in equation (10.26), then


u(x, t) = u(x, t) u

(x)
is a solution to (10.27).
(b) Use this result to nd the solution to the initial/boundary value problem u
t
= u
xx
, u(x, 0) =
1 + 2x x
2
, u(0, t) = 1, u(1, t) = 2 and graph the solution for 0 x 1 and 0 t 0.2.
Exercise 10.6. Derive equation (10.29) by assuming that u(x, t) = X(x)T(t). Follow these steps.
(a) Show that T

(t) = T(t) and X

(x) = (/k)X(x). From physical considerations, we may


assume > 0.
(b) Find the general solution to T

(t) = T(t).
10.6. EXERCISES 291
(c) Use the boundary value conditions to show that for = /L, = kn
2

2
and X
n
(x) =
sin(nx).
Exercise 10.7. Consider the heat equation with insulated endpoints. It is described by the ini-
tial/boundary value problem
u
t
= ku
xx
(10.56)
u(x, 0) = u
0
(x)
u
x
(0, t) = 0
u
x
(L, t) = 0.
(a) Show that if u
0
(x) =

n=0
c
n
cos(nx), any function of the form
u(x, t) =

n=0
c
n
e
kn
2

2
t
cos(nx) (10.57)
is a solution to (10.56). As above, = /L.
(b) Show that as t , the solution u(x, t) approaches a constant u

, and that
u

=
1
L

L
0
u
0
(x) dx.
(c) Show that for every t 0,
u

=
1
L

L
0
u(x, t) dx.
This equation demonstrates, as expected when the endpoints are insulated, that the total
heat is constant.
Exercise 10.8. Find the rst ve non-zero terms of the Fourier cosine series

n=0
c
n
cos(nx)
(0 x L, = /L) of each function and graph the function and its Fourier cosine series. Use
the following formulas for the coecients:
c
0
=
1
L

L
0
f(x) dx (10.58)
c
n
=
2
L

L
0
f(x) cos(nx) dx (10.59)
(a) f(x) = x, 0 x 1.
(b) f(x) = 1 x
2
, 0 x 1.
(c) f(x) = 2x if 0 x 0.5, and f(x) = 2 2x if 0.5 x 1.
(d) f(x) = 2x if 0 x 0.5, and f(x) = 2x 2 if 0.5 x 1.
Exercise 10.9. Find the rst three non-zero terms of the solution (10.57) to each initial/boundary
value problem. Then, graph the solution over the given domain.
292 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS
(a) u
t
= (1/5)u
xx
, u(x, 0) = f(x), u(0, t) = u(1, t) = 0, where f(x) is the function in part (c)
of exercise 10.3; domain: 0 x 1, 0 t 2.
(b) u
t
= (1/5)u
xx
, u(x, 0) = x(1 x), u(0, t) = u(1, t) = 0; domain: 0 x 1, 0 t 2.
(c) u
t
= (1/10)u
xx
, u(x, 0) = f(x), u
x
(0, t) = u
x
(1, t) = 0, where f(x) is the function in part
(c) of exercise 10.8; domain: 0 x 1, 0 t 1.
(d) u
t
= (1/10)u
xx
, u(x, 0) = x(1 x), u
x
(0, t) = u
x
(1, t) = 0; domain: 0 x 1, 0 t 2.
Exercise 10.10. Consider the function
u(x, t) =
_

_
1/4
e
(/2)x
2
it
, (10.60)
where = m/ and > 0.
(a) Verify that u(x, t) is normalized.
(b) Find the potential function V (x) that corresponds to the wave function given by u(x, t).
(c) Find the expected value of the position X; the expected value of X
2
; and compute the
standard deviation of X.
(d) Find the expected value of the momentum P; the expected value of P
2
; and compute the
standard deviation of P.
(e) Verify the uncertainty principle (10.54).
Exercise 10.11. Prove the following results for the solutions u
n
(x, t) of the innite square well.
(a) Verify that E(P
n
) = 0.
(b) Verify that E(P
2
n
) =
2
n
2

2
.
(c) Suppose u(x, t) =

n=1
c
n
u
n
(x, t). Show that if u
n
(x, t) is normalized, then

n=1
[c
n
[ = 1.
(d) Show that the expected value of the total energy H(X, P) associated with u
n
(x, t) is E
n
and
that the total energy of u(x, t) =

n=1
c
n
u
n
(x, t) is equal to

n=1
[c
n
[
2
E
n
.
Exercise 10.12. Prove the following results for the solutions u(x, t) = T(t)X(x) as given by the
equations (10.43) and (10.44).
(a) Show that if u(x, t) is normalizable, then the separation constant E is a real number. Hint:
Assume E = a +ib and deduce that b = 0.
(b) Show that the separation constant E is equal to the expected total energy of the particle with
wave function u(x, t).
(c) Show that the associated total energy H has standard deviation
H
= 0. Thus, the solution
u(x, t) has constant total energy.
(d) Show that for the separation constant E, E min
x
V (x). Hint: Assume that E < V (x)
for all x, and then use equation (10.44) to obtain a contradiction of the fact that u(x, t) is
normalizable.
Appendix A
Answers to Exercises
Exercise 1.1
(a) x = t 1
(b) x = 3/(11 t
3
), t >
3

11
(c) x = log(2 e
t
), t < log(2)
(d) y =
_

x
4
+ 1 x
2
(e) y = t/(t
2
+ 1)
(f) x = (e
t
+ 1 e)/t, t > 0
(g) x
2
+y
4
= 17
(h) xe
y
+ cos y = 1
(i) xy log x (y
2
/2) = 0, x > 0
Exercise 1.3
(a) (dv/dx) = a +bF(v)
(b) y = ((tan(2x))/8) (x/4) + (1/4), /4 < x < /4
Exercise 1.4
(a) (dz/dx) = (1 n)A(x)z + (1 n)B(x)
(b) y = 1/(2x x
2
), 0 < x < 2
Exercise 1.5
(a) y

= 2 is a sink, y

= 3 is a source; if y(0) = 0, then lim


t
y = 2 and lim
t
y = 3;
if y(0) = 4, then lim
t
y = and lim
t
y = 3.
2 3
y
(b) y

= 0 is a node, y

= 2 is a source; if y(0) = 1, then lim


t
y = 0 and lim
t
y = 2;
if y(0) = 1, then lim
t
y = and lim
t
y = 0.
293
294 APPENDIX A. ANSWERS TO EXERCISES
0 2
y
Exercise 1.7
3 2 1 1 2 3
x
3
2
1
1
2
3
y
3 2 1 1 2 3
x
3
2
1
1
2
3
y
(a) (b)
3 2 1 1 2 3
x
3
2
1
1
2
3
y
3 2 1 1 2 3
x
3
2
1
1
2
3
y
(c) (d)
Exercise 1.8
(a) y(1) 1.125
(b) y(1) 0.196
(c) y(1) 0.773
Exercise 1.9
(a) G(x, y) = y
2
and G
y
(x, y) = 2y are continuous everywhere, so there exists a unique
solution.
295
(b) G(t, y) = 4ty
3/4
and G
y
(t, y) = 3ty
1/4
are continuous in a neighborhood of t = 0, y = 1,
so there exists a unique solution.
(c) G
y
(t, y) = 3ty
1/4
is not continuous at t = 1, y = 0, so a unique solution is not
guaranteed.
(d) G(t, y) = 1/((y + 1)(t 2)) and G
y
(t, y) = 1/((y + 1)
2
(t 2)) are continuous in a
neighborhood of t = 0, y = 0, so there exists a unique solution.
Exercise 1.10 We may either choose G(x, y) =

y or G(x, y) =

y For either of these


choices individually, none of the conditions in the theorem are violated when y
0
= 1. However,
the non-uniqueness comes from the fact that there are two solutions to (y

)
2
y = 0 when
solving for y

.
Exercise 1.11
source
2 1 0 1 2
2
1
0
1
2

0.4 0.2 0.0 0.2 0.4


1.5
1.0
0.5
0.0
0.5
1.0
1.5

(a)
0
= 0 (b)
0
= 0, 1/4
Exercise 2.1
P(t) = 200000 exp((t/10) (6/(5)) sin((/6)t).
5 10 15 20
500000
1.010
6
1.510
6
2.010
6
2.510
6
Exercise 2.2
296 APPENDIX A. ANSWERS TO EXERCISES
(a)
roots FindRoot2300 1500 b 1 Expa a 1500 a
Expa, 2700 1500 b 1 Exp2 a a 1500 a Exp2 a, a, 1, b, 0.001
a 1.28093, b 0.000442686
(b) dP/dt = (1.28 0.000442P)P 100, P

= 2816.
Exercise 2.4 About 104 minutes.
Exercise 2.5 According to Newtons Law, the average temperature is the same regardless of
which strategy is used.
Exercise 2.6
(a) About 11.5 hours.
(b) About 0.72m
3
/min.
Exercise 2.8
soln ExpandDSolve12 i't 8 it 220 Cos100 Pi t, i0 0, it, t
Plotit . soln, t, 0, 0.2
it
55
2 t3
2 1 22500
2


55 Cos100 t
2 1 22500
2


4125 Sin100 t
1 22500
2

0.05 0.10 0.15 0.20


0.06
0.04
0.02
0.02
0.04
0.06
Exercise 2.10
297
Exercise 2.10
solnN2O5 ExpandDSolvec't 0.070 ct, c0 10, ct, t
solnNO2 ExpandDSolvec't 0.070 10 ct 2, c0 0, ct, t
solnO2 ExpandDSolvec't 0.070 10 2 ct, c0 0, ct, t
Plotct . solnN2O5, ct . solnNO2, ct . solnO2, t, 0, 60, PlotRange 0, 22
ct 10.
0.07 t

ct 20. 20.
0.035 t

ct 5. 5.
0.14 t

0 10 20 30 40 50 60
5
10
15
20
Exercise 2.12
(a) v

= g/c.
(b) x = x
0
(m/c
2
)(gcv
0
)+(m/c
2
)(gcv
0
)e
(c/m)t
+(g/c)t; the third term is the transient
term.
(c) v

=
_
g/c.
Exercise 2.13
(a) Let the constant of proportionality for the number of encounters be k. Then a given in-
dividual encounters kN others every day. The only situation in which such an encounter
will potentially increase the number of individuals who know about the information is
if an informed individual encounters an uninformed individual; the number of such en-
counters is kI(N I). If the probability of exchanging the information is p, we obtain
the dierential equation dI/dt = pkI(N I).
(b) If the relative rate of forgetting is f, then the dierential equation becomes dI/dt =
pkI(N I) fI. The equilibrium solutions are I

= 0 which is a source and I

=
N f/(pk) which is a sink.
Exercise 3.1
(a) x = (7/5)e
t
(2/5)e
6t
(b) x = (1/3)e
2t
+ (1/3)e
t
298 APPENDIX A. ANSWERS TO EXERCISES
(c) x = 5 + 5e
(t1)/5
(d) x = e
(2/3)t
+ (2/3)te
(2/3)t
(e) x = 4 cos(5t)
(f) x = 2e
(1/2)t
cos t + 4e
(1/2)t
sin t
(g) x = e
t
te
t
Exercise 3.3
(a) x
h
= c
1
e
2t
+c
2
te
2t
(b) x
h
= c
1
e
2t
cos t +c
2
e
2t
sin t
(c) x
h
= c
1
e
t
+c
2
te
t
+c
3
t
2
e
t
(d) x
h
= c
1
cos(2t) +c
2
t cos(2t) +c
3
sin(2t) +c
4
t sin(2t)
Exercise 3.5
(a) x
p
= (21/100) cos(2t) + (3/100) sin(2t)
(b) x
p
= 46t 5t
2
(1/3)t
3
(c) x
p
= (1/18)t
2
e
(2/3)t
(d) x
p
= (1/10)t cos(5t) + (1/5)t sin(5t)
Exercise 3.6
(a) x
p
= t(A
0
+A
1
t +A
2
t
2
+A
3
t
3
)e
t
+t
2
(B
0
+B
1
t)e
t
(b) x
p
= (A
0
+ A
1
t + A
2
t
2
) cos(2t) + (B
0
+ B
1
t + B
2
t
2
) sin(2t) + (C
0
+ C
1
t)e
t/2
cos(2t) +
(D
0
+D
1
t)e
t/2
sin(2t)
Exercise 3.7
(a) y = (29/8100)e
5x
(166/891)e
x/2
+ (201/1100)e
5x
+ (1/90)xe
5x
(b) y = (6/37) cos(3x) + (31/37)e
x
cos(3x) + (1/37) sin(3x) (34/111)e
x
sin(3x)
Exercise 3.8
(a) W(
1
,
2
,
3
,
4
)(0) = (
2

2
)
2
,= 0
(b) W(
1
,
2
,
3
)(0) = 2 ,= 0
Exercise 4.1
(a) x = c
1
e
(1/2+

1/20)t
+c
2
e
(1/2

1/20)t
(b) k = 1601/40 = 40.025
(c) Critical damping occurs if k = c
2
/40.
299
underdamping
overdamping
2 4 6 8 10
c
0.5
1.0
1.5
2.0
2.5
k
Exercise 4.4
(a)
1,2
= 1/(2RC) 1/(2RC)
_
1 4(R
2
C/L); the system is over-damped if L > 4R
2
C,
critically damped if L = 4R
2
C and under-damped if L < 4R
2
C.
(b) Over-damped: V (t) = c
1
e

1
t
+ c
2
e

2
t
, where
1
,
2
< 0 are as in part (a); the voltage
decreases exponentially without oscillations. Critically damped: V (t) = c
1
e
t/(2RC)
+
c
2
te
t/(2RC)
; the voltage decreases exponentially without oscillations; Under-damped:
V (t) = c
1
e
t/(2RC)
cos(t) + c
2
e
t/(2RC)
sin(t) where =
_
(4R
2
C L)/(4LR
2
C
2
);
the voltage decreases exponentially with circular eigenfrequency .
(c)
0
= 1/

LC, the same as for the series RLC circuit.


Exercise 5.1
(a) x(t) = c
1
e
3t
(1, 0) +c
2
e
2t
(2, 5).
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
(b) x(t) = c
1
e
4t
(1, 1) +c
2
e
t
(2, 1).
300 APPENDIX A. ANSWERS TO EXERCISES
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
(c) x(t) = c
1
(sin(2t), cos(2t)) +c
2
(cos(2t), sin(2t)).
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
(d) x(t) = c
1
e
t
(

2 sin(

2t), cos(

2t)) +c
2
e
t
(

2 cos(

2t), sin(

2t)).
2 1 1 2
x
2
1
1
2
y
301
Exercise 5.2
(a) T = 1, D = 6; the origin is a saddle.
(b) T = 5, D = 4, T
2
4D = 9; the origin is a sink.
(c) T = 0, D = 4; the origin is a center.
(d) T = 2, D = 3, T
2
4D = 8; the origin is a spiral sink.
Exercise 5.3
(a) x(t) = c
1
e
2t
(1, 1) +c
2
e
t
(0, 1).
(b) x(t) = c
1
e
2t
(cos(3t) sin(3t), 2 cos(3t)) +c
2
e
2t
(cos(3t) + sin(3t), 2 sin(3t)).
Exercise 5.4
(a)
3 2 1 1 2 3
x
3
2
1
1
2
3
y
(b)
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
302 APPENDIX A. ANSWERS TO EXERCISES
Exercise 5.5
(a) T = 3, D = 10, T
2
4D = 49 4. For < 10, the origin is a saddle; for
10 < < 12.25, the origin is a source; for > 12.25, the origin is a spiral source.
saddle
source sink source
spiral
source
spiral
sink
T
D
c
e
n
t
e
r
10
12.25
(b) T = , D = , T
2
4D = ( 4). For < 0, the origin is a saddle; for 0 < < 4, the
origin is a spiral source; for > 4, the origin is a source.
saddle
source sink source
spiral
source
spiral
sink
T
D
c
e
n
t
e
r
0
4
Exercise 5.11
(a) The general solution is x(t) = c
1
e
5t
, y(t) = c
2
e
4t
2c
3
e
t
, z(t) = c
2
e
4t
+ c
3
e
t
.
The stable eigenspace is spanned by the vectors (0, 1, 1) and (0, 2, 1); the unstable
eigenspace is the x-axis. If x
0
,= 0 is in the stable eigenspace, then [x(t)[ 0 as t
and [x(t)[ as t ; if x
0
,= 0 is in the unstable eigenspace, then [x(t)[
as t and [x(t)[ 0 as t ; for all other initial points x
0
, the solution
curves approach the (positive or negative) x-axis as t , and become unbounded and
approach the stable eigenspace as t .
(b) The general solution is x(t) = c
1
e
t/

2
cos(t/

2)+c
2
e
t/

2
sin(t/

2), y(t) = c
2
e
t/

2
cos(t/

2)
c
1
e
t/

2
sin(t/

2), z(t) = c
3
e
t
. The stable eigenspace is the z-axis; the unstable
eigenspace is the xy-plane. If x
0
,= 0 is in the stable eigenspace, then [x(t)[ 0 as
t and [x(t)[ as t ; if x
0
,= 0 is in the unstable eigenspace, then
[x(t)[ as t and [x(t)[ 0 as t ; for all other initial points x
0
, the solu-
tion curves spiral towards the xy-plane and become unbounded as t and approach
the (positive or negative) z-axis as t .
303
Exercise 6.1 The x-nullcline is the line y = 1. The y-nullcline is the parabola y = x
2
.
The equilibrium points are (1, 1) and (1, 1). The motion along the nullclines is indicated
in the following graph.
2 1 1 2
x
3
2
1
1
y
Exercise 6.2 All three equilibrium points are hyperbolic. (0, 0) is a source (degenerate case);
(1, 1) and (1, 1) are saddles.
Exercise 6.3
(a) The x-nullclines are the line x = 0 (the y-axis) and the line y = 1 (x/2). The y-
nullclines are the x-axis and the line y = 2x2. The equilibrium points are (0, 0), (2, 0),
(0, 2) and (6/5, 2/5).
(b) The matrix A
(0,0)
has eigenvalues
1,2
= 1, so the origin is a saddle; corresponding
eigenvectors are v
1
= (1, 0) and v
2
= (0, 1). The matrix A
(2,0)
has eigenvalues
1,2
= 1,
so (2, 0) is a saddle; corresponding eigenvectors are v
1
= (1, 1) and v
2
= (1, 0). The
matrix A
(0,2)
has eigenvalues
1
= 3 and
2
= 1, so (0, 2) is a source; corresponding
eigenvectors are v
1
= (1, 1) and v
2
= (0, 1). The matrix A
(6/5,2/5)
has the complex
conjugate eigenvalues
1,2
= (2

11 i)/5, the point (6/5, 2/5) is a spiral sink.


(c)
304 APPENDIX A. ANSWERS TO EXERCISES
3 2 1 1 2 3
x
3
2
1
1
2
3
y
Exercise 6.8
(a) The system has the origin as an equilibrium solution, and every point on the unit circle is
an equilibrium point. The origin is a source, the points on the unit circle are degenerate.
Note that the unit circle is not a limit cycle since it is not a solution curve.
1.5 1.0 0.5 0.5 1.0 1.5
x
1.5
1.0
0.5
0.5
1.0
1.5
y
Exercise 6.11
(a) The system has no critical points, so it cannot have a limit cycle (theorem 6.5.3).
(b) The origin is the only critical point, and is a saddle (theorem 6.5.3).
(c) The divergence is always positive (theorem 6.5.2 (a)).
(d) The divergence is (div F)(x, y) = 3x
2
y so it is not possible to have a limit cycle that
is contained in any of the four (open) quadrants. If x = 0, x = 2y
4
0, if y = 0,
y = x
2
0. Using arguments like in example 6.5.4 shows that the system cannot have
any limit cycles.
Exercise 6.12 The origin is the only equilibrium point for any R. At = 0, the origin
changes from being a spiral sink to a spiral source. Note that (div F)(x, y) = 2 4y
2
. If
305
< 0, the system has no limit cycles by theorem 6.5.2 (a). Using numerical evidence, we see
that for > 0, the system has a limit cycle. More precisely, this limit cycle is born from
the equilibrium point at the origin when = 0, and moves farther away from the origin as
increases.
Exercise 6.14
(a) (div F)(x, y) = 1/y; since the axes are invariant, potential limit cycles must be con-
tained in the quadrants; but the divergence does not change sign there.
(b) Since the axes are invariant, potential limit cycles must be contained in the quadrants.
If = 1/(xy), (div F)(x, y) = (e/x) (b/y). Since (div F)(x, y) = 0 on the line
y = (b/e)x and b/e > 0, there cannot be any limit cycles in the rst quadrant.
Exercise 6.15
1.0 0.5 0.5 1.0
x
2
1
1
2
y
Exercise 6.17
(a) H(x, y) = y
2
/2 y
3
/3 +x
2
/2, the critical points are (0, 0), which is a center; and (0, 1),
which is a saddle.
306 APPENDIX A. ANSWERS TO EXERCISES
3 2 1 1 2 3
x
3
2
1
1
2
3
y
(b) H(x, y) = x
2
+y
2
+x
2
y, the critical points are (0, 0), which is a center; and (

2, 1),
which are saddles.
3 2 1 1 2 3
x
3
2
1
1
2
3
y
Exercise 6.18 The criterion is that (f)/(x) = (g)/(y).
(a) Is Hamiltonian.
(b) Is not Hamiltonian.
Exercise 6.20 The critical points are (0, 0), which is a non-hyperbolic saddle; and (2
3/4
, 2
1/2
),
which are sources.
307
3 2 1 1 2 3
x
3
2
1
1
2
3
y
Exercise 7.1
(a) The equilibrium points are (0, 0) (source), (0, 2) (saddle), (3, 0) (saddle), (8/3, 2/3)
(sink). For any positive initial values, the populations will approach the stable equi-
librium point (8/3, 2/3) as t .
2 4 6 8
x
1
2
3
4
y
(b) The equilibrium points are (0, 0) (source), (0, 2.5) (sink), (6, 0) (sink), (4, 0.5) (saddle).
For positive initial values above the stable separatrix of the saddle, the rst species
(P) will become extinct, and the second species (Q) will approach an equilibrium of
Q

= 2.5; for positive initial values below the stable separatrix of the saddle, the second
species (Q) will become extinct, and the rst species (P) will approach an equilibrium
of P

= 6.
308 APPENDIX A. ANSWERS TO EXERCISES
2 4 6 8
x
1
2
3
4
y
Exercise 7.2
(a) The equilibrium points with non-negative coordinates are (0, 0) (source), (0, 2) (saddle),
(5, 0) (sink). For any positive initial values, the populations will approach the stable
equilibrium point (5, 0) as t . The second species (Q) will become extinct.
1 2 3 4 5 6 7
x
1
2
3
4
y
(b) The equilibrium points with non-negative coordinates are (0, 0) (source), (0, 6) (sink),
(4, 0) (saddle). For any positive initial values, the populations will approach the stable
equilibrium point (0, 6) as t . The rst species (P) will become extinct.
1 2 3 4 5 6
x
2
4
6
8
y
Exercise 7.3
309
(a) D
1
= 1 (/2), D
2
= 2, D
3
= 4 4. The equilibrium point (0, 0) is always a source,
(0, 4) is always a saddle. The linearization at the third equilibrium point (4, 0) has
eigenvalues
1
= 4 and
2
= 4 4; the linearization at the fourth equilibrium point
(4/(2 ), (8 8)/(2 )) has eigenvalues
1
= 4 and
2
= (4 4)/(2 ). A
bifurcation occurs when
0
= 1. If 0 < 1, the fourth equilibrium point is a sink and
all initial points with positive coordinates approach it as t . If > 1, the fourth
equilibrium point has left the rst quadrant through (4, 0) and becomes irrelevant. The
third equilibrium point (4, 0) becomes a sink and attracts all initial points with positive
coordinates.
(b) D
1
= 1 2, D
2
= 4, D
3
= (5 6)/2. The equilibrium point (0, 0) is always a
source, (0, 5/2) is always a sink. The linearization at the third equilibrium point (6, 0)
has eigenvalues
1
= 3 and
2
= 5 6; the linearization at the fourth equilibrium
point (4/(2 1), (5 6)/(2 4)) has determinant 2(5 6)/(2 1) and trace 3.
A bifurcation occurs when
0
= 5/6. If 0 < 5/6, the fourth equilibrium point is
outside the rst quadrant, and the third equilibrium point (6, 0) is a saddle. All initial
points with positive coordinates approach (0, 5/2) as t . If > 5/6, the fourth
equilibrium point has entered the rst quadrant through (6, 0) and is a saddle. Points
above the stable separatrix of the saddle approach (0, 5/2) and points below the stable
separatrix approach (6, 0) (which is now a sink) in the long run.
Exercise 7.4
(a) The implicit solution is P
2
Q
2
= Ce
Q
2
/4+P
.
2 4 6 8 10
P predators
1
2
3
4
5
6
Q prey
(c) The implicit solution is P
4
Q
2
= Ce
0.1Q+P
2
/2
; appropriate contours are e.g. C =
1, 10, 50, 100.
310 APPENDIX A. ANSWERS TO EXERCISES
1 2 3 4 5
P predators
20
40
60
80
100
Q prey
Exercise 7.5
(a) (0, 20) is a saddle, (0.4, 4) is a spiral sink.
0.2 0.4 0.6 0.8 1.0 1.2 1.4
P predators 0
2
4
6
8
10
Q prey
(b) (0, 10) is a saddle, (4.11, 8.22) is a sink.
2 4 6 8
P predators 0
2
4
6
8
10
12
14
Q prey
Exercise 7.7
(a)
311
2
0
2
4
x
2
0
2
y
0
1
2
z
0
5
x
5
0
y
0
2
4
6
8
z
5
0
5
x
5
0
5
y
0
5
10
15
z
5
0
5
10
x
5
0
5
y
0
5
10
15
20
z
(b) For c = 2, we have a limit cycle; for c = 3, this limit cycle seems to have doubled into
a limit cycle consisting of two loops; if c = 4, we have 4 loops; if c = 5 we appear to have
a very large number of loops, or perhaps a chaotic attractor as for the Lorenz system.
(c) The geometric structure persists under small perturbations; the limit cycles/attractors
are stable.
Exercise 8.1
(a) /(s
2

2
).
(c) (s )/((s )
2
+
2
).
(e) (s
2

2
)/(s
2
+
2
)
2
.
(g) ((s a)
2

2
)/((s a)
2
+
2
)
2
.
Exercise 8.2
(a) y = (3/34)e
3t
(3/34) cos(5t) + (5/34) sin(5t).
(c) y = ((1/7)e
2t
+ (1/7)e
(7/2)(t1)
)H(t 1).
(e) y = (1/36)e
5t
+ (35/36)e
t
(5/6)te
t
.
(g) y = (2+2tt
2
2 cos(t)2 sin(t))(H(t)H(t1))+(3 cos(t1)2 cos(t)2 sin(t))H(t
1).
Exercise 8.3
312 APPENDIX A. ANSWERS TO EXERCISES
(a) y = (1/(2
3
))

n=0
((x 2n) + 2ncos(x) sin(x)) (H(x2n) H(x2(n+1))).
2 4 6 8 10
x
0.2
0.2
0.4
y
(c) y = (sin(2x)/(2))

n=1
H(x n).
2 4 6 8 10
x
1.0
0.5
0.5
1.0
y
Exercise 8.4
10 20 30 40 50
t
100
100
200
300
I
Exercise 9.1
(a) y = x + 1.
(c) y = x + 1 +e
x
.
(e) y = 2e
x
2
/2
1.
(g) y = (e
x
+ cos x + sin x)/2.
(i) y = (1/16)e
2x
+ (1/16)e
2x
(1/4)x.
Exercise 9.2
(a) y x + (1/2)x
2
+ (1/2)x
3
+ (1/8)x
4
.
313
(c) y 1 (1/2)x
2
+ (1/3)x
3
+ (1/8)x
4
.
(e) y 1 +x + (1/6)x
3
+ (1/12)x
4
.
(g) y 1 (1/2)x
2
(1/24)x
4
(1/240)x
6
.
(i) y 1 +x x
2
(1/2)x
4
.
Exercise 9.4
If t = 0.1, y
k
= (1)
k
.
0.2 0.4 0.6 0.8 1.0
t
1.0
0.5
0.5
1.0
y
If t = 0.05, y
0
= 1, and y
k
= 0 for k = 1, 2, . . ..
0.2 0.4 0.6 0.8 1.0
t
0.2
0.4
0.6
0.8
1.0
y
If t = 0.02, y
0
= 1, y
1
= 0.6, y
2
= 0.36, y
3
= 0.216, . . ..
0.2 0.4 0.6 0.8 1.0
t
0.2
0.4
0.6
0.8
1.0
y
Exercise 9.7
(a) x
1
= 0, x
2
= 0.008 . . ., x
3
= 0.0387 . . ., x
4
= 0.1017 . . ..
(c) x
1
= 0.8317 . . ., x
2
= 0.6893 . . ., x
3
= 0.5883 . . ., x
4
= 0.5431 . . ..
314 APPENDIX A. ANSWERS TO EXERCISES
(e) x
1
= 0.0079 . . ., x
2
= 0.0396 . . ., x
3
= 0.1092 . . ., x
4
= 0.2269 . . ..
(g) x
1
= 1.0770 . . ., x
2
= 1.1625 . . ., x
3
= 1.2573 . . ., x
4
= 1.3622 . . ..
(i) x
1
= 2.44, x
2
= 2.96, x
3
= 3.56, x
4
= 4.24.
(k) x
1
= 1.1818, x
2
= 1.3781, x
3
= 1.5638, x
4
= 1.7233.
Exercise 9.8
(a) y = 1 +t.
(b) t
critical
= 2/ = 2/(100) = 0.02.
(c) If t = 0.1 and the initial condition is changed e.g. to x(0) = 0.99, then x
1
= 1.19,
x
2
= 0.39, x
3
= 8.59, x
4
= 64.21, x
5
= 591.99.
(d) If t = 0.1 and the initial condition is changed e.g. to x(0) = 0.99, then x
1
= 1.0990 . . .,
x
2
= 1.1999 . . ., x
3
= 1.2999 . . ., x
4
= 1.4000 . . ., x
5
= 1.5000 . . ..
Exercise 10.1
(a) u(x, t) = (1/2)(e
(x+t)
2
+e
(xt)
2
).
4 2 2 4
x
0.2
0.4
0.6
0.8
1.0
u
t3
t2
t1
t0
(c) u(x, t) = (1/2)((x + 2t)
2
/(1 + (x + 2t)
2
) + (x 2t)
2
/(1 + (x 2t)
2
)).
5 5
x
0.2
0.4
0.6
0.8
1.0
u
t3
t2
t1
t0
(e) u(x, t) = t + (1/2)((x + 2t)
2
/(1 + (x + 2t)
2
) + (x 2t)
2
/(1 + (x 2t)
2
)).
5 5
x
1
2
3
4
u
t3
t2
t1
t0
315
Exercise 10.3
(a) b
1
0.63662, b
2
0.31831, b
3
0.21221, b
4
0.15916, b
5
0.12732.
0.2 0.4 0.6 0.8 1.0
x
0.2
0.4
0.6
0.8
1.0
y
(c) b
1
0.81057, b
3
0.09006, b
5
0.03242, b
7
0.01654, b
9
0.01001.
0.2 0.4 0.6 0.8 1.0
x
0.2
0.4
0.6
0.8
1.0
y
Exercise 10.4
(a) u(x, t) 0.81 sin(x) cos(t) 0.09 sin(3x) cos(3t) + 0.03 sin(5x) cos(5t).
(c) u(x, t) 0.129 sin(x) cos(2t) 0.004 sin(3x) cos(6t) + 0.001 sin(5x) cos(10t).
316 APPENDIX A. ANSWERS TO EXERCISES
Exercise 10.8
(a) c
0
= 0.5, c
1
0.40529, c
3
0.04503, c
5
0.01621, c
7
0.00827.
0.2 0.4 0.6 0.8 1.0
x
0.2
0.4
0.6
0.8
1.0
y
(c) c
0
= 0.5, c
2
0.40529, c
6
0.04503, c
10
0.01621, c
14
0.00827.
0.2 0.4 0.6 0.8 1.0
x
0.2
0.4
0.6
0.8
1.0
y
Exercise 10.9
(a) u(x, t) 0.81e
(1/5)
2
t
sin(x) 0.09e
(9/5)
2
t
sin(3x) + 0.03e
5
2
t
sin(5x).
317
(c) u(x, t) 0.5 0.405e
(4/5)
2
t
cos(2t) 0.045e
(36/5)
2
t
cos(6t).
Exercise 10.10
(b) V (x) = (1/2)m
2
x
2
+/2.
(c) E(X) = 0, E(X
2
) = /(2m),
X
=
_
/(2m).
(d) E(P) = 0, E(P
2
) = m/2,
P
=
_
m/2.
(e)
X

P
= /2.
318 APPENDIX A. ANSWERS TO EXERCISES
Appendix B
Linear Algebra Prerequisites
B.1 Vectors, Matrices, and Linear Systems
A vector of dimension n is an ordered n-tupel of real or complex numbers. We write vectors either
in the (space-saving) form x = (x
1
, x
2
, . . . , x
n
) or as column vectors
x =
_
_
_
_
_
x
1
x
2
.
.
.
x
n
_
_
_
_
_
.
We will mostly work with real n-dimensional vectors; we denote the set of these vectors by R
n
.
The sum of two vectors is dened componentwise. Also, multiplication of a vector by a number
c is done componentwise. A vector v is called a linear combination of the vectors x
1
, x
2
, . . . , x
k
if
there exist numbers c
1
, c
2
, . . . , c
k
so that v = c
1
x
1
+c
2
x
2
+. . . +c
k
x
k
.
The dot product (or inner product) of two vectors x = (x
1
, x
2
, . . . , x
n
) and y = (y
1
, y
2
, . . . , y
n
)
in R
n
is dened as
x y = x
1
y
1
+x
2
y
2
+. . . +x
n
y
n
.
We say that two vectors are orthogonal if x y = 0. The length of the vector x is dened as
|x| =

x x.
An m n matrix is an array of numbers with m rows and n columns. We represent such a
matrix as
A =
_
_
_
_
_
a
1,1
a
1,2
. . . a
1,n
a
2,1
a
2,2
. . . a
2,n
.
.
.
.
.
.
.
.
.
a
m,1
a
m,2
. . . a
m,n
_
_
_
_
_
.
Thus, a
i,j
is the entry in the ith row and jth column of the matrix. The ith row vector is
a
i,.
= (a
i,1
, a
i,2
, . . . , a
i,n
) R
n
.
The jth column vector is
a
.,j
= (a
1,j
, a
2,j
, . . . , a
m,j
) R
m
.
319
320 APPENDIX B. LINEAR ALGEBRA PREREQUISITES
The product of the mn matrix A and the n-dimensional vector x is the m-dimensional vector
obtained by dot-multiplication of each row vector of A with x:
Ax =
_
_
_
_
_
a
1,1
x
1
+a
1,2
x
2
+. . . +a
1,n
x
n
a
2,1
x
1
+a
2,2
x
2
+. . . +a
2,n
x
n
.
.
.
a
m,1
x
1
+a
m,2
x
2
+. . . +a
m,n
x
n
_
_
_
_
_
.
We may multiply a km matrix A with an mn matrix B to obtain the kn matrix C = AB;
the entry in the ith row and jth column of C is the dot product of the ith row vector of A with
the jth column vector of B:
c
i,j
=
m

=1
a
i,
b
,j
.
Thus, we may identify a vector x R
n
with a n 1 matrix.
The transpose of the m n matrix A is the n m matrix A
T
obtained by interchanging the
row and column indices:
A
T
i,j
= A
j,i
.
In particular, the transpose of the column vector x = (x
1
, x
2
, . . . , x
n
) is the row vector x
T
=
_
x
1
x
2
. . . x
n
_
.
A system of m linear equations with the n unknowns x
1
, x
2
, . . . , x
n
is of the form
a
1,1
x
1
+a
1,2
x
2
+. . . +a
1,n
x
n
= b
1
(B.1)
a
2,1
x
1
+a
2,2
x
2
+. . . +a
2,n
x
n
= b
2
.
.
.
.
.
.
a
m,1
x
1
+a
m,2
x
2
+. . . +a
m,n
x
n
= b
m
.
This may be written more concisely in matrix-vector form Ax = b.
The n n matrix I with 1s on the diagonal (I
i,i
= 1) and 0s everywhere else is called the
n-dimensional identity matrix. Obviously, Ix = x. An n n matrix A is invertible if there exists
an n n matrix B so that AB = I and BA = I. In this case, B is called the inverse of A and is
denoted by A
1
. If m = n in (B.1) and A is invertible, then the solution is x = A
1
b.
An n n matrix A is called upper triangular if all entries below the diagonal are zero (i.e.
A
i,j
= 0 for i > j). An n n matrix A is called lower triangular if the transpose A
T
is upper
triangular.
B.2 Linear Independence and Determinants
A set a
1
, a
2
, . . . , a
n
of n vectors is called linearly independent if
c
1
a
1
+c
2
a
2
+. . . , c
n
a
n
= 0 c
1
= c
2
= . . . = c
n
= 0,
where 0 = (0, 0, . . . , 0) is the zero vector. In other words, if A is the matrix with a
1
, a
2
, . . . , a
n
as
column vectors and c = (c
1
, c
2
, . . . , c
n
), the system Ac = 0 has only the solution c = 0.
B.2. LINEAR INDEPENDENCE AND DETERMINANTS 321
This notion can be generalized to functions of, say, the real variable t. Thus, the set of functions
f
1
(t), f
2
(t), . . . , f
n
(t) is linearly independent if
(t, c
1
f
1
(t) +c
2
f
2
(t) +. . . , c
n
f
n
(t) = 0) c
1
= c
2
= . . . = c
n
= 0.
Let A be an n n matrix (i.e. a square matrix). The determinant of A can be dened using
the combinatorial denition
det A =

sgn()a
1,(1)
a
2,(2)
. . . a
n,(n)
, (B.2)
where the sum is taken over all permutations of the set 1, 2, . . . , n and sgn() is the sign of the
permutation ; i.e., it is (1) raised to the number of transpositions of the identity permutation
needed to obtain .
Example B.2.1. Let
A =
_
a b
c d
_
.
The permutations of the set 1, 2 are the identity (id : 1 1, 2 2) whose sign is (1)
0
= 1 and
( : 1 2, 2 1) which is a transposition of id and whose sign is (1)
1
= 1. Thus,
det
_
a b
c d
_
= (1)A
1,1
A
2,2
+ (1)A
1,2
A
2,1
= ad bc.
Example B.2.2. Let
A =
_
_
a b c
d e f
g h i
_
_
.
The permutations of the set 1, 2, 3 are:
the identity (id : 1 1, 2 2, 3 3) whose sign is (1)
0
= 1,
the transpositions (1 2, 2 1, 3 3), (1 3, 2 2, 3 1), and (1 1, 2 3, 3 2)
whose sign is (1)
1
= 1;
and the cycles (1 2, 2 3, 3 1) and (1 3, 2 1, 3 2) whose sign is (1)
2
= 1.
Thus,
det
_
_
a b c
d e f
g h i
_
_
= (1)A
1,1
A
2,2
A
3,3
+ (1)A
1,2
A
2,1
A
3,3
+ (1)A
1,3
A
2,2
A
3,1
+(1)A
1,1
A
2,3
A
3,2
+ (1)A
1,2
A
2,3
A
3,1
+ (1)A
1,3
A
2,1
A
3,2
= aei bdi ceg afh +bfg +cdh
= a(ei fh) b(di fg) +c(dh eg)
= a det
_
e f
h i
_
b det
_
d f
g i
_
+c det
_
d e
g h
_
,
which is the familiar expansion by minors.
322 APPENDIX B. LINEAR ALGEBRA PREREQUISITES
Example B.2.3. The determinant of the Vandermonde matrix
_
_
_
_
_
_
_
1 1 1

1

2

n

2
1

2
2

2
n
.
.
.
.
.
.
.
.
.

n1
1

n1
2

n1
n
_
_
_
_
_
_
_
.
is

1i<jn
(
j

i
). This can be seen from the combinatorial denition by noting that each term
in (B.2) will be a product of the distinct
i
s raised to the powers 0, 1, 2, . . . , n1. The sign of the
product can be seen to be equivalent to the sign of the permutation used.
Theorem B.2.1. The following are equivalent for an n n matrix A:
1. The system Ax = b has a unique solution;
2. the inverse A
1
of A exists;
3. the column vectors of A are linearly independent;
4. the row vectors of A are linearly independent;
5. det A ,= 0.
We also have the following properties of the determinant:
6. det I = 1.
7. det (AB) = (det A)(det B).
8. If A is upper or lower triangular, then the determinant is the product of the diagonal entries.
For a 2 2 matrix, there is an easily memorized formula for nding the inverse:
_
a b
c d
_
1
=
1
ad bc
_
d b
c a
_
=
_
d
adbc
b
adbc
c
adbc
a
adbc
_
. (B.3)
B.3 Eigenvalues and Eigenvectors
Let A be an nn matrix. A complex number is an eigenvalue of A if there exists a vector v ,= 0
so that Av = v. The vector v is called an eigenvector of A corresponding to the eigenvalue .
Note that if v is an eigenvector for , then so is any non-zero scalar multiple of v. Also, since v is
a non-zero solution to (A I)v = 0, we must have that is an eigenvalue of A if and only if it
satises the characteristic equation
det (AI) = 0. (B.4)
The expression on the left a polynomial of degree n in . It is called the characteristic polynomial
of the matrix A.
Theorem B.3.1. Let A be an n n matrix.
B.4. PROJECTIONS ONTO SUBSPACES AND LINEAR REGRESSION 323
1. If
det (AI) = c(
1
)(
2
) . . . (
n
)
(i.e.
1
,
2
, . . . ,
n
are the eigenvalues of A, enumerated with multiplicity), then:
The leading coecient c of the characteristic polynomial of A is (1)
n
and the next
coecient is (1)
n+1
tr(A), where tr(A) = a
1,1
+a
2,2
+. . . +a
n,n
is the trace of A.
The constant term of the characteristic polynomial is det A =
1

2
. . .
n
. In particular,
det A = 0 if and only if A has at least one zero eigenvalue.
2. If the eigenvalue has multiplicity k (algebraic multiplicity), then the number of linearly
independent eigenvectors corresponding to (the geometric multiplicity) is an integer between
1 and k.
3. If A has n distinct eigenvalues, then the set of corresponding eigenvectors is linearly inde-
pendent. In this case, if S is the matrix with the eigenvectors as column vectors, then A is
diagonalizable:
S
1
AS = D,
where D is the matrix with the respective eigenvalues on the diagonal, and zero entries ev-
erywhere else.
4. If A is upper or lower triangular, then the eigenvalues are simply the diagonal entries of A.
B.4 Projections onto Subspaces and Linear Regression
Suppose the matrix A has m linearly independent n-dimensional column vectors. In particular, A
is an n m matrix. The case m = n is uninteresting in what follows, so we will assume m < n.
Since the column vectors of A are linearly independent, it can be shown (e.g. [26]. p. 211) that the
mm matrix A
T
A is invertible. The projection of R
n
onto the subspace spanned by the column
vectors of A is given by the matrix
P = A
_
A
T
A
_
1
A
T
. (B.5)
Note that the subspace spanned by the column vectors of A is the set of vectors that can be obtained
by linear combinations of these column vectors. The vectors in this subspace can be written in the
form Ac, where c is an m-dimensional vector.
Theorem B.4.1. For A as above, and x R
n
:
1. Px is in the subspace spanned by A.
2. P
2
x = x; that is, P is a projection.
3. Let e = xPx be the error vector. Then, (Px) e = 0; that is, P is an orthogonal projection
onto the subspace spanned by A.
4. If y is in the subspace spanned by A, then |x y| |x Px|, with equality holding only if
y = Px.
324 APPENDIX B. LINEAR ALGEBRA PREREQUISITES
We may summarize the results in this theorem by stating that y = Px is the unique vector
in the subspace spanned by A that is closest to the given vector x. Another interpretation is the
following. Suppose Ax = b is a linear system, and b is not in the subspace spanned by A. That
means that the system has no solution. However, x =
_
A
T
A
_
1
Ab is a best solution in the
sense that

b = A x = Pb is in the subspace spanned by A, and the least-squares error
_
_
_b

b
_
_
_ is
minimal.
An application is given by least-squares linear regression. We illustrate this method by focusing
on simple linear regression; i.e. tting a line y = a
1
+a
2
x into data.
Let (x
1
, y
1
), (x
2
, y
2
), . . . , (x
n
, y
n
) be given data. We seek a best solution (a
1
, a
2
) to the linear
system
a
1
+a
2
x
1
= y
1
a
1
+a
2
x
2
= y
2
.
.
.
.
.
.
a
1
+a
2
x
n
= y
n
.
Rewriting this in matrix-vector form, we obtain Xa = y, where:
Xa =
_
_
_
_
_
1 x
1
1 x
2
.
.
.
.
.
.
1 x
n
_
_
_
_
_
_
a
1
a
2
_
=
_
_
_
_
_
y
1
y
2
.
.
.
y
n
_
_
_
_
_
= y.
Now,
a =
_
a
1
a
2
_
=
_
X
T
X
_
1
X
T
y (B.6)
is the best estimator for the parameters (a
1
, a
2
) in the sense that it minimizes the sum of squares
of the residuals e
i
= y
i
y = y
i
(a
1
+a
2
x
i
). Elementary matrix operations show that a
1
and a
2
can be expressed by the usual formulas for the coecients when using simple linear regression:
a
1
=
(

x
2
)(

y) (

x)(

xy)
n(

x
2
) (

x)
2
a
2
=
(

x)(

y) +n(

xy)
n(

x
2
) (

x)
2
.
Appendix C
Results from Calculus
C.1 The Second Derivative Test for Functions of Two Variables
Theorem C.1.1. Suppose z = f(x, y) has a critical point at (a, b), i.e. f
x
(a, b) = 0 and f
y
(a, b) =
0. Dene the discriminant at (a, b) as
D = (f
xx
(a, b))(f
yy
(a, b)) (f
xy
(a, b))
2
.
If D < 0, then f(x, y) has a saddle point at (a, b);
if D > 0 and f
xx
(a, b) > 0, then f(x, y) has a strict local minimum at (a, b);
if D > 0 and f
xx
(a, b) < 0, then f(x, y) has a strict local maximum at (a, b);
if D = 0, then the test is inconclusive.
C.2 Taylor Series for Selected Functions
1.
1
1 x
= 1 +x +x
2
+x
3
+. . . =

n=0
x
n
, for [x[ < 1
2. e
x
= 1 +x +
x
2
2!
+
x
3
3!
+. . . =

n=0
x
n
n!
, for x R
3. sin x = x
x
3
3!
+
x
5
5!

x
7
7!
+. . . =

n=0
(1)
n
x
2n+1
(2n + 1)!
, for x R
4. cos x = 1
x
2
2!
+
x
4
4!

x
6
6!
+. . . =

n=0
(1)
n
x
2n
(2n)!
, for x R
5. log x = (x 1)
(x 1)
2
2
+
(x 1)
3
3

(x 1)
4
4
+. . . =

n=1
(1)
n+1
(x 1)
n
n
, for 0 < x 2
325
326 APPENDIX C. RESULTS FROM CALCULUS
6. tan
1
x = x
x
3
3
+
x
5
5

x
7
7
+. . . =

n=0
(1)
n
x
2n+1
2n + 1
, for [x[ 1
Bibliography
[1] J. Borresen, S. Lynch, Further Investigation of Hysteresis in Chuas Circuit, Int. J. of Bifur-
cation and Chaos, Vol. 12, No. 1 (2002), 129-134.
[2] K. Billah, R. Scanlan, Resonance, Tacoma Narrows Bridge Failure, and Undergraduate Physics
Textbooks (1991), American Journal of Physics 59 (2): 118-124. doi:10.1119/1.16590.
[3] P. Blanchard, R. Devaney, G. Hall, Dierential Equations, 4th Edition, Brooks/Cole (2012).
[4] M. Boelkins, M. Potter, J. Goldberg, Dierential Equations with Linear Algebra, Oxford Uni-
versity Press (2009).
[5] S. Campbell, R. Haberman, Introduction to Dierential Equations with Dynamical Systems,
Princeton University Press (2008).
[6] B. Cipra, Lorenz System Oers Manifold Possibilities for Art, SIAM News 43 (2), March 2010.
[7] B. Cipra, Heavy Math Sheds Light on Weighty Issue, SIAM News 47 (7), September 2010.
[8] W. Derrick, S. Grossman, Elementary Dierential Equations with Applications, 2nd Edition,
Addison-Wesley (1981).
[9] R. Devaney, A First Course in Dynamical Systems, Perseus Books Publishing (1992).
[10] A. Gasull, R. Kooij, J. Torregrosa, Limit Cycles in the Holling-Tanner Model, Publicacions
Matem`atiques, Vol 41 (1997), 149-167.
[11] C. Garrett, Tidal resonance in the Bay of Fundy and Gulf of Maine, Nature 238(5365) (1972):
441-443.
[12] D. Griths, Introduction to Qunatum Mechanics, Prentice Hall (1995).
[13] M. Heath, Scientic Computing, Second Edition, McGraw-Hill (2002).
[14] J. Hutchinson, Reaction Rates, http://cnx.org/content/m12728/latest/.
[15] J. Kiusalaas, Numerical Methods in Engineering with Python, Cambridge University Press
(2005).
[16] G. Ledder, Dierential Equations: A Modeling Approach, First Edition, McGraw-Hill (2005).
327
328 BIBLIOGRAPHY
[17] E. Lorenz, Deterministic Nonperiodic Flow, J. of the Atmospheric Sciences, Vol. 20 (1963),
130-141.
[18] S. Lynch, Dynamical Systems Applications Using Mathematica, Birkhauser (2007).
[19] R. McOwen, Partial Dierential Equations, Prentice Hall (1996).
[20] E. Ott, Chaos in Dynamical Systems, Second Edition, Cambridge University Press (2002).
[21] R. Perez, A Brief but Historic Article of Siegel, Notices of the AMS, 58(4) April 2011: 558-566.
[22] L. Perko, Dierential Equations and Dynamical Systems, Springer-Verlag (1991).
[23] O.E. Rossler, An Equation for Continuous Chaos, Physics Letters, Vol. 57A, number 5 (1976),
397-398.
[24] W. Rudin, Real and Complex Analysis, McGraw-Hill (1987).
[25] G. Simmons, S. Krantz, Dierential Equations, McGraw-Hill (2007).
[26] G. Strang, Introduction to Linear Algebra, Fourth Edition, Wellesley-Cambridge Press (2009).
[27] P. Wellin, R. Gaylord, S. Kamin, An Introduction to Programming with Mathematica, Cam-
bridge University Press (2006).
[28] M. Weir, J.Hass, F.Giordano, Thomas Calculus: Early Transcendentals, Twelfth Edition,
Pearson Addison Wesley (2010).
Index
Coulombss Law, 107
Kirchhos Voltage Law, 107
accuracy
of a numerical method, 248
of Eulers Method, 250
Airys equation, 262
allowed energies, 286
asymptotically stable equilibrium point, 148
Backward Euler Method, 253
beats, 104
Bendixsons Criteria, 164
Bernoullis Equation, 45
bifurcation, 37, 134
pitchfork, 39
saddle-node, 38
tangent, 38
bifurcation diagram, 38, 134
boundary value conditions, 270
center eigenspace, 140
chaotic attractor, 195
characteristic equation, 66, 116
Chemical Law of Mass Action, 58
chemical reactions, 58
connecting separatrix, 152
continuous change of coordinates, 153
ContourPlot, 173
critical point, 147
dAlemberts formula, 268
decoupled system, 118
delta function, 231
dierential equation
autonomous rst order, 27
exact, 23
rst order, 13
general linear, 65
homogeneous, 18
linear rst order, 19
linear homogeneous, 21, 65
second order linear, 65
separable, 15
sti, 256
dierential operator, 19, 70
Dirac delta function, 231
DSolve, 41
Dung equation, 209
Dulacs Criteria, 176
eigenfrequency, 98
eigenfunctions, 98
eigenspace, 119
eigenvalue, 116
eigenvector, 116
electrical circuit
RL circuit, 56
equilibrium point, 147
equilibrium point analysis, 28
equilibrium solution, 27, 119
escape velocity, 95
Euler equations, 91
Eulers Method, 33, 245
existence and uniqueness of solutions, 36,
86
Expand, 88
expected value
of a random variable, 283
exponential growth/decay, 52
Faradays Law, 57
forcing function, 78
Fourier cosine series, 291
Fourier sine series, 272, 274
fractal dimension, 197
329
330 INDEX
general solution, 87
global error, 247
gradient system, 178
Greens Theorem, 163
ground state, 286
Hamiltonian function, 168, 284
harmonic oscillator, 98, 114
Hartmans theorem, 153
heat conductivity, 278
heat equation, 278
insulated endpoints, 291
Heaviside function, 220
Hermite polynomials, 262
Hookes Law, 96
Hopf bifurcation, 176
hyperbolic equilibrium point, 151
impulse forcing, 229
indicial equation, 92
innite square well, 285
initial value problem
rst order, 13
integrating factor
for linear equations, 19
to obtain an exact equation, 25
interaction orders, 183
kinetic energy, 169
Kirchhos Voltage Law, 57
Laplace transform, 212
Laplace transforms
of selected functions, 215
Lienard equations, 176
limit cycle, 160
linearization method, 155
linearized system, 149
local error, 248
logistic equation, 28
logistic growth, 52
Lorenz attractor, 199
Lorenz system, 199
mean
of a random variable, 283
method of undetermined coecients, 22,
78
models
chemical reactions, 58
Chuas circuit, 207
competing species, 179
convection, 199
current surge, 63
evaporation, 63
free fall with friction, 64
Holling-Tanner, 186
Lotka-Volterra, 183
mass-spring, 96
mixing, 62
population, 51
RL circuits, 56
RLC circuits, 107, 113
spread of information, 64
Moon and Holmes experiment, 209
natural logarithm
notation, 15
NDSolve, 42
Newtons Law of Heating/Cooling, 62
node, 29
nullcline, 157
Ohms Law, 56
partially decoupled system, 118
phase portrait, 29, 119
Picard Iteration, 48
PlotSlopeField, 42
Poincare map, 192
Poincare section, 191
Poincare-Bendixson Theorem, 166
polar coordinates
use in non-linear systems, 157
population model
logistic with harvesting, 55
United States, 53
potential energy, 114, 169
potential function, 23
power series, 239
principle of superposition, 82
INDEX 331
Rossler system, 207
radius of convergence, 239
reaction orders, 58
reduction of order, 92, 115
Resonance, 106
response diagram, 103
restoration of equilibrium, 95
restoring force, 95
robustness, 185
Runge-Kutta Method, 256
saddle, 121
Schrodingers wave equation, 281
time-independent, 281
semi-stable limit cycle, 160
sensitive dependence on initial conditions,
195
separation of variables
for the heat equation, 279
for the Schrodinger wave equation, 285
for the wave equation, 270
separatrix, 152
shifting theorem, 214
sink, 29, 121
slope eld, 30
solution
implicit, 17
source, 29, 121
stability
of a numerical method, 251
stable eigenspace, 137
stable equilibrium point, 148
stable limit cycle, 160
stable manifold, 151
standard deviation
of a random variable, 287
sti system, 173
stiness, 256
structural stability, 185
Tacoma Narrows Bridge, 106
terminal velocity, 64
trace-determinant plane, 133
tractrix, 14
Trapezoid Method, 255
traveling wave, 266
trigonometric polynomial, 272
TrigReduce, 88
uncertainty principle, 288
unstable eigenspace, 137
unstable equilibrium point, 148
unstable manifold, 152
van der Pol equation, 167
variance
of a random variable, 287
variation of parameters, 48, 93
wave equation, 266
Wronskian determinant, 87

Anda mungkin juga menyukai