Sunteți pe pagina 1din 331

Differential Equations and Applications Using Mathematica

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 Differential Equations 13


1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.2 Separable Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3 Homogeneous Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.4 Linear Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.5 Exact Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.6 Equilibrium Solutions and Phase Portraits . . . . . . . . . . . . . . . . . . . . . . . . 27
1.7 Slope Fields and Euler’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.8 Existence and Uniqueness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
1.9 Bifurcations of Autonomous First-Order Differential Equations . . . . . . . . . . . . 37
1.10 Mathematica Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

2 Applications of First-Order Differential 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 Differential Equations 65


3.1 Introduction to Homogeneous Second-Order Linear Equations . . . . . . . . . . . . . 65
3.2 Homogeneous Second-Order Linear Equations with Constant Coefficients . . . . . . 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 Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3.7 Higher-Order Linear Equations with Constant Coefficients . . . . . . . . . . . . . . . 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 Hartman’s 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 Differential 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 Differential 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 Differential Equations 265


10.1 D’Alembert’s 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 Schrödinger 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


Differential equations are of central importance in modeling problems in engineering, the natural
sciences and the social sciences. The virtue of differential 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 difference 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 difference equation (2) becomes

A(t + ∆t) − A(t) = 0.06∆tA(t), (3)

where 0.06∆t 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)


= 0.06A(t),
∆t
and letting ∆t → 0 yields the differential equation
dA
= 0.06A(t). (4)
dt
The parameter r = 0.06 can now be interpreted as the instantaneous (or continuous) rate of
compounding. The beauty of the differential equation model is that it is rather flexible 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 differential equation is obtained
from (4) by subtracting this additional rate of change from the right-hand side:
dA
= 0.06A(t) − 100. (5)
dt
This text introduces the reader to most standard approaches to analyzing and solving differential
equations. In our example, solving the differential equation means we seek functions A(t) that
satisfy the given differential equations (4) or (5). For equation (4), it can be checked that A(t) =
A0 e0.06t is a solution; A0 is a parameter and can be interpreted as the amount of money in the
account at time t0 = 0.
Chapter 1 presents standard methods of solving first-order differential equations and introduces
the concept of equilibrium solutions, numerical methods of solving differential equations, existence
and uniqueness results, and bifurcations of first-order equations. Chapter 2 covers applications of
first-order differential equations.
Chapter 3 deals with second-order and higher-order linear differential 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 differential equations, namely power series methods
and numerical methods.
Chapter 10 offers a brief introduction to partial differential equations. Some methods of solving
partial differential equations are presented by analyzing the wave equation and the heat equation.
The chapter also discusses Schrödinger’s wave equation.
Overall, this book emphasizes qualitative (geometric) methods over symbolic or numerical ways
of solving differential 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 definition-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 differential 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 floating point
arithmetic with floating point numbers.
H* Exact Arithmetic *L
7 * 5 ^ 14  2 ^ 10
42 724 609 375
1024

H* Floating Point Arithmetic -- at least one number is a floating-point number *L


7.0 * 5 ^ 14  2 ^ 10

4.17233 ´ 107

H* Convert the output in line 1 to a floating-point number *L


N@Out@1DD

4.17233 ´ 107

H* Use Postfix version of the N@D command *L


Out@1D  N

4.17233 ´ 107

Calculus and Functions


H* Take the derivative of the function of x *L
D@3 x ^ 2 - 5 x + 1, xD
-5 + 6 x

H* Define the function f@xD, and take the derivative *L


f@x_D := 3 x ^ 2 - 5 x + 1;
D@f@xD, xD
-5 + 6 x

H* Take the second partial derivative with


respect to x and the first partial with respect to y *L
D@x ^ 3 y + x ^ 2 y ^ 2, 8x, 2<, 8y, 1<D
6x+4y
10 CHAPTER 0. INTRODUCTION

H* Integrate the function f@xD *L


Integrate@f@xD, xD

5 x2
x- + x3
2

H* Compute the definite integral *L


Integrate@f@xD, 8x, 0, 3<D
15
2

H* Perform numerical integration *L


NIntegrate@Exp@- t ^ 2D, 8t, 0, 10<D
0.886227

Plotting Graphs

H* Plot the graph of the function f@xD *L


Plot@f@xD, 8x, - 2, 3<D

20

15

10

-2 -1 1 2 3
0.2. INTRODUCTION TO MATHEMATICA 11

H* Plot a parametrized curve *L


ParametricPlot@8t * Cos@tD, t * Sin@tD<, 8t, 0, 2 * Pi<D

-2 2 4 6

-1

-2

-3

-4

H* Plot a curve given implicitly *L


ContourPlot@x ^ 2 - y ^ 2 Š 0.1, 8x, - 2, 2<, 8y, - 2, 2<D
2

-1

-2
-2 -1 0 1 2

Solving Equations

H* Solve an equation symbolically*L


Solve@x ^ 2 - 12 x + 11 Š 0, xD
88x ® 1<, 8x ® 11<<
12 CHAPTER 0. INTRODUCTION

H* Solve an equation numerically*L


solution = NSolve@x ^ 4 - x ^ 3 Š 2, xD
88x ® - 1.<, 8x ® 0.228155- 1.11514 ä<, 8x ® 0.228155+ 1.11514 ä<, 8x ® 1.54369<<

H* Retrieve solution of previous equation *L


x . solution
8- 1., 0.228155- 1.11514 ä, 0.228155+ 1.11514 ä, 1.54369<

H* Retrieve fourth solution of previous equation *L


x . solution@@4DD
1.54369

H* Quit the kernel *L


Quit@D
Chapter 1

First-Order Differential Equations

1.1 Introduction
A first-order differential equation is an equation of the form

F x, y, y 0 = 0,

(1.1)

where at least y 0 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 0 (x)) = 0 for all x in some open interval I. In particular, we require
the solution function to be differentiable, and hence continuous on I.
We will usually deal with differential equations where (1.1) is solvable for y 0 ; these can be
written in the form
y 0 = G (x, y) . (1.2)
An initial value problem for a first-order differential equation is a consists of the differential
equation together with the specification of a value of the solution. That is, initial value problems
are of the general form
F x, y, y 0 = 0, y(x0 ) = y0 .

(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 ) = 0,
x0 is in the domain of f (x), and f (x0 ) = y0 .
Example 1.1.1. The differential equation (y 0 )2 − y = 0 has the solution y = (1/4)(x2 + 2x + 1), since
y 0 = (1/2)(x + 1) and
 2  
0 2 1 1 2 1 2  1 2 
(y ) − y = (x + 1) − (x + 2x + 1) = x + 2x + 1 − x + 2x + 1 = 0.
2 4 4 4
This solution is defined for all real numbers: I = R. More generally, we can check that y =
(1/4)(x2 + 2xC + C 2 ) is a solution for any C ∈ R. For the initial value problem

(y 0 )2 − y = 0, y(0) = 1, (1.4)

we can find the corresponding value of C by solving y(0) = 1 for C:

(1/4)(02 + 2(0)C + C 2 ) = 1 gives C = ±2.

Thus, y = (1/4)(x2 + 4x + 4) and y = (1/4)(x2 − 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 differential 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 0 (x)(t − x).

The tangent line intersects the y-axis when t = 0, that is at the point (0, f (x) + f 0 (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 0 (x)(−x))

Figure 1.1: The curve in example 1.1.2.

2.0

1.5

1.0
len
gth
=1

0.5

0.5 1.0 1.5 2.0

is always 1:
q
(x − 0)2 + (f (x) − (f (x) + f 0 (x)(−x)))2 = x2 + x2 (f 0 (x))2 .
p
1=

This means x2 (1 + (f 0 (x))2 ) = 1, or


r
1 − x2
f 0 (x) = − .
x2
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
r
1 − x2
f 0 (x) = − , f (1) = 0.
x2
1.2. SEPARABLE DIFFERENTIAL EQUATIONS 15

In this case, the right-hand side of the differential equation does not depend on y, which means
that to solve the initial value problem, we need to find the integral
ˆ xr ˆ 1r
1 − t2 1 − t2
f (x) = − 2
dt = dt
1 t x t2
for 0 < x ≤ 1. Using e.g. the trigonometric substitution t = sin θ gives
 p  p
f (x) = log 1 + 1 − x2 − log x − 1 − x2 .

(We use log to denote the natural logarithm .)


In sections 1.2, 1.3, 1.4, 1.5, we present various methods of solving first-order differential equa-
tions. It should be pointed out, however, that for a “randomly selected” differential 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 find the
solution. This can be seen from the fact that solving a differential equation is at least as “hard” as
finding the antiderivative of a function (consider simple differential equations of the form y 0 = 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 first-order differential equations (i.e. differential equations of the form y 0 = f (y)). This
section is probably the most important section in this chapter. Section 1.7 introduces a simple
numerical method for solving first-order differential equations, namely Euler’s 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 differential equations depends on
the parameter.

1.2 Separable Differential Equations


A first-order differential equation is separable if it can be written in the form

y 0 = g(x)h(y). (1.5)

Separable differential equations can be solved in the following manner. If we interpret the derivative
y 0 = dy/dx as a quotient and separate variables, then
dy
= g(x)h(y)
dx
becomes
dy
= g(x) dx. (1.6)
h(y)
Formally integrating both sides gives
ˆ ˆ
dy
= g(x) dx.
h(y)
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 differentials dy and dx. While it is sometimes convenient to use the
formalism provided by differentials1 , we try to avoid their use and provide more rigorous proofs of
corresponding results. Our first 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 differential equation; suppose H 0 (y) =
1/h(y) and H(y) is invertible; and suppose G0 (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 0 (x) = g(x)h(f (x)). Observe that
H(f (x)) = G(x) + C. When differentiating both sides of this equation and applying the chain rule,
we obtain
H 0 (f (x)) · f 0 (x) = G0 (x).
This is equivalent to 1/h(f (x)) · f 0 (x) = g(x) or f 0 (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 + x2 )(dy/dx) − 1 = 0, y(0) = 0. Solving the differential equation for dy/dx gives dy/dx =
1/(1 + x2 ). 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
= dx,
y−1
which results in log |y −1| = x+C (recall that log denotes the natural logarithm). This means
that y = ±ex+C + 1. Observing that ±ex+C = ex · ±eC , we may re-label the constant ±eC
as C. We obtain the solution y = Cex + 1, where C ∈ R. (Note that technically C 6= 0, since
eC 6= 0; however, if C = 0, the function y = 1 is also a solution to the differential 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 − ex , x ∈ R.

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


ˆ ˆ
dy
= sin x dx.
y

This means log |y| = − cos x + C, or y = Ce− cos x (absorbing the constant ±eC 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 = e1−cos x , x ∈ R.
1
The philosopher George Berkeley (1685-1753) called them “ghosts of departed quantities”.
1.2. SEPARABLE DIFFERENTIAL EQUATIONS 17

(d) y 0 = −x/y, y(0) = r, r ≥ 0. Separating variables gives y dy = −x dx, or


ˆ ˆ
y dy = −x dx.

This means y 2 /2 = −x2 /2 + C, or x2 + y 2 = C (absorbing the constant 2C into C). The


initial condition y(0) = r gives C = r2 . The solution curves are the circles x2 + y 2 = r2 .

(e)
dy
= y(1 − y), y(0) = y0 . (1.7)
dt
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 1 1 y
= − dy = log + C.
y(1 − y) y y−1 y − 1

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) = Cet , which means
y = Cet (y −1) or y −Cet y = −Cet . Solving for y gives y = −Cet /(1−Cet ) = Cet /(Cet −1) =
1/(1 − Ce−t ) (absorbing 1/C into C). If y(0) = y0 , y0 = 1/(1 − C), or C = (y0 − 1)/y0 . This
tells us that the solution to the initial value problem (1.7) is
y0
y= . (1.9)
y0 − (y0 − 1)e−t

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 x2 + y 2 = r2 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 y0 = 0, then y = 0 for all t; if y0 = 1, then y = 1 for all t. That is, we can think of the
solutions with initial conditions y0 = 0 or y0 = 1 as stationary solutions.

(b) If y0 > 0, then y → 1 as t → ∞; if y0 < 1, then y → 0 as t → −∞. In words: Solutions with


an initial condition of y0 > 0 approach the line y = 1 going forward; solutions that start with
y0 < 1 approach the line y = 0 going backward.

(c) Some solutions (namely those where y0 > 1 or y0 < 0) have vertical asymptotes. If we
interpret the variable t as time (as we frequently will), we can say that these solutions approach
infinity in finite time.

We will see in section 1.6 how to obtain results like the ones in (a) and (b) without having to solve
the differential 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

-1

-2

1.3 Homogeneous Differential Equations


A homogeneous differential equation is of the form
dy y
=F . (1.10)
dx x
This means, the rate with which the function y changes depends only on the ratio y/x. Homoge-
neous differential 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
dv
v+x = F (v) ,
dx
or
dv F (v) − v
= , (1.11)
dx x
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 differential equation to the form
(1.11), we obtain
dv (1 + v) − v 1
= = .
dx x x
Integrating both sides gives v = log |x| + C. Re-substitution of v = y/x gives y = x log |x| + Cx.
The initial condition y(1) = 0 implies that C = 0. Clearly, y = x log |x| is not defined when x = 0;
this leaves us with two choices for the domain of definition of the solution: {x ∈ R : x > 0} or
{x ∈ R : x < 0}. Since x0 = 1 is in the first set, the solution to the initial value problem is
y = x log x, x > 0.
1.4. LINEAR DIFFERENTIAL EQUATIONS 19

Example 1.3.2. Solve the differential equation dy/dx = (x2 + y 2 )/(xy). Note that (x2 + 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 (1/v) + v − v 1
= = .
dx x vx
Separating variables leads to v 2 /2 = log |x| + C. Re-substitution of v = y/x gives y 2 = 2x2 log |x| +
Cx2 (we absorbed the constant 2C into the new constant p C). Given an initial condition with
y(x0 ) > 0, the explicit
p solution would be of the form y = 2x2 log |x| + Cx2 . If y(x0 ) < 0, we
2
would have y = − 2x log |x| + Cx . 2

Substitution methods are not limited to homogeneous differential equations. Exercises 1.3 and
1.4 present other situations in with a substitution makes a differential equation integrable.

1.4 Linear Differential Equations


First-order linear differential equations are of the form
dy
+ p(x)y = q(x). (1.12)
dx
The origin of this name can be seen as follows. If the right-hand side of this equation is represented
by the differential operator
L[y] = y 0 + p(x)y,
then this operator is linear in y:

L[ry1 + sy2 ] = rL[y1 ] + sL[y2 ],

where y1 , y2 are functions of x, and r, s ∈ R.


First-order linear differential 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
dy
r(x) + r(x)p(x)y = r(x)q(x). (1.13)
dx
If the left side is to be obtained by differentiating r(x)y, it will be of the form r(x)(dy/dx)+(dr/dx)y.
Comparing this to the left side of (1.13) yields the differential equation
dr
= r(x)p(x),
dx
which is separable. Its solution is obtained by separation of variables as follows. Since
ˆ ˆ
dr
= p(x) dx,
r
´
it follows that log |r| = p(x) dx. This means an integrating factor is r(x) = eP (x) , where P (x) is
an antiderivative of p(x). Thus, the equation (1.13) becomes
d  P (x) 
e y = eP (x) q(x).
dx
20 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

Integrating both sides gives ˆ


P (x)
e y= eP (x) q(x) dx,
or ˆ 
−P (x) P (x)
y=e e q(x) dx . (1.14)

The following theorem summarizes how to solve linear differential equations.

Theorem 1.4.1. Suppose dy/dx + p(x)y = q(x) is a linear differential equation and suppose
P 0 (x) = p(x). Define r(x) = eP (x) . Suppose further that G0 (x) = r(x)q(x). Then for any real
number C the function
G(x) + C
f (x) =
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 differentiating
both sides of this equation and applying the product rule and the fact that G0 (x) = r(x)q(x), it
follows that r(x)f 0 (x) + r0 (x)f (x) = r(x)q(x). Now, r0 (x) = eP (x) P 0 (x) = r(x)p(x), so we obtain
r(x)f 0 (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 0 (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 differential 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) = ex . Since
q(x) = x, ˆ ˆ ˆ
r(x)q(x) dx = xe dx = xe − ex dx = xex − ex + C,
x x

using integration by parts. So we can choose G(x) = xex − ex . According to theorem 1.4.1,
or using equation (1.14),
xex − ex + C
y= = x − 1 + Ce−x
ex
is a solution to the differential 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 = 2x3 , y(1) = 0. Rewriting the differential equation as (dy/dx) − (y/x) = 2x2
allows us to identify p(x) = −1/x and q(x) = 2x2 . Since x0 = 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 = elog(1/x) = 1/x.
Since q(x) = 2x , r(x)q(x) dx = 2x dx = x2 + C and we may choose G(x) = x2 . Using
2

theorem 1.4.1,
x2 + C
y= = x3 + Cx
1/x
is a solution to the differential equation. The initial condition y(1) = 0 gives 0 = 1 + C, so
C = −1. We observe that y = x3 − x is a solution to the initial value problem for all x ∈ R
(not just for x > 0), since x(dy/dx) − y = x(3x2 − 1) − (x3 − x) = 2x3 for any real number x.
1.4. LINEAR DIFFERENTIAL EQUATIONS 21

Structure of the Solution Space


Definition 1.4.1. A first-order linear differential equation of the form
dy
+ p(x)y = q(x)
dx
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 different 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 affine space.
Theorem 1.4.2. (a) If y1 and y2 are solutions to the homogeneous equation dy/dx + p(x)y = 0,
then so is any linear combination yh = ry1 + sy2 , r, s ∈ R.

(b) If yp is a solution to the non-homogeneous equation dy/dx + p(x)y = q(x) and yh is solution
to the corresponding homogeneous equation dy/dx + p(x)y = 0, then yp + yh is also a solution
to dy/dx + p(x)y = q(x).
Proof. Suppose y1 , y2 both satisfy dy/dx + p(x)y = 0, and yh = ry1 + sy2 . Then,
dyh dy1 dy2
+ p(x)yh = r +s + r(p(x)y1 ) + s(p(x)y2 )
dx dx
 dx   
dy1 dy2
= r + p(x)y1 + s + p(x)y2
dx dx
= r(0) + s(0) = 0.

This proves part (a). To see part (b), observe that since dyh /dx+p(x)yh = 0 and dyp /dx+p(x)yp =
q(x),
d(yp + yh ) dyp dyh
+ p(x)(yp + yh ) = + p(x)yp + + p(x)yh = q(x) + 0 = q(x).
dx dx dx

An application of theorem 1.4.2 is given in the following.

Linear Differential Equations with Constant Coefficients


A first-order linear differential equation of the form (1.12) has constant coefficients if the coefficient
function p(x) is constant. Consequently, these equations are of the form
dy
+ ay = q(x). (1.15)
dx
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 eax q(x) dx . (1.16)
22 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

In the homogeneous case, we obtain yh = Ce−ax , C ∈ R. Non-homogeneous linear differential equa-


tions with constant coefficients may now be solved using the method of undetermined coefficients,
as explained in the following example.
Example 1.4.2. Find the solution to each initial value problem.

(a) (dy/dx) + 2y = 3x2 − 2x + 5, y(0) = 3. Here a´= 2, and q(x) = 3x2 − 2x + 5. When using
(1.16), we would need to evaluate the integral e2x (3x2 − 2x + 5) dx. An alternative is to
observe that if (dy/dx) + 2y is to equal the second order polynomial 3x2 − 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 yp = A2 x2 + A1 x + A0 , where A0 , A1 , A2 are coefficients that we need to determine.
Then,

dyp
+ 2yp = (2A2 x + A1 ) + 2(A2 x2 + A1 x + A0 )
dx
= 2A2 x2 + (2A2 + 2A1 )x + (A1 + 2A0 ).

Comparing this to the right-hand side of the differential equation leads to the equations
2A2 = 3, 2A2 + 2A1 = −2, and A1 + 2A0 = 5. Successively solving this linear system gives
A2 = 3/2, A1 = −5/2, A0 = 15/4. Thus, yp = (3/2)x2 − (5/2)x + (15/4) is a solution
to the differential 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 yh = Ce−2x , so
yp +yh = (3/2)x2 −(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)02 − (5/2)0 + (15/4) + Ce−2(0) = (15/4) + C = 3
or C = −3/4. Thus, y = (3/2)x2 − (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 yp = A cos(3x) +
B sin(3x), since derivatives linear combinations of cos(3x) and sin(3x) are again expressed by
such a linear combination. Then the differential equation gives

dyp
− yp = (−3A sin(3x) + 3B cos(3x)) − (A cos(3x) + B sin(3x))
dx
= (3B − A) cos(3x) − (3A + B) sin(3x).

Writing the right-hand side of the differential equation in the form (0) cos(3x) + (2) sin(3x)
and comparing coefficients leads to the system 3B − A = 0, 3A + B = −2. Solving this gives
A = −3/5. B = −1/5, so yp = −(3/5) cos(3x) − (1/5) sin(3x) is a solution to the differential
equation. The solution to the homogeneous equation (dy/dx) − y = 0 is yh = Cex , so we
consider solutions of the form yp + yh = −(3/5) cos(3x) − (1/5) sin(3x) + Cex . 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)ex
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(x0 ) = y0 using
the method of undetermined coefficients as in example 1.4.2 leads to the following steps:

1. Identify a trial solution yp and determine any unknown coefficients in the trial solution by
using the differential equation.
1.5. EXACT DIFFERENTIAL EQUATIONS 23

2. Add the solution to the homogeneous equation (dy/dx) + ax = 0, i.e. yh = Ce−ax to yp to


obtain y = yp + yh .

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
coefficients will be revisited in section 3.6 in more detail in the context of second-order linear
differential equations with constant coefficients.

1.5 Exact Differential Equations


We consider first-order differential 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 differential equation of
the form
dy M (x, y)
=− ,
dx 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 differential equation of
the form
dx N (x, y)
=− ,
dy 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

∂ ∂
F (x, y) = M (x, y), F (x, y) = N (x, y). (1.18)
∂x ∂y

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
   
∂ dx ∂ dy
F (x(t), y(t)) + F (x(t), y(t)) = 0.
∂x dt ∂y dt

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 field 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 satisfies the conditions in (1.18), then the differential equation (1.17) is said to be exact.
24 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

The next theorem states necessary and sufficient conditions for a differential 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 first-order partial derivatives are
defined and continuous on some open and simply connected subset U of R2 . Then the differential
equation M (x, y) dx + N (x, y) dy = 0 is exact if and only if

∂ ∂
M (x, y) = N (x, y). (1.19)
∂y ∂x

Remark 1.5.1. We are interested in finding the potential function. One method to accomplish this
is to first integrate M (x, y) with respect to x:
ˆ x
F (x, y) = M (ξ, y) dξ + g0 (y). (1.20)
x0

The function g0 (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,
ˆ x

F (x, y) = My (ξ, y) dξ + g00 (y) (1.21)
∂y x0
ˆ x
= Nx (ξ, y) dξ + g00 (y)
x0
= N (x, y) − N (x0 , y) + g00 (y),

where we used that My = Nx and again the Fundamental Theorem of Calculus. Since we require
(∂/∂y)F (x, y) = N (x, y) and also F (x0 , y0 ) = C0 , (1.20) and (1.21) imply that

g00 (y) = N (x0 , y), g0 (y0 ) = C0 .

Thus, ˆ y
g0 (y) = C0 + N (x0 , η) dη
y0

and using (1.20), ˆ ˆ


y x
F (x, y) = C0 + N (x0 , η) dη + M (ξ, y) dξ. (1.22)
y0 x0

In effect, we compute the line integral along the straight-line path from (x0 , y0 ) to (x0 , y) and then
to (x, y). More generally, we can use any curve from (x0 , y0 ) 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) 2x dx + 3y 2 dy = 0, y(0) = 1. The differential equation is exact since (∂/∂y)2x = 0 =


(∂/∂x)3y 2 . It can be solved by separating variables and integrating: 3y 2 dy = −2x dx yields
y 3 = −x2 + C, or x2 + y 3 = C. The initial condition gives 02 + 13 = C, or C = 1. The
1.5. EXACT DIFFERENTIAL EQUATIONS 25

(implicit) solution is x2 + y 3 = 1, which may be solved for y to obtain y = 3
1 − x2 , x ∈ R.
Alternatively, we may find the potential function using equation (1.20):
ˆ x
F (x, y) = 2ξ dξ + g0 (y) = x2 + g0 (y).
0

Since (∂/∂y)F (x, y) = g00 (y) must equal 3y 2 , we obtain g0 (y) = y 3 + C, thus F (x, y) = x2 + y 3
as above.

(b) (3x2 −9y) dx+(3y 2 −9x) dy = 0, y(0) = 0. The differential equation is exact since (∂/∂y)(3x2 −
9y) = −9 = (∂/∂x)(3y 2 − 9x). Equation (1.20) gives
ˆ x
F (x, y) = 3ξ 2 − 9y dξ + g0 (y)
0
 ξ=x
= ξ 3 − 9ξy ξ=0 + g0 (y)
= x3 − 9xy + g0 (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 g00 (y) − 9x = 3y 2 − 9x, or g00 (y) = 3y 2 . This means that we may
choose g0 (y) = y 3 , and consequently F (x, y) = x3 + y 3 − 9xy. The general solution curves are
x3 + y 3 − 9xy = C. Now y(0) = 0 implies C = 0, so the solution to the initial value problem
is given by the curve x3 + 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 (x0 , y0 ) = (0, 0) to (x, y). Then, dx = xdt, dy = ydt, and
ˆ 1
F (x, y) = (3(tx)2 − 9(ty))x + (3(ty)2 − 9(tx))y dt
0
ˆ 1 ˆ 1
= (x3 + y 3 ) 3t2 dt − 9xy 2t dt
0 0
= x3 + y 3 − 9xy.

Integrating Factor for Inexact Equations


What can be done if the differential equation is not exact, that is if My 6= Nx ? 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
∂ ∂
(r(x, y)M (x, y)) = (r(x, y)N (x, y)) . (1.24)
∂y ∂x
This leads to a partial differential 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 (3x2 − 9y) dx + (3y 2 − 9x) dy = 0, y(0) = 0.

-2

-2 0 2 4

We observe that if r(x, y) = r(x), then


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

(r(x)N (x, y)) = r0 (x)N (x, y) + r(x)Nx (x, y).
∂x
Equation (1.24) becomes r(x)My (x, y) = r0 (x)N (x, y)+r(x)Nx (x, y), or r0 (x)N (x, y) = r(x)(My (x, y)−
Nx (x, y)), or:
r0 (x) My (x, y) − Nx (x, y)
= .
r(x) N (x, y)
In other words, if (M
´ y
(x, y) − Nx (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 (My (x, y)−Nx (x, y))/N (x, y) is a function of x only, and G(x) satisfies G0 (x) = (My (x, y)−
Nx (x, y))/N (x, y), then r(x) = eG(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 (Nx (x, y)−My (x, y))/M (x, y) is a function of y only, and H(y) satisfies H 0 (y) = (Nx (x, y)−
My (x, y))/M (x, y), then r(y) = eH(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 differential equation.


1.6. EQUILIBRIUM SOLUTIONS AND PHASE PORTRAITS 27

(a) (y + e−x ) dx + dy = 0. Here,


My (x, y) − Nx (x, y) 1−0
= =1
N (x, y) 1
´
can be viewed as a function of x only, r(x) = e 1 dx = ex is an integrating factor, and the
differential equation
ex (y + e−x ) dx + ex dy = 0
is exact. So,
ˆ
F (x, y) = g0 (y) + ex (y + e−x ) dx
ˆ
= g0 (y) + ex y + 1 dx
= g0 (y) + ex y + x.

Since Fy (x, y) = g00 (y) + ex and also Fy (x, y) = ex , we have g00 (y) = 0. The curves ex 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,

Nx (x, y) − My (x, y) y 3 − (6xy 2 + 4y 3 ) −3(2xy 2 + y 3 ) 3


= 3 4
= 2 3
=−
M (x, y) 2xy + y y(2xy + y ) 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 differential 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) = g0 (y) + 2x + y dx

= g0 (y) + x2 + xy.

Fy (x, y) = x − 2y −3 gives g00 (y) = −2y −3 and we can choose g0 (y) = y −2 . The solutions are
given by y −2 + x2 + xy = C, C ∈ R.

1.6 Equilibrium Solutions and Phase Portraits


Definition 1.6.1. An autonomous first-order differential equation is of the form
dy
= F (y). (1.25)
dt
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 differential 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 definition above, finding equilibrium
solutions is equivalent to solving the equation F (y ∗ ) = 0, which is usually a lot easier than solving
a differential 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
= y(1 − y). (1.26)
dt
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).

dydt

0.4

0.2

y
-0.5 0.5 1.0 1.5

-0.2

-0.4

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).

y
0 1

Definition 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: Classification 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 0 (y) in (1.25) is continuous), these solutions will never actually
reach the equilibrium point in finite time. This last fact is addressed more rigorously in section 1.8.
Although the definition 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 first 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 & ymin as t → ∞. Then dy/dt % 0 and the continuity of F (y) implies F (ymin ) = 0.
Since there is no equilibrium point between y = 1 and y = 2, ymin = 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 differential equation on the y-axis. Since the initial value y(0) = 1 lies
between 0 and 2, we have
lim y(t) = 2, lim y(t) = 0.
t→∞ t→−∞

(b) dx/dt = x3 − x2 − 3x + 3, x(0) = 2. The equation x3 − x2 − 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) = x3 − x2 − 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 x(t) = ∞, lim x(t) = 3.
t→∞ t→−∞

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 = x3 − x2 − 3x + 3 (right).
dydt dxdt
4 5

4
3

3
2
2
1
1

y
-1 1 2 3 x
-3 - 3 1 3 3

-1 -1

1.7 Slope Fields and Euler’s Method


As seen in the previous section, phase portraits are “appropriate” graphs for autonomous differential
equations. In the case of a more general non-autonomous differential equation y 0 = G (x, y), we
may use a slope field to obtain information on the qualitative behavior of solution curves. The
following example illustrates how a slope field is generated.
1.7. SLOPE FIELDS AND EULER’S METHOD 31

Example 1.7.1. Consider the differential equation dy/dx = y 2 − x. The idea when creating a slope
field 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 = 12 − 2 = −1;
and for the point (1, 2), where the slope is dy/dx = 22 − 1 = 3. If this process is done (preferably
by using a grapher) for a large grid of points, we obtain the slope field 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 field
using a large grid of points (right).
y
3
y

slope=22 -1=3 2
2

slope=12 -2=-1
1
x
-3 -2 -1 1 2 3

-1

x
-1 1 2 3
-2

-3
-1

Example 1.7.2. Determine which of the following eight differential equations correspond with which
of the four slope fields given in Figure 1.9.
(i) dy/dx = x − 1 (ii) dy/dx = 1 − y 2 (iii) dy/dx = y 2 − x2 (iv) dy/dx = 1 − x
(v) dy/dx = 1 − y (vi) dy/dx = x2 − y 2 (vii) dy/dx = 1 + y (viii) dy/dx = y 2 − 1
Observe that in slope field (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 differential 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 field (a), we match it with differential equation (iv).
Slope field (b) corresponds to an autonomous differential equation (slopes are the same along
horizontal lines), and y ∗ = 1 is its one and only equilibrium solution. Differential equation (v) is
the only one that fits this description.
Slope field (c) also corresponds to an autonomous differential equation, and has y ∗ = ±1 as its
equilibrium solutions. Differential 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 field (d), dy/dx = 0 for points that appear to be on the lines y = ±x.
This narrows things down to differential equations (iii) or (vi). Since the slopes are all non-positive
along the x-axis (that is, when y = 0), differential equation (iii) matches with slope field (d).
32 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

Figure 1.9: The slope fields for example 1.7.2.


y y

3 3

2 2

1 1

x x
-3 -2 -1 1 2 3 -3 -2 -1 1 2 3

-1 -1

-2 -2

-3 -3

(a) (b)

y y

3 3

2 2

1 1

x x
-3 -2 -1 1 2 3 -3 -2 -1 1 2 3

-1 -1

-2 -2

-3 -3

(c) (d)
1.7. SLOPE FIELDS AND EULER’S METHOD 33

Euler’s Method
Euler’s Method is a numerical method that, roughly speaking, follows the slope field starting at
an initial point (x0 , y0 ) to obtain approximate solutions to the initial value problem y 0 = G(x, y),
y(x0 ) = y0 . More precisely, given a point (x0 , y0 ) and a step size ∆x, the solution y = g(x) to this
initial value problem is approximated as follows.
Let xi = x0 + k · ∆x for k = 1, 2, 3, . . .. Using the tangent line approximation

g(x + ∆x) ≈ g(x) + g 0 (x)∆x, (1.27)

we can approximate g(x1 ) = g(x0 + ∆x) as g(x1 ) ≈ g(x0 ) + g 0 (x0 )∆x. But now g(x0 ) = y0 and
g 0 (x0 ) = G(x0 , y0 ) (since g(x) is a solution to the initial value problem y 0 = G(x, y), y(x0 ) = y0 ).
Thus the first step in Euler’s Method is to approximate g(x1 ) by y1 = y0 + G(x0 , y0 )∆x. This is
equivalent to following a line passing through the point (x0 , y0 ) with slope G(x0 , y0 ) for ∆x units
horizontally to the point (x1 , y1 ); see Figure 1.10a. From this point, we follow the line with slope
G(x1 , y1 ) for ∆x units, and obtain the new point (x2 , y2 ); we repeat this process by starting at
(x2 , y2 ) with slope G(x2 , y2 ), etc. Figure 1.10b illustrates this process.

Figure 1.10: Illustration of Euler’s Method: (a) the first step (left); (b) the first and second step
(right).

y
y

y2 =y1 +GHx1 ,y1 LDx


y1 =y0 +GHx0 ,y0 LDx
y1 =y0 +GHx0 ,y0 LDx slope=GHx1 ,y1 L

slope=GHx0 ,y0 L
y0 slope=GHx0 ,y0 L
y0

x x
x0 x1 =x0 +Dx x0 x1 x2

In effect, we compute approximations yk to the values of the actual solution g(xk ) by using the
iterative scheme
yk+1 = yk + G(xk , yk )∆x. (1.28)
Example 1.7.3. Consider the initial value problem dy/dx = y 2 − x, y(0) = −1. We use Euler’s
method to approximate the solution for 0 ≤ x ≤ 2 using ∆x = 0.2. Note that y0 = −1, x0 = 0,
and x1 = 0.2, x2 = 0.4, x3 = 0.6, . . . , x10 = 2.0. Also, G(x, y) = y 2 − x. According to equation
(1.28), y1 = −1 + ((−1)2 − 0) · 0.2 = −0.8, y2 = −0.8 + ((−0.8)2 − 0.2) · 0.2 = −0.712, y3 =
−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 Euler’s method for dy/dx = y 2 − x, y(0) = −1 using ∆x = 0.2.

k xk yk
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 Euler’s 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
= ex cos(ex − 1), y(0) = 0.
dx

It can be seen by integration that the solution is y = sin(ex − 1). However, the numerical solution
when using Euler’s 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 differential
equation is separable, so we may use the method in section 1.2 to solve it. Separating variables
gives dy/y 2/3 = x dx; integrating both sides gives 3y 1/3 = (x2 /2) + C, or y = ((x2 /6) + C)3 . Using
y(0) = 0 provides C = 0, so a solution to the initial value problem is y = x6 /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 Euler’s method for dy/dx =
y 2 − x, y(0) = −1 with ∆x = 0.2.
y

x
0.5 1.0 1.5 2.0

- 0.5

- 1.0

- 1.5

- 2.0

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).
15 5

1 2 3 4 5
10

-5

5 -10

-15

1 2 3 4
-20

-5 -25
36 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

defined functions

x6 /216
 
0 if x<0 if x<0
y= and y = .
x6 /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 (x0 , y0 ). Then there exists a unique solution to
the initial value problem
dy
= G(x, y), y(x0 ) = y0 . (1.29)
dx
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 defined over the entire width of the rectangle
where G(x, y) and (∂G/∂y)(x, y) are continuous. In general, this solution is only defined on a
possibly smaller open interval I containing x0 .
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 R2 . 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 defined everywhere.
2
Here, the solution (which is y = 2/(2 − x )) is undefined 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 = x3 and y = 0 are both solutions the initial value problem.
Additionally, the initial value problem has infinitely many solutions of the form

0 if x < C
y= for C > 0
(x − C)3 if x ≥ C
or
(x − C)3

if x<C
y= for C < 0.
0 if x≥C

(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 differentiable 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 6= 0. This means there
exists a value x0 so that y0 = y(x0 ) 6= 0. First consider the case y0 > 0. The solution satisfies
the initial value problem dy/dx = y, y(x0 ) = y0 which has the by theorem 1.8.1 unique
solution ỹ(x) = y0 ex−x0 defined on some open interval about x0 . Since ỹ(0) = y0 e−x0 6= 0,
y(x) must at some point be different from ỹ(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
differential equation, y(x) is differentiable and thus must be continuous. The case y0 < 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 different initial values are either identical or they do not
intersect. In particular, this means that for an autonomous differential equation, transient solutions
can never reach an equilibrium solution in finite time. This fact was already mentioned in remark
1.6.1.

1.9 Bifurcations of Autonomous First-Order Differential Equa-


tions
We now consider first-order differential equations of the form

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

dy
= y 2 − 2y + µ. (1.31)
dt
The graph of Fµ (y) = y 2 − 2y + µ for various values of µ is shown in Figure 1.13. Since the effect of
the parameter is that of “lifting” the graph of y 7→ 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 y1∗ < y2∗ . The equilibrium solution y1∗ is a sink;
y2∗ 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 differential 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.

dydx
10

4
Μ=-1
2
Μ=0
y
-2 -1 1 2 3 4
Μ=1
-2
Μ=2

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µ0 (y) = 2y − 2 = 0). The dy/dt-coordinate of the vertex is
Fµ (1) = 12 − 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 differential 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
y1∗ with y1∗ < 1, and the source y2∗ with y2∗ > 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µ0 (y) along each branch, we can determine whether we have a sink (Fµ0 (y) < 0) or a
source (Fµ0 (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 differential equations.
1.9. BIFURCATIONS OF AUTONOMOUS FIRST-ORDER DIFFERENTIAL EQUATIONS 39

Figure 1.14: The bifurcation diagram of dy/dt = y 2 − 2y + µ.

source
2.0

1.5

1.0 node

0.5

-0.5 0.5 1.0 1.5


sink

(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: y1∗ = 0, which is a sink, and y2/3 = ± α, which are
sources. Figure 1.15b shows the graph of Fα for α < 0; there, y1∗ = 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
“flips” 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).
dydx dydx

y y
- Α Α

(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.

1.0

0.5

y*
0.0

-0.5

-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 F0 (x) = x(1 − x)2 (left); (b) the bifurcation diagram of dx/dt =
x(1 − x)2 + µ (right).

dxdt x*

0.4 1.5

1.0
0.2

0.5
x
0.5 1.0 1.5
Μ
-0.4 -0.2 0.2 0.4
-0.2
-0.5

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 differential 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

limt→∞ y(t) = ∞ and limt→−∞ 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 y0∗ = 0 > −0.2 and a source y1∗ < −0.2.
This means limt→∞ y(t) = 0 and limt→−∞ y(t) = y1∗ . 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.
1.0

0.5
y*

0.0

-0.5

-1.0
-0.5 0.0 0.5 1.0
Α

1.10 Mathematica Use


Solving Differential Equations
Differential equations and initial value problems can be solved symbolically using the DSolve com-
mand.
2
Example 1.10.1. (a) The solution to the differential equation dy/dx = xy is y = Cex /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.

DSolve@y '@xD Š x * y@xD, y@xD, xD

99y@xD ® ã 2 C@1D==
x2

2 /2
(b) The solution to the initial value problem dy/dx = xy, y(0) = 5 is y = 5ex . The first
argument is a list containing the two equations.
DSolve@8y '@xD Š x * y@xD, y@0D Š 5<, y@xD, xD

99y@xD ® 5 ã 2 ==
x2
42 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

(c) The differential equation need not be solved for y(x) when entering it using DSolve.

DSolve@Hy '@xDL ^ 2 - y@xD Š 0, y@xD, xD

99y@xD ® Ix2 - 2 x C@1D + C@1D2 M=, 9y@xD ® Ix2 + 2 x C@1D + C@1D2 M==
1 1
4 4

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 specified for the independent
variable.

solution = NDSolve@8y '@xD Š Hy@xDL ^ 2 - x, y@0D Š - 1<, y@xD, 8x, 0, 2<D

88y@xD ® InterpolatingFunction@880., 2.<<, <>D@xD<<

The solution can be evaluated as follows.

solution . x ® 2

88y@2D ® - 1.25132<<

We can plot the solution, as well.

Plot@y@xD . solution, 8x, 0, 2<D

-0.8

-0.9

-1.0

-1.1

-1.2

0.0 0.5 1.0 1.5 2.0

Drawing Slope Fields


The function PlotSlopeField can be used to generate slope fields. It is available in the Slope-
Fields.nb file at http://cobalt.rocky.edu/~hoenschu/DiffEqBook/Mathematica. The usage
for this function is
PlotSlopeField@formula_, xRange_List, yRange_List, nPoints_ListD
1.10. MATHEMATICA USE 43

where formula is the right-hand side of the differential 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 field for the differential 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 definition of the PlotSlopeField function. The name of
the function turns from blue to black. Mathematica now “knows” this function. Then, define the
right-hand side e.g. as f1:

f1@x_, y_D := x * Hy - xL;

The slope field is produced as follows.

g1 = PlotSlopeField@f1, 8- 3, 3<, 8- 3, 3<, 824, 24<D

x
-3 -2 -1 1 2 3

-1

-2

-3

Euler’s Method Using NDSolve


We can instruct Mathematica to use Euler’s 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 Euler’s Method with step size ∆x = 0.2 is generated and assigned the name solution.
44 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

solution = NDSolve@8y '@xD Š Hy@xDL ^ 2 - x, y@0D Š - 1<, y@xD, 8x, 0, 2<,


StartingStepSize ® 0.2, Method ® 8"FixedStep", Method ® "ExplicitEuler"<D
88y@xD ® InterpolatingFunction@880., 2.<<, <>D@xD<<

A table for the solution is produced as follows.

Table@y@xD . solution, 8x, 0, 2, 0.2<D

88- 1.<, 8- 0.8<, 8- 0.712<, 8- 0.690611<, 8- 0.715222<, 8- 0.772914<,


8- 0.853435<, 8- 0.947765<, 8- 1.04811<, 8- 1.1484<, 8- 1.24464<<

1.11 Exercises
Exercise 1.1. Solve each initial value problem by using an appropriate method.

dx x+1
(a) ♣ = , x(1) = 0
dt t
dx
(b) ♣ = t2 x2 , x(2) = 1
dt
dx
(c) ♣ = et+x , x(0) = 0
dt
dy xy
(d) ♣ =− 2 , y(0) = 1
dx x + y2
dx
(e) ♣ (t2 + 1) + 2tx = 1, x(0) = 0
dt
dx
(f) ♣ t + x = et , x(1) = 1
dt
(g) ♣ 2x dx + 4y 3 dy = 0, y(1) = 2

(h) ♣ ey dx + (xey − sin y) dy = 0, y(0) = 0

(i) ♣ (xy − 1) dx + (x2 − xy) dy = 0, y(1) = 0 (Hint: find an integrating factor of the form r(x).)

Exercise 1.2. Solve each initial value problem by using an appropriate method.

dy
(a) = 0, y(0) = 5
dx
dy 2y
(b) = , y(1) = 2
dx x
dx 1 − x2
(c) = , x(1) = 0
dt t
dy y 2 + xy
(d) = , y(1) = −1
dx x2
1.11. EXERCISES 45

dy
(e) = 3x2 y, y(0) = 5
dx
dx x2
(f) = , x(1) = −1
dt t
dx
(g) + 4x = 1, x(0) = 0
dt
(h) xy 0 + 2y = 3x, y(1) = 0

(i) xy 2 y 0 − y 3 = x3 , y(1) = 0

(j) (3x2 y 3 + y 4 )dx + (3x3 y 2 + y 4 + 4xy 3 )dy = 0, y(1) = −2

(k) y 0 = x + y + 1 − 1, y(0) = −1 (Hint: look at exercise 1.3 first.)


p

dy
(l) x + 6y = 3xy 4/3 , y(1) = 1 (Hint: look at exercise 1.4 first.)
dx
(m) y dx + (2x − yey ) dy = 0, y(0) = 1 (Hint: find an integrating factor of the form r(y).)

Exercise 1.3.

(a) ♣ Prove that a differential equation of the form

dy
= F (ax + by + c)
dx
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
= (x + 4y − 1)2 , y(0) = 1/8.
dx

(c) Use the substitution in (a) to solve the initial value problem

dy
= (y + 4x + 1)2 , y(0) = 1.
dx

Exercise 1.4. Consider Bernoulli’s Equation. It is a differential equation of the form

dy
= A(x)y + B(x)y n , (n 6= 0, 1).
dx

(a) ♣ Show that the substitution z = y 1−n transforms Bernoulli’s Equation into a linear differ-
ential equation of the form

dz
= (1 − n)A(x)z + (1 − n)B(x).
dx
46 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

(b) ♣ Use the substitution in (a) to solve the initial value problem

dy
+ x−1 y = xy 2 , y(1) = 1.
dx

Exercise 1.5. For each differential 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.

dy
(a) ♣ = y 2 − y − 6; y(0) = 0, y(0) = 4.
dt
dy
(b) ♣ = y 3 − 2y 2 ; y(0) = 1, y(0) = −1.
dt
dx
(c) = x3 − x2 − 3x + 3; x(0) = 1, x(0) = −2.
dt
dx
(d) = sin x; x(0) = 1, x(0) = π.
dt
Exercise 1.6. Provide a justification for the following first-derivatives test for classifying equilibrium
solutions. Suppose dy/dt = F (y), and F (y ∗ ) = 0.

• If F 0 (y ∗ ) > 0, then y ∗ is a source;

• if F 0 (y ∗ ) < 0, then y ∗ is a sink;

• if F 0 (y ∗ ) = 0, then the test is inconclusive.

Also, provide one example each for a differential equation where F 0 (y ∗ ) = 0, and y ∗ is a source, a
sink, or a node.
Exercise 1.7. Use Mathematica and the module provided in the file SlopeFields.nb to plot the
slope fields of the following differential equations.

dy
(a) ♣ = x(y − x), −3 ≤ x, y ≤ 3, grid dimensions: {24, 24}.
dx
dy
(b) ♣ = x2 − y, −3 ≤ x, y ≤ 3, grid dimensions: {24, 24}.
dx
dy
(c) ♣ = xy 2 , −3 ≤ x, y ≤ 3, grid dimensions: {24, 24}.
dx
dy
(d) ♣ = y/x, −3 ≤ x, y ≤ 3, grid dimensions: {24, 24}.
dx
Exercise 1.8. Use Euler’s Method to approximate the solution to each initial value problem at the
given value of the independent variable.

dy
(a) ♣ = x(y − x), y(0) = 1, at x = 1 if ∆x = 0.5.
dx
1.11. EXERCISES 47

dy
(b) ♣ = x2 − y, y(0) = 0, at x = 1 if ∆x = 0.25.
dx
dy
(c) ♣ = y 2 − x, y(0) = −1, at x = 1 if ∆x = 0.2.
dx
dy
(d) = y 2 − t2 , y(1) = 1, at t = 2 if ∆t = 0.25.
dt
dy
(e) = ty − y 3 , y(0) = 1, at t = 1 if ∆t = 0.25.
dt
dy
(f) = sec2 t, y(0) = 0, at t = 1 if ∆t = 0.2.
dt
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.
dy
(a) ♣ = y 2 , y(0) = 0.
dt
dy
(b) ♣ = 4ty 3/4 , y(0) = 1.
dt
dy
(c) ♣ = 4ty 3/4 , y(1) = 0.
dt
dy 1
(d) ♣ = , y(0) = 0.
dt (y + 1)(t − 2)
dy
(e) = tan y, y(0) = 0.
dx
dy y
(f) = 2 , y(1) = 0.
dx x
dy y
(g) = 2 , y(0) = 0.
dx x
dy x
(h) = , y(0) = 0.
dx (y − 1)2

Exercise 1.10. ♣ We have seen in example 1.1.1 that the initial value problem

(y 0 )2 − y = 0, y(0) = 1

has two different solutions y = (1/4)(x2 + 4x + 4) and y = (1/4)(x2 − 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 differential equations.
Label all axes correctly, and find all bifurcation values.
48 CHAPTER 1. FIRST-ORDER DIFFERENTIAL EQUATIONS

dy
(a) ♣ = µy − y 2 .
dt
dy
(b) ♣ = y 2 (1 − y 2 ) + µ.
dt
dx
(c) = x3 − 2x2 + µ.
dt
dx
(d) = (x2 + α)x.
dt
dx
(e) = x2 + αx + α2 − 1.
dt
Exercise 1.12. Write a Mathematica module that implements Euler’s 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
= G(x, y), y(x0 ) = y0 (1.34)
dx
precisely when y = f (x) satisfies the integral equation
ˆ x
y = y0 + G(t, y) dt. (1.35)
x0

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

(a) Show that for dy/dx = y, y(0) = 1, φ0 (x) = 1, φ1 (x) = 1+x, φ2 (x) = 1+x+(x2 /2!),. . . ,φn (x) =
1 + x + (x2 /2!) + . . . + (xn /n!). Thus, φn (x) → ex , 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 first-order differential equations of the form

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


1.11. EXERCISES 49

(a) Let yh be the solution to the corresponding homogeneous equation; i.e. yh0 +p(x)yh = 0. Show
that yh = 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) satisfies the differential equation c0 (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
Differential Equations

This chapter presents various applications of first-order differential 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 fixed 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 fixed 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)
= (β − δ) · P (t). (2.2)
∆t

51
52 CHAPTER 2. APPLICATIONS OF FIRST-ORDER DIFFERENTIAL EQUATIONS

Letting ∆t → 0 in equation (2.2), we obtain the differential equation

dP
= (β − δ) · P. (2.3)
dt
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 sufficiently realistic in population models. The reason for this is
that while population growth rates may be influenced by external factors (such as seasonal
variations in temperature, water supply, etc.), the are also influenced 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 influence 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 influences can usually be easily incorporated in a differential
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) = P0 has the
solution
P (t) = P0 · 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 artificial 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
= (a + bP ) · P, (2.5)
dt
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) = P0 can be found by separation of variables. We obtain

aeat P0
P (t) = . (2.6)
bP0 (1 − eat ) + a

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 find 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 P0 = 500, we obtain the
solution
0.1e0.1t · 500
P (t) = ,
−(1/150000) · 500 · (1 − e0.1t ) + 0.1
which simplifies to
15000e0.1t
P (t) = .
29 + e0.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.

14 000

12 000

10 000

8000

6000

4000

2000

20 40 60 80 100

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

coefficients 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
Pi , 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 = (Pi + Pi−1 )/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 (Pi − Pi−1 )/∆t
≈ . (2.7)
P Pi
For the year 1795, the relative annual growth rate would be approximately (5.236−3.929)/10/4.583 =
0.02852 = 2.852%. The regression line of (Pi + Pi−1 )/∆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

(276000e0.0276t )/(69473.9 + 773e0.0276t ). Figure 2.2 shows this function, together with the actual
population data. There appears to be a definite 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.

300

250

200

150

100

50

1850 1900 1950 2000

Example 2.1.3. Suppose a fish population grows logistically according to the model

dP
= (0.5 − 0.00025P ) · P.
dt

If a constant rate µ of harvesting is introduced into the model, the differential equation becomes

dP
= (0.5 − 0.00025P ) · P − µ. (2.8)
dt

We want to investigate the bifurcations the system undergoes as the rate of harvesting is increased
starting with µ = 0.
The equilibrium solutions to the differential 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 fish 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 fish 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 fishing” will, in the long run, not lead to just a small
number of fish fewer than the 1,000 at µ0 , but to the total disappearance of all fish.
56 CHAPTER 2. APPLICATIONS OF FIRST-ORDER DIFFERENTIAL EQUATIONS

Figure 2.3: The population model in example 2.1.3: (a) graph of the differential equation if µ = 100
(left); (b) bifurcation diagram (right).

dPdt P*
250
2000
200
1500
150
1000
100

500
50

P Μ
500 1000 1500 2000 50 100 150 200 250 300

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.

R L

Ohm’s Law
Ohm’s Law states that the voltage drop or potential difference UR (in volts, V ) across a resistor is

UR = R · I, (2.9)

where I is the current (in amperes, A) and R is the resistance (in ohms, Ω).
2.2. ELECTRIC CIRCUITS 57

Faraday’s Law
Faraday’s Law states that the voltage drop across an inductor is
dI
UL = L · , (2.10)
dt
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 field
which, in turn, induces a voltage drop.

Kirchhoff ’s Voltage Law


Kirchhoff ’s 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 UL + UR = E(t).
This leads to the following linear differential equation.
dI
L· + R · I = E(t). (2.11)
dt
Remark 2.2.1. If the initial current is I0 , 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 R
= − I, I(0) = I0 .
dt L
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(120πt). Suppose that R = 10 Ω and L = 5 H, and that
the initial current in the circuit is I0 = 0 A. Then the current I = I(t) in the circuit at time t (in
seconds) satisfies the differential equation
dI
5· + 10 · I = 120 sin(120πt).
dt
Dividing by 5 gives the linear differential equation (dI/dt) + 2I = 24 sin(120πt). An integrating
factor is r(t) = e2t , so the differential equation becomes
d 2t
(e I) = 24e2t sin(120πt).
dt
The general antiderivative of the right-hand side can found by applying integration by parts twice.
We obtain
12e2t
e2t I = (sin(120πt) − 60π cos(120πt)) + C.
3600π 2 + 1
Using I(0) = 0 gives C = 720π/(3600π 2 + 1). Consequently,
12 720π
I= (sin(120πt) − 60π cos(120πt)) + e−2t . (2.12)
3600π 2 + 1 3600π 2 + 1
Figure 2.5a shows the current I for the first 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(120πt + ∆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).
I I

0.10 0.05

0.05
t
2.6 2.7 2.8 2.9 3.0

t
0.1 0.2 0.3 0.4 0.5 -0.05

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 influence 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 + O2 → 2NO2 . (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[NO2 ]/dt = k[NO]2 [O2 ] (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 [O2 ]0 be the initial concentration
of oxygen. Then [NO2 ] satisfies the following differential equation.
 
d[NO2 ] 2 [NO2 ]
= k ([NO]0 − [NO2 ]) [O2 ]0 − (2.14)
dt 2

To understand the right-hand side of this equation, note that the initial amount of NO is reduced
by an equal amount of NO2 that is produced during the reaction, so [NO] = [NO]0 − [NO2 ]. The
initial amount of O2 is reduced by one half the amount of NO2 , since one unit of O2 yields two
units of NO2 .
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, [O2 ]0 = 1 M/l, and [NO2 ]0 = 0 M/l. At 25◦ C, the rate constant for this reaction is k =
0.00713 l2 /(M 2 s). The differential equation (2.14) yields the following initial value problem.
 
d[NO2 ] 2 [NO2 ]
= 0.00713 (4 − [NO2 ]) 1 − , [NO2 ](0) = 0 (2.15)
dt 2

Although the differential 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 [NO2 ] in example 2.3.1. The horizontal axis
shows the time (in seconds) after the reaction has started.

C
2.5

2.0

1.5

1.0

0.5

t
50 100 150 200 250 300

Table 2.2: Rate laws for various reactions (Source: [14]).

Reaction Rate Law


2NO + O2 → 2NO2 Rate = k[NO]2 [O2 ]
2NO + 2H2 → 2N2 + 2H2 O Rate = k[NO]2 [H2 ]
2ICl + H2 → 2HCl2 + I2 Rate = k[ICl][H2 ]
2N2 O5 → 4NO2 + O2 Rate = k[N2 O5 ]
2NO2 + F2 → 2NO2 F Rate = k[NO2 ][F2 ]
2H2 O2 → 2H2 O + O2 Rate = k[H2 O2 ]
H2 + Br2 → 2HBr Rate = k[H2 ][Br2 ]1/2
O3 + Cl → O2 + ClO Rate = k[O3 ][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

H2 + I2 → 2HI. (2.16)

Table 2.3: Hydrogen Gas and Iodine Gas Initial Rate Data at 700K (Source: [14])
.
Experiment [H2 ]0 (M) [I2 ]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[H2 ]m [I2 ]n , as follows. Using the data from the first 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 = 2m , 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 first equation: 3 · 10−4 = k(0.10)(0.10) gives k = 3.00 · 10−2 . The differential
equation for the concentration of the product is consequently
  
d[HI] [HI] [HI]
= 0.03 [H2 ]0 − [I2 ]0 − . (2.17)
dt 2 2

This differential 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.
DSolve@8P '@tD Š HH1  10L - 1  150 000 P@tDL P@tD, P@0D Š 500<, P@tD, tD  Simplify  Quiet

99P@tD ® ==
15 000 ãt10
29 + ãt10

The command Simplify simplifies the algebraic form of the solution P (t) and the command Quiet
suppresses the output of a warning. Note that these commands appear in postfix form. The
equivalent prefix form would be:
Quiet@Simplify@DSolve@8P '@tD Š HH1  10L - 1  150 000 P@tDL P@tD, P@0D Š 500<, P@tD, tDDD

99P@tD ® ==
15 000 ãt10
29 + ãt10
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 = 83 929 214, 5 236 631, 7 239 881, 9 638 453, 12 866 020, 17 069 453, 23 191 876, 31 443 321,
38 558 371, 49 371 340, 62 979 766, 76 212 168, 92 228 496, 106 021 537, 123 202 624, 132 164 569,
151 325 798, 179 323 175, 203 211 926, 226 545 805, 248 709 873, 281 421 906, 308 745 538<;
data = data  1 000 000.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 different 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 .
Dt = 10;
midpoints = HDrop@data, 1D + Drop@data, - 1DL  2;
RelChange = HDrop@data, 1D - Drop@data, - 1DL  Dt  midpoints;
regressionData = Thread@8midpoints, RelChange<D;
LinearModelFit@regressionData, P, PD

FittedModelB 0.0275917 - 0.0000773111 P F

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
influenced by seasonal variations (e.g. cold temperatures in the winter, warm temperatures in the
summer). Specifically,
ρ(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 satisfies the
differential equation
dP
= (a + bP ) · P.
dt
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 find the formula that gives the deer
population at time t (in years). Hint: Use Mathematica’s FindRoot method with starting
values a0 = 1 and b0 = −0.001.

(b) Suppose that additionally, 100 deer are killed per year by hunters. How does this change the
differential 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. ♣ Newton’s Law of Heating/Cooling states that the rate with which the temperature
of an object changes is proportional to the difference between the ambient temperature A and the
temperature of the object. That is, the temperature y of the object satisfies a differential equation
of the form
dy
= k(A − y). (2.18)
dt
Use Newton’s 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 Newton’s 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 V1 and initial temperature y10 ; liquid 2 has volume V2 and initial temperature y20
(e.g. 200 ml tea at 80◦ C and 50 ml milk at 5◦ C). The ambient temperature for both fluids is A
(e.g. 25◦ C). By “thermally similar”, we mean that the constant k appearing in Newton’s 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 = (V1 /(V1 + V2 ))y10 + (V2 /(V1 + V2 ))y20 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
Newton’s Law, which strategy will result in a lower temperature of the mixture?
Exercise 2.6. ♣ Suppose a container is completely filled with a fluid (gas or liquid) and has volume
V . At time t = 0, a certain substance is mixed into the fluid with initial concentration C0 = Q0 /V .
Fluid without the substance enters the container at rate r, and completely and instantaneously
mixes with the fluid in the container. At the same time, the same amount of fluid with the
substance mixed in flows out of the container (hence keeping the volume constant). The quantity
Q of the substance satisfies the following initial value problem.
dQ r
= − Q, Q(0) = Q0 .
dt V
Use this model in the following situation. During a blizzard, you are confined 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 R3 . 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.

R=8W L=12H

EHtL=220 cosH100ΠtL

Exercise 2.9. Solve the differential 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 2N2 O5 → 4NO2 + O2 was found in a study to have the rate law
rate = 0.070[N2 O5 ].
(a) If the initial concentrations are [N2 O5 ]0 = 10 M/l and [NO2 ]0 = [O2 ]0 = 0 M/l, set up the
initial value problems that describe the concentrations [N2 O5 ](t), [NO2 ](t) and [O2 ](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) = A sin(ωt)? This leads to the initial
value problem
dI
L + RI = A sin(ωt), I(0) = 0. (2.19)
dt
(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+ q  .
R 2
1 + Lω
p
Hint: Use that f (t) = β1 cos(ωt)+β2 sin(ωt) can be written in the form f (t) = β12 + β22 cos(ωt+
∆t), where ∆t is some phase shift – see theorem 3.5.2 for details.

Exercise 2.12. ♣ The following differential equation can be used to model the free fall with friction
of an object with mass m in the presence of a (constant) gravitational field with gravitational force
g; the frictional force is assumed to be proportional to the speed of the object:

mẍ + cẋ = 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 = ẋ, equation (2.20) becomes the first-order equation mv̇ + cv = g.

(a) Find the equilibrium solution to mv̇ + cv = g; this is the terminal velocity of the object.

(b) Find the general formula of the solution to the initial value problem

mẍ + cẋ = g, x(0) = x0 , ẋ(0) = v0 ,

and identify all transient terms. Hint: find the solution to mv̇ + cv = g, v(0) = v0 first, 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 differential 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 Differential


Equations

3.1 Introduction to Homogeneous Second-Order Linear Equations

Recall that the first-order linear differential 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 a1 (x) to obtain the slightly
more general form
dy
a1 (x) + a0 (x)y = f (x). (3.1)
dx

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 differential equations, as follows. A general second-order linear differential equation is of the
form
d2 y dy
a2 (x) 2
+ a1 (x) + a0 (x)y = f (x), (3.2)
dx dx

where a2 (x) is not identically zero. Similarly, an n-th order linear differential equation can be
written as
dn y d2 y dy
an (x) + . . . + a2 (x) + a1 (x) + a0 (x)y = f (x), (3.3)
dxn dx2 dx

with an 6= 0. The functions a0 (x), a1 (x), . . . , an (x) are called the coefficient functions of the dif-
ferential equation. The differential 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
differential equations (sections 3.2 to 3.5); in section 3.6 we will consider non-homogeneous second-
order linear differential equations; and in section 3.7 we will look at higher-order linear equations.
The differential equations considered in all of these sections will have constant coefficient functions.
Section 3.8 presents the structure of the solution space of differential equations of the form (3.3).
In this last section, general (non-constant) coefficient functions will be considered.

65
66 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS

3.2 Homogeneous Second-Order Linear Equations with Constant


Coefficients
We start with an introductory example that captures most aspects of what we encounter when
solving homogeneous second-order linear differential equations with constant coefficient functions.
Example 3.2.1. Consider the second-order equation

d2 y dy
2
−5 + 4y = 0. (3.4)
dx dx

We see if we can find 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 differential equation (3.4) yields

d2 λx d
2
e − 5 eλx + 4eλx = 0.
dx dx

Since (d/dx)eλx = λeλx and (d2 /dx2 )eλx = λ2 eλx , we obtain λ2 eλx − 5λeλ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, y1 = ex and y2 = e4x are solutions to the differential equation. Even more than
that is true: if y = c1 y1 + c2 y2 = c1 ex + c2 e4x , then y is a solution to (3.4), as well. This can be
seen as follows: dy/dx = c1 ex + 4c2 e4x , d2 y/dx2 = c1 ex + 16c2 e4x , so d2 y/dx2 − 5(dy/dx) + 4y =
c1 ex + 16c2 e4x − 5c1 ex − 20c2 e4x + 4c1 ex + 4c2 e4x = 0.
The following theorem summarizes the insights gained in the previous example.

Theorem 3.2.1. Consider the homogeneous second-order linear differential equation with constant
coefficients
d2 y dy
a 2 +b + cy = 0, (3.6)
dx dx
where a 6= 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 y1 and y2 are solutions to (3.6),
then so is any linear combination y = c1 y1 + c2 y2 (c1 , c2 are arbitrary real or complex numbers).

Proof. Let λ be a solution to (3.7) and let y = eλx . Then y 0 = λeλx = λy, y 00 = λ2 eλx = λ2 y, and
ay 00 + by 0 + cy = (aλ2 + bλ + c)y = 0. So, y = eλx is a solution to (3.6).
If y1 and y2 are solutions to (3.6), and c1 , c2 are arbitrary, then for y = c1 y1 +c2 y2 , ay 00 +by 0 +cy =
a(c1 y100 + c2 y200 ) + b(c1 y10 + c2 y20 ) + c(c1 y1 + c2 y2 ) = c1 (ay100 + by10 + cy1 ) + c2 (ay200 + by20 + cy2 ) = 0.
3.2. HOMOGENEOUS SECOND-ORDER LINEAR EQUATIONS WITH CONSTANT COEFFICIENTS67

Example 3.2.2. Consider the differential equation

d2 y
+ 4y = 0. (3.8)
dx2

The characteristic equation is λ2 + 4 = 0 which has the complex solutions λ = ±2i. Two complex-
valued solutions to the differential equation are y = e2ix and its complex conjugate y = e−2ix .
However, we are interested in real-valued solutions. To obtain them, recall that for s, t ∈ R,
es+it = es (cos t + i sin t) (Euler’s Formula). In the present situation, taking y = e2ix , we get

y = e2ix = 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 y1 = cos(2x) of y = e2ix is a solution to (3.8).
Similarly, it can be seen that the imaginary part y2 = sin(2x) of y = e2ix is also a solution. It is
then clear that all linear combinations c1 cos(2x) + c2 sin(2x) are real-valued solutions to (3.8).
It appears that we have two-parameter families of solutions to second-order differential equa-
tions, as opposed to one-parameter families for first-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 first-order
situation, one would be inclined to guess that specifying two initial values of the form y(x0 ) = y0 ,
y(x1 ) = y1 will work. However, we can see in the previous example that choosing, for instance,
y(0) = 0 and y(π) = 0 would yield infinitely 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 = c1 cos(2x) + c2 sin(2x). Then y(0) = 0 would give c1 = 0, so y = c2 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 differential equations are of the form y(x0 ) = y0 and y 0 (x0 ) = y1 ;
that is, we need to specify a value of the solution and its first derivative at the same initial value
of the independent variable. Also, it follows from this theorem that the solutions of the form
y = c1 cos(2x) + c2 sin(2x) found in example 3.2.2 are the only solutions to the differential equation.
Example 3.2.3. Find a solution to the initial value problem

d2 x dx
2 2
+5 − 12x = 0, x(0) = 1, x0 (0) = −2. (3.9)
dt dt

The characteristic equation is 2λ2 + 5λ − 12 = 0 whose solutions are λ = 3/2 and λ = −4;
x = c1 e(3/2)t + c2 e−4t are solutions for c1 , c2 ∈ R. The derivative is x0 = (3/2)c1 e(3/2)t − 4c2 e−4t .
The initial condition x(0) = 1 gives c1 + c2 = 1, and the initial condition x0 (0) = −2 gives
(3/2)c1 − 4c2 = −2. Solving these two linear equations yields c1 = 4/11 and c2 = 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 different 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 coefficients of the homogeneous second-order linear differential equa-
tion with constant coefficients ay 00 + by 0 + cy = 0, a 6= 0, satisfy b2 − 4ac > 0.
Then the characteristic equation has two real distinct roots λ1 6= λ2 and the initial value problem

ay 00 + by 0 + cy = 0, y(x0 ) = y0 , y 0 (x0 ) = y1 (3.10)

has a solution of the form y = c1 eλ1 x + c2 eλ2 x , where c1 and c2 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± b2 − 4ac)/(2a),
so there are two real distinct solutions if and only if the discriminant b2 − 4ac > 0. Theorem 3.2.1
tells us that y = c1 eλ1 x + c2 eλ2 x are solutions to the differential equation ay 00 + by 0 + cy = 0 for any
c1 , c2 ∈ R.
If y = c1 eλ1 x + c2 eλ2 x , then y 0 = c1 λ1 eλ1 x + c2 λ2 eλ2 x , and the initial conditions y(x0 ) = y0 and
0
y (x0 ) = y1 lead to the following linear system of equations.

c1 eλ1 x0 + c2 eλ2 x0 = y0
λ 1 x0 λ 2 x0
c1 λ1 e + c2 λ2 e = y1 ,

or, using matrix-vector notation,


 λx
eλ2 x0
   
e 1 0 c1 y0
= . (3.11)
λ1 eλ1 x0 λ2 eλ2 x0 c2 y1

The determinant of the matrix in equation (3.11) is (λ2 − λ1 )eλ1 x0 eλ2 x0 , which is non-zero because
λ1 6= λ2 . Hence the system (3.11) has a unique solution (c1 , c2 ).

Example 3.3.1. Solve each of the following initial value problems. Also, determine the limit of each
solution as t → +∞ and t → −∞.
(a) x00 −7x0 +6x = 0, x(0) = 0, x0 (0) = 1. The solutions to the characteristic equation λ2 −7λ+6 =
0 are λ1 = 1 and λ2 = 6. Setting x = c1 et + c2 e6t and using that x0 = c1 et + 6c2 e6t , and
x(0) = 0, x0 (0) = 1 gives the system

c1 + c2 = 0
c1 + 6c2 = 1.

Its solutions are c1 = −1/5 and c2 = 1/5, so x = −(1/5)et + (1/5)e6t . Since both et → 0 and
e6t → 0 as t → −∞, we have limt→−∞ x = 0. Also, x = ((1/5)e5t − (1/5))et . Both factors
approach +∞ as t → +∞, so limt→+∞ x = +∞. Figure 3.1 shows the graph of the solution
function x = x(t).
(b) x00 +x0 −6x = 0, x(0) = 1, x0 (0) = 0. The solutions to the characteristic equation λ2 +λ−6 = 0
are λ1 = 2 and λ2 = −3. Setting x = c1 e2t + c2 e−3t and using that x0 = 2c1 e2t − 3c2 e−3t , and
x(0) = 1, x0 (0) = 0 gives the equations c1 +c2 = 1, 2c1 −3c2 = 0. Its solutions are c1 = 3/5 and
c2 = 2/5, so x = (3/5)e2t + (2/5)e−3t . As t → ±∞, one of the terms (3/5)e2t and (2/5)e−3t
will always approach +∞, while the other will approach 0; hence, limt→±∞ 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 x00 − 7x0 + 6x = 0, x(0) = 0, x0 (0) = 1.

x
1.0

0.8

0.6

0.4

0.2

t
-2.0 -1.5 -1.0 -0.5 0.5 1.0
-0.2

-0.4

Figure 3.2: The solution to x00 + x0 − 6x = 0, x(0) = 1, x0 (0) = 0.

x
3.0

2.5

2.0

1.5

1.0

0.5

t
-1.0 -0.5 0.5 1.0
70 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS

(c) 6x00 + 5x0 + x = 0, x(1) = 2, x0 (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

c1 e−1/2 + c2 e−1/3 = 2
−(1/2)c1 e−1/2 − (1/3)c2 e−1/3 = −1,

whose solutions are c1 = 2e1/2 and c2 = 0. The solution to the initial value problem is
x = 2e1/2 e−(1/2)t = 2e(1−t)/2 . The solution is simply a decreasing exponential function, so
limt→−∞ x = +∞ and limt→+∞ x = 0. Its graph is shown in Figure 3.3.

Figure 3.3: The solution to 6x00 + 5x0 + x = 0, x(1) = 2, x0 (1) = −1.

x
5

t
-1.0 -0.5 0.5 1.0 1.5 2.0

(d) x00 − x0 = 0, x(0) = 5, x0 (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 = et is another. Since x(0) = 5 and x0 (0) = 0, we see that x = 5 is the solution of the form
x = c1 + c2 et that applies to the initial value problem.

3.4 Case II: One Repeated Real Root


Example 3.4.1. Consider the differential equation

d2 y dy
2
+2 + y = 0. (3.12)
dx dx

The characteristic equation is λ2 + 2λ + 1, and this equation has one repeated real root λ0 = −1.
By Theorem 3.2.1, y1 = e−x is a solution to the differential equation. The question is, what is
the second solution y2 we expect to have and that corresponds to the second root we had in the
previous section?
To find this second solution, we adopt the following formal correspondence between a second-
order differential equation and its characteristic equation. We introduce the differential operator
D = d/dx, as follows:
3.4. CASE II: ONE REPEATED REAL ROOT 71

Differential Operators
If y is a differentiable function, then Dy is the derivative function of y, that is, Dy = y 0 . 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 differential
operators.

• D(cy) = c(Dy) for c ∈ R;

• D(y1 + y2 ) = (Dy1 ) + (Dy2 ).

The first property reflects the simple fact from differential 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 define a “product” (or perhaps more aptly a
“composition”) of differential operators, as follows: D2 y = D(Dy), that is D2 (y) = y 00 . So, D2 is
really the repeated application of the differential operator. Let I be the identity operator; that is,
Iy = y. We now have the following distributive properties.

• D(aD + bI) = aD2 + Db,

• (aD + bI)D = aD2 + Db and consequently,

• (aD + bI)(cD + dI) = acD2 + (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 find the second solution in example 3.4.1.
Example 3.4.2. We again consider the differential equation

d2 y dy
+2 + y = 0. (3.13)
dx2 dx

Using differential operator notation, it becomes (D2 + 2D + I)y = 0, or simply D2 + 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 differential operators. Observe that the solution
y1 = e−x we found in example 3.4.1 satisfies (D +I)y1 = 0. The crucial observation is the following:
If we can find a function y2 that satisfies (D + I)y2 = y1 , then (D + I)(D + I)y2 = (D + I)y1 = 0;
that is, y2 is our second solution!
The formal expression (D + I)y2 = y1 corresponds, in this example, to the differential equation

dy2
+ y2 = e−x , (3.14)
dx
which is a non-homogeneous first-order linear differential equation and can be solved using the
integrating factor r(x) = ex . Then, equation (3.14) becomes (d/dx)(ex y) = 1, or y = xe−x + Ce−x .
Since we already have y1 = e−x , we may choose C = 0. The second solution to (3.13) is consequently
y2 = xe−x , and y = c1 e−x + c2 xe−x is a solution for any choice of c1 , c2 ∈ 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 coefficients of the homogeneous second-order linear differential equa-
tion with constant coefficients ay 00 + by 0 + cy = 0, a 6= 0, satisfy b2 − 4ac = 0.
Then the characteristic equation has one repeated real root λ0 and the initial value problem

ay 00 + by 0 + cy = 0, y(x0 ) = y0 , y 0 (x0 ) = y1 (3.15)

has a solution of the form y = c1 eλ0 x + c2 xeλ0 x , where c1 and c2 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 b2 − 4ac = 0. In this case the solution is λ0 = −b/(2a). Theorem 3.2.1 asserts that
y1 = eλ0 x is a solution, and also that c1 y1 +c2 y2 is a solution for any c1 , c2 ∈ R, if y1 , y2 are arbitrary
solutions to the differential equation. But y2 = xeλ0 x is also a solution to this differential equation:
y20 = (1+xλ0 )eλ0 x , y200 = (2λ0 +λ20 x)eλ0 x ; since λ0 = −b/(2a) and λ0 is a solution to the characteristic
equation, ay 00 +by 0 +cy = (2aλ0 +aλ20 x+b+bxλ0 +cx)eλ0 x = ((2aλ0 +b)+x(aλ20 +bλ0 +c))eλ0 x = 0.
If y = c1 eλ0 x +c2 xeλ0 x , then y 0 = c1 λ0 eλ0 x +c2 (1+λ0 x)eλ0 x , and the initial conditions y(x0 ) = y0
and y 0 (x0 ) = y1 lead to the system

eλ0 x0 x 0 e λ 0 x0
    
c1 y0
= , (3.16)
λ0 eλ0 x0 (1 + λ0 x0 )eλ0 x0 c2 y1

whose determinant is ((1 + λ0 x0 ) − λ0 x0 )e2λ0 x0 = e2λ0 x0 6= 0. So the system (3.16) has a unique
solution (c1 , c2 ).

Example 3.4.3. Solve the initial value problem 9x00 − 6x0 + x = 0, x(0) = 1, x0 (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 = c1 et/3 + c2 tet/3 and
using that x0 = (c1 /3 + c2 )et/3 + (c2 /3)tet/3 , and x(0) = 1, x0 (0) = 0 gives the system

c1 = 1
c1 /3 + c2 = 0.

This means x = et/3 − (1/3)tet/3 = (1 − (t/3))et/3 . As t → +∞, the first factor approaches −∞ and
the second factor approaches +∞, so limt→+∞ x = −∞. As t → −∞, we may rewrite the solution
as x = (1 − (t/3))/e−t/3 and use L’Hôpital’s Rule to obtain limt→−∞ 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 coefficients of the homogeneous second-order linear differential equa-
tion with constant coefficients ay 00 + by 0 + cy = 0, a 6= 0, satisfy b2 − 4ac < 0.
3.5. CASE III: COMPLEX CONJUGATE ROOTS 73

Figure 3.4: The solution to 9x00 − 6x0 + x = 0, x(0) = 1, x0 (0) = 0.

x
1.0

0.5

t
-4 -2 2 4

-0.5

-1.0

-1.5

Then the characteristic equation has two complex conjugate roots α ± βi, β 6= 0, and the initial
value problem
ay 00 + by 0 + cy = 0, y(x0 ) = y0 , y 0 (x0 ) = y1 (3.17)
has a solution of the form y = c1 eαx cos(βx) + c2 eαx sin(βx), where c1 and c2 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± b2 − 4ac)/(2a),
so there are two complex conjugate solutions if and only if the discriminant b2 − 4ac < 0. Write
λ1,2 = α ± βi, where α, β ∈ R, β 6= 0, and let z1/2 = eλ1,2 x = eαx±iβx = eαx (cos(βx) ± i sin(βx)).
Theorem 3.2.1 tells us that z = c1 z1 +c2 z2 are (complex-valued) solutions to the differential equation
az 00 + bz 0 + cz = 0 for any c1 , c2 ∈ C. In particular, y1 = Re(z1 ) = (z1 + z1 )/2 = (z1 + z2 )/2 =
eαx cos(βx) and y2 = Im(z1 ) = (z1 − z1 )/(2i) = (z1 − z2 )/(2i) = eαx sin(βx) are solutions to (3.17).
If y = c1 eαx cos(βx)+c2 eαx sin(βx), then y 0 = c1 αeαx cos(βx)−c1 βeαx sin(βx)+c2 αeαx sin(βx)+
c2 βeαx cos(βx), and the initial conditions y(x0 ) = y0 and y 0 (x0 ) = y1 lead to the following equation:

eαx0 cos(βx0 ) eαx0 sin(βx0 )


    
c1 y0
= . (3.18)
eαx0 (α cos(βx0 ) − β sin(βx0 )) eαx0 (α sin(βx0 ) + β cos(βx0 )) c2 y1

The determinant of the matrix in equation (3.18) is e2αx0 (α cos(βx0 ) sin(βx0 ) + β cos2 (βx0 )) −
e2αx0 (α cos(βx0 ) sin(βx0 ) − β sin2 (βx0 )) = e2αx0 β(cos2 (βx0 ) + sin2 (βx0 )) = βe2αx0 , which is non-
zero because β 6= 0. Hence the system (3.18) has a unique solution (c1 , c2 ).

Example 3.5.1. Solve each of the following initial value problems.

(a) x00 +2x0 +2x = 0, x(0) = 0, x0 (0) = 1. The solutions to the characteristic equation λ2 +2λ+2 =
0 are λ1,2 = −1 ± i. Consequently, x1 = e−t cos t and x2 = e−t sin t are real-valued solutions.
Setting x = c1 e−t cos t + c2 e−t sin t and using that x0 = c1 e−t (− cos t − sin t) + c2 e−t (− sin t +
cos t), and x(0) = 0, x0 (0) = 1 gives the system

c1 = 0
−c1 + c2 = 1.
74 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS

So, c1 = 0 and c2 = 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 x00 + 2x0 + 2x = 0, x(0) = 0, x0 (0) = 1.

0.3

0.2

0.1

t
2 4 6 8

-0.1

-0.2

(b) x00 − 4x0 + 404x = 0, x(0) = 5, x0 (0) = 0. The solutions to the characteristic equation are
λ1,2 = 2±20i. Setting x = c1 e2t cos(20t)+c2 e2t sin(20t) and using that x0 = c1 e2t (2 cos(20t)−
20 sin(20t)) + c2 e2t (2 sin(20t) + 20 cos(20t)), and x(0) = 5, x0 (0) = 0 gives the equations

c1 = 5
2c1 + 20c2 = 0.

Its solutions are c1 = 5 and c2 = −1/2, so x = 5e2t cos(20t) − (1/2)e2t sin(20t). Figure 3.6
shows the graph of x = x(t), which has exponentially increasing amplitude.

Figure 3.6: The solution to x00 − 4x0 + 404x = 0, x(0) = 5, x0 (0) = 0.

15

10

t
-1.0 -0.5 0.5
-5

-10

-15

(c) x00 + 16π 2 x = 0, x(0) = 2, x0 (0) = −20. The solutions to the characteristic equation are
3.5. CASE III: COMPLEX CONJUGATE ROOTS 75

λ1,2 = ±4πi, so x = c1 cos(4πt) + c2 sin(4πt). The initial conditions yield

c1 = 2
4πc2 = −20,

whose solutions are c1 = 2 and c2 = −5/π. The solution to the initial value problem is
x = 2 cos(4πt) − (5/π) sin(4πt). 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 x00 + 16π 2 x = 0, x(0) = 2, x0 (0) = −20.

t
-1.0 -0.5 0.5
-1

-2

-3

The second theorem in this section is a refinement of the results of theorem 3.5.1, and provides
a general framework for the different 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 ax00 + bx0 + cx = 0, a 6= 0, has the complex conjugate solutions λ = α ± βi, β > 0.
Suppose that the differential equation has the initial conditions x(0) = x0 and x0 (0) = v0 . Then the
solution to the initial value problem is

x(t) = x0 eαt cos(βt) + ((v0 − αx0 )/β)eαt sin(βt) (3.19)

Let s0 = (v0 − αx0 )/β. Define A(t) = eαt x20 + s20 . Define θ = tan−1 (s0 /x0 ) if x0 > 0; and
p

θ = tan−1 (s0 /x0 ) + π if x0 < 0. If x0 = 0, let θ = π/2 if s0 > 0; and θ = −π/2 if s0 < 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


p 3.5.2 for α < 0 (solid curve); the dashed curves are the
amplitude functions ±A(t) = ±e αt x20 + s20 .

t
-6А -4А -2А 2А 4АΒ

Figure 3.9: The solution in theorem


p 3.5.2 for α > 0 (solid curve); the dashed curves are the
amplitude functions ±A(t) = ±eαt x20 + s20 .

t
-6А -4А -2А 2А 4АΒ
3.5. CASE III: COMPLEX CONJUGATE ROOTS 77

Figure 3.10: pThe solution in theorem 3.5.2 for α = 0 (solid curve); the dashed lines give the
amplitude ± x20 + s20 .

t
-2А Ȑ 2А 4АΒ

p
(c) If α = 0, then x(t) oscillates about the t-axis with period 2π/β and fixed amplitude x20 + s20
(see Figure 3.10).

Remark 3.5.1.

(a) Theorem 3.5.2 applies only to the situation when the initial conditions are specified at t0 = 0.
In practice, this involves no loss of generality since we can always re-define our starting time
to be t = 0.

(b) If a = 1 in theorem 3.5.2, then the differential equation takes the form x00 −2αx0 +(α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 undefined if both x0 and s0
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), satisfies the initial condition x(0) = x0 . The
derivative x0 (t) = eαt v0 cos(βt) + eαt ((v0 α − x0 (α2 + β 2 ))/β) sin(βt) satisfies the initial condition
x0 (0) = v0 . It is straightforward to check that x(t) satisfies the differential equation (use that α ± βi
are solutions to the characteristic equation).
To prove equation (3.20), first observe that we may use polar coordinates to write
q
x0 = x20 + s20 cos θ (3.21)
q
s0 = x20 + s20 sin θ. (3.22)
p
It follows that we may write x(t) = eαt x20 + s20 (cos θ cos(βt) + sin θ sin(βt)).
p Using the trigono-
metric identity cos(φ − θ) = cos θ cos φ + sin θ sin φ, x(t) becomes x(t) = eαt x20 + s20 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 θ = s0 /x0 . Note
that θ = tan−1 (s0 /x0 ) if θ is an angle in either quadrant I or quadrant IV; that is, if x0 > 0.
Also, θ = tan−1 (s0 /x0 ) + π if θ is in either quadrantpII or III; that is, if x0 < 0. In the case that
solution is x(t) = s0 eαt sin(βt). If s0 > 0, x20 + s20 = s0 and cos(βt − (π/2)) = sin(βt).
x0 = 0, thep
If s0 < 0, x20 + s20 = −s0 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) x00 + 2x0 + 2x = 0, x(0) = 0, x0 (0) = 1. Since λ = −1 ±pi, α = −1 and β = 1. Also, x0 = 0


and s0 = (v0 − αx0 )/β = (1 − (−1)(0))/1 = 1. Thus, x20 + s20 = 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) x00 − 4x0 + 404x = 0, x(0) = 5, x0 (0) = 0. Here, λ = 2 ± 20i, so α = 2, β = 20. The
p conditions give x0√ = 5 and s0 = (0 − (2)(5))/20 = −1/2. Consequently, A(t) =
initial
e2t 52 + (−1/2)2 = e2t ( 101/2), θ = tan−1 ((−1/2)/5) = tan−1 (−1/10), and the solution is

x = e2t ( 101/2) cos 20t + tan−1 (1/10) .


This is a function with exponentially increasing amplitude and period π/10.


(c) x00 + 16π 2 x = 0, x(0) = 2, x0 (0) = p
−20. The eigenvalues
√ λ = ±4πi give α = 0, β = 4π, and
x0 = 2, v0 = −20 give s0 = −5/π, x20 + s20 = 4π 2 + 25/π and θ = tan−1 (−5/(2π)). Thus
the solution is p
x = ( 4π 2 + 25/π) cos 4πt + tan−1 (5/(2π)) .


The amplitude is A = 4π 2 + 25/π ≈ 2.56 and the period is 1/2.

3.6 Method of Undetermined Coefficients


In this section, we look at differential equations of the form
d2 y dy
a 2
+b + cy = f (x), (3.23)
dx dx
where a 6= 0. That is, we deal with non-homogeneous second-order linear differential equations with
constant coefficients. 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 first theorem in this section shows how solutions
of the corresponding homogeneous differential equation (3.6) are related to those of (3.23).
Theorem 3.6.1. Suppose yh is a solution to the homogeneous second-order linear differential
equation with constant coefficients a(d2 y/dx2 ) + b(dy/dx) + cy = 0 (a 6= 0) and yp is a solution to
the non-homogeneous equation (3.23).
Then y = yp + yh is also a solution to (3.23).
3.6. METHOD OF UNDETERMINED COEFFICIENTS 79

Proof. The proof is easy: since ayh00 + byh0 + cyh = 0 and ayp00 + byp0 + cyp = f (x), y = yp + yh satisfies
ay 00 + by 0 + cy = a(yp00 + yh00 ) + b(yp0 + yh0 ) + c(yp + yh ) = ayp00 + byp0 + cyp + ayh00 + byh0 + cyh = f (x) + 0 =
f (x).

We have seen in the previous sections how to solve homogeneous equations and we obtained
solutions of the form yh = c1 y1 + c2 y2 , c1 , c2 ∈ R. Theorem 3.6.1 tells us that if we can find one
particular solution yp to the non-homogeneous equation, then y = yp + c1 y1 + c2 y2 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 coefficients is that the solution yp 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 yp is also an exponential function; if f (x) is a polynomial function, then we
expect yp to be a polynomial function; etc. We will see in what follows that this idea is a good
guideline, but does not offer a complete description of how to find a particular solution to (3.23).

Exponential Forcing
Example 3.6.1. Consider the differential equation y 00 + 5y 0 + 4y = f (x).

(a) If f (x) = e2x , we use the trial solution yp = Ce2x . This gives 4Ce2x + 10Ce2x + 4Ce2x = e2x ,
or 18Ce2x = e2x , that is C = 1/18. So, yp = (1/18)e2x .

(b) If f (x) = e−x , the use of yp = Ce−x fails, since e−x is already a solution to the homogeneous
differential equation y 00 + 5y 0 + 4y = 0. In this situation, we may use differential operators to
find another trial solution. The differential 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 yp = Cxe−x . Since yp0 = Ce−x − Cxe−x and
yp00 = −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 yp = (x/3)e−x .

By finding all solutions to the homogeneous differential 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 differential equation y 00 + 4y 0 + 4y = f (x). Its characteristic equation
is (λ + 2)2 = 0, so yh = c1 e−2x + c2 xe−2x .

(a) Suppose f (x) = 3e−5x , and the initial conditions are y(0) = 1, y 0 (0) = −1.
Since λ = −5 is not a solution to the characteristic equation, we use the trial solution yp =
Ce−5x . This gives 25Ce−5x − 20Ce−5x + 4Ce−5x = 3e−5x , so C = 1/3. Then yp = (1/3)e−5x
and y = (1/3)e−5x + c1 e−2x + c2 xe−2x . The derivative is y 0 = −(5/3)e−5x − 2c1 e−2x +
c2 e−2x − 2c2 xe−2x . Using y(0) = 1 and y 0 (0) = −1 gives (1/3) + c1 = 1, so c1 = 2/3; and
−(5/3)−2(2/3)+c2 = −1, so c2 = 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) = 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 yp = Cx2 e−2x . Then yp0 =
2Cxe−2x − 2Cx2 e−2x , and yp00 = 2Ce−2x − 8Cxe−2x + 4Cx2 e−2x . The differential equation
becomes Ce−2x (2 − 8x + 4x2 + 8x − 8x2 + 4x2 ) = −4e−2x , which simplifies to 2C = −4, or
C = −2. Hence yp = −2x2 e−2x , and y = −2x2 e−2x + c1 e−2x + c2 xe−2x . Its derivative is
y 0 = 4x2 e−2x − 4xe−2x − 2c1 e−2x + c2 e−2x − 2c2 xe−2x . Using y(0) = 2 and y 0 (0) = 0 yields
c1 = 2 and c2 = 4. The solution to the initial value problem is y = −2x2 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 first find the parameter
involved in the trial solution, and then determine the constants associated with the general solution
to the homogeneous differential equation.

Method of Undetermined Coefficients for Exponential Forcing Functions


If the differential equation is of the form ay 00 + by 0 + cy = deγx , then use:

• the trial solution yp = Ceγx if γ is not a solution to the characteristic equation aλ2 +bλ+c = 0;

• the trial solution yp = Cxeγx if γ is a solution, but not a repeated solution, to the characteristic
equation aλ2 + bλ + c = 0;

• the trial solution yp = Cx2 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 yp = Cxm eγx .

Polynomial Forcing
If the right-hand side of a differential equation of the form ay 00 + by 0 + cy = f (x) is a polynomial
function of degree d, then it stands to reason that the trial solution for yp 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 yp , 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 = yp + yh for each differential equation.

(a) y 00 − 5y 0 + 4y = x2 − x. The characteristic equation has solutions λ = 1 and λ = 4, so


yh = c1 ex + c2 e4x . We use the trial solution yp = A2 x2 + A1 x + A0 . Then yp0 = 2A2 x + A1
and yp00 = 2A2 . The differential equation gives 2A2 − 10A2 x − 5A1 + 4A2 x2 + 4A1 x + 4A0 =
(4A2 )x2 + (−10A2 + 4A1 )x + (2A2 − 5A1 + 4A0 ) = x2 − x. Comparing coefficients gives
4A2 = 1, so A2 = 1/4; (−10/4) + 4A1 = −1, so A1 = 3/8; and (2/4) − (15/8) + 4A0 = 0, so
A0 = 11/32. This yields the particular solution yp = (x2 /4) + (3x/8) + (11/32).

(b) y 00 − 3y 0 = 2 + 2x − 3x2 . The characteristic equation has solutions λ = 0 and λ = 3,


so yh = c1 + c2 e3x . Since any constant function is already a solution to the homogeneous
differential equation, we try solutions of the form yp = A3 x3 + A2 x2 + A1 x. (We need three
coefficients since the left-hand side has three coefficients.) Then yp0 = 3A3 x2 + 2A2 x + A1
3.6. METHOD OF UNDETERMINED COEFFICIENTS 81

and yp00 = 6A3 x + 2A2 . The differential equation gives 6A3 x + 2A2 − 9A3 x2 − 6A2 x − 3A1 =
(−9A3 )x2 + (6A3 − 6A2 )x + (2A2 − 3A1 ) = −3x2 + 2x + 2. Comparing coefficients gives
A3 = 1/3, A2 = 0 and A1 = −2/3. This yields the particular solution yp = (1/3)x3 − (2/3)x.
Note that we could alternatively have integrated both sides of the differential equation y 00 −
3y 0 = 2 + 2x − 3x2 to obtain y 0 − 3y = 2x + x2 − x3 + c1 . We can solve the resulting first-order
linear differential equation by using the integrating-factor method.
(c) 5y 00 = x4 −1. The characteristic equation is 5λ2 = 0, so λ = 0 is a solution with multiplicity 2,
and yh = c1 + c2 x. In this situation, the trial solution yp = A6 x6 + A5 x5 + A4 x4 + A3 x2 + A2 x2
will work. However, it is much easier to simply integrate 5y 00 = x4 − 1 twice: we obtain
5y 0 = (x5 /5) − x + c2 and 5y = (x6 /30) − (x2 /2) + c2 x + c1 . So, yp = (x6 /150) − (x2 /10).

Method of Undetermined Coefficients for Polynomial Forcing Functions


If the differential equation is of the form ay 00 + by 0 + cy = p(x), where p(x) is a polynomial function
of degree d, then use:
• the trial solution yp = Ad xd + Ad−1 xd−1 + . . . + A1 x + A0 if λ = 0 is not a solution to the
characteristic equation;
• the trial solution yp = Ad+1 xd+1 + Ad xd + . . . + A1 x if λ = 0 is a simple solution to the
characteristic equation;
• the trial solution yp = Ad+2 xd+2 + Ad+1 xd+1 + . . . + A2 x2 if λ = 0 is a repeated solution to
the characteristic equation.

Sinusoidal Forcing
A sinusoidal function is a function of the form y = A1 cos(Bx)+A2 sin(Bx). True to the philosophy
of the method of undetermined coefficients, as it appeared above, if the right-hand side f (x) of an
equation of the form ay 00 + by 0 + 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 = yp + yh for each differential equation.
(a) y 00 − 2y 0 + 5y = −4 cos(3x). The characteristic equation has solutions λ = 1 ± 2i, so
yh = c1 ex cos(2x) + c2 ex sin(2x). The trial solution is yp = A1 cos(3x) + A2 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 differential 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 differentiation is concerned. Then
yp0 = −3A1 sin(3x) + 3A2 cos(3x) and yp00 = −9A1 cos(3x) − 9A2 sin(3x). The differential equa-
tion gives −9A1 cos(3x)−9A2 sin(3x)+6A1 sin(3x)−6A2 cos(3x)+5A1 cos(3x)+5A2 sin(3x) =
−4 cos(3x). After combining like terms, cos(3x)(−4A1 − 6A2 ) + sin(3x)(6A1 − 4A2 ) =
−4 cos(3x). Comparing coefficients gives the system of linear equations
−4A1 − 6A2 = −4
6A1 − 4A2 = 0
82 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS

which yields A1 = 4/13 and A2 = 6/13. The particular solution is yp = (4/13) cos(3x) +
(6/13) sin(3x).

(b) y 00 + 4y = 5 cos(2x) − sin(2x). The characteristic equation has solutions λ = ±2i, so yh =


c1 cos(2x) + c2 sin(2x). Since the right-hand side is contained in yh , we must use the trial
solution yp = A1 x cos(2x)+A2 x sin(2x). Then yp0 = cos(2x)(2A2 x+A1 )+sin(2x)(−2A1 x+A2 )
and yp00 = cos(2x)(−4A1 x + 4A2 ) + sin(2x)(−4A2 x − 4A1 ). The differential equation gives
4A2 cos(2x) − 4A1 sin(2x) = 5 cos(2x) − sin(2x). Comparing coefficients gives A1 = 1/4 and
A2 = 5/4. The particular solution is yp = (1/4)x cos(2x) + (5/4)x sin(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 differential equa-
tion with constant coefficients ay 00 + by 0 + cy = f (x), a 6= 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 yp has
the form

yp = xm (A0 + A1 x + · · · + An xn )eαx cos(βx) + xm (B0 + B1 x + · · · + Bn xn )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 yp,1 is a solution to the differential equation ay 00 + by 0 + cy = f1 (x) and if yp,2
is a solution to the differential equation ay 00 + by 0 + cy = f2 (x), then yp,1 + yp,2 is a solution to the
differential equation ay 00 + by 0 + cy = f1 (x) + f2 (x).
Proof. The result follows immediately from observing that (yp,1 + yp,2 )0 = yp,1
0 + y0
p,2 and (yp,1 +
00 00 00
yp,2 ) = yp,1 + yp,2 .

Example 3.6.5. For each differential equation, set up solutions of the form given in equation (3.24).
(a) x00 + 2x0 + 10x = (3t3 − 2t + 5)e−t cos(3t) − t2 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

xp = t(A0 + A1 t + A2 t2 + A3 t3 )e−t cos(3t) + t(B0 + B1 t + B2 t2 + B3 t3 )e−t sin(3t).

(b) 4x00 − 4x0 + x = t3 et/2 + et/2 cos t. Here, λ = 1/2 is a zero of multiplicity m = 2, which means
the first term has the corresponding trial solution t2 (A0 + A1 t + A2 t2 + A3 t3 )et/2 . The second
term has trial solution B0 et/2 cos t + C0 et/2 sin t. According to the principle of superposition,
the overall trial solution is

t2 (A0 + A1 t + A2 t2 + A3 t3 )et/2 + B0 et/2 cos t + C0 et/2 sin t.


3.7. HIGHER-ORDER LINEAR EQUATIONS WITH CONSTANT COEFFICIENTS 83

Note that the factor t2 does not appear in the second trial solution, since λ = (1/2) + i is not
a solution to the characteristic equation.

(c) x00 − x0 = t3 − 1 + t2 et − 5te2t sin(3t). The characteristic equation is λ2 − λ = 0, so λ =


0 and λ = 1 are solutions. The particular solution corresponding to the term t3 − 1 is
t(A0 + A1 t + A2 t2 + A3 t3 ) (α = β = 0, m = 1, n = 3 in theorem 3.6.2); the particular solution
for t2 et is t(B0 + B1 t + B2 t2 )et (α = 1, β = 0, m = 1, n = 2 in theorem 3.6.2); for 5te2t sin(3t),
the particular solution is (C0 + C1 t)e2t cos(3t) + (D0 + D1 t)e2t 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 Coefficients


In this section, we will generalize methods for solving second-order linear differential equations with
constant coefficients, both homogeneous and non-homogeneous, to differential 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

dn y dn−1 y dy
an n
+ an n−1
+ . . . + a1 + a0 y = 0, (3.25)
dx dx dx
or to the corresponding non-homogeneous version

dn y dn−1 y dy
an n
+ an n−1
+ . . . + a1 + a0 y = f (x). (3.26)
dx dx dx
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 differential equation with constant co-
efficients (3.25) where an 6= 0. The characteristic equation

an λn + an−1 λn−1 + . . . + a1 λ + a0 = 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 , . . . , xm−1 eλx are solutions to the
differential equation (3.25).

(b) If λ = α ± βi, β 6= 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), . . . , xm−1 eαx cos(βx), xm−1 eαx sin(βx) are
solutions to the differential equation (3.25).

If y1 , y2 , . . . , yn is the full set of distinct solutions in (a) and (b) above, then for any choice of
real numbers c1 , c2 , . . . , cn , the function y = c1 y1 + c2 y2 + . . . + cn yn is a solution to (3.25).
Furthermore, these numbers are uniquely determined by initial conditions of the form

y(x0 ) = y0 , y 0 (x0 ) = y1 , . . . , y (n−1) (x0 ) = yn−1 . (3.28)


84 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS

Theorem 3.6.1, theorem 3.6.2 (method of undetermined coefficients) and theorem 3.6.3 (principle
of superposition) now take the following form.

Theorem 3.7.2. (1) If yh is a solution to the homogeneous equation (3.25) and yp is a solution
to the non-homogeneous equation (3.26), then y = yp + yh 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 yp has the form

yp = xm (A0 + A1 x + · · · + An xn )eαx cos(βx) + xm (B0 + B1 x + · · · + Bn xn )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 yp,1 is a solution to the differential equation an y (n) +an−1 y (n−1) +. . . a1 y 0 +a0 y = f1 (x) and
if yp,2 is a solution to the differential equation an y (n) + an−1 y (n−1) + . . . a1 y 0 + a0 y = f2 (x),
then yp,1 + yp,2 is a solution to the differential equation an y (n) + an−1 y (n−1) + . . . a1 y 0 + a0 y =
f1 (x) + f2 (x).

Example 3.7.1. Consider the initial value problem

x000 − x00 − x0 + x = et − e−t + t2 , x(0) = 1, x0 (0) = 0, x00 (0) = −1. (3.30)

We first look at the corresponding homogeneous differential equation x000 − x00 − x0 + 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 xh = c1 e−t + c2 et + c3 tet .
By the method of undetermined coefficients, the trial solution for the term et is xp = At2 et
since λ = 1 has multiplicity 2 in the characteristic equation; the trial solution for e−t is xp = Bte−t
since λ = 1 has multiplicity 2; and the trial solution for t2 is xp = C0 + C1 t + C2 t2 since λ = 0 is
not a solution to the characteristic equation. Using the principle of superposition, the overall trial
solution, and its first, second and third derivatives, are of the form:

xp = At2 et + Bte−t + C0 + C1 t + C2 t2 ,
x0p = At2 et + 2Atet − Bte−t + Be−t + C1 + 2C2 t,
x00p = At2 et + 4Atet + 2Aet + Bte−t − 2Be−t + 2C2 ,
x000
p = At2 et + 6Atet + 6Aet − Bte−t + 3Be−t .

Using the differential equation, and equating like terms yields the following equations.

6Aet − 2Aet = et
3Be−t + 2Be−t − Be−t = −e−t
C2 t 2 = t 2
−2C2 t + C1 t = 0
−2C2 − C1 + C0 = 0
3.8. THE STRUCTURE OF THE SOLUTION SPACE FOR LINEAR EQUATIONS 85

Note that the terms containing t2 et , tet 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, C2 = 1, C1 = 2 and
C0 = 4, so a particular solution is xp = (t2 /4)et − (t/4)e−t + t2 + 2t + 4.
Now, we need to use the initial conditions to determine the constants c1 , c2 , c3 in the solution

x = (t2 /4)et − (t/4)e−t + t2 + 2t + 4 + c1 e−t + c2 et + c3 tet .

Taking first and second derivatives gives

x0 = ((t2 /4) + (t/2))et + ((t/4) − (1/4))e−t + 2t + 2 − c1 e−t + (c2 + c3 )et + c3 tet


x00 = ((t2 /4) + (3t/4) + (1/2))et + (−(t/4) + (1/2))e−t + 2 + c1 e−t + (c2 + 2c3 )et + c3 tet .

Using x(0) = 1, x0 (0) = 0, x00 (0) = −1 yields the linear equations 4 + c1 + c2 = 1, −(1/4) + 2 −
c1 + c2 + c3 = 0, and (1/2) + (1/2) + 2 + c1 + c2 + 2c3 = −1. The solutions to these equations are
c1 = −7/8, c2 = −17/8, and c3 = −1/2. Consequently, the solution to the initial value problem is

x = (t2 /4)et − (t/4)e−t + t2 + 2t + 4 − (7/8)e−t − (17/8)et − (1/2)tet .

Example 3.7.2. Find the general form of solutions for each differential 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 yh = c1 e2t + c2 e−2t + c3 cos(2t) + c4 sin(2t). Using the method
of undetermined coefficients, a particular solution will be of the form yp = A1 t cos(2t) +
A2 t sin(2t) + Bte−2t + C1 e−2t cos(2t) + C2 e−2t sin(2t).
(b) x(5) +2x000 +x0 = 3 sin t−t+4e2t . 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 yh = c1 + c2 cos t + c3 sin t + c4 t cos t + c5 t sin t. Using the method of undetermined
coefficients, a particular solution will be of the form yp = A1 t2 cos t + A2 t2 sin t + B1 t + B2 t2 +
Ce2t .

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 differential
equations (homogeneous and non-homogeneous). In particular, the coefficients of the equations
studied here are not assumed to be constant. That is, we consider equations of the form
dn y dn−1 y d2 y dy
an (x) + a n−1 (x) + . . . + a2 (x) + a1 (x) + a0 (x)y = 0 (3.31)
dxn dxn−1 dx2 dx
(homogeneous case), or
dn y dn−1 y d2 y dy
an (x) n
+ an−1 (x) n−1
+ . . . + a2 (x) 2
+ a1 (x) + a0 (x)y = f (x) (3.32)
dx dx dx dx
(non-homogeneous case), where an (x) is not identically zero. Our first 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 first-order equations
(theorem 1.8.1).
86 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS

Theorem 3.8.1. Suppose the coefficient functions an (x), an−1 (x), . . . , a1 (x), a0 (x) and the right-
hand side f (x) in equation (3.32) are all continuous at x0 , and suppose an (x0 ) 6= 0. Then for any
choice of y0 , y1 , . . . , yn−1 , the initial value problem

an (x)y (n) + . . . + a1 (x)y 0 + a0 (x)y = f (x), y(x0 ) = y0 , y 0 (x0 ) = y1 , . . . , y (n−1) (x0 ) = yn−1 (3.33)

has a unique solution which is defined on some open interval containing x0 .

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 affine space.

Theorem 3.8.2. If y1 and y2 are solutions to the homogeneous equation (3.31) and r, s ∈ R,
then ry1 + sy2 is also a solution to the homogeneous equation. If yp is a solution to the non-
homogeneous equation (3.32) and yh is a solution to the homogeneous equation (3.31), then yp + yh
is also a solution to the non-homogeneous equation.

Proof. Both statements follow from the fact that differentiation is a linear operator. More explicitly,
(n)
an (x)(ry1 +sy2 )(n) +an−1 (x)(ry1 +sy2 )(n−1) +. . .+a1 (x)(ry1 +sy2 )0 +a0 (x)(ry1 +sy2 ) = r(an (x)y1 +
(n−1) (n) (n−1)
an−1 (x)y1 + . . . + a1 (x)y10 + a0 (x)y1 ) + s(an (x)y2 + an−1 (x)y2 + . . . + a1 (x)y20 + a0 (x)y2 ) =
(n)
r·0+s·0 = 0. Also, an (x)(yp +yh ) +an−1 (x)(yp +yh ) (n−1) +. . .+a1 (x)(yp +yh )0 +a0 (x)(yp +yh ) =
(n) (n−1) (n) (n−1)
(an (x)yp + an−1 (x)yp + . . . + a1 (x)yp0 + a0 (x)yp ) + (an (x)yh + an−1 (x)yh + . . . + a1 (x)yh0 +
a0 (x)yh ) = 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 coefficient functions an (x), an−1 (x), . . . , a1 (x), a0 (x) in equation (3.31)
are all continuous at x0 , and suppose an (x0 ) 6= 0.
Then there exist n linearly independent solution functions y1 , y2 , . . . , yn , defined on some open
set containing x0 , 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 = c1 y1 + c2 y2 + . . . cn yn .

Proof. Let yi be the, according to theorem 3.8.1, unique solution to (3.31) subject to the initial
values
(i−2) (i−1) (i) (n−1)
yi (x0 ) = 0, yi0 (x0 ) = 0, . . . , yi (x0 ) = 0, yi (x0 ) = 1, yi (x0 ) = 0, . . . , yi (x0 ) = 0.

That is, the (i − 1)-st derivative of yi at x0 is 1, all others are zero. If y is an arbitrary solution
to the homogeneous equation, let c1 = y(x0 ), c2 = y 0 (x0 ), . . . cn = y (n−1) (x0 ). Then we claim that
y = ỹ, where ỹ = c1 y1 + c2 y2 + . . . + cn yn .
To see this, observe that ỹ(x0 ) = c1 y1 (x0 )+c2 y2 (x0 )+. . .+cn yn (x0 ) = c1 ·1+c2 ·0+. . .+cn ·0 =
c1 = y(x0 ). Also, ỹ 0 (x0 ) = c1 y10 (x0 )+c2 y20 (x0 )+. . .+cn yn0 (x0 ) = c1 ·0+c2 ·1+. . .+cn ·0 = c2 = y 0 (x0 ).
In general, we have that ỹ (i) (x0 ) = y (i) (x0 ) for i = 0, 1, . . . , n − 1. Using the uniqueness of solutions
in theorem 3.8.1, this means ỹ = y.
So far, we have shown that the functions y1 , y2 , . . . yn span the solution space to the homogeneous
differential equation (3.31). To see that they are linearly independent, we need to show that if
c1 y1 + c2 y2 + . . . cn yn = 0, then c1 = c2 = . . . = cn = 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 c1 y1 (x) + c2 y2 (x) + . . . cn yn (x) = 0. If we substitute in
x = x0 , and use that y1 (x0 ) = 1, and yi (x0 ) = 0 for i = 2, 3, . . . , n, we get c1 = 0. Then, we take
the first derivative, and evaluate at x = x0 : c2 y20 (x0 ) + c3 y30 (x) + . . . cn yn0 (x) = 0. Since y20 (x0 ) = 1
and yi0 (x0 ) = 0 all all other i’s, c2 = 0. By taking further derivatives and substituting in x = x0 ,
we obtain c1 = c2 = . . . = cn = 0.

Remark 3.8.1. A solution of the form yh = c1 y1 +c2 y2 +. . . cn yn to the n-th order linear homogeneous
equation (3.31) with y1 , y2 , . . . , yn 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 definition.

Definition 3.8.1. Let φ1 , φ2 , . . . , φn be functions. Then we define the Wronskian determinant (or
simply the Wronskian) of these functions as

···
 
φ1 φ2 φn
 φ01 φ02 ··· φ0n 
W (φ1 , φ2 , . . . , φn ) = det  .. .. .. . (3.34)
 
 . . . 
(n−1) (n−1) (n−1)
φ1 φ2 · · · φn

Lemma 3.8.1. Suppose the Wronskian of the functions φ1 , φ2 , . . . , φn is non-zero at some value
x0 . Then the functions are linearly independent.

Proof. Suppose W (φ1 , φ2 , . . . , φn )(x0 ) 6= 0 and c1 φ1 + c2 φ2 + . . . + cn φn = 0 for c1 , c2 , . . . , cn ∈ R.


We need to show that c1 = c2 = . . . = cn = 0. Taking derivatives and evaluating at x0 , we obtain
the following equations.

c1 φ1 (x0 ) + c2 φ2 (x0 ) + . . . + cn φn (x0 ) = 0


c1 φ01 (x0 ) + c2 φ02 (x0 ) + . . . + cn φ0n (x0 ) = 0
.. ..
. .
(n−1) (n−1)
c1 φ1 (x0 ) + c2 φ2 (x0 ) + . . . + cn φ(n−1)
n (x0 ) = 0
(i)
This is a linear system with the unknowns c1 , c2 , . . . , cn and coefficient matrix (φj )i=0,...,n−1;j=1,...,n .
The determinant of this matrix is the Wronskian W (φ1 , φ2 , . . . , φn )(x0 ), which is non-zero. So the
linear system has a unique solution, namely c1 = c2 = . . . = cn = 0.

Example 3.8.1. Consider the functions φ1 (t) = 1, φ2 (t) = t, φ3 (t) = t2 , φ4 (t) = t3 , . . . , φn (t) = tn−1
for fixed n. The Wronskian is
1 t t2 t3 · · · tn−1
 
 0 1 2t 3t2 · · · (n − 1)tn−2 
 
 0 0 2 6t · · · (n − 1)(n − 2)tn−3 
W (φ1 , φ2 , . . . , φn )(t) = det   = 0!·1!·2!·3! · · · (n−1)! 6= 0,
 .. .. . . .. 
 . . . . 
0 0 0 0 ··· (n − 1)!

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λn t for fixed n and
distinct real or complex values λ1 , λ2 , . . . , λn . The Wronskian is
eλ1 t e λ2 t e λn t
 
···
 λ1 eλ1 t λ 2 e λ2 t · · · λ n e λn t 
 
2 λ1 t λ22 eλ2 t · · · λ2n eλn t 
W (φ1 , φ2 , . . . , φn )(t) = det  λ1 e .

 .. .. .. 
 . . . 
λ1n−1 eλ1 t λn−1
2 eλ2 t · · · λnn−1 eλn t
If t = 0, the Wronskian is the determinant of the the Vandermonde matrix
 
1 1 ··· 1
 λ1
 λ2 · · · λn 
 λ 2 2
λ2 · · · λ2n 
 1 .
 .. .. .. 
 . . . 
n−1 n−1 n−1
λ1 λ2 · · · λn
Q
Its determinant is 1≤i<j≤n (λ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 coefficients, 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 differential equation with constant
coefficients an y (n) + an−1 y (n−1) + . . . + a1 y 0 + a0 y = 0 where an 6= 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 differential equation.
(a) y = eλx , xeλx , . . . , xm−1 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), . . . , xm−1 eαx cos(βx), xm−1 eαx sin(βx)
in the case that λ = α ± βi, β 6= 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 differential 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 differential equation in
a more manageable form: Expand and TrigReduce.
Example 3.9.1. When solving the differential equation in part (b) of example 3.6.1, the algebraic
result is return in factored form.
DSolve@y ''@xD + 5 * y '@xD + 4 * y@xD Š Exp@- xD, y@xD, xD

99y@xD ® ã-x H- 1 + 3 xL + ã-4 x C@1D + ã-x C@2D==


1
9
3.10. EXERCISES 89

This can be changed by applying Expand to the expression.

Expand@DSolve@y ''@xD + 5 * y '@xD + 4 * y@xD Š Exp@- xD, y@xD, xDD

99y@xD ® -
ã-x ã-x x
+ + ã-4 x C@1D + ã-x C@2D==
9 3

Example 3.9.2. Similarly, Mathematica sometimes returns trigonometric expressions in a rather


idiosyncratic form. For instance, the differential equation in example 3.6.4, part (a) is evaluated as
follows.

DSolve@y ''@xD - 2 * y '@xD + 5 * y@xD Š - 4 * Cos@3 xD, y@xD, xD

99y@xD ® ãx C@2D Cos@2 xD + ãx C@1D Sin@2 xD +

H13 Cos@xD Cos@2 xD - 5 Cos@2 xD Cos@5 xD + 13 Cos@2 xD Sin@xD + 13 Cos@xD Sin@2 xD +


1
26
Cos@5 xD Sin@2 xD - 13 Sin@xD Sin@2 xD - Cos@2 xD Sin@5 xD - 5 Sin@2 xD Sin@5 xDL==

Applying TrigReduce simplifies this expression.

TrigReduce@DSolve@y ''@xD - 2 * y '@xD + 5 * y@xD Š - 4 * Cos@3 xD, y@xD, xDD

99y@xD ® H13 ãx C@2D Cos@2 xD + 4 Cos@3 xD + 13 ãx C@1D Sin@2 xD + 6 Sin@3 xDL==


1
13

Finally, Expand distributes the constant factor.

Expand@TrigReduce@DSolve@y ''@xD - 2 * y '@xD + 5 * y@xD Š - 4 * Cos@3 xD, y@xD, xDDD

99y@xD ® ãx C@2D Cos@2 xD +


4 6
Cos@3 xD + ãx C@1D Sin@2 xD + Sin@3 xD==
13 13

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) ♣ x00 − 7x0 + 6x = 0, x(0) = 1, x0 (0) = −1

(b) ♣ x00 + x0 − 2x = 0, x(0) = 0, x0 (0) = 1

(c) ♣ 5x00 − x0 = 0, x(1) = 0, x0 (1) = 1

(d) ♣ 9x00 − 12x0 + 4x = 0, x(0) = −1, x0 (0) = 0

(e) ♣ x00 + 25x = 0, x(0) = −4, x0 (0) = 0


90 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS

(f) ♣ 4x00 + 4x0 + 5x = 0, x(0) = 2, x0 (0) = 3

(g) ♣ x000 − x00 − x0 + x = 0, x(0) = 1, x0 (0) = 0, x00 (0) = −1

Exercise 3.2. Find a solution to each of the following initial value problems.

(a) y 00 − 5y 0 − 14y = 0, y(0) = 1, y 0 (0) = −3

(b) y 00 − 4y 0 = 0, y(0) = −1, y 0 (0) = 2

(c) 2y 00 − 5y 0 − 3y = 0, y(−1) = 0, y 0 (−1) = 1

(d) y 00 − 2y 0 + y = 0, y(0) = 2, y 0 (0) = 1

(e) 4y 00 + 81y = 0, y(0) = 1, y 0 (0) = −2

(f) y 00 + 4y 0 + 53y = 0, y(0) = 1, y 0 (0) = −3

(g) y 000 − y 00 − 20y 0 = 0, y(0) = 1, y 0 (0) = −1, y 00 (0) = 1

(h) 4y 000 − 8y 00 + 21y 0 − 17y = 0, y(0) = 0, y 0 (0) = 1, y 00 (0) = 0

Exercise 3.3. Find the general solution xh to each of the following homogeneous linear equations.

(a) ♣ x00 + 4x0 + 4x = 0

(b) ♣ x00 + 4x0 + 5x = 0

(c) ♣ x000 − 3x00 + 3x0 − x = 0

(d) ♣ x(4) + 8x00 + 16x = 0

(e) 8x00 + 10x0 − 3x = 0

(f) 81x00 − 18x0 + 2x = 0

(g) x000 + 4x00 − 3x0 − 18x = 0

(h) x(4) − 4x000 + 6x00 − 4x0 + 5x = 0

Exercise 3.4. Find a homogeneous linear equation that has the given general solution.

(a) yh = c1 cos(5x) + c2 sin(5x)

(b) yh = c1 e−x cos(x/2) + c2 e−x sin(x/2)

(c) yh = c1 e−3x + c2 e−x + c3 xe−x

(d) yh = c1 e2x + c2 + c3 x + c4 x2

Exercise 3.5. Find a particular solution xp to each of the differential equations.

(a) ♣ x00 − 7x0 + 6x = 3 sin(2t)


3.10. EXERCISES 91

(b) ♣ 5x00 − x0 = t2 − 4

(c) ♣ 9x00 − 12x0 + 4x = e2t/3

(d) ♣ x00 + 25x = 2 cos(5t) − sin(5t)

(e) x00 − x0 = e2t

(f) 4x00 − 4x0 + x = 3 sin t

(g) 9x00 − x0 = t − t2

(h) x00 − 4x0 + 4x = −et cos(3t)

Exercise 3.6. Set up the general form of the trial solution for xp . You need not find the values of
the coefficients or solve the differential equations.

(a) ♣ x000 − x00 − x0 + x = t3 e−t − tet

(b) ♣ 4x00 + 4x0 + 5x = (2t − t2 ) sin(2t) + te−t/2 cos(2t)

(c) x000 + x00 = 2t − 1 − e−t

(d) x00 − 2x0 + 5x = et cos(2t) − sin(2t)

Exercise 3.7. Find the solution to each initial value problem.

(a) ♣ 2y 00 − 9y 0 − 5y = xe−5x , y(0) = 0, y 0 (0) = 1

(b) ♣ y 00 − 2y 0 + 10y = sin(3x), y(0) = 1, y 0 (0) = 0

(c) y 00 + 2y 0 + 10y = e−x sin(3x), y(0) = 0, y 0 (0) = 0

(d) y 000 + 3y 00 = x2 e−3x , y(0) = −1, y 0 (0) = 1, y 00 (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 α 6= β, α, β 6= 0.

(b) ♣ φ1 (t) = eλt , φ2 (t) = teλt , φ3 (t) = t2 eλt .

(c) φ1 (t) = eαt cos(βt), φ2 (t) = eαt sin(βt); for β 6= 0.

(d) φ1 (t) = cos(αt), φ2 (t) = sin(αt), φ3 (t) = t cos(αt), φ4 (t) = t sin(αt); for α 6= 0.

Exercise 3.9. In this problem we consider second-order Euler equations. They are of the form

at2 x00 + btx0 + cx = 0,


where a, b, c are constants.
92 CHAPTER 3. HIGHER-ORDER LINEAR DIFFERENTIAL EQUATIONS

(a) Show that if x = tr , then r satisfies the indicial equation

ar2 + (b − a)r + c = 0.

(b) Show that if the indicial equation has a repeated root r, then x = tr 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) t2 x00 + tx0 − x = 0, x(1) = 1, x0 (1) = 0

(b) t2 x00 − tx0 + 2x = 0, x(1) = 0, x0 (1) = 2

Exercise 3.11. Let φ1 (x), φ2 (x) be two solutions to the second-order nonlinear homogeneous dif-
ferential equation
d2 y dy
2
+ p(x) + q(x)y = 0. (3.35)
dx dx
(a) Show that the Wronskian W (x) = W (φ1 , φ2 )(x) satisfies the first-order equation

dW
= −p(x)W (x).
dx

(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

d2 y dy
a2 (x) 2
+ a1 (x) + a0 (x)y = 0. (3.36)
dx dx
Show that if φ2 (x) = v(x)φ1 (x), and φ2 (x) is also a solution to (3.36), then w(x) = v 0 (x) satisfies
the first-order linear differential equation

a2 (x)φ1 (x)w0 (x) + (2a2 (x)φ01 (x) + a1 (x)φ1 (x))w(x) = 0. (3.37)

Thus, if we know one solution to (3.36), we may find 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 differential equations.

(a) xy 00 + (x − 1)y 0 − y = 0, given that φ1 (x) = e−x is a solution.

(b) y 00 − 2y 0 + y = 0, given that φ1 (x) = ex is a solution.

(c) x2 y 00 + 3xy 0 + 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) = x2 (1 + sgn(x)) and φ2 (x) = x2 (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 differentiable on all of R, and find 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 find a particular solution to a non-homogeneous
second-order linear differential equation of the form

y 00 + p(x)y 0 + q(x)y = f (x). (3.38)

The method is based on variation of parameters, as explained here. Let yh = c1 y1 + c2 y2 be the


(known) general solution to the corresponding homogeneous equation; i.e. y100 + p(x)y10 + q(x)y1 = 0
and y200 + p(x)y20 + q(x)y2 = 0. We assume the (unknown) particular solution is of the form

y = c1 (x)y1 + c2 (x)y2 . (3.39)

That is, the parameters are replaced by functions of the independent variable. We now aim to
determine c1 (x) and c2 (x) by using that y satisfies (3.38). Since this constitutes only one condition
on two functions, we formulate the additional condition

c01 (x)y1 + c02 (x)y2 = 0. (3.40)

Show that equations (3.39) and (3.40) imply

f (x)y2 f (x)y1
c01 (x) = − and c02 (x) = . (3.41)
W (y1 , y2 ) W (y1 , y2 )

Exercise 3.16. Use the method of variation of parameters in exercise 3.15 to find the general solution
to each differential equation.

(a) y 00 + y = sec x

(b) x2 y 00 + 3xy 0 + y = xr , given that y1 = 1/x, y2 = 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 fits 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 first-order
autonomous differential 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.

F F
*
*
x<x ÞF>0 x x>x* ÞF<0

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 Newton’s 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(d2 /dt2 )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.
×
vescape

F F

which the force is acting). In our situation, displacement means displacement from equilibrium.
Thus equation (4.1) becomes m(d2 /dt2 )(x − x∗ ) = h(x − x∗ ), or simply:

mẍ = h(x − x∗ ). (4.2)

(In this section, we use the notation ẋ for x0 and ẍ for x00 when taking derivatives with respect to
time.)

The Mass-Spring Model


If a mass is attached to to a spring that satisfies Hooke’s 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ẍ = −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) fits 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 satisfies 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ẍ + 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
r ! r !
k k
x = c1 cos t + c2 sin t . (4.5)
m m

Proof. The characteristic 2


p equation is mλ +k = 0. Since m, k > 0, the p solutions to thepcharacteristic
equation are λ = ±i k/m. By theorem 3.8.4, the functions cos( k/m t) and sin( k/m t) 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.
p
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 effects 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 ω = 2πf .

Free Response with Friction


Suppose we want to include in our model the presence of frictional forces. As a first 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ẋ, 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ẍ + cẋ + 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 differential
equation mẍ + cẋ + kx = 0.
p
(a) Under-damping: c2 − 4km < 0. Let ω = (4km − c2 )/(4m2 ). The general solution is of the
form
x = c1 e−c/(2m)t cos(ωt) + c2 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 effects (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: c2 − 4km = 0. The general solution is of the form

x = c1 e−c/(2m)t + c2 te−c/(2m)t . (4.8)

p
(c) Over-damping: c2 − 4km > 0. Let λ1,2 = −c/(2m) ± (c2 − 4km)/(4m2 ). The general
solution is of the form
x = c1 eλ1 t + c2 eλ2 t . (4.9)

Proof. Thep solutions to the characteristic equation mλ2 +cλ+k = 0 are λ = (−c± c2 − 4km)/(2m) =
−c/(2m) ± (c2 − 4km)/(4m2 ). Theorem 3.8.4 gives us the following results: if c2 − 4km < 0, then
the two solutions are conjugate complex numbers, and the general solution to the differential equa-
tion is given by equation (4.7); if c2 − 4km = 0, then there is the repeated solution λ = −c/(2m)
to the characteristic equation, and the general solution is given by (4.8); if c2 − 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 p
that the system still has a well-defined and constant (circular)
eigenfrequency, namely ω = (4km − c2 )/(4m2 ). 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


p solution for an under-damped mass-spring system. The (circular)
eigenfrequency is ω = (4km − c2 )/(4m2 ).

t
2АΩ 4АΩ 6АΩ 8АΩ


(b) As c % 4km (i.e. c2 − 4km % 0), the eigenfrequency approaches zero, or equivalently, the
period of the motion becomes infinitely large. This marks the transition to the over-damped
case where the bifurcation occurs for the critically damped case c2 − 4km = 0. Both in the
critically damped and the over-damped case, the differential 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.

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ẍ + kx = f (t) (4.10)
in the undamped case, and
mẍ + cẋ + 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 coefficients (section 3.6). If the forcing function is of a different
type than the ones covered in section 3.6, Laplace Transform methods (as described in chapter 8)
can be used to find 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ẍ + kx = a cos(ωt) + b sin(ωt), (4.12)

wherepwe assume that ω 6= ω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 c1 cos(ω0 t) +
c2 sin(ω0 t). According to the method of undetermined coefficients, we need to use a trial solution
of the form xp = A cos(ωt) + B sin(ωt) for finding a particular solution (assuming ω 6= ω0 ). Since
ẋp = −Aω sin(ωt) + Bω cos(ωt) and ẍp = −Aω 2 cos(ωt) − Bω 2 sin(ωt), equation (4.12) becomes

−mAω 2 cos(ωt) − mBω 2 sin(ωt) + kA cos(ωt) + kB sin(ωt) = a cos(ωt) + b sin(ωt).


4.1. MECHANICAL VIBRATIONS 103

Combining like terms and comparing coefficients gives A = a/(k − mω 2 ) and B = b/(k − mω 2 ).
Using ω02 = k/m further yields A = a/(m(ω02 − ω 2 )) and B = b/(m(ω02 − ω 2 )). Hence the solutions
to (4.12) are of the form
1
x= (a cos(ωt) + b sin(ωt)) + c1 cos(ω0 t) + c2 sin(ω0 t). (4.13)
m(ω02 − ω2)

Using polar coordinates √as in the proof of theorem 3.5.2, we can see that the amplitude
p of the
forcing function in (4.12) is a2 + b2 ; the amplitude of the homogeneous solution is c21 + c22 . The
amplitude of the inhomogeneous terms √ (which can 2be understood as the response to the forcing
2 2 2
function) of the solution to (4.12) is a + b /(m|ω0 − ω |). We may therefore define the quotient
of the amplitude of the response function to the amplitude of the forcing function as
response amplitude 1
= . (4.14)
forcing amplitude m|ω02 − ω 2 |

The graph of the function ω 7→ 1/(m|ω02 − ω 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.

1HmΩ20 L


Ω0

Example 4.1.1. We want to find the formula and draw the graph of the solution to the initial value
problem
0.01ẍ + 0.25x = cos(ωt), x(0) = 5, ẋ(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 xp = (400/99) cos(0.5t) with the (high frequency, small amplitude) eigen-
function xh = (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(52 − 0.52 )) = (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 xp = (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).

x x
4
4

2
2

t t
5 10 15 20 25 5 10 15 20

-2 -2

-4
-4

with the (small amplitude) eigenfunction xh = −(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(52 − 32 )) = (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).
x x
6
6
4
4

2 2

t t
5 10 15 20 25 5 10 15 20
-2 -2

-4
-4
-6
-6

(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(52 − 4.52 )) = (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).
x x
20
30

20
10
10

t t
5 10 15 20 25 5 10 15 20
-10
-10
-20

-30
-20

Figure 4.15: The solution of equation (4.15) for ω = 4.6, 4.7, 4.8, 4.9 (left to right, top to bottom).
x x
60
40
40
20
20

t t
5 10 15 20 25 5 10 15 20 25
-20
-20
-40
-40
-60

x x
100

150
50 100

50
t
5 10 15 20 25 t
5 10 15 20 25
-50
-50
-100

-150
-100
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
p p
mẍ + kx = a cos(( k/m)t) + b sin(( k/m)t). (4.16)

To obtain the general solution


p to this equation, we must use the trial solution xp = At cos(ω0 t) +
Bt sin(ω0 t), where ω0 = k/m. Then ẋp = A cos(ω0 t) − Aω0 t sin(ω0 t) + B sin(ω0 t) + Bω0 t cos(ω0 t)
and ẍp = −2Aω0 sin(ω0 t) − Aω02 t cos(ω0 t) + 2Bω0 cos(ω0 t) − Bω02 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

b a
x=− t cos(ω0 t) + t sin(ω0 t) + c1 cos(ω0 t) + c1 sin(ω0 t). (4.17)
2mω0 2mω0
Example 4.1.2. For the initial value problem

0.01ẍ + 0.25x = cos(5t), x(0) = 5, ẋ(0) = 0 (4.18)


p
ω0 = 0.25/0.01 = 5, so the solution is of the form x = 1/(2 · 0.01 · 5)t sin(5t) + c1 cos(5t) +
c2 sin(5t) = 10t sin(5t) + c1 cos(5t) + c2 sin(5t). The initial conditions give c1 = 5 and c2 = 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.
x

200

100

t
5 10 15 20 25

-100

-200

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 infinity. Of course, in a physical system, infinite
amplitudes are not possible. Most likely, resonance will lead to the physical destruction of the
system. A famous example is that of the (first) 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
influencing 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 modifications 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).
Coulombs’s Law states that the voltage drop UC across a capacitor is proportional to the
charge on the capacitor. Since the current I builds up the charge
´t on the capacitor over time, the
total charge at time t is given by the integral Q(t) = Q0 + t0 I(τ ) dτ , where Q0 is the charge at
time t0 . This gives
 ˆ t 
1
UC = Q0 + I(τ ) dτ , (4.19)
C t0

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, Kirchhoff ’s 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.

R L

UL + UR + UC = E(t). This leads to the differential equation


dI 1
L· + R · I + Q = E(t).
dt C
Using the fact that I = dQ/dt, and differentiating both sides, we obtain a second-order linear
differential equation with constant coefficients for the current I = I(t) at time t:
d2 I dI 1
L· +R· + I = E 0 (t). (4.20)
dt2 dt C
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) = c1 cos(ωt)+c2 sin(ωt).
Since E 0 (t) = c2 ω cos(ωt) − c1 ω sin(ωt), the equation (4.20) becomes
d2 I dI 1
L· 2
+R· + I = c2 ω cos(ωt) − c1 ω sin(ωt). (4.21)
dt dt C
The free-response equation without friction is
d2 I 1
L·2
+ I = 0, (4.22)
dt C

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
p
From equation (4.21), we see that the amplitude of the forcing function is ω 2 (c21 + c22 ). On
the other hand, a particular solution to (4.21) can be obtained via the method of undetermined
coefficients by using the trial solution Ip = A cos(ωt) + B sin(ωt). It can be shown that A =
(Cω)(c2 + c1 RCω − c2 CLω 2 )/(1 − 2CLω 2 + C 2 ω 2 (R2 + L2 ω 2 )) and B = (Cω)(−c1 + c2 RCω +
c1 CLω 2 )/(1 − 2CLω 2 + C 2 ω 2 (R2 + L2 ω 2 )). The amplitude of the response function is consequently
s
p C 2 ω 2 (c21 + c22 )
A2 + B 2 = (4.23)
1 − 2CLω 2 + C 2 ω 2 (R2 + L2 ω 2 )

and
s
response amplitude C2 1
= 2 2 2 2 2 2
=p .
forcing amplitude 1 − 2CLω + C ω (R + L ω ) (1/C)2 − 2(L/C)ω 2 + ω 2 (R2 + L2 ω 2 )

Using that (1/C)2 −2(L/C)ω 2 +ω 4 L2 = ((1/C)−Lω 2 )2 = L2 (1/(LC)−ω 2 )2 and that ω0 = 1/ LC
leads to
response amplitude 1
=p 2
. (4.24)
forcing amplitude L (ω0 − ω 2 )2 + R2 ω 2
2
p √
This quantity is obviously maximal if ω = ω0 , and its maximal value is 1/ R2 ω02 = 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 amplification 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 find 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 = 2πf =
6
4.82 · 10 (radians per second). The formula ω0 = 1/ LC becomes C = 1/(Lω02 ) = 1/(360 ·
10−6 · (4.82 · 106 )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 amplification of
the signal (which is maximal at ω0 ). However, R has to be extremely (and unrealistically)
small to provide a meaningful amplification 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Ω.
I I

-9 -8
2. ´ 10 2. ´ 10

1.5 ´ 10-9 1.5 ´ 10-8

1. ´ 10-9 1. ´ 10-8

5. ´ 10-10 5. ´ 10-9

t t
2.0 ´ 106 4.0 ´ 106 6.0 ´ 106 8.0 ´ 106 1.0 ´ 107 1.2 ´ 107 2.0 ´ 106 4.0 ´ 106 6.0 ´ 106 8.0 ´ 106 1.0 ´ 107 1.2 ´ 107

R = 100Ω R = 10Ω

2. ´ 10-7

1.5 ´ 10-7

1. ´ 10-7

5. ´ 10-8

t
2.0 ´ 106 4.0 ´ 106 6.0 ´ 106 8.0 ´ 106 1.0 ´ 107 1.2 ´ 107

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 define the solution as a function of ω. Note the underscore after the
parameter name.

soln@Ω_D := DSolve@8H1  100L x ''@tD + H1  4L x@tD Š Cos@Ω * tD, x@0D Š 5, x '@0D Š 0<, x@tD, tD;

Now we can generate a table (list) of the plots shown for the parameter values in example 4.1.1.

Table@Plot@Evaluate@x@tD . soln@ΩDD, 8t, 0, 25<, LabelStyle ® Medium,


AxesLabel ® 8"t", "x"<D, 8Ω, 80.5, 3, 4.5, 4.6, 4.7, 4.8, 4.9<<D

The plots are shown here.

x x

4 6

4
2
2

t t
5 10 15 20 25 5 10 15 20 25
-2
-2
-4

-4 -6

x x

30 40

20
20
10

t t
5 10 15 20 25 5 10 15 20 25
-10
-20
-20

-30 -40

x x
100
60

40
50
20

t t
5 10 15 20 25 5 10 15 20 25

-20
-50
-40

-60 -100
112 CHAPTER 4. APPLICATIONS OF SECOND-ORDER LINEAR EQUATIONS

150

100

50

t
5 10 15 20 25
-50

-100

-150

4.4 Exercises
Exercise 4.1. ♣ Consider the damped free response system
10ẍ + cẋ + kx = 0. (4.25)

(a) If c = 10 and k = 2, find 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ẍ + cẋ + kx = c1 cos(ωt) + c2 sin(ωt). (4.26)

(a) Show that the quotient of the response amplitude and the forcing amplitude is
1
ρ= p ,
m2 (ω02 − ω 2 )2 + c2 ω 2
p
where ω0 = k/m.
(b) Suppose m = 1 and ω = 1. What combinations of c and k will yield an amplification factor
of ρ = 0.1, 1, 10?

Exercise 4.3. We investigate the occurrence of beats for the initial value problem
ẍ + ω02 x = sin(ωt), x(0) = ẋ(0) = 0, (4.27)
with ω0 > 0 as we increase the forcing frequency ω → ω0 .

(a) Show that the solution is given by


1 1
x= (sin(ωt) − sin(ω0 t)) + sin(ω0 t). (4.28)
ω02 −ω 2 ω0 (ω0 + ω)
Observe that the first term xb = (1/(ω02 − ω 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


   
2 ω + ω0 ω − ω0
xb = 2 cos t sin t . (4.29)
ω0 − ω 2 2 2

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/(ω02 − ω 2 ) (the period and amplitude of the “envelope” of the beats).

(c) Confirm the findings 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
d2 V 1 dV 1
C 2 + + V = 0. (4.30)
dt R dt L

Figure 4.21: A parallel RLC circuit.

E R L C

(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 ẍ + ω 2 x = 0, x(0) = x0 ,


ẋ(0) = v0 , then the complex-valued function z = ωx + iẋ is a solution to the initial value
problem ż + iωz = 0, z(0) = ωx0 + iv0 .

(b) If z = z(t) is a complex-valued solution to the initial value problem ż+iωz = 0, z(0) = z0 , then
the real-valued function x = (1/ω)Re(z) is a solution to the initial value problem ẍ + ω 2 x = 0,
x(0) = (1/ω)Re(z0 ), ẋ(0) = Im(z0 ).

Thus, the harmonic oscillator described by ẍ + ω 2 x = 0 can equivalently be described by the


first-order differential equation ż + iωz = 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
differential equation mẍ + kx = 0, where m, k > 0. Hint: Review which physical quanti-
ties/which law of physics lead to this differential 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 00 (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 first-order linear autonomous differential equations is of the form
dx
= a1,1 x + a1,2 y (5.1)
dt
dy
= a2,1 x + a2,2 y.
dt
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 coefficients ai,j do not depend on t. In other words, we can equivalently
describe (5.1) as a two-dimensional linear system with constant coefficients.
It is interesting to note that a second-order linear differential equation of the form
d2 x dx
a 2
+b + cx = 0 (5.2)
dt dt
(a 6= 0) can be transformed into a two-dimensional first-order system by the following process of
reduction of order . Let y = dx/dt; then dy/dt = d2 x/dt2 = (−b/a)(dx/dt) − (c/a)x = −(c/a)x −
(b/a)y, and equation (5.2) becomes:
dx
= y (5.3)
dt
dy c b
= − x − y.
dt a a
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 first-order differential equation involving a matrix-
vector system. If x = (x, y) and we let
 
a1,1 a1,2
A= ,
a2,1 a2,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 first-order linear systems.
The proof will be, as usual for these types of results, omitted.

Theorem 5.1.1. A first-order linear autonomous system of the form (5.1), together with the initial
conditions x(t0 ) = x0 and y(t0 ) = y0 has a unique solution that is defined 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
satisfies equation (5.4) as well: A(cv) = c(Av) = c(λv) = λ(cv). If Av = λv for v 6= 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 A − λI is zero. The equation

det(A − λI) = 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
= Ax (5.6)
dt
has the vector-valued function
x(t) = eλt v (5.7)

as a solution. Also, if x1 (t) and x2 (t) are solutions to (5.6), then so is any linear combination
c1 x1 (t) + c2 x2 (t), for any real or complex numbers c1 , c2 .

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 dx1 /dt = Ax1 and dx2 /dt = Ax2 , then d(c1 x1 +c2 x2 )/dt = c1 (dx1 /dt)+
c2 (dx2 /dt) = c1 Ax1 + c2 Ax2 = A(c1 x1 + c2 x2 ).
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
2×2 systems of differential equations, it should be noted that theorem 5.2.1 holds for n×n 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 2×2 matrix with the two real eigenvalues λ1 6= λ2 and correspond-
ing eigenvectors v1 and v2 , respectively. Then any solution to the differential equation dx/dt = Ax
is of the form
x(t) = c1 eλ1 t v1 + c2 eλ2 t v2 , (5.8)
where c1 , c2 ∈ R. Furthermore, the initial value problem dx/dt = Ax, x(t0 ) = x0 , y(t0 ) = y0 has a
unique solution.

Proof. Theorem 5.2.1 tells us that both eλ1 t v1 and eλ2 t v2 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 fixed but arbitrary value t0 in the domain
of x, let x0 = x(t0 ) and y0 = y(t0 ). We claim that we can obtain a solution of the form (5.8) by
finding values of c1 and c2 so that the resulting function satisfies these initial conditions.
As indicated, let x(t) = (x(t), y(t)) be a solution to dx/dt = Ax, and let x0 = x(t0 ) and
y0 = y(t0 ). A standard result from linear algebra (see theorem B.3.1 in Appendix B) tells us that
eigenvectors corresponding to different eigenvalues are linearly independent, so there exist (unique)
values d1 , d2 so that d1 v1 + d2 v2 = x0 = (x0 , y0 ). Let c1 = e−λ1 t0 d1 and c2 = e−λ2 t0 d2 . Then
c1 eλ1 t0 v1 + c2 eλ2 t0 v2 = x0 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 differential equation dx/dt = Ax.
Example 5.3.1. Find the general solution of each of the following differential equations.

(a)     
dx/dt −3 0 x
= (5.9)
dy/dt 0 −2 y
In this situation, λ1 = −3 and λ2 = −2 are the eigenvalues; v1 = (1, 0) and v2 = (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

c1 e−3t
       
x(t) −3t 1 −2t 0
= c1 e + c2 e = .
y(t) 0 1 c2 e−2t
118 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS

Of course, we could have also obtained this solution by observing that the differential equation
(5.9) can be written as two independent first-order linear differential 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 2 3 x
= (5.10)
dy/dt 0 −4 y
In this situation, λ1 = 2 and λ2 = −4 are the eigenvalues. For λ1 = 2, we obtain the
eigenvector v1 = (1, 0). For λ2 = −4, we need to find a vector v2 = (v1 , v2 ) so that
            
2 3 1 0 v1 6 3 v1 6v1 + 3v2 0
− (−4) = = = ,
0 −4 0 1 v2 0 0 v2 0 0

which means we may choose an eigenvector to be v2 = (−1/2, 1).


The general solution is

c1 e2t − (1/2)c2 e−4t


       
x(t) 2t 1 −4t −1/2
= c1 e + c2 e = .
y(t) 0 1 c2 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 = c2 e−4t . Then, the first equation
of (5.10) becomes dx/dt = 2x + 3c2 e−4t , which may be solved using the integrating factor
method for first-order linear equations. For this reason, we say the system (5.10) is partially
decoupled .

(c)
    
dx/dt 2 2 x
= (5.11)
dy/dt 1 3 y
In this situation, the eigenvalues can be computed by solving the characteristic equation
det(A − λI) = 0 for λ. In this example, the characteristic equation is
 
2−λ 2
det = (2 − λ)(3 − λ) − 1 · 2 = λ2 − 5λ + 4 = 0,
1 3−λ

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 find a vector v1 = (v1 , v2 ) so that
            
2 2 1 0 v1 1 2 v1 v1 + 2v2 0
− (1) = = = ,
1 3 0 1 v2 1 2 v2 v1 + 2v2 0

which means we may choose an eigenvector to be v1 = (−2, 1). Similarly, an eigenvector


v2 = (v1 , v2 ) corresponding to λ2 = 4 can be found as follows:
            
2 2 1 0 v1 −2 2 v1 −2v1 + 2v2 0
− (4) = = = .
1 3 0 1 v2 1 −1 v2 v1 − v2 0
5.3. CASE I: TWO REAL DISTINCT NON-ZERO EIGENVALUES 119

Thus, we can choose v2 = (1, 1). Note that the two equations −2v1 + 2v2 = 0 and v1 − v2 = 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

−2c1 et + c2 e4t
       
x(t) t −2 4t 1
= c1 e + c2 e = .
y(t) 1 1 c1 et + c2 e4t

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 first 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 differential 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 −3 0 x
=
dy/dt 0 −2 y

is x(t) = c1 e−3t , y(t) = c2 e−2t . If x(0) = x0 and y(0) = y0 , we obtain x(t) = x0 e−3t ,
y(t) = y0 e−2t . By drawing solution curves for various different 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 justifies 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) = c1 e−3t approaches zero more quickly than y(t) = c2 e−2t , we place double
arrows on the line `1 , and single arrows on `2 .
• Note that
−3/2 3/2
x = x(t) = c1 e−3t = c1 (e−2t )3/2 = c1 (c−1
2 y(t))
3/2
= c1 c2 y = cy 3/2 .
−3/2
(The constant c1 c2 was absorbed into a single constant c.) This confirms 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.
y
1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

(b) The general solution to the system


    
dx/dt 2 3 x
=
dy/dt 0 −4 y

is x(t) = c1 e2t − (1/2)c2 e−4t , y(t) = c2 e−4t . By drawing solution curves for various different
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.
y

x
-2 -1 1 2

-1

-2

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 (x0 , y0 ) is a point on `1 , then its x-coordinate approaches ∞ or −∞ as


t → ∞; if (x0 , y0 ) 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 justifies the direction of the arrows in Figure 5.2.

(c) For the system     


dx/dt 2 2 x
=
dy/dt 1 3 y
the general solution is x(t) = −2c1 et + c2 e4t , y(t) = c1 et + c2 e4t . 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.
y
1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

• As t → −∞, both x(t) → 0 and y(t) → 0; this justifies 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 (x0 , y0 ) 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 definitions concerning different types of equilibrium solution.
Definition 5.3.1. Suppose x(t) is the solution to the initial value problem dx/dt = Ax, x(0) = x0 .
Then the origin x∗ = 0 is called:
• a sink if for any initial condition the solution x(t) satisfies limt→∞ x(t) = x∗ ;

• a source if for any initial condition the solution x(t) satisfies limt→−∞ x(t) = x∗ ;

• a saddle if limt→∞ x(t) = x∗ for some initial conditions, and limt→−∞ 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 v1 and v2 , respectively. Then the origin is the only
equilibrium solution of the differential equation dx/dt = Ax and the following holds.

(a) If λ1 , λ2 are both negative, then limt→∞ ((x(t), y(t)) = (0, 0) for any solution (x(t), y(t)); in
particular, the origin is a sink. If an initial value (x0 , y0 ) lies in either of the eigenspaces
Rv1 or Rv2 , 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 limt→−∞ ((x(t), y(t)) = (0, 0) for any solution (x(t), y(t)); in
particular, the origin is a source. If an initial value (x0 , y0 ) lies in either of the eigenspaces
Rv1 or Rv2 , 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 different signs, then the origin is a saddle. If an initial value (x0 , y0 ) 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 (x0 , y0 ) 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 differential equation by only computing the eigenvalues and
eigenvectors of the coefficient 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.
 
2 −3
(a) dx/dt = 2x−3y, dy/dt = −2x+y. The coefficient matrix is A = ; its eigenvalues
−2 1
are λ1 = 4 and λ2 = −1. Consequently, the origin is a saddle. Corresponding respective
eigenvectors are v1 = (−3, 2) and v2 = (1, 1). The phase portrait is shown in Figure 5.4.
 
3 −4
(b) dx/dt = 3x − 4y, dy/dt = −x + 5y. The matrix is A = and its eigenvalues
−1 5
√ √
are λ1 = 4 + 5 and λ2 = 4 − 5, which √ are both positive.√ So the origin is a source.
Corresponding eigenvectors are v1 = (1 − 5, 1) and v2 = (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).
y
1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

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).
y
1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5
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 differential equations.

(a)
    
dx/dt 2 0 x
= (5.12)
dy/dt 0 2 y
Here, λ = 2 is an eigenvalue of multiplicity 2, and v1 = (1, 0) and v2 = (0, 1) are linearly
independent eigenvectors. Consequently, two solutions are x1 (t) = e2t (1, 0) and x2 (t) =
e2t (0, 1), and because they are linearly independent, span the solution space of the differential
equation. The general solution is

c1 e2t
       
x(t) 2t 1 2t 0
= c1 e + c2 e = .
y(t) 0 1 c2 e2t

The phase portrait of this differential 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) = c1 e2t , y = y(t) = c2 e2t because y/x = c2 /c1 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.
y
1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

(b)
    
dx/dt −2 1 x
= (5.13)
dy/dt 0 −2 y
5.4. CASE II: ONE REAL REPEATED NON-ZERO EIGENVALUE 125
 
−2 − λ 1
Here, λ = −2 is an eigenvalue of multiplicity 2. Since A − λI = =
0 −2 − λ
 
0 1
when λ = −2, we obtain that v2 = 0 for any eigenvector v = (v1 , v2 ). This gives
0 0
that, e.g., (1, 0) is an eigenvector of A, and x1 = e−2t (1, 0) is a solution to the differential
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 = c2 e−2t .
Now, we obtain dx/dt = −2x + y = −2x + c2 e−2t , which can be solved using, e.g., the
integrating factor method to obtain x = c1 e−2t + c2 te−2t . Putting this together, the general
solution is    
1 t
x = c1 e−2t + c2 e−2t . (5.14)
0 1

The phase portrait of this differential 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 = c1 e−2t + c2 te−2t and y = c2 e−2t , we have
x = c1 c−1 −1
2 y + ty, or y/x = 1/(c1 c2 + 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.
y
2

x
-2 -1 1 2

-1

-2

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 differential equation dx/dt = Ax and the
following holds.
126 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS

(a) If λ has two linearly independent eigenvectors v1 and v2 , then any solution to the differential
equation dx/dt = Ax is of the form
x(t) = c1 eλt v1 + c2 eλt v2 . (5.15)
Furthermore, the initial value problem dx/dt = Ax, x(t0 ) = x0 , y(t0 ) = y0 has a unique
solution. Every solution is a straight-line solution. Also,

• if λ is negative, then limt→∞ ((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 limt→−∞ ((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 (A−λI)w = v,
then any solution to the differential equation dx/dt = Ax is of the form
x(t) = c1 eλt v + c2 eλt (w + tv). (5.16)
Furthermore, the initial value problem dx/dt = Ax, x(t0 ) = x0 , y(t0 ) = y0 has a unique
solution. Only ` = Rv is a straight-line solution. Also,

• if λ is negative, then limt→∞ ((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 limt→−∞ ((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 (A − λI)w = v for w = (w1 , w2 ) implies w2 = 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 verification of part (b) is the object of exercise 5.8.
Example 5.4.2. Find the general solution and sketch  the phaseportrait of the differential equation
5 1
dx/dt = 5x+y, dy/dt = −x+3y. The matrix is A = ; its only eigenvalue is λ1 = 4. The
−1 3
 
1 1
matrix A − 4I is , so an eigenvector is v = (1, −1). We find a generalized eigenvector
−1 −1
w = (w1 , w2 ) by solving     
1 1 w1 1
= ,
−1 −1 w2 −1
which yields w1 + w2 = 1, so we may choose w1 = 1 and w2 = 0. According to equation (5.16), the
general solution is
       
x(t) 4t 1 4t 1 t
= c1 e + c2 e + ,
y(t) −1 0 −t
5.5. CASE III: COMPLEX CONJUGATE EIGENVALUES 127

or x(t) = (c1 + c2 + c2 t)e4t , y(t) = (−c1 − tc2 )e4t . 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 differential 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.


y
2

x
-2 -1 1 2

-1

-2

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 v1 −2 − (2 + 3i) 5 v1 0
= = .
−5 6−λ v2 −5 6 − (2 + 3i) v2 0

This gives the equations (−4 − 3i)v1 + 5v2 = 0 and −5v1 + (4 − 3i)v2 = 0, which are complex
number multiples of each other. Choosing v1 = 5 and v2 = 4 + 3i in the first equation, we obtain
that v1 = (5, 4 + 3i) is an eigenvector corresponding to λ1 = 2 + 3i. It can easily be seen that
v2 = (5, 4 − 3i) is an eigenvector corresponding to λ2 = 2 − 3i. Theorem 5.2.1 tells us that z1 (t) =
e(2+3i)t (5, 4+3i) and z2 (t) = e(2−3i)t (5, 4−3i) 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 = e2t (cos(3t) + i sin(3t)), we
obtain that z1 (t) = (5(e2t cos(3t) + e2t i sin(3t)), (4 + 3i)(e2t cos(3t) + e2t i sin(3t))) = (5e2t cos(3t) +
i5e2t sin(3t)), 4e2t cos(3t)−3e2t sin(3t)+i(3e2t cos(3t)+4e2t sin(3t))). Extracting real and imaginary
parts, the general solution is

5e2t cos(3t) 5e2t sin(3t)


   
x(t) = c1 + c2 .
4e2t cos(3t) − 3e2t sin(3t) 3e2t cos(3t) + 4e2t 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.


y
2

x
-2 -1 1 2

-1

-2

The relevant results regarding two-dimensional linear systems whose coefficient 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


(β 6= 0) and corresponding complex conjugate eigenvectors v = (v1 ± w1 i, v2 ± w2 i). Then, a
complex-valued solution to the differential equation dx/dt = Ax is of the form
 
(α+βi)t v 1 + w1 i
z(t) = e . (5.18)
v 2 + w2 i

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(t0 ) = x0 , y(t0 ) = y0 has a
unique solution.
The origin is the only equilibrium solution of the differential 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
first-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 differential equation.

(a)     
dx/dt −1 −2 x(t)
= .
dy/dt 2 −1 y(t)
The eigenvalues are λ = −1 ± 2i, and corresponding eigenvectors are v = (±i, 1). A complex
solution is
−e−t sin(2t) + ie−t cos(2t)
     
(−1+2i)t i −t i
z(t) = e = e (cos(2t) + i sin(2t)) = .
1 1 e−t cos(2t) + ie−t sin(2t)

The real part of z(t) is x1 (t) = (−e−t sin(2t), e−t cos(2t)), and the imaginary part is x2 (t) =
(e−t cos(2t), e−t sin(2t)). The general solution is x(t) = c1 x1 (t) + c2 x2 (t). Since the real part
of the eigenvalues λ = −1 ± 2i 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 differential 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 −1 5 x(t)
= .
dy/dt −1 1 y(t)
The eigenvalues are λ = ±2i, and corresponding eigenvectors are v = (1 ∓ 2i, 1). A complex
solution is
   
2it 1 − 2i 1 − 2i
z(t) = e = (cos(2t) + i sin(2t))
1 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
   
cos(2t) + 2 sin(2t) −2 cos(2t) + sin(2t)
x(t) = c1 + c2 .
cos(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.
y y
2 2

1 1

x x
-2 -1 1 2 -2 -1 1 2

-1 -1

-2 -2

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.
y

1.0

0.5

x
-2 -1 1 2

-0.5

-1.0
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 differential equation
dx/dt = Ax this means that every point on the line Rv is fixed; that is, an equilibrium point. This
is fundamentally different 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 v1 , and λ2 6= 0 is


the other eigenvalue with corresponding eigenvector v2 , then the initial value problem dx/dt =
Ax, x(t0 ) = x0 has a unique solution that can be expressed in the form

x(t) = c1 v1 + c2 eλ2 t v2 . (5.19)

In particular, every point on the line ` = Rv1 is a fixed (equilibrium) point. If x0 6∈ `, then
the solution to dx/dt = Ax, x(t0 ) = x0 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 fixed.
In other words, the initial value problem dx/dt = Ax, x(t0 ) = x0 has the constant solution
x(t) = x0 .

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 v1 = (1, 2) and v2 = (−1, 3). The general solution is x(t) = c1 − c2 e5t ,
y(t) = 2c1 + 3c2 e5t , 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 coefficients. These formulas involved computing the eigenvalues and
eigenvectors of the coefficient 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 a b x
= . (5.20)
dy/dt c d y
Its characteristic equation is
 
a−λ b
det = λ2 − (a + d)λ + ad − bc = λ2 − T λ + D = 0, (5.21)
c d−λ
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 fixed
points.
y
2

x
-2 -1 1 2

-1

-2

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

T ± T 2 − 4D
λ1,2 = . (5.22)
2
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 different 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, T2 − 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, T2 − 4D < 0. The matrix has complex conjugate eigenvalues λ1,2 = α±βi
(β 6= 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, T2 − 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 infinitely 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.

D
center

spiral spiral
sink source

sink source

saddle

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 coefficient
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 coefficient 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 classifies 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 fixed value of µ, Aµ is a constant coefficient 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 differently
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ẍ + cẋ + 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 coefficient
c = µ ≥ 0. Then (5.23) becomes 4ẍ + µẋ + x = 0 which we can convert to a first-order linear
system using reduction of order as described in section 5.1. That is, let v = ẋ; then, v̇ = ẍ and
4ẍ + µẋ + x = 0 becomes v̇ = −(1/4)x − (µ/4)v. Thus, the one-parameter family of linear systems
to investigate is
    
ẋ 0 1 x
= . (5.24)
v̇ −1/4 −µ/4 v
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 /16−1 = 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.

center

spiral spiral
sink source
Μ=4
Μ=0
sink source

saddle

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 coefficients, and n may be greater than 2.
To formulate the results in this situation, we first need to define the exponential function of a
square matrix. Recall from calculus that the (scalar) exponential function is defined analytically
as

x x2 xk X xk
e =1+x+ + ... + + ... = .
2! k! k!
k=0
Similarly, we define:
Definition 5.9.1. If A is a square matrix, then

A2 Ak X Ak
eA = I + A + + ... + + ... = . (5.25)
2! k! k!
k=0

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) = eAt x0 , where x0 is an n-
dimensional vector and x(0) = x0 .
Proof. Obviously, x(0) = x0 . We observe that
∞ ∞ ∞
!
d X (At)k
  k X  k−1 
At
X
k d t k t
(d/dt)e = = A = A
dt k! dt k! (k − 1)!
k=0 k=0 k=1
∞  k ∞  k
X t X t
= Ak+1 =A Ak = AeAt .
k! k!
k=0 k=0

Hence, (d/dt)x(t) = (d/dt)eAt x0 = AeAt x0 = Ax(t).

The question arises as to how we compute eAt without using infinite 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λn t ). (5.26)

(b) If U is invertible, and A = UBU−1 , then

eAt = UeBt U−1 . (5.27)

Proof. Since (Λt)k = diag((λ1 t)k , . . . , (λn t)k ),


∞ ∞
(Λt)k (λ1 t)k (λn t)k
X X  
Λt
e = = diag ,...,
k! k! k!
k=0 k=0
∞ ∞
!
X (λ1 t)k X (λn t)k
= diag ,..., = diag(eλ1 t , . . . , eλn t ).
k! k!
k=0 k=0

Also, if A = UBU−1 , then


k times
z }| {
A = (UBU−1 )(UBU−1 ) . . . (UBU−1 ) = UBk U−1 .
k

This means that


∞ ∞ ∞
!
X (At)k X U(Bt)k U−1 X (Bt)k
eAt = = =U U−1 = U(eBt )U−1 .
k! k! k!
k=0 k=0 k=0

Remark 5.9.1. Equations (5.26) and (5.27) can be used to find the solutions to matrix systems
dx/dt = Ax where the matrix A is diagonalizable. A sufficient 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 v1 , . . . , vn is
invertible and A = U(diag(λ1 , . . . , λn ))U−1 . If the eigenvalues are all real, this method of finding
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

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


y 0 (t) = x(t) − 7y(t) + z(t)
z 0 (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 v1 = (−1, 0, 1), v2 = (0, −1, 1), v3 = (1, 1, 2).
Thus, if U = (v1 , v2 , v3 ), A = UΛU−1 , where Λ = diag(12, −8, −4). By equation (5.26),
eΛt = diag(e12t , e−8t , e−4t ). By equation (5.27), eAt = U(diag(e12t , e−8t , e−4t ))U−1 . According to
theorem 5.9.1, the solution to the initial value problem is

eAt (10, 20, 30) = U(diag(e12t , e−8t , e−4t ))U−1 (10, 20, 30)
= (15e−4t − 5e12t , 5e−8t + 15e−4t , −5e−8t + 30e−4t + 5e12t ).

Generally, for any initial condition (x(0), y(0), z(0)) = (x0 , y0 , z0 ) = x0 , we can write the solution
in the form

eAt x0 = U(diag(e12t , e−8t , e−4t ))d


= d1 e12t v1 + d2 e−8t v2 + d3 e−4t v3

where d = (d1 , d2 , d3 ) = U−1 x0 . Geometrically, this means:

• If d1 = 0, meaning that x0 = U(0, d2 , d3 ) = d2 v2 + d3 v3 is in the plane P spanned by the


eigenvectors v2 and v3 , then the solution x(t) = eAt x0 will remain in P for any t ∈ R.
Furthermore since λ2 = −8 and λ3 = −4 are negative, limt→∞ x(t) = 0 and limt→−∞ |x(t)| =
∞ if x0 6= 0. The plane P is the stable eigenspace of the origin.

• If d2 = d3 = 0, meaning that x0 = U(d1 , 0, 0) = d1 v1 is on the line ` spanned by the


eigenvector v1 , then the solution x(t) = eAt x0 will remain in ` for any t ∈ R. Furthermore
since λ1 = 12 is positive, limt→∞ |x(t)| = ∞ and limt→−∞ x(t) = 0 if x0 6= 0. The line ` is
the unstable eigenspace of the origin.

• Solutions with any other initial conditions x0 6= 0 become unbounded both as t → ∞ and
t → −∞. However, x(t) will approach the unstable eigenspace ` as t → ∞ and the stable
eigenspace P 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 find 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 1’s 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

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


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

has the eigenvalue λ1 = −8 and the repeated eigenvalue λ2 = 4. An eigenvector associated with λ1 is
v1 = (1, −1, 1), and λ2 has two linearly independent eigenvectors v2 = (−1, 0, 2) and v3 = (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

eAt x0 = U(diag(e−8t , e4t , e4t ))U−1 x0


= d1 e−8t v1 + d2 e4t v2 + d3 e4t v3

where U = (v1 , v2 , v3 ) and d = (d1 , d2 , d3 ) = U−1 x0 .


Here, the stable eigenspace is the line ` spanned by v1 ; the unstable eigenspace is the plane P
spanned by v2 and v3 . 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 x0 ∈ `, x0 6= 0, then limt→∞ x(t) = 0 and limt→−∞ |x(t)| = ∞.

• If x0 ∈ P, x0 6= 0, then limt→∞ |x(t)| = ∞ and limt→−∞ x(t) = 0.

• If x0 6∈ ` ∪ P, then limt→±∞ |x(t)| = ∞. In addition x(t) → P as t → ∞ and x(t) → ` as


t → −∞.

Example 5.9.3. The matrix of the system

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


y 0 (t) = −0.5x(t) − 2.5y(t) + 0.5z(t)
z 0 (t) = x(t) − 2y(t)

has the eigenvalue λ1 = 1 and the repeated eigenvalue λ2 = −2. An eigenvector associated with
λ1 is v1 = (1, 0, 1), and λ2 has only one linearly independent eigenvector v2 = (0, 1, 1). The
generalized eigenvector w associated with λ2 = −2 is a solution to (A − λ2 I)w = v2 , so we need
to find w = (w1 , w2 , w3 ) so that

1.5w1 − 1.5w2 + 1.5w3 = 0


−0.5w1 − 0.5w2 + 0.5w3 = 1
w1 − 2w2 + 2w3 = 1.

One solution is w = (−1, 0, 1). For U = (v1 , v2 , w), we observe that


     
1 0 0 1 0 0 0 0 0
U−1 AU =  0 −2 1  =  0 −2 0  +  0 0 1  = Λ + N.
0 0 −2 0 0 −2 0 0 0
5.9. SOLUTIONS TO MATRIX SYSTEMS 139

Now, we need to compute (Λ + N)k . Since ΛN = NΛ and N2 = 01 , we have by the binomial


theorem that (Λ + N)k = Λk + kΛk−1 N. Dividing by k! gives
 k 
k k k−1 1 /k! 0 0
(Λ + N) Λ Λ N
= + = 0 (−2)k /k! (−2)k−1 /(k − 1)! 
k! k! (k − 1)!
0 0 (−2)k /k!

for k > 0. Finally,


 P∞ k /k!)
  t 
k=0 (t P∞ 0 0 e 0 0

e(Λ+N)t =  k k−1 /(k − 1)!  =  0 e−2t te−2t  .
P
0 k=0 (−2t) /k! t P(−2t)
k=1

0 0 k
k=0 (−2t) /k! 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

eAt x0 = Ue(Λ+N)t U−1 x0


= d1 et v1 + d2 e−2t v2 + d3 e−2t (w + tv2 ).

where U = (v1 , v2 , w) and d = (d1 , d2 , d3 ) = U−1 x0 . 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 v1 , the stable eigenspace is the plane spanned by the eigenvector v2 and the
generalized eigenvector w.
Example 5.9.4. The matrix of the system

x0 (t) = −x(t) − 2z(t)


y 0 (t) = x(t) + y(t) + 2z(t)
z 0 (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 v1 = (0, 1, 0), and v2,3 = (−1 ± i, ∓i, 1) are eigenvectors for λ2,3 = ±i.
We follow the usual steps using complex numbers along the way. Let U = (v1 , v2 , v3 ). Then,
U−1 AU = diag(1, i, −i) = Λ. Now, eΛt = diag(et , eit , e−it ) and

(1/2)(eit + e−it ) + (i/2)(eit − e−it ) 0 i(eit − e−it )


 

UeΛt U−1 =  et − (1/2)(eit + e−it ) et et − (1/2)(eit + e−it ) − (i/2)(eit − e−it )  .


−(i/2)(eit − e−it ) 0 (1/2)(eit + e−it ) − (i/2)(eit − e−it )

Since (1/2)(eit + e−it ) = cos t and (i/2)(eit − e−it ) = − sin(t), we obtain


 
cos t − sin t 0 −2 sin t
eAt = UeΛt U−1 =  et − cos t et et − cos t + sin t 
sin t 0 cos t + sin t

and x(t) = eAt x0 as usual.


1
Due to the fact that a finite 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 x0 = c1 v1 = (0, c1 , 0), then x(t) = (0, c1 et , 0), so ` = Rv1 is the unstable eigenspace
of the origin. Let w1 = (−1, 0, 1) be the real part of v2 = (−1 + i, −i, 1) and w2 = (1, −1, 0) be the
imaginary part of v2 = (−1+i, −i, 1). Then eAt w1 = (− cos t−sin t, sin t, cos t) = cos tw1 −sin tw2 ,
and eAt w2 = (cos t − sin t, − cos t, sin t) = sin tw1 + cos tw2 . Thus, for x0 = c1 w1 + c2 w2 in the
plane P spanned by w1 and w2 , the trajectories {eAt x0 : t ∈ R} are circles in the w1 w2 -coordinate
system and ellipses in P.
The geometry of the solution space looks like this.

• If x0 ∈ `, x0 6= 0, then limt→∞ |x(t)| = ∞ and limt→−∞ x(t) = 0.

• If x0 ∈ P, x0 6= 0, then the solution curves are bounded and periodic (ellipses). The plane P
is called the center eigenspace of the origin. Figure 5.15 shows trajectories in both ` and P.

• If x0 6∈ ` ∪ P, 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 P, and follow the ellipses in P. 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

0
z

-5

-10

-10 10

-5 5

0 0
x y
5 -5

10 -10

The methods described in this section provide a kind of “royal road” to solving any linear
system with constant coefficients, and to investigating the geometric and asymptotic behavior of
solution curves. Thus, we can completely understand a linear differential 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 x0 = (−6, 1, 6) and x0 = (4, −2, −4) in example 5.9.4.

10

0
z 20
-5
0
-10
y
-10
-5
0 -20
5
x 10

5.10 Mathematica Use


We present several examples involving Mathematica methods related to finding 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 = 888, - 4, - 4<, 81, - 7, 1<, 8- 13, 7, - 1<<


A  MatrixForm
888, - 4, - 4<, 81, - 7, 1<, 8- 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 = Eigenvalues@AD
U = Transpose@Eigenvectors@ADD
812, - 8, - 4<

88- 1, 0, 1<, 80, - 1, 1<, 81, 1, 2<<

We define the diagonal matrix eΛt and generate the solution.


142 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS

S = DiagonalMatrix@Map@Exp, l * tDD
U.S.Inverse@UD.810, 20, 30<  Simplify  Expand

99ã12 t , 0, 0=, 90, ã-8 t , 0=, 90, 0, ã-4 t ==

915 ã-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.

DSolve@8x '@tD == A@@1DD.8x@tD, y@tD, z@tD<,


y '@tD == A@@2DD.8x@tD, y@tD, z@tD<, z '@tD Š A@@3DD.8x@tD, y@tD, z@tD<,
x@0D Š 10, y@0D Š 20, z@0D Š 30<, 8x@tD, y@tD, z@tD<, tD  Expand

99x@tD ® 15 ã-4 t - 5 ã12 t , y@tD ® 5 ã-8 t + 15 ã-4 t , z@tD ® - 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 = 88- 1  2, - 3  2, 3  2<, 8- 1  2, - 5  2, 1  2<, 81, - 2, 0<<;


l = Eigenvalues@AD
Eigenvectors@AD
8- 2, - 2, 1<

880, 1, 1<, 80, 0, 0<, 81, 0, 1<<

We can find the generalized eigenvector by solving the corresponding linear system and choosing
e.g. z = 1.

Solve@HA + 2 * IdentityMatrix@3DL.8x, y, z< Š 80, 1, 1<, 8x, y, z<D  Quiet

88x ® - 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 different order than Mathematica does.

A = 88- 1, 0, - 2<, 81, 1, 2<, 81, 0, 1<<


l = Table@Eigenvalues@AD@@iDD, 8i, 83, 1, 2<<D
U = Transpose@Table@Eigenvectors@AD@@iDD, 8i, 83, 1, 2<<DD
88- 1, 0, - 2<, 81, 1, 2<, 81, 0, 1<<

81, ä, - ä<

880, - 1 + ä, - 1 - ä<, 81, - ä, ä<, 80, 1, 1<<

The (complex, un-simplified) solution is produced here.


5.11. EXERCISES 143

S = DiagonalMatrix@Map@Exp, l * tDD;
B = U.S.Inverse@UD  Expand

:: ãä t , 0, - ä ã-ä t + ä ãä t >,
1 ä 1 ä
- ã-ä t + +
2 2 2 2

:- ãä t + ãt >,
1 ãä t 1 ä 1 ä
ã-ä t - + ãt , ãt , - + ã-ä t - +
2 2 2 2 2 2

: ãä t >>
1 1 1 ä 1 ä
ä ã-ä t - ä ãä t , 0, + ã-ä t + -
2 2 2 2 2 2

The command ComplexExpand reduces to real variables.

B = U.S.Inverse@UD  ComplexExpand

98Cos@tD - Sin@tD, 0, - 2 Sin@tD<,


9ãt - Cos@tD, ãt , ãt - Cos@tD + Sin@tD=, 8Sin@tD, 0, Cos@tD + Sin@tD<=

Finally, the graphs in Figures 5.15 and 5.16 may be produced as follows.

ParametricPlot3D@
Table@B.c, 8c, 880, 2, 0<, 80, - 2, 0<, 8- 2, 0, 2<, 8- 4, 0, 4<, 8- 6, 0, 6<, 8- 8, 0, 8<<<D,
8t, - 10, 10<, PlotStyle ® Thick, LabelStyle ® Medium,
PlotRange ® 88- 12, 12<, 8- 12, 12<, 8- 12, 12<<, AxesLabel ® 8"x", "y", "z"<D

ParametricPlot3D@Table@B.c, 8c, 88- 6, 1, 6<, 84, - 2, - 4<<<D,


8t, - 20, 20<, PlotStyle ® 8Thick, Blue<, LabelStyle ® Medium,
PlotRange ® 88- 12, 12<, 8- 32, 32<, 8- 12, 12<<, AxesLabel ® 8"x", "y", "z"<D

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).

dx/dt = 3x + 2y
(a) ♣
dy/dt = −2y

dx/dt = −2x − 2y
(b) ♣
dy/dt = −x − 3y

dx/dt = 2y
(c) ♣
dy/dt = −2x

dx/dt = −x + 2y
(d) ♣
dy/dt = −x − y

dx/dt = 2x − 4y
(e)
dy/dt = −x − y
144 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS

dx/dt = 2x − 6y
(f)
dy/dt = 2x + y

dx/dt = −12x + 4y
(g)
dy/dt = −x − 8y

dx/dt = x − y
(h)
dy/dt = y − x

dx/dt = y
(i)
dy/dt = x

dx/dt = x − 2y
(j)
dy/dt = 2y

dx/dt = −x + y
(k)
dy/dt = 2x

dx/dt = x − 5y
(l)
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 confirm 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, v1 = (1, −1); λ2 = −1, v2 = (0, 1)

(b) ♣ λ1,2 = 2 ± 3i, v1,2 = (1 ± i, 2)

(c) λ1 = −3, v1 = (2, 1); λ2 = −2, v2 = (1, −1)

(d) λ1,2 = −1 ± i, v1,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 find the exact values of µ where the bifurcations occur.
dx/dt = −2x + µy
(a) ♣
dy/dt = −x + 5y

dx/dt = µx + y
(b) ♣
dy/dt = −µx

dx/dt = 2µx + y
(c)
dy/dt = −x − µy

dx/dt = µx + µy
(d)
dy/dt = −µx − y
5.11. EXERCISES 145

Exercise 5.6. Consider the family of linear systems

dx
= (6 cos θ)x − (9 sin θ)y (5.28)
dt
dy
= (4 sin θ)x + (6 cos θ)y,
dt
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
V (x(t), y(t))
dt
for solution curves to (5.28). Interpret this result, and confirm 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 v1 , w1 , v2 , w2 be as in equation (5.18). Let ∆ = v1 w2 −v2 w1 . Show that if v2 /∆ < 0
or w1 /∆ < 0, then the orientation of motion is counter-clockwise; if v2 /∆ > 0 or w1 /∆ > 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 differential equations hold:

x00 (s) = −κ(s)y 0 (s)


y 00 (s) = κ(s)x0 (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 (x0 (s))2 + (y 0 (s))2 = 1.
Exercise 5.11. Find the general solution each system of linear differential equations. Determine the
geometry of the solution space by identifying stable, unstable, or center eigenspaces, and state the
asymptotic behavior of solutions.

dx/dt = 5x
(a) ♣ dy/dt = −2y − 2z
dz/dt = −y − 3z
√ √
dx/dt = x/ √2 + y/ √2
(b) ♣ dy/dt = −x/ 2 + y/ 2
dz/dt = −z
146 CHAPTER 5. FIRST-ORDER LINEAR AUTONOMOUS SYSTEMS

dx/dt = −x − y
(c) dy/dt = −y
dz/dt = −2z

dx/dt = −2x − 2y − 10z


(d) dy/dt = −3x − y + 15z
dz/dt = −x + y + z

dx/dt = −2.8x + 3.2y + 1.6z


(e) dy/dt = −2.2x + 3.8y + 1.4z
dz/dt = 2x − 2y

dx/dt = −3x − 2y − 2z
(f) dy/dt = −13x − 7y − 11z
dz/dt = 14x + 8y + 11z

Exercise 5.12. Provide a classification of three-dimensional linear systems with constant coefficients
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 classifications 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 first-order systems of differential 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 (x0 , y0 ). 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(t0 ), y(t0 )) = (x0 , y0 ) (6.2)

defined on some open interval containing t0 .

It is almost never possible to find 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 find the equilibrium points and then determine their
type to draw the phase portrait. This leads to the following definitions.

Definition 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 coefficients 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 points1 . Non-linear systems, on the
other hand, may have any number (none, finitely many or infinitely many) equilibrium points.
1
In other words, for linear systems, the set of equilibrium points is a linear subspace of R2 .

147
148 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS

Example 6.1.1. To find all equilibrium points of the system

dx/dt = −2x + 2x2


dy/dt = −3x + y + 3x2 .

We need to solve the system of equations −2x + 2x2 = 0, −3x + y + 3x2 = 0. The first equation
becomes 2(x2 − 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 y1∗ = 0 and using x∗2 = 1 in the second equation gives y2∗ = 0. Hence, the
equilibrium points are (x∗1 , y1∗ ) = (0, 0) and (x∗2 , y2∗ ) = (1, 0).
In this example, the equilibrium points were easy to find algebraically, partially because the
system is decoupled – the first equation depends only on x. Generally, finding 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 classified 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 definition). This classification is coarser than
for the linear case; however, there are many more different geometric types of equilibrium solutions
for non-linear systems, and the analysis to completely classify them is much more onerous than for
linear systems.

Definition 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(t0 ), y(t0 )) = (x0 , y0 ).
(a) The equilibrium point (x∗ , y ∗ ) is stable if for any  > 0 there exists a δ > 0 so that whenever
an initial condition (x0 , y0 ) satisfies
p p
(x∗ − x0 )2 + (y ∗ − y0 )2 < δ, then (x∗ − x(t))2 + (y ∗ − y(t))2 <  (6.3)

for all t ≥ t0 .

(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 (x0 , y0 ) satisfies

(x∗ − x0 )2 + (y ∗ − y0 )2 < δ0 , then lim (x(t), y(t)) = (x∗ , y ∗ ).


p
(6.4)
t→∞

(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 sufficiently 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 HARTMAN’S THEOREM 149

Example 6.1.2. The phase portrait for the system

dx/dt = −2xy + x2 (6.5)


2
dy/dt = −y + 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 = x2 ; so the x-axis is a straight-line solution and the
origin is a node for this solution.

• If y = −x, then dx/dt = 3x2 and dy/dt = −3x2 , 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 = −x2 and dy/dt = x2 ; 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
first-order differential equation
dy −y 2 + 2xy
= .
dx −2xy + x2
At first 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 first-order (non-autonomous)
differential 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 Hartman’s 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) 7→ (f (x, y), (g(x, y)) near the equilibrium point. The following
definition makes this more precise.

Definition 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 = fx (x∗ , y ∗ )x + fy (x∗ , y ∗ )y (6.6)


∗ ∗ ∗ ∗
dy/dt = gx (x , y )x + gy (x , y )y.
150 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS

Figure 6.1: The phase portrait for example 6.1.2.


y
2

x
-2 -1 1 2

-1

-2

Note that the linearized system is a linear system of differential equations with coefficient matrix

fx (x∗ , y ∗ ) fy (x∗ , y ∗ )
 
A = A(x∗ ,y∗ ) = . (6.7)
gx (x∗ , y ∗ ) gy (x∗ , y ∗ )

Thus, (x, y) 7→ A(x∗ ,y∗ ) (x, y) is the total derivative of the function (x, y) 7→ (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 + 2x2 (6.8)


2
dy/dt = −3x + y + 3x

are (x∗1 , y1∗ ) = (0, 0) and (x∗2 , y2∗ ) = (1, 0). Since f (x, y) = −2x + 2x2 and g(x, y) = −3x + y + 3x2 ,
the matrix in (6.7) becomes
   
fx (x, y) fy (x, y) −2 + 4x 0
A(x,y) = = .
gx (x, y) gy (x, y) −3 + 6x 1
 
−2 0
• If (x∗1 , y1∗ ) = (0, 0), then A(0,0) = . If we analyze the associated linear system
−3 1
(dx/dt, dy/dt) = A(0,0) (x, y), we see that the coefficient matrix has the eigenvalues λ1 = −2
and λ2 = 1, and associated eigenvectors are v1 = (1, 1) and v2 = (0, 1). The origin is a
saddle, and the phase portrait of the linearized system near (0, 0) is shown in Figure 6.2a.
 
∗ ∗ 2 0
• If (x1 , y1 ) = (1, 0), then A(1,0) = . The coefficient matrix A(1,0) of the associated
3 1
linear system has the eigenvalues λ1 = 2 and λ2 = 1, and associated eigenvectors are v1 =
(1, 3) and v2 = (0, 1). The origin is a source, and the phase portrait of the system is shown
in Figure 6.2b.
6.2. LINEARIZATION AND HARTMAN’S 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.
y y
2 2

1 1

x x
-2 -1 1 2 -2 -1 1 2

-1 -1

-2 -2

If we assume (and for this example, we will be justified in this assumption by Hartman’s 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
definitions.
Definition 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 T 2 − 4D
λ= ± .
2 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).
Definition 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 (x0 , y0 ) so that the corresponding solution
(x(t), y(t)) has the property that limt→∞ (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.
y
2.0

1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5 2.0

-0.5

-1.0

-1.5

(b) Let W u (x∗ , y ∗ ) denote the set of all initial points (x0 , y0 ) so that (x(t), y(t)) has the property
that limt→− ∞ (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 five open regions or sectors, as shown in Figure 6.5. The branch of W s (0, 0) in the
first 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 (x0 , y0 ) 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 (x0 , y0 ) 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 (x0 , y0 ) 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 (x0 , y0 ) 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 HARTMAN’S THEOREM 153

• If (x0 , y0 ) 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.
y
2.0

1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5 2.0

-0.5

-1.0

-1.5

We need to make precise what it means for two phase portraits to “look like” each other.
Definition 6.2.4. A matrix-valued function P : R2 → R2×2 is said to be a continuous change of
coordinates of R2 if:
(a) for any (x, y), the 2 × 2 matrix P(x, y) is invertible;
(b) both (x, y) 7→ P(x, y) and (x, y) 7→ P−1 (x, y) are continuous.
Note that the fact that P : R2 → R2×2 , (x, y) 7→ P(x, y) is continuous means that each of the
four components of P(x, y) is a continuous function of (x, y).
In effect, 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 Hartman’s
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 different from the shift transformation P0 (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 five sectors for example 6.2.1.


y
2.0

1.5

1.0 V
I 0.5 IV
x
-1.5 -1.0 -0.5 0.5 1.0 1.5 2.0

-0.5

II -1.0 III
-1.5

(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 Hartman’s 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 first part of
Hartman’s 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 Hartman’s 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 β 6= 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 HARTMAN’S 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 + x2 , dy/dt = −y 2 + 2xy in example 6.1.2 has (x∗ , y ∗ ) =
(0, 0) as its only equilibrium point. The linearization matrix is
−2y ∗ + 2x∗ −2x∗
 
A(x∗ ,y∗ ) = ,
2y ∗ −2y ∗ + 2x∗
which becomes the zero matrix when (x∗ , y ∗ ) = (0, 0). So the origin is non-hyperbolic, and Hart-
man’s 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 justified by Hartman’s
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)
2
dy/dt = −y + x .
(1) We first find all equilibrium points. We need to solve the non-linear system −2x + y = 0,
−y + x2 = 0. Addition of these two equations gives x2 − 2x = 0, which means x = 0 or x = 2.
If x = 0, the first (or the second) equation gives y = 0; if x = 2, the first (or the second)
equation gives y = 4. So the two equilibrium points are (x∗1 , y1∗ ) = (0, 0) and (x∗2 , y2∗ ) = (2, 4).
(2) The matrix of the linearized system is
 
−2 1
A(x∗ ,y∗ ) = .
2x∗ −1
 
∗ ∗ −2 1
(a) If (x1 , y1 ) = (0, 0), this matrix is , which has eigenvalues λ1 = −2 and
0 −1
λ2 = −1; so the origin is a hyperbolic equilibrium point and Hartman’s theorem applies.
Since both eigenvalues are negative, the origin is a sink. Corresponding eigenvectors
are v1 = (1, 0) and v2 = (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 .

 
−2 1
(b) If (x∗1 , y1∗ ) = (2, 4), the matrix is ; it has eigenvalues λ1,2 = (−3 ± 17)/2,
4 −1
i.e. λ1 ≈ 0.56 and λ2 ≈ −3.56. This equilibrium point is hyperbolic and a saddle. Cor-
responding eigenvectors are v1 ≈ (0.39, 1) and v2 = (−0.64, 1). The unstable manifold
W u (2, 4) is tangent to the curve (2, 4) + Rv1 at (2, 4), and the stable manifold W s (2, 4)
is tangent to the curve (2, 4) + Rv2 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 (x0 , y0 ) 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.


y
6

x
-1 1 2 3 4

-1

6.3 Polar Coordinates and Nullclines


As we have seen in the previous section, the linearization method offers 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 − (x2 + y 2 )x (6.10)


2 2
dy/dt = −x − (x + y )y.

The only equilibrium point is (x∗ , y ∗ ) 


= (0, 0) and the linearization method in section 6.2 fails
0 1
because the matrix A(0,0) = of the linearized system has eigenvalues λ = ±i, so the
−1 0
origin is a non-hyperbolic equilibrium point and Hartman’s 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 find 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 differential equations for the functions r = r(t) ≥ 0 and θ = θ(t), as
follows. Differentiation of r2 = x2 + y 2 with respect to t gives

2r(dr/dt) = 2x(dx/dt) + 2y(dy/dt) (6.12)


2 2 2 2
= 2x(y − (x + y )x) + 2y(−x − (x + y )y)
= 2xy − 2x2 (x2 + y 2 ) − 2xy − 2y 2 (x2 + y 2 )
= −2(x2 + y 2 )2 = −2r4 .
3
p differential equation dr/dt = −r which can be solved using separation of vari-
So r(t) satisfies the
ables: r(t) = r0 / 1 + 2r02 t, where r(0) = r0 ≥ 0. Since tan θ = y/x, or x tan θ = y, differentiation
with respect to t gives (dx/dt) tan θ + x sec2 θ(dθ/dt) = dy/dt. Using that sec2 θ = (x2 + y 2 )/x2
yields (dx/dt)(y/x) + ((x2 + y 2 )/x)(dθ/dt) = dy/dt, or

r2 (dθ/dt) = x(dy/dt) − y(dx/dt) (6.13)


2 2 2 2
= x(−x − (x + y )y) − y(y − (x + y )x)
= −x2 − xy(x2 + y 2 ) − y 2 + xy(x2 + y 2 )
= −x2 − y 2 = −r2 ,

So we simply have dθ/dt = −1. Using this result together with the formula for r(t) lets us actually
find the explicit solution to (6.10) when expressed in polar coordinates:
p
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 differential 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 differential equation
using xy-coordinates into an equation using polar coordinates. In the previous example, the effect
of switching to polar coordinates was to decouple the system (6.10) and bring it in the form
dr/dt = −r3 , dθ/dt = −1.

Nullclines
We can further analyze a system of differential equations of the form dx/dt = f (x, y), dy/dt =
g(x, y) by finding the location of the points where the solution curves either have horizontal or
vertical tangents. This leads to the following definition.

Definition 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.


y
1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

(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 6= 0 on this line, then ` is a straight-line
solution. Similarly, if a y-nullcline is a horizontal line `, and dx/dt 6= 0 on this line, then ` is also
a straight-line solution.
Example 6.3.2. We consider the system
 x 
dx/dt = x 2 − − y , dy/dt = y (x − 1 − y) .
2
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 = x − 1. 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 find 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
   
fx (x, y) fy (x, y) 2−x−y −x
A(x,y) = = .
gx (x, y) gy (x, y) 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 v1 = (1, 0) and v2 = (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 v1 = (−4, 5) and v2 = (1, 0).

• The matrix A(0,−1) has eigenvalues λ1 = 3 and λ2 = 1, so (0, −1) is a source. Corresponding
eigenvectors are v1 = (−2, 1) and v2 = (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).
y y

4 4

2 2

x x
-2 2 4 6 -2 2 4 6

-2 -2

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 − x3 (6.14)
dy/dt = −0.5x.

The x-nullcline is x+y−x3 = 0, that is y = x3 −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 > x3 − x, then dx/dt = x + y − x3 > 0; if x > 0, then dy/dt = −0.5x < 0.
160 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS

(B) If y > x3 − x, then dx/dt > 0; if x < 0, then dy/dt > 0.

(C) If y < x3 − x, then dx/dt < 0; if x < 0, then dy/dt > 0.

(D) If y < x3 − 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

1 − 3x2 1
 
A(x,y) = .
−0.5 0

Figure 6.9: The nullclines and the regions in example 6.4.1.

y
4

HBL 2 HAL
x
-2 -1 1 2

HCL -2 HDL
-4

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.

Definition 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.


y

x
-2 -1 1 2

-1

-2

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 (x0 , y0 ) ∈ C, the solution curve (x(t), y(t)) has the property that
(x(0), y(0)) = (x(T ), y(T )) = (x0 , y0 ), and (x(t), y(t)) 6= (x0 , y0 ) 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 definition 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 infinite 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 differential 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 first 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.

drdt

0.4

0.2

r
-0.5 0.5 1.0 1.5 2.0 2.5

-0.2

-0.4

Figure 6.12: The phase portrait for example 6.4.2; limit cycles and the equilibrium point are shown
in black.
y
3

x
-3 -2 -1 1 2 3

-1

-2

-3
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 f (x, y)
= . (6.15)
dy/dt g(x, y)
We may interpret the right side of (6.15) as a vector field 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 field F(x, y) =
(f (x, y), g(x, y)) is
(div F)(x, y) = (∇ · F)(x, y) = fx (x, y) + gy (x, y), (6.16)
where ∇ = (∂/∂x, ∂/∂y) is the gradient vector.
Recall also that the divergence of a vector field at the point (x, y) measures the amount of
“outflow” from an infinitesimally 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 flux of a vector field at
a point on a simple closed curve is the dot product of the vector field with the outer unit normal
vector to the curve. Green’s Theorem asserts that the total divergence of the region enclosed by a
simple closed curve C is equal to the total flux across C. More precisely, Green’s Theorem states:

Theorem 6.5.1. Suppose C is a positively oriented simple closed curve in R2 , R is its interior
region, and F(x, y) = (M (x, y), N (x, y)). Then,
¨ ‰
Mx + Ny dA = M dy − N dx. (6.17)
R C

Remark 6.5.1. If F(x, y) = (M (x, y), N (x, y)) gives the direction of a “flow” at the point (x, y),
and (r(t), s(t)), a ≤ t ≤ b, is a parametrization of C, then, by definition of the line integral,
‰ ˆ b
M dy − N dx = M (r(t), s(t))s0 (t) − N (r(t), s(t))r0 (t) dt
C a
ˆ b
= F(r(t), s(t))) · n(t) dt,
a

where n(t) = (s0 (t), −r0 (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 0 (t) − g(x(t), y(t))x0 (t) dt = x0 (t)y 0 (t) − y 0 (t)x0 (t) = 0. (6.18)
˜
Thus, if C is a limit cycle for (6.15) and R is the interior of C, then R div F dA = 0.
2
These definitions come from fluid dynamics. The connection with our definition of sinks and sources is remote.
First, according to our definition sinks and sources must be equilibrium points, whereas divergence is defined 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


p p
dx/dt = x − y − x x2 + y 2 , dy/dt = x + y − y x2 + y 2 . (6.19)

Then,
∂  p  ∂  p 
(div F)(x, y) = x − y − x x2 + y 2 + x + y − y x2 + y 2
∂x ∂y
! !
p x 2 p y 2
= 1 − x2 + y 2 − p + 1 − x2 + y 2 − p
x2 + y 2 x2 + y 2
p
= 2 − 3 x2 + 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,
¨ ¨ p
(div F)(x, y) dA(x, y) = 2 − 3 x2 + y 2 dA(x, y)
R R
ˆ 2π ˆ 1
= (2 − 3r)r dr dθ
0 0
ˆ 1
= 2π 2r − 3r2 dr
0
 r=1
= 2π r2 − r3 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 Bendixson’s Criteria, relate the divergence of the
vector field 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) 6= 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,
¨
div F(x, y) dA(x, y) 6= 0 (6.20)
R
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 F dA = 0, a contradiction
to (6.20).
For part (b), suppose C1 and C2 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 C2 , 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 = C1, ∪ L ∪ C2, ∪ 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.

C1,Ε

C2,Ε

hole

Let R be the interior of C. Then R is contained in D, and equation (6.20) applies. By Green’s
theorem, ¨ ‰
div F(x, y) dA(x, y) = f (x, y) dy − g(x, y) dx.
R C
The line integral can be written as
‰ ˆ ˆ
f (x, y) dy − g(x, y) dx = f (x, y) dy − g(x, y) dx + f (x, y) dy − g(x, y) dx
C C1, L
ˆ ˆ
+ f (x, y) dy − g(x, y) dx + f (x, y) dy − g(x, y) dx.
C2, U

The first and the third line integral of the right side are zero because C1, , C2, are parts of solution
curves (see (6.18)). As  → 0, L → −U , thus
‰ ˆ ˆ
f (x, y) dy − g(x, y) dx = f (x, y) dy − g(x, y) dx + f (x, y) dy − g(x, y) dx → 0.
C L U
166 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS

This again gives a contradiction to equation (6.20).

Example
p 6.5.2. For the system in example 6.5.1, we computed that (div F)(x, y) = 2 − 3r if r =
x2 + y 2 . Thus, on the simply connected region D1 = {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 D1 .
On the annulus D2 = {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 D2 (there is indeed one, when r = 1). Also, if
D3 = {1.5 ≤ r ≤ 2}, (div F)(x, y) ≤ 2 − 3(1.5) = −2.5 < 0, but there are no limit cycles contained
in D3 .
We state two more results (without proof) addressing the existence and non-existence of limit
cycles. The first result uses index theory, the second result is known as the Poincaré-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 ≥ t0 . 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 Poincaré-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 ≤ t0 .
Example 6.5.3. The system

ẋ = y − x3
ẏ = x + y + y 3

has equilibrium points when y = x3 and 0 = x + x3 + x9 = x(1 + x2 + x8 ); that is, the origin is the
only equilibrium point. Since the linearization

−3x2
 
1
A(x,y) =
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

ẋ = 2xy − y 2
ẏ = x2 − 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, ẋ = −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 confined to these
half-planes. Similarly, the fact that if y = 0, ẏ = x2 ≥ 0 shows that limit cycles are also confined 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.
d2 x dx
2
+ (x2 − η) + ω 2 x = 0, (6.21)
dt dt
where η, ω > 0 are parameters. Letting y = dx/dt and reducing the order gives the two-dimensional
non-linear system
dx
= y (6.22)
dt
dy
= −ω 2 x + (η − x2 )y.
dt
The only equilibrium solution is (x∗ , y ∗ ) = (0, 0). The linearization of (6.22) is given by the matrix
 
0 1
A(x,y) = ,
−ω 2 − 2xy η − x2

so for (x, y) = (0, 0), we have trace T = η and determinant 2


pω . 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 + (η − x2 )y) is (div F)(x, y) = η − x2 , so (div F)(x, y) > 0
√ √
in the open vertical strip R1 = {(x, y) : − η < x < η} and (div F)(x, y) < 0 on R2 = {(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 R1 , thus C must intersect at least one of the lines x = η or x = − η. If we can
find a solution curve (x(t), y(t)) that is bounded for t ≥ t0 , then by theorem 6.5.4, there is a limit
cycle, and this solution curve will “find”, 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. (x0 , y0 ) = (−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 dy
= f (x, y), = g(x, y). (6.23)
dt dt
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.
y
4

x
-4 -2 2 4

-2

-4

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 find a function H(x, y) so that

∂H dy ∂H dx
= −g(x, y) = − and = f (x, y) = .
∂x dt ∂y 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 definition.

Definition 6.6.1. A system of differential equations is called Hamiltonian if it can be written in


the form
dx ∂H dy ∂H
= , =− , (6.25)
dt ∂y dt ∂x
where H(x, y) is a twice continuously differentiable 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 ∂H dy ∂H
= , =− , (x(t0 ), y(t0 )) = (x0 , y0 ) (6.26)
dt ∂y dt ∂x

satisfy H(x(t), y(t)) = H(x0 , y0 ).


6.6. HAMILTONIAN SYSTEMS 169

Remark 6.6.1. In other words, the total energy is constant along solution curves, or
d
H(x(t), y(t)) = 0. (6.27)
dt
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) = Ek (x, y) + Ep (x, y)

where Ek (x, y) is the kinetic energy of the system at state (x, y), and Ep (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 differential equation mẍ + kx = 0,
where m > 0 is the mass and k > 0 is the spring constant. Introducing the momentum as p = mẋ
gives the two-dimensional first-order system
p
ẋ = , ṗ = −kx. (6.28)
m
In this case the Hamiltonian function satisfies ∂H/∂p = ẋ = p/m, so we obtain by integration
that H(x, p) = (p2 /2m) + h(x), and since h0 (x) = ∂H/∂x = −ṗ = kx, we can conclude (up to a
constant) that
p2 kx2
H(x, p) = + .
2m 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 (kx2 /2) and the Hamiltonian function takes the form

mv 2 kx2
H(x, v) = + . (6.29)
2 2
The solution curves to (6.28) are ellipses of the form

p2 kx2
+ = E,
2m 2
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 Hx (x∗ , y ∗ ) =
Hy (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
∂2H ∂2H
!
∗ ∗ (x∗ , y ∗ )
∂x∂y (x , y ) ∂y 2
A(x∗ ,y∗ ) = 2 ∂2H
(6.30)
− ∂∂xH2 (x∗ , y ∗ ) − ∂y∂x (x∗ , y ∗ )
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.


p

4m E=2

2m E=1
m
E=12

E=0
x
4 2 1 1 2 4
- - -
k k k k k k

- m
- 2m

- 4m

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 (x0 , y0 ) near
(x∗ , y ∗ ), the solution curve to (6.26) satisfies H(x0 , y0 ) = H(x(t), y(t)) for all t by theorem 6.6.1.
Also,
H(x∗ , y ∗ ) = lim H(x(t), y(t)) = H(x0 , y0 ). (6.31)
t→∞

Since the determinant D = Hxx (x∗ , y ∗ )Hyy (x∗ , y ∗ ) − (Hxy (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ẍ = −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 first 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 find the Hamiltonian function H(θ, ψ), proceed as in example 6.6.1: θ̇ = ∂H/∂ψ gives
∂H/∂ψ = ψ, and so H(θ, ψ) = ψ 2 /2+h(θ). Since ψ̇ = −∂H/∂θ = −h0 (θ), we get h0 (θ) = (g/`) sin θ,
and so h(θ) = −(g/`) cos θ. The Hamiltonian can be chosen as
ψ2 g
H(θ, ψ) = − cos θ. (6.34)
2 `
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).

Θ
-Π -А2 А2 Π

Θ
-mg

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 define a function that finds the numerical solution to the differential
equation (6.14), given an initial point (x0 , y0 ) and a range specification tmin ≤ t ≤ tmax (both given
as pairs of real numbers).
f@x_, y_D := 8x + y - x ^ 3, - 0.5 x<;
soln@iCond_, tRange_D := NDSolve@8x '@tD Š f@x@tD, y@tDD@@1DD, y '@tD Š f@x@tD, y@tDD@@2DD,
x@0D Š iCond@@1DD, y@0D Š iCond@@2DD<, 8x@tD, y@tD<, 8t, tRange@@1DD, tRange@@2DD<D;

The vector field is defined by f[x,y]. The function that generates the solution is soln. Then,
we define a function that generates a plot of the solution curve with the given initial condition and
t-range.
GeneratePlot@8iCond_, tRange_<D := ParametricPlot@
Evaluate@8x@tD, y@tD< . soln@iCond, tRangeDD, 8t, tRange@@1DD, tRange@@2DD<,
PlotRange ® 88- 2.2, 2.2<, 8- 2.2, 2.2<<, PlotStyle ® Thick, LabelStyle ® MediumD;

We now create a list of pairs {{x0 , y0 }, {tmin , tmax }} and generate a graph that shows solution
curves corresponding to the initial conditions by mapping the function GeneratePlot onto the list.
list = 8880, 2<, 8- 1, 10<<, 880, 1.5<, 8- 1.3, 10<<,
880, 1<, 8- 2.7, 10<<, 880, 0.5<, 8- 10, 10<<, 880, - 2<, 8- 1, 10<<,
880, - 1.5<, 8- 1.3, 10<<, 880, - 1<, 8- 2.7, 10<<, 880, - 0.5<, 8- 10, 10<<<;
g1 = Map@GeneratePlot, listD;

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.
arrowAt@x_, y_D := Arrow@88x, y< - 0.1 Hf@x, yD  Norm@f@x, yDDL, 8x, y<<D;
g1 = Map@GeneratePlot, listD;
g2 = Graphics@8Blue, Thick, Arrowheads@0.06D,
Apply@arrowAt, Transpose@listD@@1DD, 1D<D;
Show@g1, g2D

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 (x0 , y0 ) = (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 = 8880, 2<, 8- 2, 10<<, 880, 1.5<, 8- 1.3, 10<<,
880, 1<, 8- 2.7, 10<<, 880, 0.5<, 8- 10, 10<<, 880, - 2<, 8- 1, 10<<,
880, - 1.5<, 8- 1.3, 10<<, 880, - 1<, 8- 2.7, 10<<, 880, - 0.5<, 8- 10, 10<<<;
g1 = Map@GeneratePlot, listD;

NDSolve::ndsz : At t == -1.02201, step size is effectively zero; singularity or stiff system suspected. ‡

InterpolatingFunction::dmval :
Input value 8-1.99976< lies outside the range of data in the interpolating function. Extrapolation will be used. ‡

InterpolatingFunction::dmval :
Input value 8-1.99976< lies outside the range of data in the interpolating function. Extrapolation will be used. ‡
6.8. EXERCISES 173

A stiff system is encountered by the numerical method employed to solve the differential equa-
tion. Since this error occurs at t = −1.02201, it is a good idea to reduce the value of tmin to
−1. Admittedly, this process of weeding out numerical errors can become quite time-consuming.
Numerical methods for solving differential equations, and the phenomenon of stiff 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@ΘD, 8Θ, - Pi, Pi<, 8Ψ, - Pi, Pi<,
Contours ® 8- 0.6, 0, 0.5, 1, 2, 3.5<, ContourShading ® False, Axes ® 8True, True<,
ContourStyle ® 8Blue<, AxesLabel ® 8"Θ", "Ψ"<, LabelStyle ® Medium,
Ticks ® 888Pi  2, "А2"<, 8Pi, "Π"<, 8- Pi  2, "-А2"<, 8- Pi, "-Π"<<, None<,
AspectRatio ® Automatic, Frame ® FalseD;
g2 = Graphics@8Blue, Disk@80, 0<, 80.07, 0.07<D<D;
Show@g1, g2D

6.8 Exercises
Exercise 6.1. ♣ Find all equilibrium solutions and nullclines of the non-linear system

dx dy
= y 3 + 1, = x2 + y.
dt dt
Sketch a graph of the nullclines and indicate the motion along the nullclines.
Exercise 6.2. ♣ The non-linear system

dx dy
= x(1 − y 2 ), =x+y
dt dt
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
 x   y
dx/dt = x 1 − − y , dy/dt = y x − 1 − .
2 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 − x2 , 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 dy
= x + y + x2 , = y − x.
dt dt
(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 = x2 − 1
dy/dt = −y(x2 + 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 − x2 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 defined by
 
W = (x0 , y0 ) : lim (x(t), y(t)) = (0, 0) .
t→−∞

Exercise 6.8. Use polar coordinates find all equilibrium solutions and limit cycles, and their type.
Then, sketch the phase portrait.
dx/dt = x − x(x2 + y 2 )2
(a) ♣
dy/dt = y − y(x2 + y 2 )2 .
6.8. EXERCISES 175

Figure 6.17: The partial phase portrait for exercise 6.7.


y
4

x
-3 -2 -1 1 2 3 4

-1

-2

-3

dx/dt = −y + x(x2 + y 2 − (x2 + y 2 )2 )


(b)
dy/dt = x + y(x2 + y 2 − (x2 + 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

ẋ = y − x2
ẏ = 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, find all equilibrium points, analyze the linear system near each
equilibrium point, find 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) ♣ ẋ = 1 + y 2 , ẏ = xy

(b) ♣ ẋ = x − y 2 , ẏ = −y − xy

(c) ♣ ẋ = x + y 2 , ẏ = y + x2 y
176 CHAPTER 6. TWO-DIMENSIONAL NON-LINEAR SYSTEMS

(d) ♣ ẋ = 2xy − 2y 4 , ẏ = x2 − y 2 − xy 3

(e) ẋ = y, ẏ = −x − (1 + x2 )y

(f) ẋ = x2 + y 2 , ẏ = 1 − xy

(g) ẋ = 2x − y 2 , ẏ = 2x2 y + 4y − 3

(h) ẋ = x − x2 + 2y 2 , ẏ = xy + y

Exercise 6.12. ♣ Show that the one-parameter family

ẋ = y + µx − xy 2
ẏ = µ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 Dulac’s Criteria: Suppose (dx/dt, dy/dt) = F(x, y), and let ψ(x, y) be a
continuously differentiable 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, Dulac’s Criteria yield Bendixson’s Criteria (theorem 6.5.2) if ψ(x, y) = 1.


Exercise 6.14. Use Dulac’s Criteria in exercise 6.13 to show that none of the following system can
have a limit cycle.

(a) ♣ ẋ = x(1 − x − y), ẏ = y(2x − x2 − 2) using ψ = 1/(xy).

(b) ♣ ẋ = x(a − bx − cy), ẏ = y(d − ey − f x) using ψ = 1/(xy) where a, b, c, d, e, f > 0 and


x, y > 0.

(c) ẋ = x(1 − 4x − y), ẏ = y(2x − y − 2) using ψ = xm y n . Hint: find powers m and n so that
(div ψF)(x, y) = Cψ where C is a constant.

(d) ẋ = x(5 − 2x + y), ẏ = y(x − y − 2) using ψ = 1/(x4 y 5 ).

Exercise 6.15. ♣ One class of non-linear systems are given by the Liénard equations

ẍ + f (x)ẋ + g(x) = 0, (6.35)

where f (x) is the damping term and g(x) is the restoring force or stiffness. 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) = x2 − η and g(x) = ω 2 x.
6.8. EXERCISES 177

The system corresponding to (6.35) is

ẋ = y (6.36)
ẏ = −g(x) − f (x)y.

Use Mathematica to graph the limit cycle for the Liénard systems with g(x) = x, f (x) = x2 −
800x4 + 4000x6 .
Exercise 6.16. Use theorem 6.5.4 to show that the system

dx/dt = y − 8x3
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) ♣ ẋ = y − y 2 , ẏ = −x

(b) ♣ ẋ = x2 + 2y, ẏ = −2x − 2xy

(c) ẋ = y, ẏ = x3 − x

(d) ẋ = 2y + 4xy, ẏ = x2 − 2x − 2y 2

Exercise 6.18. Find a criterion that let you decide whether a given system of the form ẋ = f (x, y),
ẏ = g(x, y) is Hamiltonian, without having to explicitly find the Hamiltonian function H(x, y).
Then, apply this criterion to determine which of the following systems is Hamiltonian.

(a) ♣ ẋ = y, ẏ = x3 − x

(b) ♣ ẋ = xexy , ẏ = yexy

(c) ẋ = y + x2 − y 2 , ẏ = −x − 2xy

(d) ẋ = 2xy − sin x, ẏ = y cos x − y 2 + 3x2

Exercise 6.19. Consider the one-parameter family of Hamiltonian systems given by

H(x, y) = x2 + y 2 − µx2 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

ẋ = −(∂F/∂x)(x, y) (6.37)
ẏ = −(∂F/∂y)(x, y)

can be used to find 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 = 4x2 y − x4 − y 4 by finding 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

ẋ = −(∂F/∂y)(x, y) (6.38)
ẏ = (∂F/∂x)(x, y).

Sketch the phase portrait of (6.38) for the surface z = 4x2 y − x4 − y 4 by finding 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
Differential 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 differential equation
dP
= (a − bP ) · P, (7.1)
dt
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
= (a − bP )P − cP Q (7.2)
dt
dQ
= (d − eQ)Q − f P Q, (7.3)
dt
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 = (a−bP )P −cP Q = P (a−bP −cQ) = 0 either if P = 0, or if a−bP −cQ = 0.
In the first 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 = (d − eQ)Q − f P Q = Q(d − eQ − f P ) = 0 implies Q = 0 or d − eQ − f P = 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 − eQ − f P = 0 gives the following equilibrium points.
   
∗ ∗ d ∗
a 
∗ D2 D3
S1 = (0, 0), S2 = 0, , S3 = , 0 , S4 = , , (7.4)
e b D1 D1

where we let D1 = be−cf , D2 = ae−cd, and D3 = bd−af for convenience of notation. Linearization
yields the matrix  
a − 2bP − cQ −cP
A(P,Q) = . (7.5)
−f Q d − 2eQ − f P
To keep this general analysis concise, we will use only the trace-determinant plane to find the
type of each equilibrium solution. However, it is possible to extract more information about the
phase portrait from finding 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 find
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 first
quadrant. Examples of other cases can be found in exercise 7.2. S∗4 is in quadrant I if either

I. D1 , D2 , D3 are all positive, or if

II. D1 , D2 , D3 are all negative.

(a) For S∗1 = (0, 0), the linearization matrix is


 
a 0
A(0,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 − c(d/e) 0 D2 /e 0
A(0,d/e) = = .
−f (d/e) d − 2e(d/e) −f d/e −d

The trace of this matrix is T = (D2 /e) − d and the determinant is D = D2 (−d/e). We have
that T 2 − 4D = ((D2 /e) − d)2 − 4D2 (−d/e) = ((D2 /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 − 2b(a/b) −c(a/b) −a −c(a/b)
A(a/b,0) = = .
0 d − f (a/b) 0 D3 /b

The trace is T = (D3 /b) − a and the determinant is D = D3 (−a/b). We have that T 2 − 4D =
((D3 /b) − a)2 − 4D3 (−a/b) = ((D3 /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 = (D2 /D1 , D3 /D1 ), the linearization matrix is


   
1 aD1 − 2bD2 − cD3 −cD2 1 −bD2 −cD2
A(a/b,0) = = ,
D1 −f D3 dD1 − 2eD3 − f D2 D1 −f D3 −eD3

where we used that aD1 −2bD2 −cD3 = abe−acf −2abe+2bcd−bcd+acf = bcd−abe = −bD2 ,
and similarly dD1 − 2eD3 − f D2 = −eD3 .
The trace is T = (−bD2 −eD3 )/D1 and the determinant is D = (beD2 D3 −cf D2 D3 )/(D1 )2 =
(be − cf )D2 D3 /(D1 )2 = D2 D3 /D1 . Also,

−bD2 − eD3 2
   
2 D2 D3
T − 4D = −4
D1 D1
2 2 2 2
b D2 + 2beD2 D3 + e D3 − 4D1 D2 D3
=
D12
b2 D22 + 2beD2 D3 + e2 D32 − 4(be − cf )D2 D3
=
D12
b2 D22 − 2beD2 D3 + e2 D32 + 4cf D2 D3
=
D12
bD2 − eD3 2 4cf D2 D3
 
= + .
D1 D12

This quantity is always positive since in either of the two cases considered here, D2 and D3
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 specific
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 dQ
= (8 − 2P )P − P Q, = (10 − 5Q)Q − 2P Q.
dt dt
We have that D1 = be − cf = 2 · 5 − 1 · 2 = 8, D2 = ae − cd = 8 · 5 − 1 · 10 = 30, D3 = 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 dQ
= (1.5 − 0.5P )P − 2P Q, = (10 − 10Q)Q − 5P Q,
dt dt
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.


Q
4

P
1 2 3 4 5 6

We have D1 = be − cf = −5, D2 = ae − cd = −5, and D3 = 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.


Q

2.0

1.5

1.0

0.5

P
1 2 3 4

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 v1 ≈ (0.35, 0.94) for the stable separatrix and v2 ≈ (0.91, −0.42)
for the unstable separatrix.
Example 7.1.3. Consider the one-parameter family of competing species models given by

dP dQ
= (4 − P )P − µP Q, = (5 − 2Q)Q − P Q,
dt dt
7.2. PREDATOR-PREY MODELS 183

where µ ≥ 0. We investigate the bifurcations of this family as µ increases. First, we compute


the values of D1 , D2 , D3 . They are D1 = 2 − µ, D2 = 8 − 5µ, D3 = 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, D1 , D2 , D3 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 first quadrant and is not relevant for the dynamics of points with
non-negative coordinates. The value of D2 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 first species (P ) reaches a certain intensity, given by the bifurcation value µ0 = 8/5,
the first 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
= aP Q − bP (7.6)
dt
dQ
= cQ − dP Q, (7.7)
dt
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” aP Q 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 Qj . (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 −dP Q 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 finding the nullclines and linearizing near the equilibrium points.
We have dP/dt = 0 precisely when P = 0 or Q = b/a; in the first 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
 
∗ ∗ c b
S1 = (0, 0), S2 = , . (7.8)
d a

The linearization matrix is  


aQ − b aP
A(P,Q) = . (7.9)
−dQ c − dP
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 Hartman’s 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 aP Q − bP P (aQ − b)
= = .
dQ cQ − dP Q 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 aQ − b
dP = dQ,
P Q
ˆ  ˆ  
c  b
− d dP = a− dQ,
P Q
c log P − dP = aQ − b log Q + C.

Exponentiating both sides of the last equation and absorbing the constant gives the implicit solution

P c Qb = CeaQ+dP . (7.10)

It can be seen that the curves described in the P Q-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 fill out the first 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 Q10 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).

Q HpreyL

14

12

10

0 P HpredatorsL
5 10 15 20

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 first 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 = 6Q − P Q + A sin(2πt).

This is the model in example 7.2.1 with the addition of the perturbation term A sin(2πt) 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 first 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.
Q HpreyL Q HpreyL

14 14

12 12

10 10

8 8

6 6

4 4

2 2

0 P HpredatorsL 0 P HpredatorsL
5 10 15 20 5 10 15 20

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 conflict with observed
phenomena of predator-prey populations in the field, 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 = 6Q − P Q.

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 different – 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 fixed 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.

Q HpreyL Q HpreyL

14 14

12 12

10 10

8 8

6 6

4 4

2 2

0 P HpredatorsL 0 P HpredatorsL
5 10 15 20 5 10 15 20

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).

P,Q P,Q
20 60

50
15
40

10 30

20
5
10

t t
1 2 3 4 5 1 2 3 4 5
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 NP
= aP 1 − (7.12)
dt Q
 
dQ Q cP Q
= bQ 1 − − , (7.13)
dt Qmax d+Q
where a, b, c, d, N, Qmax > 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/Qmax )), where, as usual, Qmax is the carrying capacity.
• The term −cP Q/(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 find prey.
• The factor (1 − (N P/Q)) indicates that there will be stable predator population if 1 −
(N P/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,
Qmax = 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 first
case, the first equation (7.12) becomes undefined.
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
0.1P 2
!
0.2 − 0.2P
Q Q 2
A(P,Q) = Q 1.2P (7.14)
− 1.2+Q 0.8 − 0.16Q − (1.2+Q) 2

 
∗ 0.2 0
If S1 = (0, 10), AS∗1 ≈ has negative determinant, and so S∗1 is a saddle. Also,
−0.89 −0.8
 
−0.2 0.4
AS∗2 ≈ . Its determinant D is positive, its trace T is positive, and T 2 − 4D < 0;
−0.37 0.22
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 fixed 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.

Q HpreyL
6

0 P HpredatorsL
1 2 3 4 5 6

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 fixed 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 differential equation for its angle of displacement θ is

d2 θ g
+ sin θ = 0.
dt2 `

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

d2 θ dθ g
+ r + sin θ = A sin(ωt), (7.15)
dt2 dt `

where all parameters are positive. In this section, we investigate the dynamics of the forced damped
pendulum given by (7.15). We first 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


= ψ (7.16)
dt
dψ g
= − sin θ − rψ
dt `

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.


Ψ
4

Θ
-3 -2 -1 1 2 3

-2

-4

These findings 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 fixed 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 first-order non-autonomous system:

= ψ (7.17)
dt
dψ g
= − sin θ − rψ + A sin(ωt).
dt `
The pendulum is “driven” by a sine function with amplitude A and circular frequency ω. In
the remainder of this section, we fix 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 = [−π, π) × R × {0}. 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 fixed 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
1
5 0 Ψ
-1
10 2
Τ 1
15 0 Θ
-1
-2

We will analyze the dynamics given by (7.17) graphically by plotting the solutions at the
times tn = t0 + np, where n = 0, 1, 2, . . . and p = 2π/ω is the period of the forcing function
f (t) = A sin(ωt). Thus, we may think of sampling a solution curve (θ(t), ψ(t)) at equally spaced
time intervals and obtaining data of the form (θ(tn ), ψ(tn ), tn ). Identifying all times tn modulo p
with the initial time t0 gives a set S which lies in the plane S = [−π, π) × R × {t0 }. This plane is
called a stroboscopic surface of section or a Poincaré surface of section.
By considering the returns of the initial point (θ0 , ψ0 ) to S, we are defining a discrete orbit
(θ(tn ), ψ(tn )) where (θ(t0 ), ψ(t0 )) = (θ0 , ψ0 ) and tn = t0 + 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).
Ž
Τ
2 4 6 2
0
2

1
1

Ψ
0 Ψ

-1
-1

-2 -2
2 0 -2 -3 -2 -1 0 1 2 3
Θ Θ

discrete orbit as being generated by the two-dimensional map M : R2 → R2 , where M (θ, ψ) is the
solution at t = p = 2π/ω to the differential equation (7.17) with initial value (θ, ψ). Thus,
(θ(tn ), ψ(tn )) = M n (θ(t0 ), ψ(t0 )).
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 Poincaré map of the forced damped
pendulum.
The Poincaré 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 first ten iterates of (θ0 , ψ0 ) = (1, 1) of the Poincaré map M when t0 = 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 fixed 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 M n (θ0 , ψ0 ) = S∗ . (7.18)
n→∞
In other words, if A = 0.5, the fixed point S∗ is globally attracting. Physically, the effect of the
external forcing is that in the long run, the pendulum will enter a periodic motion, and in particular
at time tn = 2πn, for n large, it is in state S∗ .
If we use a starting time other than t0 = 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 Poincaré map of the forced damped
pendulum for A = 0.5. We observe only a single attracting fixed point.
2

Ψ 0

-1

-2
-3 -2 -1 0 1 2 3
Θ

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 Poincaré map M for 100 ≤ n ≤ 500, we obtain the picture shown
in Figure 7.13a. We observe a definite pattern. This pattern persists if a different 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 conditions1 .
The set Ω observed is actually an attractor, just like the single fixed point S∗ in example 7.3.2.
Thus we have that for almost all (θ0 , ψ0 ),

lim M n (θ0 , ψ0 ) = Ω. (7.19)


n→∞

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 iterates2 .
It can be shown that the set Ω is invariant under the Poincaré 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 Poincaré map of this initial point will exhibit this pattern.
2
Generating this image took about 10 minutes of computing time on the author’s 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) = 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.
2 2

1 1

0 0
Ψ

Ψ
-1 -1

-2 -2
-3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3
Θ Θ

Figure 7.13: Iterates 100 ≤ n ≤ 500 of: (a) (θ, ψ) = (0, 0) (left) and (b) (θ, ψ) = (1, 1) (right) under
the Poincaré map of the forced damped pendulum for A = 2.2. We observe a set Ω that acts as an
attractor.
1 1

0 0

-1 -1

-2 -2
Ψ

-3 -3

-4 -4

-5 -5
-3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3
Θ Θ
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 Poincaré 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 Poincaré map. We describe two of its principal properties.

(1) It exhibits sensitive dependence on initial conditions. This means that if S1 and S2 are
two points (the “initial conditions”) in Ω with S1 6= S2 that are close together, then under
iteration by the Poincaré map the distance between the iterates M n (S1 ) and M n (S2 ) 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 S1 = (0, 0) and the nearby point S2 = (0, 10−5 ) diverge
under subsequent applications of the Poincaré map. After 24 iterates the separation of the
iterates is almost as large as the size of thepattractor (which can be roughly approximated
as the diagonal of its bounding box, i.e. 42 + (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 roundoff errors in intermediate
calculations, it is numerically impossible to determine the position of a high iterate of an initial
condition (θ0 , ψ0 ) under the Poincaré 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 S1 = (0, 0) and S2 = (0, 10−5 ) and the absolute error |M n (S1 )−
M n (S2 )| under the Poincaré 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 five 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 Poincaré 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 briefly 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 magnifications of two
areas the locations of which are shown in Figure 7.16.

More specifically, every “curve” in Figure 7.14 actually consists of two curves. Subsequent
magnifications show that each of these curves again consists of two curves, and so on ad
infinitum. 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 magnified in Figure 7.17.

Figure 7.17: Magnification 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 differential equations
of the form
dx
= σ(y − x) (7.20)
dt
dy
= ρx − y − xz
dt
dz
= xy − βz.
dt
This system was developed by the meteorologist Edward Lorenz in 1963 as a simple convection
model. Specifically, it is used to describe the convective flow of a fluid 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 S1 = (0, 0, 0), S2,3 = (±6 2, ±6 2, 27).
Linearization yields the matrix
 
−10 10 0
A(x,y,z) =  28 − z −1 −x  . (7.21)
y x −8/3
The eigenvalues of A(0,0,0) are λ1 ≈ 11.8, λ2 ≈ −22.8, λ3 ≈ −2.7, so the equilibrium point
S1 = (0, 0, 0) has a 1-dimensional unstable manifold tangent to the eigenvector v1 ≈ (0.5, 1, 0) and
a 2-dimensional stable manifold tangent to the plane spanned by the eigenvectors v2 ≈ (−0.8, 1, 0)
and v3 = (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
S2,3 have a 1-dimensional stable manifold tangent to the eigenvector v1 ≈ (±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 S2 and S3 . 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 R3 , 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).

20
y

-20

40

30
z

20

10

-10
0
x 10
20

Table 7.2: The values of the solution curves x1 (t), x2 (t) for the Lorenz system (7.20) with σ = 10,
β = 8/3, ρ = 28 and the initial points S1 = (1, 0, 0), S2 = (1, 10−5 , 1), respectively, and the absolute
error.

t x1 (t) x2 (t) |x1 (t) − x2 (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).
20 20

y 10 10
y
0 0

-10 -10

-20 -20

40 40

30 30
z z

20 20

10 10

-10 -10
0 0
x x
10 10

(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
magnifications (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 sense4 ) than a finite 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 defines the Poincaré 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 defined; they are fixed 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@88Θ_, Ψ_<, A_<D :=
Flatten@Evaluate@8Mod@x@tD, 2 Pi, - PiD, y@tD< . NDSolve@8x '@tD Š y@tD,
y '@tD Š - Hg  lL Sin@x@tDD - r y@tD + A Sin@Ω tD, x@0D Š Θ, y@0D Š Ψ<,
8x@tD, y@tD<, 8t, 0, 2 Pi  Ω<D . t ® 2 Pi  ΩDD;
4
This can be done using Hausdorff 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 magnified (left); the magnification (right).
20

y 10 -6
y
0 -8

-10 -10

-12
-20
42

40
40

30
z
z 38

20
36

10
34
-16
-10 -14
0 -12
x x
10 -10

Note that what this function solves the differential 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 Poincaré map. In the
notation from section 7.3, the output is the ordered list

(M n (θ, ψ) : nMin ≤ n ≤ nMax) .

PList@8Θ_, Ψ_<, A_, nMin_, nMax_D := Module@8M, n<, M@0D := 8Θ, Ψ<;
M@n_D := M@nD = Poincare@8M@n - 1D, A<D; Table@M@nD, 8n, nMin, nMax<DD;

To create the graph in Figure 7.13a we use the following code.

ListPlot@PList@80, 0<, 2.2, 100, 500D, LabelStyle ® Medium,


FrameLabel ® 8"Θ", "Ψ"<, PlotRange ® 88- Pi, Pi<, 8- 5, 1<<,
PlotStyle ® 8PointSize@0.025D, Black<, Frame ® True, AspectRatio ® 1, Axes ® FalseD

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.

Timing@list = PList@80, 0<, 2.2, 100, 250 000D;D

8650.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 define the right-hand side of equation (7.20) using the standard parameters σ =
10, β = 8/3, and ρ = 28. Then, we define the solution using the initial condition (x(0), y(0), z(0)) =
(x, y, z) for 0 ≤ t ≤ 50.

F@x_, y_, z_D := 810 Hy - xL, 28 x - y - x z, x y - H8  3L z<;


soln@x0_, y0_, z0_D := NDSolve@8x '@tD Š F@x@tD, y@tD, z@tDD@@1DD,
y '@tD Š F@x@tD, y@tD, z@tDD@@2DD, z '@tD Š F@x@tD, y@tD, z@tDD@@3DD,
x@0D Š x0, y@0D Š y0, z@0D Š z0<, 8x@tD, y@tD, z@tD<, 8t, 0, 50<D;

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 bird’s eye view.

ParametricPlot3D@Evaluate@8x@tD, y@tD, z@tD< . soln@1, 1, 1DD, 8t, 30, 50<,


PlotStyle ® 8Thick, Blue<, LabelStyle ® Medium, AxesLabel ® 8"x", "y", "z"<D

x
-10 0 10

20

10

0 y

-10

10
20
z -20
30
40

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 =
Flatten@Table@Evaluate@8x@tD, y@tD, z@tD< . soln@1, 0, 0DD . Ht ® iL, 8i, 0, 50, 5<D, 1D;
list2 = Flatten@Table@Evaluate@8x@tD, y@tD, z@tD< . soln@1, 0.00001, 0DD . Ht ® iL,
8i, 0, 50, 5<D, 1D;
errors = Map@Norm, list1 - list2D;
MapThread@List, 8Table@i, 8i, 0, 50, 5<D, list1, list2, errors<D  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.
dP dQ
(a) ♣ = (3 − P )P − 0.5P Q, = (4 − 2Q)Q − P Q
dt dt
dP dQ
(b) ♣ = (3 − 0.5P )P − 2P Q, = (5 − 2Q)Q − P Q
dt dt
dP dQ
(c) = (6 − P )P − 2P Q, = (4 − Q)Q − P Q
dt dt
dP dQ
(d) = (6 − 2P )P − 0.5P Q, = (4 − 3Q)Q − P Q
dt dt
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.
dP dQ
(a) ♣ = (5 − P )P − P Q, = (4 − 2Q)Q − P Q
dt dt
dP dQ
(b) ♣ = (4 − P )P − P Q, = (6 − Q)Q − P Q
dt dt
dP dQ
(c) = (10 − 2P )P − 3P Q, = (6 − Q)Q − P Q
dt dt
dP dQ
(d) = (4 − P )P − 0.5P Q, = (5 − 2Q)Q − 2P Q
dt dt
Exercise 7.3. Describe the bifurcations affecting the orbits of initial points with positive coordinates
of the following competing species models.
dP dQ
(a) ♣ = (4 − P )P − 0.5P Q, = (4 − Q)Q − µP Q, µ ≥ 0.
dt dt
dP dQ
(b) ♣ = (3 − 0.5P )P − 2P Q, = (5 − 2Q)Q − µP Q, µ ≥ 0.
dt dt
dP dQ
(c) = (4 − P )P − µP Q, = (6 − 2Q)Q − P Q, µ ≥ 0.
dt dt
7.6. EXERCISES 205

dP dQ
(d) = (4 − P )P − µP Q, = (6 − Q)Q − µ2 P Q, µ ≥ 0.
dt dt

Exercise 7.4. Sketch the phase portrait of the following predator-prey models. Hint: find 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.5P Q2 − 2P , dQ/dt = 2Q − P Q. Use contours for C = 0.01, 0.1, 0.5, 0.75, and
viewing window 0 ≤ P ≤ 10, 0 ≤ Q ≤ 6.

(b) dP/dt = P Q2 − 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.1P Q − 2P , dQ/dt = 4Q − P 2 Q. Use appropriate contours and viewing window.

(d) dP/dt = 0.1P Q4 − 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.
   
dP 10P dQ Q PQ
(a) ♣ = 0.2P 1− , = 0.1Q 1 − −
dt Q dt 20 1+Q
   
dP 2P dQ Q 2P Q
(b) ♣ = 0.5P 1− , = 5Q 1 − −
dt Q dt 10 1+Q
   
dP 2P dQ Q 2P Q
(c) = 0.5P 1− , = 4Q 1 − −
dt Q dt 10 2+Q
   
dP 0.5P dQ Q PQ
(d) =P 1− , = 2Q 1 − −
dt Q dt 20 1+Q

Exercise 7.6. In this exercise, we use the Animate function in Mathematica to explore visually what
happens to solutions of the differential 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]:= g1@A_D :=
ParametricPlot@Evaluate@8Mod@x@tD, 2 Pi, - PiD, y@tD< . NDSolve@8x '@tD Š y@tD, y '@tD Š
- Sin@x@tDD - 0.2 y@tD + A Sin@tD, x@0D Š 0, y@0D Š 0<, 8x@tD, y@tD<, 8t, 0, 200<DD,
8t, 100, 200<, PlotStyle ® 8Blue, Thick<, PlotRange ® 88- Pi, Pi<, 8- Pi, Pi<<,
Frame ® True, AspectRatio ® 1, Axes ® FalseD;
g2@A_D := Graphics@8Text@A, 8- 2.5, - 2.75<D<D;
206 CHAPTER 7. APPLICATIONS OF SYSTEMS OF DIFFERENTIAL EQUATIONS

In[3]:= Animate@Show@g1@AD, g2@ADD, 8A, 0, 2.2<, AnimationRunning ® FalseD

Out[3]=
0

-1

-2

0.148
-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 specific 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 different behavior do you observe? Can you describe this behavior
in words?

(b) Identify the ranges of the parameter A for which the different 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

dulum’s path to chaos. As you can observe, it is a complicated and not very straightforward
journey.

Exercise 7.7. ♣ The Rössler system is a three-dimension autonomous system of differential equa-
tions of the form
dx
= −y − z (7.22)
dt
dy
= x + ay
dt
dz
= b − cz − xz,
dt
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 Chua’s circuit. The differential equations describing this electric circuit (which like the forced
damped pendulum can be explored in a laboratory) can be written as

dx
= a(y − x − g(x)) (7.23)
dt
dy
= x−y+z
dt
dz
= −by,
dt
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
= −aP + bP Q (7.24)
dt
dQ
= (c − dQ)Q − eP Q
dt
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 first quadrant.
(c) Use the linearized system at each equilibrium point to determine its type. Using the
trace-determinant plane is sufficient 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
= −3P + P Q (7.25)
dt
dQ
= (8 − 2Q)Q − 0.5P Q.
dt
Use a viewing window of 0 ≤ x ≤ 8, 0 ≤ y ≤ 6. Choose a sufficient 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
= −3P + (1 + µ)P Q (7.26)
dt
dQ
= (8 − 2Q)Q − 0.5(1 + µ)P Q.
dt
For µ = 0, this coincides with system (7.25). If µ > 0, predators benefit more from an
encounter with prey, and prey suffer more. If µ < 0, the opposite is true.
Investigate the bifurcations the equilibrium point S∗ lying in the first quadrant undergoes for
different values of µ. More specifically, determine the values of µ for which the equilibrium
point reaches the boundary of the first 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 fixed amplitude γ and period 2π, the horizontal
strain on the beam can be modeled using the forced Duffing equation
d2 y dy
2
+ν + y 3 − y = γ sin t, (7.27)
dt dt
where ν > 0 and γ ≥ 0 are parameters. Equivalently, we can write (7.27) as
dy
= v (7.28)
dt
dv
= −νv − y 3 + y + γ sin t.
dt
(1) If γ = 0, find all equilibrium points of (7.28) and use the corresponding linearized systems to
find the type of each equilibrium point. Why are the results not surprising?
(2) Adapt the code in section 7.5 to define the Poincaré map for (7.28).
(3) Let ν = 0.05 and γ = 2.8. Plot the iterates of the point (y, v) = (1, 0) under the Poincaré
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 P0 = (1, 0) and P1 = (1.01, 0),
P2 = (1.001, 0), P3 = (1.0001, 0), P4 = (1.00001, 0) under the Poincaré map. For i = 1, 2, 3, 4,
how many iterates does it take for the error |P0 − Pi | 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 coefficients 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 coefficients for non-homogeneous linear systems.
The basic idea of using Laplace transforms is to apply an (as yet undefined) “transform” L
to both sides of a differential equation, thus converting the differential equation into an algebraic
equation. Then, the algebraic equation is solved for the transform of the unknown function, and the
“inverse transform” L−1 is applied to both sides of the solved equation, thus yielding the solution
to the differential equation.
Schematically, this process can be illustrated starting with, for example, a second order linear
differential equation with constant coefficients, as follows.

ay 00 + by 0 + cy = f
↓ (apply L)
00 0
L(ay + by + cy) = L(f )
↓ (solve for L(y))
L(y) = G
↓ (apply L−1 )
y = L−1 (G)

Of course, some details need to be addressed for this to make sense. In particular, we need to
express the left side L(ay 00 + by 0 + cy) in terms of L(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 differential equations.
We now define 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

Definition 8.1.1. Let y = f (x) be a function defined for x ≥ 0. Then the Laplace transform of
f (x) is the function ˆ ∞
F (s) = L(f )(s) = e−sx f (x) dx. (8.1)
0

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 finding possible
solutions to a differential equation. Whether a function we obtained formally is actually a solution
to a given differential equation can of course be verified 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 0 − 2y = e5x , y(0) = 3. (8.2)

This is a first order linear differential 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
ˆ ∞
0
L(y − 2y)(s) = e−sx (y 0 − 2y) dx
ˆ0 ∞ ˆ ∞
= e−sx y 0 dx − 2 e−sx y dx
ˆ0 ∞ 0

= e−sx y 0 dx − 2L(y)(s).
0

Using integration by parts, and assuming that limx→∞ e−sx y = 0 for the yet unknown solution y,
we obtain
ˆ ∞ ˆ ∞
−sx 0 −sx x=∞
e−sx y dx

e y dx = e y x=0 + s
0 0
= −y(0) + sL(y)(s).

Thus, L(y 0 − 2y)(s) = −y(0) + (s − 2)L(y)(s). The Laplace transform of the right side of (8.2) is
computed as follows:
ˆ ∞
5x
L(e )(s) = e−sx e5x dx
ˆ ∞
0

= e(5−s)x dx
0
1 (5−s)x x=∞

= e
5−s
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:


1
−y(0) + (s − 2)L(y)(s) =
s−5
1
−3 + (s − 2)L(y)(s) =
s −
 5    
1 1 3
L(y)(s) = +
s−5 s−2 s−2
     
1 1 1 1 3
L(y)(s) = − +
3 s−5 3 s−2 s−2
   
1 1 8 1
L(y)(s) = + ,
3 s−5 3 s−2
where partial fraction decomposition was used to get from the third to the fourth line. Since
L(e5x )(s) = 1/(s − 5), we have L−1 (1/(s − 5))(x) = e5x , and similarly L−1 (1/(s − 2))(x) = e2x .
Using (or assuming) linearity of the inverse Laplace operator, we obtain:
y = L−1 L(y)(x)
   
1 −1 1 8 −1 1
= L (x) + L (x)
3 s−5 3 s−2
1 5x 8 2x
= e + e ,
3 3
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 differential 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,
ˆ ∞
L(eλx )(s) = e−sx eλx dx
ˆ0 ∞
= e(λ−s)x
0
1 (λ−s)x x=∞

= e
λ−s
x=0
1
= ,
s−λ
where s > λ. In particular, if λ = 0, we obtain
1
L(1) =
s
for s > 0.
214 CHAPTER 8. LAPLACE TRANSFORMS

Example 8.2.2. If f (x) = cos(βx) with β ∈ R, we have


ˆ ∞
L(cos(βx))(s) = e−sx cos(βx) dx
0 −sx  x=∞
e β sin(βx) se−sx cos(βx)
= −
s2 + β 2 s2 + β 2
x=0
s
= 2 ,
s + β2
where s > 0. The antiderivative of e−sx cos(βx) can be found by using integration by parts twice.
Similarly, for s > 0,
β
L(sin(βx))(s) = 2 .
s + β2
Example 8.2.3. If f (x) = x, then
ˆ ∞
L(x)(s) = e−sx x dx
0
x=∞
e−sx (1 + sx)
= −
s2
x=0
1
= 2,
s
for s > 0. Again, integration by parts, and also the fact that limx→∞ e−sx xn = 0 for s > 0 were
used.1 In addition, for s > 0,
ˆ ∞
L(xn+1 )(s) = e−sx xn+1 dx
0
ˆ
1 −sx n+1 x=∞ n + 1 ∞ −sx n

= − e x + e x dx
s
x=0 s 0
n+1
= L(xn ).
s
Thus, L(x2 )(s) = (2/s)L(x) = 2/s2 , L(x3 )(s) = (3/s)L(x2 )(s) = (3)(2)/s3 , and in general, we have
for n = 0, 1, 2, 3, . . . and s > 0,
n!
L(xn )(s) = n+1 .
s
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) = L(f )(s), then
ˆ ∞
L(g)(s) = e−sx eλx f (x) dx
ˆ0 ∞
= e−(s−λ)x f (x) dx
0
= L(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 L’Hôpital’s Rule.
8.2. THE LAPLACE TRANSFORM OF SELECTED FUNCTIONS 215

Table 8.1: Laplace transforms of selected functions.

f (x) L(f )(s)


1
1
s
1
eλx
s−λ
s
cos(βx)
s2 + β 2
β
sin(βx)
s2 + β 2
1
x
s2
n!
xn n+1
s
eαx f (x) L(f )(s − α)
d
xf (x) − L(f )(s)
ds
dn
xn f (x) (−1)n n L(f )(s)
ds
n!
xn eλx
(s − λ)n+1
f 0 (x) sL(f )(s) − f (0)
f 00 (x) s2 L(f )(s) − sf (0) − f 0 (0)
f (n) (x) sn L(f )(s) − sn−1 f (0) − sn−2 f 0 (0) − . . . − sf (n−2) (0) − f (n−1) (0)
e−as
H(x − a) ,a≥0
s
f (x − a)H(x − a) e−as L(f )(s), a ≥ 0
´ T −sx
0 e f (x) dx
f (x) : f (x + T ) = f (x)

1 − e−sT
X L(f )(s)
f (x − kT )H(x − kT )
1 − e−sT
k=0

X L(f )(s)
(−1)k f (x − kT )H(x − kT )
1 + e−sT
k=0
δ(x − a) e−as , a ≥ 0
216 CHAPTER 8. LAPLACE TRANSFORMS

Example 8.2.5. If g(x) = xf (x) and F (s) = L(f )(s), then


ˆ ∞
L(g)(s) = e−sx xf (x) dx
ˆ0 ∞

= − e−sx f (x) dx
0 ∂s
ˆ ∞ 
d −sx
= − e f (x) dx
ds 0
= −F 0 (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 justified by results from calculus. If h(x) = x2 f (x)
and we let G(s) = L(g)(s), then we have G(s) = −F 0 (s) and thus

L(h)(s) = −G0 (s) = F 00 (s).

Repeated application of this result leads to the formula

L(xn 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 f1 (x), f2 (x) let F1 (s) = L(f1 )(s) and F2 (s) = L(f2 )(s). Then,

L(c1 f1 (x) + c2 f2 (x))(s) = c1 L(f1 (x))(s) + c2 L(f2 (x))(s) = c1 F1 (s) + c2 F2 (s). (8.3)

Also,

L−1 (c1 F1 (s) + c2 F2 (s))(x) = c1 L−1 (F1 (s))(x) + c2 L−1 (F2 (s))(x) = c1 f1 (x) + c2 f2 (x). (8.4)

Proof. The first result follows from the linearity of the integral:
ˆ ∞
L(c1 f1 (x) + c2 f2 (x))(s) = e−sx (c1 f1 (x) + c2 f2 (x)) dx
0
ˆ ∞ ˆ ∞
−sx
= c1 e f1 (x) dx + c2 e−sx f2 (x) dx
0 0
= c1 F1 (s) + c2 F2 (s).

Applying L−1 to the previous equation and using that L−1 L(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
n
 
n λx n d 1
L(x e )(s) = (−1)
dsn s − λ
1
= (−1)n (−1)n (n!)
(s − λ)n+1
n!
= .
(s − λ)n+1
8.2. THE LAPLACE TRANSFORM OF SELECTED FUNCTIONS 217

Linearity gives
xn eλx
 
1
L (s) = ,
n! (s − λ)n+1
so
xn eλx
 
−1 1
L (x) = . (8.5)
(s − λ)n+1 n!
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 differential equations to solve them (see
example 8.1.1).

Theorem 8.2.2. Suppose F (s) = L(f )(s). Then,

L(f 0 )(s) = sF (s) − f (0) (8.6)


00 2 0
L(f )(s) = s F (s) − sf (0) − f (0) (8.7)
(3) 3 2 0 00
L(f )(s) = s F (s) − s f (0) − sf (0) − f (0)
...
L(f (n)
)(s) = sn F (s) − sn−1 f (0) − sn−2 f 0 (0) − . . . − sf (n−2) (0) − f (n−1) (0). (8.8)

Proof. Using integration by parts, we obtain


ˆ ∞
0
L(f )(s) = e−sx f 0 (x) dx
0
ˆ ∞
x=∞
= e−sx f (x) x=0 + s e−sx f (x) dx
0
= −f (0) + sF (s).

This establishes (8.6). We used (or rather assumed) that limx→∞ 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 0 instead of f , we get

L(f 00 )(s) = sL(f 0 )(s) − f 0 (0)


= s(sF (s) − f (0)) − f 0 (0) = s2 F (s) − sf (0) − f 0 (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 ,

L(f n+1 )(s) = sL(f (n) )(s) − f (n) (0)


= s(sn F (s) − sn−1 f (0) − . . . − f (n−1) (0)) − f (n) (0)
= sn+1 F (s) − sn f (0) − . . . − sf (n−1) (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 finding Laplace
transforms to solving initial value problems. The examples below can already be solved using the
characteristic equation and the method of undetermined coefficients, 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
defined, 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, finding coefficients for partial fractions again leads to factoring
polynomials and solving systems of linear equations.
Example 8.3.1. Solve the initial value problem

y 00 − 5y 0 + 4y = e−2x , y(0) = 0, y 0 (0) = 5.

Letting Y (s) = L(y)(s), using theorem 8.2.2, and y(0) = 0, y 0 (0) = 5 gives

L(y 00 )(s) = s2 Y (s) − sy(0) − y 0 (0) = s2 Y (s) − 5


L(y 0 )(s) = sY (s) − y(0) = sY (s).

Thus, applying the Laplace transform to the left side yields

L(y 00 − 5y 0 + 4y)(s) = L(y 00 )(s) − 5L(y 0 )(s) + 4L(y)(s)


= (s2 Y (s) − 5) − 5(sY (s)) + 4Y (s)
= (s2 − 5s + 4)Y (s) − 5, (8.9)

Note the appearance of the characteristic equation (in terms of s instead of λ) as the coefficient
for Y (s). Regarding the right side of the differential equation, L(e−2x ) = 1/(s + 2). Solving the
resulting equation Y (s)(s2 − 5s + 4) − 5 = 1/(s + 2) for Y (s) leads to

5 1
Y (s) = + .
s2 − 5s + 4 (s + 2)(s2 − 5s + 4)

In order to find the inverse Laplace transform of the right-hand side, we need to find the partial
fraction decompositions of 5/(s2 − 5s + 4) and 1/((s + 2)(s2 − 5s + 4)).
We remind the reader how to do this for the first term. After factoring s2 −5s+4 = (s−4)(s−1),
we can use the cover-up method, as follows: we need to find coefficients A and B so that

5 A B
= + .
(s − 4)(s − 1) s−4 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 1 1 1 1 1 1
= + − .
(s + 2)(s − 4)(s − 1) 18 s+2 18 s−4 9 s−1
8.3. SOLVING INITIAL VALUE PROBLEMS USING LAPLACE TRANSFORMS 219

Thus,         
1 1 31 1 16 1
Y (s) = + − .
18 s+2 18 s−4 9 s−1
Now, applying L−1 leads to
y = (1/18)e−2x + (31/18)e4x − (16/9)ex .
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 specified at x0 = 0. This is no real
restriction of generality since we may always re-scale our x-units so that x = x0 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) = y0 and y 0 (0) = v0 , in which case (8.9) takes the form
L(y 00 − 5y 0 + 4y)(s) = Y (s)(s2 − 5s + 4) − (s + 5)y0 − v0 .
Proceeding in the same way leads to the solution
y = (1/18)e−2x + ((1/18) − (1/3)y0 + (1/3)v0 )e4x + (−(1/9) + (4/3)y0 − (1/3)v0 )ex .
Choosing c1 and c2 appropriately gives the general solution y = (1/18)e−2x + c1 e4x + c2 ex .
Example 8.3.2. Find the equation of motion for the linear oscillator given by
9ẍ + 10ẋ + x = cos(2t), x(0) = ẋ(0) = 0.
Letting X(s) = L(x)(s) and using the initial conditions, leads to Laplace transform equation
s
(9s2 + 10s + 1)X(s) = 2 ,
s +4
or
s s
X(s) = = .
(9s2 + 10s + 1)(s2 + 4) (s + 1)(9s + 1)(s2 + 4)
The partial fraction decomposition may again be obtained by using the cover-up method, when
factoring s2 + 4 as (s + 2i)(s − 2i), setting up the decomposition as
s A B C D
= + + + , (8.10)
(s + 1)(9s + 1)(s + 2i)(s − 2i) s + 1 9s + 1 s + 2i s − 2i
multiplying both sides by (s+1)(9s+1)(s+2i)(s−2i), and then substituting in s = −1, −1/9, −2i, 2i.
This gives
1 −7+4i −7−4i
s − 81
= 40 + 2600 + 650 + 650 . (8.11)
(s + 1)(9s + 1)(s + 2i)(s − 2i) s + 1 9s + 1 s + 2i s − 2i
We combine the last two terms in (8.11) to the common denominator s2 +4; this yields the numerator
−(7/325)s + (8/325). The partial fraction decomposition can be written as
           
1 1 9 1 4 2 7 s
X(s) = − + − .
40 s+1 2600 s + (1/9) 325 s2 + 4 325 s2 + 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 L−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 00 + 2y 0 + y = te−t , y(0) = 1, y 0 (0) = −1.
The Laplace transform of the left side is Y (s)(s2 + 2s + 1) − s − 1. The Laplace transform of
te−t can be found by observing that F (s) = L(e−t )(s) = 1/(s + 1) and L(te−t )) = −F 0 (s) =
−(d/ds)(1/(s + 1)) = 1/(s + 1)2 . Thus,
s+1 1 1 1
Y (s) = + = + .
s2 + 2s + 1 (s + 1)2 (s2 + 2s + 1) s + 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 L−1 (1/(s + 1)4 ) = t3 e−t /6 (equation (8.5)), the solution to the initial
value is
y = e−t + (1/6)t3 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 differential
equation (with constant coefficients) is piecewise defined or periodic. The piecewise defined 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 defining an elementary piecewise-defined function, the Heaviside function.
Definition 8.4.1. The Heaviside function is

0 if x<0
H(x) = . (8.12)
1 if x≥0
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 defined functions.
Observe that  
0 if x − a < 0 0 if x < a
H(x − a) = = . (8.13)
1 if x − a ≥ 0 1 if x ≥ a
The graph of y = H(x − a) is shown in Figure 8.2. Suppose a < b. Then,


 0 if H(x − a) = 0 and H(x − b) = 0
0 if H(x − a) = 1 and H(x − b) = 1

H(x − a) − H(x − b) =

 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 . (8.14)
0 if x ≥ b

8.4. DISCONTINUOUS AND PERIODIC FORCING FUNCTIONS 221

Figure 8.1: The graph of the Heaviside function y = H(x).

Figure 8.2: The graph of the shifted Heaviside function y = H(x − a).

x
a
222 CHAPTER 8. LAPLACE TRANSFORMS

Figure 8.3 shows the graph of the function in (8.14). Also, we have that

1 if x < a
1 − H(x − a) = , (8.15)
0 if x ≥ a
see Figure 8.4. We have thus established the following results relating Heaviside functions and
piecewise defined functions.

Figure 8.3: The graph of y = H(x − a) − H(x − b), a < b.

x
a b

Figure 8.4: The graph of the function y = 1 − H(x − a).

x
a

Theorem 8.4.1. Let f (x) be a piecewise defined function of the form



 f1 (x)
 if x < x1
f2 (x) if x1 ≤ x < x2




 f3 (x) if x2 ≤ x < x3

f (x) = .. . (8.16)


 .
 fn−1 (x) if xn−2 ≤ x < xn−1



fn (x) if x ≥ xn−1

8.4. DISCONTINUOUS AND PERIODIC FORCING FUNCTIONS 223

Then,

f (x) = f1 (x)(1 − H(x − x1 )) (8.17)


+ f2 (x)(H(x − x1 ) − H(x − x2 ))
+ f3 (x)(H(x − x2 ) − H(x − x3 ))
+ ...
+ fn−1 (x)(H(x − xn−2 ) − H(x − xn−1 ))
+ fn (x)H(x − xn−1 ).

Thus, Heaviside functions can be used to “turn on” the functions f1 (x), f2 (x), . . . , fn (x) over
their domains. If we can find the Laplace transform of Heaviside functions, then we can hope to
find 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
ˆ ∞
L(H(x − a))(s) = e−sx H(x − a) dx
ˆ 0

= e−sx dx
a
1 −sx x=∞

= − e
s x=a
e −as
= , if s > 0.
s
Example 8.4.2. If a ≥ 0, then
ˆ ∞
L(g(x)H(x − a))(s) = e−sx g(x)H(x − a) dx
ˆ0 ∞
= e−sx g(x) dx (let t = x − a)
ˆa ∞
= e−s(t+a) g(t + a) dt
0
ˆ ∞
−sa
= e e−st g(t + a) dt
0
−as
= e L(g(x + a))(s).

By considering g(x) = f (x − a), we may write

L(f (x − a)H(x − a))(s) = e−as L(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 defined function


 0 if x < 0
x if 0 ≤ x < 1

f (x) = .

 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 L(x)(s) = 1/s2 , the Laplace transform is

L(f ) = L(x) − 2L((x − 1)H(x − 1)) + L((x − 2)H(x − 2))


1 2e−s e−2s
= 2− 2 + 2 .
s s s

Figure 8.5: The graph of the function in example 8.4.3.


y
1.5

1.0

0.5

x
-1 1 2 3

-0.5

Example 8.4.4. Consider the initial value problem

y 00 + π 2 y = f (x), y(0) = y 0 (0) = 0, (8.20)

where f (x) is the tent function in example 8.4.3. Physically, the differential 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) = L(y)(s), we obtain

1 − 2e−s + e−2s
Y (s) = . (8.21)
s2 (s2 + π 2 )

The partial fraction decomposition of 1/(s2 (s2 + π 2 )) is


     
1 1 1 1 1
= − .
s2 (s2 + π 2 ) π2 s2 π2 s2 + π 2
Thus, for x ≥ 0,    
−1 1 x sin(πx)
L (x) = − H(x).
s (s + π 2 )
2 2 π 2 π3
8.4. DISCONTINUOUS AND PERIODIC FORCING FUNCTIONS 225

Also,
e−s
   
−1 x − 1 sin(π(x − 1))
L (x) = − H(x − 1),
s2 (s2 + π 2 ) π2 π3
e−2s
   
−1 x − 2 sin(π(x − 2))
L (x) = − H(x − 2).
s2 (s2 + π 2 ) π2 π3
Taking the inverse Laplace transform of both sides of (8.21) gives the solution y = y1 + y2 , where:

x − 2(x − 1)H(x − 1) + (x − 2)H(x − 2)


y1 =
π2
f (x)
=
π2
(here we used equation (8.19)). Also, since sin(π(x − 1)) = − sin(πx) and sin(π(x − 2)) = sin(πx),

sin(πx)
y2 = − (H(x) + 2H(x − 1) + H(x − 2))
π3
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 .
 −3 sin(πx)/π
 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 (y1 , shown in Figure 8.7a), and a piecewise defined sinusoid function (y2 , shown in
Figure 8.7b). If x > 2, the solution is simply

4 sin(πx)
y∗ = − .
π3

Figure 8.6: The graph of the solution in example 8.4.4.

y
0.15

0.10

0.05

x
2 4 6 8 10
-0.05

-0.10

-0.15
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).

y y
0.15 0.15

0.10 0.10

0.05 0.05

x x
2 4 6 8 10 2 4 6 8 10
-0.05 -0.05

-0.10 -0.10

-0.15 -0.15

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
ˆ T
e−sx f (x) dx
0
L(f )(s) = . (8.22)
1 − e−sT
´T
Proof. Let I = 0 e−sx f (x) dx. Then,
ˆ ∞
L(f )(s) = e−sx f (x) dx
0
ˆ T ˆ ∞
= e−sx f (x) dx + e−sx f (x) dx
0
ˆ ∞ T

= I+ e−s(x+T ) f (x + T ) dx
0
ˆ ∞
−sT
= I +e e−sx f (x) dx
0
−sT
= I +e L(f )(s).

Solving for L(f )(s) gives the result.

Theorem 8.4.3. For a function of the form


F (s)
Y (s) = , s, T > 0, (8.23)
1 − e−sT
8.4. DISCONTINUOUS AND PERIODIC FORCING FUNCTIONS 227

the inverse Laplace transform is



X
y(x) = f (x − kT )H(x − kT ). (8.24)
k=0

Proof. Observe that due to the fact that 0 < e−sT < 1, we may expand 1/(1 − e−sT ) as a geometric
series:

1 X
= e−ksT .
1 − e−sT
k=0

So,
  ∞
−1 F (s) X
L = L−1 (e−ksT F (s)).
1 − e−sT
k=0

But now by equation (8.18),

L−1 (e−ksT F (s)) = f (x − kT )H(x − kT ).

Example 8.4.5. Consider the initial value problem

y 00 + π 2 y = f (x), y(0) = y 0 (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
ˆ 2
e−sx f (x) dx
0
L(f )(s) =
ˆ 1 − e−2s

e−sx f (x) dx
0
=
1 − e−2s
1 −s −2s
s2
− 2es2 + e s2
=
1 − e−2s
1 − 2e−s + e−2s
= .
s2 (1 − e−2s )

Letting Y (s) = L(y)(s), (8.25) gives

1 − 2e−s + e−2s F (s)


Y (s) = −2s
= .
2 2 2
s (s + π )(1 − e ) 1 − e−2s

We have already seen in example 8.4.4 that

f (x) sin(πx)
y0 (x) = L−1 (F (s))(x) = − (H(x) + 2H(x − 1) + H(x − 2)),
π2 π3
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


X
y(x) = y0 (x − 2k)H(x − 2k) = y0 (x) + y0 (x − 2)H(x − 2) + y0 (x − 4)H(x − 4) + . . . . (8.26)
k=0

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 infinite sum in (8.26) by the sum from k = 0
to k = 4 (that is, we use only the first 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.

y
1.5

1.0

0.5

x
2 4 6

-0.5

Figure 8.9: The graph of the solution in example 8.4.5.

0.6

0.4

0.2

x
2 4 6 8 10
-0.2

-0.4
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 differential equation governing the current
I(t) in this circuit is
d2 I dI 1
L· 2 +R· + I = E 0 (t). (8.27)
dt dt C
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 = t0 , 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 0 (t) ≥ 0 on the right of equation (8.27) a function that is non-zero only in a small interval,
say [t0 − ∆t, t0 + ∆t], and whose total integral is
ˆ ∞ ˆ t0 +∆t
f (t) dt = f (t) dt = 1000.
−∞ t0 −∆t

Of course, there are many functions that fit this description. One of the easiest ways of obtaining
such a function is to use a piecewise constant function, that is,

 0 if t < t0 − ∆t
f (t) = 1000/(2∆t) if t0 − ∆t ≤ t < t0 + ∆t
0 if t ≥ t0 + ∆t

Note that this function can also be written in terms of Heaviside functions, as follows:

f (t) = (1000/(2∆t)) (H(t − (t0 − ∆t)) − H(t − (t0 + ∆t))) .

More generally, we can consider functions of the form

E
f (t) = (H(t − (t0 − ∆t)) − H(t − (t0 + ∆t))) , (8.28)
2∆t
where E, ∆t > 0. For ∆t small, f (t) provides what we can think of as impulse forcing to the
linear differential equation (8.27). We are interested in two aspects regarding f (t): first, what is
its Laplace transform; and second, what happens as ∆t → 0?
To answer these questions, we first consider a “normalized” form of f (t) in (8.29), namely when
E = 1 and t0 = 0. Thus, we consider the function

1
d∆t (t) = (H(t + ∆t) − H(t − ∆t)) . (8.29)
2∆t
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

e−s∆t
 s∆t 
1 e
L(d∆t )(s) = −
2∆t s s
−s∆t
 s∆t 
1 e −e
= .
s 2∆t
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).

y
10

t
-0.2 -0.1 0.1 0.2

We recognize that the difference quotient approaches the derivative of the function s 7→ est at t = 0.
Thus,
es∆t − e−s∆t

d
lim = est = s.
∆t→0 2∆t dt t=0
and consequently
lim L(d∆t )(s) = 1. (8.30)
∆t→0

Also, note that ˆ ∞


d∆t (t) dt = 1
−∞

for all ∆t > 0, thus ˆ ∞


lim d∆t (t) dt = 1, (8.31)
∆t→0 −∞

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
ˆ ∞ ˆ ∆t
g(t)d∆t (t) dt = (1/(2∆t))g(t) dt
−∞ −∆t
≈ (2∆t)(1/(2∆t))g(0) = g(0).

Consequently, ˆ ∞
lim g(t)d∆t (t) dt = g(0). (8.32)
∆t→0 −∞

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∆t→0 d∆t (t)
whose Laplace transform and total integral are both 1, that is zero everywhere except at t = 0,
where it is undefined (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
definition.

Definition 8.5.1. We define the Dirac delta function (or simply the delta function) as

δ(t) = lim d∆t (t), (8.33)


∆t→0

where the convergence is understood in the sense that


ˆ ∞ ˆ ∞
g(t)δ(t) dt = lim g(t)d∆t (t) dt (8.34)
−∞ ∆t→0 −∞

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

L(δ(t − a))(s) = e−as , (8.36)

Proof. If we apply (8.32) for ga (x) = g(x + a), then

g(a) = ga (0)
ˆ ∞
= lim ga (x)d∆t (x) dx
∆t→0 −∞
ˆ ∞
= lim g(x + a)d∆t (x) dx
∆t→0 −∞
ˆ ∞
= lim g(t)d∆t (t − a) dx,
∆t→0 −∞

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,
ˆ ∞
L(δ(t − a))(s) = e−st δ(t − a) dt
ˆ0 ∞
= e−st δ(t − a) dt
−∞
−as
= e

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 differential 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
d2 I dI
10 · 2
+ 2 + I = 1000 δ(t − 10), I(0) = I 0 (0) = 0. (8.37)
dt dt
The Laplace transform of the left side is (10s2 + s + 1)I(s), where I(s) = L(I)(s), and the Laplace
transform of the right side is 1000e−10s . Thus,
1000e−10s
I(s) = .
10s2 + 2s + 1
Completing the square yields
 2 !
1 2
   
2 2 1 1 3
10s + 2s + 1 = 10 s + s + = 10 s+ + ,
5 10 10 10

and thus !
  3
1000 100 1000 10
= = .
10s2 + 2s + 1 1 2 3 2 3 1 2 3 2
   
s+ 10 + 10 s+ 10 + 10
Using L(sin(βt))(s) = β/(s2 + β 2 ) and the shifting property L(eαt f (t))(s) = L(f (t))(s − α), we see
that    
−1 1000 1000 −t/10
L = e sin((3/10)t).
10s2 + 2s + 1 3
Finally, if the Heaviside property L−1 (e−as F (s)) = L−1 (F )(t − a)H(t − a) is applied, we see that
the solution to the initial value problem (8.37) is
1000e−10s
     
−1 1000 − t−10 3(t − 10)
I = L = e 10 sin H(t − 10)
10s2 + 2s + 1 3 10
 
1000 −(1/10)t+1
= e sin((3/10)t − 3)H(t − 10).
3
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 first surge at t = 10. The initial value problem is now

d2 I dI X
10 · 2
+ 2 + I = 1000 δ(t − 10k), I(0) = I 0 (0) = 0. (8.38)
dt dt
k=1

As before, the Laplace transform of the left side is (10s2 + s + 1)I(s), where I(s) = L(I)(s), and
the Laplace transform of the right side is:
∞ ∞
! !
X X k
e−10ks = 1000e−10s e−10s

1000
k=1 k=0
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.


I
250

200

150

100

50

t
10 20 30 40 50
-50

-100

The geometric series formula ∞ k


P
k=0 x = 1/(1 − x) when −1 < x < 1 was used in the previous
calculation. We need to find the inverse Laplace transform of the function

1000e−10s
I(s) = .
(10s2 + 2s + 1)(1 − e−10s )

This can be done in a P manner similar to the example above, and incorporating the formula
−1
L (F (s)/(1 − e −sT )) = ∞
k=0 f (t − kT )H(t − kT ) to obtain

 ∞
X
1000
I(t) = e−(1/10)t+k sin((3/10)t − 3k)H(t − 10k).
3
k=1

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).
I I
250 250

200 200

150 150

100 100

50 50

t t
10 20 30 40 50 50 100 150 200
-50 -50

-100 -100
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.
LaplaceTransform@Exp@5 * xD, x, sD

1
-5 + s

InverseLaplaceTransform@1  Hs - 2L, s, xD

ã2 x

The partial fraction decomposition of a rational function can be found using the Apart function.
Apart@1  HHs + 2L Hs ^ 2 - 5 s + 4LLD

1 1 1
18 H- 4 + sL 9 H- 1 + sL 18 H2 + sL
- +

Note that the gamma function interpolates the factorial; i.e, Γ(n + 1) = n!
LaplaceTransform@x ^ n, x, sD

s-1-n Gamma@1 + nD

Example 8.6.2. The following code defines the periodic piecewise defined function in example 8.4.5.
HeavisideTheta denotes the Heaviside function H(x).

In[4]:= f@x_D := x * HHeavisideTheta@xD - HeavisideTheta@x - 1DL +


H2 - xL * HHeavisideTheta@x - 1D - HeavisideTheta@x - 2DL;
fbar@x_D := Sum@f@x - 2 kD * HeavisideTheta@x - 2 kD, 8k, 0, 4<D;

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 = DSolve@8y ''@xD + Pi ^ 2 * y@xD Š fbar@xD, y@0D Š 0, y '@0D Š 0<, y@xD, xD;
Plot@y@xD . soln, 8x, 0, 10<, AxesLabel ® 8"x", "y"<,
LabelStyle ® Medium, PlotStyle ® 8Blue, Thick<D

Example 8.6.3. The solution for 0 ≤ t ≤ 10(n + 1) in example 8.5.2 can be defined as follows.
DiracDelta denotes the delta function δ(x).

soln@n_D := DSolve@810 i ''@tD + 2 i '@tD + i@tD Š 1000 Sum@DiracDelta@t - 10 kD, 8k, 1, n<D,
i@0D Š 0, i '@0D Š 0<, i@tD, tD;

The following code then computes and plots the solution curve for 0 ≤ t ≤ 50 (i.e. n = 4).
Plot@Evaluate@i@tD . Hsoln@4DLD, 8t, 0, 50<, AxesLabel ® 8"t", "I"<,
LabelStyle ® Medium, PlotStyle ® 8Blue, Thick<, PlotRange ® 8- 100, 250<D
8.7. EXERCISES 235

8.7 Exercises
Exercise 8.1. Use the information in Table 8.1 to find 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) = x cos(βx)
(f) f (x) = x sin(β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 0 − 3y = cos(5t), y(0) = 0
(b) y 0 + 5y = e−t sin(t), y(0) = 1
(c) ♣ 2y 0 − 3y = e−2t H(t − 1), y(0) = 0
(d) y 0 − y = δ(0) + δ(2π) + δ(4π), y(0) = 0
(e) ♣ y 00 − 2y 0 + y = e−5t , y(0) = 1, y 0 (0) = 0
(f) y 00 − 5y 0 + 4y = tet , y(0) = 0, y 0 (0) = 0
(g) ♣ y 00 + y = (2t − t2 )(H(t) − H(t − 1)), y(0) = 0, y 0 (0) = 0
(h) y 00 + 7y 0 + 6y = 2δ(t − 1) + 5δ(t − 2), y(0) = 0, y 0 (0) = 0
Exercise 8.3. Solve the following initial value problems using the Laplace transform method, and
plot the solution curve.
(a) ♣ y 00 + π 2 y = f (x), y(0) = y 0 (0) = 0, where f (x) is the “sawtooth” function shown here.
y
1.5

1.0

0.5

x
2 4 6 8 10

-0.5
236 CHAPTER 8. LAPLACE TRANSFORMS

(b) y 00 + π 2 y = f (x), y(0) = y 0 (0) = 0, where f (x) is the “switching” function shown here.

y
1.5

1.0

0.5

x
2 4 6 8 10

-0.5

-1.0

-1.5

(c) ♣ y 00 + 4π 2 y = ∞ 0
P
n=1 δ(x − n), y(0) = y (0) = 0.

(d) y 00 + 4π 2 y = ∞ n+1 δ(x − n), y(0) = y 0 (0) = 0.


P
n=1 (−1)

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 00 + by 0 + cy = 0, y(0) = y0 , y 0 (0) = v0 . (8.39)

This is a second-order homogeneous differential equation with constant coefficients. 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) X
L = (−1)k f (x − kT )H(x − kT ),
1 + e−sT
k=0

where f = L−1 (F ).
Exercise 8.7. Show directly using an argument like the one leading to equation (8.30) that L(δ(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 L(eλx )(s) = 1/(s − λ) to derive the formula L(xn )(s) = n!/sn+1 , as
follows. Write the exponential function as a power series:
∞ 
λx n
X 
λx
e = .
n!
n=0

Then, take the Laplace transform of both sides, and write the left side as a power series, as well,
and compare coefficients.
238 CHAPTER 8. LAPLACE TRANSFORMS
Chapter 9

Further Methods of Solving


Differential Equations

9.1 Power Series Methods


In this section, our goal is to find solutions to n-th order linear differential equations of the form

y (n) (x) + an−1 (x)y (n−1) (x) + . . . + a1 (x)y 0 (x) + a0 (x)y(x) = f (x). (9.1)

The corresponding initial conditions are

y(x0 ) = y0 , y 0 (x0 ) = y1 , . . . , y (n−1) (x0 ) = yn−1 . (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 = x0 ; that is, the solution is of the form

X
y(x) = an (x − x0 )n = a0 + a1 (x − x0 ) + a2 (x − x0 )2 + . . . . (9.3)
n=0

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 − x0 | ≤ r}. In particular, on D, all derivatives y (n)
exist, and can be computed by differentiating the right side of (9.3) term-by-term. The
resulting power series will again converge absolutely and uniformly on D. For example,

X
0
y (x) = nan (x − x0 )n−1 = a1 + 2a2 (x − x0 ) + 3a3 (x − x0 )2 + . . . , (9.4)
n=1
X∞
y 00 (x) = n(n − 1)an (x − x0 )n−2 = 2a2 + (3)(2)a3 (x − x0 ) + . . . . (9.5)
n=2

239
240 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS

• If 0 ≤ R < ∞, then the series (9.3) diverges whenever |x − x0 | > R.


• If 0 < R < ∞ then the series (9.3) might converge absolutely, converge conditionally, or
diverge if x = x0 ± R (there might be different behavior at the two x-values).
• The radius of convergence may be computed using either the formula
1
R= p
n
(9.6)
limn→∞ |an |
or
an
R = lim
, (9.7)
n→∞ an+1

provided the limits in (9.6), (9.7) exist.


P∞ n
Pf∞(x) = n=0 ann (x − x0 ) is a power series with radius of convergence R1 > 0 and g(x) =
2. If
n=0 bn (x − x0 ) is a power series with radius of convergence R2 > 0, then for |x − x0 | <
min{R1 , R2 }:

• The following identity principle holds: If f (x) = g(x), then an = bn for all n = 0, 1, 2, . . ..
In other words, we can “compare coefficients” for two power series that are equal.
• f (x) + g(x) = ∞ n
P
n=0 (an + bn )(x − x0 ) .
P∞
• f (x) − g(x) = n=0 (an − bn )(x − x0 )n .
• f (x)g(x) = ∞
P n
Pn
n=0 cn (x − x0 ) , where cn = k=0 ak bn−k .

3. If y = f (x) is a function so that all derivatives f 0 (x0 ), f 00 (x0 ), . . . exist, then the formal power
series is given by its Taylor series

X f (n) (x0 )
Tf (x) = (x − x0 )n .
n!
n=0

Note that in general, Tf (x) may have zero radius of convergence R, and even if R > 0, we
might have f (x) 6= Tf (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 X
1. The geometric series = 1 + x + x2 + x3 + . . . = xn , for |x| < 1.
1−x
n=0

x x2 x3 X xn
2. The exponential function e = 1 + x + + + ... = , for x ∈ R.
2! 3! n!
n=0

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 eix and using Euler’s 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
= −2xy, y(0) = 5. (9.8)
dx
This differential equation is separable, and is most easily solved using separation of variables as in
2
section 1.2. It can be seen that y = 5e−x . The purpose of this example is to illustrate how the
power series method would be used in this simple setting.
Let y = ∞ n
P
n=0 an x . (Since the initial condition is specified at x = 0, we use x0 = 0.) Then

∞ ∞
dy X X
= nan xn−1 = (n + 1)an+1 xn
dx
n=1 n=0

and

X ∞
X ∞
X
n n+1
−2xy = (−2x) an x = −2an x = −2an−1 xn .
n=0 n=0 n=1

Using the identity principle (that is, comparing the coefficients of the powers of x), we obtain from
(9.8) that for n = 1, 2, 3, . . ., (n + 1)an+1 = −2an−1 , or

2
an+1 = − an−1 . (9.9)
n+1

Note that a0 = y(0) = 5 and a1 = y 0 (0) = −2(0)y(0) = 0. The recurrence equation (9.9) can now
be used to establish that an = 0 if n is odd; if n is even,
2 2 5 2 5 2 5
a2 = − a0 = −5, a4 = − a2 = , a6 = − a4 = − , a8 = − a6 = ,....
2 5 2 6 2·3 8 2·3·4
In general, a2n = (−1)n (5/n!), and the solution to (9.8) is
∞ ∞
X
n5 2n X 1
(−1) x = 5 (−1)n (x2 )n
n! n!
n=0 n=0

X 1
= 5 (−x2 )n
n!
n=0
−x2
= 5e .

Example 9.1.2. Consider a forced harmonic oscillator given by the differential equation

d2 x
+ x = cos ωt, (9.10)
dt2
P∞
where, say, x(0) = 1, x0 (0) = 0, and the value of ω is as yet not specified. Letting x = n=0 an t
n

and using the series expansion of cos x in Appendix C, (9.10) becomes


∞ ∞ ∞
X X X (ωt)2k
n(n − 1)an tn−2 + an tn = (−1)k
(2k)!
n=2 n=0 k=0
242 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS

or
∞ ∞
X X (−ω 2 )k
((n + 2)(n + 1)an+2 + an ) tn = t2k .
(2k)!
n=0 k=0

If n is odd, the coefficients on the right side are zero, and it follows from a1 = x0 (0) = 0 and
(n + 2)(n + 1)an+2 + an = 0 that an = 0 for n = 1, 3, 5, . . .. If n = 2k is even, equating the
corresponding coefficients of x2k leads to the equation

(−ω 2 )k
(2k + 2)(2k + 1)a2k+2 + a2k = .
(2k)!

Thus, we have the recurrence equation

(−ω 2 )k a2k (−ω 2 )k − (2k)!a2k


a2k+2 = − = .
(2k + 2)! (2k + 2)(2k + 1) (2k + 2)!

Since a0 = 1,

1−1
a2 = =0
2!
−ω 2 − (2!)(0) −ω 2
a4 = =
4! 4!
2 2
(−ω ) − (4!)(−ω /4!)2 ω4 + ω2
a6 = =
6! 6!
2 3 4 2
(−ω ) − (6!)((ω + ω )/6!) −ω 6 − ω 4 − ω 2
a8 = =
8! 8!
2 4 6 4
(−ω ) − (8!)((−ω − ω − ω )/8!) 2 ω8 + ω6 + ω4 + ω2
a10 = = .
10! 10!

Thus,

k
(−1)k X 2i
a2k+2 = ω . (9.11)
(2k + 2)!
i=1

Pk 2i
If ω 6= 1, using i=1 ω = (ω 2k+2 − ω 2 )/(ω 2 − 1) leads to the formula

(−1)k ω 2k+2 − ω 2
a2k+2 = ,
(2k + 2)! ω 2 − 1
9.1. POWER SERIES METHODS 243

so the solution is


X ∞
X
2k
a2k t = 1+ a2k t2k
k=0 k=1

!
1 X (−1)k−1
= 1+ 2 (ω 2k − ω 2 )t2k
ω −1 (2k)!
k=1
∞ ∞
!
1 X(−1)k X (−1)k 2k
= −1 − (ωt)2k + ω 2 + ω 2 t
ω2 − 1 (2k)! (2k)!
k=1 k=1
∞ ∞
!
1 X (−1) k X (−1) k
= − (ωt)2k + ω 2 t2k
ω2 −1 (2k)! (2k)!
k=0 k=0
ω 2 cos(t)− cos(ωt)
= .
ω2 − 1

If ω = 1, equation (9.11) gives that a2k+2 = (−1)k k/(2k + 2)! for k = 0, 1, 2, . . .. We write the
solution as


X ∞
X
a2k t2k = 1 + a2k t2k
k=0 k=1

X (−1)k−1 (k − 1) 2k
= 1+ t
(2k)!
k=1
∞ ∞
X (−1)k 2k 1 X (−1)k−1 2k 2k
= 1+ t + t
(2k)! 2 (2k)!
k=1 k=1
∞ ∞
X (−1)k t X (−1)k−1 2k−1
= t2k + t
(2k)! 2 (2k − 1)!
k=0 k=1
∞ ∞
X (−1)k 2k t X (−1)k 2k+1
= t + t
(2k)! 2 (2k + 1)!
k=0 k=0
t sin t
= cos t + .
2

If ω 6= 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 first four non-zero terms of the power series solution to the initial value
problem
(1 − x2 )y 00 + y = 0, y(0) = 0, y 0 (0) = 1. (9.12)
244 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS

P∞ P∞
If y = n
n=0 an x , y 00 = n=2 n(n − 1)an xn−2 , and the differential equation becomes

X ∞
X ∞
X
0 = n(n − 1)an xn−2 − n(n − 1)an xn + an xn
n=2 n=2 n=0
X∞ ∞
X ∞
X
= (n + 2)(n + 1)an+2 xn − n(n − 1)an xn + an xn
n=0 n=2 n=0

X
= (2a2 + a0 ) + (6a3 + a1 )x + ((n + 2)(n + 1)an+2 − n(n − 1)an + an ) xn
n=2
X∞
(n + 2)(n + 1)an+2 − (n2 − n − 1)an xn .

= (2a2 + a0 ) + (6a3 + a1 )x +
n=2

Setting all coefficients equal to zero and using a0 = 0, a1 = 1 leads to a2 = 0, a3 = −1/6, and the
recurrence
n2 − n − 1
an+2 = an (9.13)
(n + 2)(n + 1)
for n = 2, 3, 4, . . . gives an = 0 if n is even, and

32 − 3 − 1
  
1 1 1
a5 = a3 = − =−
(3 + 2)(3 + 1) 4 6 24
2
  
5 −5−1 19 1 19
a7 = a5 = − =− .
(5 + 2)(5 + 1) 42 24 1008
We have
x3 x5 19x7

y(x) ≈ x − − . (9.14)
6 24 1008
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 first
four non-zero terms of the power series (dashed red curve).

0.6

0.4

0.2

x
-1.0 -0.5 0.5 1.0
-0.2

-0.4

-0.6

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
2
example, using y(0) = y0 in example 9.1.1 leads to the general solution y = y0 e−x . 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(t0 ) = x0 , (9.15)

where x = x(t) is a function of the real variable t ∈ R with values in Rn . Also, f (t, x) maps R × Rn
to Rn .
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.

Euler’s Method
We have already encountered Euler’s 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 Euler’s Method is given as

xk+1 = xk + f (tk , xk )(∆t)k (9.16)


tk+1 = tk + (∆t)k .

This algorithm results in a sequence of points (tk , xk ), where, if the (∆t)k ’s are small, we expect
that xk ≈ x(tk ) (x(t) is the exact solution to (9.15)). Figure 9.2 shows a graphical representation
of Euler’s Method in one dimension. As explained in section 1.7, Euler’s 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) = x0 , (9.17)

where  
3 4
A=
4 −3
and x0 = (1, 1). This is a linear autonomous differential equation which we can certainly solve
using the methods described in chapter 5. We use this example to illustrate how Euler’s Method
works.
246 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS

Figure 9.2: Graphical presentation of Euler’s Method in one dimension: (a) the first step (left); (b)
the first and the second step. Note that in general (∆t)0 6= (∆t)1 .

x
x

x2 =x1 +fHt1 ,x1 LHDtL1


x1 =x0 +fHt0 ,x0 LHDtL0
x1 =x0 +fHt0 ,x0 LHDtL0 slope=fHt1 ,x1 L

slope=fHt0 ,x0 L
x0 slope=fHt0 ,x0 L
x0

t t
t0 t1 =t0 +HDtL0 t0 t1 t2

(a) (b)

Suppose we use algorithm 9.2.1 with the fixed step size ∆t = 0.1. Then:
      
1 3 4 1 1.7
x1 = x0 + Ax0 (∆t) = + (0.1) =
1 4 −3 1 1.1
      
1.7 3 4 1.7 2.65
x2 = x1 + Ax1 (∆t) = + (0.1) =
1.1 4 −3 1.1 1.45
      
2.65 3 4 2.65 4.025
x3 = x2 + Ax2 (∆t) = + (0.1) =
1.45 4 −3 1.45 2.075
..
.

In effect, we are applying powers of the matrix I + (∆t)A to x0 . Thus,

xk = (I + (∆t)A)k x0 . (9.18)

We can also use this formula for negative integers k to find 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).
x2 x2
4 4

3 3

2 2

1 1

x1 x1
-2 -1 1 2 3 4 -2 -1 1 2 3 4

(a) (b)

tk = k∆t for ∆t = 0.05. We can see that the difference between the numerical and the exact
solution grows rapidly with time.

Table 9.1: The values of the numerical solution xk , the exact solution x(tk ), and the magnitude of
the global error in example 9.2.1 using ∆t = 0.05.

tk xk x(tk ) |xk − x(tk )|


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 define two types
of errors and the accuracy of the numerical method.
Definition 9.2.1. Suppose (xk , tk ) 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

Ek = xk − x(tk ). (9.19)
248 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS

• If xk−1 (t) is the exact solution to the initial value problem

dx/dt = f (t, x), x(tk−1 ) = xk−1 ,

then the local error at the kth step is

ek = xk − xk−1 (tk ). (9.20)

• A numerical method is accurate of order p if for fixed k,

ek+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 = tk . The definition 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, xk , with the exact solution we would have obtained had we started at the previous step, xk−1 .
Remark 9.2.3. Equation (9.21) means that |ek+1 | ≈ C(∆t)p+1k . The exponent p + 1 appears instead
of p, because the local error per step size is ek+1 /(∆t)k = O((∆t)pk ). If a fixed step size ∆t is
chosen, we have that for the local error e∆t ∆t
k with that step size, ek ≈ C(∆t)
p+1 . To make this

more concrete, suppose we choose steps sizes ∆t and ∆t/10. Then we expect that
∆t/10
|e10k | C(∆t/10)p+1
∆t
≈ p+1
= (1/10)p+1 . (9.22)
|ek | C(∆t)

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 influenced 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 Euler’s
Method.
Example 9.2.2. We investigate the numerical solutions using Euler’s Method for the linear system
dx/dt = Ax, x(0) = x0 , where  
−1 −2
A=
2 −1
and x0 = (1, 1). Using equation (9.18) allows easy calculations of all iterates for Euler’s 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 |ek | and the magnitude of the global error |Ek |
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).
x2 x2
2 2

1 1

x1 x1
-1 1 2 -1 1 2

-1 -1

-2 -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.

tk |ek | |Ek |
−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 Euler’s 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
0.01 |
0.01 2
 
|e10k
≈ 0.01 = ,
|e0.1
k | 0.1
so equation (9.22) indicates that p + 1 = 2, or p = 1. The following theorem confirms that the
order of Euler’s 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.

tk |e0.1
k |
0.01 |
|e10k 0.01 |/|e0.1 |
|e10k 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. Euler’s Method is accurate of order 1; that is, the local error at the kth step
satisfies
ek+1 = O((∆t)2k ).
Proof. Using the Taylor series

x(t + ∆t) = x(t) + x0 (t)∆t + O((∆t)2 ),

we obtain for t = tk and ∆t = (∆t)k :

x(tk+1 ) = x(tk ) + f (tk , x(tk ))(∆t)k + O((∆t)2k ),

Euler’s Method gives


xk+1 = xk + f (tk , xk )(∆t)k .
Subtraction of the previous two equations yields

xk+1 − x(tk+1 ) = [xk − x(tk )] + [f (tk , xk ) − f (tk , x(tk ))](∆t)k + O((∆t)2k ).

If x = xk is the solution passing through the point (tk , xk ), the bracketed expressions become zero,
and we obtain ek+1 = O((∆t)2k ).
9.2. NUMERICAL METHODS 251

The stability of a numerical method is defined in a similar vein as that of a critical point (see
definition 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) = Ce2t ,
which diverge as t → ∞. Hence, any numerical method which approximates the actual solution
within finite 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 Euler’s
method.
Example 9.2.3. We investigate Euler’s Method when applied to the simple initial value problem
dz
= λz, z(0) = z0 , (9.23)
dt
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 differential equations.
The exact solution to this initial value problem is z(t) = z0 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
Euler’s Method with fixed step size ∆t gives

zk+1 = zk + λzk ∆t = (1 + λ∆t)zk ,

hence
zk = (1 + λ∆t)k z0 .
The sequence (zk ):
p
• converges to zero if |1 + λ∆t| < 1 (here, |x + iy| = x2 + 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 Euler’s 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) = z0 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
= −20y, y(0) = 1. (9.25)
dt
252 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS

Figure 9.5: The parameter region in the complex plane where Euler’s Method for dz/dt = λz is
stable (for a given step size ∆t).
ImHΛL

ReHΛL
-2Dt -1Dt

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.
ImHΛL

ReHΛL
-2Dt -1Dt
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 Euler’s 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 (tk , xk )
and the slope at that point to find the next value of the numerical solution (tk+1 , xk+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 (tk+1 , xk+1 ) so that if we used the slope at the new point,
and moved (∆t)k units backward, we would end up at (tk , xk ). 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

xk+1 = xk + f (tk+1 , xk+1 )(∆t)k (9.26)


tk+1 = tk + (∆t)k .

Remark 9.2.4. A (technical) weakness of this algorithm is that in order to compute xk+1 , we need to
solve the (usually non-linear) equation xk+1 = xk + f (tk+1 , xk+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 = −x3 , x(0) = 1, ∆t = 0.5.

The general step when using the Backward Euler Method (9.26) is

xk+1 = xk − (xk+1 )3 (∆t).

The first step is to solve


x1 = 1 − (x1 )3 · 0.5,
using, e.g. Newton’s method with starting value x0 = 1. The solution is x1 ≈ 0.7709. In the next
step, we need to solve
x2 = x1 − (x2 )3 · 0.5
for x2 , which gives x2 ≈ 0.6399. Continuing in this manner, we obtain this numerical solution:

(t1 , x1 ) = (0.5, 0.7709 . . .)


(t2 , x2 ) = (1.0, 0.6399 . . .)
(t3 , x3 ) = (1.5, 0.5546 . . .)
(t4 , x4 ) = (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) = z0

with λ ∈ C and constant step size ∆t. Then (9.26) becomes

zk+1 = zk + λzk+1 ∆t.

This is equivalent to
zk
zk+1 = , or
1 − λ∆t
 k
1
zk = z0 .
1 − λ∆t

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).
ImHΛL

ReHΛL
-1Dt 1Dt

Now, the Backward Euler Method is stable whenever the exact solution z(t) = z0 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 satisfies
ek+1 = O((∆t)2k ).
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

x0 (t) = f (t), x(0) = x0 ,

it
´ t becomes 1the method of using trapezoids to approximate the value of the integral x(t) = x0 +
x0 f (τ ) dτ .

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
 
f (tk+1 , xk+1 ) + f (tk , xk )
xk+1 = xk + (∆t)k (9.27)
2
tk+1 = tk + (∆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 satisfies
ek+1 = O((∆t)3k ).
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 xk+1 .
Example 9.2.6. Consider the initial value problem

dx/dt = x2 − t2 , x(0) = 1, ∆t = 0.1.

Here, we have to solve the quadratic equation


!
(x2k+1 − t2k+1 ) + (x2k − t2k )
xk+1 = xk + (∆t)
2

for xk+1 in each step. In the first step, this leads to


 2
x1 − 0.12 + 12 − 02

x1 = 1 − 0.1,
2
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 x1 ≈ 1.1112 and x1 ≈ 18.8889. Clearly, we take the first solution as our
first iterate. In the next step, we need to solve
 2
x2 − 0.22 + 1.11122 − 0.12

x2 = 1.1112 − 0.1,
2
for x2 , which gives x2 ≈ 1.2484 as the valid solution. Continuing in this manner, we obtain this
numerical solution:

(t1 , x1 ) = (0.1, 1.1112 . . .)


(t2 , x2 ) = (0.2, 1.2484 . . .)
(t3 , x3 ) = (0.3, 1.4207 . . .)
(t4 , x4 ) = (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
k1 + 2k2 + 2k3 + k4
xk+1 = xk + (∆t)k (9.28)
6
tk+1 = tk + (∆t)k ,

where:

k1 = f (tk , xk ),
k2 = f (tk + ((∆t)k /2), xk + k1 ((∆t)k /2)),
k3 = f (tk + ((∆t)k /2), xk + k2 ((∆t)k /2)),
k4 = f (tk + (∆t)k , xk + k3 (∆t)k ).

The method in algorithm 9.2.4 becomes Simpson’s Method when applied to the integration
problem x0 = 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 defined. Refer,
for example, to [13] for more details.

Stiffness
We have encountered the term of a “stiff” differential equation when using NDSolve in Mathematica.
The meaning of this term is explained in the following example.
Example 9.2.7. Consider the linear differential equation

dx/dt = −49x + 51y


dy/dt = 51x − 49y.
9.2. NUMERICAL METHODS 257

The eigenvalues of the matrix  


−49 51
A=
51 −49
are λ1 = 2 and λ2 = −100. Corresponding eigenvectors are v1 = (1, 1) and v2 = (−1, 1). For the
initial value x(0) = 1, y(0) = 1, the solution is x(t) = e2t , y(t) = e2t . 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.


y

x
-4 -2 2 4

-2

-4

Figure 9.9 shows the numerical trajectory of the initial point (2, 0) when using Euler’s 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 differential
equation, the critical step size is
∆tcritical = |λ1 λ−1
2 |. (9.29)
258 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS

Figure 9.9: Euler’s Method in 9.2.7 for (a) ∆t = 0.02 (left); (b) ∆t = 0.0175 (center); and ∆t = 0.01.
y y y
4 4 4

3 3 3

2 2 2

1 1 1

x x x
1 2 3 4 1 2 3 4 1 2 3 4

(a) (b) (c)

Figure 9.10: Euler’s Method in 9.2.7 for (a) ∆t = 0.0201 (left); (b) ∆t = 0.021.
y y
4 4

3 3

2 2

1 1

x x
1 2 3 4 1 2 3 4

(a) (b)
9.3. MATHEMATICA USE 259

Thus, we may think of a two-dimensional autonomous system to be stiff if the eigenvalues of


the linearized system satisfy
λ1 λ2 < 0 and |λ1 λ−1
2 |  1, (9.30)
where 0 < |λ1 | ≤ |λ2 |. The first 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 find an explicit formula for the
terms of the implicitly defined sequence. In the other hand, we can also find the values of such a
sequence by defining it recursively. These methods are explained in the following two examples.
Example 9.3.1. The recursively defined sequence given by equation (9.9) in example 9.1.1 can be
generated as follows.
soln = RSolve@8a@n + 1D Š H- 2L  Hn + 1L a@n - 1D, a@0D Š 5, a@1D Š 0<, a@nD, nD

5 än H1 + H- 1Ln L
::a@nD ® >>
E
n
2 GammaA1 +
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 i2k = (−1)k , (1 + (−1)n ) = 2, and
gamma function becomes Γ(1 + k) = k! Thus, a2k = (−1)k (5/k!). The values of the sequence may
be tabulated as follows.
Table@a@nD . soln, 8n, 0, 10<D

:85<, 80<, 8- 5<, 80<, : >, 80<, :- >, 80<, : >, 80<, :- >>
5 5 5 1
2 6 24 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 = RSolve@8a@n + 2D Š Hn ^ 2 - n - 1L  HHn + 2L Hn + 1LL a@nD, a@0D Š 0, a@1D Š 1<, a@nD, nD

::a@nD ® - 2-2+n H- 1 + H- 1Ln L GammaB- F GammaB- F “


1 5 n 1 5 n
- + + +
4 4 2 4 4 2

F GammaB F Gamma@1 + nD >>


1 5 1 5
GammaB - +
4 4 4 4

Alternatively, we may define the sequence directly, as follows.


a@n_D := HHn - 2L ^ 2 - Hn - 2L - 1L  Hn Hn - 1LL a@n - 2D;
a@0D = 0;
a@1D = 1;
260 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS

The first non-zero terms of the sequence are then:

Table@a@nD, 8n, 0, 7<D

:0, 1, 0, - >
1 1 19
, 0, - , 0, -
6 24 1008

We now briefly 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 =
NDSolve@8x '@tD Š 3 x@tD + 4 y@tD, y '@tD Š 4 x@tD - 3 y@tD, x@0D Š 1, y@0D Š 1<, 8x@tD, y@tD<,
8t, 0, 1<, StartingStepSize ® 0.1, Method ® 8"FixedStep", Method ® "ExplicitEuler"<D;

The following table then gives the sequence of iterates xk .

Table@8x@tD, y@tD< . soln, 8t, 0, 0.5, 0.1<D

8881., 1.<<, 881.7, 1.1<<, 882.65, 1.45<<,


884.025, 2.075<<, 886.0625, 3.0625<<, 889.10625, 4.56875<<<

The data in Table 9.1 can be produced using the following code.
solnEuler =
NDSolve@8x '@tD Š 3 x@tD + 4 y@tD, y '@tD Š 4 x@tD - 3 y@tD, x@0D Š 1, y@0D Š 1<, 8x@tD, y@tD<,
8t, 0, 1<, StartingStepSize ® 0.05, Method ® 8"FixedStep", Method ® "ExplicitEuler"<D;
solnExact = DSolve@8x '@tD Š 3 x@tD + 4 y@tD, y '@tD Š 4 x@tD - 3 y@tD, x@0D Š 1, y@0D Š 1<,
8x@tD, y@tD<, tD;

Table@8t, X1 = 8x@tD, y@tD< . solnEuler, X2 = 8x@tD, y@tD< . solnExact, Norm@X1 - X2D<,


8t, 0, 0.5, 0.05<D  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

f@x_D := y . NSolve@y Š x - y ^ 3 H0.5L, y, RealsD;


NestList@f, 1, 4D
81, 80.770917<, 80.639904<, 80.554608<, 80.494242<<

This perhaps requires some explanation. The function f[x] finds the real solution to the cubic
equation that appears in the backward Euler algorithm. If this function is given the iterate xk then
its output is the next iterate xk+1 of the numerical orbit. The step size is fixed at ∆t = 0.5. The
function NestList simply repeats this process four times, starting with x0 = 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 first four iterates would be generated as follows.
f@8t_, x_<D := 8t + Dt, y . FindRoot@y Š x + Hy ^ 2 - Ht + DtL ^ 2 + x ^ 2 - t ^ 2L  2 * Dt, 8y, x<D<;
Dt = 0.1;
NestList@f, 80, 1<, 4D
880, 1<, 80.1, 1.11124<, 80.2, 1.24841<, 80.3, 1.42077<, 80.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 0 = y − x, y(0) = 1.

(b) y 0 = y − x2 , y(0) = 2.

(c) ♣ y 0 = y − x, y(0) = 2.

(d) y 0 = y − x2 , y(0) = 1.

(e) ♣ y 0 = x + xy, y(0) = 1.

(f) y 0 = x3 − 2xy, y(0) = 0.

(g) ♣ y 00 + y = ex , y(0) = 1, y 0 (0) = 1.

(h) y 00 − y = ex , y(0) = 0, y 0 (0) = 0.

(i) ♣ y 00 − 4y = x, y(0) = 0, y 0 (0) = 0.

(j) y 00 + 4y = x, y(0) = 0, y 0 (0) = 0.

Exercise 9.2. Approximate the power series expansion of the solution to each initial value problem.
Include the first four non-zero terms.
2
(a) ♣ y 0 − y = ex , y(0) = 0.
262 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS

2
(b) y 0 + y = e−x , y(0) = 1.

(c) ♣ y 0 + xy = x2 , y(0) = 1.

(d) y 0 + xy = ex , y(0) = 0.

(e) ♣ y 00 − xy = 0, y(0) = 1, y 0 (0) = 1. (This is Airy’s equation.)

(f) y 00 + x2 y = 0, y(0) = 1, y 0 (0) = 1.

(g) ♣ y 00 − xy 0 + y = 0, y(0) = 1, y 0 (0) = 0.

(h) y 00 − 2xy 0 + 2y = 0, y(0) = 1, y 0 (0) = 0.

(i) ♣ (1 − x2 )y 00 − 2xy 0 + 2y = 0, y(0) = 1, y 0 (0) = 1.

(j) (1 − x2 )y 00 − xy 0 + y = 0, y(0) = 1, y 0 (0) = 0.

Exercise 9.3. Consider the differential equation y 00 − 2xy 0 + (K − 1)y = 0.

(a) Using a power series expansion of the form y(x) = ∞ n


P
n=0 an x , find the recursion formula
for the coefficients an . For which values of K does the series terminate? (This means the
solution y(x) is then a polynomial.)

(b) If a1 = 0, find the first three polynomial solutions (i.e. with degree d = 0, 2, 4). If the leading
coefficient is chosen to be 2d , then these solutions are the first three even Hermite polynomials.

(c) If a0 = 0, find the first three polynomial solutions (i.e. with degree d = 1, 3, 5). If the leading
coefficient is chosen to be 2d , then these solutions are the first three odd Hermite polynomials.

Exercise 9.4. ♣ Use Euler’s 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) = z0

with λ, z0 , 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 first 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, Euler’s Method, ∆t = 0.2.

(b) dx/dt = cos(xt), x(0) = 1, Euler’s Method, ∆t = 0.1.

(c) ♣ dx/dt = sin(t2 − x), x(0) = 1, Euler’s Method, ∆t = 0.2.


9.4. EXERCISES 263

2 −t
(d) dx/dt = ex , x(0) = 1, Euler’s Method, ∆t = 0.2.

(e) ♣ dx/dt = x2 − t2 , x(0) = 0, Backward Euler Method, ∆t = 0.2.

(f) dx/dt = t3 + x3 , x(0) = 0, Backward Euler Method, ∆t = 0.2.

(g) ♣ dx/dt = log(1 + x2 ), x(0) = 1, Backward Euler Method, ∆t = 0.1.

(h) dx/dt = log(t2 + x2 ), x(0) = 0, Backward Euler Method, ∆t = 0.1.

(i) ♣ dx/dt = x − t2 , x(0) = 2, Trapezoid Method, ∆t = 0.2.

(j) dx/dt = x3 − t, x(0) = 1, Trapezoid Method, ∆t = 0.1.

(k) ♣ dx/dt = sin(x2 − t2 ), x(0) = 1, Trapezoid Method, ∆t = 0.2.

(l) dx/dt = 1/(x2 + t2 ), 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 ∆tcritical using equation (9.24).

(c) Demonstrate numerically that Euler’s Method is unstable if t > ∆tcritical .

(d) Demonstrate numerically that the Backward Euler Method is stable even if t > ∆tcritical .
264 CHAPTER 9. FURTHER METHODS OF SOLVING DIFFERENTIAL EQUATIONS
Chapter 10

Introduction to Partial Differential


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 differential 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 differential 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 differential 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 differential 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 briefly look at the Schrödinger wave equation in section 10.4.

10.1 D’Alembert’s 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 specifically, 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 infinite string which is described
by an initial value problem similar to the ones we encountered for ordinary differential equations;
and “standing waves” occurring over a fixed length L of string where initial values and boundary
values are specified.

265
266 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS

It can be shown that1 , 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

utt = c2 uxx , (10.1)

where c > 0. Note that utt is the second-order partial derivative of the function u = u(x, t) with
respect to t; similarly for uxx . 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 d’Alembert, 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 differentiable) 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),

ut = cf 0 (x + ct) − cg 0 (x − ct)
utt = c2 f 00 (x + ct) + c2 g 00 (x − ct)
ux = f 0 (x + ct) + g 0 (x − ct)
utt = f 00 (x + ct) + g 00 (x − ct).

Thus, obviously utt = c2 uxx .

Equation (10.2) says that if we consider a fixed displacement u0 , say at time t0 = 0 and position
x0 = 0 (that is, u0 = 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(x−t) 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. D’ALEMBERT’S 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.

x
x=ct,t<0 x=ct,t>0
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) = u0 (x) and also the initial vertical velocity as ut (x, 0) = u1 (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) = u0 (x) (10.3)


0 0
cf (x) − cg (x) = u1 (x). (10.4)

If we integrate the second equation, we obtain


ˆ x
cf (x) − cg(x) = u1 (ξ) dξ + C. (10.5)
0

Multiplying (10.3) by c and adding to (10.5) gives


ˆ x
2cf (x) = cu0 (x) + u1 (ξ) dξ + C,
0

and thus ˆ x
u0 (x) 1 C
f (x) = + u1 (ξ) dξ + .
2 2c 0 2c
Similarly, ˆ x
u0 (x) 1 C
g(x) = − u1 (ξ) dξ − .
2 2c 0 2c
Now, using u(x, t) = f (x + ct) + g(x − ct), we obtain the solution
ˆ x+ct ˆ x−ct 
u0 (x + ct) + u0 (x − ct) 1
u(x, t) = + u1 (ξ) dξ − u1 (ξ) dξ
2 2c 0 0
ˆ x+ct
u0 (x + ct) + u0 (x − ct) 1
= + u1 (ξ) dξ.
2 2c x−ct

We have thus established the following result.

Theorem 10.1.2. The initial value problem

utt = c2 uxx (10.6)


u(x, 0) = u0 (x)
ut (x, 0) = u1 (x).

has a solution given by


ˆ x+ct
u0 (x + ct) + u0 (x − ct) 1
u(x, t) = + u1 (ξ) dξ. (10.7)
2 2c x−ct

Equation (10.7) is known as d’Alembert’s formula.


10.2. THE ONE-DIMENSIONAL WAVE EQUATION AND FOURIER SERIES 269

Example 10.1.2. For the initial value problem utt = 4uxx , u(x, 0) = 2 sin x, ut (x, 0) = − sin x, the
solution given by (10.7) is
ˆ
2 sin(x + 2t) + 2 sin(x − 2t) 1 x+2t
u(x, t) = + (− sin ξ) dξ
2 4 x−2t
cos(x + 2t) − cos(x − 2t)
= sin(x + 2t) + sin(x − 2t) +
4
sin x sin(2t)
= 2 sin x cos(2t) − .
2
We used the trigonometric identities
   
u+v u−v
sin u + sin v = 2 sin cos
2 2
   
u+v u−v
cos u − cos v = −2 sin sin .
2 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.

u
2

1
t=0

t=А6
x
t=А3 -3 -2 -1 1 2 3
t=А2
-1
t=2А3

t=5А6
-2

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 fixed at x = 0
and x = L, we would consider the wave equation utt = c2 uxx , together with the initial conditions
270 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS

u(x, 0) = u0 (x) and ut (x, 0) = u1 (x) as in the previous section, and the boundary value conditions
u(0, t) = u(L, t) = 0 for all t.
First off, it is clear that the initial value and boundary value conditions cannot be chosen
completely independently: we certainly need that u0 (0) = u(0, 0) = 0 and u0 (L) = u(L, 0) = 0.
Also, u1 (0) = ut (0, t) = 0 and u1 (L) = ut (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.

utt = c2 uxx (10.8)


u(x, 0) = u0 (x)
ut (x, 0) = u1 (x)
u(0, t) = 0
u(L, t) = 0,

where 0 ≤ x ≤ L, and u0 (0) = u0 (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 fixed 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 utt = c2 uxx gives X(x)T 00 (t) = c2 X 00 (x)T (t), or
T 00 (t) X 00 (x)
= c2 .
T (t) X(x)
The crucial observation is now that in this equation, the function T 00 (t)/T (t) of t only is always
equal to the function c2 X 00 (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(t1 ) = b(x) = a(t2 ) and
b(x1 ) = a(t1 ) = b(x2 ).)
Let the common constant be λ. Then,

T 00 (t) = λT (t)
X 00 (x) = (λ/c2 )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) satisfies the boundary value problem

X 00 (x) = (λ/c2 )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

π 2 n2
X 00 (x) = − X(x).
L2
10.2. THE ONE-DIMENSIONAL WAVE EQUATION AND FOURIER SERIES 271

Thus, we have λ/c2 = −π 2 n2 /L2 , or


π 2 c2 n2
λ=− .
L2
We write λ/c2 = −(ωn)2 , where
π
ω= . (10.11)
L
The values ωn are called the eigenfrequencies and

Xn (x) = sin(ωnx) (10.12)

are the eigenfunctions of the initial/boundary value problem (10.8). Now, the differential equation
T 00 (t) = λT (t) = −(ωcn)2 T (t) has the general solution

T (t) = C1 cos(ωcnt) + C2 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

un (x, t) = sin(ωnx) cos(ωcnt) (10.13)

or of the form
vn (x, t) = sin(ωnx) sin(ωcnt) (10.14)
is a solution to the wave equation utt = c2 uxx and satisfies 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
N
X
u(x, t) = cn un (x, t) + dn vn (x, t). (10.15)
n=1

We now turn our attention to incorporating the initial conditions u(x, 0) = u0 (x) and ut (x, 0) =
u1 (x). First, we look at an example.
Example 10.2.1. Consider the initial/boundary value problem utt = uxx , u(x, 0) = 3 sin(2x),
ut (x, 0) = 0, u(0, t) = u(π, t) = 0. Thus, c = 1 and L = π, and
π
ω= = 1.
L
We are looking for solutions of the form

u(x, t) = c1 sin(x) cos(t) + d1 sin(x) sin(t) + c2 sin(2x) cos(2t) + d2 sin(2x) sin(2t)


+ . . . + cN sin(N x) cos(N t) + dN sin(N x) sin(N t).

The initial condition u(x, 0) = 3 sin(2x) indicates that c2 = 3, and c1 = c3 = . . . = cN = 0. Since

ut (x, t) = −c1 sin(x) sin(t) + d1 sin(x) cos(t) − 2c2 sin(2x) sin(2t) + 2d2 sin(2x) cos(2t)
− . . . − N cN sin(N x) sin(N t) + N dN sin(N x) cos(N t),

ut (x, 0) = 0 gives d1 = d2 = . . . = dN = 0. Thus, we find 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) = u0 (x), we need to be able to write u0 (x) as

N
X
u0 (x) = cn sin(ωnx).
n=1

Similarly, ut (x, 0) = u1 (x) leads to the condition

N
X
u1 (x) = ωdn sin(ωnx).
n=1

In general, and for most choices of functions u0 (x) and u1 (x), using finite sums is not enough. In
the following we describe how to expand a given function f (x) in the form

X
f (x) = cn sin(ωnx). (10.16)
n=1

The series on the right is called the Fourier sine series of f (x). In the following, we show how to
find the coefficients cn .

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

a0 X
f (x) = + an cos(ωnx) + bn sin(ωnx), (10.17)
2
n=1

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 infinite sum in (10.17) by a finite sum, we obtain the following.
A (real) trigonometric polynomial of degree N is of the form

N
a0 X
p(x) = + an cos(ωnx) + bn sin(ωnx), (10.18)
2
n=1

where a0 , a1 , . . . , aN , b1 , . . . , bN ∈ 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 a0 /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 find the coefficients a0 , a1 , . . . , aN , b1 , . . . , bN in (10.18), we use that


ˆ L
sin(ωnx) cos(ωkx) dx = 0 (n, k = 0, 1, . . .)
−L
ˆ L 
L if n = k
cos(ωnx) cos(ωkx) dx = (n, k = 1, 2, . . .)
−L 0 if n 6= k
ˆ L 
L if n = k
sin(ωnx) sin(ωkx) dx = (n, k = 1, 2, . . .)
−L 0 if n 6= k

In this way, we can multiply (10.18) by cos(ωkx) and sin(ωkx) and integrate from 0 to L to “flush
out” the coefficients, as follows. For
N
a0 X
p(x) = + an cos(ωnx) + bn sin(ωnx),
2
n=1

we have
ˆ L ˆ L N ˆ L  ˆ L 
a0 X
p(x) dx = dx + an cos(ωnx) dx + bn sin(ωnx) dx = a0 L.
−L −L 2 −L −L
n=1
´L
Thus, a0 /2 = (1/(2L)) −L p(x) dx. In the same way,
ˆ L ˆ L N ˆ L 
a0 X
p(x) cos(ωkx) dx = cos(ωkx) dx + an cos(ωnx) cos(ωkx) dx
−L −L 2 n=1 0
ˆ L 
+bn sin(ωnx) cos(ωkx) dx = ak L
−L
´L
gives ak = (1/L) −L p(x) cos(ωkx) dx for k = 1, 2, . . . , N . Similarly, we obtain the formula bk =
´L
(1/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 coefficients in the Fourier series (10.17) are
ˆ L
a0 1
= f (x) dx (10.19)
2 2L −L
ˆ
1 L
an = f (x) cos(ωnx) dx (10.20)
L −L
ˆ
1 L
bn = f (x) sin(ωnx) dx (10.21)
L −L

for n = 1, 2, . . .. In this way we can approximate an arbitrary function with trigonometric polyno-
mials:
N
a0 X
f (x) ≈ pN (x) = + an cos(ωnx) + bn sin(ωnx).
2
n=1
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


X
bn sin(ωnx). (10.22)
n=1

Example 10.2.2. Consider the function f : [0, 1] → R, where


1 if 0.25 ≤ t ≤ 0.75
f (x) =
0 otherwise.

The graph of y = f (x) is shown Figure 10.4a. We can extend f (x) to the odd function fodd (x) on
the interval [−1, 1] by letting fodd (−x) = f (x) for −1 ≤ x < 0. In other words, the odd extension
is

 −1 if − 0.75 ≤ t ≤ −0.25
fodd (x) = 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).

y y
1.0
1.0
0.8

0.6
0.5
0.4
x
0.2 -1.0 -0.5 0.5 1.0

x
0.2 0.4 0.6 0.8 1.0 -0.5
-0.2
-1.0
-0.4

We can now compute the Fourier coefficients as follows. Note that ω = π/L = π. Since fodd (x)
10.2. THE ONE-DIMENSIONAL WAVE EQUATION AND FOURIER SERIES 275

is an odd function, a0 = a1 = a2 = . . . = 0. Also,


ˆ 1
b1 = f (x) sin(πx) dx ≈ 0.9003,
−1
ˆ 1
b3 = f (x) sin(3πx) dx ≈ −0.3001,
−1
ˆ 1
b5 = f (x) sin(5πx) dx ≈ −0.1800,
−1
ˆ 1
b7 = f (x) sin(7πx) dx ≈ 0.1286,
−1
ˆ 1
b9 = f (x) sin(9πx) dx ≈ 0.1000,
−1
..
.

In this example, bk = 0 for k even. Alternatively, to find the bk ’s, we could have integrated each
function from 0 to 1, and then doubled the result (since the integrand is an even function). The
first five trigonometric polynomial approximations are consequently:

p1 (x) = 0.9003 sin(πx)


p3 (x) = p1 (x) − 0.3001 sin(3πx)
p5 (x) = p3 (x) − 0.1800 sin(5πx)
p7 (x) = p5 (x) + 0.1286 sin(7πx)
p9 (x) = p9 (x) + 0.1000 sin(9πx).

The graphs of these approximations are shown in Figure 10.5. Figure 10.6 shows the original
function f (x) (defined on the interval [−1, 1]), and the high-order Fourier sine series approximation
p25 (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

X
u(x, t) = cn sin(ωnx) cos(ωcnt) + dn sin(ωnx) sin(ωcnt). (10.23)
n=1

Consequently,

X
ut (x, t) = −ωcncn sin(ωnx) sin(ωcnt) + ωcndn sin(ωnx) cos(ωcnt). (10.24)
n=1

To find the coefficients cn and dn we need to write the functions giving the initial conditions
u0 (x) = u(x, 0) and u1 (x) = ut (x) as Fourier sine series, and then compare coefficients. The next
example illustrates this process.
276 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS

Figure 10.5: The first 5 approximations by trigonometric polynomials of the function y = fodd (x)
in example 10.2.2.

1.0
n=1
0.5
n=3

n=5 x
-1.0 -0.5 0.5 1.0
n=7
-0.5
n=9
-1.0

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.

1.0

0.8

0.6

0.4

0.2

x
0.2 0.4 0.6 0.8 1.0
10.2. THE ONE-DIMENSIONAL WAVE EQUATION AND FOURIER SERIES 277

Example 10.2.3. Consider the initial/boundary value problem utt = 4uxx , u(x, 0) = f (x), ut (x, 0) =
0, u(0, t) = u(1, t) = 0, where f : [0, 1] → R is the piecewise-defined function in example 10.2.2.
That is,

1 if 0.25 ≤ x ≤ 0.75
f (x) =
0 otherwise

Here, c = 2, L = 1, and ω = π/L = π.


From example 10.2.2,

f (x) ≈ 0.9 sin(πx) − 0.3 sin(3πx) − 0.18 sin(5πx) + 0.13 sin(7πx) + 0.1 sin(9πx).
PN
If u(x, t) is of the form (10.23), u(x, 0) = n=1 an sin(ωnx). Comparing coefficients, c1 ≈ 0.9,
c3 ≈ −0.3, c5 ≈ −0.18, c7 ≈ 0.13, c9 ≈ 0.1; coefficients cn with even indices are zero, and, by way
of approximation, we assume that c11 , c13 , . . . ≈ 0. Equation (10.24) and the fact that ut (x, 0) = 0
gives that all dn ’s are zero.
The solution to the initial/boundary value problem can be approximated as

u(x, t) ≈ 0.9 sin(πx) cos(2πt) − 0.3 sin(3πx) cos(6πt) − 0.18 sin(5πx) cos(10πt)
+0.13 sin(7πx) cos(14πt) + 0.1 sin(9πx) cos(18πt).

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 fixed 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).

1.0 t=0.3

u
0.5 t=0.4
1.0
x
0.2 0.4 0.6 0.8 1.0 t=0.5
0.5
-0.5
t=0

x
-1.0 0.2 0.4 0.6 0.8 1.0
t=0.1

-0.5

t=0.2
-1.0

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.

ut = kuxx , (10.25)

where k > 0 is the constant of heat conductivity. Before presenting a method of finding 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 t0 and at the position x0 along the rod, the change
in temperature with time is proportional to the concavity at x0 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 flow to “fill in” any non-linear “holes” in the spatial
temperature distribution. The heat conductivity constant k specifies 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 fixed 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) = u0 and u(L, t) = uL 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 u

ut >0

ut <0

x x

all t. Then, u∗t = 0 gives that u∗xx = 0, so u∗ (x) is a linear function of x, and we have
uL − u0
u∗ (x) = u0 + x. (10.26)
L
(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.
ut = kuxx (10.27)
u(x, 0) = u0 (x)
u(0, t) = 0
u(L, t) = 0,
where k > 0. To find a solution to this problem, we again employ the method of separation of
variables. As in section 10.2, assume first 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
2 ω2 t
un (x, t) = e−kn sin(ωnx), (10.29)
where ω = π/L, is a solution to the wave equation ut = kuxx and satisfies the boundary conditions
u(0, t) = u(L, t) = 0 for all t. The same is true for any linear combination of the form
N
X
u(x, t) = cn un (x, t). (10.30)
n=1
280 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS

As for the wave equation, we in general need an infinite sum in (10.30). Then, since

X
u(x, 0) = cn sin(ωnx),
n=1

we again need to find a Fourier sine series expansion for the initial temperature distribution. This
is illustrated in the following example.
Example 10.3.1. Suppose ut = uxx , u(x, 0) = x(1 − x), u(0, t) = u(1, t) = 0. Then k = L = 1
and ω = π. To find a Fourier sine series representing u0 (x) = x(1 − x), we need to extend
f (x) = x(1 − x) into an odd function fodd (x), and then use formula (10.21) with fodd (x) in place
of f (x). The coefficients bn can be computed using the formula
ˆ 1
bn = fodd (x) sin(nπx) dx
−1
ˆ 1
= 2 f (x) sin(nπx) dx
0
ˆ 1
= 2 x(1 − x) sin(nπx) dx.
0
These integrals can be evaluated using integration by parts or Mathematica. The formula for the
coefficients is bn = 0 if n is even and bn = 8/(n3 π 3 ) if n is odd. We write

X 8
f (x) = x(1 − x) = sin((2i + 1)πx).
(2i + 1)3 π 3
i=0

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): first-order approximation f (x) ≈ (8/π 3 ) sin(πx) (left); (b):
first-order approximation f (x) ≈ (8/π 3 ) sin(πx) + (8/(27π 3 ) sin(3πx) (right).

y y
0.25
0.25

0.20 0.20

0.15 0.15

0.10 0.10

0.05 0.05

x x
0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0

The solution to the initial/boundary value problem for the heat equation is thus:

X 8 2 2
u(x, t) = 3 3
e−(2i+1) π t sin((2i + 1)πx).
(2i + 1) π
i=0
10.4. THE SCHRÖDINGER WAVE EQUATION 281

Figure 10.11 shows the graph of the second-order approximation


8 2 8 −9π2 t
u(x, t) ≈ 3 e−π t sin(πx) + e sin(3πx)
π 27π 3
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ödinger Wave Equation


In this section, we will present some aspects related to Schrödinger’s wave equation. The phys-
ical interpretations will of necessity be somewhat vague. An excellent introduction to quantum
mechanics is presented in [12]. Here is Schrödinger’s wave equation:
∂u i~ ∂ 2 u i
= − V u, (10.31)
∂t 2m ∂x2 ~
where:
• u(x, t) is the complex-valued Schrödinger wave function;

• i = −1;
• ~ = h/(2π), where h is Planck’s 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
Schrödinger’s 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 ˆ b
P (a ≤ X ≤ b) = |u(x, t)|2 dx. (10.32)
a

For this to work as intended, the function |u(x, t)|2 must have the properties associated with a
probability density function. Specifically, 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 first
check that the integral on the left in equation (10.33) is equal to the same constant for all values
of t. Differentiating the integral in (10.33) and using the product rule gives
ˆ ˆ ∞
d ∞ 2 ∂
|u(x, t)| dx = |u(x, t)|2 dx
dt −∞ ∂t
ˆ−∞∞
∂u ∂u
= (x, t)u(x, t) + u(x, t) (x, t) dx.
−∞ ∂t ∂t

Schrödinger’s wave equation


∂u i~ ∂ 2 u i
= 2
− Vu
∂t 2m ∂x ~
implies
∂u i~ ∂ 2 u i
=− + V u.
∂t 2m ∂x2 ~
Thus,

∂u ∂u i~ ∂ 2 u i i~ ∂ 2 u i
u+u = − 2
u + V uu + 2
u − V uu
∂t ∂t 2m ∂x ~  2m ∂x ~
i~ ∂ 2 u ∂2u
= u − 2u
2m ∂x2 ∂x
 2
∂u ∂u ∂u ∂u ∂ 2 u

i~ ∂ u
= u+ − − u
2m ∂x2 ∂x ∂x ∂x ∂x ∂x2
 
i~ ∂ ∂u ∂u
= u− u .
2m ∂x ∂x ∂x

We have established that  


∂ i~ ∂ ∂u ∂u
|u(x, t)|2 = u− u . (10.34)
∂t 2m ∂x ∂x ∂x
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ÖDINGER WAVE EQUATION 283

This means that ˆ ∞


∂u x=∞
 
d 2 i~ ∂u
|u(x, t)| dx = u− u .
dt −∞ 2m ∂x ∂x x=−∞
Assuming limx→±∞ 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
Schrödinger’s wave equation and the integral of the square modulus of u(x, t) is finite, then we can
normalize it to satisfy condition (10.33).

Expected Values of Position and Momentum


Definition 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 find 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 d ∞
E(X) = x|u(x, t)|2 dx
dt dt −∞
ˆ ∞

= x |u(x, t)|2 dx
−∞ ∂t
ˆ ∞  
i~ ∂ ∂u ∂u
= x u− u dx
2m −∞ ∂x ∂x ∂x
ˆ ∞
∂u x=∞
 
i~ ∂u i~ ∂u ∂u
= x u − x u − u− u dx
2m ∂x ∂x x=−∞ 2m −∞ ∂x ∂x
ˆ ∞
i~ ∂u ∂u
= − u− u dx.
2m −∞ ∂x ∂x
284 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS

We used equation (10.34), integration by parts, and the assumption limx→±∞ xu(x, t) = 0 and
boundedness of partial derivatives with respect to x in the derivation. Another integration by
parts gives
ˆ ∞ ˆ ∞
∂u x=∞ ∂u
u dx = uu|x=−∞ − u dx
−∞ ∂x −∞ ∂x
ˆ ∞
∂u
= − u dx.
−∞ ∂x
Thus, ˆ ˆ
i~ ∞ ∂u 1 ∞
 
d ~ ∂
E(X) = − u dx = u u dx. (10.38)
dt m −∞ ∂x m −∞ i ∂x
Technically, it would be cleaner to find the probability distribution of the velocity dX/dt, and
then find 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 u dx. (10.39)
−∞ i ∂x
Observe that the expected value of the position (10.37) can be written as
ˆ ∞
E(X) = u (x) u dx. (10.40)
−∞
Thus, we may formally identify the operator of multiplying a function by x with the position and the
operator of differentiating a function with respect to x and multiplying by ~/i with the momentum.
In general, we can use this approach to define the expected value of any dynamical variable.
Definition 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 defined as
ˆ ∞   
~ ∂
E(Q) = u Q x, u dx. (10.41)
−∞ i ∂x
Example 10.4.1. The total energy (kinetic energy plus potential energy) of the particle is given by
the Hamiltonian function
p2
H(x, p) = + V (x).
2m
(Cf. example 6.6.1.) The expected value for the total energy is thus:
ˆ ∞ !
~ ∂ 2
 
1
E(H) = u + V (x) u dx
−∞ 2m i ∂x
ˆ ∞  2 !
i~ ∂ i
= u i~ − V (x) u dx
−∞ 2m ∂x ~
ˆ ∞
= i~ uut dx, (10.42)
−∞

where we used Schrödinger’s wave equation (10.31) in the last step. Formula (10.42) can be used
to compute the expected energy in specific situations.
10.4. THE SCHRÖDINGER WAVE EQUATION 285

Solutions to the Time-Independent Schrödinger 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) Schrödinger
wave equation. As usual, we assume

u(x, t) = X(x)T (t).

Then (10.31) leads to


i~ 00 i
X(x)T 0 (t) = X (x)T (t) − V (x)X(x)T (t)
2m ~
or
T 0 (t) i~ X 00 (x) i
= − V (x).
T (t) 2m X(x) ~
Dividing both sides by −i/~ (and thus producing units of energy on both sides), we get
T 0 (t) ~2 X 00 (x)
i~ =− + V (x).
T (t) 2m X(x)
As seen before, both sides must be constant. We denote this constant by E. We have produced
two (ordinary) differential equations:
1. The time-component satisfies
T 0 (t) E E
= = −i ,
T (t) i~ ~
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 satisfies
~2 X 00 (x)
− + V (x) = E,
2m X(x)
or
2m
X 00 (x) + (E − V (x))X(x) = 0. (10.44)
~2
This is a linear second-order homogeneous differential equation (albeit in general with noncon-
stant coefficients). Finding solutions may get quite complicated, depending on the formula for
the potential energy function V (x). We demonstrate how to find a solution to Schrödinger’s
wave equation for a simple potential. The scenario, analyzed in the following example, is
called the “infinite square well”.
286 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS

Example 10.4.2. Let 


0 if 0 ≤ x ≤ 1
V (x) = (10.45)
+∞ otherwise.
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 flat. The particle would need to have
infinite energy to reach or be located at all other positions, which is not physically possible, and thus
the probability that we will find 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 differential 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
2mE
X 00 (x) + X(x) = 0, X(0) = X(1) = 0. (10.46)
~2
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
Xn (x) = sin(ωnx), (10.47)
where on the one hand, ω = π to satisfy the boundary conditions; on the other hand,

2mE
ωn =
~
to satisfy the differential 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 En . They need to satisfy the equation 2mEn /~ = πn, or
π 2 n2 ~2
En = . (10.48)
2m
This result exhibits the fundamental difference between quantum mechanics and classical mechan-
ics, namely that there is a smallest allowed unit of energy E1 that can occur in a quantum system
(see exercise 10.11). The quantity E1 = (π 2 ~2 )/(2m) is called the ground state of the system.
We have established that the solutions for the infinite square well are linear combinations or
infinite sums of functions of the form
un (x, t) = Ae−i(En /~)t sin(πnx). (10.49)
Normalization gives:
ˆ 1
1 = u(x, t)u(x, t) dx
0
ˆ 1
= Aei(En /~)t sin(πnx)Ae−i(En /~)t sin(πnx) dx
0
ˆ 1
2
= A sin2 (πnx) dx
0
= A2 (1/2),
10.4. THE SCHRÖDINGER WAVE EQUATION 287

thus A = 2, and √
un (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) = u0 (x), then a Fourier sine series
expansion of u0 (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 differently, we would like to measure the
uncertainty about these quantities. This leads to the following definitions.

Definition 10.4.3. If X is a random variable with probability densitity function ρ(x) and expected
value µ, then the variance of X is

σ 2 = σX
2
= 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
infinite square well. The expected value of the solution given by the eigenfunction (10.50) is
ˆ 1
E(Xn ) = x|un (x, t)|2 dx
0
ˆ 1 √ √
= x 2ei(En /~)t sin(πnx) 2e−i(En /~)t sin(πnx) dx
0
ˆ 1
= 2 x sin2 (πnx) dx
0
= 1/2.

This is not at all surprising, since x = 1/2 is the center of the well. Also,
ˆ 1
E(Xn2 ) = x2 |un (x, t)|2 dx
0
ˆ 1
= 2 x2 sin2 (πnx) dx
0
1 1
= − 2 2.
3 2n π
288 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS

2 = E(X 2 ) − E(X )2 = (1/12) − (1/(2n2 π 2 )), and the standard deviation


Thus, the variance is σXn n n
is r
1 1
σXn = − 2 2.
12 2n π
Using formula (10.41) we can also compute that the momentum Pn = m(d/dt)Xn of the n-th
solution has expected values E(Pn ) = 0 and E(Pn2 ) = ~2 n2 π 2 , and thus the standard deviation of
the momentum is
σPn = ~nπ.
We observe that the quantity r
n2 π 2 1
σXn σPn = ~ −
12 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
Schrödinger’s wave equation must satisfy Heisenberg’s uncertainty principle:
~
σX σP ≥ . (10.54)
2
See [12] for a derivation of this result. The uncertainty principle states that there is a fundamental
trade-off 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 differential equations in Mathematica is not quite as straightforward as finding
solutions for ordinary differential 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 utt = 4uxx , u(x, 0) = f (x), ut (x, 0) = 0,
u(0, t) = u(1, t) = 0, with 
1 if 0.25 ≤ t ≤ 0.75
f (x) = ,
0 otherwise
we first define the initial value function and the relevant parameters.
f@x_D := Piecewise@881, 0.25 £ x £ 0.75<<D;
L = 1;
c = 2;
Ω = Pi  L;

The coefficients for the Fourier sine series of the function f (x) are computed and displayed as
follows.
b@n_D := H2  LL Integrate@f@xD Sin@Ω n xD, 8x, 0, L<D;
Table@b@nD, 8n, 1, 25<D  N
80.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 d’Alembert’s formula (10.7) to solve each initial value problem, and sketch the
graph of u(x, t) at the indicated values of t.
2
(a) ♣ utt = uxx , u(x, 0) = e−x , ut (x, 0) = 0 (t = 0, 1, 2, 3).
2
(b) utt = uxx , u(x, 0) = 0, ut (x, 0) = 2xe−x (t = 0, 1, 2, 3).

(c) ♣ utt = 4uxx , u(x, 0) = x2 /(1 + x2 ), ut (x, 0) = 0 (t = 0, 1, 2, 3).

(d) utt = 4uxx , u(x, 0) = 1, ut (x, 0) = x/(1 + x2 ) (t = 0, 1, 2, 3).

(e) ♣ utt = 4uxx , u(x, 0) = x2 /(1 + x2 ), ut (x, 0) = 1 (t = 0, 1, 2, 3).

(f) utt = uxx , u(x, 0) = 1, ut (x, 0) = (1 − x2 )/(1 + x2 )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 cu00 (x) + u1 (x) = 0, then the solution u(x, t) is a forward-moving wave only.

(b) If cu00 (x) − u1 (x) = 0, then the solution u(x, t) is a backward-moving wave only.

(c) If u0 (x) is even and u1 (x) = 0, then the function x 7→ u(x, t) is even for all t.

(d) If u0 (x) is odd and u1 (x) = 0, then the function x 7→ u(x, t) is odd for all t.

(e) If u1 (x) is even and u0 (x) = 0, then the function x 7→ u(x, t) is even for all t.
290 CHAPTER 10. INTRODUCTION TO PARTIAL DIFFERENTIAL EQUATIONS

(f) If u1 (x) is odd and u0 (x) = 0, then the function x 7→ u(x, t) is odd for all t.

Exercise 10.3. Find the first five 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 − x2 , 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 first three non-zero terms of the solution (10.23) to each initial/boundary
value problem. Then, graph the solution over the given domain.

(a) ♣ utt = uxx , u(x, 0) = f (x), ut (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) utt = uxx , u(x, 0) = x(1 − x), ut (x, 0) = 0, u(0, t) = u(1, t) = 0; domain: 0 ≤ x ≤ 1, 0 ≤ t ≤ 2.

(c) ♣ utt = 4uxx , u(x, 0) = 0, ut (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) utt = 4uxx , u(x, 0) = 0, ut (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

ut = kuxx (10.55)
u(x, 0) = u0 (x)
u(0, t) = u0 (0)
u(L, t) = u0 (L).

(a) Show that if u(x, t) is a solution to (10.55) and u∗ (x) is as in equation (10.26), then

ũ(x, t) = u(x, t) − u∗ (x)

is a solution to (10.27).

(b) Use this result to find the solution to the initial/boundary value problem ut = uxx , u(x, 0) =
1 + 2x − x2 , 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 0 (t) = −λT (t) and X 00 (x) = −(λ/k)X(x). From physical considerations, we may
assume λ > 0.

(b) Find the general solution to T 0 (t) = −λT (t).


10.6. EXERCISES 291

(c) Use the boundary value conditions to show that for ω = π/L, λ = kn2 ω 2 and Xn (x) =
sin(ωnx).

Exercise 10.7. Consider the heat equation with insulated endpoints. It is described by the ini-
tial/boundary value problem

ut = kuxx (10.56)
u(x, 0) = u0 (x)
ux (0, t) = 0
ux (L, t) = 0.
P∞
(a) Show that if u0 (x) = n=0 cn cos(ωnx), any function of the form

2 ω2 t
X
u(x, t) = cn e−kn cos(ωnx) (10.57)
n=0

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
ˆ
∗ 1 L
u = u0 (x) dx.
L 0

(c) Show that for every t ≥ 0,


ˆ L
1
u∗ = u(x, t) dx.
L 0
This equation demonstrates, as expected when the endpoints are insulated, that the total
heat is constant.
P∞
Exercise 10.8. Find the first five non-zero terms of the Fourier cosine series n=0 cn cos(ωnx)
(0 ≤ x ≤ L, ω = π/L) of each function and graph the function and its Fourier cosine series. Use
the following formulas for the coefficients:
ˆ
1 L
c0 = f (x) dx (10.58)
L 0
ˆ
2 L
cn = f (x) cos(ωnx) dx (10.59)
L 0

(a) ♣ f (x) = x, 0 ≤ x ≤ 1.

(b) f (x) = 1 − x2 , 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 first 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) ♣ ut = (1/5)uxx , 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) ut = (1/5)uxx , u(x, 0) = x(1 − x), u(0, t) = u(1, t) = 0; domain: 0 ≤ x ≤ 1, 0 ≤ t ≤ 2.
(c) ♣ ut = (1/10)uxx , u(x, 0) = f (x), ux (0, t) = ux (1, t) = 0, where f (x) is the function in part
(c) of exercise 10.8; domain: 0 ≤ x ≤ 1, 0 ≤ t ≤ 1.
(d) ut = (1/10)uxx , u(x, 0) = x(1 − x), ux (0, t) = ux (1, t) = 0; domain: 0 ≤ x ≤ 1, 0 ≤ t ≤ 2.
Exercise 10.10. ♣ Consider the function
 1/4
λ 2
u(x, t) = e−(λ/2)x −iωt , (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 un (x, t) of the infinite square well.
(a) Verify that E(Pn ) = 0.
(b) Verify that E(Pn2 ) = ~2 n2 π 2 .
(c) Suppose u(x, t) = ∞
P P∞
n=1 cn un (x, t). Show that if un (x, t) is normalized, then n=1 |cn | = 1.

(d) Show that the expected value of the


P total energy H(X, P ) associated with un (x, t) is En and
that the total energy of u(x, t) = ∞
P∞ 2
c u
n=1 n n (x, t) is equal to n=1 n | En .
|c
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 ≥ minx 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 − t3 ), t > 3
11
(c) x = − log(2 − et ), t < log(2)
p√
(d) y = x4 + 1 − x2
(e) y = t/(t2 + 1)
(f) x = (et + 1 − e)/t, t > 0
(g) x2 + y 4 = 17
(h) xey + 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 − x2 ), 0 < x < 2

Exercise 1.5

(a) y ∗ = −2 is a sink, y ∗ = 3 is a source; if y(0) = 0, then limt→∞ y = −2 and limt→−∞ y = 3;


if y(0) = 4, then limt→∞ y = ∞ and limt→−∞ y = 3.
y
-2 3

(b) y ∗ = 0 is a node, y ∗ = 2 is a source; if y(0) = 1, then limt→∞ y = 0 and limt→−∞ y = 2;


if y(0) = −1, then limt→∞ y = −∞ and limt→−∞ y = 0.

293
294 APPENDIX A. ANSWERS TO EXERCISES

y
0 2

Exercise 1.7
y y

3 3

2 2

1 1

x x
-3 -2 -1 1 2 3 -3 -2 -1 1 2 3

-1 -1

-2 -2

-3 -3

(a) (b)

y y

3 3

2 2

1 1

x x
-3 -2 -1 1 2 3 -3 -2 -1 1 2 3

-1 -1

-2 -2

-3 -3

(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 Gy (x, y) = 2y are continuous everywhere, so there exists a unique
solution.
295

(b) G(t, y) = 4ty 3/4 and Gy (t, y) = 3ty −1/4 are continuous in a neighborhood of t = 0, y = 1,
so there exists a unique solution.
(c) Gy (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 Gy (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 y0 = 1. However,
the non-uniqueness comes from the fact that there are two solutions to (y 0 )2 − y = 0 when
solving for y 0 .

Exercise 1.11

2 1.5

1.0
1

0.5

source
y*

0
y*

0.0

-0.5
-1

-1.0

-2
-1.5
-2 -1 0 1 2 -0.4 -0.2 0.0 0.2 0.4
Μ Μ

(a) µ0 = 0 (b) µ0 = 0, −1/4

Exercise 2.1
P (t) = 200000 exp((t/10) − (6/(5π)) sin((π/6)t).

2.5 ´ 106

2.0 ´ 106

1.5 ´ 106

1.0 ´ 106

500 000

5 10 15 20

Exercise 2.2
296 APPENDIX A. ANSWERS TO EXERCISES

(a)

roots = FindRoot@82300 H1500 b H1 - Exp@aDL + aL Š 1500 a


Exp@aD, 2700 H1500 b H1 - Exp@2 aDL + aL Š 1500 a Exp@2 aD<, 88a, 1<, 8b, - 0.001<<D
8a ® 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 Newton’s Law, the average temperature is the same regardless of
which strategy is used.

Exercise 2.6

(a) About 11.5 hours.

(b) About 0.72m3 /min.

Exercise 2.8

soln = Expand@DSolve@812 i '@tD + 8 i@tD Š 220 Cos@100 Pi tD, i@0D Š 0<, i@tD, tDD
Plot@i@tD . soln, 8t, 0, 0.2<D

99i@tD ® - ==
55 ã-2 t3 55 Cos@100 Π tD 4125 Π Sin@100 Π tD
2 I1 + 22 500 Π2 M 2 I1 + 22 500 Π2 M
+ +
1 + 22 500 Π2
0.06

0.04

0.02

0.05 0.10 0.15 0.20

-0.02

-0.04

-0.06

Exercise 2.10
297

H* Exercise 2.10 *L
solnN2O5 = Expand@DSolve@8c '@tD Š - 0.070 c@tD, c@0D Š 10<, c@tD, tDD
solnNO2 = Expand@DSolve@8c '@tD Š 0.070 H10 - c@tD  2L, c@0D Š 0<, c@tD, tDD
solnO2 = Expand@DSolve@8c '@tD Š 0.070 H10 - 2 c@tDL, c@0D Š 0<, c@tD, tDD
Plot@8c@tD . solnN2O5, c@tD . solnNO2, c@tD . solnO2<, 8t, 0, 60<, PlotRange ® 80, 22<D

99c@tD ® 10. ã-0.07 t ==

99c@tD ® 20. - 20. ã-0.035 t ==

99c@tD ® 5. - 5. ã-0.14 t ==

20

15

10

0 10 20 30 40 50 60

Exercise 2.12

(a) v ∗ = g/c.
(b) x = x0 −(m/c2 )(g −cv0 )+(m/c2 )(g −cv0 )e−(c/m)t +(g/c)t; the third term is the transient
term.
(c) v ∗ = g/c.
p

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 differential equation dI/dt = pkI(N − I).
(b) If the relative rate of forgetting is f , then the differential equation becomes dI/dt =
pkI(N − I) − f I. 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)et − (2/5)e6t


(b) x = (−1/3)e−2t + (1/3)et
298 APPENDIX A. ANSWERS TO EXERCISES

(c) x = −5 + 5e(t−1)/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 = et − tet

Exercise 3.3

(a) xh = c1 e−2t + c2 te−2t


(b) xh = c1 e−2t cos t + c2 e−2t sin t
(c) xh = c1 et + c2 tet + c3 t2 et
(d) xh = c1 cos(2t) + c2 t cos(2t) + c3 sin(2t) + c4 t sin(2t)

Exercise 3.5

(a) xp = (21/100) cos(2t) + (3/100) sin(2t)


(b) xp = −46t − 5t2 − (1/3)t3
(c) xp = (1/18)t2 e(2/3)t
(d) xp = (1/10)t cos(5t) + (1/5)t sin(5t)

Exercise 3.6

(a) xp = t(A0 + A1 t + A2 t2 + A3 t3 )e−t + t2 (B0 + B1 t)et


(b) xp = (A0 + A1 t + A2 t2 ) cos(2t) + (B0 + B1 t + B2 t2 ) sin(2t) + (C0 + C1 t)e−t/2 cos(2t) +
(D0 + D1 t)e−t/2 sin(2t)

Exercise 3.7

(a) y = (29/8100)e−5x − (166/891)e−x/2 + (201/1100)e5x + (1/90)xe−5x


(b) y = (6/37) cos(3x) + (31/37)ex cos(3x) + (1/37) sin(3x) − (34/111)ex sin(3x)

Exercise 3.8

(a) W (φ1 , φ2 , φ3 , φ4 )(0) = αβ(α2 − β 2 )2 6= 0


(b) W (φ1 , φ2 , φ3 )(0) = 2 6= 0

Exercise 4.1
√ √
(a) x = c1 e(−1/2+ 1/20)t + c2 e(−1/2− 1/20)t
(b) k = 1601/40 = 40.025
(c) Critical damping occurs if k = c2 /40.
299

k
2.5

2.0 under-damping

1.5

1.0

0.5 over-damping

c
2 4 6 8 10

Exercise 4.4

p
(a) λ1,2 = −1/(2RC) ± 1/(2RC) 1 − 4(R2 C/L); the system is over-damped if L > 4R2 C,
critically damped if L = 4R2 C and under-damped if L < 4R2 C.

(b) Over-damped: V (t) = c1 eλ1 t + c2 eλ2 t , where λ1 , λ2 < 0 are as in part (a); the voltage
decreases exponentially without oscillations. Critically damped: V (t) = c1 e−t/(2RC) +
c2 te−t/(2RC) ; the voltage decreases exponentially without oscillations; Under-damped:
−t/(2RC) −t/(2RC)
p
V (t) = c1 e cos(ωt) + c2 e sin(ωt) where ω = (4R C − L)/(4LR2 C 2 );
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) = c1 e3t (1, 0) + c2 e−2t (−2, 5).

y
1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

(b) x(t) = c1 e−4t (1, 1) + c2 e−t (−2, 1).


300 APPENDIX A. ANSWERS TO EXERCISES

y
1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

(c) x(t) = c1 (sin(2t), cos(2t)) + c2 (− cos(2t), sin(2t)).


y
1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

√ √ √ √ √ √
(d) x(t) = c1 e−t ( 2 sin( 2t), cos( 2t)) + c2 e−t (− 2 cos( 2t), sin( 2t)).
y
2

x
-2 -1 1 2

-1

-2
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) = c1 e2t (1, −1) + c2 e−t (0, 1).


(b) x(t) = c1 e2t (cos(3t) − sin(3t), 2 cos(3t)) + c2 e2t (cos(3t) + sin(3t), 2 sin(3t)).

Exercise 5.4

(a)
y
3

x
-3 -2 -1 1 2 3

-1

-2

-3

(b)
y

1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5
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.
D

center
spiral spiral
sink source

sink Μ=12.25 source

T
Μ=10
saddle

(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.
D
center

spiral spiral
sink source

sink Μ=4 source

T
Μ=0
saddle

Exercise 5.11

(a) The general solution is x(t) = c1 e5t , y(t) = c2 e−4t − 2c3 e−t , z(t) = c2 e−4t + c3 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 x0 6= 0 is in the stable eigenspace, then |x(t)| → 0 as t → ∞
and |x(t)| → ∞ as t → −∞; if x0 6= 0 is in the unstable eigenspace, then |x(t)| → ∞
as t → ∞ and |x(t)| → 0 as t → −∞; for all other initial points x0 , the solution
curves approach the (positive or negative) x-axis as t → ∞, and become unbounded and
approach the stable eigenspace as t → −∞.
√ √ √ √ √ √
t/ 2 cos(t/ 2)+c et/ 2 sin(t/ 2), y(t) = c et/ 2 cos(t/ 2)−
(b) The general solution is x(t) = c1 e 2 2
√ √
c1 et/ 2 sin(t/ 2), z(t) = c3 e−t . The stable eigenspace is the z-axis; the unstable
eigenspace is the xy-plane. If x0 6= 0 is in the stable eigenspace, then |x(t)| → 0 as
t → ∞ and |x(t)| → ∞ as t → −∞; if x0 6= 0 is in the unstable eigenspace, then
|x(t)| → ∞ as t → ∞ and |x(t)| → 0 as t → −∞; for all other initial points x0 , 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 = −x2 .
The equilibrium points are (1, −1) and (−1, −1). The motion along the nullclines is indicated
in the following graph.

x
-2 -1 1 2

-1

-2

-3

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 = 2x − 2. 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 v1 = (1, 0) and v2 = (0, 1). The matrix A(2,0) has eigenvalues λ1,2 = ±1,
so (2, 0) is a saddle; corresponding eigenvectors are v1 = (−1, 1) and v2 = (1, 0). The
matrix A(0,−2) has eigenvalues λ1 = 3 and λ2 = 1, so (0, −2) is a source; corresponding
eigenvectors are v1 = (1, −1) and v2 = (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

y
3

x
-3 -2 -1 1 2 3

-1

-2

-3

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.
y

1.5

1.0

0.5

x
-1.5 -1.0 -0.5 0.5 1.0 1.5

-0.5

-1.0

-1.5

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) = −3x2 y so it is not possible to have a limit cycle that
is contained in any of the four (open) quadrants. If x = 0, ẋ = −2y 4 ≤ 0, if y = 0,
ẏ = x2 ≥ 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 first quadrant.

Exercise 6.15

y
2

x
-1.0 -0.5 0.5 1.0

-1

-2

Exercise 6.17

(a) H(x, y) = y 2 /2 − y 3 /3 + x2 /2, the critical points are (0, 0), which is a center; and (0, 1),
which is a saddle.
306 APPENDIX A. ANSWERS TO EXERCISES

y
3

x
-3 -2 -1 1 2 3

-1

-2

-3


(b) H(x, y) = x2 + y 2 + x2 y, the critical points are (0, 0), which is a center; and (± 2, −1),
which are saddles.

y
3

x
-3 -2 -1 1 2 3

-1

-2

-3

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 (±23/4 , 21/2 ),
which are sources.
307

y
3

x
-3 -2 -1 1 2 3

-1

-2

-3

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 → ∞.

y
4

x
2 4 6 8

(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 first 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 first species (P ) will approach an equilibrium
of P ∗ = 6.
308 APPENDIX A. ANSWERS TO EXERCISES

y
4

x
2 4 6 8

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.
y
4

x
1 2 3 4 5 6 7

(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 first species (P ) will become extinct.
y
8

x
1 2 3 4 5 6

Exercise 7.3
309

(a) D1 = 1 − (µ/2), D2 = 2, D3 = 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 first 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) D1 = 1 − 2µ, D2 = −4, D3 = (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 first 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 first 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

2 /4+P
(a) The implicit solution is P 2 Q2 = CeQ .

Q HpreyL
6

P HpredatorsL
2 4 6 8 10

2 /2
(c) The implicit solution is P 4 Q2 = Ce0.1Q+P ; appropriate contours are e.g. C =
1, 10, 50, 100.
310 APPENDIX A. ANSWERS TO EXERCISES

Q HpreyL
100

80

60

40

20

P HpredatorsL
1 2 3 4 5

Exercise 7.5

(a) (0, 20) is a saddle, (0.4, 4) is a spiral sink.


Q HpreyL

10

0 P HpredatorsL
0.2 0.4 0.6 0.8 1.0 1.2 1.4

(b) (0, 10) is a saddle, (4.11, 8.22) is a sink.


Q HpreyL

14

12

10

0 P HpredatorsL
2 4 6 8

Exercise 7.7

(a)
311

2 y
0

0 -5
y 8

-2
6

z 4
2
z
1 2

0 0

-2
0 0
2
x x
4 5
5
y
0

-5
15
20

15
10

z z
10

5
5
5
0
0
0
-5 -5
y
0
0 x
-5 5
x
5 10

(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) β/(s2 − β 2 ).
(c) (s − α)/((s − α)2 + β 2 ).
(e) (s2 − β 2 )/(s2 + β 2 )2 .
(g) ((s − a)2 − β 2 )/((s − a)2 + β 2 )2 .

Exercise 8.2

(a) y = (3/34)e3t − (3/34) cos(5t) + (5/34) sin(5t).


(c) y = (−(1/7)e−2t + (1/7)e(7/2)(t−1) )H(t − 1).
(e) y = (1/36)e−5t + (35/36)et − (5/6)tet .
(g) y = (2+2t−t2 −2 cos(t)−2 sin(t))(H(t)−H(t−1))+(3 cos(t−1)−2 cos(t)−2 sin(t))H(t−
1).

Exercise 8.3
312 APPENDIX A. ANSWERS TO EXERCISES

P∞
(a) y = (1/(2π 3 )) n=0 (π(x − 2n) + 2πn cos(πx) − sin(πx)) (H(x − 2n) − H(x − 2(n + 1))).
y

0.4

0.2

x
2 4 6 8 10

-0.2

P∞
(c) y = (sin(2πx)/(2π)) n=1 H(x − n).
y

1.0

0.5

x
2 4 6 8 10

-0.5

-1.0

Exercise 8.4

300

200

100

t
10 20 30 40 50

-100

Exercise 9.1

(a) y = x + 1.
(c) y = x + 1 + ex .
2 /2
(e) y = 2ex − 1.
(g) y = (ex + cos x + sin x)/2.
(i) y = −(1/16)e−2x + (1/16)e2x − (1/4)x.

Exercise 9.2

(a) y ≈ x + (1/2)x2 + (1/2)x3 + (1/8)x4 .


313

(c) y ≈ 1 − (1/2)x2 + (1/3)x3 + (1/8)x4 .


(e) y ≈ 1 + x + (1/6)x3 + (1/12)x4 .
(g) y ≈ 1 − (1/2)x2 − (1/24)x4 − (1/240)x6 .
(i) y ≈ 1 + x − x2 − (1/2)x4 .

Exercise 9.4
If ∆t = 0.1, yk = (−1)k .

y
1.0

0.5

t
0.2 0.4 0.6 0.8 1.0

-0.5

-1.0

If ∆t = 0.05, y0 = 1, and yk = 0 for k = 1, 2, . . ..

y
1.0

0.8

0.6

0.4

0.2

t
0.2 0.4 0.6 0.8 1.0

If ∆t = 0.02, y0 = 1, y1 = 0.6, y2 = 0.36, y3 = 0.216, . . ..

y
1.0

0.8

0.6

0.4

0.2

t
0.2 0.4 0.6 0.8 1.0

Exercise 9.7

(a) x1 = 0, x2 = 0.008 . . ., x3 = 0.0387 . . ., x4 = 0.1017 . . ..


(c) x1 = 0.8317 . . ., x2 = 0.6893 . . ., x3 = 0.5883 . . ., x4 = 0.5431 . . ..
314 APPENDIX A. ANSWERS TO EXERCISES

(e) x1 = −0.0079 . . ., x2 = −0.0396 . . ., x3 = −0.1092 . . ., x4 = −0.2269 . . ..


(g) x1 = 1.0770 . . ., x2 = 1.1625 . . ., x3 = 1.2573 . . ., x4 = 1.3622 . . ..
(i) x1 = 2.44, x2 = 2.96, x3 = 3.56, x4 = 4.24.
(k) x1 = 1.1818, x2 = 1.3781, x3 = 1.5638, x4 = 1.7233.

Exercise 9.8

(a) y = 1 + t.
(b) tcritical = −2/λ = −2/(−100) = 0.02.
(c) If ∆t = 0.1 and the initial condition is changed e.g. to x(0) = 0.99, then x1 = 1.19,
x2 = 0.39, x3 = 8.59, x4 = −64.21, x5 = 591.99.
(d) If ∆t = 0.1 and the initial condition is changed e.g. to x(0) = 0.99, then x1 = 1.0990 . . .,
x2 = 1.1999 . . ., x3 = 1.2999 . . ., x4 = 1.4000 . . ., x5 = 1.5000 . . ..

Exercise 10.1
2 2
(a) u(x, t) = (1/2)(e−(x+t) + e−(x−t) ).
u
1.0

0.8
t=0 0.6
t=1 0.4
t=2 0.2
t=3 x
-4 -2 2 4

(c) u(x, t) = (1/2)((x + 2t)2 /(1 + (x + 2t)2 ) + (x − 2t)2 /(1 + (x − 2t)2 )).
u
1.0

0.8

t=0 0.6

t=1 0.4

t=2 0.2

t=3 x
-5 5

(e) u(x, t) = t + (1/2)((x + 2t)2 /(1 + (x + 2t)2 ) + (x − 2t)2 /(1 + (x − 2t)2 )).
u
4

3
t=0
2
t=1

t=2 1

t=3 x
-5 5
315

Exercise 10.3

(a) b1 ≈ 0.63662, b2 ≈ −0.31831, b3 ≈ 0.21221, b4 ≈ −0.15916, b5 ≈ 0.12732.

y
1.0

0.8

0.6

0.4

0.2

x
0.2 0.4 0.6 0.8 1.0

(c) b1 ≈ 0.81057, b3 ≈ −0.09006, b5 ≈ 0.03242, b7 ≈ −0.01654, b9 ≈ 0.01001.

y
1.0

0.8

0.6

0.4

0.2

x
0.2 0.4 0.6 0.8 1.0

Exercise 10.4

(a) u(x, t) ≈ 0.81 sin(πx) cos(πt) − 0.09 sin(3πx) cos(3πt) + 0.03 sin(5πx) cos(5πt).

(c) u(x, t) ≈ 0.129 sin(πx) cos(2πt) − 0.004 sin(3πx) cos(6πt) + 0.001 sin(5πx) cos(10πt).
316 APPENDIX A. ANSWERS TO EXERCISES

Exercise 10.8

(a) c0 = 0.5, c1 ≈ −0.40529, c3 ≈ −0.04503, c5 ≈ −0.01621, c7 ≈ −0.00827.


y
1.0

0.8

0.6

0.4

0.2

x
0.2 0.4 0.6 0.8 1.0

(c) c0 = 0.5, c2 ≈ −0.40529, c6 ≈ −0.04503, c10 ≈ −0.01621, c14 ≈ −0.00827.


y
1.0

0.8

0.6

0.4

0.2

x
0.2 0.4 0.6 0.8 1.0

Exercise 10.9
2 2 2
(a) u(x, t) ≈ 0.81e−(1/5)π t sin(πx) − 0.09e−(9/5)π t sin(3πx) + 0.03e−5π t sin(5πx).
317

2 2
(c) u(x, t) ≈ 0.5 − 0.405e−(4/5)π t cos(2πt) − 0.045e−(36/5)π t cos(6πt).

Exercise 10.10

(b) V (x) = (1/2)mω 2 x2 + ω~/2.


p
(c) E(X) = 0, E(X 2 ) = ~/(2mω), σX = ~/(2mω).
p
(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 = (x1 , x2 , . . . , xn ) or as column vectors
 
x1
 x2 
x =  . .
 
 .. 
xn

We will mostly work with real n-dimensional vectors; we denote the set of these vectors by Rn .
The sum of two vectors is defined componentwise. Also, multiplication of a vector by a number
c is done componentwise. A vector v is called a linear combination of the vectors x1 , x2 , . . . , xk if
there exist numbers c1 , c2 , . . . , ck so that v = c1 x1 + c2 x2 + . . . + ck xk .
The dot product (or inner product) of two vectors x = (x1 , x2 , . . . , xn ) and y = (y1 , y2 , . . . , yn )
in Rn is defined as
x · y = x1 y1 + x2 y2 + . . . + xn yn .
We say that two vectors are orthogonal if x · y = 0. The length of the vector x is defined as

kxk = x · x.
An m × n matrix is an array of numbers with m rows and n columns. We represent such a
matrix as  
a1,1 a1,2 . . . a1,n
 a2,1 a2,2 . . . a2,n 
A= . ..  .
 
. ..
 . . . 
am,1 am,2 . . . am,n
Thus, ai,j is the entry in the ith row and jth column of the matrix. The ith row vector is

ai,. = (ai,1 , ai,2 , . . . , ai,n ) ∈ Rn .

The jth column vector is


a.,j = (a1,j , a2,j , . . . , am,j ) ∈ Rm .

319
320 APPENDIX B. LINEAR ALGEBRA PREREQUISITES

The product of the m × n 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:
 
a1,1 x1 + a1,2 x2 + . . . + a1,n xn
 a2,1 x1 + a2,2 x2 + . . . + a2,n xn 
Ax =  .
 
..
 . 
am,1 x1 + am,2 x2 + . . . + am,n xn

We may multiply a k ×m matrix A with an m×n matrix B to obtain the k ×n 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:
m
X
ci,j = ai,` b`,j .
`=1

Thus, we may identify a vector x ∈ Rn


with a n × 1 matrix.
The transpose of the m × n matrix A is the n × m matrix AT obtained by interchanging the
row and column indices:
ATi,j = Aj,i .
In particular, the transpose
 of the column vector x = (x1 , x2 , . . . , xn ) is the row vector xT =
x1 x2 . . . xn .
A system of m linear equations with the n unknowns x1 , x2 , . . . , xn is of the form

a1,1 x1 + a1,2 x2 + . . . + a1,n xn = b1 (B.1)


a2,1 x1 + a2,2 x2 + . . . + a2,n xn = b2
.. ..
. .
am,1 x1 + am,2 x2 + . . . + am,n xn = bm .

This may be written more concisely in matrix-vector form Ax = b.


The n × n matrix I with 1’s on the diagonal (Ii,i = 1) and 0’s 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.
Ai,j = 0 for i > j). An n × n matrix A is called lower triangular if the transpose AT is upper
triangular.

B.2 Linear Independence and Determinants


A set {a1 , a2 , . . . , an } of n vectors is called linearly independent if

c1 a1 + c2 a2 + . . . , cn an = 0 ⇒ c1 = c2 = . . . = cn = 0,

where 0 = (0, 0, . . . , 0) is the zero vector. In other words, if A is the matrix with a1 , a2 , . . . , an as
column vectors and c = (c1 , c2 , . . . , cn ), 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
{f1 (t), f2 (t), . . . , fn (t)} is linearly independent if

(∀t, c1 f1 (t) + c2 f2 (t) + . . . , cn fn (t) = 0) ⇒ c1 = c2 = . . . = cn = 0.

Let A be an n × n matrix (i.e. a square matrix). The determinant of A can be defined using
the combinatorial definition
X
det A = sgn(π)a1,π(1) a2,π(2) . . . an,π(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 b
A= .
c d
The permutations of the set {1, 2} are the identity (id : 1 7→ 1, 2 7→ 2) whose sign is (−1)0 = 1 and
(σ : 1 7→ 2, 2 7→ 1) which is a transposition of id and whose sign is (−1)1 = −1. Thus,
 
a b
det = (1)A1,1 A2,2 + (−1)A1,2 A2,1 = ad − bc.
c d

Example B.2.2. Let  


a b c
A =  d e f .
g h i
The permutations of the set {1, 2, 3} are:
• the identity (id : 1 7→ 1, 2 7→ 2, 3 7→ 3) whose sign is (−1)0 = 1,

• the transpositions (1 7→ 2, 2 7→ 1, 3 7→ 3), (1 7→ 3, 2 7→ 2, 3 7→ 1), and (1 7→ 1, 2 7→ 3, 3 7→ 2)


whose sign is (−1)1 = −1;

• and the cycles (1 7→ 2, 2 7→ 3, 3 7→ 1) and (1 7→ 3, 2 7→ 1, 3 7→ 2) whose sign is (−1)2 = 1.


Thus,
 
a b c
det  d e f  = (1)A1,1 A2,2 A3,3 + (−1)A1,2 A2,1 A3,3 + (−1)A1,3 A2,2 A3,1
g h i
+(−1)A1,1 A2,3 A3,2 + (1)A1,2 A2,3 A3,1 + (1)A1,3 A2,1 A3,2
= aei − bdi − ceg − af h + bf g + cdh
= a(ei − f h) − b(di − f g) + c(dh − eg)
     
e f d f d e
= a det − b det + c det ,
h i g i 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 λ 2 · · · λ 2 
 1 2 n .
 .. .. .. 
 . . . 
n−1 n−1 n−1
λ1 λ2 · · · λn
Q
is 1≤i<j≤n (λj − λi ). This can be seen from the combinatorial definition by noting that each term
in (B.2) will be a product of the distinct λi ’s raised to the powers 0, 1, 2, . . . , n − 1. 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 6= 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 finding the inverse:
 −1    d −b 
a b 1 d −b ad−bc ad−bc
= = −c a . (B.3)
c d ad − bc −c a ad−bc ad−bc

B.3 Eigenvalues and Eigenvectors


Let A be an n × n matrix. A complex number λ is an eigenvalue of A if there exists a vector v 6= 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
satisfies the characteristic equation
det (A − λI) = 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 (A − λI) = c(λ − λ1 )(λ − λ2 ) . . . (λ − λn )
(i.e. λ1 , λ2 , . . . , λn are the eigenvalues of A, enumerated with multiplicity), then:

• The leading coefficient c of the characteristic polynomial of A is (−1)n and the next
coefficient is (−1)n+1 tr(A), where tr(A) = a1,1 + a2,2 + . . . + an,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
m × m matrix AT A is invertible. The projection of Rn onto the subspace spanned by the column
vectors of A is given by the matrix
−1
P = A AT A AT . (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 ∈ Rn :

1. Px is in the subspace spanned by A.

2. P2 x = x; that is, P is a projection.

3. Let e = x − Px 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 kx − yk ≥ kx − Pxk, 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
−1
means that the system has no solution. However, x b = AT A Ab is a “best” solution
in the
sense that b
b = Abx = Pb is in the subspace spanned by A, and the least-squares error b − b is
b
minimal.
An application is given by least-squares linear regression. We illustrate this method by focusing
on simple linear regression; i.e. fitting a line yb = a1 + a2 x into data.
Let (x1 , y1 ), (x2 , y2 ), . . . , (xn , yn ) be given data. We seek a “best” solution (a1 , a2 ) to the linear
system

a 1 + a 2 x 1 = y1
a 1 + a 2 x 2 = y2
.. ..
. .
a 1 + a 2 x n = yn .

Rewriting this in matrix-vector form, we obtain Xa = y, where:


   
1 x1 y1
 1 x2  
 y2 
 
 a1

Xa =  . .  =  .  = y.

 .. ..  a2  .. 
1 xn yn

Now,  
a1 −1
a
b= = XT X XT y (B.6)
b
a2
b
is the “best estimator” for the parameters (a1 , a2 ) in the sense that it minimizes the sum of squares
of the residuals ei = yi − yb = yi − (b
a1 + b
a2 xi ). Elementary matrix operations show that b a1 and ba2
can be expressed by the usual formulas for the coefficients when using simple linear regression:

( x2 )( y) − ( x)( xy)
P P P P
a1 =
n( x2 ) − ( x)2
b P P
P P P
−( x)( y) + n( xy)
a2 = .
n( x2 ) − ( x)2
b P P
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. fx (a, b) = 0 and fy (a, b) =
0. Define the discriminant at (a, b) as

D = (fxx (a, b))(fyy (a, b)) − (fxy (a, b))2 .

• If D < 0, then f (x, y) has a saddle point at (a, b);

• if D > 0 and fxx (a, b) > 0, then f (x, y) has a strict local minimum at (a, b);

• if D > 0 and fxx (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 X
1. = 1 + x + x2 + x3 + . . . = xn , for |x| < 1
1−x
n=0


x2 x3 X xn
2. ex = 1 + x + + + ... = , for x ∈ R
2! 3! n!
n=0


x3 x5 x7 X x2n+1
3. sin x = x − + − + ... = (−1)n , for x ∈ R
3! 5! 7! (2n + 1)!
n=0


x2 x4 x6 X x2n
4. cos x = 1 − + − + ... = (−1)n , for x ∈ R
2! 4! 6! (2n)!
n=0


(x − 1)2 (x − 1)3 (x − 1)4 X (x − 1)n
5. log x = (x − 1) − + − + ... = (−1)n+1 , for 0 < x ≤ 2
2 3 4 n
n=1

325
326 APPENDIX C. RESULTS FROM CALCULUS


x3 x5 x7 X x2n+1
6. tan−1 x = x − + − + ... = (−1)n , for |x| ≤ 1
3 5 7 2n + 1
n=0
Bibliography

[1] J. Borresen, S. Lynch, Further Investigation of Hysteresis in Chua’s 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, Differential Equations, 4th Edition, Brooks/Cole (2012).

[4] M. Boelkins, M. Potter, J. Goldberg, Differential Equations with Linear Algebra, Oxford Uni-
versity Press (2009).

[5] S. Campbell, R. Haberman, Introduction to Differential Equations with Dynamical Systems,


Princeton University Press (2008).

[6] B. Cipra, Lorenz System Offers 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 Differential 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àtiques, 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. Griffiths, Introduction to Qunatum Mechanics, Prentice Hall (1995).

[13] M. Heath, Scientific 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, Differential 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, Birkhäuser (2007).

[19] R. McOwen, Partial Differential Equations, Prentice Hall (1996).

[20] E. Ott, Chaos in Dynamical Systems, Second Edition, Cambridge University Press (2002).

[21] R. Pérez, A Brief but Historic Article of Siegel, Notices of the AMS, 58(4) April 2011: 558-566.

[22] L. Perko, Differential Equations and Dynamical Systems, Springer-Verlag (1991).

[23] O.E. Rössler, 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, Differential 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

Coulombs’s Law, 107 general linear, 65


Kirchhoff ’s Voltage Law, 107 homogeneous, 18
linear first order, 19
accuracy linear homogeneous, 21, 65
of a numerical method, 248 second order linear, 65
of Euler’s Method, 250 separable, 15
Airy’s equation, 262 stiff, 256
allowed energies, 286 differential operator, 19, 70
asymptotically stable equilibrium point, 148 Dirac delta function, 231
DSolve, 41
Backward Euler Method, 253 Duffing equation, 209
beats, 104 Dulac’s Criteria, 176
Bendixson’s Criteria, 164
Bernoulli’s Equation, 45 eigenfrequency, 98
bifurcation, 37, 134 eigenfunctions, 98
pitchfork, 39 eigenspace, 119
saddle-node, 38 eigenvalue, 116
tangent, 38 eigenvector, 116
bifurcation diagram, 38, 134 electrical circuit
boundary value conditions, 270 RL circuit, 56
equilibrium point, 147
center eigenspace, 140 equilibrium point analysis, 28
chaotic attractor, 195 equilibrium solution, 27, 119
characteristic equation, 66, 116 escape velocity, 95
Chemical Law of Mass Action, 58 Euler equations, 91
chemical reactions, 58 Euler’s Method, 33, 245
connecting separatrix, 152 existence and uniqueness of solutions, 36,
continuous change of coordinates, 153 86
ContourPlot, 173 Expand, 88
critical point, 147 expected value
of a random variable, 283
d’Alembert’s formula, 268 exponential growth/decay, 52
decoupled system, 118
delta function, 231 Faraday’s Law, 57
differential equation forcing function, 78
autonomous first order, 27 Fourier cosine series, 291
exact, 23 Fourier sine series, 272, 274
first order, 13 fractal dimension, 197

329
330 INDEX

general solution, 87 method of undetermined coefficients, 22,


global error, 247 78
gradient system, 178 models
Green’s Theorem, 163 chemical reactions, 58
ground state, 286 Chua’s circuit, 207
competing species, 179
Hamiltonian function, 168, 284 convection, 199
harmonic oscillator, 98, 114 current surge, 63
Hartman’s theorem, 153 evaporation, 63
heat conductivity, 278 free fall with friction, 64
heat equation, 278 Holling-Tanner, 186
insulated endpoints, 291 Lotka-Volterra, 183
Heaviside function, 220 mass-spring, 96
Hermite polynomials, 262 mixing, 62
Hooke’s Law, 96 population, 51
Hopf bifurcation, 176 RL circuits, 56
hyperbolic equilibrium point, 151 RLC circuits, 107, 113
spread of information, 64
impulse forcing, 229
Moon and Holmes experiment, 209
indicial equation, 92
infinite square well, 285
natural logarithm
initial value problem
notation, 15
first order, 13
NDSolve, 42
integrating factor
Newton’s Law of Heating/Cooling, 62
for linear equations, 19
node, 29
to obtain an exact equation, 25
nullcline, 157
interaction orders, 183
Ohm’s Law, 56
kinetic energy, 169
Kirchhoff ’s Voltage Law, 57
partially decoupled system, 118
Laplace transform, 212 phase portrait, 29, 119
Laplace transforms Picard Iteration, 48
of selected functions, 215 PlotSlopeField, 42
Liénard equations, 176 Poincaré map, 192
limit cycle, 160 Poincaré section, 191
linearization method, 155 Poincaré-Bendixson Theorem, 166
linearized system, 149 polar coordinates
local error, 248 use in non-linear systems, 157
logistic equation, 28 population model
logistic growth, 52 logistic with harvesting, 55
Lorenz attractor, 199 United States, 53
Lorenz system, 199 potential energy, 114, 169
potential function, 23
mean power series, 239
of a random variable, 283 principle of superposition, 82
INDEX 331

Rössler system, 207 trigonometric polynomial, 272


radius of convergence, 239 TrigReduce, 88
reaction orders, 58
reduction of order, 92, 115 uncertainty principle, 288
Resonance, 106 unstable eigenspace, 137
response diagram, 103 unstable equilibrium point, 148
restoration of equilibrium, 95 unstable manifold, 152
restoring force, 95
van der Pol equation, 167
robustness, 185
variance
Runge-Kutta Method, 256
of a random variable, 287
saddle, 121 variation of parameters, 48, 93
Schrödinger’s wave equation, 281
wave equation, 266
time-independent, 281
Wronskian determinant, 87
semi-stable limit cycle, 160
sensitive dependence on initial conditions,
195
separation of variables
for the heat equation, 279
for the Schrödinger wave equation, 285
for the wave equation, 270
separatrix, 152
shifting theorem, 214
sink, 29, 121
slope field, 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
stiff system, 173
stiffness, 256
structural stability, 185

Tacoma Narrows Bridge, 106


terminal velocity, 64
trace-determinant plane, 133
tractrix, 14
Trapezoid Method, 255
traveling wave, 266

S-ar putea să vă placă și