Vous êtes sur la page 1sur 153

Honours Ordinary Differential Equations

MATH-325 Course Notes


McGill University, Montreal
by
A.R. Humphries

Draft version
November 20, 2014

c Copyright

These notes and all other instructor generated course materials (e.g., assignments, summaries, exam questions, etc.) are protected by law and
may not be copied or distributed in any form or in any medium without
explicit permission of the instructor. Note that infringements of copyright
can be subject to follow up by the University under the Code of Student
Conduct and Disciplinary Procedures.

Preface
I am developing these notes through my experience teaching MATH-325 Honours Ordinary Differential
Equations at McGill, and as a resource for that course. This course is a first course in Ordinary Differential
Equations for Honours students in mathematics and several other honours programs with a mathematics
component. The formal prerequisites for the course are very limited being MATH-222 Intermediate Calculus
and MATH-133 Linear Algebra and Geometry. There are many good textbooks which cover Ordinary
Differential Equations for Engineers, Mathematics and Physics majors students with such a background.
Those books largely teach the material from a methods perspective and often omit proofs of any results
that require more mathematics than the course prerequisites, which I find to be an unsatisfactory approach
for an honours class. In short although the students taking MATH-325 cannot be assumed to know specific
material beyond MATH-133 and MATH-222, they are honours students taking a mathematics class, and
one can assume an appropriate level of mathematical sophistication. Essentially I take that as a license to
introduce any mathematical concepts required in the exposition.
Although these notes owe their existence to perceived shortcomings in the available textbooks, it is likely
that early drafts of the notes will be riddled with errors, omissions, inconsistencies and cloudy explanations.
I apologise for that, and hope these notes are still of some use. If you bring any shortcomings to my attention
I will try to remedy them.
I am very grateful to all the previous McGill students who have contributed to the creation of these notes,
but particularly to Martin Houde, Howard Huang and Wendy Liu.

Contents
1 Introduction
1.1 Differential Equations . . . . . . . . . .
1.1.1 Applications . . . . . . . . . . .
1.1.2 Examples . . . . . . . . . . . . .
1.2 Definitions and Notation . . . . . . . . .
1.2.1 Solutions . . . . . . . . . . . . .
1.2.2 N th order ODEs and First Order

. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
Systems

. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
of ODEs

2 First Order ODEs


2.1 First order linear ODEs . . . . . . . . . . . . . . .
2.1.1 Initial Value Problems . . . . . . . . . . . .
2.1.2 Variation of Parameters . . . . . . . . . . .
2.2 Nonlinear First Order ODEs . . . . . . . . . . . .
2.2.1 Separable Equations . . . . . . . . . . . . .
2.2.2 Exact Equations . . . . . . . . . . . . . . .
2.2.3 Solution by Substitution . . . . . . . . . . .
2.2.4 Initial Value Problems . . . . . . . . . . . .
2.2.5 Summary for Solving First Order ODEs . .
2.3 Existence and Uniqueness for Linear and Nonlinear
2.3.1 Linear First Order ODEs . . . . . . . . . .
2.3.2 Nonlinear Scalar First Order ODEs . . . . .
2.3.3 Direction Fields and Integral Curves . . . .

.
.
.
.
.
.

.
.
.
.
.
.

. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
First Order
. . . . . . .
. . . . . . .
. . . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

7
7
7
7
10
13
14

. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
ODEs
. . . .
. . . .
. . . .

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

15
15
19
21
21
21
23
30
35
36
37
37
38
49

. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
Order ODE
. . . . . . .
. . . . . . .
. . . . . . .

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

51
51
51
52
53
53
56
60
61
62
68

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

73
73
74
76
84
89

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

3 Second Order ODEs and IVPs


3.1 Nonlinear Second Order ODEs . . . . . . . . . . . . . . . . . . . . . .
3.1.1 f does not depend on the dependent variable . . . . . . . . . .
3.1.2 f does not depend on the independent variable . . . . . . . . .
3.2 Linear Homogeneous Second Order ODEs . . . . . . . . . . . . . . . .
3.2.1 Variable Coefficient Linear Homogeneous Second Order ODEs
3.2.2 Constant Coefficient Linear Homogeneous Second Order ODEs
3.2.3 Summary for Homogeneous Linear Constant Coefficient Second
3.3 Linear Second order nonhomogeneous ODEs . . . . . . . . . . . . . . .
3.3.1 The Method of Undetermined Coefficients . . . . . . . . . . . .
3.3.2 Variation of Parameters . . . . . . . . . . . . . . . . . . . . . .
4 nth
4.1
4.2
4.3
4.4

Order ODEs
Nonlinear nth order ODEs . . . . . . . . .
Linear nth order ODEs . . . . . . . . . . .
Linear Homogeneous nth order ODEs . .
Nonhomogeneous nth order Linear ODEs
4.4.1 The Fundamental Set of solutions

.
.
.
.
.

.
.
.
.
.
5

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

CONTENTS
4.4.2

Nonconstant Coefficient Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5 Series Solutions
5.1 Review of Power Series . . . . . . . . . . . .
5.2 Series Solutions Near Ordinary Points . . .
5.2.1 Analytic Coefficients . . . . . . . . .
5.3 Nonhomogeneous Series Solutions . . . . . .
5.4 Regular Singular Points . . . . . . . . . . .
5.4.1 Euler Equations . . . . . . . . . . .
5.4.2 Frobenius Method . . . . . . . . . .
5.4.3 Complex Roots of Indicial Equation
6 Laplace Transforms
6.1 Introduction . . . . . . . . .
6.2 Solving Constant Coefficient
6.3 Discontinuous Functions . .
6.3.1 Dirac Delta Function
6.4 Convolutions . . . . . . . .

90

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

93
93
97
101
103
106
107
109
123

. . . . . . . . . . . . .
Differential Equations
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

125
125
130
135
138
142

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

7 Linear Systems of ODEs

149

8 Extra Chapters

151

Chapter 1

Introduction
1.1

Differential Equations

Differential equations are equations containing derivatives. They are ubiquitous in the numerate disciplines
where mathematical models are used to describe processes which evolve in continuous time. Rates of change
and velocities are described by first derivatives, while acceleration is the second derivative of position.
Differential equations date to the dawn of calculus, and come in many variants. In this course we will
consider ordinary differential equations (ODEs), which are characterised by having one independent variable
(which will often be time t or a scalar position x). When there is more than one independent variable (eg time
and position, or a vector-valued position (x, y, z)), the differential equation will involve partial derivatives,
and not surprisingly such equations are called partial differential equations (PDEs). It is not sensible to
consider PDEs until one has mastered ODEs, and indeed this course is a prerequisite for the MATH-375 PDEs
course. Other types of differential equation include stochastic differential equations (which describe processes
with a noisy or random element), delay differential equations (where the evolution depends on past values of
the solution), and fractional differential equations which include fractional derivatives. Combinations of these
elements are also interesting. Differential equations remain a very fertile research field, with for example
Martin Hairer winning a Fields Medal in 2014 for his work on stochastic partial differential equations.
Discrete time processes can be described by difference equations, a not-so-distant cousin of differential
equations. At some time in the future I would like to add a chapter on difference equations to these notes.

1.1.1

Applications

.....
[include derivation of pendulum equation]
[also beam equation]
.....

1.1.2

Examples

Lets begin with some rather trivial examples of ODEs.


Example 1.1.1
dy
= 4x. To solve this simply integrate both sides with respect to x to obtain the solution: y = 2x2 +C.
dx
Do not forget the constant of integration.

CHAPTER 1. INTRODUCTION
Example 1.1.2
d2 y
= 0. Integrating twice, the solution is: y = C1 x + C2 .
dx2

Notice that in Example 1.1.1 there is one derivative in the ODE and one arbitrary constant in the solution,
while Example 1.1.2 has a second derivative in the ODE and two arbitrary constants in the solution. Not all
the examples that we consider will be as trivial as these two, but even on examples that we cannot solve by
direct integration, solving the ODE will be akin to integration and we will expect to have the same number
of constants in the solution as in the differential equation.
Example 1.1.3
dy
= y. This is not quite so easy as the previous examples. It does not work to integrate both sides
dx
R
with respect to x since that would give y(x) = y(x)dx. But the solution y must be a function which is
equal to its derivative. From elementary calculus y = ex is such a function. But where is the constant?
Differentiating y = ex + C gives y 0 = ex 6= ex + C = y so adding a constant does not work. Instead the
solution is y = ex+C , or y = kex where k is some constant. The second form is more general, since as
well as including all the cases where k = eC , it also includes the solution y = 0 (with k = 0). Where
the constants appear in the solution is one of the questions we will need to tackle.
ODEs with constraints
Often, we will solve ODEs subject to constraints. Of these types of problems, we will focus on initial value
problems, in which we are given y 0 , as well as the value of as many derivatives as needed at some point t0
(so y(t0 ), possibly, y 0 (t0 ), and maybe y 00 (t0 ), etc).
In Example 1.1.3, with y = ket , we only need the value of y(t0 ) to be able to solve it, since there is
only one constant. In Example 1.1.2, however, there are two constants so we would need two constraints
to specify a unique solution. One possibility would be to specify y(t0 ) and y 0 (t0 ). This would be an initial
value problem (IVP) and t0 would be the initial point. Another possibility would be to specify y(t0 ) and
y(t1 ). problems where constraints are specified at different values of the independent variable are called
boundary value problems (BVPs). Many classical BVPs are second order ODEs for which the solution y(t)
is of interest between the two boundary values
dn y
In general, if the ODE has a derivative of degree n (i.e., n ), we would need n constraints to specify a
dt
unique solution. So for an initial value problem we must specify y(t0 ), y 0 (t0 ), y 00 (t0 ), . . . , y (n1) (t0 ) to get a
unique solution.
Notation for Derivatives
dy
or dy
We will usually use y 0 instead of dx
dt , where the dash indicates differentiation with respect to the
independent variable. We will also use y instead of dy
dt , where t is time (this was Newtons notation). Less
frequently, well use Dy (Leibnizs notation), which will be useful when developing general theory.

A detailed example
Let us consider an ODE initial value problem first tackled by Isaac Newton in 1671, and demonstrate
Newtons solution technique. We will also show that it is easier to find the solution using a Taylor series.
However, even Taylor series are not the most efficient way of solving this problem as we will see later.

1.1. DIFFERENTIAL EQUATIONS

Example 1.1.4 : Newtons ODE (1671)


Here is a very early example of an ODE that Isaac Newton first considered in 1671 [1]. In Newtons
notation he considered
y
= 1 3x + y + xx + xy.
x
Its interesting to see that the dot notation for derivatives predates the x2 notation for xx, even if Newton
uses the dot notation a little differently than we would today. Translated into modern notation we write
Newtons problem as
y 0 = (1 + x)y + 1 3x + x2 ,
(1.1)
or equivalently
y 0 (1 + x)y = 1 3x + x2 .
This is a specific example of the general class of problems y 0 + p(x)y = g(x), which we will consider in
Section 2.1.
Let us look at how Newton solved this. His method will seem rather clunky compared to how we
might approach this today, but then again, his technique was state-of-the-art at the time and in any
case it is quite instructive. Newton considered (1.1) as an initial value problem (IVP) with the initial
data
y(0) = 0.
(1.2)
Newton solved (1.1)-(1.2) by building up the solutions as a series, term by term. First since y(0) = 0
he wrote y(x) = 0 + . . .. Substituting this into (1.1) Newton obtains
y 0 = (1 + x)(0 + . . .) + 1 3x + x2 = 1 + . . . ,
where he ignores of degree higher than zero. Integrating this gives y = 0 + x + . . . = x + . . ..
We continue in the same fashion to improve the approximation. Now,
y 0 (1 + x)(x + . . .) + 1 3x + x2 = (x + . . .) + 1 3x + x2 = 1 2x + . . . ,
and so integrating y = x x2 + . . .. Then
y 0 = (1 + x)(x x2 + . . .) + (1 3x + x2 ) = 1 2x + x2 + . . . ,
so y = x x2 + 31 x3 + . . .. Newton continued to obtain
1
1
1
1
y = x x2 + x3 x4 + x5 x7 + . . .
3
6
30
45

(1.3)

So this technique reduces the solving of the ODE to a simple algorithm, but one that requires infinitely
many integrations of polynomials.
Its possible to find a series solution to (1.1)-(1.2) without doing any integrations at all by using
slightly more modern techniques, namely the Taylor series, which Brook Taylor first published in 1715.
For now, we will ignore the issue of whether or not the series converges, and write
y(x) =

X
1 (n)
y (x0 )(x x0 )n ,
n!
n=0

where y (n) is the nth derivative. Since y(0) = 0, we set x0 = 0, then


y(x) =

X
1 (n)
y (0)xn .
n!
n=1

10

CHAPTER 1. INTRODUCTION

But evaluating (1.1) with x = 0 we obtain y 0 (0) = (1 + 0)0 + 1 3(0) + (0)2 = 1. Its possible to find
y 00 (0) by differentiating (1.1) to obtain y 00 = y + (1 + x)y 0 3 + 2x, and so
y 00 (0) = y(0) + (1 + 0)y 0 (0) 3 + 2(0) = 0 + (1)1 3 = 2.
Likewise for the third derivative: y 000 (x) = 2y 0 + (1 + x)y 00 + 2, so
y 000 (0) = 2y 0 (0) + (1 + 0)y 00 (0) + 2 = 2(1) + (1)(2) + 2 = 2.
Then, if we substitute these into the summation, we get:

X
X
1
1
1
1 (n)
1 (n)
y(x) = y(0) + y 0 (0)x + y 00 (0)x2 + y 000 (0)x3 +
y (0)xn = 1 x2 + x3 +
y (0)xn ,
2
6
n!
3
n!
n=4
n=4

which agrees with (1.3) up to the terms that we computed. And we didnt even have to integrate
anything! In principle we could continue the Taylor series computations above to compute as many
terms as we wish. We see that y (4) (x) = 3y 00 + (1 + x)y 000 and y (n) (x) = (n 1)y (n2) + (1 + x)y (n1)
and y (n) (0) = (n 1)y (n2) (0) + y (n1) (0) for n > 4. Hence y (4) (0) = 3y 00 (0) + y 000 (0) = 3(2) + 2 = 4,
y (5) (0) = 4y (3) (0) + y (4) (0) = 4(2) 4 = 4 etc.
Its interesting and useful to note we need y(x) continuous to ensure that y is differentiable. But then
the right-hand side of (1.1) is continuous and differentiable so y 0 (the left-hand side of (1.1)) is also
continuous and differentiable. Then repeatedly differentiating (1.1), as we did above, we see that the
solution y(x) will be infinitely differentiable. To show that y(x) is analytic, it would remain only to
show that the Taylor series is absolutely convergent. We will consider the convergence of series solutions
of ODEs in the chapter on series solutions.

1.2

Definitions and Notation

We consider ODEs which can be written in the form


y (n) = f (t, y 0 , y 00 , . . . , y (n1) )

(1.4)

Here, the solution y(t) is a function of t, the independent variable which by convention is usually the first
argument of f . Since the ODE has n derivatives, we call it an nth order ODE.
Sometimes, we will consider implicit ODEs of the form
F (t, y, y 0 , . . . , y (n) ) = 0.

(1.5)

Every ODE of the form (1.4) can be written in the form (1.5) by simply letting F (t, y, y 0 , . . . , y (n) ) =
y (n) f (t, y 0 , y 00 , . . . , y (n1) ), but it is not generally possible to rewrite equations of the form (1.5) in the
form (1.4).
Example 1.2.1
0 = F (t, y, y 0 ) = (y 0 )2 + 3y 0 4y
In general it would be hard/impossible to rewrite such equations as y 0 = f (x, y). In the case of example,
using the quadratic formula, we could write:

3 9 + 16y
y0 =
2
But formulation is problematical since we dont know which sign to take for the root. If we cannot
trivially write as y (n) = f (t, y, . . . , y (n1) ), its better to leave the equation in its original form.

1.2. DEFINITIONS AND NOTATION

11

Definition 1.2.2 Autonomous and Non-Autonomous ODEs


If we can write (1.4) as
y (n) = f (y, y 0 , y 00 , . . . , y (n1) )
where f does not depend explicitly on the independent variable t, then the ODE is said to be autonomous. Otherwise, it is non-autonomous.

Example 1.2.3 Nonlinear Pendulum


+ 2 sin = 0,

(1.6)

is autonomous the independent variable t does not appear explicitly.

Example 1.2.4 Dampened, forced nonlinear pendulum


The dampened, forced nonlinear pendulum
+ k 2 + 2 sin = A sin(t)
is non-autonomous. The independent variable t appears explicitly in the forcing term A sin(t). The
damping comes from the k 2 and corresponds to friction and/or air resistance proportional to the
velocity. Writing k 2 instead of k for the constant is just a convenient way of specifying that the
constant must always be non-negative (as negative friction would not make sense).
Next we define linear and nonlinear ODEs. The distinction between linear and nonlinear ODEs is at the
heart of the theory of ODEs. However Definition 1.2.5, which can be found in many textbooks is not very
revealing. See the discussion after Definition 1.2.8 for a first explanation of what is going on.
Definition 1.2.5 Linear and Nonlinear ODEs
If we can write the ODE (1.4) as
an (t)y (n) (t) + an1 y (n1) + + a1 (t)y 0 (t) + a0 (t)y(t) = g(t)
or more compactly
n
X

aj (t)y (j) (t) = g(t)

(1.7)

j=0

where the ai (t) and g(t) are given/known functions of the independent variable, then the ODE is said
to be linear. Otherwise, it is nonlinear.

12

CHAPTER 1. INTRODUCTION
Example 1.2.6 Linear Pendulum
The ODE
+ 2 = 0,

(1.8)

is linear with a2 = 1, a1 = 0, a0 = , and g(t) 0. This equation approximates the nonlinear


pendulum (1.6) by replacing the sin() by . This approximation is often called the small angle
approximation since it is most accurate for || small because lim0 sin()/ = 1.

Example 1.2.7
The nonlinear pendulum (1.6) is nonlinear because it contains a nontrivial function of , namely sin().
Likewise any ODE of the form (1.4) that contains a non-trivial function for any derivative of y or y
itself is nonlinear. For example y 0 = y 2 and y 00 = yy 0 are both nonlinear.

Definition 1.2.8 Homogeneous Linear ODEs


A linear ODE (4.3) is said to be homogeneous if g(t) 0, so
n
X

aj (t)y (j) (t) = 0.

(1.9)

j=0

If g(t) is a non-trivial (that is non-zero) function, then the ODE (4.3) is said to be non-homogeneous.

We will see later if y1 (t) and y2 (t) are both solutions of a linear homogeneous ODE (1.9) then

y(t) = c1 y1 (t) + c2 y2 (t),

is also a solution, for any values of the constants c1 and c2 . That is, linear combinations of solutions of a
linear ODE are also solutions of the ODE; this is the sense in which the ODE is linear. It will follow that
the set of solutions of a linear ODE forms a vector space. Since we expect the solution an n-th order ODE
to contain n constants, the general solution of (1.9) ought to be

y(t) =

n
X

ci yi (t),

i=1

where yi (t) for i = 1, . . . , n are n linearly independent solutions of (1.9) which form a basis for the ndimensional vector space of the solutions of (1.9). But that is a topic for a later chapter.
Definition 1.2.9 Constant coefficient Linear ODEs
A linear ODE (4.3) is said to be constant coefficient if each function aj (x) is actually a constant, i.e.
aj (x) = aj .

We will see later that homogeneous constant coefficient linear ODEs are the easiest ODEs to solve. Indeed,
these are one of the few classes of ODEs for which we can always write down explicit solutions.

1.2. DEFINITIONS AND NOTATION

13

Note
Definitions 1.2.8 and 1.2.9 only apply to linear ODEs. It does not make sense to use the terms
constant coefficient or homogeneous in talking about a general nonlinear ODE (1.4). On the other
hand Definition 1.2.2 applies equally well to linear and nonlinear ODEs.

Example 1.2.10
i) + 2 = 0 is linear, homogeneous, autonomous, and constant-coefficient
ii) + w2 = A sin(t) is linear, non-homogeneous, non-autonomous, and constant-coefficient
iii) y 00 = 1 is linear, non-homogeneous, autonomous, and constant-coefficient
iv) x2 y 00 + 2xy 0 + y = sin x is linear, non-homogeneous, variable-coefficient (as opposed to constantcoefficient). This is an example of an Euler equation.
Linear constant coefficient homogeneous ODEs are important because complete solution construction
techniques exist. We will also see how to solve non-homogeneous constant coefficient linear ODEs. There
are techniques to solve non-constant coefficient ODEs and a complete theory for existence/uniqueness of
solutions, but often we cannot write down closed form solutions, and we will solve such equations later using
series solutions. For non-linear equations, it is possible to solve many first order equations (y 0 = f (t, y)),
but it is not in general possible to solve higher order ODEs with closed form expressions, except in some
special cases. Such equations can exhibit very complicated solutions including chaotic solutions. Chaos will
be beyond the scope of this course, but chaotic differential equations and chaotic difference equations are
the subject of MATH-376.

1.2.1

Solutions

Assuming that f is a continuous function of its arguments, then for y(t) to be a solution to (1.4) we need y to
be n times differentiable. Thus y(t), y 0 (t), . . . , y (n1) (t) will be continuous, as will be f (t, y, y 0 , , y (n1) )
and hence y (n) (t). This leads us to
Definition 1.2.11
The function y(t) : I R is a solution of the ODE (1.4) (or (4.3)) if it is n times continuously
differentiable on the interval I R, and satisfies the ODE on this interval.

In Definition 1.2.11 the interval I could be an open interval I = (a, b) or closed interval I = [a, b], or even
half open. Later, especially when we consider Laplace transforms, we will consider examples where f has
discontinuities, which will cause y (n) or lower derivatives to have discontinuities. We will need to generalise
our concept of solution in that case.
We already saw last time that solutions of ODEs are not generally unique, unless we impose constraints.
If we want to impose constraints on the ODE (1.4) to ensure that the solution is unique on the interval I
containing the point t0 then the uniqueness of the solution implies that y (n) (t0 ) is uniquely determined. But
from (1.4)
y (n) (t0 ) = f (t0 , y(t0 ), y 0 (t0 ), , y (n1) (t0 )),
so for y (n) (t0 ) to be uniquely determined by the ODE which should specify the values of y(t0 ), y 0 (t0 ), , y (n1) (t0 ).
These will turn out to necessary and sufficient conditions for the ODE to have a unique solution on an interval containing t0 , provided the ODE is well-behaved at t0 (in ways we will make precise later). This leads

14

CHAPTER 1. INTRODUCTION

us to define initial value problems.


Definition 1.2.12
An initial value problem (IVP) for the ODE (1.4) or (4.3) is the problem of finding a solution y(t)
defined on an interval I containing t0 , such that y(t0 ) = 1 , y 0 (t0 ) = 2 , . . . , y 0 (t0 ) = n for given
values of i R for i = 1, . . . , n.

If we do not impose any constraints at all we will expect to have n constants in the most general solution.
Indeed for linear ODEs we will refer to such solutions as the general solution.

1.2.2

N th order ODEs and First Order Systems of ODEs

It is possible to rewrite an nth order scalar ODE as a system of first order ODEs. This can be very useful,
and in both dynamical systems theory and numerical analysis it is usual to study systems of first order
ODEs.
Example 1.2.13
Given y (n) = f (t, y, , y (n1) ) Let u1 = y, u2 = y 0 , , un = y (n) then
u01 = y 0 = u2
u02 = u3
..
.
u0n1 = un
u0n = y (n) = f (t, u1 , u2 , , un )
This gives a system of n scalar equations. If we let u(t) = [u1 (t), u2 (t), , un (t)]T we can write this as
a vector-valued ODE as

u2 (t)
u 1 (t)

u 2 (t)
u3 (t)

.
.
..
..
u(t)

=
= F (t, u(t)).
=

u n1 (t)
un (t)
f (t, u1 (t), u2 (t), , un (t))
u n (t)
Although all nth order ODEs can be written as a system of n first order ODEs, the converse is not true,
so we will later study solution techniques for systems of first order ODEs.
Example 1.2.14
To rewrite the nonlinear pendulum equation + 2 sin = A sin t as a systems of first order ODEs let
u1 = and u2 = then
u 1 = = u2
u 2 = = A sin t 2 sin u1 .

Chapter 2

First Order ODEs


In this chapter we will consider first order scalar nonlinear ODEs of the form
y 0 = f (t, y)

(2.1)

a0 (t)y(t) + a1 (t)y 0 (t) = g(t).

(2.2)

and first order scalar linear ODEs of the form

First we will develop solution techniques to solve different classes of linear and nonlinear first order ODEs.
Along the way this will reveal some of the issues and subtleties in the existence and uniqueness theory for
first order ODEs. Later in the chapter, after we have developed techniques to solve some problems, we will
tackle the existence and uniqueness theory for (2.1).

2.1

First order linear ODEs

First we consider homogeneous linear first order ODEs of the form


y 0 (t) + p(t)y(t) = 0
or more compactly
y 0 + p(t)y = 0.

(2.3)

This is of the form (2.2) with


p(t) =

a0 (t)
,
a1 (t)

and

g(t) = 0.

We will assume that p(t) is continuous, although from the proof of Lemma 2.1.1 it is clear that p(t) integrable is sufficient to ensure the existence of solutions. The following lemma gives the solution of the
homogeneous linear first order ODE (2.2). We will need this lemma afterwards only to derive the solution
of the homogeneous linear first order ODE, so there is no need to memorise (2.4).
Lemma 2.1.1
Let p(t) be continuous on the interval I = (a, b) R, then the general solution to (2.3) for t I is
y(t) = ke
where k is an arbitrary constant.

15

p(t)dt

(2.4)

16

CHAPTER 2. FIRST ORDER ODES


Proof
Assume y(t) 6= 0 for all t I and rewrite the ODE (2.3) as
y0
= p(t).
y
Now integrate both sides with respect to t, not forgetting the constant of integration, hence
Z
Z
Z 0
R
y
dt = p(t)dt
=
ln |y| = p(t)dt + c
=
|y| = ec e p(t)dt
y
y = ec e

p(t)dt

Now let k = ec , then y(t) is defined by (2.4) for any k 6= 0 (since ec 6= 0). Note that the solution
satisfies the assumption that y(t) 6= 0 for t I.
It remains to consider the case where y(t) = 0 for some t. But if y(t) = 0 it follows immediately from
(2.3) that y 0 (t) = 0, and by inspection we see that y(t) = 0 for all t I solves (2.3) in this case. But
this solution corresponds to (2.4) with k = 0. Hence y(t) defined by (2.4) solves (2.3) for any k R as
required.

If you have any doubts about the proof above, or indeed of any solution that you derive to an ODE, it is
very easy to verify whether a given function is a solution or not be differentiating it. For example, letting
y(t) be given by (2.4) and differentiating (2.4) we see that
y 0 (t) = kp(t)e

p(t)dt

= p(t)y(t),

so (2.4) indeed solves (2.3).


Next week consider the non-homogeneous ODE
y 0 + p(t)y = g(t).

(2.5)

The next theorem is the main result of this section.


Theorem 2.1.2
Let p(t) and g(t) be continuous on the interval I = (a, b) R, then the general solution to (2.5) for
t I is
Z
1
k
y(t) =
(t)g(t)dt +
(2.6)
(t)
(t)
where k is an arbitrary constant and and , called the integrating factor, is defined by
(t) = e

p(t)dt

(2.7)

Note
It is very important to remember the formula (2.7) correctly. However, I do not recommend memorising
the formula (2.6). I have seen too many meaningless purported solutions to (2.5) resulting from misremembered or misquoted versions of (2.6). It is much better to remember (2.7) and how to apply it
to derive solutions. We will see several examples, but lets prove the theorem first.

2.1. FIRST ORDER LINEAR ODES

17

Proof
We first multiply the ODE by (t) for some general function (t), obtaining
(t)y 0 + (t)p(t)y = (t)g(t).

(2.8)

This is not a very useful step unless (t) is chosen carefully so that the equation has a special form. We
choose mu to satisfy the equation
0 = p(t)
(2.9)
so that (2.8) can be rewritten as
y 0 + mu0 y = (t)g(t),

(2.10)

which reveals our reason for choosing to satisfy (2.9), since now
d
[y] = y 0 + mu0 y = (t)g(t),
dt
thus

Z
(t)g(t)dt + k,

y =

and (2.6) follows on dividing by . It remains only to show that there exists a functionR which satisfies
(2.9). But writing (2.9) as 0 p(t) = 0, it follows from Lemma 2.1.1 that = ke p(t)dt . Choosing
k = 1 equation (2.7) follows and the proof is complete.


Algorithm for solving linear first order ODEs


1. Write as y 0 + p(t)y = g(t)
2. Compute (t) = e
3. Solve

d
dt [y]

p(t)dt

= g.

Note: The most common errors in applying this algorithm are omitting the minus sign if p(t) is
negative, forgetting to multiply the right-hand side by , or applying the algorithm to an ODE that
cannot be written as (2.5).

We can also use this algorithm to solve homogeneous linear first order ODEs, so there is no need to
remember Lemma 2.1.1.
Example 2.1.3
To find the general solution of y 0 = 2y, write it as
y 0 2y = 0,

(2.11)

so p(t) = 2 and g(t) = 0. Then


=e

p(t)dt

=e

2dt

= e2t .

Notice that we do not include a constant of integration when computing . This is because when is
derived in the proof of Theorem 2.1.2 it is required to be just a solution of (2.9). Since any solution

18

CHAPTER 2. FIRST ORDER ODES

will do, we take the solution without the constant. Now


d
d
[y] = [e2t y] = e2t y 0 2e2t y = e2t [y 0 2y] = 0.
dt
dt
So

d 2t
y]
dt [e

= 0. Integrating both sides gives


e2t y = c,

where this time we need a constant of integration because we are seeking the general solution of (2.11).
Finally, multiplying by e2t we have
y = ce2t ,
which is the same answer as we would have obtained using Lemma 2.1.1.

Example 2.1.4
To find all solutions of
ty 0 + 3y t2 = 0,

(2.12)

divide by t and rewrite the equation in standard form as


3
y 0 + y = t,
t
so p(t) = 3/t and g(t) = t. Then the integrating factor is given by
=e

p(t)dt

=e

3
t dt

= e3 ln(t) = eln t = t3 .

Note, that as in the previous example, we took shortcuts in computing as we only need one solution
to (2.9). To see how this works, suppose we wanted to find all that satisfy (2.9), then we would have
=e

3
t dt

= e3 ln |t|+c = ec eln |t| = ec |t|3 = ec t3 = kt3 ,

and we choose the constant k = ec = 1 for simplicity to get = t3 . Thus when finding , basically
this means that we do not have to worry about
1. the constant of integration, and,
2. the absolute value bars (the constant is chosen to make them disappear).
Now, multiplying by the ODE becomes
t3 y 0 + 3t2 y = t4 , =
thus

1
y(t) = 3
t

d 3
1
[t y] = t4 = t3 y = t5 + c,
dt
5
1 5
t +c
5


=

1 2
t + ct3 .
5

(2.13)

As ever, if you do not believe me substitute the solution into the ODE to check that it is indeed a
solution.
Notice that while the solution in Example 2.1.3 is continuous for all t R, the solution in Example 2.1.4
defined by (2.13) has a discontinuity at t = 0. This does not contradict Theorem 2.1.2 since in Example 2.1.4
we have p(t) = 3/t which is discontinuous at t = 0.

2.1. FIRST ORDER LINEAR ODES

19

Next we consider Newtons example which was first considered in Example 1.1.4.
Example 2.1.5 : Newtons Example
Recall Newtons ODE y 0 = 1 3x + y + x2 + xy from Example 1.1.4. This time we will try to find all
the solutions, rather than solving the initial value problem as Newton did. First write the ODE in the
standard form (2.5) as
y 0 (1 + x)y = 1 3x + x2 ,
so p(x) = (1 + x) and g(x) = 1 3x + x2 . Then
Z
Z
(x) = exp( p(x) dx) = exp( (1 + x)) dx = exp((x + x2 /2)).
So we can write

2
d
[y] = g = (1 3x + x2 )e(x+x /2)
dx
If we integrate both sides with respect to x, we get
Z
2
y = C + (1 3x + x2 )e(x+x /2) dx

and dividing both sides by gives


2

y(x) = cex+x

/2

+ ex+x

/2

(1 3x + x2 )e(x+x

/2)

dx.

This integral does not have a nice closed form solution in terms of elementary functions. In this case,
it is okay to give an answer with the integral not evaluated. To evaluate solutions in such cases the
integral is often approximated numerically.
Remark: It is possible to simplify
the above answer somewhat, and I did see someone solve it using
Rx
2
the error function erf(x) = 2 0 et dt. I will add the details when I have time (in some future year).

2.1.1

Initial Value Problems

We wish to solve (2.5) as an Initial Value Problem (IVP). That is we want to solve
y 0 + p(t)y = g(t)
subject to the constraint that y(t0 ) = y0 where t0 and y0 are given numbers.
There are two ways to solve such problems:
1. Find the general solution, then find the value of the constant to satisfy the initial condition y(t0 ) = y0 ,
2. Do a definite integral starting from t0 and avoid having any constants.
If you have already found the general solution, or are likely to want to solve the problem for more than one
initial condition then the first approach will be less work, but if you just need to solve one initial problem,
then its worth knowing the second technique. We illustrate both techniques by solving the same problem
both ways.
Example 2.1.6 : Solving an IVP via the General Solution
Lets solve

1
1
y 0 + y = et/3
2
2

20

CHAPTER 2. FIRST ORDER ODES

with the initial condition y(0) = 1. Here p(t) = 21 , g(t) = 12 et/3 . First, we find :
Z
1
(t) = exp(
dt) = et/2
2
Next, we have:
d t/2
1
1
[e y] = et/2 et/3 = e5t/6
dt
2
2
If we integrate both sides with respect to t, we get
3
et/2 y = C + e5t/6
5
and if we divide both sides by ,
3
y(t) = Cet/2 + et/3 .
5
To determine the value of the constant, we use the fact that y(0) = 1, i.e. y = 1 when t = 0 so
3
3
1 = y(0) = Ce0 + e0 = C + ,
5
5
so C = 25 , and we have
y(t) =

2 t/2 3 t/3
e
+ e .
5
5

Quick check: when t = 0, given solution is y(0) = 53 + 52 = 1 which does satisfy the initial condition.
Since it is so easy to check that a given solution does indeed satisfy the initial condition, it is a good
idea to do so.

Example 2.1.7 Solving an IVP via Definite Integral


Lets solve

1
1
y 0 + y = et/3
2
2
with the initial condition y(0) = 1, again. As before, we find :
Z
1
(t) = exp(
dt) = et/2
2
and

1
1
d t/2
[e y] = et/2 et/3 = e5t/6 .
dt
2
2
So far, it is the same as finding the general solution, but now we integrate both sides with respect to
t, only make it a definite integral from t = 0 (the initial value that we were given) to t = x (or some
other arbitrary variable that is not t, or even use t itself if you do not care about the ambiguity that it
might cause). So we get
h
it=x Z x 1
t/2
e y
=
e5t/6 dt
t=0
0 2
and doing the integral and substituting in the initial condition y(0) = 1, we get
ex/2 y(x) e0 y(0) = ex/2 y 1 =

3 5t/6
e
5

t=x
=
t=0

3 5x/6 3
e
.
5
5

2.2. NONLINEAR FIRST ORDER ODES

21

Rearranging the above and replacing all the remaining xs with ts (since x is just a dummy variable),
we get
3
3
3
2
et/2 y = e5t/6 + 1 = e5t/6 +
5
5
5
5
and so if we divide by , we get the final solution:
y(t) =

3 t/3 2 t/2
e + e
,
5
5

as before.
[Add remark on interval of validity of solution]

2.1.2

Variation of Parameters

Supplementary material. To follow......

2.2

Nonlinear First Order ODEs

If the general first order ODE


y 0 = f (t, y)

(2.14)

cannot be rewritten in the form (2.2) then the ODE is nonlinear. This will have a number of consequences.
For such ODEs the solution methods of the previous section will not apply. Indeed, there is no general method
to write down solutions composed of elementary functions for all problems of the form (2.14). Instead there
are methods to solve (2.14) if it has a certain structure or properties. In the following sections we will define
several subclasses of nonlinear first order ODEs, and give the solution techniques that solve them. To be
able to solve nonlinear first order ODEs, it is essential that you be able to identify these different classes of
problem, because each one has a different solution technique.

2.2.1

Separable Equations

If f (t, y) = P (t)Q(y) then the ODE (2.14) is said to be superable. In this case we have
y 0 = P (t)Q(y),

(2.15)

that is y 0 is given by the product of a function of the independent variable and a function of the dependent
variable. As the name suggests, equation (2.15) is solved by separating the variables. If you are happy
with the dy and dt of dy
dt existing independently as infinitesimal differentials (obtained from limits of y and
t 0) then multiplying by dt we see
dy
= P (t)Q(y)
dt
This has solution

1
dy = P (t)dt
Q(y)

Z
P (t)dt

P (t)dt

1
dy = 0.
Q(y)

1
dy = C,
Q(y)

(2.16)

(2.17)

including the constant of integration. Many authors define separable ODEs as ODEs of the form
M (t)dt + N (y)dy = 0,
which follows from (2.16) with M (t) = P (t) and N (Y ) = 1/Q(y) and has solution
Z
Z
M (t)dt + N (y)dy = C.

(2.18)

(2.19)

22

CHAPTER 2. FIRST ORDER ODES

Without separating the differentials its possible to solve (2.15) by writing it as


1 dy
= P (t),
Q(y) dt
and integrating both sides to obtain
Z
Z
1 dy
dt = P (t)dt
Q(y) dt

Z
=

1
dy =
Q(y)

P (t)dt + C,

but that involves cancelling the two dts, so I am not sure if that is more convincing than the previous
approach.
It is possible to derive the solution to (2.15) without splitting any differentials, but the derivation is much
longer. From (2.15) we have
y0
= P (t)
Q(y)
1
then g(y)y 0 = P (t), and hence
Let g(y) =
Q(y)
Z
Z
0
g(y)y dt = P (t)dt + C,
(2.20)
But it remains to evaluate
Then by the Chain Rule

g(y)y 0 dt. To do that let G(y) be such that

d
dy G(y)

= g(y), i.e. G(y) =

g(y)dy.

d
G(y(t)) = g(y)y 0 (t),
dt
R
R
so G(y(t)) = g(y)y 0 (t)dt. Combining this with (2.20) we have G(y(t)) = P (t)dt + C, and hence
Z
Z
Z
Z
1
g(y)dy = p(t)dt + C
=
dy = P (t)dt + C,
Q(y)
which is equivalent to (2.17). since it is so much faster we prefer the quick derivation of (2.17) to find
solutions in examples.
Example 2.2.1
Consider y 0 + ty 2 = 0. Note that this is a nonlinear ODE because of the y 2 term. You cannot apply
the methods of the previous section. However the equation can be written in the form (2.15) and so we
solve it by separation of variables.
y 0 + ty 2 = 0
Hence

dy
+
y2

dy
+ ty 2 = 0
dt

Z
tdt = C

1 1
+ t2 = C
y 2

dy
+ tdt = 0,
y2

1
1
= t2 + k,
y
2

where k = C. But an arbitrary constant multiplied by any number is still an arbitrary constant, so it
is okay to write y1 = 12 t2 + C without changing the name of the constant. hence we obtain the solution
y(t) =

t2
2

1
2
= 2
,
t +C
+C

for an arbitrary constant C. Note that the


y(t) = 2/(t2 + C) is continuous for all t R if C > 0
solution
2
if C < 0 it is discontinuous when t = C so t + C = 0.

2.2. NONLINEAR FIRST ORDER ODES

23

Example 2.2.2
Consider

dy
x2
. Then
=
dx
1 y2
Z
Z
(1 y 2 )dy = x2 dx

or

y3
x3
=
+ C,
3
3

1
y (x3 + y 3 ) = C.
3

(2.21)

Note that the answer in the previous example cannot be rewritten as y = some function of x, so we leave
the answer in the form (2.21), called an implicit solution. In contrast to linear first order ODEs for which
we always obtain explicit solutions, for
ODEs (2.15) we often obtain implicit solutions because the
R separable
1
solution method evolves evaluating Q(y)
dy which can be any kind of nice or nasty function of y.

2.2.2

Exact Equations

Definition 2.2.3
The first order ODE
M (x, y)dx + N (x, y)dy = 0,

(2.22)

M (x, y)
dy
=
,
dx
N (x, y)

(2.23)

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

(2.24)

or

is said to be exact if

The f
x notation for partial derivatives is tiresomely long if you use partial derivatives often so most
mathematicians use a subscript notation and fx instead of f
x . In this notation (2.24) can be written more
compactly as
M y = Nx ,
or
My (x, y) = Nx (x, y).
Exact ODEs do not seem to be common in applications but are easy to construct as exam questions. To see
how this works let us suppose that an first order nonlinear ODE has the implicit solution
f (x, y(x)) = C,

(2.25)

for some constant C. We can always construct an exact equation simply by differentiating (2.25) with respect
to the independent variable x. This gives
d
f
f dy
[f (x, y(x))] =
+
=0
dx
x
y dx

f
f
dx +
dy = 0
x
y

which is of the from (2.22) with


f
,
x

N (x, y) =

2f
=
,
yx

Nx =
x

M (x, y) =
But then

My =
y

f
x

But provided f is twice continuously differentiable we have


ODE (2.22) is exact.

2f
yx

f
.
y


f
y

(2.26)

=

2f
xy

2f
xy
so My = Nx and in this case the

24

CHAPTER 2. FIRST ORDER ODES

This derivation not only shows how to derive exact ODEs, if we reverse the order of the steps we have a
solution method for exact ODEs, which must have solution (2.25) where the partial derivatives of f satisfy
(2.26). It suffices to solve (2.26) for f to obtain the solution (2.25) to (2.23). Lets see both the derivation
and solution of an exact ODE in an example.
Example 2.2.4
Let
f (x, y) = x2 y 2 = c.
To construct an exact ODE with this solution differentiate with respect to x to obtain
2xy 2 + 2x2 y

dy
=0
dx

2xy 2 dx + 2x2 ydy = 0,

which is of the form (2.23) with


M (x, y) = 2xy 2 ,

N (x, y) = 2x2 y.

Thus My = Nx = 4xy, so the equation is exact. To find the solution which assume that it is of the form
(2.25) where f satisfies (2.26). Thus from (2.26)
f
= M (x, y) = 2xy 2 ,
x

f
= N (x, y) = 2x2 y.
y

To solve for f we integrate these equations, but it is essential to realise that since they are partial
derivatives, where one variable was held constant, when we integrate them that variable is still held
constant. So we integrate
f
= 2xy 2
x
holding y constant to obtain
f = x2 y 2 + k1 ,
but here the constant of integration k1 need not be a constant. Since we were holding y constant k1 in
general is a function of y and correct solution is
f = x2 y 2 + k1 (y).

(2.27)

To see that (2.27) is correct, simply note that with f thus defined fx = M for any function k1 (y).
Before we worry about what k1 (y) might be note that we still have to solve
f
= 2x2 y.
y
Integrating this with respect to y while holding x constant we obtain the solution
f = x2 y 2 + k2 (x).

(2.28)

But we are looking for one function f that satisfies (2.26) so the two equations (2.27) and (2.28) both
define the same function f and we require that
f (x, y) = x2 y 2 + k1 (y) = x2 y 2 + k2 (x).

2.2. NONLINEAR FIRST ORDER ODES

25

But if k1 (y) is a non-trivial function of y it would be impossible for these expressions to be equal since
k2 (x) is a function of x only. Indeed for the expressions to be equal we need k1 (y) = k2 (x). The simplest
solution to this is k1 (y) = k2 (x) = 0, which leads to f (x, y) = x2 y 2 and so solution of (2.23) is (2.25)
which in this case gives
x2 y 2 = C,
which of course is the function from which we constructed the ODE.
Unfortunately, you will not usually be given the solution along with an exact ODE, but we can extract a
general solution algorithm from the example above.
Method for solving first order exact ODEs
1. Given ODE M (x, y)dx + N (x, y)dy = 0, Check whether My = Nx . If this equality holds the
ODE is exact.
2. If the ODE is exact solve
f
= M (x, y)
x

f
= N (x, y),
y

and

to find f (x, y).


3. (Implicit) solution is f (x, y) = C.

Aside: It is possible to show that


Z

f (x, y) =

Z
M (x, y) dx +

N (0, y) dy
0

solves (2.26), but this formula can sometimes be problematical, and I prefer to solve (2.26) directly.
[I should probably derive this formula in some future version of these notes]

Example 2.2.5
Consider
2xydx + (x2 + 1)dy = 0.
We could rewrite this as

dy
2xy
= 2
=
dx
x 1

2x
x2 1


y,

from where we see it is separable, so we could solve it as a separable equation. But instead, here we
show that this ODE is exact, and solve it as an exact equation. We have M dx + N dy = 0 with
M = 2xy
N = x2 1

My = 2x,
Nx = 2x.

Since My = Nx , the equation is exact! Now to solve.


M (x, y) =

f
x

f
= 2xy,
x

26

CHAPTER 2. FIRST ORDER ODES

So

Z
f (x, y) =

Z
2xydx =

Z
M (x, y)dx =

f
dx.
x

In this integral, y is treated as a constant, so


Z
f (x, y) = 2xydx = x2 y + g = x2 y + g(y),
where because y is treated as a constant, the constant of integration is a function of y in general. To
confirm this notice that if f (x, y) = x2 y + g(y), then M (x, y) = f
x = 2xy for any function g(y).
From this point there are two ways to proceed.
Quick Solution:
f
f
N (x, y) =
=
= x2 1,
y
y
So

Z
f (x, y) =

x 1dy =

Z
N (x, y)dy =

f
dy.
y

In this integral, x is treated as a constant, so


Z
f (x, y) = x2 1dy = (x2 1)y + h(x),
where because x is treated as a constant, the constant of integration is a function of x. but now we
have two expressions for the same function f (x, y) with
f (x, y) = x2 y + g(y) = (x2 1)y + h(x).

(2.29)

To complete the solution we need to choose the functions g(y) and h(x) so that these two expressions
for f (x, y) agree. Our choice of g(y) and h(x) must respect that g(y) is a function of y only, so no xs
will appear in g(y) and h(x) is a function of x only. By inspection it is clear that with
g(y) = y,

and h(x) = 0,

we have
x2 y + g(y) = x2 y y = (x2 1)y = (x2 1)y + h(x),
so
f (x, y) = (x2 1)y.
Long Solution: Most textbooks do not seem to trust students to be able to choose the functions g(y)
and h(x) correctly, and follow a longer derivation. The longer approach has the disadvantage that it is
longer, but the advantage that it does not require as much intelligent thought. It works as follows.
f
2
Having found that M (x, y) = f
x implies that f (x, y) = x y + g(y), as above. We use N (x, y) = y
to obtain

2
x2 1 = N (x, y) =
(f ) =
(x y + g(y)) = x2 + g 0 (y).
y
y
Thus g(y) satisfies the ODE
x2 1 = x2 + g 0 (y),
which simplifies to
g 0 (y) = 1.
We remark that in this approach you will always obtain an ODE for g (with y as the independent
variable) that does not contain any xs. If your ODE for g contains xs either the original ODE was
not exact, or you made an error somewhere. Having obtained an ODE for g (with y as the independent

2.2. NONLINEAR FIRST ORDER ODES

27

variable) we solve this ODE for g using any of the techniques we already have at our disposal. In the
current example we have
dg
= g 0 (y) = 1,
dy
which can be solved by integrating both sides with respect to y to get
g(y) = y,
(we do not need the constant of integration). Then
f (x, y) = x2 y + g(y)

f (x, y) = x2 y y = (x2 1)y.

In both approaches we obtain f (x, y) = (x2 1)y, so the solution of the implicit solution to the ODE
(x2 1)y = c.
Since this solution can be rewritten as an explicit solution we do so:
y=

c
.
x2 1

Notice that in either approach we could have introduced a constant of integration into the compuation
of f to obtain the function f (x, y) = (x2 1)y + k, which would yield
(x2 1)y + k = c or

y=

ck
.
x2 1

However, this would be a solution of a first order ODE with two constants. There should never be more
constants than the order of the problem, so if you obtain this you can remove one constant by defining
a new one. So in this case let c = c k then y = (c k)/(x2 1) implies y = c/(x2 1).
[Add a harder example]
Exact Equations via Integrating Factors
Suppose M (x, y)dx + N (x, y)dy = 0 But
M
N
6=
y
x
Can we find (x, y) such that
[(x, y)M (x, y)]dx + [(x, y)N (x, y)]dy = 0
is an exact equation? If we can find such a , then

[M ] =
[N ].
y
x
Hence
M

N
+
=N
+
y
y
x
x

or
N

M
=
x
y

M
N

y
x


.

(2.30)

In general, this is a PDE (partial differential equation), which typically harder to solve than the original
ODE. However, in some special cases, we can solve it.

28

CHAPTER 2. FIRST ORDER ODES


Suppose is a function of x only, which we write as (x). This implies that

d
=
= 0
x
dx

and

= 0.
y

Then PDE (2.30) simplifies to


N

d
=
dx

M
N

y
x

which implies that


d
1
=
dx
N (x, y)

M
N

y
x

The assumption that is a function of x holds if and only if


that case, the equation for (2.31) is of the form:


.

1
M
N (x,y) ( y

(2.31)

N
x )

is a function of x only. In

d
g(x) = 0
dx
but this is linear first order homogeneous and is simple to solve to find .
Now we can multiply the original equation by this , redefine M and N and check that the ODE is now
exact, thensolve it. 
M
N
1
is not a function of x only, then the above approach fails. Instead we can try to see
If N (x,y)
y x
if we can find which is a function of y only. If that is the case then

=0
x

and

d
=
y
dy

and the PDE (2.30) simplifies to


1
d
=
dy
M (x, y)

M
N

y
x


.

1
The assumption that is a function of y holds if and only if M (x,y)
(My Nx ) is a function of y only. In
that case, the equation for (y) becomes
d
g(y) = 0
dy
which is linear first order homogeneous and is simple to solve to find .
We obtain the following algorithm for attempting to solve non-exact first order ODEs.

Algorithm for Solving ODEs as Exact Equations


Given
M (x, y)dx + N (x, y)dy = 0
Compute

M
y

and

N
x

If My = Nx Equation is exact solve it.


Otherwise
if
if

1
N (x,y)

1
M (x,y)

M
y
M
y

N
x

is a function of x only, then (x) = e

N
x

is a function of y only, then (y) = e

My Nx
N

dx

My Nx
M

dy

Assuming a suitable was found, multiple the original ODE by , to get M (x, y)dx +
(x, y) = M (x, y) and N
(x, y) = N (x, y) then
N (x, y)dy = 0. Let M
(x, y)dx + N
(x, y)dy = 0,
M
is exact solve it.

2.2. NONLINEAR FIRST ORDER ODES

29

It can (often) happen that you cannot find a suitable integrating factor to make the equation exact. In
that case it is sometimes possible to find a that solves (2.30) by making some other assumption on that
simplifies (2.30) to an ODE (for example assume that mu is a function of the product of x and y so (xy)).
However, there is no general technique to determine the simplifying assumption so we will not pursue such
an approach.
Let us consider an example where can be found as a function of y only.
Example 2.2.6
xy dx + (2x2 + 3y 2 20) dy = 0
First, identify M and N , and their partial derivatives:
M = xy

N = 2x2 + 3y 2 20

My = x

Nx = 4x

Thus My Nx = 3x so the equation is not exact. Then


3x
My Nx
= 2
,
N
2x + 3y 2 20
which is not a function of x only. But

M y Nx
3x
3x
3
=
=
=
M
xy
xy
y

So is a function of y. Lets solve for it:


(y) = e

3
y

dy

= e3 ln y = eln(y

= y3 ,

= xy 4 , and N
= 2x2 y 3 + 3y 5 20y 3 we have M
(x, y)dx + N
(x, y)dy = 0 with
So letting M
y (x, y) = 4xy 3 ,
M

x (x, y)dy = 4xy 3 ,


N

so the equation is now exact. Now we solve for f (x, y):


x2 y 4
+ g(y)
2
Z
x2 y 4
y6
= N dy =
+
5y 4 + h(x)
2
2
x2 y 4
y6
+
5y 4
=
2
2
Z

f (x, y) =

with g(y) =

y6
2

M dx =

5y 4 and h(x) = 0. And solution is f (x, y) = c, that is


x2 y 4
1
5y 4 + y 6 = c.
2
2

This solution is in implicit form. As with separable equations, we rewrite solutions in explicit form
when we can, but often it is not possible to write the solution as y = a function of x only. That is
clearly the case here, so we leave the solution as written.

30

CHAPTER 2. FIRST ORDER ODES

[Easy to see all separable equations are exact. Also the integrating factor for a linear first order ODE is
exactly the one we would choose from above if we tried to solve that equation as an exact equation. Thus
all equations seen so far are special cases of exact equations. Nevertheless, we prefer solution techniques we
already developed for separable and linear ODEs, when they apply, because they are simpler to apply when
they are appropriate.]

2.2.3

Solution by Substitution

There are various substitution techniques to change variables to transform ODEs not already in one of the
forms we can solve into such a form.
Homogeneous Equations
Definition 2.2.7 Homogeneous of degree d
A function f (x, y) is said to be homogeneous of degree d if
f (tx, ty) = td f (x, y)

x, y R.

Example 2.2.8
If f (x, y) = x3 + y 3 then
f (tx, ty) = (tx)3 + (ty)3 = t3 (x3 + y 3 ) = t3 f (x, y),
so f is homogeneous of degree 3.
Notice if we replace f (x, y) by f (x, y) = x3 + y 3 + 2x2 y it will still be homogeneous. Provided all
terms have the same degree, the function will be homogeneous.

Example 2.2.9
Note that f (x, y) = x5 + 7x3 y 2 + 4xy 4 20 is not homogeneous because of the constant term.

Definition 2.2.10 Homogeneous


dy
The ODE M (x, y)dx + N (x, y)dy = 0 (or M (x, y) + N (x, y) dx
= 0) is called homogeneous if M and
N are both homogeneous functions of the same degree.

Warning: this is a completely different meaning of homogeneous than given in Definition 1.2.8. Homogeneous in the sense of Definition 1.2.8 only applied to linear ODEs. We will only apply Definition 2.2.10 to
nonlinear ODEs.
We solve homogeneous ODEs by making a change of variables. There are two choices. Either:
(i) Let y = xu(x) and write an ODE in the new variables x and u.
dy
du
=x
+u
dx
dx
so
dy = xdu + udx

2.2. NONLINEAR FIRST ORDER ODES

31

and now,
0 = M (x, y)dx + N (x, y)dy
= M (x, xu)dx + N (x, xu)[xdu + udx]
= (M (x, xu) + N (x, xu)u)dx + N (x, xu)xdu
= (M (x, xu) + N (x, xu)u)dx + N (x, xu)xdu
= xd (M (1, u) + N (1, u)u)dx + xd+1 N (1, u)du
=

1
N (1, u)
dx +
du,
x
M (1, u) + N (1, u)u

where M and N are both homogeneous of degree d. This reduces the homogeneous ODE to a separable
ODE.
(ii) The alternative substitution is to let x = yv(y) and now write and ODE in v, with y as the independent variable. Its very easy to confuse oneself when using x as the dependent variable and y as the
independent, in a reversal of their usual roles, so I usually avoid this substitution and recommend that
you use the first one. With x = yv(y) we have
dv
dx
=v+y
dy
dy

dx = vdy + ydv,

so
M (vy, y)[vdy + ydv] + N (vy, y)dy = 0,
and an argument similar to the previous case reduces this to a separable ODE.
As usual, I do not recommend blindly memorizing the solution formula. Instead remember the substitution
y = xu(x) to be applied to homogeneous ODEs. (Of course the substitution is not useful if M and N are
not both homogeneous of the same degree.) The substitution is much simpler to apply to concrete examples
than the derivation above would suggest.
Example 2.2.11
Consider the ODE
(x2 + y 2 )dx + (x2 xy)dy = 0.
This is nonlinear but not exact or separable. However, clearly M and N are both homogeneous of
degree 2, so we will solve it by making the substitution y = xu(x) which implies that
dy
du
= u(x) + x .
dx
dx
Now, we have two choices. Either write
dy
(x + y ) + (x xy)
=0
dx
2



du
(x + x u ) + (x x u) u(x) + x
= 0.
dx
2

2 2

For x 6= 0, we can divide by x2 to obtain




du
=0
1 + u + (1 u) u + x
dx
du
1 + u2 + u u2 + x(1 u)
=0
dx
du
x(1 u)
= (1 + u),
dx
2

32

CHAPTER 2. FIRST ORDER ODES

which is separable. Hence we can solve as


Z
Z
1u
dx
du =
1+u
x
Z
ln |x| = 1 +

2
du
1+u
ln |x| = c u + 2 ln |1 + u|
ln |x| = c u + ln(1 + u)2

but y = xu so the solution of original ODE is


ln |x| = c


y
y 2
.
+ ln 1 +
x
x

Or, if you prefer



y
y 2
ln 1 +
.
x
x
The alternative approach would be to use the differential notation throughout. So
c = ln |x| +

y = xu

(2.32)

dy = xdu + udx,

and hence
(x2 + x2 u2 )dx + (x2 + x2 u2 )[xdu + udx] = 0
(1 + u2 )dx + (1 u)[xdu + udx] = 0
[1 + u2 + (1 u)u]dx + (1 u)xdu = 0
(1 u)
1
dx +
= 0,
x
[1 + u]
which is separable, with the same solution as above.
Note that in the example above we leave the solution (2.32) in implicit form, since it cannot be transformed
to an explicit solution. However, we did write the solution in the original variables. Whenever solving any
problem by change of variables it is important to always write the final solution in terms of the variables
with which the problem was posed.
Bernoulli Equations
ODEs of the form
y 0 + f (x)y = g(x)y n

(2.33)

are called Bernoulli Equations. These were first studied by Jacob Bernoulli, but the substitution and solution
technique below is due to Leibniz.
If n = 0 or n = 1, the ODE is linear and we can solve it directly. To solve for general n, we make the
substitution
v(x) = y(x)q
where we will choose the power q below to make the resulting ODE linear. Applying the substitution
v 0 (x) = qy(x)q1 y 0 (x)
= qy(x)q1 [f (x)y + g(x)y n ]

(using the definition of y 0 from ODE)

= qf (x)y(x)q + qg(x)y(x)n+q1
v 0 (x) = qf (x)v(x) + qg(x)y(x)n+q1 .

2.2. NONLINEAR FIRST ORDER ODES

33

If we choose q so that n + q 1 = 0, that is q = 1 n then


v 0 (x) = qf (x)v(x) + qg(x)
= (n 1)f (x)v(x) + (1 n)g(x).
This is a linear ODE for v(x) which we can solve!
Method for solving Bernoulli Equations
Given y 0 (x) + f (x)y = g(x)y n or y 0 + f (x)y = g(x)y n
if n = 0 or n = 1
solve as linear first order ODE
Otherwise
let v(x) = y(x)1n
Write and ODE for v 0 + p(x)v = h(x)
Solve this linear ODE to find v(x)
Write (explicit) solution for y(x).

Example 2.2.12
Consider the ODE

dy
+ y = x2 y 2
dx
Now, this is not quite in the form of a Bernoulli equation. To make it into one, we divide by x, resulting
in:
1
y 0 + y = xy 2 ,
x
x

a Bernoulli equation with n = 2. The substitution is then v = y 1n = y 1 . So we obtain


dy
y 0
= 2
dx
y
y
= y 2 [ + xy 2 ] from the original equation, just rearranged
x
y 1
v
=
+x= x
x
x

v 0 = y 2

So
v0

1
v = x.
x

Then, we find the integrating factor:


= e

1
x

dx

= e ln x = x1

So we get


d 1
1
[x v] = x1 v 0 x2 v = x1 v 0 v = x1 [x] = 1.
dx
x

34

CHAPTER 2. FIRST ORDER ODES

So x1 v = x + C (just integrated) and thus we have


x1 y 1 = C x

xy =

1
cx

y=

1
,
x(c x)

which solves the ODE.


Other Substitutions
There are innumerable other substitution techniques. We will mention just one more.
The ODE
y 0 = f (Ax + By + C), B 6= 0,
can be solved using the substitution:
u = Ax + By + C
which implies
dy
du
=A+B
= A + Bf (u).
dx
dx
This ODE is separable, so we can solve it to find u(x) then u(x) = Ax + By + C, so rearranging
y=

1
(u(x) Ax C).
B

Example 2.2.13
Consider the ODE

dy
= (2x + y)2 7
dx
which is of the form y 0 = f (u) = f (Ax + By + C) with A = 2, B = 1, C = 0, so u = 2x + y and
f (u) = u2 7. So:
u0 = f (u) 2 = (u2 7) 2 = u2 9
Since this is separable, we have:
Z

du
=
u2 9

Z
dx

We can use partial fractions to integrate the LHS:


1
1
A
B
=
=
+
u2 9
(u + 3)(u 3)
1+3 u3
Then 1 = A(u 3) + B(u + 3). So B = A and so A = 1/6, B = 1/6. A shorter way: the cover-up
method; let u = 3, cover up the (u 3) in the bottom, then we get A = 1/(3 3) = 1/6. Similarly,
B = 1/6. So we have


1
1
1
1
=

u2 9
6 u3 u+3
Then, integrating both sides:


Z
Z
Z
du
1
1
1
1
1
1 u 3
=
du
du = (ln |u 3| ln |u + 3| = ln
=x+c
u2 9
6
u3
6
u+3
6
6
u + 3
Recall that u = 2x + y. Then we have the implicit solution


1 2x + y 3
ln
= x + c.
6
2x + y + 3

2.2. NONLINEAR FIRST ORDER ODES

35

This would be an acceptable form to leave the solution, but actually we can transform the solution into
explicit form in this case, as follows.


1 2x + y 3
=x+c
ln
6
2x + y + 3


2x + y 3
= 6x + k
=
ln
2x + y + 3


2x + y 3
6x


=
2x + y + 3 = Ke
2x + y 3
=
= Ce6x
2x + y + 3
=
2x + y 3 = Ce6x (2x + y + 3)
=

2x + y 3 = Ce6x 2x + Ce6x y + 3Ce6x

(Ce6x 1)y = 2x + 3 + Ce6x 2x + 3Ce6x


=

2.2.4

y=

2x + 3 + Ce6x 2x + 3
.
Ce6x 1

Initial Value Problems

and domain of definition - covered in class. No latex notes yet.

36

2.2.5

CHAPTER 2. FIRST ORDER ODES

Summary for Solving First Order ODEs

y 0 = f (x, y)

Separable?

Linear?

Homogeneous?

g(x)dx =

h(x)dy

Integrating
R factor,
= e p(x)dx

sub: y = xu(x)
= separable

Exact?

f (x, y) = c and
fx = M, fy = N

Exact
with integrating
factor?

Integrating factor

Bernoulli?

sub: u = y 1n
= linear

Other weird substitutions or guesses,


Series solutions (later in this course),
Qualitative Methods (MATH 376),
Numerical methods (MATH 387)

2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES

2.3
2.3.1

37

Existence and Uniqueness for Linear and Nonlinear First Order ODEs
Linear First Order ODEs

We already saw in Section 2.1 how to solve the linear ODE


y 0 (t) + p(t)y(t) = g(t).

(2.34)

We can make use of our knowledge of the solution to show that the initial value problem for (2.34) has a
unique solution.
Theorem 2.3.1 Existence and Uniqueness for Linear First Order IVP
If the functions p and g are continuous on an open interval, I = (, ) and t0 I, then there exists
a unique function y(t) : I R which satisfies both the initial condition y(t0 ) = y0 , where y0 R is
an arbitrary prescribed value and also the ODE (2.34) for all t I.

Proof
Since p is continuous for t I, then p is (Riemann) integrable on the closed interval [t0 , t] where t I.
Hence for any t I we can define
Z t

(t) = exp
p(s)ds ,
(2.35)
t0

where the integral inside the exponential is a definite integral. Then


Z t0

(t0 ) = exp
p(s)ds = exp(0) = 1.
t0

Recall Leibniz Rule:


Z
Z b(t)
d b(t)

0
0
(f (t, s))ds.
f (t, s)ds = f (t, b(t))b (t) f (t, a(t))a (t) +
dt a(t)
a(t) t
Hence
d
(t)
dt
Z t
 Z t

d
= exp
p(s)ds
p(s)ds
dt
t0
t0

0 (t) =

= (t)[p(t)1 + 0 + 0]
= (t)p(t)
Next, suppose that a solution y(t) exists. Then it must satisfy
d
[(t)y(t)] = 0 (t)y(t) + (t)y 0 (t)
dt
= (t)y 0 (t) + (t)p(t)y(t)
= (t)[y 0 (t) + p(t)y(t)]
= (t)g(t).

since 0 (t) = (t)p(t)

38

CHAPTER 2. FIRST ORDER ODES

Now, since (t)g(t) is continuous for all t I, then g is integrable on [t0 , t]. Thus, integrating both
sides
Z t
[(s)y(s)]ts=t0 =
(s)g(s)ds
t0
t

Z
(t)y(t) (t0 )y0 =

(s)g(s)ds.
t0

But, recalling that (t0 ) = 1 and rearranging we obtain


y0
1
y(t) =
+
(t) (t)

(s)g(s)ds.

(2.36)

t0

Where we note that (t) is defined by (2.35) and (t) > 0 for all t I, so there is no problem in dividing
by (t). But this shows that there is a most one solution, since any solution y must satisfy the same
formula (2.36). To show that there is a unique solution it suffices to show that y(t) as defined by (2.36)
satisfies the ODE (2.34) and the initial condition. But from (2.36)
y(t0 ) =

y0
1
+
(t0 ) (t0 )

t0

(s)g(s)ds =
t0

1
y0
+ 0 = y0 ,
1
1

so y(t) defined by (2.34) satisfies the initial condition y(t0 ) = y0 . To show that y(t) satisfies the ODE
it suffices to differentiate (2.36), which we leave as an exercise.

It follows from Theroem 2.3.1 that for all t I, all solutions of the ODE (2.34) (without an initial value
specified) are of the form
1
C
+
y(t) =
(t) (t)

Z
(s)g(s)ds,

(2.37)

for an arbitrary constant C. That corresponds to all solutions of the form (2.36) for different initial conditions
y0 . We refer to the set of all solutions of a linear ODE as the general solution. Hence (2.37) gives the general
solution of the linear first order ODE (2.34).
The open interval I need not be bounded. We can have I = (R) if p and g are continuous on (R). There
are also generalizations of this theorem. In particular, p and g continuous was only used to ensure that p
and g are integrable, so it is enough to assume that p and g are (Riemann) integrable for the results of
the theorem to hold. To ensure this it is enough that p and g are bounded on I and continuous almost
everywhere.

2.3.2

Nonlinear Scalar First Order ODEs

Now consider the nonlinear first order ODE


y 0 = f (t, y).

(2.38)

We would like to show existence and uniqueness of the solution of (2.38) as an IVP with the initial condition
y(t0 ) = y0 . However, since we do not have a general formula for the solution of (2.38) we cannot use the
techniques of the previous section. Instead, we will derive techniques to show existence and uniqueness of
the IVP which do not require us to know the solution.

2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES

39

We will need the concept of Lipschitz continuity.


Definition 2.3.2 Lipschitz continuous in y
The function f (x, y) : R2 R is Lipschitz continuous in y on the rectangle
R = {(x, y) : x [a, b], y [c, d]},
if there exists a constant L > 0 such that
|f (x, y1 ) f (x, y2 )| 6 L|y1 y2 |,

(x, y1 ) (R) and (x, y2 ) (R).

Clearly, if f is Lipschitz continuous in y, then f is continuous in y, so this concept is stronger than


continuity.
Lemma 2.3.3
If f : R2 R is such that f (x, y) and f
y (x, y) are continuous in x and y on the rectangle R =
{(x, y) : x [a, b], y [c, d]}, then f is Lipschitz in y on R.

Proof
By the Fundamental Theorem of Calculus, treating x as a constant,
Z y2
f
f (x, y2 ) = f (x, y1 ) +
(x, y)dy.
y1 y
Hence
y2

Z y2


f

f


(x, y)dy 6
(x, y) dy

y
y1 y
y1


f


6 |y2 y1 | max (x, y)
y[y1 ,y2 ] y



f

6 |y2 y1 | max (x, y)
(x,y)R y

Z

|f (x, y2 ) f (x, y1 )| =

(y2 > y1 )

6 |y2 y1 |L,
where
L = max |
(x,y)R

and the maximum exists and is finite because

f
y

f
(x, y)|
y

is a continuous function on a closed set.

(2.39)


For differentiable functions we can use (2.39) to define a Lipschitz constant.


Hence we see that every differentiable function is Lipschitz, while every Lipschitz function is continuous.
However the converses are not true. For example f (x, y) = |y| is Lipschitz on any rectangle centred at the
origin but is not differentiable when y = 0. The function f (x, y) = y 1/3 is continuous on any rectangle
centred at the origin but not Lipschitz on any such rectangle (because | f
y | is unbounded near y = 0).
In summary
f
continuous in y = f is Lipschitz in y = f is continuous in y
y

40

CHAPTER 2. FIRST ORDER ODES

We are now ready to state an existence and uniqueness result for the nonlinear initial value problem.
Theorem 2.3.4 Existence and Uniqueness for Nonlinear Scalar First Order IVPs
If f and

f
y

are continuous in t and y on a rectangle


R = {(t, Y ) : t [t0 a, t0 + a], y [y0 b, y0 + b]},

where f (t, y) and

f
y

are functions of t and y, then there exists h (0, a] such that the IVP
y 0 = f (t, y)

y(t0 ) = y0 ,

has a unique solution y(t) defined for all t [t0 h, t0 + h], and moreover this solution satisfies
y(t) [y0 b, y0 + b] for all t [t0 h, t0 + h].

Note
i) We have already proved the special case of this theorem, since if y 0 (t) = f (t, y) = p(t)y + g(t),
then f and f
y are continuous when p and g are continuous. However, for general nonlinear
equations, there is no formula for the solution, so we cannot amend the previous proof.
ii) It is possible to weaken the conditions of the theorem. In particular, continuity of f
y is not
necessary. It is sufficient that f is Lipschitz in y, and we will use the Lipschitz continuity of f
directly in the proof.

Proof Proof of the Theorem 2.3.4


Rewrite the IVP as
y 0 = f (t, y),
as
Z

y(t0 ) = y0

(2.40)

f (s, y(s))ds,

(2.41)

y(t) = y0 +
t0

Noting that the FTC (fundamental theorem of calculus) and Leibniz Rule imply that y(t) solves (2.41)
if and only if it solves the IVP (2.40), so (2.41) and (2.40) are equivalent formulations of the IVP.
We will show that (2.41) must have a unique solution by performing a technique called Picard iteration

(after the French mathematician Emile


Picard, though other names are also attached to the technique,
and this theorem is sometimes called the PicardLindelof theorem).
The basic idea is very simple. Guess a solution and call this guess y0 (t). The simplest choice is to
guess that
y0 (t) = y0 , t [t0 a, t0 + a].
(2.42)
This constant function y0 (t) has the nice properties that it satisfies the initial condition y0 (t0 ) = y0 and
also the property that y0 (t) [y0 b, y0 + b] for all t [t0 a, t0 + a]. Of course, the function y0 (t) will
not satisfy the differential equation in either of the forms (2.41) and (2.40) so is not the solution of the
IVP.
To solve the IVP we will generate a sequence of functions {yn (t)}
n=0 each defined for [t0 h, t0 + h]
(where 0 < h 6 a]), and with each function satisfying yn (t0 ) = y0 and yn (t) [y0 b, y0 + b] for all
[t0 h, t0 + h].

2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES

We define the sequence of functions {yn (t)}


n=0 iteratively by
t

f (s, yn (s))ds.

yn+1 (t) = y0 +

(2.43)

t0

This is the Picard iteration. It is based on (2.41) where the unknown solution y(s) on the left-hand
side of (2.41) is replaced by the already computed function yn (s) to generate the next function yn+1 (t).
Starting from y0 (t) defined by (2.42) we obtain
Z

f (s, y0 )ds,

y1 (t) = y0 +
t0

and then
Z

f (s, y1 (s))ds,

y2 (t) = y0 +
t0

and so on and so forth to generate as many iterates as we wish. In many cases computation of these
iterates is not particularly hard, but here we wish to consider the more fundamental questions of whether
this sequence is well-defined and converges to some limit. We will then use this to show existence and
uniqueness of the solution to the IVP.
First note that if ym (t) = y(t) for all t [t0 , a, t0 + a], that is ym (t) solves the IVP for some m, then
Z

ym+1 (t) = y0 +

f (s, ym (s))ds = y0 +
t0

f (s, y(s))ds = y(t),


t0

using (2.41). So if ym (t) = y(t) for some m, then


n > m.

yn (t) = y(t)

Hence it is possible for this iteration to terminate after a finite number of iterations at the exact solution.
However, usually, this does not occur and the best we can hope for is yn (t) can be computed for all
n > 0 and lim yn (t) = y(t). We will show this paying attention to the details (including what we mean
n

by convergence).
We need to check some details.
?

y0 + b

y0

y0 b
t0 a

t0

t0 + a

Assume that
yn (t) : [t0 a, t0 + a] [y0 b, y0 + b]
with yn (t0 ) = y0 . Choosing y0 (t) to satisfy (2.42) ensures that this is satisfied for n = 0. Then does
yn+1 (t) as defined by (2.43) have the properties we require?

41

42

CHAPTER 2. FIRST ORDER ODES

Given yn (t) continuous and f (t, y(t)) continuous in t and y(t) (which is assumed in statement of
theorem), f (s, yn (s)) is integrable and so yn+1 (t) is at least well defined for all t [t0 a, t0 + a].
However, it is not clear that
yn+1 (t) [y0 b, y0 + b]

t [t0 a, t0 + a],

(2.44)

as illustrated in the diagram above. If (2.44) does not hold the construction will fail at the next step,
since we only made assumptions on the continuity of f and f
y in the rectangle R. In that case, choose
h (0, a) to ensure
yn+1 (t) [y0 b, y0 + b]
t [t0 h, t0 + h].
(2.45)
That is we make the rectangle narrower. But, we need to do this in a controlled way so that the
rectangle does not vanish when we iterate to infinity.
y0 + b

y0 + b

Slope M

Slope M
yn+1 (t)

Slope M
yn+1 (t)

y0

y0

Slope M
y0 b
t0 a

y0 b
t0

t0 + a

t0 a

t0 h

t0

t0 + h

t0 + a

Left: The case where M a < b and Right: The case where M a > b.
Since f is continuous in t and y on the rectangle R, there exists M > 0 such that |f (t, y)| 6 M for
all (t, y) R. But yn+1 (t) is defined by (2.43), so by Leibniz rule
0
yn+1
(t) = f (t, yn (t)),

so
0
|yn+1
(t)| 6 M,

for all t [t0 a, t0 + a]. If y0 + M a 6 y0 + b (i.e. if M a 6 b) then (2.44) is satisfied, as illustrated in


the left-hand diagram above. Let h = a and I = [t0 a, t0 + a] in this case.
If M a > b then choose h (0, a) such that M h 6 b then then yn+1 (t) satisfies (2.45), as illustrated
in the right-hand diagram above. Let I = [t0 h, t0 + h] in this case.
Thus given a continuous function yn (t) : I [y0 b, y0 + b] such that yn (t0 ) = y0 , the iteration
(2.43) generates a continuous function yn+1 (t) : I [y0 b, y0 + b] such that yn+1 (t0 ) = y0 . Hence
letting y0 (t) be defined by (2.42) the Picard iteration (2.43) generates an infinite sequence of functions
{yn (t)}
n=0 with
yn (t) : I [y0 b, y0 + b],
n > 0.
But does the iteration converge? We will see that the answer is yes. To see that it does we will need
to use some analysis. We define a space C of functions via C = C(I, [y0 b, y0 + b]). That is C is the
set of continuous functions y(t) : I [y0 b, y0 + b]. Next define a mapping T on the function space

2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES

C, by T u = v where v and u both belong to the space of functions C, and given the function u, the
function v is defined for each t I by
Z t
v(t) = y0 +
f (s, u(s))ds.
(2.46)
t0

Comparing (2.46) to (2.43) and (2.41) we see that


yn+1 = T yn ,

and

y = T y.

Also the arguments above ensure that for any u C the map T defines a new function v = T u C.
Now solving the IVP is equivalent to finding y such that y = T y. Thus we solve the IVP by looking
for a fixed point y C of the mapping T . We would like to show that such a fixed point exists (giving
existence of a solution to the IVP), that the fixed point is unique (giving uniqueness of the solution of
the IVP) and moreover that limn yn = y so that the iteration converges to the unique solution.
For y C, define kyk by
kyk := max |y(t)|.
(2.47)
tI

This is norm on the function space C.


To see this note that
i) For k R we have
kkyk = max |ky(t)| = |k| max |y(t)| = |k|kyk ,
tI

tI

ii) There is a unique 0 vector since kyk = 0 if and only if y(t) = 0 for all t I.
iii) The Triangle Inequality ka + bk 6 kak + kbk holds since
ky1 +y2 k = max |y1 (t)+y2 (t)| 6 max(|y1 (t)|+|y2 (t)|) 6 max |y1 (t)|+max |y2 (t)| = ky1 k +ky2 k .
tI

tI

tI

tI

These are the three properties required of a norm, which is essentially a technical term for a definition
of a distance. The Euclidean norm on vectors which is just the Euclidean distance is the most well
known and used norm. The norm defined by (2.47) is often called the infinity norm or when applied
to continuous functions on a closed interval I (as it is in our case) it is sometimes called the maximum
norm.
Now consider u and v C then
kT u T vk = max |T u(t) T v(t)|
tI

 

Z t
Z t


= max y0 +
f (s, u(s))ds y0 +
f (s, v(s))ds
tI

0
Z t




= max
f (s, u(s)) f (s, v(s))ds
tI
t0
Z t
6 max
|f (s, u(s)) f (s, v(s))|ds

tI

t0

t0

6 max |t t0 | max |f (s, u(s)) f (s, v(s))|.


tI

sI

But, since f
y is continuous on the rectangle R, it follows from Lemma 2.3.3 that f is Lipschitz in y on
the rectangle R. Let L be the Lipschitz constant then
kT u T vk 6 h max L|u(s) v(s)| = hL max |u(s) v(s)| = hLku vk .
sI

sI

43

44

CHAPTER 2. FIRST ORDER ODES

Hence, we have
kT u T vk 6 hLku vk .
If hL > 1, we will choose a smaller h so that hL < 1. Thus we amend our definition of h so that


b 1
0 < h < min a, ,
,
M L
which implies that there exists (0, 1) such that
hL 6 < 1,
and so
kT u T vk 6 ku vk

where

(0, 1).

Any mapping which satisfies this property is called a Contraction Mapping. By the Contraction Mapping
Theorem (Theorem 2.3.5), there is a unique y C such that y = T y. But y = T y if and only if y
solves (2.41) so this shows both existence and uniqueness of the solution of the IVP. It also follows from
the Contraction Mapping Theorem that limn kyn yk = 0, that is the sequence of functions yn (t)
defined above converges to the solution y(t) in the infinity norm.


This, and any material on a gray page is supplemental material that is not examinable. Supplemental
material will be limited in scope this year. It will also be mainly from previous students notes, and may
not be very carefully reviewed or edited (ie beware of errors).
The Contraction Mapping Theorem is required to complete the proof of Theorem 2.3.4.
Theorem 2.3.5 (Contraction Mapping theorem) The Contraction Mapping Theorem/Principle also
called Banach Fixed Point Theorem guarantees for a contraction mapping
There is a unique y such that y = T y
given any y0 , yn defined yn+1 = T yn and limn yn exists and limn yn = y
Proof. (Sketch Proof of Banach/Contraction Mapping Theorem)
Uniqueness: There is at most one solution Supposed the IVP has two solutions y1 and y2 with y1 6= y2
Then, because
y1 = T y1
and
y2 = T y2
(since T applied to solution leaves it unchanged) Now
||y1 y2 || = ||T y1 T y2 || 6 ||y1 y2 || where < 1
Contradiction unless
||y1 y2 || = 0
i.e. y1 y2 = 0 or y1 = y2 and functions agree!

2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES
Existence: Consider two sequences of iterates un and vn starting from u0 and v0 . Then
||un vn || = ||T un1 T vn1 || 6 ||un1 vn1 ||
= ||T un2 T vn2 || 6 (||un2 vn2 || )
6 n ||u0 v0 ||
This
lim ||un vn || = 0

To see convergence, let v0 = u1 then vn = un+1 and


||un+1 vn || 6 n ||u1 u0 ||
Hence
lim ||un+1 un || = 0

since
(0, 1)
Now given any > 0,
N > 0 : ||uN uN 1 || 6

(1 )

So
||un un1 || 6

(1 )n > N

Now for any > n > N consider ||un un ||


Z

t0 +h

T u = uo +

f (s, u(s))ds
t0

hL < 1 , hL 6 < 1
{yn }
yn+1 = T yn
||un vn || = ||T un1 T vn ||
6 ||un1 vn1 ||
= ||un2 vn2 ||
...
6 h ||u0 v0 ||
C = C([a, b])
||u|| = sup |u(x)|
x[a,b]

v0 = u1
and
vn = un+1
||un+1 un || 6 n ||u1 u0 ||

45

46

CHAPTER 2. FIRST ORDER ODES


lim ||un+1 un || = 0

In particular, given > 0


N > 0(N N)
such that

(1 )n > N

||un un1 || 6
Given m > n > N

||um un || 6 ||um um1 || + ||um1 um2 || + ... + ||un+1 un ||


6
6

mn
X
i=1
mn
X

||un+i uni1 ||
i ||un+1 un || = ||un+1 un ||

i=1

mn
X

i=1

< ||un+1 un ||

i 6 ||un+1 un ||

i=1

<
1

This implies that the sequence {un } is a Cauchy sequence. The sequence converges in C (Its a Banach
space!)

For a given IVP it is usually quite easy to compute the first few Picard iterations.
Example 2.3.6 Picard Iterations
Consider the IVP
y 0 = 2t(1 + y) = f (t, y),

y(0) = 0.

This is a separable ODE, whose solution is y(t) = et 1.


Alternatively, we could try to solve this IVP using Picard iteration. Following (2.42) we let
y0 (t) = y0 = 0 t.
Then the Picard iteration is defined by
Z

yn+1 = y0 +

f (s, y(s)) ds
t0

with f (s, y(s)) = 2s(1 + y) and t0 = 0, so:


Z

y1 (t) = 0 +

2s(1 + y0 (s)) ds =
0

2s ds = [s2 ]t0 = t2


t
s4
t4
= t2 +
2s(1 + s2 ) ds = s2 +
2 0
2
0
0



Z t
Z t 
4
4
6 6
s
s
s
t2
t4
t6
y3 (t) = 0 +
2s(1 + y2 (s)) ds =
2s 1 + s2 +
ds = s2 +
+
=
+ +
2
2
6 0
1! 2! 3!
0
0
Z

y2 (t) = 0 +

2s(1 + y1 (s)) ds = 0 +

Often there is no clear pattern when doing Picard iteration, and after a few iterations the calculations
become to cumbersome to continue by hand. But that is the beauty of the theorem; a unique solution
is guaranteed to exist, even if we cannot write down an explicit expression for it.

2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES

However, in this example the iterates do have a clear pattern and we conjecture that
n

X t2k
1 4
1
1
t + t6 + + t2n =
.
2!
3!
n!
k!

yn (t) = t2 +

k=1

We can show this by induction. First note that yn has the required form for n = 1, 2, 3 by the construction above. For the induction step, assume result holds for yn then
!
!
Z t
Z t
n
n
X
X
s2k+1
s2k
ds =
2s + 2
ds
yn+1 (t) =
2s 1 +
k!
k!
0
0
k=1

k=1

= t2 + 2

n
X
k=1

Thus we have shown that yn (t) =

n+1
n
X t2k
X
t
t2(k+1)
= t2 +
=
= yn+1 (t)
(2k + 2)k!
(2k + 1)!
k!
2(k+1)

k=1

k=1

t2k
k=1 k!

Pn

and hence
y(t) =

2k
X
t
k=1

k!

,
2

which is not surprising since, we saw already that y(t) = et 1, and it is easy to check that et 1 =
P t2k
k=1 k! ..
What happens when the conditions of the theorem are violated?
Example 2.3.7
Consider the ODE
y 0 = y 1/3 ,

y(0) = 0,

for which we have


y 0 = f (y) = y 1/3 .
Thus

f
1
1
= y 2/3 = 2/3 .
y
3
3y

f
y

is clearly not continuous at y = 0 and so the conditions of the theorem are violated. However
y(t) = 0 for all t R is a clearly a solution of the IVP. Moreover the ODE is separable, and separating
variables we find
Z y(t)
Z t
dy
=
dt
1/3
y(0) y
0
3 2/3
y (t) = t
2
Thus we obtain two more solutions:

y(t) =

2t
3

3/2


,

y(t) =

2t
3

3/2
.

So in this example there is existence but not uniqueness of solutions. In fact, there are infinitely many
solutions (uncountably many) in this example.

47

48

CHAPTER 2. FIRST ORDER ODES

For any t0 > 0 let


y(t) =

(
0
2
3 (t

t 6 t0
t > t0

t0 )3/2

It is easy to check that all of these satisfy the IVP, and so we have infinitely many solutions.
Even if f and

f
y

are continuous t R, y R the theorem does not guarantee y(t) exists for all time.

Example 2.3.8
y0 = y2

y(0) = 1
Z

y(t)

y(0)

dy
=
y2
y(t)

[y 1 ]1
1

dt
0

=t

1
=t
y(t)

y(t) =

1
1t

[fig 3]
The solution blows up

Corollary 2.3.9
0
If f (t, y) and f
y are continuous t, y R, then t < t0 < t+ such that the IVP y = f (t, y),
y(t0 ) = y0 has a unique solution y(t) t (t , t+ ).

Moreover
t+ = + or |y(t)| as t t+
t = or |y(t)| as t t

This tells us that for a non-linear first order ODE, one of the following has to occur:
1) The solution exists for all time
2) The solution becomes unbounded at some finite time
3) Something bad happens if the solution y(t) crosses/approaches a point of discontinuity of f or

f
y

Generalization of the Theorem


f should be Locally Lipschitz.
The existence of solutions follows from f being continuous in (t, y), but the solutions might not be
unique.
Solutions can still exist if f has a finite number of discontinuities.

2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES

2.3.3

49

Direction Fields and Integral Curves

In this course we are learning to solve differential equations because they can be used to describe many
processes. In many applications the differential equation and even the exact form of its solution themselves
are not the primary objective. Rather, one wants to understand the process. This often involves wanting to
know the behaviour as t or to know the interval of validity of the solution of the initial value problem.
It is often useful to visualise the solutions of the ODE to consider such questions. We can even do this
without knowing the solution of the ODE. The key to this approach is the direction field.
Letting x be the independent variable the first order ODE y 0 = f (x, y) can also be written as
dy
= f (x, y).
dx
This means that the gradient of the solution y(x) passing through any point (x, y) in the xy-plane is just
given by the function f (x, y). But this function f is known; it is what defines the ODE. The direction field of
the ODE is the line segments passing through all the points (x, y) with slope f (x, y). That would be a mess
to draw for all (x, y) so typically we only draw a grid of line segments (with a computer) or a few by hand.
The integral curves of the ODE are curves in the direction field that pass through each point tangential to
the vector field. Thus along such a curve y 0 = f (x, y) so they correspond to solutions of the ODE.
This is best illustrated with an example.
Example 2.3.10
Consider the ODE

dy
x2
= f (x, y) =
.
dx
1 y2

This ODE is separable, and its implicit solution is x3 + 3y y 3 = C, but let us first draw the direction
field without making use of the solution.
dy
We have f (x, y) = 0 when x = 0, so all solutions pass through the y-axis with slope dx
= 0.
2
We have f (x, y) = when y = 1, so solutions will have infinite slope as they approach the lines
y = 1 and y = 1. This will be important in determing the interval of validity for an IVP.
We also see that f (x, y) > 0 if |y| < 1 and f (x, y) < 0 if |y| > 1.
The direction field in the image below was plotted using a computer, but it could have been sketched
using the information above, and perhaps just evaluating f (x, y) at a few points.

50

CHAPTER 2. FIRST ORDER ODES

Once the direction field has been plotted, we can draw the integral curves that pass through each point
tangential to the direction field. In the image the curves were actually drawn making use of the solution
of the ODE, but even sketching them by hand you should get a very similar diagram.
In the diagram we also show that solution of the IVP for this ODE with the initial conditions
y(1) = 0. We can see from the direction field and integral curves that the solution will approach y = 1
where the gradient becomes infinite, which will constrain the interval of validity to be approximately
x (1, 1.5). Remember the interval of validity is the largest interval of the independent variable on
which the solution of the IVP is defined; it is important to remember that this is one interval and on
this interval the solution must be continuously differentiable (so finite gradient), hence the solution of
the IVP terminates when the gradient becomes infinite.
Using this and the exact solution of the IVP we can work out the interval of validity exactly. Substituting y(1) = 0 into x3 + 3y y 3 = C we get C = 1 so
x3 + 3y y 3 = 1.
Thus when y = 1 we have x3 = 1 3(1) + (1)3 = 3, so x = 31/3 . Similarly when y = 1 we have
x3 = 1 3(1) + (1)3 = 1, so x = 1. Thus we see that the interval of validity for this IVP is
dy
x (1, 31/3 ). Note that the interval is open, since dx
is infinite at the ends of the interval.
When looking for an interval of validity, do not forget that the interval of validity is a single interval of
values of the independent variable. If the initial condition is of the form y(x0 ) = y0 then it will be an interval
of x values that includes x0 . There must exist a solution which is continuously differentiable on this interval
and satisfies the initial condition y(x0 ) = y0 , as in the example above.

Chapter 3

Second Order ODEs and IVPs


3.1

Nonlinear Second Order ODEs

The general form of a non-linear second-order ODE is


y 00 = f (t, y, y 0 ),

(3.1)

where t is the independent variable, and a solution y(t) should be a function defined on some interval I R
which is twice differentiable and satisfies (3.1) on I.
Unfortunately, there is no general solution technique for all equations of the form (3.1). We can solve
some particular cases for nonlinear problems, and all constant co-efficient linear ODEs.

3.1.1

f does not depend on the dependent variable

If f in (3.1) is independent of y so the ODE can be written as


y 00 = f (t, y 0 ),

(3.2)

then we simply let u = y 0 which implies u0 = y 00 = f (t, y 0 ) = f (t, u), so (3.2) becomes
u0 = f (t, u),

(3.3)

which is a first order ODE in u. So we solve (3.3) using the techniques of the previous chapter to find u(t)
and then integrate
y 0 (t) = u(t),
to solve (3.2) for y(t).
Example 3.1.1
Consider the ODE
y 00 + y 0 = et ,
which is of the form (3.2). Let u = y 0 . Then,
u0 + u = et .
This is a first-order linear ODE. Multiply both sides by et (the integrating factor ) and we get
u0 et + et u = 1.
So

d
[uet ] = 1
dt

51

(3.4)

52

CHAPTER 3. SECOND ORDER ODES AND IVPS

and if we integrate both sides we obtain


uet = t + c

u = tet + cet .

Thus, y 0 = tet + cet and so solution is


y = tet + c1 et + c2 .

3.1.2

f does not depend on the independent variable

Suppose
y 00 = f (y, y 0 ),

(3.5)

so f does not depend on the independent variable. Again, we make the substitution u = y 0 . Then: u0 =
y 00 = f (y, u). But this ODE has too many variables! Which is not good. The trick is to think of u as a
function of y(t) (where t is our independent variable) Then, by the chain rule
du dy
du
du
=
=u
dt
dy dt
dy
Then,
u

du
du
du
=
=u ,
dy
dt
dy

and so (3.5) becomes


1
du
= f (y, u).
dy
u

(3.6)

Equation (3.6) is a first-order ODE for u, with y being the independent variable. As before, we would just
need to solve that to find u, then solve y 0 = u to find y.
Example 3.1.2 Linear Pendulum
Consider the linear pendulum
y 00 + 2 y = 0
which can also be written as y 00 = f (y, y 0 ) = 2 y and so is of the form (3.5). Let u = y 0 . Then for
this example (3.6) becomes
du
2 y
=
.
dy
u
This is separable:
udu = 2 ydy,
so

1 2
1
u = 2 y 2 + c1 ,
2
2
or multiplying by 2 (and redefining the constant)
u2 = 2 y 2 + c1 .
Thus
p
p
u = c1 2 y 2 = k 2 2 y 2 ,
since the constant needs to be positive, so c1 = k 2 > 0. Thus,
p
y0 = k2 2 y2 ,

3.2. LINEAR HOMOGENEOUS SECOND ORDER ODES

53

This is again separable. So we have


1

Thus

1
p
dy =
2
k / 2 y 2

Z
dt

1
sin1 (y/k) = t + C,

So

y
= sin(t + C) = sin(t C) = sin(t + c),
k

Hence
y=

k
sin(t + c) = K sin(t + c).
y

(3.7)

Or alternatively
y = K sin(t + C) = K sin(t) cos(c) + K cos(t) sin(c) = k1 sin(t) + k2 cos(t).

(3.8)

We note from (3.7) that taking K = 1 and c = 0 or c = /2 that sin(t) and cos(t) are both solutions
of the linear pendulum equations so (3.8) write the solution as a linear combination of two solutions.

3.2

Linear Homogeneous Second Order ODEs

We consider the linear homogeneous Second Order ODE


a(t)y 00 + b(t)y 0 + c(t)y = 0.

(3.9)

After we have developed techniques to solve (3.9) we will consider the nonhomogeneous ODE
a(t)y 00 + b(t)y 0 + c(t)y = g(t).

(3.10)

but we need to be able to solve (3.9) before we tackle (3.24).

3.2.1

Variable Coefficient Linear Homogeneous Second Order ODEs

Consider the variable coefficient ODE (3.9) (sometimes called non-constant coefficient) where the parameters
a(t), b(t) and c(t) are functions of the independent variable t.
If c(t) = 0 for all t then this equation can be written in the form (3.2) and solved using the techniques we
applied to that equation. There is not a general technique to solve (3.9) for general c(t) but some special
cases can be solved.
There is one important principle and one important technique that apply equally to variable and constant
coefficient second order homogeneous linear ODEs. We will introduce these here, but we will also later apply
both to constant coefficient ODEs.

Principle of Superposition
The Principle of Superposition says that linear combinations of solutions of the homogeneous ODE (3.9) are
also solutions. This is a very powerful result that will allow us to write the general solution of any ODE of
the form (3.9) as a linear combination of two linearly independent functions y1 (t) and y2 (t) where y1 (t) and

54

CHAPTER 3. SECOND ORDER ODES AND IVPS

y2 (t) are both solutions of (3.9).


Theorem 3.2.1
If both y1 (t) and y2 (t) are solutions of the ODE (3.9) for all t I for some interval I R then
y(t) = c1 y1 (t) + c2 y2 (t),

(3.11)

is also a solution of (3.9) for all t I for any values of the constants c1 , c2 .

Proof
Let y1 (t) and y2 (t) be solutions of the ODE (3.9) and define y(t) by (3.11). Then
y 0 = c1 y10 + c2 y20
y 00 = c1 y100 + c2 y200 .
Hence
a(t)y 00 + b(t)y 0 + c(t)y = a(t)(c1 y100 + c2 y200 ) + b(t)(c1 y10 + c2 y20 ) + c(t)(c1 y1 + c2 y2 )
i
i
h
h
= c1 a(t)y100 + b(t)y10 c(t)y1 + c2 a(t)y200 + b(t)y20 c(t)y2 ,
{z
}
{z
}
|
|
=0

=0

= 0.
Where a(t)y100 + b(t)y10 c(t)y1 = 0 for all t I because y1 solves (3.9). Similarly for y2 . Hence y(t) is also
a solution.

Thus if we can find any two solutions y1 (t) and y2 (t) then y(t) defined by (3.11) also solve (3.9). Since we
expect two constants in the general solution of a second order ODE this ought to be the general solution.
But we need to take care to choose functions y1 (t) and y2 (t) which are linearly independent.
Recall that the two non-trivial vectors v1 and v2 are linearly independent if the only constants that satisfy
the equation
k1 v1 + k2 v2 = 0
are k1 = k2 = 0. Otherwise, v1 and v2 are linearly dependent. If v1 and v2 are linearly dependent then
v2 =

k1
v1 = kv1 ,
k2

so v2 is a scalar multiple of v1 . Linear independence of two functions is defined similarly.


Definition 3.2.2 Linear Independence
If y1 (t) and y2 (t) are defined for t I for some interval I R then y1 (t) and y2 (t) are linearly
independent on I if the only constants that solve
k1 y1 (t) + k2 y2 (t) = 0
for all t I are k1 = k2 = 0. Otherwise they are linearly dependent on I.

If y1 (t) and y2 (t) are linearly dependent and k1 6= 0 and k2 6= 0 then


y2 (t) =

k1
y1 (t) = ky1 (t),
k2

3.2. LINEAR HOMOGENEOUS SECOND ORDER ODES

55

so one function is a scalar multiple of the other. For the case where y1 (t) and y2 (t) are linearly dependent
with one of k1 and k2 non-zero and the other is zero, suppose without loss of generality that k2 = 0. But
then from the linear dependence with k2 = 0 we have k1 y1 (t) = 0 for all t I, but k1 6= 0 so y1 (t) = 0 for
all t I. So in this case y1 (t) = ky2 (t) with k = 0. Thus whenever y1 (t) and y2 (t) are linearly dependent
we can write one function as a scalar multiple of the other.
Now suppose that y(t) defined by (3.11) solves (3.9). If y1 and y2 are linearly dependent then y2 (t) = ky1 (t)
(or y1 (t) = ky2 (t) - but in that case swap the functions y1 and y2 ) so
y(t) = c1 y1 (t) + c2 y2 (t) = c1 y1 (t) + c2 ky1 (t) = (c1 + c2 k)y1 (t) = Ky1 (t),
where K = c1 + c2 k. So if y1 and y2 are linearly dependent then the solution (3.11) really only contains one
constant and one function. For this reason to find the general solution of (3.9) we always need to find two
functions y1 and y2 which are linearly independent, for which it is sufficient that y1 and y2 are not scalar
multiples of each other.
Be aware that linear independence is more involved when we have three or more vectors or functions. We
will consider that case in the next chapter.
Reduction of Order
Sometimes it is possible to find one solution y1 (t) to (3.9) by inspection or some other technique. Reduction
of order is a technique which uses the first solution to find a second solution and hence the general solution.
It works by using the known solution to reduce the order of the ODE from a second to a first order ODE.
The first order ODE is solved using the techniques of the previous chapter.
Here is how reduction of order works in general. Suppose that (3.9) has a solution y1 (t) so
a(t)y100 + b(t)y10 c(t)y1 = 0.
To find the general solution, we suppose it has the form
y(t) = u(t)y1 (t)
for some unknown function u(t), but where y1 (t) and y(t) both solve the ODE (3.9) and y1 (t) is a known
function. Now, lets differentiate y(t) twice:
y 0 (t) = u0 (t)y1 (t) + u(t)y10 (t)
y 00 (t) = u00 (t)y1 (t) + 2u0 (t)y10 (t) + u(t)y100 (t).
Then since y and y1 both solve the ODE (3.9) we obtain
0 = a(t)y 00 + b(t)y 0 + c(t)y
= a(t)(u00 y1 + 2u0 y10 + uy100 ) + b(t)(u0 y1 + uy10 ) + c(t)uy1
i
h
= a(t)y1 u00 + (2a(t)y10 + b(t)y1 )u0 + a(t)y100 + b(t)y10 + c(t)y1 u
{z
}
|
=0

= a(t)y1 u00 + (2a(t)y10 + b(t)y1 )u0 .


Now we make the substitution v = u0 . Then we need to solve the ODE
0 = a(t)y1 (t)v 0 + (2a(t)y10 (t) + b(t)y1 (t))v
(where a(t), b(t) and y1 (t) are known functions) to find v(t), then solve u0 = v to find u. Finally, y(t) =
u(t)y1 (t).
[Add example where one solution y1 can be found by inspection, and then y2 can be found by reduction
of order]

56

CHAPTER 3. SECOND ORDER ODES AND IVPS

Historical Aside
To try to solve (3.9), Riccati (1723) proposed to let the solution have the form
Z t
y(t) = exp(
p(s)ds),
t0

where p(t) is a function that we need to determine. But differentiating



Z t
p(s)ds = p(t)y(t),
y 0 (t) = p(t) exp
t0

so
y 00 (t) = p0 (t)y(t) + p(t)y 0 (t) = p0 (t)y(t) + [p(t)]2 y(t).
Now (3.9) becomes
0 = a(t)y 00 + b(t)y 0 + c(t)y
h
i
= a(t) p0 (t)y(t) + [p(t)]2 y(t) + b(t)p(t)y(t) + c(t)y(t),
and assuming that y 6= 0
h
i
0 = a(t) p0 (t) + [p(t)]2 + b(t)p(t) + c(t).

(3.12)

Thus the problem of solving the linear second order ODE (3.9) is reduced to solving the nonlinear first
order ODE (3.12). Unfortunately the nonlinear ODE (3.12) is not easy to solve in general. However,
there are two nice special cases.
1) If a(t) and b(t) and c(t) are constant then (3.12) becomes
h
i
0 = p0 (t) + [p(t)]2 + bp(t) + c,
which is separable, so we can solve to find p(t) and hence y(t). However when a, b and c are all
constants then the original ODE (3.9) does not depend on the independent variable t and so is of
the form (3.5) which we already saw how to solve. However we will see an easy better way to solve
the constant coefficient homogeneous ODE shortly.
2) If c(t) = 0, then the ODE (3.12) is a Riccati equation with n = 2 and we saw in the last chapter that
1
we can solve this by substituting v(t) = p(t)
which transforms (3.12) into a linear first order ODE.
1
Then solve for v(t) hence for p(t) = v(t) and hence for y(t). However we note also that if c(t) = 0
then (3.9) is of the from (3.3) which we already saw how to solve.

3.2.2

Constant Coefficient Linear Homogeneous Second Order ODEs

Now we consider the solution of the linear, second-order, constant-coefficient homogeneous ODE
ay 00 + by 0 + cy = 0 a, b, c R,

(3.13)

where a, b and c are given constants. Since (3.13) is a special case of (3.9) the principle of superposition
applies and we will seek a general solution
y(t) = k1 y1 (t) + k2 y2 (t),

(3.14)

where y1 and y2 both solve (3.13) and are linearly independent (so one is not a constant multiple of the
other).

3.2. LINEAR HOMOGENEOUS SECOND ORDER ODES

57

Since (3.13) is of the form (3.5) we could try to solve it by the substitution suggested for ODEs of the
form (3.5). However, solving (3.13) that way gets very involved, so we will take a shortcut.
Recalling that the general solution of ay 0 + by = 0 is an exponential of the form y(t) = Cert for r = b/a,
and noting that if y = ert then the derivatives of y will also all contain factors of ert (which will simplify
(3.13)) we guess that (3.13) has a solution with
y(t) = ert ,
for some constant r R which we will need to determine. Then differentiating gives
y 0 = rert ,

y 00 = r2 ert .

and

Substituting these into (3.13) we get


0 = ay 00 + by 0 + cy
= ar2 ert + brert + cert
= (ar2 + br + c)ert .
But ert 6= 0 so y = ert is a solution to (3.13) if and only if
ar2 + br + c = 0.

(3.15)

Equation (3.15) is called the Auxiliary equation or Characteristic equation for (3.13), and we have reduced
the problem of solving the second order ODE (3.13) to finding the roots of a quadratic equation. This is
good news because quadratic equations are easy to solve!
We can then use the quadratic formula to find r that solves (3.15). There are three cases to consider,
corresponding to the three possibilities for the discriminant:
i) If b2 > 4ac there are two real roots r1 6= r2 .
ii) If b2 = 4ac There is one repeated root r1 = r2 = b/2a.
iii) If b2 < 4ac there are no real roots but there are two complex roots r = i where and are real.
Auxiliary Equation has distinct roots
If b2 > 4ac the auxiliary equation (3.15) has two roots given by
r1 =

b +

b2 4ac
2a

r2 =

b2 4ac
.
2a

(3.16)

Then
y 1 = e r1 t

and

y 2 = e r2 t ,

both solve (3.13). Moreover these two solutions are linearly independent since
y2
e r2 t
= r1 t = e(r2 r1 )t ,
y1
e
but since r2 r1 6= 0 (because b2 4ac 6= 0) then y2 /y1 is not a constant. Thus the general solution of (3.13)
is
y(t) = k1 y1 + k2 y2 = k1 er1 t + k2 er2 t ,
(3.17)
where r1 and r2 are defined by (3.16).

58

CHAPTER 3. SECOND ORDER ODES AND IVPS

Auxiliary Equation has repeated roots


Suppose b2 = 4ac. Then the auxiliary equation (3.15) has one repeated root with
r=

b
.
2a

This defines one solution of (3.13) given by


y1 (t) = ert = ebt/2a ,
which is great, but, for a second-order ODE, we need to find two functions that solve (3.13) to find the
general solution. We will use reduction of order to find a second solution. Hence we look for a solution
y(t) = u(t)y1 (t) = u(t)ert .
Then
y 0 = u0 ert + ruert
y 00 = u00 ert + 2ru0 ert + r2 uert .
Then equation (3.13) becomes
0 = ay 00 + by 0 + cy
h
i
h
i
= a u00 ert + 2ru0 ert + r2 uert + b u0 ert + ruert + cuert
h i
h
i
h
i
= ert a u00 + ert 2ra + b u0 + ert ar2 + br + c u.
But r satisfies the characteristic equation so ar2 + br + c = 0. Moreover we have r = b/2a as a repeated
root of the characteristic equation so also 2ra + b = 0. Thus
0 = aert u00 .
But since we assume the constant a 6= 0 (otherwise (3.13) is a first order ODE) and ert is never zero we must
have
u00 = 0.
Hence
u0 = c2 ,
and
u = c2 t + c1 .
Hence
y(t) = u(t)y1 (t) = (c2 t + c1 )ert

(3.18)

solves the ODE (3.13) when (3.15) has repeated roots r = b/2a. If we let
y2 (t) = tert ,
then y2 (t) solves (3.13) because it is of the form (3.18) with c2 = 1 and c1 = 0 then we obtain the general
solution
y(t) = k1 y1 (t) + k2 y2 (t) = k1 ert + k2 tert ,
(3.19)
(which also corresponds to (3.18)). Note here that the functions y1 and y2 are linearly independent since
y2 /y1 = t which is not constant.

3.2. LINEAR HOMOGENEOUS SECOND ORDER ODES

59

Auxiliary Equation has Complex Roots


If b2 < 4ac the auxiliary equation (3.15) has no real roots, but it does have two complex roots. Let

b
b2 4ac
4ac b2
b
r+ =
+
=
+i
= + i,
2a
2a
2a
2a

b
b2 4ac
b
4ac b2
r =

=
i
= i,
2a
2a
2a
2a

where and are real (with = b/2a and = + 4ac b2 /2a. This defines two complex solutions
y+ (t) = e(+i)t

y (t) = e(i)t ,

but since we are solving an ODE posed with real parameters, we want real solutions to (3.13). We will
use Superposition of Solutions to recover real solutions. First we will rewrite the solution in a form more
tractable for our purposes. Note that
e(i)t = et eit ,
and recall Eulers formula
ei = cos + i sin

(3.20)

Thus
eit = cos(t) + i sin(t)
eit = cos(t) + i sin(t) = cos(t) i sin(t).
So we can rewrite the solutions y+ and y as
y+ (t) = et eit = et [cos(t) + i sin(t)]

andy (t) = et eit = et [cos(t) i sin(t)].

But by Theorem 3.2.1 any linear combination of y+ (x) and y (x) is also a solution of (3.13). Noticing that
the complex parts cancel when we add y1 (t) and y2 (t) we define
1
1
1
1
y+ (t) + y (t) = et [cos(t) + i sin(t)] + et [cos(t) i sin(t)] = et cos(t)
(3.21)
2
2
2
2
which is a real solution y1 (t) of (3.13) by Theorem 3.2.1 (applying the theorem with c1 = c2 = 1/2). To find
the other real solution, consider the difference of y+ and y , multiplied by i/2 (youll see why):
y1 (t) =

i
y2 (t) = (y+ (t) y (t)) = et sin(t).
(3.22)
2
Thus we have two real solutions y1 (t) and y2 (t) to (3.13) even in the case where the auxiliary equation has
complex roots. Moreover, y2 (t)/y1 (t) = tan(t) where 6= 0 (because b2 < 4ac) so these solutions are
linearly independent. Thus in this case we have the general solution
y(t) = k1 y1 (t) + k2 y2 (t) = et [k1 cos(t) + k2 sin(t)],

(3.23)

where the auxiliary equation (3.15) has complex roots r = i, and k1 and k2 are arbitrary constants.
Example 3.2.3
Consider the ODE
y 00 3y 0 + 2y = 0,
Assume that y = ert , and substitute into the ODE to get
0 = r2 ert 3rert + 2ert = ert (r2 3r + 2)
thus we obtain the Characteristic Equation or Auxiliary Equation
r2 3r + 2 = 0.

60

CHAPTER 3. SECOND ORDER ODES AND IVPS

But there is no need to derive this every time; its okay to write the auxiliary equation down directly.
Now
0 = r2 3r + 2 = (r 2)(r 1),
so r = 2 or r = 1 therefore the general solution is
y(t) = c1 et + c2 e2t .

Example 3.2.4
Consider the homogeneous ODE
y 00 2y 0 + y = 0,
which has auxiliary equation
r2 2r + 1 = 0,
or (r 1)2 = 0 so r = 1 is a repeated root. Thus the general solution is
y(t) = (c1 + c2 t)et .

Example 3.2.5
Consider the homogeneous ODE
y 00 + 4y 0 + 7y = 0
with auxiliary equation
r2 + 4r + 7 = 0
which has roots
r=
Thus the general solution is

16 28
= 2 3i = i.
2

y(t) = e2t [c1 cos( 3t) + c2 sin( 3t)].

(Dont forget minus sign if is negative ( is always positive))

3.2.3

Summary for Homogeneous Linear Constant Coefficient Second Order


ODE

For the Homogeneous Linear Constant Coefficient Second Order ODE


ay 00 + by 0 + cy = 0,
we assume y = ert to obtain the Characteristic/Auxiliary equation:
ar2 + br + c = 0.
There are three cases
b2 4ac > 0
2 real roots r1 , r2
y(t) = c1 er1 t + c2 er2 t

3.3. LINEAR SECOND ORDER NONHOMOGENEOUS ODES

61

b2 = 4ac
One repeated root r
y(t) = (c1 + c2 t)ert
b2 < 4ac
2 complex roots r = i
y(t) = et [c1 cos(t) + c2 sin(t)]
Notice that in the case of repeated roots that y(t) 0 as t + if r < 0 (since ert 0 in this case)
but that |y(t)| as t + if r > 0. In the case of complex roots we have y(t) 0 as t 0 if
Re(r) = < 0, from the behaviour of the et term. However in contrast to the repeated roots case this
convergence will be oscillatory because of the
k1 cos(t) + k2 sin(t)
term in the solution. If = 0 so r = i is purely imaginary then y(t) defines a periodic oscillation with
period 2/. If > 0, we obtain an oscillation which is growing with t.
In the case of distinct real roots y(t) 0 as t + if r1 and r2 are both negative. If r1 > 0 > r2 , ie
one root is positive and the other is negative then some solutions satisfy y(t) 0 as t +, namely those
with c1 = 0, but for all other solutions with c1 6= 0 we have |y(t)| as t +.

3.3

Linear Second order nonhomogeneous ODEs

Now we consider the linear nonhomogeneous constant coefficient Second Order ODE
ay 00 + by 0 + cy = g(t)

(3.24)

for a given function g(t).


Suppose y1 and y2 are linearly independent and solve (H)
ay 00 + by 0 + cy = 0

(H)

and that yp (x) is some particular solution of (N ). Then let


y = c1 y1 (x) + c2 y2 (x) + yp (x)
y 0 = c1 y10 + c2 y20 + yp0
y 00 = c1 y100 + c2 y200 + yp00
Then
ay 00 + by 0 + cy = c2 (

ay100 + by10 + cy1


{z
}
|

) + c2 (

=0 because y1 solves (H)

ay 00 + by20 + cy2
| 2
{z
}

=0 because y2 solves (H)

)+(

ayp00 + byp0 + cyp


|
{z
}

=g(x) because yp solves (N)

Hence
ay 00 + by 0 + cy = g(x)
and so y solves (N). Hence let
yc = c1 y2 + c2 y2
be the general solution of (H), often called the complementary solution, and let yp solve (N), then
y = yc + yp
will be the general solution of (N). It remains to find yp some solution of (N) Well consider two ways of
doing this.

62

CHAPTER 3. SECOND ORDER ODES AND IVPS

i) Method of Undetermined Coefficients


ii) Variation of Parameters
1) Find linearly independent y1 and y2 such that Ly1 = 0 and Ly2 = 0
2) Find yp such that Lyp = g
3) General solution is y = c1 y1 + c2 y2 + yp
Important: yp is not multiplied by an arbitrary constant
To find yp

3.3.1

The Method of Undetermined Coefficients

This method also called method of undetermined coefficients or the method of undetermined constants is
used to find a particular solution of the constant coefficient nonhomogeneous ODE
ay 00 + by 0 + cy = g(t),

(3.25)

where a, b and c are


This only works for certain functions g(x). When it does work, its a simple method. However, you need
to guess the form of the solution, which then results in algebraic equations to solve for the undetermined
coefficients. If you guess the wrong form for the particular solution yp , this set of algebraic equations will
have no solution.
Before giving a general table, lets consider some examples
Example 3.3.1
5y 00 + 3y 0 + y = 7 Notice y = 7 solves this equation. Let
yp = 7
, then
Lyp = 7
Now to find the general solution,
Ly = 0 5y 00 + 3y 0 + y = 0
y = yc + yp = c1 y1 + c2 y2 + 7
where
y1 and y2
satisfy
Ly1 = Ly2 = 0

Example 3.3.2
y 00 + 2y 0 + y = 2x
If g(x) is a polynomial of degree n in x, let
(x) = pn (x)

3.3. LINEAR SECOND ORDER NONHOMOGENEOUS ODES

a general polynomial of degree n in x. i.e.


y(x) =

n
X

j xj

j=0

and substitute this into the ODE to find i for i = 0, 1, 2, ..., n.


In the example above,
yp = ax + b
yp0 = a
yp00 = 0
yp00 + 2yp0 + yp = 0 + 2a + [ax + b]
= g(x)
ax + 2a + b = 2x
Two polynomials agree when all of their coefficients agree. Equate like coefficients (ELC)
x0 ] 2a + b = 0 b = 2a = 4
x1 ] a = 2
So yp = 2x 4 (exercise, check that yp = 2x 4 satisfies Ly = 2x)

Example 3.3.3
y 00 + 3y 0 + 2y = e2x
Guess
yp (x) = Ae2x yp0 = 2Ae2x
and
yp00 = 4Ae2x
so
Lyp = 4Ae2x + 3(2Ae2x ) + 2(Ae2x ) = 12Ae2x
So
Lyp = e2x
is
A = 1/12
and so particular solution is
yp (x) = 1/12e2x
and general solution is
y(x) = c1 ex + c2 e2x + 1/12e2x
(Since auxilary equation is r2 + 3r + 2 = 0).
Problems arise when g(x) solves Lg(x) = 0

63

64

CHAPTER 3. SECOND ORDER ODES AND IVPS


Example 3.3.4
Consider Ly = y 00 2y 0 + y = 4ex = g(x)
Auxilary equation
r2 2r + 1 = 0 (r 1)2 = 0
So complementary solution yc (x) to Lyc (x) = 0 is
yc (x) = (c1 + c2 x)ex
To solve
Lyp (x) = g(x) = 4ex
If we guess
yp (x) = Aex A
, then
yp0 = Aex = yp00
so
Lyp = yp00 2yp0 + yp = Aex 2Aex + Aex = 0
so
Lyp (x) 6= 4ex
for any choice of A. This occurs because our guess for yp is equal to one of the two independent solutions
of the homogeneous equation Ly = 0. In this case, we guess a yp (x) by taking g(x) and mulitplying by
xs for the smallest positive integer such that xs ex does not solve the homogeneous equation Ly = 0. So
here, both ex and xex solve Ly = 0 so we guess
yp (x) = Ax2 ex
Then
yp0 (x) = 2Axex + Ax2 ex
yp00 (x) = 3Aex + 4Axex + Ax2 ex
So
Lyp = yp00 2yp0 + yp
= x2 [Aex 2Aex + Aex ] + x[4Aex 4Aex ] + 2Aex
{z
}
|
{z
}
|
L(ex )=0

L(xex )=0

Hence Lyp (x) = 2Aex so letting A = 2 ensures


Lyp (x) = 4ex
as required and general solution is
y(x) = (c1 + c2 x + 2x2 )ex

Example 3.3.5
y 00 + y = 2 sin(3x) To find a particular solution yp (x), which solves Lyp (x) = 2 sin(3x), Let
yp (x) = A sin(3x) + B cos(3x)

3.3. LINEAR SECOND ORDER NONHOMOGENEOUS ODES

yp0 = 3A cos(3x) 3B sin(3x)


yp00 = 9A sin(3x) 9B cos(3x)
So
2sin(3x) = yp00 yp0 + yp
= sin(3x)[9A (3B) + A] + cos3x[9B 3A + B]
= [3B 8A] sin(3x) (3A + 8B)cos3x
Hence we require
2 = 3B 8A
0 = 3A + 8B
B=

6
73

A = 16
73 so
yp (x) =

16
6
sin(3x) +
cos(3x)
73
73

and general solution will be


y(x) = yc (x) + yp (x)
where yc (x) solves Lyc (x) = 0

Method of Undetermined Coefficients: Summary

Pn
Let p(x) = j=0 aj xj be a given polynomial with an 6= 0 and n > 0
g(x)
yp (x)
s
n
p(x)
x (An x + An1 xn1 + + A1 x + A0 )
x
e
xs Aex
x
s
n
n1
p(x)e
x (An x + An1 x
+ + A1 x + A0 )ex
x
p(x)e sin(x)
or
xs (An xn + An1 xn1 + + A1 x + A0 )ex sin(x)
x
p(x)e cos(x) +xs (Bn xn + Bn1 xn1 + + B1 x + B0 )ex cos(x)

65

66

CHAPTER 3. SECOND ORDER ODES AND IVPS


Note
1) The first three cases are all special cases of the last case if and or = 0
2) s = 0 if + i is not a root of the characteristic equation. Otherwise, s is the multiplicity of this
root. (Alternatively, s is the smallest positive integer so that yp does not solve Lyp = 0)
3) Really important: In this method, if you make a wrong guess for yp or an algebraic slip or misdifferentiate, you will get equations defining the unknown constants such that the equations have no
solution. In this case, do not pretend that there is a solution.
4) To solve Ly(x) = g1 (x) + g2 (x) where g1 and g2 are of the forms given above, look for separate
particular solutions yp1 (x) and yp2 (x) to Lyp1 = g1 (x) and Lyp2 = g2 (x), then L[yp1 + yp2 ] =
Lyp1 + Lyp2 = g1 + g2 and so yp1 + yp2 is required particular solution.
5) Using (4), we see that method can also be applied when g(x) = cosh(x) or sinh(x) since sinhx =
(ex ex )/2 and cosh(x) = (ex + ex )/2
6) This method fails miserably if
i) a,b, or c are not constant where Ly = ay 00 + by 0 + cy Do not use undetermined coefficients if
a(x), b(x) or c(x) are not constant!
ii) g is not a sum of expressions of the form given above

Aside: Essentially to work, the method requires we can make a guess yp such that when we compute Lyp ,
the derivatives do not introduce new functions.
Example 3.3.6
g(x) = ln x, guessing yp = A ln x introduces n1 and x2 terms in the ODE which cant be cancelled
out unless your constants A = 0.

Linear Operator Notation


Its tedious to write ay 00 + by 0 + cy every second line. Let
C(R)
be the space of continuous functions on the real line and
C p (R)
the space of p-times continuously differentiable functions on R, and define
D : C p+1 (R) C p (R)
by Dy = y 0 (i.e. D is the differentiation operator)
Clearly,
C p (R) C p+1 (R)
and
C(R) C 1 (R) C 2 (R)
D is a linear operator. To see this, let
y1 and y2 C p+1 (R)

3.3. LINEAR SECOND ORDER NONHOMOGENEOUS ODES

67

and k a scalar. We need to show that


D(Ky1 ) = KD(y1 )
D(y1 + y2 ) = D(y1 ) + D(y2 )
Here, D(Ky1 ) and KD(y1 ) are both functions in C p (R), and to check equality, we must evaluate them
at each x R
D(Ky1 )(x) =

d
d
(Ky1 (x))|x = K (y1 (x))|x = Ky10 (x) = KD(y1 )(x)
dx
dx

Also
D(y1 + y2 ) =

d
dy1
dy2
(y1 + y2 ) =
+
= D(y1 ) + D(y2 )
dx
dx
dx

Now let L : C p+2 (R) C p (R) be defind by


L = a(x)D2 + b(x)D + c(x)
Then
Ly = (a(x)D2 + b(x)D + c(x))y
= a(x)D2 y + b(x)Dy + c(x)y
= a(x)y 00 + b(x)y 0 + c(x)y
So now, the ODEs
a(x)y 00 + b(x)y 0 + c(x)y = 0
a(x)y 00 + b(x)y 0 + c(x)y = g(x)
can be written as find y C 2 (R) such that
Ly = 0

(H)

Ly = g

(N)

Notice that if g is a continuous function of x, then g(x) C(R). While if y(x) C 2 (R), then Ly C(R)
and we can hope to solve Ly = g. However, if g C p (R) and y C 2 (R), then Ly C(R), so unless p = 0,
we cannot solve Ly = g with y C 2 . Turn this argument around. If g C p (R), we must have y C p+2 (R).
In particular, if g C (R) then y C (R)!!
Remark: I already used the linearity of L above (where?), but this is easy to see. (exercise)

Consider: L(c1 y1 ) = cL(y1 ) and L(y1 + y2 ) = L(y1 ) + L(y2 )


Now we write the nonhomogeneous equation as
Ly = g
Suppose Ly1 = 0 and Ly2 = 0 (Here, 0 is the zero function)
(i.e. yc = c1 y1 + c2 y2 is complementary solution and general solution of Ly = 0) Now if Lyp = g, then
L(c1 y1 + c2 y2 + yp ) = c1 Ly1 +c2 Ly2 +Lyp = Lyp = g
|{z}
|{z}
=0

So to solve Lyp ,

=0

68

3.3.2

CHAPTER 3. SECOND ORDER ODES AND IVPS

Variation of Parameters

This is a powerful technique which we will use to find particular solutions yp (x) which solve (3.25) for
general g(x) (whereas the method of undetermined coefficients only works for certain g(x)). We can also use
Variation of Parameters to find yp (x) which solves
a(x)y 00 + b(x)y 0 + c(x)y = g(x)

(3.26)

provided two linearly independent solutions y1 (x), y2 (x) are known for the corresponding homogeneous
equation
a(x)y 00 + b(x)y 0 + c(x)y = 0.
(3.27)
Variations of the method of variation of parameters are used frequently in applied mathematics.
Derivation of Method
Let
L[y](x) = a(x)y 00 (x) + b(x)y 0 (x) + c(x)y(x)

(3.28)

yc (x) = c1 y1 (x) + c2 y2 (x).

(3.29)

and suppose
solves Lyc (x) = 0 with y1 and y2 linearly independent for all x I R.
The main idea in variation of parameters is to assume that the solution of Lyp (x) = g(x) can be written in
a similar form to (3.29) but replacing the constants by variables hence the name variation of parameters.
Thus we let
yp (x) = u1 (x)y1 (x) + u2 (x)y2 (x)
(3.30)
where u1 (x) and u2 (x) are unknown functions that we must determine. We do this by assuming that
Lyp (x) = g(x) and solving for u1 (x) and u2 (x). Then
yp0 (x) = [u01 y1 + u02 y2 ] + [u1 y10 + u2 y20 ]
yp00 (x) = [u01 y1 + u02 y2 ]0 + [u1 y100 + u2 y200 + u01 y10 + u02 y20 ].
Hence
g(x) = Lyp (x)
= a(x)[u01 y1 + u02 y2 ]0 + b(x)[u01 y1 + u02 y2 ] + a(x)[u01 y10 + u02 y20 ]
+ u1 (x)[a(x)y100 + b(x)y10 + c(x)y1 ] + u2 (x)[a(x)y200 + b(x)y20 + c(x)y2 ]
{z
}
{z
}
|
|
=L[y1 ]=0

=L[y2 ]=0

So we need to solve
g(x) = a(x)[u01 y1 + u02 y2 ]0 + b(x)[u01 y1 + u02 y2 ] + a(x)[u01 y10 + u02 y20 ]

(3.31)

But here, we have only one equation to determine two unknown functions u1 and u2 . So this problem is
under-determined and likely has many solutions. Since we only need to find one particular solution to solve
the nonhomogeneous problem (3.26) we will impose a constraint on the solutions u1 and u2 to simplify our
task. Since (3.31) looks complicated we will assume that
u01 y1 + u02 y2 = 0,

x I.

(3.32)

But this also implies that [u01 y1 + u02 y2 ]0 = 0 and hence (3.31) simplifies and we obtain the simultaneous first
order differential equations
u01 y1 + u02 y2 = 0,
u01 y10 + u02 y20 =

g(x)
:= f (x).
a(x)

3.3. LINEAR SECOND ORDER NONHOMOGENEOUS ODES

69

Since y1 (x), y2 (x), g(x) and a(x) are all known functions, for any x I we can solve these simultaneous
equations to find u01 (x) and u02 (x). Write

 0
 

y1 (x) y2 (x)
u1 (x)
0
=
y10 (x) y20 (x)
u02 (x)
f (x)
Then inverting the matrix
 0
 
1 

u1 (x)
y1 (x) y2 (x)
0
=
u02 (x)
y10 (x) y20 (x)
f (x)
 0


1
y2 (x) y2 (x)
0
=
y1 (x)
f (x)
y1 (x)y20 (x) y2 (x)y10 (x) y10 (x)


1
y2 (x)f (x)
.
=
0
0
y1 (x)f (x)
y1 (x)y2 (x) y2 (x)y1 (x)
Let




y1 (x) y2 (x)
y1 (x) y2 (x)
0
0


=
y10 (x) y20 (x) = y1 (x)y2 (x) y1 (x)y2 (x).
y10 (x) y20 (x)

W (y1 , y2 )(x) = det

Then provided W (y1 , y2 ) 6= 0 we have


u01 (x) =

y2 (x)f (x)
,
W (y1 , y2 )(x)

u02 (x) =

y1 (x)f (x)
.
W (y1 , y2 )(x)

(3.33)

Now u1 (x) and u2 (x) are found by integration, then


yp (x) = u1 (x)y1 (x) + u2 (x)y2 (x).
The function W (y1 , y2 )(x) is called the Wronskian of y1 and y2 . This technique requires that W (y1 , y2 )(x) 6=
0 for all x I. It is easy to see that Variation of Parameters will fail if y1 and y2 are linearly dependent
since if we can write y2 (x) = ky1 (x) for all x I then y20 (x) = ky10 (x) also and then
W (y1 , y2 )(x) = y1 (x)y20 (x) y10 (x)y2 (x) = y1 (x)[ky1 (x)] y10 (x)ky1 (x) = 0,

x I.

The converse result that W (y1 , y2 )(x) 6= 0 for all x I when y1 and y2 are linearly independent is part of
Abels Theorem which we will see soon.
Example 3.3.7
4y 00 + 36y =

1
sin 3x

= cosec(3x)
y 00 + 9y =

1
4 sin 3x

Auxiliary equation:
r2 + 9 = 0

r = 3i

Let y1 = cos 3x and y2 = sin 3x and


yc = c1 cos 3x + c2 sin 3x
let
yp = u1 (x)y1 (x) + u2 (x)y2 (x) = u1 (x) cos 3x + u2 (x) sin 3x
Then


|y y2

W (y1 , y2 )(x) = 01
y1 y20

cos 3x
=
3 sin 3x


sin 3x
3 cos 3x

= 3 cos2 (3x) + 3 sin2 (3x) = 3

70

CHAPTER 3. SECOND ORDER ODES AND IVPS

u0 (x) =

y2 (x)f (x)
1
1
= sin 3x
=
W (y1 , y2 )(x)
4 sin 3x
12

So
u1 (x) = x/12
Note that we do not need an arbitrary constant in u1 (x). Beware, f (x) is defined as the right hand side
when the coefficient of y 00 on the left hand side is 1.


y1 (x)f (x)
cos 3x
1
1 3 cos 3x
0
u2 (x) =
=

=
W (y1 , y2 )(x)
3
4 sin 3x
36 sin 3x
so
1
u2 (x) =
ln | sin 3x|
36
and
yp (x) = u1 y1 + u2 y2
1
x
sin 3x ln |sin3x|
= cos3x +
12
36
and general solution is
y(x) = c1 cos 3x + c2 sin 3x

x
1
cos 3x +
sin 3x ln | sin 3x|
12
36

Example 3.3.8
(1 x)y 00 + xy 0 y = ln(x)
First, let Ly = (1 x)y 00 + xy 0 y.
Consider Ly = 0. There is no general solution technique for such non-constant coefficient problems, but
by inspection, (1 x)y 00 + xy 0 y = 0 has a solution
y1 (x) = x
Now we can find a second solution using Reduction of Order. Let y2 (x) = u(x)y1 (x) = xu(x) then
y20 = xu0 + u
y200 = xu00 + 2u0
and assuming y2 solves Ly2 = 0, we have
0 = (1 x)y200 + xy20 y2
= (1 x)(xu00 + 2u0 ) + x(xu0 + u) xu
= (1 x)xu00 + (2 2x + x2 )u0
Let v = u0 so
0 = (1 x)xv 0 + (2 2x + x2 )v = 0


x
2
0
+
v=0
0=v +
x 1x

3.3. LINEAR SECOND ORDER NONHOMOGENEOUS ODES

71

This has an IF
=e
=

2
x
x + 1x dx

=e

2
1
x 1+ 1x dx

= e2ln(x)xln(1x)

x2 x
e
1x

Then
0=

 2 x 0
d
vx e
=0
[u] =
dx
1x
vx2 ex
=c
1x
cex (1 x)
x2
cex
u=
+d
x

u0 = v =

Let c = 1 and d = 0 so u = ex /x then


y2 (x) = u(x)y1 (x) =

ex
x = ex
x

Exercise: check that y2 (x) = ex solves Ly2 = 0. So now general solution to Ly = 0 is


y(x) = c1 x + c2 ex
To solve Ly = ln(x), use Variation of Parameters



y y2 x e x


= xex ex = (x 1)ex
=
W = 10
y1 y20 1 ex
Now
u01 (x) =

y2 (x)f (x)
ex ln(x)
=
W (y1 , y2 )(x)
(x 1)ex 1 x

in f (x) because coefficient of y 00 was (1 x)


So
u01 (x) =
u02 (x) =

ln(x)
(x 1)2

y1 (x)f (x)
x
ln(x)
x
=
=
ex ln x
W (y1 , y2 )(x)
(x 1)ex 1 x
(x 1)2

Then
yp (x) = u1 (x)y1 + u2 (x)y2
Z x
Z x
(ses ln s)
ln(s)
x
=x
ds

e
ds
2
2
x0 (s 1)
x0 (s 1)
We have not considered initial value problems for second order ODEs because well do this for nth order
equations below, but consider
a(x)y 00 + b(x)y 0 + c(x)y = f (x)
has general solution
y(x) = c1 y1 (x) + c2 y2 (x) + yp (x)
To specify a unique solution, we need two pieces of information to determine c1 and c2 . But considering

72

CHAPTER 3. SECOND ORDER ODES AND IVPS

the ODE itself to evaluate y 00 (x0 ) at some initial point x0 , we require y 0 (x0 ) and y(x0 ). So the initial value
problem is to solve Ly = f (x) with y(x0 ) = and y 0 (x0 ) = specified. You do by solving for the general
solution, then evaluating y(x0 ) and y 0 (x0 ) to get simultaneous linear equations to determine c1 and c2 .

Chapter 4

nth Order ODEs


Let y (n) denote

dn y
. We will briefly consider the general nonlinear nth order ODE
dxn
y (n) = f (x, y(x), y 0 (x), ..., y (n1) (x)),

but will concentrate on the nth order linear ODE


y (n) + p1 (x)y (n1) + ... + pn1 y 0 + pn (x)y = g(x).
If we wish to solve either of these as an IVP starting from x0 , then we must specify the n initial values
y(x0 ) = 1 ,

y 0 (x0 ) = 2 ,

...

y (n1) (x0 ) = n ,

simply to evaluate f (x0 , y(x0 ), y 0 (x0 ), ..., y (n1) (x) )), in order to determine the value of y (n) (x0 ). This also
turns out to be sufficient to specify a unique solution of the IVP provided f is sufficiently well behaved.

4.1

Nonlinear nth order ODEs

If we consider the general nonlinear nth order ODE


y (n) = f (x, y(x), y 0 (x), ..., y (n1) (x))

(4.1)

as an initial value problem by requiring that


y(x0 ) = 1 ,

y 0 (x0 ) = 2 ,

...

y (n1) (x0 ) = n ,

(4.2)

for n given real constants 1 , 2 , . . . , n , then we can prove existence and uniqueness using Picard iteration.
Theorem 4.1.1
If f (x, y1 , y2 , ..., yn ) and

f
yj

are continuous on the box

R : |x x0 | 6 a and |yi ci | 6 b for i = 1, 2, ..., n


then the IVP (4.1) with initial conditions (4.2) has a unique solution y(x) for x [x0 h, x0 + h] for
some h (0, a] with
y(x) R
x [x0 h, x0 + h]

We already proved this theorem in the case n = 1. The proof for general n is conceptually similar, and
uses Picard iteration again. But the proof involves norms of functions on Rn , and I do not want to introduce
those in this course. So we will skip the proof, and we will not rely on this theorem in later sections.
73

CHAPTER 4. N TH ORDER ODES

74

Although we do not prove Theorem 4.1.1, the first step in the proof is interesting and worth knowing.
Recall that in the n = 1 case we began by applying the fundamental theorem of calculus. To do that here,
we must first reformulate the problem, by making a change of variables. Let
u1 = y,

u2 = y 0 ,

and let

u3 = y 00 ,

...

un = y (n1)

u1 (t)
u2 (t)

u(t) = . ,
..
un (t)
n

so u(t) R . Then


0
y (t)
u2 (t)
u01 (t)

u02 (t) y 00 (t)


u3 (t)


u0 (t) = . = .. =
:= F (t, u).
..

.. .
.
0
(n)
f (t, u1 (t), u2 (t), ..., un (t))
un (t)
y (t)

So now we have u0 (t) = F (t, u) where u(t) Rn and F : R Rn Rn . This is the form we considered in
the scalar case, except now u and F (t, u) are vectors. The fundamental theorem of calculus still gives
Z

u(t) = u(t0 ) +

F (s, u(s))ds,
t0

and we can apply Picard iteration as before.


Unfortunately, there is no general technique for writing down closed form solutions to nth order nonlinear
ODEs. Even the case n = 3 can lead chaotic dynamics. The famous Lorenz attractor and Lorenz equations
are an example of a chaotic dynamical system which is generated by a system of three first order scalar
differential equations, which can also be written as a scalar third order nonlinear autonomous ODE.
There are many techniques for studying such differential equations, which include dynamical systems
theory which studies the properties of solutions (without actually needing to derive the actual solution), and
numerical analysis which can be used to find a numerical approximation to the solution. Dynamical systems
is taught in Math 376 or 574, and numerical analysis in MATH 387 or MATH 578.

4.2

Linear nth order ODEs

Now we consider the general linear nth order ODE


y (n) + p1 (x)y (n1) + ... + pn1 y 0 + pn (x)y = g(x)

(4.3)

as an initial value problem with


y(x0 ) = 1 ,

y 0 (x0 ) = 2 ,

...

y (n1) (x0 ) = n ,

(4.4)

for n given real constants 1 , 2 , . . . , n . Here the functions pi (x) are given, and we assume that pi (x) for
i = 1, . . . , n and g(x0 are continuous on some interval I R with x0 I.
It is convenient to define the linear operator L[y] by
L[y] = y (n) + p1 (x)y (n1) + ... + pn1 y 0 + pn (x)y
then (4.3) becomes simply L[y] = g.

(4.5)

4.2. LINEAR NTH ORDER ODES

75

We will require the following lemma. It is quite technical, and I include it for completeness. Most texts
skip this result entirely.
Lemma 4.2.1 Let (x) be any solution of the homogeneous ODE L[] = 0 on I. Let u(x) > 0 be
defined by
u(x)2 = (x)2 + 0 (x)2 + ... + (n1) (x)2 .
Then for all x I
u(x0 )ek|xx0 | 6 u(x) 6 u(x0 )ek|xx0 |
where
k =1+

n
X

(4.6)

i=1

and
i = max |pi (x)|.
xI

Proof. To follow.

With the previous lemma we can prove immediately that the linear nth order initial value problem has at
most one solution. Actually it has exactly one solution, but we are not ready to prove that stronger result
yet. Existence and uniqueness would follow immediately from Theorem 4.1.1, but since we did not prove
that result, it would be cheating to appeal to it!
Proposition 4.2.2
Let I be an interval of the real line and let x0 I, and let pi (x) for i = 1, .., n and g(x) be continuous
on I, then the IVP
L[y] := y (n) + p1 (x)y (n1) + ... + pn1 y 0 + pn (x)y = g(x),
and
y(x0 ) = 1

y 0 (x0 ) = 2

...

y (n1) (x0 ) = n ,

where i R are given for i = 1, . . . , n has at most one solution y(x) defined on the interval I.

Proof
To show that there is at most one solution let y1 and y2 both be solutions of the given IVP L[y] = g,
and let (x) = y1 (x) y2 (x). Then
L[] = L[y1 y2 ] = L[y1 ] L[y2 ] = g(x) g(x) = 0.
(i)

Moreover, (x0 ) = y1 (x0 ) y2 (x0 ) = 0 because y1 and y2 solve the same IVP, and (i) (x0 ) = y1 (x0 )
Pn1
(i)
y2 (x0 ) = 0 for i = 0, 1, . . . , n 1 for same reason. Thus u(x0 ) = i=0 [(i) (x0 )]2 = 0, and so applying
the previous lemma from (4.6) we deduce that u(x) = 0 for all x I, since the upper and lower bounds
Pn1
for u(x) both vanish. But u(x) = i=0 [(i) (x)]2 and so
(i) (x) = 0
(i)

i = 0, 1, ..., n 1
(i)

x I,

thus y1 (x) = y2 (x) and indeed y1 (x) = y2 (x) for all i = 0, 1, ..., n 1 and for all x I. i.e. y1 and y2
are the same function, and so the IVP has at most one solution.


CHAPTER 4. N TH ORDER ODES

76

4.3

Linear Homogeneous nth order ODEs

We will consider the problem L[y] = 0 where L is defined by (4.5) and construct the solution as
y = c1 y1 (x) + c2 y2 (x) + . . . + cn yn (x) =

n
X

ci yi (x)

i=1

where y1 (x), y2 (x), ..., yn (x) are a fundamental set of solutions. What is a fundamental set of solutions?
Definition 4.3.1 Fundamental set of solutions
The set of n solutions y1 (x), y2 (x), ..., yn (x) of the nth order linear homogeneous ODE Ly = 0 on an
interval I is called a fundamental set of solutions if y1 , y2 , ..., yn are linearly independent on I.

Okay, so what does it mean for y1 , y2 , ..., yn to be linearly independent?


Definition 4.3.2 Linear Independence
The function f1 , f2 , ..., fn are linearly dependent on an interval I if there exists constants k1 , k2 , ..., k0
not all 0 such that
k1 f1 (x) + k2 f2 (x) + ... + kn fn (x) = 0
x I.
(4.7)
The functions f1 to fn are linearly independent on I if they are not linearly dependent on I.

We already saw that with n = 2, when two functions are linearly dependent, then one is always a constant
multiple of the other. Life is not so simple with n > 3.
Example 4.3.3
Let f1 (x) = 1 + 2x, f2 (x) = 2 + x2 , f3 (x) = 2x2 8x then
1
2f1 (x) f2 (x) + f3 (x) = 0
2

x R

hence f1 , f2 , and f3 are linearly dependent on any interval I.


Note that although f1 , f2 , and f3 are linearly dependent in the previous example, none is a scalar multiple of
one of the others. We will need techniques to determine linear dependence or independence. The Wronskian
will be our main technique, but before we introduce that, we will show that it is possible, if tedious, to
establish linear independence from first principles.
Example 4.3.4
Let
f1 (x) = 1

f2 (x) = x

f3 (x) = x2 .

We would like to show that these are linearly independent. Consider


0 = k1 f1 (x) + k2 f2 (x) + k3 f3 (x),
which becomes
0 = k1 + k2 x + k3 x2 ,

4.3. LINEAR HOMOGENEOUS NTH ORDER ODES

77

for these functions. To show that the only solution which is valid for all x is k1 = k2 = k3 = 0 either
appeal to a sledgehammer theorem from algebra (two polynomials are equal if and only if all their
coefficients are equal) or pick convenient values of x to establish the result directly: e.g. x = 0, 1 and
+1 then 0 = k1 + k2 x + k3 x2 becomes
0 = k1 k1 = 0
0 = k1 k2 + k3

0 = k1 + k2 + k3

k2 = k3 = 0

So the only solution is k1 = k2 = k3 = 0 and these functions are linearly independent as we hoped!
Although the previous example allows us to establish linear independence, as a technique it has drawbacks.
First it cannot be used to show linear dependence, since even if there exist n values of x say x1 , . . . , xn and
n constants k1 , . . . , kn with the ki s not all zero such that
0=

n
X

fj (xi ) = 0,

i = 1, . . . , n,

j=1

Pn
this does not imply linear dependence, since there might be another value of x I for which j=1 fj (x) 6= 0.
Secondly, even to show linear independence, sometimes the xi s cannot be chosen arbitrarily.
We would like a simple test for linear independence. Here comes the Wronskian, riding to our rescue!
Definition 4.3.5 Wronskian
The Wronskian W (y1 , y2 , ..., yn )(x) of n functions y1 , y2 , ..., yn is defined by


y1 (x)
y2 (x)
y3 (x)

yn (x)
0
y1 (x)
y20 (x)
y30 (x)

yn0 (x)
00
00
00
00

y1 (x)
y
(x)
y
(x)

y
n (x)
2
3
W (y1 , y2 , ..., yn )(x) =
..
..
..
..


..


.
.
.
.
.

(n1)
(n1)
(n1)
(n1)
y
(x).
(x) y2
(x) y3
(x) ... yn
1

(4.8)

In the case n = 2, Definition 4.3.5 implies that




y (x) y2 (x)
= y1 (x)y20 (x) y10 (x)y2 (x),
W (y1 , y2 )(x) = 10
y1 (x) y20 (x)
as already seen in Variation of Parameters for second order problems.
The Wronskian is an essential tool in showing linear dependence or independence of functions. We will
prove a stronger result later (Abels theorem), but here is our first result
Theorem 4.3.6
Let y1 , ..., yn be n 1 times continuously differentiable on I. If the Wronskian W (y1 , ..., yn )(x) 6= 0,
for some x0 I, then y1 , ..., yn are linearly independent on I. Consequently, if y1 , ..., yn are linearly
dependent on I, then
W (y1 , ..., yn )(x) = 0
x I.

CHAPTER 4. N TH ORDER ODES

78
Proof

We give two alternative proofs.


(i) First proof. Assume y1 , . . . , yn are linearly dependent, then there exist constants k1 , . . . , kn not
all zero such that
k1 y1 (x) + . . . + kn yn (x) = 0 x I.
We can assume, without loss of generality, that kn 6= 0 (we can always reorder the functions to make
this the case if it is not). Then, we can divide by kn and rearrange the terms to get an expression for
yn :
k2
kn1
k1
y2 (x) . . .
yn1 (x),
yn (x) = y1 (x)
kn
kn
kn
and if we differentiate this 1, . . . , n 1 times with respect to x, we get:
yn0 (x) =

k1 0
k2 0
kn1 0
y (x)
y (x) . . .
y
(x)
kn 1
kn 2
kn n1

..
.
yn(n1) (x) =

k2 (n1)
kn1 (n1)
k1 (n1)
y
(x)
y
(x) . . .
y
(x)
kn 1
kn 2
kn n1

or

yn (x)
yn0 (x)
..
.
(n1)

yn

k1

=
kn

(x)

y1 (x)
y10 (x)
..
.
(n1)

y1

kn

(x)

y2 (x)
y20 (x)
..
.
(n1)

y2

kn1

...
kn

(x)

yn1 (x)
0
yn1
(x)
..
.
(n1)

yn1 (x)

We see that the last column of the Wronskian is a linear combination of the other columns. Thus
the matrix is singular and has a determinant of 0 for all x I. Thus linear dependence implies
W (y1 , ..., yn )(x) = 0 for all x I. Thus if W (y1 , ..., yn )(x) 6= 0 for some x I then y1 , ..., yn are linearly
independent. This completes the proof.
(ii) Second proof. We show that if W (y1 , , yn )(x) 6= 0 then y1 , , yn are linearly independent.
Suppose
c1 y1 (x) + c2 y2 (x) + + cn yn (x) = 0
x I.
Then differentiating
c1 y1 (x) + c2 y2 (x) + + cn yn (x) = 0
c1 y10 (x) + c2 y20 (x) + + cn yn0 (x) = 0
..
.
(n1)

c1 y 1

(n1)

(x) + c2 y2

(x) + + cn yn(n1) (x) = 0.

Lets evaluate all these equations at x0 and write them as a linear system


y1 (x0 )
y2 (x0 )
...
yn (x0 )
c1
0
0
0
y10 (x0 )

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

2 0
..
..
..

.. = ..
..

. .
.
.
.
.
(n1)
(n1)
(n1)
cn
0
y1
(x0 ) y2
(x0 ) . . . yn
(x0 )
or


c1
0
.. ..
M . = . .
cn

4.3. LINEAR HOMOGENEOUS NTH ORDER ODES

79

But W (y1 , , yn )(x0 ) 6= 0 so the matrix M is invertible, hence Hence




c1
0
0
..
..
1 ..
. = M . = .
cn

Hence c1 , , cn = 0 so the functions are linearly independent.

Be careful with this theorem. As the second example below shows, if W (y1 , , yn )(x) = 0 then the
functions might be linearly dependent or independent.
Example 4.3.7
Let y1 = 1, y2 = x, y3 = x2 . Then

1

W (y1 , y2 , y3 )(x) = 0
0


x x2
1 2x = 2.
0 2

(Recall that an upper or lower triangular matrix has as its determinant the product of diagonal terms).
Thus y1 , y2 , y3 are linearly independent.
Similarly if yi = xi for i = 1, . . . , n then W (y1 , . . . , yn )(x) = (n 1)! and these n functions are linearly
independent. Since n is arbitrary the space of infinitely differentiable functions is infinite dimensional.

Example 4.3.8
Let

(
y1 (x) = x2

y2 (x) =

x2
x2

x>0
x<0

(4.9)

Notice that both y1 and y2 are continuously differentiable. Now




2
2

x
x


x > 0
=0


2x 2x

W (y1 , y2 )(x) =

x2 x2

= 0 x < 0.

2x 2x
Thus W (y1 , y2 )(x) = 0 for all x R. Notice that for I = (0, 1) y1 , y2 are linearly dependent, since for
all x (0, 1) we have y1 (x) y2 (x) = 0. Similarly for I = (1, 0) y1 , y2 are linearly dependent, since
for all x (1, 0) we have y1 (x) + y2 (x) = 0. However for I = (1, 1) or any interval I that crosses 0
y1 and y2 are linearly independent since there is no solution to k1 y1 (x) + k2 y2 (x) = 0 which is valid for
all x I except for k1 = k2 = 0.
The previous example shows that it is possible to have W (y1 , . . . , yn )(x) = 0 but the functions are linearly
independent. It also shows that whether a set of functions are linearly dependent or not can depend on the
choice of the interval I on which we pose the question. Although it is possible to have W (y1 , . . . , yn )(x) = 0
with the functions linearly independent for general functions y1 , . . . , yn , we are not interested in general
functions. Rather, we are interested in a set of functions y1 , . . . , yn which all solve the same linear ODE.

CHAPTER 4. N TH ORDER ODES

80

Using this extra piece of information we can prove a much stronger result.
Theorem 4.3.9 Abels Theorem
Let y1 , , yn be solutions of the nth order linear homogeneous ODE L[y] = 0 on I where L is defined
by (4.5) and pi (x) is continuous on I for i = 1, . . . , n. Then W (x) = W (y1 , . . . , yn )(x) satisfies
W 0 (x) + p1 (x)W (x) = 0,
and
W (x) = Ce

p1 (x)dx

(4.10)

(4.11)

Moreover, either
(i) W (y1 , . . . , yn )(x) = 0 for all x I and y1 , . . . , yn are linearly dependent on I, or,
(ii) W (y1 , . . . , yn )(x) 6= 0 for all x I and y1 , . . . , yn are linearly independent on I and hence form
a fundamental set of solutions on I.

Proof
Lets begin by showing (4.11) and (4.10), which are both referred to as Abels identity. We consider the
case n = 2 first, as some authors only consider this case. For solutions y1 and y2 we have
0 = L[y1 ] = y100 (x) + p1 (x)y10 (x) + p2 (x)y1 (x),
0 = L[y2 ] = y200 (x) + p1 (x)y20 (x) + p2 (x)y2 (x)
so


y2 y100 + p1 (x)y10 + p2 (x)y1 = 0,


y1 y200 + p1 (x)y20 + p2 (x)y2 = 0.
Adding the last two lines gives
(y1 y200 y100 y2 ) + p1 (x)(y1 y20 y2 y10 ) = 0.

(4.12)

But W (y1 , y2 ) = y1 y20 y2 y10 so


W (y1 , y2 )0 = (y1 y200 + y10 y20 ) (y20 y10 + y2 y100 ) = y1 y200 y100 y2 ,
so (4.12) reduces to (4.10).
Next we show that Abels identity also holds for

y1

.
W = ..
(n1)
y
1

an nth order linear ODE. To see this, consider


yn
..
..
.
. .
(n1)
yn

Since the determinant consists of a sum of terms each of which is a product of elements in different rows
(and columns) we can differentiate W by the product rule by differentiating row by row and adding the

4.3. LINEAR HOMOGENEOUS NTH ORDER ODES

81

resulting terms. We obtain


0
y1
0
y1
00
y1

W 0 = ..
.
(n2)
y
1
y (n1)
1

..
.

yn0
yn0
yn00
..
.

..
.


y1
00
y1
00
y1
.
+ .
.

(n2) (n2)
yn
y1
(n1) (n1)
y
y
n

..
.


y1
0
y1
000
y1
.
+ .
.

(n2) (n2)
yn
y1
(n1) (n1)
y
y
yn
yn00
yn00
..
.



y1

0

y1

00

y1



+. . .+ ..
.

(n2)

(n2)
y
yn
1

(n1)
y (n)
y
yn
yn0
yn000
..
.

..
.

yn
yn0
yn00
..
.











(n2)
yn

(n)
y
n

Each of these determinants contains a repeated row and so is zero, except for the last one. Thus

y1
0
y1
.

0
W = ..
(n2)
y
1
y (n)
1

..
.

yn
yn0
..
.









(n2)
yn

(n)
y
n

But
(n)

yi

(n1)

= p1 yi

(n2)

p2 yi

. . . pn yi ,

i = 1, . . . , n,

so

y1
0
y1

0
W = p1 (x) ..
.
(n1)
y
1

y2
y20
..
.
(n1)

y2


y1
0
y1

. . . pi (x) ..
.
(ni)
y
1

..
.




y1
y2

0

y1
y20


..
p2 (x) ..

.
.


(n1)
(n2)
(n2)

yn
y1
y2


y1
y2

yn
0
y1
y20

yn0

..
.. . . . pn (x) .
..
..
.
.
.

(ni)
(ni)
y1
y
yn
yn
yn0
..
.

..
.









(n2)
yn

y2 yn
y20 yn0
.. . .
..
.
.
.
y2 yn
yn
yn0
..
.

Notice the first determinant is W and all the others contain a repeated row and hence are zero. Thus
W 0 = p1 (x)W and we obtain (4.10) again, this time for general n.
Since (4.10) is a first order linear ODE (4.11) follows by standard theory of linear first order ODEs.
From (4.11) it also follows that either W (y1 , . . . , yn )(x) = 0 for all x I or W (y1 , . . . , yn )(x) 6= 0 for
all x I depending on whether the constant C in (4.11) is zero or nonzero. We already showed in
Theorem 4.3.6 that if W (y1 , . . . , yn )(x) 6= 0 then y1 , . . . , yn are linearly independent on I.
It remains to show that if W (x) = 0 for all x I, then y1 , , yn are linearly dependent. To show
this, suppose (x) = c1 y1 (x) + c2 y2 (x) + + cn yn (x) and (x) solves the IVP L[] = 0 with initial
conditions (x0 ) = 0 (x0 ) = = (n1) (x0 ) = 0. We do not (yet) have a general theorem showing
that such a solution exists, so we need to establish that here.
The coefficients ci must satisfy



y1 (x0 )

yn (x0 )
(x0 )
0
c1
0
0 0 (x0 ) y10 (x0 )
c2

y
(x
)
0
n



..
..
..
.. =
=
..
..
.

.
.
.
.
.
0

(n1) (x0 )

(n1)

y1

(x0 )

(n1)

yn

(x0 )

cn

CHAPTER 4. N TH ORDER ODES

82

But W (y1 , , yn )(x) = W (x) = 0, by assumption, therefore the matrix in the equation above is
noninvertible and so has a nontrivial kernel (ie the kernel contains other things besides 0) and so there
is a solution with the ci s not all zero. Choose such a solution. Then we have
(x0 ) = 0 (x0 ) = . . . = (n1) (x0 ) = 0
and
(x) =

n
X

ci yi (x)

i=1

with the ci s not all zero. Moreover since L[yi ] = 0 for i = 1, . . . , n we have
n
n
hX
i X
L[] = L
ci yi =
ci L[yi ] = 0,
i=1

i=1

so does satisfy the IVP.


But it is also clear that y(x) = 0 for all x I solves L[y] = 0 and also satisfies y(x0 ) = y 0 (x0 ) =
. . . = y (n1) (x0 ) = 0. Thus (x) and y(x) = 0 both solve the same initial value problem. But by
Proposition 4.2.2 this IVP has at most one solution, thus the two solutions (x) and y(x) must be
equal. Thus
n
X
ci yi (x), x I,
0 = y(x) = (x) =
i=1

with the ci not all zero, therefore y1 , . . . , yn are linearly dependent as required.

Note that the proof of the theorem uses in an essential way that y1 , yn solve L[y] = 0 to show that
W = 0 implies linear dependence. In Example 4.3.8 we already saw an example of two functions y1 and
y2 which are linearly independent on I = (1, 1) but for which W (y1 , y2 )(x) = 0 for all x I. These two
functions would provide a counter example to Abels Theorem if they were both solutions of L[y] = 0 for
some L = a(x)y 00 + b(x)y 0 + c(x)y. Thus we conclude that they cannot both be solutions of the same second
order ODE on the interval (1, 1)!!

It is actually possible to show that directly that y1 and y2 defined by (4.9) cannot solve the same second
order ODE on the interval (1, 1). Suppose they did, then L[y1 ] = 0 and L[y2 ] = 0. Moreover we
see from (4.9) that y1 (0) = y10 (0) = 0 and y2 (0) = y20 (0) = 0. Thus both y1 and y2 would satisfy the
initial value problem L[y] = 0 with y(0) = y 0 (0) = 0, but by Proposition 4.2.2 this IVP has at most one
solution, so y1 (x) = y2 (x) for all x (1, 1). Obviously y1 and y2 defined by (4.9) are not equal for all
x (1, 1) so our assumption that they both solved the same second order ODE on the interval (1, 1)
must be false.
Essentially, what is going on here is that the uniqueness given by Proposition 4.2.2 ensures that if
the two functions y1 and y2 that solve a second order ODE on an interval I have y1 (x0 ) = y2 (x0 ) and
y10 (x0 ) = y20 (x0 ) for x0 I then y1 (x) = y2 (x) for all x I. This generalises to linear combinations of
n functions that solve nth order linear homogeneous ODEs.

4.3. LINEAR HOMOGENEOUS NTH ORDER ODES

83

TFAE (the following are equivalent)


If L[yi ](x) = 0 for all x I, for i = 1, . . . , n then the following are equivalent
i) y1 , . . . , yn form a fundamental solution set on I,
ii) y1 , , yn are linearly independent on I,
iii) W (y1 , , yn )(x0 ) 6= 0 for some x0 I
iv) W (y1 , , yn )(x) 6= 0 for all x I.
So it is easy to check if any given set of functions form a fundamental solution set. It suffices that
L[yi ](x) = 0 for all x I, for i = 1, . . . , n and W (y1 , , yn )(x0 ) 6= 0 for some x0 I.

We are now ready to prove our main result for homogeneous nth order linear ODEs.
Theorem 4.3.10
Let y1 , . . . , yn be a fundamental set of solutions for the nth order linear homogeneous ODE L[y] = 0
on I where L is defined by (4.5) and pi (x) is continuous on I for i = 1, . . . , n. Then
1. the initial value problem L[y] = 0 and
y(x0 ) = 1

y 0 (x0 ) = 2

...

y (n1) (x0 ) = n

for given constants 1 , . . . , n has a unique solution y(x) for x I which can be written as
y(x) =

n
X

ci yi (x)

(4.13)

i=1

for a unique choice of the constants c1 , c2 , . . . , cn .


2. Every solution y(x) of the ODE L[y] = 0 which is defined on I can be written in the form (4.13)
for some choice of the parameters c1 , . . . , n.

Proof
To prove (i) let y(x) be defined by (4.13), then clearly, L[y] = 0 for all x I. Now we must choose the
ci s to satisfy the initial value problem. We require


c1 y1 (x0 ) + c2 y2 (x0 ) + . . . + cn yn (x0 )
y(x0 )
1
2 y 0 (x0 )

c1 y10 (x0 ) + c2 y20 (x0 ) + . . . + cn yn0 (x0 )



..
.. =
=

..
.

.
.
(n1)
(n1)
(n1)
(n1)
n
y
(x0 )
c1 y 1
(x0 ) + c2 y2
(x0 ) + . . . + cn yn
(x0 )


y1 (x0 )
y2 (x0 )
...
yn (x0 )
c1
0
0
y10 (x0 )

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

c2
=
..
..
..
..
..

.
.
.
.
.
(n1)
(n1)
(n1)
cn
y1
(x0 ) y2
(x0 ) . . . yn
(x0 )
But y1 , , yn form a fundamental set of solutions, so W (y1 , , yn )(x0 ) 6= 0, so this matrix is invertible

CHAPTER 4. N TH ORDER ODES

84

and there is a unique solution



y1 (x0 )
y2 (x0 )
...
c1
0
c2 y10 (x0 )
y
(x
)
...
2 0

..
..
.. =
..
.
.
.
.
(n1)
(n1)
cn
y1
(x0 ) y2
(x0 ) . . .

yn (x0 )
yn0 (x0 )
..
.
(n1)

yn

1
2

.. .
.

(x0 )

Thus the IVP has a solution of the form (4.13) for a unique choice of c1 , . . . , cn as required. That this
solution y(x) is unique follows from Proposition 4.2.2.
To prove (ii), note that y(x) defined by (4.13) solve L[y] = 0 for any choice of the ci s. To show that
there are no other solutions, suppose that (x) also solves L[] = 0. Then for x0 I, consider the IVP:
find y such that L[y] = 0 and y(x0 ) = (x0 ), y 0 (x0 ) = 0 (x0 ), . . . , y (n1) (x0 ) = (n1) (x0 ). Then by
(i), this IVP has a unique solution y(x) which is of the form (4.13) for some choice of c1 , . . . , cn . But
(x) solves the same IVP so by the uniqueness of the solution of the IVP we have (x) = y(x), and
hence (x) can be written in the form (4.13).

Theorem 4.3.10(i) establishes uniqueness and existence of the solution of the IVP for the homogeneous nth
order linear IVP, but the importance of Theorem 4.3.10(ii) should not be overlooked. It is one of the main
results in this entire course. By (ii) of Theorem 4.3.10 every solution of the ODE defined on the interval I
can be written in the form (4.13) for some choice of the constants c1 , . . . , cn , hence we call (4.13) the general
solution of the ODE. This shows that solutions of an nth order linear homogeneous ODE form a vector space
of dimension n, and that the fundamental set of solutions form a basis for this vector space. This is really
good news; we saw earlier that the set of all infinitely functions forms an infinite dimensional space (recall
x0 , x, x2 , . . . are all linearly independent), but since we are interested in solutions of the ODE we only need
concern ourselves with the n-dimensional space defined by the set of fundamental solutions.
Note that we refer to a fundamental set of solutions in the theorem and not to the fundamental set of
solutions. This is because a fundamental set of solutions is never unique. Even for a second order problem,
if y1 , y2 form a fundamental set of solutions, then y1 + y2 , y2 or 2y1 , y2 or y1 , y1 y2 are also all fundamental
solution sets. As for any n-dimensional vector space, there is never a unique basis.
You might have noticed that Theorem 4.3.10 requires the existence of a fundamental set of solutions to
draw its conclusions, and assumes the existence of one. We have yet to prove that a fundamental set of
solutions exists for a general nth order ODE. We will address this later.

4.4

Nonhomogeneous nth order Linear ODEs

We will consider the problem L[y] = g where L is defined by (4.5). If y1 , . . . , yn are a fundamental set of
solutions for the homogeneous ODE L[y] = 0 and yp is a solution of L[yp ] = g, let
y(x) = yp (x) +

n
X

ci yi (x)

(4.14)

i=1

then using the linearity of L we have


n
n
h
i
X
X
L[y] = L yp +
ci yi = L[yp ] +
ci L[yi ] = g,
i=1

i=1

so y defined by (4.14) solves L[y] = g. The following theorem shows that all solutions are of this form and
also that the initial value problem has a unique solution. To do this we will show how to find a particular
solution using Variation of Parameters (on an nth order ODE !!!).
Since all solutions of L[y] = g are of the form (4.14) we refer to it as the P
general solution of L[y] = g. The
n
function yp that solves L[yp ] = g is usually called a particular solution and i=1 ci yi is sometimes called the

4.4. NONHOMOGENEOUS NTH ORDER LINEAR ODES

85

complementary solution and denoted yc . The complementary solution yc =


general solution of the corresponding homogeneous ODE L[y] = 0.

Pn

i=1 ci yi

of L[y] = g is just the

Theorem 4.4.1
Let y1 , . . . , yn be a fundamental set of solutions of the nth order linear homogeneous ODE L[y] = 0
for x I for some interval I R, where L is defined by (4.5) and pi (x) is continuous on I for
i = 1, . . . , n. Suppose also that g(x) is continuous on I. Then
1. the initial value problem L[y] = g and
y(x0 ) = 1

y 0 (x0 ) = 2

...

y (n1) (x0 ) = n

for given constants 1 , . . . , n has a unique solution y(x) for x I,


2. Every solution y(x) of the ODE L[y] = g which is defined on I can be written in the form (4.14)
where yp (x) is a particular solution of L[yp ] = g.

Proof
Lets show (ii) first. Suppose yp1 (x) is some solution of L[y](x) = g(x) (Well prove below that there
is such a yp1 (x)). Then L[yp1 ](x) = g(x) and yp1 (x) is trivially of required form with c1 = c2 = . . . =
cn = 0.
If yp2 (x) is any other solution L[yp2 ](x) = g(x), then let Y = yp2 yp1 , then
L[Y ](x) = L[yp2 ](x) L[yp1 ](x) = g(x) g(x) = 0,
so Y (x) solves the corresponding homogeneous ODE and by Theorem 4.4.1 we can write Y (x) as
Y (x) =

n
X

ci yi (x).

i=1

Now
yp2 (x) = Y (x) + yp1 (x) =

n
X

ci yi (x) + yp1 (x).

i=1

Thus yp2 (x) is of the required form (4.14). But yp2 (x) is an arbitrary solution, thus all solutions can be
written in the form (4.14), providing we can find at least one particular solution yp1 (x). To complete
the proof of (ii) it suffices to prove (i), since the solution of any IVP will also solve the ODE.
To prove (i), note that Proposition 4.2.2 shows that the IVP has at most one solution, so to show
existence of a unique solution it is sufficient to construct a solution. We will do this using Variation of
Parameters. Suppose
n
X
yp (x) =
ui (x)yi (x)
i=1

where the functions ui (x) are to be determined below and L[yp ] = g. Differentiating we obtain
yp0 (x) =

n
X
i=1

ui (x)yi0 (x) +

n
X
i=1

u0i (x)yi (x).

CHAPTER 4. N TH ORDER ODES

86

To simplify this expression we will assume that


yp0 (x) =

n
X

Pn

u0i (x)yi (x) = 0 for all x I. Then

i=1

ui (x)yi0 (x),

n
X

and

i=1

u0i (x)yi (x) = 0.

i=1

Now we differentiate again to obtain


yp00 (x) =

n
X

n
X

ui (x)yi00 (x) +

i=1

u0i (x)yi0 (x).

i=1

Again we simplify this by assuming that the second term vanishes so


yp00 (x) =

n
X

ui (x)yi00 (x),

n
X

and

i=1

u0i (x)yi0 (x) = 0.

i=1

Continuing to differentiate n 1 times we obtain


yp(j) (x) =

n
X

(j)

for j = 0, 1, . . . , n 1,

ui (x)yi (x)

i=1

n
X

(j1)

u0i (x)yi

for j = 1, , n 1.

(x) = 0

i=1

Finally we differentiate one more time to obtain


yp(n) (x) =

n
X

(n)

ui (x)yi (x) +

n
X

(n1)

u0i (x)yi

(x).

i=1

i=1

This time we do not assume that the last term vanishes. We need to find ui (x) that satisfy these
equations and the ODE. We have
g = L[yp ]
= yp(n) +

n
X

pj (x)yp(nj) (x)

j=1

n
X

(n)

ui (x)yi (x) +

i=1

n
X

n
X

pj (x)

j=1

(n)
ui (x) yi

n
X

n
X

(nj)

ui (x)yi

i=1

(nj)
pj (x)yi
(x) +

n
X

(x)

n
X

(n1)

u0i (x)yi

(x)

=0 since L[yi ]=0

so

(n1)

u0i (x)yi

i=1

{z

n
X
i=1

j=1

i=1

(x) +

(n1)

u0i (x)yi

(x) = g(x).

(4.15)

i=1

Thus the n functions ui (x) must satisfy the n equations given by (4.4) and (4.15). Combining these
equations into a linear system that defines u0i (x) we obtain

y1 (x)
y10 (x)
..
.
(n1)

y1

y2 (x)
y20 (x)
..
.
(n1)

(x) y2

..
.

(x)

yn (x)
yn0 (x)
..
.
(n1)

yn


u01 (x)
u02 (x)

.. =
.

(x)

u0n (x)

0
..
.
.
0
g(x)

4.4. NONHOMOGENEOUS NTH ORDER LINEAR ODES

87

But W (y1 , , yn )(x) 6= 0 for all x I since y1 , . . . , yn form a fundamental set of solutions of L[y] = 0.
Hence, the matrix is invertible for all x I so invert it to get n equations of the form
u0i (x) = fi (x)
where fi (x) is some known function and so
x

fi (s)ds

ui (x) =
x0

and
yp (x) =

n
X

yi (x)

fi (s)ds
x0

i=1

is
Pna particular solution. Now the initial conditions uniquely define the ci in the solution y(x) =

i=1 ci yi (x) + yp (x) similar to homogeneous case.
The solution of the linear system from Variation of Parameters above is simplified by applying Cramers
Rule.
Theorem 4.4.2 Cramers Rule
Let A be an invertible n n matrix, and x and b be n 1 column vectors. Then for any given b Rn ,
Ax = b has unique solution x Rn given by
xi =

det(Ai )
for i = 1, , n
det(A)

where det(A) = |A| = determinant of A and Ai is matrix obtained by replacing ith column of A by b.

Theorem 4.4.3
Let y1 , , yn be a fundamental set of solutions to Ly = 0. Let W (x) = W (y1 , , yn )(x) and let
Wi (x) be the determinant obtained by replacing the ith column in the matrix defining W (x) by

0
..
.

0
g(x)
and let

ui (x) =
x0

then
yp (x) =

n
X

Wi (s)
ds
W (s)

ui (x)yi (x)

i=1

is a particular solution of Ly(x) = g(x)

Pn
Recall L[y] = y (n) + i=1 pi (x)y (n1) (x), so g(x) is the right hand side when the coefficient of the highest
derivative of y, i.e. coefficient of y (n) is 1.

CHAPTER 4. N TH ORDER ODES

88
Proof
Since W (x) 6= 0, the matrix is

y1 (x)
y10 (x)
..
.
(n1)

y1

y2 (x)
y20 (x)
..
.
(n1)

(x) y2

..
.

(x)

0
0
u
(x)
.
1
.. ..

. =
0
0
un (x)
(n1)
g(x)
yn
(x)
yn (x)
yn0 (x)
..
.

is invertible, and by Cramers rule


u0i (x) =

Wi (x)
W (x)


eEmark

y1
0
y
Wi (x) = 1
(n1)
y
1

yi1
0
yi1
(n1)

yi1

0
0
0

yi+1
0
yi+1

(n1)

yi+1








(n1)
yn
yn
yn0

As well as taking care to get g(x) correctly scaled (coefficient of y (n) must be 1 in the ODE). Also be
careful computing determinants of large matrices.

......how to compute determinant of 3 3 matrix shown in class.....


Example 4.4.4
Find the general solution of y 000 + y 0 = tan(x).
First, solve Ly = y 000 + y 0 = 0 As for second order ODEs, make the substitution y = erx , then
0 = r3 erx + rerx = (r3 + r)erx
Auxilary equation:
0 = r3 + r = r(r2 + 1)
so r = 0 or r = i. Let y1 (x) = 1, let y2 (x) = cos(x), and y3 (x) = sin(x). These clearly all solve
Ly = 0. Are they linearly independent? Compute W (y1 , y2 , y3 )(x) to check.


1 cos(x)
sin(x)

W = 0 sin(x) cos(x) = sin2 (x) + cos2 (x) = 1
0 cos(x) sin(x)
Since W (x) 6= 0, these are linearly independent. Now


0
cos(x)
sin(x)

sin(x) cos(x) = tan(x)[cos2 (x) + sin2 (x)] = tan(x)
W1 (x) = 0
tan(x) cos(x) sin(x)


1
0
sin(x)

0
cos(x) = cos(x) tan(x) = sin(x)
W2 = 0
0 tan(x) sin(x)

4.4. NONHOMOGENEOUS NTH ORDER LINEAR ODES



1

W3 = 0
0
Then

cos(x)
sin(x)
cos(x)

89


0
sin2 (x)
0 = sin(x) tan(x) =
cos(x)
tan(x)

Z
W1
u1 =
dx = tan(x)dx = ln | cos(x)|
W
Z
Z
W2
dx = sin(x)dx = cos(x)
u2 =
W
Z
Z
W3
u3 =
dx = cos(x) sec(x)dx = sin(x) ln | tan(x) + sec(x)|
W

So
yp (x) =

3
X

ui (x)yi (x)

i=1

= ln | cos(x)| + cos2 (x) + sin2 (x) sin(x) ln | tan(x) + sec(x)|


= 1 ln | cos(x)| sin(x) ln | tan(x) + sec(x)|

But y1 = 1 so we can take


yp (x) = ln | cos(x)| sin(x) ln | tan(x) + sec(x)|
now
y(x) = c1 + c2 cos(x) + c3 sin(x) ln | cos(x)| sin(x) ln | tan(x) + sec(x)|
is the general solution of y 000 + y 0 = tan(x)

4.4.1

The Fundamental Set of solutions

How to find this:


Theorem 4.4.5
Let L[y] =

n
X

(ni)

ai yi

where each ai R and a0 6= 0, and let the auxilary equation

i=0

n
X

ai ri = 0 have

i=0

roots rj of multiplicity sj (There are n, possibly complex, roots in total counting multiplicity). The
nth order linear constant coefficient differential equation L[y] = 0 has a fundamental set of solutions
on R composed of
x k e rj x
for k = 0, 1, 2, , sj 1
where rj is a real root of multiplicity sj , and
xk ej x cos(j x)

and

xk ej x sin(j x)

where rj = j ij is a pair of complex roots of multiplicity sj .

Remark: The multiplicity sj is just the power of the factor (r rj )

k = 1, 2, , sj 1

CHAPTER 4. N TH ORDER ODES

90
Proof

Each given function can be shown to be a solution similarly to techniques used for second order ODEs.
They are also clearly linearly independent, but proving so rigorously is laborous, so skip.

Now we can solve any constant coefficient nth order ODE by
1) Auxilary equation solution of homogeneous equation L[y] = 0
2) Find yp using Variation of Parameters.
Remark: We use undetermined coefficients when we can

4.4.2

Nonconstant Coefficient Problems

Theorem 4.4.6
Let L[y] = y (n) +

n
X

pi (x)y (ni) where each pi (x) is continuous on an interval I, and let x0 I. Then

i=1

let yi (x) solve the IVP


L[yi ](x) = 0

(i1)

yi

(x0 ) = 1

(j)

yi (x0 ) = 0

f orj = 0, 1, , n 1, j 6= i

Then y1 , , yn form a fundamental set of solutions to L[y] = 0.

Proof
Each of those n IVPs has a unique solution yi (x) on I
theorem.
Now

1

0

0
W (y1 , , yn )(x0 ) =
0
0

0
(i1)

(since yi

by the general Picard existance and uniqueness


0
1
0
0
0
0

0
0
1
0
0
0


0
0
0
=1
0
0
1

(x0 ) = 1) So these are linearly independent by Abels theorem.

Unfortunately, there is no systematic way to determine these yi as combinations of elementary functions.


Usually, they are not combinations of elementary functions. You can define new special functions to represent
these solutions (e.g. Bessel functions, etc). Often now, we approximate yi (x) numerically on a computer.
Another rigorous alternative is to use series solution, which well consider next week. Inspection and reduction
of order sometimes works.
Constant Coefficient Nonhomogeneous Problems
Once a fundamental set of solutions is determined to L[y] = 0, solve L[y] = g(x) to find the general solution
n
X
y(x) =
ci yi (x) + yp (x) where y1 , , yn are the fundamental set of solutions and yi (x) is found by
i=1

variation of parameters or by undetermined coefficients. Undetermined coefficients works for the same g(x)
for nth order equations as for a second order equation.

4.4. NONHOMOGENEOUS NTH ORDER LINEAR ODES

91

Given
g(x) = cex p(x) sin(x)

cex p(x) cos(x)

or

, guess
yp (x) = xs ex P (x) cos(x) + xs ex Q(x) sin(x)

Example 4.4.7
Solve L[y](x) = g(x)
L[y] = y 000 + 3y 00 4y

g(x) = 2ex

Ly = 0
y 000 + 3y 00 4y = 0
r3 + 3r2 4 = 0
(notice r = 1 is a root)
(r 1)(r2 + 4r + 4) = 0
(r 1)(r + 2)2 = 0
so y(x) = c1 ex + (c2 +c3 x)e2x is general solution of L[y] = 0 To solve L[y](x) = g(x), use undetermined
coefficients and let yp (x) = Axex
yp0 (x) = (Ax + A)ex
yp00 (x) = (Ax + 2A)ex
yp000 (x) = (Ax + 3A)ex
so
L[yp ](x) = (Ax + 3A)ex + 3(Ax + 2A)ex 4Axex
= 9Aex
so A =

2
9

to solve L[y](x) = 2ex and general solution of L[y](x) = g(x) is


2
2
y(x) = c1 ex + (c2 + c3 x)e2x + xex = (c1 + x)ex + (c2 + c3 x)e2x
9
9

Recall that quartics can sometimes be solved as quadratics.


Example 4.4.8
To solve y (4) + 2y 00 + y = 0, we obtain the auxiliary equation
0 = r4 + 2r2 + 1 = (r2 )2 + 2r2 + 1 = 0.
This is quartic in r, but quadratic in r2 with
(r2 + 1)2 = 0,
so r = i, with each root have multiplicity 2. Thus
y(x) = (c1 + c2 x) cos(x) + (c3 + c4 x) sin(x).
Note here that r = with = 1 and = 0 so ex = e0 = 1, and so no exponential terms appear
in the solution.

92

CHAPTER 4. N TH ORDER ODES

Chapter 5

Series Solutions
We study ODEs of the form
P (x)y 00 + Q(x)y 0 + R(x)y = 0
or
L[y] = 0
where
L[y] = y 00 + p1 (x)y 0 + p2 (x)y
and
p1 (x) =

Q(x)
,
P (x)

p2 (x) =

R(x)
.
P (x)

We will seek a fundamental set of solutions y1 (x), y2 (x) using series solution techniques. Then
y(x) = c1 y1 (x) + c2 y2 (x)
defines general solution of L[y](x) = 0. It is possible to solve the nonhomogeneous equation L[y](x) = g(x)
by Variation of Parameters, or directly. We will consider the direct approach, and if time permits may look
into Variation Of Parameters.

5.1

Review of Power Series

We will briefly review the main properties of power series that we will use. If there is material in this section
that is new to you, then you would be well advised to consult a textbook.
Definition 5.1.1 Convergence
Pm
P
A power series n=0 an (x x0 )n is said to converge at a pointP
x if limm n=0 an (x x0 )n exists
m
for that x. The series is absolutely convergent at x if limm n=0 |an ||x x0 |n exists.

It can be shown that a power series absolutely convergent at x implies


P it is convergent at x. There is a
non-negative number called the radius of convergence such that n=0 an (x x0 )n converges absolutely
for |x x0 | < and diverges for |x x0 | > . If = 0 convergence is only at x = x0 , which is not useful. If
93

94

CHAPTER 5. SERIES SOLUTIONS

is infinite we have absolute convergence for all x R.


Definition 5.1.2 Real analytic
A real function f (x) : I R where I is an interval I of the real line is real analytic at x0 I if there
exists > 0 such that for all x I with |x x0 | <
f (x) =

an (x x0 )n

n=0

with the power series having radius of convergence .

When f is real analytic it is continuous and has derivatives of all orders for |x x0 | < . Furthermore,
derivatives of f can be computed by differentiating the power series term by term.
f 0 (x) =

n an (x x0 )n1 =

n=0

n an (x x0 )n1

n=1

and so on for higher-order derivatives. Note that

f (m) (x) =

X
n(n 1) (n m + 1)an (x x0 )nm
n(n 1) (n m + 1) an (x x0 )nm =
{z
}
|
n=m
n=0

m times

If we evaluate this at x0 then for n > m we have (x x0 )nm = 0 and for n = m it equals 1. Thus the only
term in the sum that survives is n!an hence f (n) (x0 ) = n!an . So
an =

1 (n)
f (x0 ).
n!

Thus for |x x0 | < we have


f (x) =

an (x x0 )n =

n=0

X
f (n) (x0 )
(x x0 )n ,
n!
n=0

so we see that within its radius of convergence, a real analytic function is equal to its Taylor series. Some
authors use this property as the definition of real analytic. Note that a function can be infinitely differentiable
(called smooth) without necessarily being analytic, but in this course we will not be concerned with such
functions.
It is often useful to change the indexing of a series. If

an (x x0 )n ,

(5.1)

n(n 1)an (x x0 )n2 .

(5.2)

y(x) =

n=0

then
y 00 (x) =

X
n=0

To rewrite this with the power as n again let j = n 2, thus n = j + 2 and

y 00 (x) =

(j + 2)(j + 1)aj+2 (x x0 )j .

j=2

Note that for j = 2, 1, the terms vanish because of the (j + 2)(j + 1) term, thus
y 00 (x) =

X
j=0

(j + 2)(j + 1)aj+2 (x x0 )j .

5.1. REVIEW OF POWER SERIES

95

But j here is just the summation index and can be replaced by any symbol we prefer, so lets return to n
again and we see that

X
y 00 (x) =
(n + 2)(n + 1)an+2 (x x0 )n .
(5.3)
n=0

Another way to derive this from (5.3) is to replace every n in n(n 1)an (x x0 )n2 by n + 2, while for the
lower limit of the sum we note that the first non-zero term in (5.3) is the (x x0 )0 term so in the summation
in (5.3) must start from the same term so from n = 0.
We can similarly derive

X
y 0 (x) =
(n + 1)an+1 (x x0 )n .
(5.4)
n=0

If f (x) = n=0 an (x x0 ) and g(x) = n=0 bnP


(x x0 )n then f (x) = g(x) for x such that |x x0 | <

if and only if an = bn for all n N. In particular n=0 an (x x0 )n = 0 for all x such that |x x0 | < if
and only if an = 0 for all n.
Series can be added, subtracted, multiplied, and divided, though division by polynomial long division is
not much fun. We have
f (x) g(x) =

(an bn )(x x0 )n =

n=0

while

"
f (x)g(x) =

cn (x x0 )n ,

n=0

#"
an (x x0 )

n=0

#
bn (x x0 )

n=0

where
cn =

n
X

cn (x x0 )n

(5.5)

n=0

ai bni

(5.6)

i=0

To derive this expression for cn note that the terms in (5.5) that contribute to cn (x x0 )n are all of the form
ai (x x0 )i bni (x x0 )ni = ai bni (x x0 )n .
The resulting power series converges for |x x0 | < (assuming the power series for f (x) and g(x) both
converge for |x x0 | < ) or a possibly larger radius of convergence. Series may also be divided, but in that
case, the radius of convergence may be reduced.
If limn |an /an+1 | exists, then


an

.
= lim
n an+1
P
This can be seen by applying the ratio test to (5.1). By the ratio test, n=0 an (xx0 )n converges absolutely
if






an+1 (x x0 )n+1
< 1 |x x0 | lim an+1 < 1.
lim


n
n
n
an (x x0 )
an
Thus the ratio test gives absolute converge for all x such that


an
= .
|x x0 | < lim
n an+1
Notice, above that when we apply the ratio test we take the ratios of successive terms in the series, not of
successive coefficients.
If limn |an /an+1 | does not exist, then applying the root test to (5.1) shows
=

1
lim supn |an

|1/n

1
.
limn (supm>n |an |1/n )

96

CHAPTER 5. SERIES SOLUTIONS


Example 5.1.3
ex =
and
sin x =

X
xn
n!
n=0

X
(1)n x2n+1
(2n + 1)!
n=0

and
cos x = exercise
(All expanded about x0 = 0) have radius of convergence = .
Example 5.1.4
Consider

X
1
=
xn .
1 x n=0

The power series can either by computed from the Taylor series of (1 x)1 or from noting that
1 = (1 x)(1 + x + x2 + x3 + . . .).
The series converges for |x| < 1 since


an

= lim 1 = 1.
= lim
n an+1
n 1
Example 5.1.5
Consider the Taylor series for (1 + x2 )1 expanded about x0 = 0. We find

X
1
=
(1)n x2n .
1 + x2
n=0

For the radius of convergence , consider the ratio of successive nonzero terms. We have


(1)n+1 x2n+2
2
2


(1)n x2n = |x| = x ,
so by the ratio test, the series converges for |x| < 1.
Finally, if P (x) and Q(x) are polynomials, then
convergence of

Q
P

Q(x)
P (x)

is analytic at x0 if P (x0 ) 6= 0 and the radius of

is the distance from x0 to the nearest zero of P (x) in the complex plane.

Example 5.1.6
Consider

Q(x)
1
=
,
P (x)
1x

P n
This is analytic for all x 6= 1. About x0 = 0, as in Example 5.1.4 we can write Q(x)
n=0 x , which
P (x) =
is analytic with radius of convergence = 1, since the only zero of P (x) is at x = 1 and |x0 1| = 1.

5.2. SERIES SOLUTIONS NEAR ORDINARY POINTS

97

We found same value of in Example 5.1.4 using ratio test.


P
n
About x0 = 10, we can write Q(x)
n=0 an (x 10) , which is analytic with radius of convergence
P (x) =
= 9. We leave it as an exercise to compute the corresponding coefficients an .

Example 5.1.7
1
The function Q(x)
P (x) = 1+x2 , is analytic for all x0 R, since P (x0 ) 6= 0 for all x0 R. To find , we need
the zeroes of P (x) in the complex plane. But 0 = P (z) = 1 + z 2 implies z 2 = 1 so z = i.=

The distance
from the purely real x0 to i can be found using the Pythagorean
formula: for general
p

x0 , = 1 + x20 . Thus when x0 = 0 we have = 1, or if x0 = 1 then = 2

5.2

Series Solutions Near Ordinary Points

Let
L[y] = P (x)y 00 + Q(x)y 0 + R(x)y

(5.7)

L[y] = P (x)y 00 + Q(x)y 0 + R(x)y = 0

(5.8)

In this section we will solve the ODE

at ordinary points. These are points where the solutions of the ODE are well behaved.
Definition 5.2.1 Ordinary/Singular point
x0 is an ordinary point of the ODE L[y](x) = 0 if
p1 (x) =

Q(x)
P (x)

p2 (x) =

R(x)
,
P (x)

are both analytic at x0 . Otherwise, x0 is a singular point.

Example 5.2.2
For the Euler equation
ax2 y 00 + bxy 0 + cy = 0,
we have

bx
b
c
=
, and p2 (x) = 2 ,
ax2
ax
ax
so x = 0 is a singular point. All other points are ordinary points.
p1 (x) =

98

CHAPTER 5. SERIES SOLUTIONS

The following theorem is our main result for series solutions about ordinary points, which will allow us to
solve (5.8) using a series solution of the form (5.1).
Theorem 5.2.3
If x0 is an ordinary point for L[y](x) = 0, then the general solution of L[y](x) = 0 can be written as
y(x) =

an (x x0 )n = a0 y1 (x) + a1 y2 (x),

n=0

where a0 and a1 are arbitrary, but the other constants an , n > 2 are uniquely determined by choice of
a0 and a1 . The functions y1 and y2 will be two power series solutions which are analytic at x0 and
form a fundamental set of solutions with W (y1 , y2 )(x0 ) = 1. The radius of convergence of the power
series for y1 and y2 is at least as large as the minimum of the radii of convergence of the power series
for p1 and p2 about x0

We will not prove the theorem, but we will show how to construct such solutions. The last part of the
statement is important, y1 and y2 can have larger radius of convergence than p1 and p2 , but will be at least
as large as the minimum of the radius of convergence of p1 and p2 . Thus we will not have to prove that
the solutions that we drive ar analytic; Theorem 5.2.3 guarantees this.
Recall the formulae (5.1), (5.4) and (5.3) which we will make extensive use of in this chapter:
y(x) =

an (x x0 )n ,

y 0 (x) =

n=0

(n + 1)an+1 (x x0 )n ,

y 00 (x) =

n=0

(n + 2)(n + 1)an+2 (x x0 )n .

n=0

Although a general formula exists for determining the coefficients an of the solution, we will not use it. The
general formula is complicated, and in nearly all the examples it is simpler to derive the coefficients from
first principles by substituting (5.1) into (5.8). We first consider examples of (5.8) where P , Q and R are all
polynomials.
Example 5.2.4
(1 + x2 )y 00 4xy 0 + 6y = 0
4x
6
p1 (x) =
p2 (x) =
1 + x2
1 + x2
|
{z
}

analytic x0 R so every x0 R is an ordinary point.

Expand about x0 = 0. Let y(x) =

an xn . (Radius of convergence > 1 since 1 + x2 = 0 has roots

n=0
0

i and |
x (i)| = |i| = 1)
>
Substitute this into (1 + x2 )y 00 4xy 0 + 6y = 0.
6y =

X
n=0

6an xn

5.2. SERIES SOLUTIONS NEAR ORDINARY POINTS

y 0 (x) =
4xy 0 (x) =
y 00 (x) =

X
n=0

X
n=0

99

nan xn1
4nan xn
n(n 1)an xn2

n=0

so
(1 + x2 )y 00 =
=

n(n 1)an xn2 +

n=2

n(n 1)an xn

n=0

(n + 2)(n + 1)an+2 xn +

n=0

n(n 1)an xn

n=0

Now
0 = (1 + x2 )y 00 4xy 0 + 6y

X
=
[(n + 2)(n + 1)an+2 + n(n 1)an 4nan + 6an ]xn
=

n=0

[(n + 2)(n + 1)an+2 + (n2 5n + 6n) an ]xn


{z
}
|
n=0
(n2)(n3)

Hence
(n + 2)(n + 1)an+2 + (n 2)(n 3)an = 0
an+2 =

(n 2)(n 3)
an
(n + 2)(n + 1)

n > 0

n > 0

Setting n = 0, we have a2 = 3a0


n = 1, then a3 = 13 a1
n = 2, then a4 = 0
n = 3, then a5 = 0
Then a6 = 0, a7 = 0, an = 0n > 4. Thus
1
y(x) = a0 + a1 x + (3a0 )x2 + ( a1 )x3
3
1 3
2
= a0 (1 3x ) + a2 (x x )
3
= a0 y1 (x) + a1 y2 (x)
with y1 = 1 3x2 and y2 (x) = x 31 x3
Notice
y1 (0) = 1 = y20 (0)
y1 (0) = 0 = y2 (0)

100

CHAPTER 5. SERIES SOLUTIONS

So


1
W (y1 , y2 )(0) =
0


0
=1
1

So these are a fundamental set of solutions. Notice also that


y(0) = a0 y1 (0) + a1 y2 (0) = a0
and
y 0 (0) = a0 y10 (0) + a1 y20 (0) = a1
Thus solving homogeneous initial value problems is trivial. Just set a0 = y(x0 ) and a1 = y 0 (x0 ).
Finally, note that p1 (x) and p2 (x) have radius of convergence 1 when expanded about x0 = 0. But
y1 (x) and y2 (x) are actually polynomials in this example and so have infinite radius of convergence.
The above example is a little special. Usually, y1 and y2 are not polynomials.

Example 5.2.5
y 00 xy 0 + y = 0
p1 (x) = x

analytic x R

p2 (x) = 1

so every x0 R is an ordinary point. We can expand about any point x0 . Since the denominators of
p1 and p2 are both 1, resulting power series will have radius of convergence = +.
Lets expand about x0 = 0 again.

X
X
X
n
0
n1
0
Let y(x) =
an x y (x) =
nan x
xy (x) =
nan xn
n=0

n=0

00

y =

n=0

n(n 1)an x

n=2

n2

(n + 2)(n + 1)an+2 xn

n=0

so
0 = y 00 xy 0 + y

X
=
[(n + 2)(n + 1)an+2 nan + an ]xn
=

n=0

[(n + 2)(n + 1)an+2 (n 1)an ]xn

n=0

Hence
0 = (n + 2)(n + 1)an+2 (n 1)an
and
an+2 =

(n 1)
an
(n + 2)(n + 1)

Setting n = 1, we see a3 = 0 a5 = 0 and a2n+1 = 0 n > 1


n = 0 a2 =

a0
2

n = 2 a4 =
0
724a432

1
34 a2

= a4!0 , a6 =

3a4
56

0
= 3a
6! , a8 =

5
78 a6

753
= 53
8! a0 = 78! =

1
78642 a0

5.2. SERIES SOLUTIONS NEAR ORDINARY POINTS

? looks like
a2n =

101

a0
(2n + 1)2n n!

(Which can be proved by induction) Thus


y(x) =

an xn = a0

n=0

x2n
1
(2n 1)2n n!
n=1

!
+ a1 x

= a0 y1 (x) + a2 y2 (x)
Just as in the last example,
y1 (0) = 1 = y20 (0)
y10 (0) = 0 = y2 (0)


1 0

=1
W (y1 , y2 )(0) =
0 1

5.2.1

Analytic Coefficients

In all the previous examples we were able to write the ODE as


P (x)y 00 + Q(x)y 0 + R(x)y = 0
with P Q and R all as polynomials in x (or as polynomials in (x x0 )).
If that is not possible then we must solve the ODE as
L[y] = y 00 + p(x)y 0 + q(x)y = 0
where
p(x) =

pn (x x0 )n ,

q(x) =

n=0

(5.9)

qn (x x0 )n ,

(5.10)

n=0

are both power series with radius of convergence at least > 0. We illustrate this with an example.
Example 5.2.6
Find general solution as a power series about x0 = 0 of
0 = L[y](x) = y 00 ex y.
P
Let y(x) = n=0 an xn as usual. Our solution will have radius of convergence = + because p(x) = 0
and q(x) = ex and q is analytic for all x R with radius of convergence = +. Now
y 00 (x) =

n(n 1)an xn2 =

n=0

ex =

X
1 n
e y(x) =
x
n!
n=0

"

(n + 2)(n + 1)an+2 xn ,

n=0

while

and so

X
xn
,
n!
n=0

#"

n=0

#
an x

X
n=0

bn x n ,

102

CHAPTER 5. SERIES SOLUTIONS

where from (5.6) we see that


bn =

n
X
ani

i!

i=0

an
an1
an2
a0
+
+
+ + .
0!
1!
2!
n!

So now

n
X
X
a
ni
xn
0 = L[y] =
(n + 2)(n + 1)an+2 xn
i!
n=0
n=0 i=0
!#
"

n
X
X
X
ani
=
(n + 2)(n + 1)an+2
xn
i!
n=0
n=0 i=0
Thus

X ani
1
(n + 2)(n + 1) i=0 i!

an+2 =

n > 0,

and we see that an+2 depends on values of all of a0 , a1 , a2 , . . . , an . It is not possible in general to derive
an explicit formula for an , but we can derive as many terms as we wish. Let us proceed case by case.
0

n = 0]

a2 =

1 X a0i
1 a0
a0
=
= ,
2 i=0 i!
2 0!
2

n = 1]

a3 =

1
1 X a1i
= (a0 + a1 ),
6 i=0 i!
6

n = 2]

a4 =

1 X a2i
1 
1
1
=
(a0 + a1 ),
a2 + a1 + a0 =
4.3 i=0 i!
12
2
12

n = 3]

a5 =


1
1
1
1
1
1 X a3i
=
a3 + a2 + a1 + 6a0 =
a0 + a1 .
5.4 i=0 i!
20
2
2
24
60

There is no apparent simple formula for an . Nevertheless, from the theorem, the resulting power series
has infinite radius of convergence, and we can compute as many terms as we wish. Using the terms
computed above we have
y(x) =

an xn

n=0



1
1
1
1
= a 0 1 + x2 + x3 + x4 + x5 + . . .
2
6
12
24


1
1
1
+ a1 x + x3 + x4 + x5 + . . .
6
12
60
= a0 y1 (x) + a1 y2 (x).
As in the previous examples we have
y1 (0) = 1, y10 (0) = 0,
and so W (y1 , y2 )(0) = 1.

y2 (0) = 0, y20 (0) = 1

5.3. NONHOMOGENEOUS SERIES SOLUTIONS

103

It is also possible to derive a recursion for the general form, which is the basis for proving Theorem 5.2.3.
Most first books on ODEs omit this formula, which is easily confused with the formula in the next section
for singular points. Consider (5.9) where p and q are defined by (5.10). We look for a solution y(x) of
the form (5.1), then using (5.4) and (5.3) the ODE (5.9) becomes
!
!
!

X
X
X
n
n
n
(n + 2)(n + 1)an+2 (x x0 )
+
pn (x x0 )
(n + 1)an+1 (x x0 )
n=0

n=0

n=0

!
qn (x x0 )n

n=0

!
an (x x0 )n

= 0.

n=0

Using (5.6) we can write this as

(n + 2)(n + 1)an+2 +

n=0

n
X

pk (n k + 1)ank+1 +

k=0

n
X

!
qk ank

(x x0 )n = 0.

(5.11)

k=0

As usual, for the series on the left-hand side to be identically zero, all the coefficients must vanish. Thus
(5.11) gives a formula for the an . Looking at the coefficient of (x x0 )n in (5.11) we see for n > 0 that
an+2 depends on a0 , a1 , . . . , an+1 , with
!
n
n
X
X
1
pk (n k + 1)ank+1 +
qk ank .
(5.12)
an+2 =
(n + 2)(n + 1)
k=0

k=0

Thus a0 and a1 are arbitrary (unless initial conditions are specified), but (5.12) determines the other
coefficients. The proof of Theorem 5.2.3 is based on this formula, with y1 (x) defined by specifying a0 = 1
and a2 = 0 and using (5.12) to determine the other coefficients. The other solution y2 (x) is defined by
specifying a0 = 0 and a2 = 1. To prove Theorem 5.2.3 it only (!) remains to show that the radius of
convergence of the resulting power series is at least .

5.3

Nonhomogeneous Series Solutions

Several first books on ODEs glibly suggest using Variation of Parameters to solve nonhomogeneous variable
coefficient ODEs. But recalling (3.33), it probably is not going to be much fun finding u1 (x) and u2 (x)
that way in order to find a particular solution. Of course, it would be silly to find the Wronskian using
the definition W (y1 , y2 )(x) = y1 (x)y20 (x) y10 (x)y2 (x) and multiplying together the series, rather we would
use Abels formula to find W (y1 , y2 )(x). But I still would not want to use (3.33) when y1 (x) and y2 (x) are
defined by series solutions, and I have never seen anyone else actually solve an ODE that way.
Fortunately, there is an easier way. In all the previous examples we solved homogeneous ODEs by reducing
L[y] to a power series, and then to solve the homogeneous problem L[y] = 0 each coefficient of that power
series had to be zero. We solve L[y] = g similarly, but now we also write g as a power series and then the
coefficients of L[y] and g must be equal. This defines the solution. Wonderfully, we can get a particular
solution, the general solution and the solution to ant initial value problem all at the same time. This is best
illustrated by an example.
Example 5.3.1
Lets solve

1 3
x
6
as a series solution expanded about x0 = 0 so that we can also solve the initial value problem
y 00 xy =

y(0) = ,

y 0 (0) = .

(5.13)

104

CHAPTER 5. SERIES SOLUTIONS

Since x0 = 0 we let y(x) =

n=0

an xn . Then from (5.3)


y 00 (x) =

(n + 2)(n + 1)an+2 xn

n=0

while from (5.1) we have


xy(x) =

an xn+1 =

n=0

an1 xn .

n=1

Substituting these expressions into the ODE (5.13) we obtain

(n + 2)(n + 1)an+2 xn

n=0

an1 xn =

n=1

1 3
x
6



1
2a2 +
(n + 2)(n + 1)an+2 xn an1 xn = x3 .
6
n=1

As in the previous examples, for two power series to be equal all coefficients must agree. To solve we
therefore compare the coefficients of xn on the left and right hand sides of this equation.
x0 ]

2a2 = 0

x1 ]

3 2a3 a0 = 0

x2 ]

4 3a4 a1 = 0

a2 = 0
a0
32
a1
a4 =
.
43

a3 =

For the coefficient of x3 we obtain a coefficient of 1/6 on the right-hand side from the g(x) = 61 x3 term
on the right-hand side of (5.13). Thus we obtain
x3 ]

5 4a5 a2 =

1
6

a5 =

1
.
5!

Since in this example g(x) is a polynomial of degree 3 for all higher powers of x we obtain the same
expression with 0 on the righthand-side:
xn ]

(n + 2)(n + 1)an+2 an1 = 0

and hence
an+2 =

an1
(n + 2)(n + 1)

n > 4.

(5.14)

Now we can compute the general solution. Taking n = 4 and n = 7 in (5.14) we find that
a6 =

a3
a0
4 2a0
4 2a0
=
=
=
,
65
6532
6!
6!

and hence
a3n =

a9 =

a6
4 2a0
7 4 2a0
=
=
,
98
9 8 6!
9!

2(3n 2)(3n 5) . . . 7 4
a0 .
(3n)!

Similarly
a7 =

a1
,
7643

a10 =

a1
852
(3n 1)(3n 4) . . . 8 5 2
=
a1 = a3n+1 =
a1 ,
10 9 7 6 4 3
10!
(3n + 1)!

5.3. NONHOMOGENEOUS SERIES SOLUTIONS

105

and
a8 =

1
,
8 7 5!

a11 =

1
96
3n (3n 3) . . . 9 6
3n1 n!
=
, = a3n+2 =
=
11 10 8 7 5!
11!
(3n + 2)!
(3n + 2)!

Substituting these expressions into the definition of y(x) we obtain


y(x) =
=

X
n=0

an xn
a3n x3n +

n=0

a3n+1 x3n+1 +

n=0

a3n+2 x3n+2

n=0

X
(3n 1)(3n 4) . . . 8 5 2 3n+1 X 3n1 n! 3n+2
2(3n 2)(3n 5) . . . 7 4 3n
x + a1
x
+
x
= a0
(3n)!
(3n + 1)!
(3n + 2)!
n=0
n=0
n=0

= a0 y1 (x) + a1 y2 (x) + yp (x)

(5.15)

where
y1 (x) =

X
2(3n 2)(3n 5) . . . 7 4 3n
x ,
(3n)!
n=0

and
yp (x) =

y2 (x) =

X
(3n 1)(3n 4) . . . 8 5 2 3n+1
x
,
(3n + 1)!
n=0

X
3n1 n! 3n+2
x
.
(3n + 2)!
n=0

Since (5.15) solves (5.13) for all values of the constants a0 and a1 , taking a0 = a1 = 0 we see that yp (x)
solves (5.13) and hence yp (x) is a particular solution. We also have that
y1 (0) = 1, y10 (0) = 0, y2 (0) = 0, y20 (0) = 1,

= W (y1 , y2 )(0) = 1,

thus y1 and y2 are linearly independent and so (5.15) defines the general solution. Finally to solve an
initial value problem
y(0) = , y 0 (0) = ,
from (5.15) we see that y(0) = a0 and y 0 (0) = a1 (since yp (0) = yp0 (0) = 0) and hence to solve the IVP
it suffices to take a0 = and a1 = .
Other examples are solved similarly.

In the case where p(x) and q(x) are general analytic functions defined by (5.10) the nonhomogeneous
ODE
L[y] = y 00 + p(x)y 0 + q(x)y = g(x)
(5.16)
can be solved similarly to (5.9). Letting
y(x) =

an (x x0 )n ,

g(x) =

n=0

gn (x x0 )n ,

n=0

then substituting these into (5.16) similarly to the analysis at the end of Section 5.2.1 we obtain
!

n
n

X
X
X
X
(n + 2)(n + 1)an+2 +
pk (n k + 1)ank+1 +
qk ank (xx0 )n =
gn (xx0 )n , (5.17)
n=0

k=0

k=0

n=0

106

CHAPTER 5. SERIES SOLUTIONS

where the only difference from (5.11) is that we have the power series for g(x) on the right-hand side.
Now equating the coefficients on each side of (5.17) and rearranging we obtain
!
n
n
X
X
1
an+2 =
gn
pk (n k + 1)ank+1
qk ank .
(5.18)
(n + 2)(n + 1)
k=0

k=0

which defines the coefficients of the solution for n > 2.

5.4

Regular Singular Points

Let
L[y] = P (x)y 00 + Q(x)y 0 + R(x)y

(5.19)

L[y] = P (x)y 00 + Q(x)y 0 + R(x)y = 0

(5.20)

Having solved the ODE

in the previous section at ordinary points, in this section we will (5.20) at regular singular points. These are
singular points that are not too singular. We define them as follows.
Definition 5.4.1
If x0 is a singular point of (5.20) and
(x x0 )

Q(x)
,
P (x)

(x x0 )2

R(x)
,
P (x)

are both analytic at x0 , then x0 is a regular singular point. Otherwise, x0 is an irregular singular
point.

Notes
1. As in the previous section we will usually consider x0 = 0.
2. If P (x), Q(x), R(x) are polynomials, then x0 is a singular point if P (x0 ) = 0 and one of Q(x0 )
or R(x0 ) is nonzero, and x0 is a regular singular point if
lim (x x0 )

xx0

Q(x)
P (x)

and

lim (x x0 )2

xx0

R(x)
P (x)

are both finite.


3. For the Euler equation
x2 y 00 + p0 xy 0 + q0 y = 0,
x = 0 is a singular point and
xQ(x)
xp0 x
=
= p0 ,
P (x)
x2

and

x2 R(x)
x2 q0
= 2 = q0
P (x)
x

so x0 = 0 is a regular singular point.


4. We will not consider solutions near irregular singular points.

5.4. REGULAR SINGULAR POINTS

107

For any ordinary point x0 , we can find y1 (x) and y2 (x) with W (y1 , y2 )(x0 ) = 1, and solve any given IVP
posed at x0 . However, we cannot do this at singular points. We will find a fundamental set of solutions
valid in the interval (x0 , x0 + ) or (x0 , x0 ) where > 0 is the radius of convergence of the power series
in the solution that we find, but it is not in general possible to solve an initial value problem posed at the
regular singular point x0 . We will study the behaviour of solutions near regular singular points. We begin
with Euler equations, which were already mentioned above, and have a regular singular point at x = 0, but
can be solved without recourse to series solutions. After that we will use series solutions to study regular
singular points in general non-constant coefficient ODEs.

5.4.1

Euler Equations

Also known as Euler-Cauchy, Cauchy-Euler, or equidimensional equations, Euler equations are a special class
of nonconstant coefficient ODEs for which we can construct a fundamental set of solutions without using
series solutions techniques. The general form of nth order Euler equations is L[y] = 0 or L[y] = g(x) where
L[y] =

n
X

ai xni y (ni)

a0 6= 0.

i=0

For x > 0 we can solve by assuming y = xr . If y = xr is a solution then


0 = L[y] = L[xr ] =

n
X

ai xni r(r 1)(r 2) (r n + i + 2)(r n + i + 1)xrn+i

i=0

= xr

n
X

ai r(r 1)(r 2) (r n + i + 2)(r n + i + 1).

i=0

Dividing by xr we obtain a polynomial of degree n in r.


The most important case is for second order Euler equations, which we write as
0 = L[y] = x2 y 00 + xp0 y 0 + q0 y.

(5.21)

Letting y = xr we obtain the quadratic equation defining r, known as the indicial equation:
r(r 1) + p0 r + q0 = 0.

(5.22)

Note that this is only valid for x > 0. The indicial equation (5.22) has 2, 1, or 0 real roots, and r is not
necessarily an integer. Recall for x > 0 we define xr for general r R by
r

xr = eln x = er ln x ,
which does not work for x 6 0 since we will not be taking logs of negative numbers. (Logs of negative
numbers can be defined using complex analysis, but that is beyond the scope of this course and introduces
its own problems).
To derive solutions for x < 0 we make a change of variables. Let z = x so z > 0 when x < 0. Now
 
dy dx
dy
d2 y
d dy
d2 y
d2 y
dy
=
= ,
and
=
= (1)2 2 = 2 .
2
dz
dx dz
dx
dz
dz dz
dx
dx
Thus for x < 0 the Euler equation (5.21)
0 = x2 y 00 + xp0 y 0 + q0 y = (z)2

 dy 
2
d2 y
dy
2d y

zp

+
q
y
=
z
+ zp0
+ q0 y,
0
0
dz 2
dz
dz 2
dz

z > 0.

So with our change of variables, we actually get back the same ODE, with the variable x replaced by z. So
for x < 0 we can find solutions z r = (x)r with z > 0 and r must satisfy the same indicial equation (5.22).
Now we notice that xr = |x|r for x > 0 while (x)r = |x|r for x < 0. So letting y = |x|r we can derive
solutions of the form y = |x|r for the second order Euler equation (5.21) for all x 6= 0 with r determined by
the indicial equations (5.22). There are 3 cases for the indicial equation:

108

CHAPTER 5. SERIES SOLUTIONS

i) 2 real roots (distinct) roots. Then we obtain two solutions


y1 (x) = |x|r1 ,

y1 (x) = |x|r2 ,

which are linearly independent since r1 6= r2 so in this case the general solution is
y(x) = c1 |x|r1 + c2 |x|r2 .
ii) 1 real root repeated root r, in which case we obtain one solution y(x) = |x|r . We can use reduction
of order or Abels identity to find a second solution which is of the form y2 (x) = |x|r ln |x|. Since
y2 /y1 = ln |x| is not a constant, these solutions are linearly independent and the general solution for
x 6= 0 is
y(x) = (c1 + c2 ln |x|)|x|r .
iii) 2 complex roots r = i, so two complex solutions are
y+ (x) = |x|r+ = |x| |x|i = |x| ei ln |x| ,

y (x) = |x|r = |x| |x|i = |x| ei ln |x|

Using Eulers formula (3.20) we can rewrite these as



y+ (x) = |x| cos( ln |x|) + i sin( ln |x|) ,


y (x) = |x| cos( ln |x|) i sin( ln |x|) ,

then Using the Principle of Superposition (Theorem 3.2.1) we obtain two real solutions
y1 (x) =

1
(y+ (x) + y (x)) = |x| cos( ln |x|),
2

y2 (x) =

1
(y+ (x) y (x)) = |x| sin( ln |x|).
2i

So in this case the general solution is



y(x) = |x| c1 cos( ln |x|) + c2 sin( ln |x|) .
Notice that x2 y 00 + p0 xy 0 + q0 y = 0 has x = 0 as a singular point and all other points are ordinary points.
We could solve this as a series solution about any ordinary point x0 6= 0. The series will have radius of
convergence |x0 | and cannot be used to determine behaviour of the solution in the limit as x 0. We need
the |x|r solutions to do that. For the behaviour as x 0:
i) If r > 1 then y(x) = |x|r has lim y(x) = 0 and lim y 0 (x) = 0.
x0

x0

ii) If 0 < r < 1 then y(x) = |x|r has lim y(x) = 0 and lim |y 0 (x)| = .
x0

x0

iii) If r < 0 then y(x) = |x|r has lim |y(x)| = and lim |y 0 (x)| = .
x0

x0

Notice that even in the simplest case where the indicial equation has real distinct roots it is not possible to
solve an initial value problem posed at x = 0 since each solution either tends to zero or becomes unbounded
as x 0.
The behaviour of solutions as x 0 is more dramatic in the case of complex roots, since although
the |x| term behaves similarly to |x|r this term is multiplied by cos( ln |x|) or sin( ln |x|) each of which
oscillate with infinitely many zeros in the interval (0, ) for any > 0. For example sin( ln |x|) = 0 when
ln |x| = n so when |x| = en/ for each integer n. Now if > 0 then |x| 0 as x 0 and there
are infinitely many oscillations with amplitude tending to zero as x 0, but if < 0 then the oscillations
become infinite in amplitude as x 0. This is not a solution that you would want to see if you are an
engineer, building for example a bridge.

5.4. REGULAR SINGULAR POINTS

5.4.2

109

Frobenius Method

Now we show how to derive solutions near to regular singular points of general nonconstant coefficient second
order linear ODEs. Let x0 be a regular singular point of
L[y](x) := P (x)y 00 + Q(x)y 0 + R(x)y = 0.
Multiplying by (x x0 )2 we can rewrite this as




Q(x) 0
R(x)
(x x0 )2 y 00 + (x x0 ) (x x0 )
y + (x x0 )2
y=0
P (x)
P (x)
and hence
(x x0 )2 y 00 + (x x0 )p(x)y 0 + q(x)y = 0,

(5.23)

where p(x) and q(x) are analytic at x0 and defined by


p(x) := (x x0 )

Q(x) X
=
pn (x x0 )n
P (x) n=0

q(x) := (x x0 )2
Notice that
p0 = lim (x x0 )
xx0

Q(x)
P (x)

(5.24)

R(x) X
=
qn (x x0 )n
P (x) n=0

and

q0 = lim (x x0 )2
xx0

(5.25)

R(x)
.
P (x)

(5.26)

This formula will be useful below, as it will help us determine the form of the solutions of the ODE (5.23)
without or before determining the power series for p and q.
Using (5.24) and (5.25) we can rewrite (5.23) as
"
#
"
#
X
X
2 00
n
0
n
(x x0 ) y + (x x0 )
pn (x x0 ) y +
qn (x x0 ) y = 0.
(5.27)
n=0

n=0

Now we seek a solution of (5.27) of the form


y(x) = |x x0 |r

an (x x0 )n ,

(5.28)

n=0

where r is a real number, usually not an integer, which we will have to determine. We will require a0 6= 0 to
ensure that r is properly defined, and we will usually we will choose a0 = 1.
To simplify the algebra, we assume first that x > x0 and drop the modulus signs. Later in Theorem 5.4.6
we will reinstate the modulus signs and state a result which is also valid for x < x0 . For now we let
y(x) = (x x0 )r

an (x x0 )n =

n=0

an (x x0 )n+r .

(5.29)

n=0

Note that since r is not in general an integer y(x) as defined by (5.29) is not a series solution in the sense of
the solutions that we considered in Section 5.2, and the results of that section do not apply. By differentiating
(5.29) we can derive the terms (x x0 )2 y 00 and (x x0 )y 0 which appear in (5.27). We obtain
y 0 (x) =

(n + r)an (x x0 )n+r1 ,

n=0

and hence
0

(x x0 )y (x) =

(n + r)an (x x0 )n+r .

n=0

(5.30)

110

CHAPTER 5. SERIES SOLUTIONS

Also
y 00 (x) =

(n + r)(n + r 1)an (x x0 )n+r2

n=0

implies
(x x0 )2 y 00 (x) =

(n + r)(n + r 1)an (x x0 )n+r .

(5.31)

n=0

Substituting (5.30) and (5.31) into the ODE (5.27) we obtain


"
#"
#

X
X
X
r
n
n
r
n
pn (x x0 )
(n + r)an (x x0 )
(x x0 )
(n + r)(n + r 1)an (x x0 ) + (x x0 )
n=0

n=0

{z

(xx0

)2 y 00

n=0

{z

(xx0 )p(x)y 0

"
r

+ (x x0 )

#"
n

qn (x x0 )

n=0

#
n

an (x x0 )

= 0.

n=0

{z

q(x)y

Dividing by (x x0 )r we obtain
"
# "
#"
#
X
X
X
n
n
n
(n + r)(n + r 1)an (x x0 ) +
pn (x x0 )
(n + r)an (x x0 )
n=0

n=0

n=0
"
X

#"
n

qn (x x0 )

n=0

#
n

an (x x0 )

= 0.

n=0

Using (5.6) this simplifies to


"
#

n
n
X
X
X
(n + r)(n + r 1)an +
(k + r)ak pnk +
ak qnk (x x0 )n = 0,
n=0

k=0

k=0

and collecting together the two sums


"
#

n
X
X


(n + r)(n + r 1)an +
ak (k + r)pnk + qnk (x x0 )n = 0.
n=0

(5.32)

k=0

Now the left-hand side of (5.32) is a power series, and since the right-hand side of (5.32) is zero, we require
that the coefficients of (x x0 )n in (5.32) to all be zero. Consider first the coefficient of (x x0 )0 in (5.32)
which taking n = 0 we see is
r(r 1)a0 + p0 ra0 + q0 a0 = 0.
But a0 6= 0 so dividing by a0 we require that
r(r 1) + p0 r + q0 = 0

(5.33)

F (r) = r(r 1) + p0 r + q0 ,

(5.34)

It is useful to define
then (5.33) is simply the quadratic equation F (r) = 0. Equation (5.33) is called the indicial equation and
the polynomial F (r) is often referred to as the indicial polynomial. We already saw that this equation when
solving Euler equations. The indicial equation (5.33) arises in the same form in every example, and is a
formula that is well worth committing to memory (at least for the duration of your ODE course). It is
not necessary to rederive it for each example. The roots r of the indicial equation are called indices at the
singularity, and these are the only values of r for which the supposed solution of the form (5.29) can possibly
be valid. However, we still have some work to do to show that there is such a solution.

5.4. REGULAR SINGULAR POINTS

111

Now consider the coefficient of (x x0 )n for n > 1 in (5.32) which as noted already must be equal to zero.
Rewrite this coefficient as
(n + r)(n + r 1)an + (n + r)an p0 + an q0 +

n1
X



ak (k + r)pnk + qnk = 0.

(5.35)

k=0

by separating the k = n term from the rest of the sum. But from (5.34) we see that
F (n + r) = (n + r)(n + r 1) + p0 (n + r) + q0

(5.36)

and so
F (n + r)an = (n + r)(n + r 1)an + (n + r)an p0 + an q0 .
Thus we can rewrite (5.35) as
F (n + r)an +

n1
X



ak (k + r)pnk + qnk = 0,

k=0

or rearranging
an =

n1
X 

1
ak (k + r)pnk + qnk ,
F (n + r)

(5.37)

k=0

where F (r) is defined by (5.34) (so F (n + r) is given by (5.36)).


Now equation (5.37) defines the coefficients in the solution (5.29), with an in general depending on all of
a0 , a1 , . . . , an1 . Usually we will set a0 = 1. If p(x) or q(x) is a polynomial then the expression (5.37) will
simplify considerably since infinitely many of the pnk and/or qnk coefficients will vanish. We will see this
in Example 5.4.3.
There is another problem with equation (5.37). If F (n + r) = 0 for some positive integer n then a division
by zero arises in (5.37) when computing an and the method will fail. We will see later how to modify (5.29)
to obtain a solution in that case, but first we enumerate the cases and then deal with the simplest case where
F (n + r) 6= 0.
There are several cases to consider.
a) If F (r) = 0 has one real (repeated) root, say F (r1 ) = 0, then F (n + r1 ) 6= 0 for all integers n > 1. So we
recover one solution of the form (5.29) with r = r1 .
b) If F (r) = 0 has two real roots r1 > r2 , then we immediately recover one solution of the form (5.29) with
r = r1 since F (n + r1 ) 6= 0 for all n > 1, n N, since the only other zero of F (r) is r2 and r2 < r1 .
i) If r1 r2 6= N N, then we recover a second solution from the index r2 since F (r2 + n) 6= 0 for all
integers n.
ii) If r1 r2 = N N then there is only one solution of the form (5.29) with r = r1 . If we try to
compute a second solution with r = r2 then when we try to compute the N th coefficient aN using
(5.37) the formula fails because F (N + r2 ) = F (r1 r2 + r2 ) = F (r1 ) = 0. In Theorem 5.4.6 we will
show how to obtain a second solution in this case by modifying the formula (5.29) suitably.
c) If F (r) = 0 has complex roots, r1 = + i, r2 = i, then r1 r2 = 2i 6= n N, so we always
recover two complex solutions in this case. As was the case for the Euler equations we can recover real
solutions, but the derivation is a little more complicated and most first ODE books omit this case.
We begin by considering an example where the indicial equation (5.33) has two real distinct roots which
do not differ by an integer. In this case we can find two solutions of the form (5.29). We will solve the same
problem twice, in two different ways. First we will use (5.26) and (5.33) to determine r1 and r2 and then
solve for the coefficients in (5.29) directly from the differential equation, without writing p(x) or q(x) as
series. Then we will solve the same problem by writing p(x) or q(x) as series of the form (5.24) and (5.25)
and using (5.37).

112

CHAPTER 5. SERIES SOLUTIONS

Example 5.4.2
Consider the ODE
L[y](x) = P (x)y 00 + Q(x)y 0 + R(x)y = 4xy 00 + 2y 0 + y = 0
Since

Q(x)
2
=
P (x)
4x

is not analytic at x = 0, we have that x = 0 is a singular point. Now since


xQ(x)
1
=
P (x)
2

x2 R(x)
x
= ,
P (x)
4

and

which are both analytic at x = 0, it follows that x0 = 0 is a regular singular point.


First note that from (5.26) we have
x2 R(x)
= 0,
x0 P (x)

xQ(x)
1
=
x0 P (x)
2

p0 = lim

q0 = lim

so the indicial equation (5.33) becomes


1
r(r 1) + r = 0
2

1
r(r ) = 0,
2

which has roots r1 = 1/2 and r2 = 0. Since r1 r2 = 1/2 which is not an integer Frobenius method
will give two solutions of the form (5.29). However, if you do not like taking limits, this step is optional.
We will rederive the indicial equation in a moment.
First we rewrite the ODE as
4x2 y 00 + 2xy 0 + xy = 0.
We do this to put it in a form more similar to (5.23) with a factor x2 in front of the y 00 term. There is
no need to divide by the 4, that would just introduce fractions everywhere into the calculations we are
about to do.
We consider a solution of the form (5.29) with x0 = 0 and assume that x > 0, hence we obtain

y(x) = xr

an xn =

n=0

Thus
y 0 (x) =

(n + r)an xn+r1

an xn+r .

n=0

xy 0 = xr

n=0

y 00 (x) =

(n + r)an xn ,

n=0

(n + r)(n + r 1)an xn+r2

x2 y 00 = xr

n=0

(n + r)(n + r 1)an xn ,

n=0

while
xy = xr

X
n=0

an xn+1 = xr

X
n=1

an1 xn .

5.4. REGULAR SINGULAR POINTS

113

Thus
0 = 4x2 y 00 + 2xy 0 + xy

X
X
X
= 4xr
(n + r)(n + r 1)an xn + 2xr
(n + r)an xn + xr
an1 xn
n=0

n=0

n=1

X


= xr [4r(r 1)a0 + 2ra0 ] + xr
4(n + r)(n + r 1)an + 2(n + r)an + an1 xn
n=1

X



1 
r
r
a0 + x
(2n + 2r)(2n + 2r 1)an + an1 xn
= 4x r r
2
n=1

Dividing by xr we obtain

X



1 
4 r r
a0 +
(2n + 2r)(2n + 2r 1)an + an1 xn = 0.
2
n=1

As ever with series solutions each coefficient of xn must be zero. Notice that the constant term gives
the indicial equation r(r 1/2) = 0 again, while the general xn term gives
an =

an1
.
(2n + 2r)(2n + 2r 1)

(5.38)

First, let r = r2 = 0 then (5.38) becomes


an =
so
a1 =

a0
,
21

a2 =

and it is clear that


an =
Let a0 = 1 then one solution is
y1 (x) =

an =
a1 =

a0
,
32

(1)n
a0 .
(2n)!

an1
(2n + 1)2n

a2 =

and we see that


an =

a1
a0
= (1)2
,
43
432

X
(1)n xn
.
(2n)!
n=0

Now let r = r1 = 21 , then


so

an1
2n(2n 1)

a1
a0
= (1)2
,
54
5432

(1)n
.
(2n + 1)!

We could prove this by induction, but life is too short for pedantic proofs. Again let a0 = 1, then a
second solution is

X
(1)n xn
.
y2 (x) = x1/2
(2n + 1)!
n=0

114

CHAPTER 5. SERIES SOLUTIONS

Now the general solution for x > 0 is


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

X
X
(1)n xn
(1)n xn
+ c2 x1/2
.
(2n)!
(2n + 1)!
n=0
n=0

Example 5.4.3
Consider again the ODE
4xy 00 + 2y 0 + y = 0
from the previous example which has x0 = 0 as a regular singular point. Multiply by x/4 to put the
equation in the standard form (5.23), obtaining
1
1
x2 y 00 + xy 0 + xy = 0
2
4
which is of the form
x2 y 00 + xp(x)y 0 + q(x)y = 0,
with

1
1
,
q(x) = x.
2
4
Now we write p(x) and q(x) in the form (5.24) and (5.25). We have
p(x) =

p(x) =

q(x) =

1 X
=
pn xn
2 n=0

X
1
qn xn
x=
4
n=0

p0 =

1
, pn = 0n > 0,
2

q0 = 0, q1 =

1
, qn = 0n > 2.
4

Now the indicial equation is


1
1
F (r) = r(r 1) + p0 r + q0 = r(r 1) + r + 0 = r(r ) = 0,
2
2
with roots r1 = 1/2 and r2 = 0. Now we compute the coefficients of the solutions using (5.37). Since
p0 = 1/2 and q1 = 1/4 are the only nonzero coefficients in the expansions of p(x) and q(x) the expression
(5.37) simplifies. Moreover, p0 does not even appear in (5.37). The coefficient q1 appears in (5.37) as
qnk when 1 = n k so k = n 1. Thus (5.37) simplifies to
an =

1
1
1
an1 q1 =
an1
1
F (n + r)
(n + r)(n + r 2 ) 4

For r = r1 = 1/2 equation (5.39) becomes


an =

1
1
1
an1 =
an1 .
(n + 1/2)(n + 1/2 1/2) 4
(2n + 1)(2n)

Letting a0 = 1 we find
a1 =

1
,
32

a2 =

a1
1
= (1)2 ,
54
5!

an =

(1)n
.
(2n + 1)!

(5.39)

5.4. REGULAR SINGULAR POINTS

115

Thus one solution is


y1 (x) = x1/2

X
(1)n xn
.
(2n + 1)!
n=0

(5.40)

For r = r2 = 0 equation (5.39) becomes


an =

1
1
1
an1 =
an1 .
(n)(n 1/2) 4
(2n)(2n 1)

Letting a0 = 1 we find
a1 =

1
,
21

a2 =

a1
1
= (1)2 ,
43
4!

Thus another solution is


y2 (x) =

an =

(1)n
.
(2n)!

X
(1)n xn
.
(2n)!
n=0

(5.41)

And as in the previous example the general solution for x > 0 is


y(x) = c1 y1 (x) + c2 y2 (x) = c1 x1/2

X
X
(1)n xn
(1)n xn
+ c2
.
(2n + 1)!
(2n)!
n=0
n=0

(5.42)

We can satisfy an IVP for any x0 > 0 with the y1 and y2 in the previous example, but not an initial value
problem posed with x0 = 0. From (5.40) and (5.41) we see that
lim y2 (x) = 0

x0

and

lim y1 (x) = 1.

x0

Hence to solve y(0) = , we need to take c1 = in (5.42). But now


lim |y10 (x)| =

x0

and

lim |y2 (x)| = ,

x0

and it is not possible to choose c2 to satisfy y 0 (0) = for any finite .


Just as for Euler equations, the values of r in Frobenius solutions tell us the behaviour close to x0 .
i) If r < 0, |x x0 |r as x x0 , and so y(x) defined by (5.29) or (5.28) satisfies limxx0 |y(x)| = .
ii) If r (0, 1), then (x x0 )r 0 as x x0 , but |x x0 |r1 , so limxx0 y(x) = 0, but
limxx0 |y 0 (x)| = .
iii) If r > 1, then limxx0 (x x0 )r = limxx0 (x x0 )r1 = 0 and so limxx0 y(x) = limxx0 y 0 (x) = 0.
Although this is nicer in the sense that neither the function nor the derivative becomes unbounded, it
does not help us solve an initial value problem with y(0) = and y 0 (0) = with 6= 0 or 6= 0.
Above we assumed that x > x0 . What about solutions for x < x0 I hear you ask? Solutions for x < x0
(and for x > x0 ) are of the form (5.28) with the same coefficients as derived for x > x0 . This works because
the solution technique above relies on
d
[(x x0 )n+r ] = (n + r)(x x0 )n+r1
dx
or

d
[(x x0 )r (x x0 )n ] = (n + r)(x x0 )r (x x0 )n1 .
dx
These identities are only valid for x x0 > 0, but it is easy to show that
d
[|x x0 |r (x x0 )n ] = (n + r)|x x0 |r (x x0 )n1 ,
dx
for x < x0 as welll as for x > x0 which leads to solutions of the claimed form (5.28).

116

CHAPTER 5. SERIES SOLUTIONS

Indicial Equation has Equal Roots


Lets consider the case of (5.23) where the indical equation (5.33) has equal roots. In that case (5.33) can
be written as
0 = F (r) = (r r1 )2
with
F (r1 ) = F 0 (r1 ) = 0.
(5.43)
The ODE (5.27) is then of the form L[y] = 0 where
"
#
"
#
X
X
2 00
n
0
n
pn (x x0 ) y +
qn (x x0 ) y.
L[y] = (x x0 ) y + (x x0 )
n=0

(5.44)

n=0

Considering x > x0 and defining y(x) by (5.29) to be

y(x) = (x x0 )r

an (x x0 )n =

n=0

an (x x0 )n+r ,

n=0

and substituting the resulting expressions (5.29), (5.30) and (5.31) into (5.44) we obtain
"
#

n1
X
X
L[y] = (x x0 )r F (r)a0 + (x x0 )r
F (n + r)an +
ak [(k + r)pnk + qnk ] (x x0 )n
n=1

(5.45)

k=0

In the last section we chose r such that F (r) = 0, i.e., r = r1 , so that the first term in (5.45) vanished, and
then used a recursion relation so that each the term in the sum vanished for all n, this ensuring that L[y] = 0
and so y is a solution to L[y] = 0. In the case of equal roots r = r1 doing the same thing yields one solution,
but we need two solutions to define a fundamental set of solutions. So we adopt a different approach.
Consider (5.45) for general r which does not have to satisfy the indicial equation. Thus we consider L[y]
to be a function of r for r R where y is defined by (5.29). Now we determine the parameters an (r) to also
be functions of r so that the terms in the sum in (5.45) all vanish. Thus an (r) is defined by
an (r) =

n1
X
1
ak (r)[(k + r)pnk + qnk ],
F (n + r)

n > 1.

(5.46)

k=0

Here, as usual, we are free to choose any value for a0 , and we take a0 = 1. We consider the ODE (5.27)
in the case where the indicial equation is given by (5.43) and so r = r1 is the only root of F (r) = 0. Thus
F (n + r) > 0 whenever n + r > r1 , or equivalently for r > r1 n. So F (n + r) > 0 for all n > 1 for all
r > r1 1. Thus if we restrict r to the interval r (r1 1, ) then we can define an (r) for all n > 1 by
(5.52). With the an (r) thus defined for r > r1 1 the sum in (5.45) vanishes and we obtain
L[y] = (x x0 )r F (r)a0

(5.47)

Since F (r1 ) = 0, setting r = r1 in (5.47) we obtain L[y] = 0 and so we immediately have one solution
y1 (x) = (x x0 )r1

an (r1 )(x x0 )n ,

(5.48)

n=0

where an (r1 ) is defined by (5.52) with r = r1 . But this is just a very fancy way of rederiving the same
solution as we found last time. To derive another solution we differentiate (5.47) with respect to r. Recalling
that for x x0 > 0 the derivative of (x x0 )r with respect to r is calculated as

ln(xx0 )r
r ln(xx0 )
(x x0 )r =
e
=
e
= er ln(xx0 ) ln(x x0 ) = (x x0 )r ln(x x0 ),
r
r
r
differentiating (5.47) with respect to r we obtain



L[y] =
(x x0 )r F (r)a0 = a0 (x x0 )r F 0 (r) + ln(x x0 )(x x0 )r F (r)a0 .
r
r

5.4. REGULAR SINGULAR POINTS

117

Thus since F (r1 ) = F 0 (r1 ) = 0 evaluating this expression at r = r1 we obtain



= 0.
(L[y(x)])
r
r=r1

To see why this is useful, write Dr for the differential operator r


and Dx for the differential operator
Then from (5.44)
L[y] = (x x0 )2 Dx2 [y] + (x x0 )p(x)Dx [y] + q(x)y

x .

and so
Dr L[y] = (x x0 )2 Dr Dx2 [y] + (x x0 )p(x)Dr Dx [y] + q(x)Dr y.
But if y is analytic then these derivatives are all continuous and so we can swap the order and we find that
Dr L[y] = (x x0 )2 Dx2 [Dr y] + (x x0 )p(x)Dx [Dr y] + q(x)Dr y = L[Dr y].
Thus we have

= L[
(L[y(x)])
y(x) |r=r1 ] .
0=
r
r
r=r1

But if L[] = 0, then solves the homogeneous ODE, and so we have just found a second solution, which
is given by

y1
y2 (x) =
r r=r1
"
"
##


r
n
=
(x x0 ) a0 +
an (r)(x x0 )


r
n=1
r=r1
"
#

X
X
r1
n
= (x x0 ) ln(x x0 ) a0 +
an (r)(x x0 ) + (x x0 )r
a0n (r1 )(x x0 )n
n=1

X
r

= y1 (x) ln(x x0 ) + (x x0 )

n=1

a0n (r1 )(x x0 )n

(5.49)

n=1

The coefficients an (r1 ) and a0n (r1 ) appearing in (5.48) and (5.49) can be determined in two ways. Following
the theory above we can find the functions an (r) by solving the recurrence (5.52). Then an (r1 ) is given by
evaluating this function at r = r1 while a0n (r1 ) is given by differentiating an (r) with respect to r to obtain
a0n (r) and then evaluating the result at r = r1 .
Alternatively, to avoid coefficients which are functions of r we could solve for one solution as in the previous
section, which will be of the form

X
an xn+r1
y1 (x) =
n=0

assuming that x0 = 0. To find a second solution we note from the theory above that it must have the form
y2 (x) = y1 (x) ln x + xr1

bn xn ,

n=1

and we can substitute this expression into the ODE and solve directly for bn s.
We give an example where we compute the coefficients of y2 (x) using both methods.
Example 5.4.4
Consider the ODE
xy 00 + y 0 + y = 0,
which we rewrite as x2 y 00 + xy 0 + xy = 0. This is then of the standard form
x2 y 00 + xp(x)y 0 + q(x)y = 0,

118

CHAPTER 5. SERIES SOLUTIONS

with p(x) = 1 and q(x) = x. Since P (x) = x2 and P (0) = 0 this has a singular point at x = 0. Since
p(x0 and q(x) are analytic at x = 0 it is a regular singular point. Now We can write p(x) and q(x) in
infinite series form as follows:
p(x) = 1 =

p n xn

= p0 = 1 pn = 0 n > 1,

n=0

while
q(x) = x

q0 = 0, q1 = 1, qn = 0 n > 1.

So the indicial equation is


0 = F (r) = r(r 1) + p0 r + q0 = r(r 1) + r = r2 ,
Thus F (r) = 0 has just one root r1 = 0. Let

y(x) = xr

an xn .

n=0

Note that although we will set r = r1 = 0 in the final solution, we need to consider general r 6= 0 initially
so that we can find the functions an (r). These are determined by (5.52) which we note only contains the
coefficients p1 , . . . , pn (all of which are zero) and q1 , . . . , qn (only the first of which is non-zero). Thus
(5.52) becomes
1
1
an1 (r)q1 =
an1 (r).
an (r) =
F (n + r)
(n + r)2
which is a recursive formula for an . Letting a0 = 1, we obtain
an (r) =

(n +

r)2 (n

(1)n
,
+ r 1)2 (r + 1)2

Thus letting r = r1 = 0, we get


an (0) =
and our first solution is
y1 (x) =

n > 1.

(5.50)

(1)n
(n!)2

X
(1)n n
x .
(n!)2
n=0

To find a second solution, note that (5.50) implies that




2
2
2
+
+ +
an (r),
a0n (r) =
r+1 r+2
r+n
and thus
a0n (r1 ) = a0n (0) = 2

1 1
1
+ + +
1 2
n


an (0) = 2

n
X
1
i=1

(1)n+1
(n!)2

Thus a second solution of the ODE, of the form (5.49) is


y2 (x) = y1 ln x +

X
n=1

n
X
1
i=1

(1)n+1 n
x .
(n!)2

Pn 1
Aside:
i=1 i is called the nth Harmonic number. There are several formulae for it, and a lot of
associated theory. It has its own extensive wikipedia page.

5.4. REGULAR SINGULAR POINTS

119

Example 5.4.5
We can also solve
xy 00 + y 0 + y = 0,
from first principles without need to deal with coefficient functions. Again write the ODE as
x2 y 00 + xp(x)y 0 + q(x)y = 0,
Look for a first solution of the form
y(x) = xr

an xn .

n=0

Then
xy(x) = xr

an xn+1 = xr

n=0

an1 xn ,

n=1

while
y 0 (x) = xr

(n + r)an xn1

xy 0 = xr

n=0

y 00 (x) = xr

(n + r)(n + r 1)an xn2

x2 y 00 = x

n=0

(n + r)an xn

n=0

X
r

(n + r)(n + r 1)an xn .

n=0

Substituting these into the ODE we obtain


0 = x2 y 00 + xy 0 + xy

X
X
X
r
n
r
n
r
=x
(n + r)(n + r 1)an x + x
(n + r)an x + x
an1 xn
n=0

n=0

n=1

X


= xr [r(r 1) + r]a0 + xr
[(n + r)(n + r 1) + (n + r)]an + an1 xn
n=1

= a0 [r2 ]xr + xr

X



(n + r)2 an + an1 xn

n=1

The xr term gives the indicial equation r2 = 0 so r = 0 for a solution. Then for the coefficient of xn+r
to vanish with r = 0 we require
an =

an1
an1
= 2 ,
2
(n + r)
n

n > 1.

To find y1 (x), let a0 = 1 and then the recurrence relation has solution
an =
and so one solution is
y1 (x) =

(1)n
,
(n!)2

X
(1)n xn
.
(n!)2
n=0

(5.51)

To find a second solution let


y2 (x) = y1 (x) ln x + xr1

X
n=1

bn xn = y1 (x) ln x +

X
n=1

bn x n ,

120

CHAPTER 5. SERIES SOLUTIONS

since r1 = 0. This implies that


xy2 (x) = xy1 (x) ln x + x

bn xn = xy1 (x) ln x +

n=1

while
y20 (x) = y10 (x) ln x +

bn1 xn ,

n=2

X
1
y1 (x) +
nbn xn1 ,
x
n=1

and hence
xy20 (x) = xy10 (x) ln x + y1 (x) +

nbn xn .

n=1

Also
y200 (x) = y100 (x) ln x +

X
1
2 0
y (x) 2 y1 (x) +
n(n 1)bn xx2 ,
x
x
n=1

implies
x2 y200 (x) = x2 y100 (x) ln x + 2xy 0 (x) = y1 (x) +

n(n 1)bn xn .

n=1

So if y2 (x) is a solution, substituting these expressions into the ODE we obtain


0 = x2 y200 + xy20 + xy2

X
X
X
n
0
n
= y1 (x) +
n(n 1)bn x + xy1 (x) ln x + y1 (x) +
nbn x + xy1 (x) ln x +
bn1 xn
n=1

n=1

n=2

+ y 

= [x2 y100 (x) + xy10 (x) + xy1 (x)] ln x + 2xy10 (x) 
y1
(x)
(n2 bn + bn1 )xn .
1 (x) + b1 x +
{z
}
|
n=2
=0 because L[y1 ]=0

Seemingly miraculously the log terms all cancel. Actually there was nothing miraculous about it at all;
the form of the solution y2 was chosen expressly because this would happen. Because of the product rule
L[ln xy1 ] = ln xL[y1 ] + stuff where the ln x terms in stuff are all differentiated at least once, and hence
do not contain logs anymore, but instead negative powers of x (which can be multiplied with power
series without problem). Notice that we have not yet used that we know the solution y1 . If you use the
explicit expression for y1 in the formulas above you send up with a soup of algebraic manipulations. It
is best to leave y1 as a general function until the log terms have been removed. Now we have
0 = 2xy10 (x) + b1 x +

(n2 bn + bn1 )xn ,

n=2

but from (5.51)


y10 (x) =
so
0=

X
X
2(1)n xn
+ b1 x +
(n2 bn + bn1 )xn .
n!(n

1)!
n=1
n=2

Now equate coefficients to find the bn s.


x1 ] 2 + b1 = 0

X
(1)n xn1
,
n!(n 1)!
n=1

b1 = 2,

5.4. REGULAR SINGULAR POINTS

xn ]
So

2(1)n
+ n2 bn + bn1 = 0
n!(n 1)!

121

bn =

1
bn1
+
n2
n

2(1)n+1
(n!)2


.

 



2
1 2(1)3
1
2(1)3
b2 = 2 +
= 1+
2
2
22
2
22








1
1
1 2(1)4
1 1
2(1)3
2(1)4
b3 = 2 1 +
+
= 1+ +
3
2
22
3
(3!)2
2 3
(3!)2
!


n
X
1
2(1)n+1
bn =
i
(n!)2
i=1

as before, and our second solution is


y2 (x) = y1 (x) ln x +
= y1 (x) ln x +

X
n=1

X
n=1

bn xn
n
X
1
i=1

!

2(1)n+1
(n!)2

xn .

122

CHAPTER 5. SERIES SOLUTIONS

Theorem 5.4.6 (Frobenius Theorem)


Let
L[y] = (x x0 )2 y 00 + (x x0 )p(x)y 0 + q(x)y = 0
where x0 is a regular singular point so p(x) and q(x) are analytic at x0 with
p(x) =

pn (x x0 )n

and

q(x) =

n=0

qn (x x0 )n ,

n=0

with > 0 the minimum of the radius of convergence for the series for p(x) and q(x). Let r1 and r2
be the roots of the indicial equation (5.33) with r1 > r2 if both are real. Then there exists a solution
of the form
"
#

X
r1
n
y1 (x) = |x x0 |
1+
an (r1 )(x x0 )
n=1

where an (r1 ) is defined by the recursion


n1
X
1
an (r)[(r + k)pnk + pnk ] = 0
an (r) =
F (n + r)

n > 1,

(5.52)

k=0

with r = r1 , where F (r) is the indicial polynomial (5.34). We define a second solution y2 (x) as follows.
i) If r1 r2 6= 0 and r1 r2 6= n, n N, (so r1 and r2 do not differ by an integer) then a second
solution is
"
#

X
r
n
y2 (x) = |x x0 | 1 +
an (r2 )(x x0 )
n=1

where the coefficients an (r2 ) satisfy (5.52) with r = r2 for n > 1.


ii) If r1 = r2 , the second solution is
y2 (x) = y1 (x) ln |x x0 | + |x x0 |r1

bn (x x0 )n ,

n=1

where bn = a0n (r1 ) and an (r) satisfies (5.52) for n > 1.


iii) If r1 r2 = N N, then
"
y2 (x) = ay1 (x) ln |x x0 | + |x x0 |r2 1 +

#
cn (x x0 )n

(5.53)

n=1

where
a = lim (r r2 )aN (r)
rr2

and

(possibly zero)

(5.54)



d
cn =
[(r r2 )an (r)]
.
dr
r=r2

Each series in y1 (x) and y2 (x) converges at least for all |x x0 | < , and y1 (x) and y2 (x) define a
fundamental set of solutions for x (x0 , x0 ) and for x (x0 , x0 + ).

We will not prove this theorem, but that they we already showed how to find y1 (x), and also how to find
y2 (x) in the first two cases. Note that the summations in the solution definitions all start from n = 1 and

5.4. REGULAR SINGULAR POINTS

123

P
a0 has been taken to be 1. With a0 = 1 we have
are often of the form 1 + n=1
n . . .. This is because P
Pa

1 = a0 (x x0 )0 , so instead of n=0 an . . . we write 1 + n=1 an . . ..


I once taught the derivation of the solution y2 (x) in the case where r1 r2 is an integer but everybodys
eyes glazed over. I will add the derivation to some future version of these notes. If you use (iii) to derive
a solution when r1 r2 = N N then the eye points to note are that the constant a is defined by (5.54)
where aN (r) satisfies (5.52) with the N in aN (r) being the same N as N = r1 r2 . This term arises
from choosing the coefficients to avoid the division by zero that would occur in (5.52) when computing the
nth coefficient of the solution if we had assumed that the solution had the same form as in case (i), since
F (N + r2 ) = F (r1 r2 + r2 ) = F (r1 ) = 0. Just as in the earlier example where we were able to compute
the coefficients bn in case (ii) either by direct substitution into the ODE or from the given formula, we can
also compute the cn both ways. Assuming x0 = 0 and x > 0 equation (5.53) simplifies to
"
#

X
y2 (x) = ay1 (x) ln x + xr2 1 +
cn xn .
n=1

5.4.3

Complex Roots of Indicial Equation

Frobenius method also gives real solutions when the indicial equation (5.33) has complex roots, just as
we saw for Euler equations. However this is beyond the scope of this course, but when I have time I
will add supplemental notes here.

124

CHAPTER 5. SERIES SOLUTIONS

Chapter 6

Laplace Transforms
The Laplace Transform was not invented by Laplace, nor did he write it in the modern form. However, he
was the first to have the idea of transforming complete differential equations to solve them. In the nineteenth
century operator calculus was developed amongst others by Heaviside to transform differential equations into
algebraic problems. The equivalence of these approaches and the modern theory of Laplace transforms did
not emerge until the 1930s.
Laplace transforms are useful for solving linear constant coefficient ODE initial value problems, since
the initial conditions and particular solutions are incorporated in the problem from the outset, and do not
have to be solved for in a sequence of several steps. They are particularly useful for solving problems with
discontinuities.

6.1

Introduction

The Laplace transform is so-called because it takes one function f (t) and transforms it into another function
F (s) of a different independent variable. This is a very different beast to a simple change of variables. We
will transform entire differential equations, and thus reduce solving the ODE to an algebra problem. Having
solved the algebra problem we invert the transform to obtain the solution to the original ODE.
Definition 6.1.1 Laplace Transform
Let f : [0, ) R then the Laplace transform of f is denoted by L{f (t)} or F (s) and defined by
Z
L{f (t)} = F (s) =
est f (t)dt.
(6.1)
0

In the most general case, s in (6.1) can be a complex variable, but since we are not using or assuming
complex analysis in this treatment we will only consider s R. We will see below that the for certain
functions f the Laplace transform is only defined for s > a for some a R.
Where there is no danger of confusion we will use capital letters to denote Laplace transforms of functions
denote by lowercase letters. So Y (s) will be the Laplace transform of y(t) etc. Where there might be confusion
1
or when transforming functions that do not have names we will use the L notation, eg for L{ 1+t
2 }. We will
take Laplace transforms of ODEs below, so we will have cause to consider L{L[y](t)}, where L denotes the
Laplace transform and L denotes the linear operator that defines the ODE. So keep your curly Ls curly and
your square Ls square, otherwise confusion will ensue.
Z
Z T
Of course, by
. . . ds in (6.1) we mean lim
. . . dt, and we will ensure the existence of this limit
0

below.
The Laplace Transform is just one example of an integral transform. A general integral transform is
125

126

CHAPTER 6. LAPLACE TRANSFORMS

defined by
Z

K(s, t)f (t)dt,

F (s) =

with different transforms being defined by different limits of integration and different kernel functions K(s, t).
The Fourier Transform and Laplace Transform are the most well known, but we will restrict our attention
to the Laplace transform.
We will be interested in transforms of discontinuous functions. Note that for the Laplace transform to be
defined we require at least that the function f (t) is integrable in order to be able to evaluate (6.1). Continuity
is not required. In the most general treatments f (t) may be a measurable function, but at least until we
consider the Dirac delta function we will restrict attention to piecewise continuous functions in the following
sense.
Definition 6.1.2 Piecewise continuous
A function f is said to be piecewise continuous for t [, ] if [, ] can be partitioned by a finite
number of points 0 = t0 < t1 < t2 < < tn = such that
(i) f is continuous on each open interval t (ti , ti+1 ), i = 0, 1, , n 1
(ii) for t (ti , ti+1 ), limtti f (t) and limtti+1 f (t) both exist and are finite.
f is said to be piecewise continuous on [, +) if it is piecewise continuous on [, ] for all (, +).

Note
lim f (t) for t (ti , ti+1 ) and for t (ti+1 , ti+2 ) need not be equal. Such a function is continuous

tti+1

except for a finite number of jump discontinuities on any bounded interval. However, there may be
infinitely many discontinuities on the real line. So a function which is discontinuous at each integer
n N has infinitely many discontinuities on the real line, but only finitely many on any bounded
interval, so can be piecewise continuous. Generally in analysis we say that the points where a property
holds are isolated if the property only holds at a finite number of points on any bounded set. We will
require the discontinuities of f to isolated, so that there is no problem in evaluating the Riemman
integral in (6.1).

t1

t2

For a piecewise continuous function we evaluate integrals via


Z

f (t)dt =

n1
X Z ti+1
i=0

f (t)dt.

ti

Notice that the value of f at the discontinuities does not affect the integral, and so we will not worry
about them.

6.1. INTRODUCTION

127

Example 6.1.3
tan t is not piecewise continuous because it is not bounded.

Definition 6.1.4 Exponential order


A function f (t) is said to be of exponential order a (or simply of exponential order) if there exist
constants a, K, T such that
|f (t)| 6 Keat
t > T.

If f is piecewise continuous and of exponential order we can shoe that the Laplace transform exists.
Theorem 6.1.5
Suppose that f is piecewise continuous for t [0, ) and that f (t) has exponential order a, then the
Laplace transform L{f (t)} = F (s) exists for s > a.

Proof
finite since f is pw continuous on [0, M ]

z
Z

est f (t)dt =

F (s) =
0

}|

est f (t)dt +

est f (t)dt
{z
}

We need to show this converges

But
Z

st

|f (t)|dt 6 K

st at

e dt = K

t(as)

et(as)
dt = K
as



<
M

(For M > T ) so the integral converges as required.

We can use (6.1) to directly compute the Laplace transform of many simple functions, but not all functions
have Laplace transforms.
Example 6.1.6
2

i) L{et } does not exist. The function et is not of exponential order, and the integral in (6.1) is
unbounded.

ii) L 1t does not exist. The function 1t is not piecewise continuous on [0, ) because limt0 1t does
not exist.

Example 6.1.7 L{eat } & L{1}


The function f (t) = eat is trivially of exponential order and is continuous, so L{eat } exists. Indeed
L{eat } =

Z
0

est eat dt =

Z
0

e(as)t dt =

e(as)t
as


=
0

1
sa

128

CHAPTER 6. LAPLACE TRANSFORMS

for s > a.
As a special case, taking a = 0, L{1} =

1
for s > 0.
s

Example 6.1.8 L{t}


t < 1 + t < et for t > 0 so t is of exponential order 1. Actually t < et for all t sufficiently large for any
> 0, so t is of exponential order for each > 0. Now
 st  Z st
Z
e
te
L{t} =
test dt =

dt.
s 0
s
0
0
t
1
= lim
= 0 (using LHopitals rule) we obtain,
t kekt
ekt
Z
1
1 st
1
e dt = L{1} = 2 ,
L{t} =
s 0
s
s

Noting that for k > 0, lim tekt = lim


t

for s > 0.

Example 6.1.9 L{cos t} & L{sin t}


Let f (t) = cos t. Since | cos t| 6 1 the function f is clearly of exponential order 0. Its Laplace
transform is given by
Z
F (s) = L{cos t} =
est cos tdt
0

Integration by parts twice yields




Z
st
1

F (s) = est cos t


e
sin tdt
s
s 0
0
Z
1 st
e
sin tdt
=
s
s 0



Z
1
st
1
=
+
est sin t
e
cos tdt
s
s
s
s 0
0
=
so

1 2
2 F (s)
s
s


2
1
F (s) 1 + 2 = ,
s
s

and
L{cos t} = F (s) =
Similarly, we can compute
L{sin t} =

s2

s
.
+ 2

,
s2 + 2

or derive this from (6.2) which can be rewritten as


L{cos t} =

1
L{sin t}.
s
s

(6.2)

6.1. INTRODUCTION

129

The Laplace transforms of common functions are collected together in Table 6.1 on page 130.
Linearity of the Laplace transform will be useful in computations
Z
Z
Z
L{f (t) + g(t)} =
est [f (t) + g(t)]dt =
est f (t)dt +
est g(t)dt = L{f (t)} + L{g(t)}.
0

Theorem 6.1.10 Behaviour of F (s) at +


If f is piecewise continuous on [0, ) and of exponential order a, then
lim F (s) = 0.

Proof
Let f be of exponential order a, and let s > a and M > T where |f (t)| 6 Keat for t > T . Then

Z


est f (t)dt
|F (s)| =
Z0
Z

M




st
est f (t)dt
6
e f (t)dt +
0

M
Z M
Z
6 sup |f (t)|
est dt + K
e(as)t dt
t[0,M ]


e(as)t
as M
t[0,M ]
0


 M (as) 
1 eM s
e
= sup |f (t)|
+K
s
sa
t[0,M ]


= sup |f (t)|


st M

e
s

+K

where we used s > a in evaluating e(as)t to be zero at t = +. But now the terms in each square
bracket tend to zero as s , so |F (s)| 0 as s which implies the result.

Theorem 6.1.10 shows that F (s) = 1 and F (s) =
continuous functions of exponential order.

s
s+1

are not Laplace transforms of functions of piecewise

Theorem 6.1.11 First Translation Theorem


If L{f (t)} = F (s) and a R, then
L{eat f (t)} = F (s a).

Proof
Directly from the definition of the Laplace transform we have
Z
Z
at
st at
L{e f (t)} =
e e f (t)dt =
e(sa)t f (t)dt = F (s a).
0

130

CHAPTER 6. LAPLACE TRANSFORMS


Function f (t)
1
tn
eat
sin at
cos at
sinh at
cosh at
eat f (t)
U(t a) or Ua (t) (a > 0)
(t a) (a > 0)
U(t a)f (t a) or Ua (t)f (t a)
f (n) (t)
(t)n f (t)
Rt
f g(t) = 0 f ( )g(t ) d

Laplace transform F (s)


1/s (s > 0)
n!/sn+1 (s > 0)
1/(s a) (s > a)
a/(s2 + a2 ) (s > 0)
s/(s2 + a2 ) (s > 0)
a/(s2 a2 ) (s > |a|)
s/(s2 a2 ) (s > |a|)
F (s + a)
eas /s (s > 0)
eas
eas F (s)
sn F (s) sn1 f (0) sn2 f 0 (0) f (n1) (0)
F (n) (s)
F (s)G(s)

Derivation
Example 6.1.7
Example 6.1.7
Example 6.1.9
Example 6.1.9

Theorem 6.1.11
Corollary 6.3.5
Theorem 6.3.8
Theorem 6.3.4
Theorem 6.2.1

Table 6.1: Table of Standard Laplace Transforms


Example 6.1.12
We compute L{eat cos t} using the first translation theorem as


sa
s
at

=
.
L{e cos t} = L{cos t}ssa = 2
s + 2 ssa
(s a)2 + 2
The s s a substitution notation can be very useful to avoid confusion.

6.2

Solving Constant Coefficient Differential Equations

Before we can solve ODEs we need to be able to transform derivatives. The following theorem tells us how.
Theorem 6.2.1
Suppose that f, f 0 , . . . , f (n1) are continuous on [0, ), and that f (n) is piecewise continuous on
[0, ), and all are of exponential order a, then L{f (n) (t)} exists for s > a and is given by
L{f (n) (t)} = sn L{f (t)} sn1 f (0) sn2 f 0 (0) sf (n2) (0) f (n1) (0)
= sn L{f (t)}

n1
X

sn1k f (k) (0).

k=0

Proof
First prove the result for n = 1. We need to show that
L{f 0 (t)} = sL{f (t)} f (0).

6.2. SOLVING CONSTANT COEFFICIENT DIFFERENTIAL EQUATIONS

131

Let f 0 (t) have discontinuities at t1 , . . . , tn [0, A] and let t0 = 0, tn = A, then


Z

est f 0 (t)dt =

n1
X Z ti+1
i=0

est f 0 (t)dt.

ti

Integrate by parts to obtain


Z

st 0

f (t)dt =

n1
X

[e

st

t
f (t)]ti+1
i

+s

i=0

n1
X Z ti+1

est f (t)dt,

ti

i=0

But f (t) is continuous, so


Z

A
st 0

f (t)dt = e

sA

est f (t)dt.

f (A) f (0) + s

But for A sufficiently large,


|esA f (A)| 6 |esA KeAa | = KeA(sa) 0 as A for s > a
so
L{f 0 (t)} = sL{f (t)} f (0)
as required.
Now apply this result to f 00 (t), then
L{f 00 (t)} = sL{f 0 (t)} f 0 (0),
and using the result we already established for L{f 0 (t)} we have
L{f 00 (t)} = s(sL{f (t)} f (0)) f 0 (0) = s2 L{f (t)} sf (0) f 0 (0).
The result for general n can be established by induction.

We can use the above theory to compute theP


Laplace transform of the solution of an initial value problem
n
without first solving the problem. Let L[y] = k=0 ak y(k) for constants a0 , . . . , an (an 6= 0), then we solve
the IVP
L[y](t) = g(t),

y(0) = 1 , y 0 (0) = 2 , . . . , y (n1) (0) = n .

Solve this by taking the Laplace transform of the entire equation to obtain
(
L{g(t)} = L{L[y](t)} = L

n
X

)
ak y(k)

k=0

n
X

ak L{y (k) },

k=0

and hence
n
X

ak L{y (k) } = L{g(t)},

k=0

where all we used was the linearity of the Laplace transform and the definition of the operator L[y]. Now
let Y (s) = L{y(t)} and G(s) = L{g(t)}. Using Theorem 6.2.1 we obtain

G(s) = L{g(t)} =

n
X
k=0

ak sk L{y(t)}

k1
X
j=0

sk1j y (j) (0)

132

CHAPTER 6. LAPLACE TRANSFORMS

which is of the form


Known polynomial in s

z"

G(s)
| {z }

}| #{
n
X
=
ak sk

Transform of a

k=0

known function

Y (s)
| {z }

Transform of so-

n
X
k=0

lution

ak

k1
X

sk1j y (j) (0)

j=0

{z

Known polynomial in s

(depends on the initial


conditions) = Q(s)

Write this as
G(s) = P (s)Y (s) Q(s),
and rearranging we obtain
Y (s) =

G(s) + Q(s)
.
P (s)

So we have found the Laplace Transform of the solution y(t) using algebra. Now all we need to be able to
do is to invert the Laplace transform to solve the initial value problem. Since Y (s) = L{y(t)}, we need an
inverse transform L1 so that y(t) = L1 {Y (t)}.
This can be done in two ways. Either using complex analysis or by using our table of Laplace transforms
backwards.
The Bromwich integral formula
Z a+i
1
1
f (t) = L {F (s)} =
F (s)est ds
2i ai
allows inverse Laplace transform to be computed analytically using complex integrals. However, we will not
use this.
The Bromwich integral tells us that L1 {F (s)} is uniquely defined. In fact, it can be shown that for
continuous functions f1 and f2 ,
L{f1 (t)} = L{f2 (t)}
if and only if f1 (t) = f2 (t) t > 0. For piecewise continuous functions essentially the same result holds;
then L{f1 (t)} = L{f2 (t)} if and only if the functions have the same discontinuity points t1 , t2 , . . . and
limtt f1 (t) = limtt f2 (t) i. So f1 (t) = f2 (t) t > 0 except maybe at the jump discontinuity points
i
i
t1 , t2 , . . . . This gives us a well-defined inverse Laplace Transform. Moreover, linearity of the Laplace Transform implies linearity of the inverse Laplace Transform.
L{f (t) + g(t)} = L{f (t)} + L{g(t)}
= F (s) + G(s)
So
L1 {F (s) + G(s)} = f (t) + g(t)

(Noting that L1 {L{f (t)}} = f (t))

= L1 {F (s)} + L1 {G(s)}
We exploit this linearity and table of Laplace transforms to find inverse transforms.
Example 6.2.2
To find the inverse Laplace transform of
F (s) =

2s + 1
s2 + 4

6.2. SOLVING CONSTANT COEFFICIENT DIFFERENTIAL EQUATIONS

rewrite it as


F (s) = 2

s
s2 + 4


+

1
2

2
s2 + 4

then
s
1
2
} + L1 { 2
}
s2 + 4
2
s +4
1
= 2 cos 2t + sin 2t.
2

f (t) = L1 {F (s)} = 2L1 {

Example 6.2.3
Let
F (s) =

2s + 1
.
s2 + 2s + 2

First rewrite this as


F (s) =


 

2s + 1
2s + 1
s+1
1
=
=
2

,
s2 + 2s + 2
(s + 1)2 + 1
(s + 1)2 + 1
(s + 1)2 + 1

from which using the First Translation theorem we see that


F (s) = 2L{cos t}ss+1 L{sin t}ss+1 = 2L{et cos t} L{et sin t},
so
f (t) = L1 {F (s)} = 2et cos t et sin t.
Lets try this on an initial value problem
Example 6.2.4
y 00 3y 0 + 2y = e4t

y(0) = 1

y 0 (0) = 5

L{y 00 } 3L{y 0 } + 2L{y} = L{e4t }


1
s+4
1
(s2 3s + 2)Y (s) + (3 s)y(0) y 0 (0) =
s+4
1
(s 1)(s 2)Y (s) =
(3 s) + 5
s+4
1
(s 1)(s 2)Y (s) = s + 2 +
s+4
s+2
1
Y (s) =
+
(s 1)(s 2) (s 1)(s 2)(s + 4)

[s2 Y (s) sy(0) y 0 (0)] 3[sY (s) y(0)] + 2Y (s) =

133

134

CHAPTER 6. LAPLACE TRANSFORMS

Now write Y (s) in a more friendly form using partial fractions.



 

3
4
1/5
1/6
1/30
Y (s) =
+
+
+
+
s1 s2
s1 s2 s+4






16
1
25
1
1
1
L{y(t)} =
+
+
5
s1
6 s2
30 s + 4






16
1
25
1
1
1
y(t) = L1 {
+
+
}
5
s1
6 s2
30 s + 4
16 1
1
25
1
1
1
=
L {
} + L1 {
} + L1 {
}
5
s1
6
s2
30
s+4
16 t 25 2t
1
y(t) =
e + e + e4t
5
6
30
Its easy to check that this satisfies the ODE and the initial conditions.

Example 6.2.5
y 0 + y = sin t

y(0) = 1

L{y 0 } + L{y} = L{sin t}


1
[sY (s) y(0)] + Y (s) = 2
s +1
1
(1 + s)Y (s) 1 = 2
s +1
1
1
Y (s) = 2
+
s + 1 (s2 + 1)(1 + s)
Partial fractions
(s2

1
As + B
C
= 2
+
+ 1)(1 + s)
s +1
1+s

1 = (As + B)(1 + s) + C(s2 + 1)

()

ELC (equate like coefficients)


s2 ]

0=A+C

s]

0=A+B

1]

1=B+C
A=

1
2

B=C=

1
2

Using the coverup method, or equivalently, setting s = 1 in (*), we see C = 21 , then B =


A = 12 .
so
1
1
1s
1
+ 22 2 + 2
s+1
s +1
s+1






3
1
1
1
1
s
=
+

2 s+1
2 s2 + 1
2 s2 + 1

Y (s) =

1
2

and

6.3. DISCONTINUOUS FUNCTIONS

135

so
y(t) =

6.3

3 t 1
1
e + sin t cos t
2
2
2

Discontinuous Functions

Laplace Transforms allow us to solve non-homogeneous problems with initial conditions in one step, which
is convenient, but their real power is seen in problems with discontinuities.
Definition 6.3.1
The unit step function, or Heaviside function U(t a) is defined by
(
0 t<a
U(t a) = Ua (t) =
1 t>a

Note
The Heaviside function is piecewise continuous and of exponential order, and so he has a Laplace
transform.

This function is very useful in practical (e.g. engineering) applications where forces are turned on or off.

U(t a)
1
t

a
The Heaviside function is often combined with other functions.
Example 6.3.2
Let f (t) be the difference f two Heaviside functions:
f (t) = U(t 1) U(t 2)
which gives
f (t)

1
1

136

CHAPTER 6. LAPLACE TRANSFORMS

Example 6.3.3
f (t) = (2t 3)U(t 1)
f (t)

3
2

We can use Heaviside functions to translate functions. Suppose f (t) is defined for t > 0 and let

(
0
t<a
g(t) = f (t a)U(t a) =
f (t a) t > a

(a > 0)

[fig 4][fig 5]
Theorem 6.3.4 Second Translation Theorem
If F (s) = L{f (t)} and a > 0, then
L{f (t a)U(t a)} = eas F (s)
L{g(t)U(t a)} = eas L{g(t + a)}

(f (t) = g(t + a))

Proof
 Z



est
f
(t

a)U(t

a)dt +
est f (t a) U(t a) dt


| {z }

a
0
=1
Z
=
est f (t a)dt
a
Z
=
es(x+a) f (x)dx
0
Z
= esa
esx f (x)dx
Z

L{f (t a)U(t a)} =

x=ta

= eas F (s)


6.3. DISCONTINUOUS FUNCTIONS

137

Corollary 6.3.5
L{U(t a)} = L{1 U(t a)} = eas

1
eas
=
s
s

Example 6.3.6
(
0
06t<
y + y = f (t) =
3 cos t t >
0

Let y(0) = 2

Noting that cos t = cos((t ) + ) = g(t ) where g(t) = cos(t + ) we write


y 0 + y = f (t) = 3 cos t U(t ) = 3 cos((t ) + )U(t ).
Now
L{cos((t ) + )U(t )} = es L{cos(t + )} = es L{cos t} = es

s2

s
+1

so now
3ses
= L{f (t)} = L{y 0 + y}
s2 + 1
= sY (s) = y(0) + Y (s)
= (s + 1)Y (s) 2
so
Y (s) =

2
s
3es 2
s+1
(s + 1)(s + 1)

s
As + B
C
= 2
+
(s2 + 1)(s + 1)
s +1
s+1
Solve partial fractions to get
A=B=

1
2

C=

1
2



2
1 (1 + s) 1 1
3es

s+1
2 s2 + 1
21+s


1
2
3 s
s
1
=
e
+

s+1 2
s2 + 1 s2 + 1 s + 1
3
y(t) = 2et U(t )[sin(t ) + cos(t ) e(t) ]
2
3
= 2et U(t )[ sin t cos t e(t) ]
2

Y (s) =

Using 2nd translation thm

Notice that the term in square brackets is equal to 0 when t = so the stated solution is continuous
for all t > 0 and clearly infinitely differentiable for all t > 0 and t 6= .
Notice y(t) is continuous for all y > 0 and satisfies y(0) = 2. y 0 (t) is continuous except at t = .
[sin t + cos t + e(t) ]|t= = 1 + 1 = 0
which leads to continuity of y(t) at t = .

138

CHAPTER 6. LAPLACE TRANSFORMS

Example 6.3.7
Consider ( > 0)
t=+

z }| {
lim (3 cos( + ) U( + ) 3 cos( ) U( ))
0 |
|
{z
}|
{z
}
{z
}
3

=1

=0

=3
= lim ((y 0 ( + ) y( + )) (y 0 ( ) y( )))but y(t) is cts
0

= lim (y 0 ( + ) y 0 ( ) = 3
0

so y 0 jumps by 3 at t =
Exercise: confirm this from the solution
A Heaviside function in an ODE always leads to a discontinuity in the highest derivative of y that
appears in the ODE.

6.3.1

Dirac Delta Function

The modern definition of (t t0 ) is as a distribution via its action. So let (t t0 ) be such that
Z
f (t)(t t0 )dt = f (t0 )

so (t t0 ) picks out the value of integrand f (t) at t = t0 . Its enough to integrate past t = t0 so
Z t0 +
f (t)(t t0 )dt = f (t0 )
for any > 0
t0

So
Z

(
0
s < t0
f (t)(t t0 )dt =
f (t0 ) s > t0

In particular, taking f (t0 ) = 1 t


Z
0

(
0
(t t0 )dt =
1

s < t0
s > t0

i.e. the integral of the Dirac Delta Function is the Heaviside function; conversely, the derivative of the
Heaviside function is the delta function in some sense which to be made rigorous requires the theory of
distributions. Lets avoid the deep analysis.
Originally, the delta function was defined by

t < t) a
0
1
a (t t0 ) = 2a
t [t0 a, t0 + a]

0
t > t0 + a
Notice

a (t t0 )dt =

1
[(t0 + a) (t0 a)] = 1 = lim
a0
2a

t0

a (t t0 )dt

6.3. DISCONTINUOUS FUNCTIONS

139

If we take limit as a 0, then a (t t0 ) becomes narrower and taller. Integral always 1. Also,
Z

a0

1
a0 2a

t0 +a

a (t t0 )f (t)dt = lim

lim

f (t)dt = lim
t0 a

a0

1
[2a f (t(a))]
2a

By Integral Mean Value Theorem for some point t(a) [t0 a, t0 + a]


= lim f (t(a)) = f (t0 )
a0

Delta functions are useful in engineering and physics to model impulses. Classically, an impulse is the
integral of some force over time. The delta function corresponds to an integral of value 1, but applied over
an infinitely short time interval. We can treat delta functions either via limit as a 0 of (t t0 ) or directly
from its integral properties. We prefer the second approach.
Theorem 6.3.8 L{(t t0 )}
For t0 > 0,

L{(t t0 )} = est0 .

Proof
Using the integral/action definition of the delta function we simply have
Z
L{(t t0 )} =
est (t t0 )dt = est0 .
0

If we use the a definition then


a (t t0 ) =
hence
L{a (t t0 )} =

1
[U(t (t0 a)) U(t (t0 + a))],
2a



 as

es(t0 +a)
e eas
1 es(t0 a)

= est0
.
2a
s
s
2as

Then using LHopitals rule


lim L{a (t t0 )} = e

st0

a0


eas eas
lim
= est0 .
a0
2as


Now to complete the proof we have to assume that


lim L{a (t t0 )} = L{ lim a (t t0 )} = L{(t t0 )}

a0

a0

but the first equality on the previous line is troublesome, as justifying exchanging the limit and the
transform cannot be justified rigourously. This worried mathematicians for a long time until the modern
theory via the integral was developed.

Corollary 6.3.9
L{(t)} = 1

140

CHAPTER 6. LAPLACE TRANSFORMS

Proof
Apply Theorem 6.3.8, taking the limit as t0 0.

Notice that L{(t)} = 1


0
 as s , so (t) cannot be a piecewise continuous function of exponential
order. Although L{(tt0 )} 0 as s for t0 > 0 it is not a piecewise continuous function of exponential
order either; since it is just a translate of (t).
Example 6.3.10
Let us solve the initial value problem
y 00 + y 0 + y = f (t) = (t 1) + U(t 2)e(t2)
y(0) = 0
y 0 (0) = 1
R
[fig 2 - f (t)][fig 3 f (t)]
Now
e2s
L{U(t 2)e(t2) } =
&
L{(t 1)} = es ,
s+1
while
L{y 00 + y 0 + y} = s2 Y (s) sy(0) sy 0 (0) + [sY (s) y(0)] + Y (s)
!
2

3
1
+
Y (s) 1
= (s2 + s + 1)Y (s) 1 =
s+
2
4
Thus the Laplace transform of the IVP is


1
s+
2

2

3
+
4

!
Y (s) 1 = es +

e2s
,
s+1

and rearranging
1
Y (s) =
1 2
(s + 2 ) +
But

1
(s +

1 2
2)

3
4

3
4



e2s
s
1+e +
.
s+1

1
As + B
=
s+1
(s + 12 )2 +

3
4

C
,
s+1

and using the cover up method, or multiplying through by the denominator of the left-hand side to get


1 2 3
1 = (As + B)(s + 1) + C (s + ) +
,
2
4
and setting s = 1 we find that C = 1. Equating the coefficients of s2 and s0 reveals that A = 1 and
B = 0. Hence
!



2
3/2
1
s
s
2s
Y (s) =
[1 + e ] + e

.
s + 1 (s + 12 )2 + 34
3 (s + 21 )2 + 43
Now by the First translation theorem
(
L

3/2
1 2
(s + 2 ) +

)
3
4


3/2

= L1

s2 + 34

ss+1/2

=e

21 t

sin

3
t,
2

6.3. DISCONTINUOUS FUNCTIONS

141

while by the Second translation theorem


(
!)
(
)

3/2
3/2
1
s
1
L
e
= U(t 1)L
(s + 12 )2 + 34
(s + 12 )2 + 34

= U(t 1)e

21 (t1)

tta

sin(

3
(t 1)).
2

Hence
"
#

2
3
3
12 t
21 (t1)
y(t) = e
sin
t + U(t 1)e
sin
(t 1) + U(t 2)e(t2)
2
2
3
(
"
#)

(s 21 )
1 2
3/2
1
2s
+L
e
+
2 3 (s + 12 )2 + 43
(s + 12 )2 + 43

2 1t
2
3
3
21 (t1)
2

e
U(t 1)e
=
sin
t+
sin
(t 1)
2
2
3
3

3
1 1 (t2)
3
(t2)
21 (t2)
2
+ U(t 2)[e
e
cos
(t 2) + e
sin
(t 2)]
2
2
3
It is easy to check that the given solution y(t) satisfies the initial conditions and is continuous for all
t > 0. Moreover it is infinitely differentiable everywhere except at t = 1 and t = 2. At t = 2 the
Heaviside function causes a discontinuity in y 00 but y and y 0 are continuous at t = 2.
At t = 1, the delta function acts. What happens? y(t) is continuous at t = 1 and y 0 (t) given by

1
3
3
1 1t

t
0
t + e 2 cos
t
y (t) = e 2 sin
2
2
3
#
"

2
1 1 (t1)
3
3 1 (t1)
3
2
2
+ U(t 1) e
(t 1) +
e
(t 1)
sin
cos
2
2
2
2
3
|
{z
}
()

+ U(t 2)[something irrelevant]


Notice that y 0 (0) = 1 as required. Also notice that we use (U(t 1)f (t))0 = U(t 1)f 0 (t). To see this,
simply consider the t < 1 and t >
1 cases separately.

3
At t = 1, the (*) term equals 2 , so at t = 1, y 0 (t) has a jump discontinuity with
lim [y 0 (1 + ) y 0 (1 )] = 1.

We can also why y 0 is discontinuous at t = 1 using the definition of the delta function directly on the
ODE rather than the solution:
Z 1+
Z 1+
Z 1+
((
(t2)
((
(2)e
lim
y 00 (t)dt = lim
(y 00 + y 0 + y)dt = lim
(t 1) + (
U(t
dt = 1
(
0

so
Z

1+

1 = lim

y 00 (t)dt = lim [y 0 (t + ) y 0 (t )]
0

so y 0 must be discontinuous at t = 1.
The behaviour seen in the previous example is general. So
i) A Heaviside function U(t 1) in general causes a discontinuity in y (n) for an nth order ODE.
ii) A Dirac delta function causes a discontinuity in y (n1) for an nth order ODE.

142

CHAPTER 6. LAPLACE TRANSFORMS

6.4

Convolutions

Definition 6.4.1
If two functions f and g are piecewise continuous on [0, ), then the convolution of f and g is a new
function defined by
Z t
f ( )g(t )d
(f g)(t) =
0

Example 6.4.2
et sin t =

e sin(t )d =

1
(sin t cos t + et )
2

Convolutions are interesting because:


Theorem 6.4.3 Convolution Theorem
If f and g are piecewise continuous on [0, ) and of exponential order, then
L{f g} = L{f (t)}L{g(t)} = F (s)G(s)

Corollary 6.4.4
L1 {F (s)G(s)} = (f g)(t)

Proof Convolution Theorem


First, show f g is itself of exponential order.
Z

|(f g)(t)| 6

|f ( )||g(t )|d
Z t
2
6K
ea ea(t ) d
0
Z t
2 at
=K e
d
0

= K 2 teat
6 K 2 et eat 6 K 2 e(a+1)t

6.4. CONVOLUTIONS

143

Now
Z

f ( )g(t )d est dt
Z
Z
s
g(t )es(t ) dtd
=
f ( )e

L{f g} =

Now let x = t [fig 1]

L{f g} =

g(x)esx dxd

f ( )e

x=0

f ( )es d

g(x)esx dx

x=0

= F (s)G(s)

Properties of Convolutions
For constants , , and functions f (t), g(t), h(t),
i) (f g)(t) = (g f )(t)
ii) ((f + g) h)(t) = (f h)(t) + (g h)(t)
iii) 0 g 0
iv) Beware: (1 g)(t) = (g 1)(t) 6= g(t)
Convolutions are useful for computing come Laplace Transforms
Example 6.4.5

Find L{ t}
Let f (t) = t, then
(f f )(t) =

Z t

t t d
0

Let x =

t
2

t/2

(f f )(t) =
t/2

But now


L{f f } = L

t
(x + )
2

2 t2
8


=


t
t2
x dx =
2
8

2!

= 3
8 s3
4s

But by convolution theorem,


L{f f } = F (s)F (s)
so

F (s) = 3 F (s) = 3/2 = L{f (t)} = L{ t}


4s
2s
2

We also often use the Convolution theorem to avoid partial fractions

144

CHAPTER 6. LAPLACE TRANSFORMS

Example 6.4.6


s
1
1
Find L

= L1 {F (s)G(s)} Method (i) Use Partial fractions Method (i) Use convos2 + 1 s + 3
lution theorem


s
f (t) = L1 {F (s)} = L1
= cos t
s2 + 1


1
1
1
g(t) = L {G(s)} = L
= e3t
s+3
Now
1

{F (s)G(s)} = (f g)(t) =

cos e3(t ) d

Now integrate by parts twice to find answer.

Convolutions and Greens Functions


Let L[y](t) :=

n
X

ak y (k) (t) and solve L[y](t) = f (t) where ak are constants.

k=0

Take Laplace transforms


P (s)Y (s) Q(s) = F (s)

where P (s) =

n
X

ak sk (characteristic polynomial or auxilary function)

k=0

Y (s) = L{y(t)}

F (s) = L{f (t)}

and Q(s) is a polynomial in s arising from the initial conditions.


Y (s) =

Let G(s) =

1
P (s)

1
[F (s) + Q(s)]
P (s)

then Y (s) = G(s)F (s) + G(s)Q(s) so


y(t) = L1 {G(s)F (s) + G(s)Q(s)}
= L1 {G(s)F (s)} + L1 {G(s)Q(s)}
= (f g)(t) + (q g)(t)

This only really becomes useful if we can find g(t).


Definition 6.4.7 Greens Function
The function g(t) which solves
L[g](t) = (t)

g(0) = g 0 (0) = = g (n1) (0) = 0

is called the Greens Function of the differential operator L.

6.4. CONVOLUTIONS

145

Theorem 6.4.8
Let g(t) be the Greens function of L. Then
L{g(t)} = G(s) =

1
P (s)

where P (s) is the characteristic polynomial of L.

Proof
Recall (t) = (t 0) and L{(t)} = 1.
Now since L[y](t) = f (t) has Laplace Transform P (s)Y (s) Q(s) = F (s), so L[g](t) = (t) has
Laplace Transform
P (s)G(s) |{z}
0 = L{(t)}
Q(s)=0 because g(0)=g 0 (0)==0

so P (s)G(s) = 1 as required.

Example 6.4.9
We use Greens function on the Harmonic oscillator
(
y 00 + 2 y = f (t)
y(0) = y 0 (0) = 0
Then y(t) = (f g)(t). Note that (q g)(t) does not appear because Q(s) 0 because of initial
conditions, so q(t) 0. To find the Greens function g(t) let L[g](t) = (t)
From the definition:
g 00 (t) + 2 g 0 (t) = (t)

g(0) = g 0 (0) = 0

s2 G(s) + 2 G(s) = 1
G(s) =

1
s2 + 2

Or by the theorem:
G(s) =
Thus
g(t) = L

1
1
= 2
P (s)
s + 2

1
{G(s)} = L1

and hence
1
y(t) = (f g)(t) =

2
s + 2


=

1
sin t

f ( ) sin((t ))d

t>0

which is a formula for the solution of the IVP which is valid for general functions f . To compute the
solution for any given forcing function f (t) it suffices (!) to evaluate the convolution integral.

146

CHAPTER 6. LAPLACE TRANSFORMS

Laplace Transforms only are useful for linear ODEs. We make essential use of the linearity in several
places. They are also rarely useful for nonconstant coefficient problems. To see why, consider the following:
Example 6.4.10
Z
Z
d
d
st
est f (t)dt =
F (s) =
[e f (t)]dt
ds
ds 0
s
0
Z
=
est tf (t)dt = L{tf (t)}

F 0 (s) =

so
L{tf (t)} = F 0 (s)
Now
L{t2 f (t)} = L{t[tf (t)]} =

d
d
L{tf (t)} = [F 0 (s)] = (1)2 F 00 (s)
ds
ds

In general,
L{y n f (t)} = (1)n F (n) (s)

Example 6.4.11
Consider the Euler Equation
2 t2 y 00 (t) + ty 0 (t) + y(t) = f (t)
d
d
Now L{ty 0 (t)} = ds
L{y 0 (t)} = ds
[sY (s) y(0)] = sY 0 (s) Y (s)

L{t2 y 00 (t)} =

d2
d2
L{y 00 (t)} = 2 [s2 Y (s) sy(0) y 0 (0)]
2
ds
ds
= s2 Y 00 (s) = 4sY 0 (s) + 2Y (s)

So Laplace Transform of the Euler equation is


s2 Y 00 (s) + (4 )sY 0 (s) + (2 + )Y (s) = F (s)
so transformed equation is also an Euler equation, so this was not useful.

Transforms of Periodic Functions

Definition 6.4.12
The function f (t) is periodic if f (t) = f (t + T ) for some T > 0, t > 0.

We already saw how to transform sines and cosines. The following theorem lets us calculate the Laplace

6.4. CONVOLUTIONS

147

transform of any periodic function.


Theorem 6.4.13 Transform of Periodic Function
If f (t) is piecewise continuous on [0, ) and periodic with period T , then
Z

1
1 esT

L{f (t)} = F (s) =

est f (t)dt

Proof
A piecewise continuous periodic function is necessarily bounded and hence of exponential order 0, and
hence has a Laplace transform. Now
T

esT f (t)dt +

F (s) =
0

Let u = t T , then
Z
Z
est f (t)dt =
T

est f (t)dt

es(u+T ) f (u + T )du = esT

esu f (u)du = esT F (s).

Hence
Z

F (s) =

esT f (t)dt + esT F (s)

and the result follows on rearranging.

Example 6.4.14
Consider the square wave

1
1

which is defined by
f (t) =

(1)n U(t n).

n=0

This is periodic with period T = 2, so


1
1 e2s

F (s) = L{f (t)} =


1
=
1 e2s

e
0

st

est f (t)dt

 st 1
1
e
1
dt =
=
.
2s
1e
s 0
s(1 + es )

We could now try to solve an ODE, say


y 00 + y 0 + y = f (t),

148

CHAPTER 6. LAPLACE TRANSFORMS

where f (t) is the square wave. It is easy to find Y (s) the Laplace transform of the solution of an IVP for
1
this ODE. However, because F (s) = s(1+e
s ) terms containing this will appear, and this most definitely is
not in our table of Laplace transforms so finding the inverse Laplace transform is problematical. Indeed,
since f contains an infinite sum of Heaviside functions we expect the answer y(t) to contain an infinite sum
of Heaviside functions. Such a problem would have to be solved either by using Greens functions or by
using the Bromwich integral for the inverse transform. Both approaches are beyond the scope of a usual first
course in ODEs.

Chapter 7

Linear Systems of ODEs


No printed notes will be available this year. Come to class to learn about these.

149

150

CHAPTER 7. LINEAR SYSTEMS OF ODES

Chapter 8

Extra Chapters
Only so much material can be covered in class in a one semester course, but and some choices have to be
made. That said, there is nothing to stop printed notes from containing extra material, beyond the time
and effort that it takes to produce them.
Ideally at some future time I would like to add extra chapters to these notes covering
1) Nonlinear ODEs - introduction to. These are covered in MATH376 in detail.
2) Numerical Solution of ODEs. (Covered in MATH387 or MATH578-579).
3) Difference Equations. Closely related to differential equations. Linear Difference equations are not
currently a trendy subject, and not typically taught in ugrad syllabus. But they are useful (we already
saw linear difference equations in the chapter on Series solutions, and they also arise when applying
numerical methods to ODEs). Nonlinear difference equations can be derived from nonlinear ODEs and
take us to chaos theory.
Id also like to add extra material in earlier chapters including
1. treatment of other Frobenius cases
2. Bessel functions, and later Legendres equation.
3. Riccati equations.
Appendices on basic analysis results that are assumed, and partial fractions would be useful too.
All the chapters can be refined and explanations and examples improved (esp for ordinary points).
Citations and references need to be added throughout the notes also.
Possibly brief biographies of some of the more important and colourful contributors to the theory as sidebars.
Is there anything else important missing???
I hope that you enjoyed the course.

151

152

CHAPTER 8. EXTRA CHAPTERS

Bibliography
[1] I. Newton and J. Colson. The Method of Fluxions And Infinite Series: With Its Application to the
Geometry of Curve-Lines. Henry Woodfall; and sold by John Nourse, 1736.

153

Vous aimerez peut-être aussi