Post on 05-Jul-2018
transcript
8/16/2019 Ordinary Differential Equations course notes
1/153
Honours Ordinary Differential Equations
MATH-325 Course NotesMcGill University, Montreal
by
A.R. Humphries
Draft version
November 20, 2014
8/16/2019 Ordinary Differential Equations course notes
2/153
c CopyrightThese notes and all other instructor generated course materials (e.g., as-signments, summaries, exam questions, etc.) are protected by law andmay not be copied or distributed in any form or in any medium withoutexplicit permission of the instructor. Note that infringements of copyrightcan be subject to follow up by the University under the Code of StudentConduct and Disciplinary Procedures.
8/16/2019 Ordinary Differential Equations course notes
3/153
Preface
I am developing these notes through my experience teaching MATH-325 Honours Ordinary DifferentialEquations at McGill, and as a resource for that course. This course is a first course in Ordinary DifferentialEquations for Honours students in mathematics and several other honours programs with a mathematicscomponent. The formal prerequisites for the course are very limited being MATH-222 Intermediate Calculusand MATH-133 Linear Algebra and Geometry. There are many good textbooks which cover OrdinaryDifferential 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 resultsthat 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 specificmaterial beyond MATH-133 and MATH-222, they are honours students taking a mathematics class, andone can assume an appropriate level of mathematical sophistication. Essentially I take that as a license tointroduce any mathematical concepts required in the exposition.
Although these notes owe their existence to perceived shortcomings in the available textbooks, it is likelythat 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 attentionI 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.
3
8/16/2019 Ordinary Differential Equations course notes
4/153
4
8/16/2019 Ordinary Differential Equations course notes
5/153
Contents
1 Introduction 7
1.1 Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.1.1 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.1.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Definitions and Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.2.1 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131.2.2 N th order ODEs and First Order Systems of ODEs . . . . . . . . . . . . . . . . . . . 14
2 First Order ODEs 15
2.1 First order linear ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.1.1 Initial Value Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.1.2 Variation of Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2 Nonlinear First Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2.1 Separable Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.2.2 Exact Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.2.3 Solution by Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.2.4 Initial Value Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352.2.5 Summary for Solving First Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.3 Existence and Uniqueness for Linear and Nonlinear First Order ODEs . . . . . . . . . . . . . 37
2.3.1 Linear First Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.3.2 Nonlinear Scalar First Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382.3.3 Direction Fields and Integral Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3 Second Order ODEs and IVPs 51
3.1 Nonlinear Second Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.1.1 f does not depend on the dependent variable . . . . . . . . . . . . . . . . . . . . . . . 513.1.2 f does not depend on the independent variable . . . . . . . . . . . . . . . . . . . . . . 52
3.2 Linear Homogeneous Second Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533.2.1 Variable Coefficient Linear Homogeneous Second Order ODEs . . . . . . . . . . . . . 53
3.2.2 Constant Coefficient Linear Homogeneous Second Order ODEs . . . . . . . . . . . . . 563.2.3 Summary for Homogeneous Linear Constant Coefficient Second Order ODE . . . . . . 60
3.3 Linear Second order nonhomogeneous ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613.3.1 The Method of Undetermined Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . 623.3.2 Variation of Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4 nth Order ODEs 73
4.1 Nonlinear nth order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734.2 Linear nth order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.3 Linear Homogeneous nth order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764.4 Nonhomogeneous nth order Linear ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
4.4.1 The Fundamental Set of solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5
8/16/2019 Ordinary Differential Equations course notes
6/153
6 CONTENTS
4.4.2 Nonconstant Coefficient Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5 Series Solutions 935.1 Review of Power Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 935.2 Series Solutions Near Ordinary Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5.2.1 Analytic Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5.3 Nonhomogeneous Series Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1035.4 Regular Singular Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5.4.1 Euler Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1075.4.2 Frobenius’ Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1095.4.3 Complex Roots of Indicial Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6 Laplace Transforms 1256.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1256.2 Solving Constant Coefficient Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . 1306.3 Discontinuous Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
6.3.1 Dirac Delta Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1386.4 Convolutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
7 Linear Systems of ODEs 149
8 Extra Chapters 151
8/16/2019 Ordinary Differential Equations course notes
7/153
8/16/2019 Ordinary Differential Equations course notes
8/153
8 CHAPTER 1. INTRODUCTION
d2y
dx2 = 0. Integrating twice, the solution is: y = C 1x + C 2.
Example 1.1.2
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 allthe examples that we consider will be as trivial as these two, but even on examples that we cannot solve bydirect integration, solving the ODE will be akin to integration and we will expect to have the same numberof constants in the solution as in the differential equation.
dy
dx = y . This is not quite so easy as the previous examples. It does not work to integrate both sides
with respect to x since that would give y(x) =
y (x)dx. But the solution y must be a function which isequal to its derivative. From elementary calculus y = ex is such a function. But where is the constant?Differentiating y = ex + C gives y = ex = ex + C = y so adding a constant does not work. Instead thesolution 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). Wherethe constants appear in the solution is one of the questions we will need to tackle.
Example 1.1.3
ODEs with constraints
Often, we will solve ODEs subject to constraints. Of these types of problems, we will focus on initial valueproblems, in which we are given y, as well as the value of as many derivatives as needed at some point t0(so y(t0), possibly, y
(t0), and maybe y (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 constraintsto specify a unique solution. One possibility would be to specify y(t0) and y (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 calledboundary value problems (BVPs). Many classical BVPs are second order ODEs for which the solution y(t)is of interest between the two boundary values
In general, if the ODE has a derivative of degree n (i.e., dny
dtn ), we would need n constraints to specify a
unique solution. So for an initial value problem we must specify y(t0), y(t0), y (t0), . . . , y(n−1)(t0) to get a
unique solution.
Notation for Derivatives
We will usually use y instead of dydx or dydt , where the dash indicates differentiation with respect to the
independent variable. We will also use ẏ instead of dydt , where t is time (this was Newton’s notation). Lessfrequently, we’ll use Dy (Leibniz’s 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 demonstrateNewton’s 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.
8/16/2019 Ordinary Differential Equations course notes
9/153
1.1. DIFFERENTIAL EQUATIONS 9
Here is a very early example of an ODE that Isaac Newton first considered in 1671 [1]. In Newton’snotation he considered
ẏ
ẋ = 1 − 3x + y + xx + xy.
Its interesting to see that the dot notation for derivatives predates the x
2
notation for xx, even if Newtonuses the dot notation a little differently than we would today. Translated into modern notation we writeNewton’s problem as
y = (1 + x)y + 1 − 3x + x2, (1.1)or equivalently
y − (1 + x)y = 1 − 3x + x2.This is a specific example of the general class of problems y + p(x)y = g(x), which we will consider inSection 2.1.
Let us look at how Newton solved this. His method will seem rather clunky compared to how wemight approach this today, but then again, his technique was state-of-the-art at the time and in anycase it is quite instructive. Newton considered (1.1) as an initial value problem (IVP) with the initialdata
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) = 0he wrote y(x) = 0 + . . .. Substituting this into (1.1) Newton obtains
y = (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(1 + x)(x + . . .) + 1 − 3x + x2 = (x + . . .) + 1 − 3x + x2 = 1 − 2x + . . . ,
and so integrating y = x − x2 + . . .. Then
y = (1 + x)(x − x2
+ . . .) + (1 − 3x + x2
) = 1 − 2x + x2
+ . . . ,
so y = x − x2 + 13 x3 + . . .. Newton continued to obtain
y = x − x2 + 13
x3 − 16
x4 + 1
30x5 − 1
45x7 + . . . (1.3)
So this technique reduces the solving of the ODE to a simple algorithm, but one that requires infinitelymany integrations of polynomials.
Its possible to find a series solution to (1.1)-(1.2) without doing any integrations at all by usingslightly 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) =
∞
n=0
1
n! y(n)
(x0)(x − x0)n
,
where y (n) is the nth derivative. Since y(0) = 0, we set x0 = 0, then
y(x) =∞n=1
1
n!y(n)(0)xn.
Example 1.1.4 : Newton’s ODE (1671)
8/16/2019 Ordinary Differential Equations course notes
10/153
10 CHAPTER 1. INTRODUCTION
But evaluating (1.1) with x = 0 we obtain y(0) = (1 + 0)0 + 1 − 3(0) + (0)2 = 1. Its possible to findy(0) by differentiating (1.1) to obtain y = y + (1 + x)y − 3 + 2x, and so
y(0) = y(0) + (1 + 0)y(0) − 3 + 2(0) = 0 + (1)1 − 3 = −2.
Likewise for the third derivative: y(x) = 2y + (1 + x)y + 2, so
y(0) = 2y(0) + (1 + 0)y(0) + 2 = 2(1) + (1)(−2) + 2 = 2.
Then, if we substitute these into the summation, we get:
y(x) = y(0) + y(0)x + 1
2y(0)x2 +
1
6y(0)x3 +
∞n=4
1
n!y(n)(0)xn = 1 − x2 + 1
3x3 +
∞n=4
1
n!y(n)(0)xn,
which agrees with (1.3) up to the terms that we computed. And we didn’t even have to integrateanything! In principle we could continue the Taylor series computations above to compute as manyterms as we wish. We see that y (4)(x) = 3y + (1 + x)y and y (n)(x) = (n − 1)y(n−2) + (1 + x)y(n−1)and y(n)(0) = (n−1)y(n−2)(0)+ y(n−1)(0) for n 4. Hence y(4)(0) = 3y(0)+ y(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 thenthe right-hand side of (1.1) is continuous and differentiable so y (the left-hand side of (1.1)) is alsocontinuous and differentiable. Then repeatedly differentiating (1.1), as we did above, we see that thesolution y(x) will be infinitely differentiable. To show that y(x) is analytic, it would remain only toshow that the Taylor series is absolutely convergent. We will consider the convergence of series solutionsof 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, y, . . . , y(n−1)) (1.4)
Here, the solution y(t) is a function of t, the independent variable which by convention is usually the firstargument 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, . . . , 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, . . . , y(n)) =y(n) − f (t, y, y, . . . , y(n−1)), but it is not generally possible to rewrite equations of the form (1.5) in theform (1.4).
0 = F (t ,y,y) = (y)2 + 3y − 4yIn general it would be hard/impossible to rewrite such equations as y = f (x, y). In the case of example,using the quadratic formula, we could write:
y = −3 ± √ 9 + 16y
2
But formulation is problematical since we don’t know which sign to take for the root. If we cannottrivially write as y (n) = f (t , y , . . . , y(n−1)), it’s better to leave the equation in its original form.
Example 1.2.1
8/16/2019 Ordinary Differential Equations course notes
11/153
1.2. DEFINITIONS AND NOTATION 11
If we can write (1.4) asy(n) = f (y, y, y, . . . , y(n−1))
where f does not depend explicitly on the independent variable t, then the ODE is said to be au-tonomous . Otherwise, it is non-autonomous .
Definition 1.2.2 Autonomous and Non-Autonomous ODEs
θ̈ + ω2 sin θ = 0, (1.6)
is autonomous – the independent variable t does not appear explicitly.
Example 1.2.3 Nonlinear Pendulum
The dampened, forced nonlinear pendulum
θ̈ + k2 θ̇ + ω2 sin θ = A sin(µt)
is non-autonomous . The independent variable t appears explicitly in the forcing term A sin(µt). Thedamping comes from the k2 θ̇ and corresponds to friction and/or air resistance proportional to thevelocity. Writing k2 instead of k for the constant is just a convenient way of specifying that theconstant must always be non-negative (as negative friction would not make sense).
Example 1.2.4 Dampened, forced nonlinear pendulum
Next we define linear and nonlinear ODEs. The distinction between linear and nonlinear ODEs is at theheart of the theory of ODEs. However Definition 1.2.5, which can be found in many textbooks is not veryrevealing. See the discussion after Definition 1.2.8 for a first explanation of what is going on.
If we can write the ODE (1.4) as
an(t)y(n)(t) + an−1y(n−1) + · · · + a1(t)y(t) + a0(t)y(t) = g(t)
or more compactlynj=0
aj(t)y(j)(t) = g(t) (1.7)
where the ai(t) and g(t) are given/known functions of the independent variable, then the ODE is saidto be linear . Otherwise, it is nonlinear .
Definition 1.2.5 Linear and Nonlinear ODEs
8/16/2019 Ordinary Differential Equations course notes
12/153
12 CHAPTER 1. INTRODUCTION
The ODEθ̈ + ω2θ = 0, (1.8)
is linear with a2 = 1, a1 = 0, a0 = ω2, 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 limθ→0 sin(θ)/θ = 1.
Example 1.2.6 Linear Pendulum
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 yitself is nonlinear. For example y = y2 and y = yy are both nonlinear.
Example 1.2.7
A linear ODE (4.3) is said to be homogeneous if g (t)
≡ 0, so
nj=0
aj(t)y(j)(t) = 0. (1.9)
If g(t) is a non-trivial (that is non-zero) function, then the ODE (4.3) is said to be non-homogeneous .
Definition 1.2.8 Homogeneous Linear ODEs
We will see later if y1(t) and y2(t) are both solutions of a linear homogeneous ODE (1.9) then
y(t) = c1y1(t) + c2y2(t),
is also a solution, for any values of the constants c1 and c2. That is, linear combinations of solutions of alinear ODE are also solutions of the ODE; this is the sense in which the ODE is “linear”. It will follow thatthe set of solutions of a linear ODE forms a vector space. Since we expect the solution an n-th order ODEto contain n constants, the general solution of (1.9) ought to be
y(t) =ni=1
ciyi(t),
where yi(t) for i = 1, . . . , n are n linearly independent solutions of (1.9) which form a basis for the n-
dimensional vector space of the solutions of (1.9). But that is a topic for a later chapter.
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 .
Definition 1.2.9 Constant coefficient Linear ODEs
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.
8/16/2019 Ordinary Differential Equations course notes
13/153
1.2. DEFINITIONS AND NOTATION 13
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.
Note
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 = 1 is linear, non-homogeneous, autonomous, and constant-coefficient
iv) x2y + 2xy + y = sin x is linear, non-homogeneous, variable-coefficient (as opposed to constant-coefficient). This is an example of an Euler equation.
Example 1.2.10
Linear constant coefficient homogeneous ODEs are important because complete solution constructiontechniques exist. We will also see how to solve non-homogeneous constant coefficient linear ODEs. Thereare 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 usingseries solutions. For non-linear equations, it is possible to solve many first order equations (y = f (t, y)),but it is not in general possible to solve higher order ODEs with closed form expressions, except in somespecial cases. Such equations can exhibit very complicated solutions including chaotic solutions. Chaos willbe beyond the scope of this course, but chaotic differential equations and chaotic difference equations arethe 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 tobe n times differentiable. Thus y (t), y (t), . . . , y (n−1)(t) will be continuous, as will be f (t ,y,y, · · · , y(n−1))and hence y (n)(t). This leads us to
The function y(t) : I → R is a solution of the ODE (1.4) (or (4.3)) if it is n times continuouslydifferentiable on the interval I ⊆ R, and satisfies the ODE on this interval.
Definition 1.2.11
In Definition 1.2.11 the interval I could be an open interval I = (a, b) or closed interval I = [a, b], or evenhalf open. Later, especially when we consider Laplace transforms, we will consider examples where f hasdiscontinuities, which will cause y (n) or lower derivatives to have discontinuities. We will need to generaliseour 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. Butfrom (1.4)
y(n)(t0) = f (t0, y(t0), y(t0), · · · , y(n−1)(t0)),
so for y(n)(t0) to be uniquely determined by the ODE which should specify the values of y(t0), y(t0), · · · , y(n−1)(t0).These will turn out to necessary and sufficient conditions for the ODE to have a unique solution on an in-terval containing t0, provided the ODE is well-behaved at t0 (in ways we will make precise later). This leads
8/16/2019 Ordinary Differential Equations course notes
14/153
14 CHAPTER 1. INTRODUCTION
us to define initial value problems.
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
(t0) = α2, . . . , y(t0) = αn for givenvalues of αi
∈R for i = 1, . . . , n.
Definition 1.2.12
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 orderODEs.
Given y (n) = f (t,y, · · · , y(n−1)) Let u1 = y, u2 = y, · · · , un = y(n) then
u1 = y = u2
u2 = u3...
un−1 = un
un = 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 asa vector-valued ODE as
u̇(t) =
u̇1(t)u̇2(t)
...u̇n−1(t)
u̇n(t)
=
u2(t)u3(t)
...un(t)
f (t, u1(t), u2(t), · · · , un(t))
= F (t, u(t)).
Example 1.2.13
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.
To rewrite the nonlinear pendulum equation θ̈ + ω2
sin θ = A sin µt as a systems of first order ODEs letu1 = θ and u2 = θ̇ then
u̇1 = θ̇ = u2
u̇2 = θ̈ = A sin µt − ω2 sin u1.
Example 1.2.14
8/16/2019 Ordinary Differential Equations course notes
15/153
Chapter 2
First Order ODEs
In this chapter we will consider first order scalar nonlinear ODEs of the form
y = f (t, y) (2.1)
and first order scalar linear ODEs of the form
a0(t)y(t) + a1(t)y(t) = g(t). (2.2)
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 forfirst order ODEs. Later in the chapter, after we have developed techniques to solve some problems, we willtackle 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(t) + p(t)y(t) = 0
or more compactlyy + 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) in-tegrable is sufficient to ensure the existence of solutions. The following lemma gives the solution of thehomogeneous linear first order ODE (2.2). We will need this lemma afterwards only to derive the solutionof the homogeneous linear first order ODE, so there is no need to memorise (2.4).
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− p(t)dt (2.4)
where k is an arbitrary constant.
Lemma 2.1.1
15
8/16/2019 Ordinary Differential Equations course notes
16/153
16 CHAPTER 2. FIRST ORDER ODES
Assume y(t) = 0 for all t ∈ I and rewrite the ODE (2.3) asy
y = − p(t).
Now integrate both sides with respect to t, not forgetting the constant of integration, hence y
y dt =
− p(t)dt =⇒ ln |y| = −
p(t)dt + c =⇒ |y| = ece−
p(t)dt
=⇒ y = ±ece− p(t)dt.
Now let k = ±ec, then y(t) is defined by (2.4) for any k = 0 (since ±ec = 0). Note that the solutionsatisfies the assumption that y(t) = 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 (t) = 0, and by inspection we see that y(t) = 0 for all t ∈ I solves (2.3) in this case. Butthis solution corresponds to (2.4) with k = 0. Hence y (t) defined by (2.4) solves (2.3) for any k ∈ R asrequired.
Proof
If you have any doubts about the proof above, or indeed of any solution that you derive to an ODE, it isvery easy to verify whether a given function is a solution or not be differentiating it. For example, lettingy(t) be given by (2.4) and differentiating (2.4) we see that
y(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 + p(t)y = g(t). (2.5)
The next theorem is the main result of this section.
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
y(t) = 1
µ(t)
µ(t)g(t)dt +
k
µ(t) (2.6)
where k is an arbitrary constant and and µ, called the integrating factor, is defined by
µ(t) = e p(t)dt. (2.7)
Theorem 2.1.2
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 mis-remembered 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.
Note
8/16/2019 Ordinary Differential Equations course notes
17/153
2.1. FIRST ORDER LINEAR ODES 17
We first multiply the ODE by µ(t) for some general function µ(t), obtaining
µ(t)y + µ(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µ = p(t)µ (2.9)
so that (2.8) can be rewritten asµy + muy = µ(t)g(t), (2.10)
which reveals our reason for choosing µ to satisfy (2.9), since now
d
dt[µy] = µy + muy = µ(t)g(t),
thus
µy =
µ(t)g(t)dt + k,
and (2.6) follows on dividing by µ. It remains only to show that there exists a function µ which satisfies(2.9). But writing (2.9) as µ − 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.
Proof
1. Write as y + p(t)y = g(t)
2. Compute µ(t) = e p(t)dt
3. Solve ddt [µy] = µ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).
Algorithm for solving linear first order ODEs
We can also use this algorithm to solve homogeneous linear first order ODEs, so there is no need toremember Lemma 2.1.1.
To find the general solution of y = 2y, write it as
y
−2y = 0, (2.11)
so p(t) = −2 and g (t) = 0. Then
µ = e p(t)dt = e
−2dt = e−2t.
Notice that we do not include a constant of integration when computing µ. This is because when µ isderived in the proof of Theorem 2.1.2 it is required to be just a solution of (2.9). Since any solution
Example 2.1.3
8/16/2019 Ordinary Differential Equations course notes
18/153
18 CHAPTER 2. FIRST ORDER ODES
will do, we take the solution without the constant. Now
d
dt[µy] =
d
dt[e−2ty] = e−2ty − 2e−2ty = e−2t[y − 2y] = 0.
So ddt [e−2ty] = 0. Integrating both sides gives
e−2ty = 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.
To find all solutions of
ty + 3y − t2 = 0, (2.12)divide by t and rewrite the equation in standard form as
y + 3
ty = t,
so p(t) = 3/t and g(t) = t. Then the integrating factor µ is given by
µ = e p(t)dt = e
3tdt = e3 ln(t) = eln t
3
= t3.
Note, that as in the previous example, we took shortcuts in computing µ as we only need one solutionto (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|3
= ec
|t|3
= ±ec
t3
= kt3
,
and we choose the constant k = ±ec = 1 for simplicity to get µ = t3. Thus when finding µ, basicallythis 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
t3y + 3t2y = t4, =⇒ ddt
[t3y] = t4 =⇒ t3y = 15
t5 + c,
thus
y(t) = 1t31
5t5 + c
= 1
5t2 + ct−3. (2.13)
As ever, if you do not believe me substitute the solution into the ODE to check that it is indeed asolution.
Example 2.1.4
Notice that while the solution in Example 2.1.3 is continuous for all t ∈ R, the solution in Example 2.1.4defined by (2.13) has a discontinuity at t = 0. This does not contradict Theorem 2.1.2 since in Example 2.1.4we have p(t) = 3/t which is discontinuous at t = 0.
8/16/2019 Ordinary Differential Equations course notes
19/153
2.1. FIRST ORDER LINEAR ODES 19
Next we consider Newton’s example which was first considered in Example 1.1.4.
Recall Newton’s ODE y = 1 − 3x + y + x2 + xy from Example 1.1.4. This time we will try to find allthe solutions, rather than solving the initial value problem as Newton did. First write the ODE in the
standard form (2.5) asy − (1 + x)y = 1 − 3x + x2,
so p(x) = −(1 + x) and g(x) = 1 − 3x + x2. Then
µ(x) = exp(
p(x) dx) = exp(
−(1 + x)) dx = exp(−(x + x2/2)).
So we can writed
dx[µy] = µg = (1 − 3x + x2)e−(x+x2/2)
If we integrate both sides with respect to x, we get
µy = C + (1 − 3x + x2)e−(x+x2/2) dx
and dividing both sides by µ gives
y(x) = cex+x2/2 + ex+x
2/2
(1 − 3x + x2)e−(x+x2/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 theintegral is often approximated numerically.
Remark: It is possible to simplify the above answer somewhat, and I did see someone solve it usingthe error function erf(x) = 2√
π
x0
e−t2
dt. I will add the details when I have time (in some future year).
Example 2.1.5 : Newton’s Example
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 + 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 problemboth ways.
Lets solve
y + 1
2y =
1
2et/3
Example 2.1.6 : Solving an IVP via the General Solution
8/16/2019 Ordinary Differential Equations course notes
20/153
20 CHAPTER 2. FIRST ORDER ODES
with the initial condition y(0) = 1. Here p(t) = 12 , g(t) = 12 et/3. First, we find µ:
µ(t) = exp(
1
2 dt) = et/2
Next, we have:
ddt
[et/2y] = et/2 · 12
et/3 = 12
e5t/6
If we integrate both sides with respect to t, we get
et/2y = C + 3
5e5t/6
and if we divide both sides by µ,
y(t) = Ce−t/2 + 3
5et/3.
To determine the value of the constant, we use the fact that y(0) = 1, i.e. y = 1 when t = 0 so
1 = y(0) = C e0 + 3
5
e0 = C + 3
5
,
so C = 25 , and we have
y(t) = 2
5e−t/2 +
3
5et/3.
Quick check: when t = 0, given solution is y(0) = 35 + 25 = 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 goodidea to do so.
Lets solve
y + 12
y = 12
et/3
with the initial condition y(0) = 1, again. As before, we find µ:
µ(t) = exp(
1
2 dt) = et/2
andd
dt[et/2y] = et/2 · 1
2et/3 =
1
2e5t/6.
So far, it is the same as finding the general solution, but now we integrate both sides with respect tot, only make it a definite integral from t = 0 (the initial value that we were given) to t = x (or someother 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 et/2y
t=xt=0
=
x0
1
2e5t/6 dt
and doing the integral and substituting in the initial condition y(0) = 1, we get
ex/2y(x) − e0y(0) = ex/2y − 1 =
3
5e5t/6
t=xt=0
= 3
5e5x/6 − 3
5.
Example 2.1.7 Solving an IVP via Definite Integral
8/16/2019 Ordinary Differential Equations course notes
21/153
2.2. NONLINEAR FIRST ORDER ODES 21
Rearranging the above and replacing all the remaining x’s with t’s (since x is just a dummy variable),we get
et/2y = 3
5e5t/6 − 3
5 + 1 =
3
5e5t/6 +
2
5
and so if we divide by µ, we get the final solution:
y(t) = 3
5et/3 +
2
5e−t/2,
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 ODEy = 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 methodto write down solutions composed of elementary functions for all problems of the form (2.14). Instead thereare methods to solve (2.14) if it has a certain structure or properties. In the following sections we will defineseveral subclasses of nonlinear first order ODEs, and give the solution techniques that solve them. To beable 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 = P (t)Q(y), (2.15)
that is y is given by the product of a function of the independent variable and a function of the dependentvariable. As the name suggests, equation (2.15) is solved by separating the variables. If you are happywith the dy and dt of dydt existing independently as infinitesimal differentials (obtained from limits of δy andδt → 0) then multiplying by dt we see
dy
dt = P (t)Q(y) =⇒ 1
Q(y)dy = P (t)dt =⇒ P (t)dt − 1
Q(y)dy = 0. (2.16)
This has solution P (t)dt − 1
Q(y)dy = C, (2.17)
including the constant of integration. Many authors define separable ODEs as ODEs of the form
M (t)dt + N (y)dy = 0, (2.18)
which follows from (2.16) with M (t) = P (t) and N (Y ) = −1/Q(y) and has solution M (t)dt +
N (y)dy = C. (2.19)
8/16/2019 Ordinary Differential Equations course notes
22/153
8/16/2019 Ordinary Differential Equations course notes
23/153
2.2. NONLINEAR FIRST ORDER ODES 23
Consider dy
dx =
x2
1 − y2 . Then
(1 −y2)dy = x2dx =⇒
y
−
y 3
3
= x3
3
+ C,
or
y − 13
(x3 + y3) = C. (2.21)
Example 2.2.2
Note that the answer in the previous example cannot be rewritten as y = some function of x, so we leavethe answer in the form (2.21), called an implicit solution . In contrast to linear first order ODEs for whichwe always obtain explicit solutions, for separable ODEs (2.15) we often obtain implicit solutions because thesolution method evolves evaluating
1Q(y)
dy which can be any kind of nice or nasty function of y .
2.2.2 Exact Equations
The first order ODEM (x, y)dx + N (x, y)dy = 0, (2.22)
ordy
dx = −M (x, y)
N (x, y), (2.23)
is said to be exact if ∂M (x, y)
∂y =
∂N (x, y)
∂x . (2.24)
Definition 2.2.3
The
∂f
∂x notation for partial derivatives is tiresomely long if you use partial derivatives often so mostmathematicians use a subscript notation and f x instead of ∂f ∂x . In this notation (2.24) can be written more
compactly asM y = N x, or M y(x, y) = N x(x, y).
Exact ODEs do not seem to be common in applications but are easy to construct as exam questions. To seehow 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 respectto the independent variable x. This gives
d
dx[f (x, y(x))] =
∂f
∂x +
∂ f
∂y
dy
dx = 0 =⇒ ∂f
∂x dx +
∂ f
∂y dy = 0
which is of the from (2.22) with
M (x, y) = ∂f
∂x, N (x, y) =
∂f
∂y. (2.26)
But then
M y = ∂
∂y
∂f
∂x
=
∂ 2f
∂y∂x, N x =
∂
∂x
∂f
∂y
=
∂ 2f
∂x∂y
But provided f is twice continuously differentiable we have ∂ 2f
∂y∂x = ∂ 2f ∂x∂y so M y = N x and in this case the
ODE (2.22) is exact.
8/16/2019 Ordinary Differential Equations course notes
24/153
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 asolution 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 derivationand solution of an exact ODE in an example.
Letf (x, y) = x2y2 = c.
To construct an exact ODE with this solution differentiate with respect to x to obtain
2xy2 + 2x2ydy
dx = 0 =⇒ 2xy2dx + 2x2ydy = 0,
which is of the form (2.23) with
M (x, y) = 2xy2, N (x, y) = 2x2y.
Thus M y = N x = 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
∂x = M (x, y) = 2xy2,
∂f
∂y = N (x, y) = 2x2y.
To solve for f we integrate these equations, but it is essential to realise that since they are partialderivatives, where one variable was held constant, when we integrate them that variable is still heldconstant. So we integrate
∂f
∂x = 2xy2
holding y constant to obtainf = x2y2 + 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 = x2y2 + k1(y). (2.27)
To see that (2.27) is correct, simply note that with f thus defined f x = M for any function k1(y).Before we worry about what k1(y) might be note that we still have to solve
∂f
∂y = 2x2y.
Integrating this with respect to y while holding x constant we obtain the solution
f = x2y2 + 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) bothdefine the same function f and we require that
f (x, y) = x2y2 + k1(y) = x2y2 + k2(x).
Example 2.2.4
8/16/2019 Ordinary Differential Equations course notes
25/153
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 sincek2(x) is a function of x only. Indeed for the expressions to be equal we need k1(y) = k2(x). The simplestsolution to this is k1(y) = k2(x) = 0, which leads to f (x, y) = x
2y2 and so solution of (2.23) is (2.25)which in this case gives
x2y2 = 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 ageneral solution algorithm from the example above.
1. Given ODE M (x, y)dx + N (x, y)dy = 0, Check whether M y = N x. If this equality holds the ODE is exact.
2. If the ODE is exact solve
∂f
∂x = M (x, y) and
∂f
∂y = N (x, y),
to find f (x, y).
3. (Implicit) solution is f (x, y) = C .
Method for solving first order exact ODEs
Aside: It is possible to show that
f (x, y) =
x0
M (x, y) dx +
y0
N (0, y) dy
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]
Consider2xydx + (x2 + 1)dy = 0.
We could rewrite this asdy
dx =
−2xyx2 − 1 = −
2x
x2 − 1
y,
from where we see it is separable, so we could solve it as a separable equation. But instead, here weshow that this ODE is exact, and solve it as an exact equation. We have M dx + N dy = 0 with
M = 2xy ⇒ M y = 2x,
N = x2 − 1 ⇒ N x = 2x.Since M y = N x, the equation is exact! Now to solve.
M (x, y) = ∂f
∂x =⇒ ∂f
∂x = 2xy,
Example 2.2.5
8/16/2019 Ordinary Differential Equations course notes
26/153
26 CHAPTER 2. FIRST ORDER ODES
So
f (x, y) =
2xydx =
M (x, y)dx =
∂f
∂xdx.
In this integral, y is treated as a constant, so
f (x, y) = 2xydx = x2y + g = x2y + g(y),where because y is treated as a constant, the constant of integration is a function of y in general. Toconfirm this notice that if f (x, y) = x2y + 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:
N (x, y) = ∂f
∂y =⇒ ∂f
∂y = x2 − 1,
So
f (x, y) =
x2 − 1dy =
N (x, y)dy =
∂f
∂ydy.
In this integral, x is treated as a constant, so
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 wehave two expressions for the same function f (x, y) with
f (x, y) = x2y + 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 expressionsfor 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 x’swill 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 havex2y + g(y) = x2y − y = (x2 − 1)y = (x2 − 1)y + h(x),
sof (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 islonger, but the advantage that it does not require as much intelligent thought. It works as follows.
Having found that M (x, y) = ∂f ∂x implies that f (x, y) = x2y + g(y), as above. We use N (x, y) = ∂f ∂y
to obtain
x2 − 1 = N (x, y) = ∂ ∂y
(f ) = ∂
∂y(x2y + g(y)) = x2 + g(y).
Thus g(y) satisfies the ODEx2 − 1 = x2 + g(y),
which simplifies tog(y) = −1.
We remark that in this approach you will always obtain an ODE for g (with y as the independentvariable) that does not contain any x’s. If your ODE for g contains x’s either the original ODE wasnot exact, or you made an error somewhere. Having obtained an ODE for g (with y as the independent
8/16/2019 Ordinary Differential Equations course notes
27/153
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 thecurrent example we have
dg
dy = g(y) = −1,
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) = x2y + g(y) =⇒ f (x, y) = x2y − 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 compuationof f to obtain the function f (x, y) = (x2 − 1)y + k, which would yield
(x2 − 1)y + k = c or y = c − kx2 − 1 .
However, this would be a solution of a first order ODE with two constants. There should never be moreconstants than the order of the problem, so if you obtain this you can remove one constant by defininga 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
∂y = ∂N
∂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
∂
∂y[µM ] =
∂
∂x[µN ].
Hence
M ∂µ
∂y + µ
∂M
∂y = N
∂µ
∂x + µ
∂N
∂x
or
N ∂µ
∂x − M ∂µ
∂y =
∂M
∂y − ∂ N
∂x
µ. (2.30)
In general, this is a PDE (partial differential equation), which typically harder to solve than the originalODE. However, in some special cases, we can solve it.
8/16/2019 Ordinary Differential Equations course notes
28/153
28 CHAPTER 2. FIRST ORDER ODES
Suppose µ is a function of x only, which we write as µ(x). This implies that
∂µ
∂x =
dµ
dx = µ and
∂µ
∂y = 0.
Then PDE (2.30) simplifies to
N dµ
dx
= ∂M ∂y − ∂ N
∂x µwhich implies that
dµ
dx =
1
N (x, y)
∂M
∂y − ∂ N
∂x
µ. (2.31)
The assumption that µ is a function of x holds if and only if 1N (x,y) (∂M ∂y − ∂N ∂x )µ is a function of x only. In
that case, the equation for µ (2.31) is of the form:
dµ
dx − g(x)µ = 0
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, then solve it.
If 1
N (x,y) ∂M ∂y − ∂N ∂x is not a function of x only, then the above approach fails. Instead we can try to seeif we can find µ which is a function of y only. If that is the case then
∂µ
∂x = 0 and
∂µ
∂y =
dµ
dy
and the PDE (2.30) simplifies todµ
dy =
−1M (x, y)
∂M
∂y − ∂ N
∂x
µ.
The assumption that µ is a function of y holds if and only if − 1M (x,y) (M y − N x)µ is a function of y only. Inthat case, the equation for µ(y) becomes
dµ
dy − g(y)µ = 0
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.
Given M (x, y)dx + N (x, y)dy = 0
• Compute ∂M ∂y
and ∂N ∂x
– If M y = N x ⇒ Equation is exact ⇒ solve it.– Otherwise
∗ if 1N (x,y)∂M ∂y − ∂N ∂x
is a function of x only, then µ(x) = e
M y−N xN dx
∗ if 1M (x,y) ∂M ∂y − ∂N ∂x is a function of y only, then µ(y) = e− M y−N xM dy• Assuming a suitable µ was found, multiple the original ODE by µ, to get µM (x, y)dx +
µN (x, y)dy = 0. Let M̃ (x, y) = µM (x, y) and Ñ (x, y) = µN (x, y) then
M̃ (x, y)dx + Ñ (x, y)dy = 0,
is exact ⇒ solve it.
Algorithm for Solving ODEs as Exact Equations
8/16/2019 Ordinary Differential Equations course notes
29/153
2.2. NONLINEAR FIRST ORDER ODES 29
It can (often) happen that you cannot find a suitable integrating factor µ to make the equation exact. Inthat case it is sometimes possible to find a µ that solves (2.30) by making some other assumption on µ thatsimplifies (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 suchan approach.
Let us consider an example where µ can be found as a function of y only.
xydx + (2x2 + 3y2 − 20) dy = 0First, identify M and N , and their partial derivatives:
M = xy N = 2x2 + 3y2 − 20 =⇒ M y = x N x = 4x
Thus M y − N x = −3x so the equation is not exact. ThenM y − N x
N =
−3x2x2 + 3y2 − 20 ,
which is not a function of x only. But
−M y − N xM
= −−3xxy
= 3x
xy =
3
y
So µ is a function of y . Let’s solve for it:
µ(y) = e 3y dy = e3 ln y = eln(y
3) = y3,
So letting M̃ = xy4, and Ñ = 2x2y3 + 3y5 − 20y3 we have M̃ (x, y)dx + Ñ (x, y)dy = 0 with
M̃ y(x, y) = 4xy3, Ñ x(x, y)dy = 4xy
3,
so the equation is now exact. Now we solve for f (x, y):
f (x, y) =
M dx =
x2y4
2 + g(y)
=
N dy =
x2y4
2 +
y 6
2 − 5y4 + h(x)
= x2y4
2 +
y 6
2 − 5y4
with g(y) = y6
2 − 5y4 and h(x) = 0. And solution is f (x, y) = c, that is
x2y4
2 − 5y4 + 1
2y6 = c.
This solution is in implicit form. As with separable equations, we rewrite solutions in explicit formwhen we can, but often it is not possible to write the solution as y = a function of x only. That isclearly the case here, so we leave the solution as written.
Example 2.2.6
8/16/2019 Ordinary Differential Equations course notes
30/153
30 CHAPTER 2. FIRST ORDER ODES
[Easy to see all separable equations are exact. Also the integrating factor for a linear first order ODE isexactly the one we would choose from above if we tried to solve that equation as an exact equation. Thusall equations seen so far are special cases of exact equations. Nevertheless, we prefer solution techniques wealready developed for separable and linear ODEs, when they apply, because they are simpler to apply whenthey are appropriate.]
2.2.3 Solution by Substitution
There are various substitution techniques to change variables to transform ODEs not already in one of theforms we can solve into such a form.
Homogeneous Equations
A function f (x, y) is said to be homogeneous of degree d if
f (tx, ty) = tdf (x, y) ∀x, y ∈ R.
Definition 2.2.7 Homogeneous of degree d
If f (x, y) = x3 + y3 then
f (tx, ty) = (tx)3 + (ty)3 = t3(x3 + y3) = t3f (x, y),
so f is homogeneous of degree 3.Notice if we replace f (x, y) by f (x, y) = x3 + y3 + 2x2y it will still be homogeneous. Provided all
terms have the same degree, the function will be homogeneous.
Example 2.2.8
Note that f (x, y) = x5 + 7x3y2 + 4xy4 − 20 is not homogeneous because of the constant term.Example 2.2.9
The ODE M (x, y)dx + N (x, y)dy = 0 (or M (x, y) + N (x, y) dydx = 0) is called homogeneous if M andN are both homogeneous functions of the same degree.
Definition 2.2.10 Homogeneous
Warning: this is a completely different meaning of homogeneous than given in Definition 1.2.8. Homoge-
neous in the sense of Definition 1.2.8 only applied to linear ODEs. We will only apply Definition 2.2.10 tononlinear 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
dx = x
du
dx + u
sody = xdu + udx
8/16/2019 Ordinary Differential Equations course notes
31/153
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+1N (1, u)du
= 1
xdx +
N (1, u)
M (1, u) + N (1, u)udu,
where M and N are both homogeneous of degree d. This reduces the homogeneous ODE to a separableODE.
(ii) The alternative substitution is to let x = yv(y) and now write and ODE in v, with y as the indepen-dent variable. Its very easy to confuse oneself when using x as the dependent variable and y as theindependent, in a reversal of their usual roles, so I usually avoid this substitution and recommend thatyou use the first one. With x = yv(y) we have
dx
dy = v + ydv
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 substitutiony = xu(x) to be applied to homogeneous ODEs. (Of course the substitution is not useful if M and N arenot both homogeneous of the same degree.) The substitution is much simpler to apply to concrete examplesthan the derivation above would suggest.
Consider the ODE(x2 + y2)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
dx = u(x) + x
du
dx.
Now, we have two choices. Either write
(x2 + y2) + (x2 − xy) dydx
= 0 =⇒ (x2 + x2u2) + (x2 − x2u)
u(x) + xdu
dx
= 0.
For x = 0, we can divide by x2 to obtain
1 + u2 + (1 − u)
u + xdu
dx
= 0
1 + u2 + u − u2 + x(1 − u) dudx
= 0
x(1 − u) dudx
= −(1 + u),
Example 2.2.11
8/16/2019 Ordinary Differential Equations course notes
32/153
32 CHAPTER 2. FIRST ORDER ODES
which is separable. Hence we can solve as 1 − u
1 + udu = −
dx
x
−ln
|x
| = −1 +
2
1 + u
du
− ln |x| = c − u + 2ln |1 + u|− ln |x| = c − u + ln(1 + u)2
but y = xu so the solution of original ODE is
− ln |x| = c − yx
+ ln
1 + y
x
2.
Or, if you prefer
c = − ln |x| + yx − ln
1 +
y
x
2. (2.32)
The alternative approach would be to use the differential notation throughout. So
y = xu =⇒ dy = xdu + udx,
and hence
(x2 + x2u2)dx + (x2 + x2u2)[xdu + udx] = 0
(1 + u2)dx + (1 − u)[xdu + udx] = 0[1 + u2 + (1 − u)u]dx + (1 − u)xdu = 0
1
xdx +
(1 − u)[1 + u]
= 0,
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 transformedto an explicit solution. However, we did write the solution in the original variables. Whenever solving anyproblem by change of variables it is important to always write the final solution in terms of the variableswith which the problem was posed.
Bernoulli Equations
ODEs of the form
y + f (x)y = g(x)yn (2.33)
are called Bernoulli Equations. These were first studied by Jacob Bernoulli, but the substitution and solutiontechnique 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
substitutionv(x) = y(x)q
where we will choose the power q below to make the resulting ODE linear. Applying the substitution
v(x) = qy(x)q−1y(x)
= qy(x)q−1[−f (x)y + g(x)yn] (using the definition of y from ODE)= −qf (x)y(x)q + qg(x)y(x)n+q−1
v(x) = −qf (x)v(x) + qg(x)y(x)n+q−1.
8/16/2019 Ordinary Differential Equations course notes
33/153
2.2. NONLINEAR FIRST ORDER ODES 33
If we choose q so that n + q − 1 = 0, that is q = 1 − n then
v(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!
• Given y(x) + f (x)y = g(x)yn or y + f (x)y = g(x)yn
• if n = 0 or n = 1– solve as linear first order ODE
• Otherwise – let v(x) = y(x)1−n
– Write and ODE for v + p(x)v = h(x)
– Solve this linear ODE to find v (x)– Write (explicit) solution for y(x).
Method for solving Bernoulli Equations
Consider the ODE
xdy
dx + y = x2y2
Now, this is not quite in the form of a Bernoulli equation. To make it into one, we divide by x, resultingin:
y + 1
x y = xy2
,
a Bernoulli equation with n = 2. The substitution is then v = y1−n = y−1. So we obtain
v = −y−2 dydx
= −y
y2
= −y−2[− yx
+ xy2] from the original equation, just rearranged
= y−1
x + x =
v
x − x
So
v − 1x
v = −x.
Then, we find the integrating factor:
µ = e− 1x dx = e− lnx = x−1
So we getd
dx[x−1v] = x−1v − x−2v = x−1
v − 1
xv
= x−1[−x] = −1.
Example 2.2.12
8/16/2019 Ordinary Differential Equations course notes
34/153
34 CHAPTER 2. FIRST ORDER ODES
So x−1v = −x + C (just integrated) and thus we have
x−1y−1 = C − x =⇒ xy = 1c − x =⇒ 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 = f (Ax + By + C ), B = 0,can be solved using the substitution:
u = Ax + By + C
which impliesdu
dx = A + B
dy
dx = A + Bf (u).
This ODE is separable, so we can solve it to find u(x) then u(x) = Ax + By + C, so rearranging
y = 1B
(u(x) − Ax − C ).
Consider the ODEdy
dx = (−2x + y)2 − 7
which is of the form y = f (u) = f (Ax + By + C ) with A = −2, B = 1, C = 0, so u = −2x + y andf (u) = u2 − 7. So:
u = f (u) − 2 = (u2 − 7) − 2 = u2 − 9Since this is separable, we have: du
u2 − 9 =
dx
We can use partial fractions to integrate the LHS:
1
u2 − 9 = 1
(u + 3)(u − 3) = A
1 + 3 +
B
u − 3Then 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
u2 − 9 = 1
6
1
u − 3 − 1
u + 3
Then, integrating both sides: du
u2 − 9 = 1
6
1
u − 3 du − 1
6
1
u + 3du =
1
6(ln |u − 3| − ln |u + 3| = 1
6 ln
u − 3u + 3 = x + c
Recall that u = −2x + y. Then we have the implicit solution1
6 ln
−2x + y − 3−2x + y + 3 = x + c.
Example 2.2.13
8/16/2019 Ordinary Differential Equations course notes
35/153
2.2. NONLINEAR FIRST ORDER ODES 35
This would be an acceptable form to leave the solution, but actually we can transform the solution intoexplicit form in this case, as follows.
1
6 ln
−2x + y − 3−2x + y + 3
= x + c
=⇒ ln −2x + y − 3−2x + y + 3 = 6x + k=⇒
−2x + y − 3−2x + y + 3 = ±Ke6x
=⇒ −2x + y − 3−2x + y + 3 = Ce6x
=⇒ −2x + y − 3 = Ce6x(−2x + y + 3)=⇒ −2x + y − 3 = −Ce6x2x + Ce6xy + 3Ce6x=⇒ (Ce6x − 1)y = 2x + 3 + Ce6x2x + 3Ce6x
=⇒ y = 2x + 3 + Ce6x2x + 3
Ce6x
−1
.
2.2.4 Initial Value Problems
and domain of definition - covered in class. No latex notes yet.
8/16/2019 Ordinary Differential Equations course notes
36/153
36 CHAPTER 2. FIRST ORDER ODES
2.2.5 Summary for Solving First Order ODEs
y = f (x, y)
Separable? g(x)dx =
h(x)dy
Linear? Integrating factor,
µ = e p(x)dx
Homogeneous? sub: y = xu(x)
=⇒ separable
Exact? f (x,y) = c and
f x = M, f y = N
Exactwith inte-
gratingfactor?
Integrating factor
Bernoulli?
sub: u = y1−n
=⇒ linear
• Other weird substitutions or guesses,
• Series solutions (later in this course),
• Qualitative Methods (MATH 376),
• Numerical methods (MATH 387)
8/16/2019 Ordinary Differential Equations course notes
37/153
2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES 37
2.3 Existence and Uniqueness for Linear and Nonlinear First Or-
der ODEs
2.3.1 Linear First Order ODEs
We already saw in Section 2.1 how to solve the linear ODE
y(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 aunique solution.
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 .
Theorem 2.3.1 Existence and Uniqueness for Linear First Order IVP
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
µ(t) = exp
tt0
p(s)ds
, (2.35)
where the integral inside the exponential is a definite integral. Then
µ(t0) = exp
t0t0
p(s)ds
= exp(0) = 1.
Recall Leibniz Rule:
d
dt
b(t)a(t)
f (t, s)ds = f (t, b(t))b(t) − f (t, a(t))a(t) + b(t)a(t)
∂
∂t(f (t, s))ds.
Hence
µ(t) = d
dtµ(t)
= exp
tt0
p(s)ds
d
dt
tt0
p(s)ds
= µ(t)[ p(t)1 + 0 + 0]
= µ(t) p(t)
Next, suppose that a solution y(t) exists. Then it must satisfy
d
dt[µ(t)y(t)] = µ(t)y(t) + µ(t)y(t)
= µ(t)y(t) + µ(t) p(t)y(t) since µ(t) = µ(t) p(t)
= µ(t)[y(t) + p(t)y(t)]
= µ(t)g(t).
Proof
8/16/2019 Ordinary Differential Equations course notes
38/153
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 bothsides
[µ(s)y(s)]ts=t0 =
tt0
µ(s)g(s)ds
µ(t)y(t) − µ(t0)y0 = tt0
µ(s)g(s)ds.
But, recalling that µ(t0) = 1 and rearranging we obtain
y(t) = y0µ(t)
+ 1
µ(t)
tt0
µ(s)g(s)ds. (2.36)
Where we note that µ(t) is defined by (2.35) and µ(t) > 0 for all t ∈ I , so there is no problem in dividingby µ(t). But this shows that there is a most one solution, since any solution y must satisfy the sameformula (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µ(t0) + 1µ(t0)
t0t0
µ(s)g(s)ds = y01 + 11 × 0 = y0,
so y (t) defined by (2.34) satisfies the initial condition y (t0) = y0. To show that y(t) satisfies the ODEit 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 valuespecified) are of the form
y(t) = C
µ(t) +
1
µ(t)
µ(s)g(s)ds, (2.37)
for an arbitrary constant C . That corresponds to all solutions of the form (2.36) for different initial conditionsy0. We refer to the set of all solutions of a linear ODE as the general solution . Hence (2.37) gives the generalsolution 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). Thereare also generalizations of this theorem. In particular, p and g continuous was only used to ensure that pand 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 almosteverywhere.
2.3.2 Nonlinear Scalar First Order ODEs
Now consider the nonlinear first order ODE
y = 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 conditiony(t0) = y0. However, since we do not have a general formula for the solution of (2.38) we cannot use thetechniques 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.
8/16/2019 Ordinary Differential Equations course notes
39/153
2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES 39
We will need the concept of Lipschitz continuity.
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)| L|y1 − y2|, ∀(x, y1) ∈ (R) and (x, y2) ∈ (R).
Definition 2.3.2 Lipschitz continuous in y
Clearly, if f is Lipschitz continuous in y, then f is continuous in y, so this concept is stronger thancontinuity.
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.
Lemma 2.3.3
By the Fundamental Theorem of Calculus, treating x as a constant,
f (x, y2) = f (x, y1) +
y2y1
∂f
∂y(x, y)dy.
Hence
|f (x, y2)
−f (x, y1)
| =
y2
y1
∂f
∂y
(x, y)dy y2
y1 ∂f
∂y
(x, y) dy (y2 > y1) |y2 − y1| max
y∈[y1,y2]
∂f ∂y (x, y)
|y2 − y1| max(x,y)∈R
∂f ∂y (x, y)
|y2 − y1|L,
where
L = max(x,y)∈R
|∂f ∂y
(x, y)| (2.39)
and the maximum exists and is finite because ∂f ∂y is a continuous function on a closed set.
Proof
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 theorigin but is not differentiable when y = 0. The function f (x, y) = y1/3 is continuous on any rectanglecentred at the origin but not Lipschitz on any such rectangle (because |∂f ∂y | is unbounded near y = 0).
In summary
∂f
∂y continuous in y =⇒ f is Lipschitz in y =⇒ f is continuous in y
8/16/2019 Ordinary Differential Equations course notes
40/153
40 CHAPTER 2. FIRST ORDER ODES
We are now ready to state an existence and uniqueness result for the nonlinear initial value problem.
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 = 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].
Theorem 2.3.4 Existence and Uniqueness for Nonlinear Scalar First Order IVPs
i) We have already proved the special case of this theorem, since if y(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.
Note
Rewrite the IVP as
y = f (t, y), y(t0) = y0 (2.40)as
y(t) = y0 +
tt0
f (s, y(s))ds, (2.41)
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 Émile Picard, though other names are also attached to the technique,and this theorem is sometimes called the PicardLindel̈of theorem).
The basic idea is very simple. Guess a solution and call this guess y0(t). The simplest choice is toguess 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 andalso the property that y0(t) ∈ [y0 − b, y0 + b] for all t ∈ [t0 − a, t0 + a]. Of course, the function y0(t) willnot satisfy the differential equation in either of the forms (2.41) and (2.40) so is not the solution of theIVP.
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 a]), and with each function satisfying yn(t0) = y0 and yn(t) ∈ [y0 − b, y0 + b] for all[t0 − h, t0 + h].
Proof Proof of the Theorem 2.3.4
8/16/2019 Ordinary Differential Equations course notes
41/153
2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES 41
We define the sequence of functions {yn(t)}∞n=0 iteratively by
yn+1(t) = y0 +
tt0
f (s, yn(s))ds. (2.43)
This is the Picard iteration. It is based on (2.41) where the unknown solution y(s) on the left-handside 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
y1(t) = y0 +
tt0
f (s, y0)ds,
and then
y2(t) = y0 +
tt0
f (s, y1(s))ds,
and so on and so forth to generate as many iterates as we wish. In many cases computation of theseiterates is not particularly hard, but here we wish to consider the more fundamental questions of whetherthis 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
ym+1(t) = y0 +
tt0
f (s, ym(s))ds = y0 +
tt0
f (s, y(s))ds = y(t),
using (2.41). So if ym(t) = y(t) for some m, then
yn(t) = y(t) ∀n m.
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 alln 0 and lim
n→∞yn(t) = y(t). We will show this paying attention to the details (including what we mean
by convergence).We need to check some details.
y0 + b
y0 − bt0 − a t0 + a
y0
t0
?
?
Assume thatyn(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 doesyn+1(t) as defined by (2.43) have the properties we require?
8/16/2019 Ordinary Differential Equations course notes
42/153
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 ensureyn+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 therectangle does not vanish when we iterate to infinity.
y0 + b
y0 − bt0 − a t0 + a
y0
t0
yn+1(t)
Slope M
Slope −M
y0 + b
y0 − bt0 − a t0 + a
y0
t0
yn+1(t)
t0 − h
Slope M Slope −M
t0 + h
Left: The case where Ma < b and Right: The case where Ma > b.
Since f is continuous in t and y on the rectangle R, there exists M > 0 such that |f (t, y)| M forall (t, y) ∈ R. But yn+1(t) is defined by (2.43), so by Leibniz’ rule
yn+1(t) = f (t, yn(t)),
so|yn+1(t)| M,
for all t ∈ [t0 − a, t0 + a]. If y0 + M a y0 + b (i.e. if M a b) then (2.44) is satisfied, as illustrated inthe left-hand diagram above. Let h = a and I = [t0 − a, t0 + a] in this case.
If Ma > b then choose h ∈ (0, a) such that Mh b then then yn+1(t) satisfies (2.45), as illustratedin 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. Henceletting 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 theset of continuous functions y (t) : I → [y0 − b, y0 + b]. Next define a mapping T on the function space
8/16/2019 Ordinary Differential Equations course notes
43/153
2.3. EXISTENCE AND UNIQUENESS FOR LINEAR AND NONLINEAR FIRST ORDER ODES 43
C , by T u = v where v and u both belong to the space of functions C , and given the function u, thefunction v is defined for each t ∈ I by
v(t) = y0 +
tt0
f (s, u(s))ds. (2.46)
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 (givingexistence 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 y∞ byy∞ := max
t∈I |y(t)|