+1(978)310-4246 credencewriters@gmail.com
  

Description

Please show work steps. Using LaTeX or any other program is preferred, if not, please show very clear hand writing.

TEST 4
Name:
SHOW ALL YOUR WORK
*−4
1. [15 pts.] Find general solution of Y 0 (t) = … 1
,2
−6
3
0
−6+
/
1 // Y (t).
4-
4
2. [15 pts.] Find general solution of Y 0 (t) = *
,6
te2t
Y (t) + * 2 −5t +.
−7,3t e −3+
3. [15 pts.] Find the general solution for a) y 00 + y 0 − 12y = e3t + e t ;
b) y 00 + y = t 2 + t.
4. [15 pts.] Solve the initial value problem y 00 + 2y 0 + y = e−t + cos(2t), y(0) = −3/25, y 0 (0) = 8/25, and accurately
graph the solution.
5. [15 pts.] Find general solution of y 00 + y = 4t sin(t).
Notes on Diffy Qs
Differential Equations for Engineers
by Jiří Lebl
July 21, 2020
(version 6.1)
2
Typeset in LATEX.
Copyright ©2008–2020 Jiří Lebl
This work is dual licensed under the Creative Commons Attribution-Noncommercial-Share Alike 4.0
International License and the Creative Commons Attribution-Share Alike 4.0 International License.
To view a copy of these licenses, visit https://creativecommons.org/licenses/by-nc-sa/4.0/
or https://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons
PO Box 1866, Mountain View, CA 94042, USA.
You can use, print, duplicate, share this book as much as you want. You can base your own notes
on it and reuse parts if you keep the license the same. You can assume the license is either the
CC-BY-NC-SA or CC-BY-SA, whichever is compatible with what you wish to do, your derivative
works must use at least one of the licenses. Derivative works must be prominently marked as such.
During the writing of this book, the author was in part supported by NSF grant DMS-0900885 and
DMS-1362337.
The date is the main identifier of version. The major version / edition number is raised only if there
have been substantial changes. Edition number started at 5, that is, version 5.0, as it was not kept
track of before.
See https://www.jirka.org/diffyqs/ for more information (including contact information).
The LATEX source for the book is available for possible modification and customization at github:
https://github.com/jirilebl/diffyqs
Contents
Introduction
7
0.1 Notes about these notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
0.2 Introduction to differential equations . . . . . . . . . . . . . . . . . . . . . . . 10
0.3 Classification of differential equations . . . . . . . . . . . . . . . . . . . . . . 17
1
2
3
First order equations
1.1 Integrals as solutions . . . . . . . . . . . . .
1.2 Slope fields . . . . . . . . . . . . . . . . . . .
1.3 Separable equations . . . . . . . . . . . . . .
1.4 Linear equations and the integrating factor
1.5 Substitution . . . . . . . . . . . . . . . . . .
1.6 Autonomous equations . . . . . . . . . . . .
1.7 Numerical methods: Euler’s method . . . .
1.8 Exact equations . . . . . . . . . . . . . . . .
1.9 First order linear PDE . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Higher order linear ODEs
2.1 Second order linear ODEs . . . . . . . . . . . .
2.2 Constant coefficient second order linear ODEs
2.3 Higher order linear ODEs . . . . . . . . . . . .
2.4 Mechanical vibrations . . . . . . . . . . . . . .
2.5 Nonhomogeneous equations . . . . . . . . . . .
2.6 Forced oscillations and resonance . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Systems of ODEs
3.1 Introduction to systems of ODEs . . . . . . . . .
3.2 Matrices and linear systems . . . . . . . . . . . .
3.3 Linear systems of ODEs . . . . . . . . . . . . . .
3.4 Eigenvalue method . . . . . . . . . . . . . . . . .
3.5 Two-dimensional systems and their vector fields
3.6 Second order systems and applications . . . . . .
3.7 Multiple eigenvalues . . . . . . . . . . . . . . . .
3.8 Matrix exponentials . . . . . . . . . . . . . . . . .
3.9 Nonhomogeneous systems . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
21
21
27
33
40
46
51
57
63
72
.
.
.
.
.
.
79
79
84
90
96
104
111
.
.
.
.
.
.
.
.
.
119
119
127
136
140
147
152
162
169
177
4
4
CONTENTS
Fourier series and PDEs
4.1 Boundary value problems . . . . . . . . . . . . . . . .
4.2 The trigonometric series . . . . . . . . . . . . . . . . .
4.3 More on the Fourier series . . . . . . . . . . . . . . . .
4.4 Sine and cosine series . . . . . . . . . . . . . . . . . . .
4.5 Applications of Fourier series . . . . . . . . . . . . . .
4.6 PDEs, separation of variables, and the heat equation .
4.7 One-dimensional wave equation . . . . . . . . . . . .
4.8 D’Alembert solution of the wave equation . . . . . . .
4.9 Steady state temperature and the Laplacian . . . . . .
4.10 Dirichlet problem in the circle and the Poisson kernel
.
.
.
.
.
.
.
.
.
.
189
189
198
208
218
226
232
243
252
258
264
5
More on eigenvalue problems
5.1 Sturm–Liouville problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Higher order eigenvalue problems . . . . . . . . . . . . . . . . . . . . . . . .
5.3 Steady periodic solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
273
273
282
286
6
The Laplace transform
6.1 The Laplace transform . . . . . . . . . . .
6.2 Transforms of derivatives and ODEs . . .
6.3 Convolution . . . . . . . . . . . . . . . . .
6.4 Dirac delta and impulse response . . . . .
6.5 Solving PDEs with the Laplace transform
.
.
.
.
.
293
293
300
308
313
320
7
Power series methods
7.1 Power series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2 Series solutions of linear second order ODEs . . . . . . . . . . . . . . . . . .
7.3 Singular points and the method of Frobenius . . . . . . . . . . . . . . . . . .
327
327
335
342
8
Nonlinear systems
8.1 Linearization, critical points, and equilibria . . . . .
8.2 Stability and classification of isolated critical points
8.3 Applications of nonlinear systems . . . . . . . . . .
8.4 Limit cycles . . . . . . . . . . . . . . . . . . . . . . .
8.5 Chaos . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
351
351
357
364
373
378
.
.
.
.
.
.
385
385
396
407
421
428
436
A Linear algebra
A.1 Vectors, mappings, and matrices . . .
A.2 Matrix algebra . . . . . . . . . . . . . .
A.3 Elimination . . . . . . . . . . . . . . . .
A.4 Subspaces, dimension, and the kernel
A.5 Inner product and projections . . . . .
A.6 Determinant . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
CONTENTS
5
B Table of Laplace Transforms
443
Further Reading
445
Solutions to Selected Exercises
447
Index
461
6
CONTENTS
Introduction
0.1
Notes about these notes
Note: A section for the instructor.
This book originated from my class notes for Math 286 at the University of Illinois at
Urbana-Champaign (UIUC) in Fall 2008 and Spring 2009. It is a first course on differential
equations for engineers. Using this book, I also taught Math 285 at UIUC, Math 20D at
University of California, San Diego (UCSD), and Math 4233 at Oklahoma State University
(OSU). Normally these courses are taught with Edwards and Penney, Differential Equations
and Boundary Value Problems: Computing and Modeling [EP], or Boyce and DiPrima’s
Elementary Differential Equations and Boundary Value Problems [BD], and this book aims to
be more or less a drop-in replacement. Other books I used as sources of information
and inspiration are E.L. Ince’s classic (and inexpensive) Ordinary Differential Equations [I],
Stanley Farlow’s Differential Equations and Their Applications [F], now available from Dover,
Berg and McGregor’s Elementary Partial Differential Equations [BM], and William Trench’s
free book Elementary Differential Equations with Boundary Value Problems [T]. See the Further
Reading chapter at the end of the book.
0.1.1
Organization
The organization of this book to some degree requires chapters be done in order. Later
chapters can be dropped. The dependence of the material covered is roughly:
Introduction
Appendix A
Chapter 1
Chapter 2
Chapter 3
Chapter 8
Chapter 7
Chapter 4
Chapter 5
Chapter 6
8
INTRODUCTION
There are a few references in chapters 4 and 5 to chapter 3 (some linear algebra), but
these references are not essential and can be skimmed over, so chapter 3 can safely be
dropped, while still covering chapters 4 and 5. Chapter 6 does not depend on chapter 4
except that the PDE section 6.5 makes a few references to chapter 4, although it could, in
theory, be covered separately. The more in-depth appendix A on linear algebra can replace
the short review § 3.2 for a course that combines linear algebra and ODE.
0.1.2
Typical types of courses
Several typical types of courses can be run with the book. There are the two original
courses at UIUC, both cover ODE as well some PDE. Either, there is the 4 hours-a-week for
a semester (Math 286 at UIUC):
Introduction (0.2), chapter 1 (1.1–1.7), chapter 2, chapter 3, chapter 4 (4.1–4.9), chapter 5 (or
6 or 7 or 8).
Or, the second course at UIUC is at 3 hours-a-week (Math 285 at UIUC):
Introduction (0.2), chapter 1 (1.1–1.7), chapter 2, chapter 4 (4.1–4.9), (and maybe chapter 5,
6, or 7).
A semester-long course at 3 hours a week that doesn’t cover either systems or PDE
will cover, beyond the introduction, chapter 1, chapter 2, chapter 6, and chapter 7, (with
sections skipped as above). On the other hand, a typical course that covers systems will
probably need to skip Laplace and power series and cover chapter 1, chapter 2, chapter 3,
and chapter 8.
If sections need to be skipped in the beginning, a good core of the sections on single
ODE is: 0.2, 1.1–1.4, 1.6, 2.1, 2.2, 2.4–2.6.
The complete book can be covered at a reasonably fast pace at approximately 76
lectures (without appendix A) or 86 lectures (with appendix A replacing § 3.2). This is
not accounting for exams, review, or time spent in a computer lab. A two-quarter or a
two-semester course can be easily run with the material. For example (with some sections
perhaps strategically skipped):
Semester 1: Introduction, chapter 1, chapter 2, chapter 6, chapter 7.
Semester 2: Chapter 3, chapter 8, chapter 4, chapter 5.
A combined course on ODE with linear algebra can run as:
Introduction, chapter 1 (1.1–1.7), chapter 2, appendix A, chapter 3 (w/o § 3.2), (possibly
chapter 8).
The chapter on the Laplace transform (chapter 6), the chapter on Sturm–Liouville
(chapter 5), the chapter on power series (chapter 7), and the chapter on nonlinear systems
(chapter 8), are more or less interchangeable and can be treated as “topics”. If chapter 8
is covered, it may be best to place it right after chapter 3, and chapter 5 is best covered
right after chapter 4. If time is short, the first two sections of chapter 7 make a reasonable
self-contained unit.
0.1. NOTES ABOUT THESE NOTES
0.1.3
9
Computer resources
The book’s website https://www.jirka.org/diffyqs/ contains the following resources:
1. Interactive SAGE demos.
2. Online WeBWorK homeworks (using either your own WeBWorK installation or
Edfinity) for most sections, customized for this book.
3. The PDFs of the figures used in this book.
I taught the UIUC courses using IODE (https://faculty.math.illinois.edu/iode/).
IODE is a free software package that works with Matlab (proprietary) or Octave (free
software). The graphs in the book were made with the Genius software (see https:
//www.jirka.org/genius.html). I use Genius in class to show these (and other) graphs.
The LATEX source of the book is also available for possible modification and customization
at github (https://github.com/jirilebl/diffyqs).
0.1.4
Acknowledgments
Firstly, I would like to acknowledge Rick Laugesen. I used his handwritten class notes
the first time I taught Math 286. My organization of this book through chapter 5, and
the choice of material covered, is heavily influenced by his notes. Many examples and
computations are taken from his notes. I am also heavily indebted to Rick for all the advice
he has given me, not just on teaching Math 286. For spotting errors and other suggestions,
I would also like to acknowledge (in no particular order): John P. D’Angelo, Sean Raleigh,
Jessica Robinson, Michael Angelini, Leonardo Gomes, Jeff Winegar, Ian Simon, Thomas
Wicklund, Eliot Brenner, Sean Robinson, Jannett Susberry, Dana Al-Quadi, Cesar Alvarez,
Cem Bagdatlioglu, Nathan Wong, Alison Shive, Shawn White, Wing Yip Ho, Joanne Shin,
Gladys Cruz, Jonathan Gomez, Janelle Louie, Navid Froutan, Grace Victorine, Paul Pearson,
Jared Teague, Ziad Adwan, Martin Weilandt, Sönmez Şahutoğlu, Pete Peterson, Thomas
Gresham, Prentiss Hyde, Jai Welch, Simon Tse, Andrew Browning, James Choi, Dusty
Grundmeier, John Marriott, Jim Kruidenier, Barry Conrad, Wesley Snider, Colton Koop,
Sarah Morse, Erik Boczko, Asif Shakeel, Chris Peterson, Nicholas Hu, Paul Seeburger,
Jonathan McCormick, David Leep, William Meisel, Shishir Agrawal, Tom Wan, Andres
Valloud, and probably others I have forgotten. Finally, I would like to acknowledge NSF
grants DMS-0900885 and DMS-1362337.
10
0.2
INTRODUCTION
Introduction to differential equations
Note: more than 1 lecture, §1.1 in [EP], chapter 1 in [BD]
0.2.1
Differential equations
The laws of physics are generally written down as differential equations. Therefore, all
of science and engineering use differential equations to some degree. Understanding
differential equations is essential to understanding almost anything you will study in your
science and engineering classes. You can think of mathematics as the language of science,
and differential equations are one of the most important parts of this language as far as
science and engineering are concerned. As an analogy, suppose all your classes from now
on were given in Swahili. It would be important to first learn Swahili, or you would have a
very tough time getting a good grade in your classes.
You saw many differential equations already without perhaps knowing about it. And
you even solved simple differential equations when you took calculus. Let us see an
example you may not have seen:
𝑑𝑥
+ 𝑥 = 2 cos 𝑡.
(1)
𝑑𝑡
Here 𝑥 is the dependent variable and 𝑡 is the independent variable. Equation (1) is a basic
example of a differential equation. It is an example of a first order differential equation, since
it involves only the first derivative of the dependent variable. This equation arises from
Newton’s law of cooling where the ambient temperature oscillates with time.
0.2.2
Solutions of differential equations
Solving the differential equation means finding 𝑥 in terms of 𝑡. That is, we want to find a
function of 𝑡, which we call 𝑥, such that when we plug 𝑥, 𝑡, and 𝑑𝑥
𝑑𝑡 into (1), the equation
holds; that is, the left hand side equals the right hand side. It is the same idea as it would
be for a normal (algebraic) equation of just 𝑥 and 𝑡. We claim that
𝑥 = 𝑥(𝑡) = cos 𝑡 + sin 𝑡
is a solution. How do we check? We simply plug 𝑥 into equation (1)! First we need to
𝑑𝑥
compute 𝑑𝑥
𝑑𝑡 . We find that 𝑑𝑡 = − sin 𝑡 + cos 𝑡. Now let us compute the left-hand side of (1).
𝑑𝑥
+ 𝑥 = (− sin 𝑡 + cos 𝑡) + (cos 𝑡 + sin 𝑡) = 2 cos 𝑡.
𝑑𝑡
|
{z
} | {z }
𝑑𝑥
𝑑𝑡
𝑥
Yay! We got precisely the right-hand side. But there is more! We claim 𝑥 = cos 𝑡 + sin 𝑡 + 𝑒 −𝑡
is also a solution. Let us try,
𝑑𝑥
= − sin 𝑡 + cos 𝑡 − 𝑒 −𝑡 .
𝑑𝑡
11
0.2. INTRODUCTION TO DIFFERENTIAL EQUATIONS
We plug into the left-hand side of (1)
𝑑𝑥
+ 𝑥 = (− sin 𝑡 + cos 𝑡 − 𝑒 −𝑡 ) + (cos 𝑡 + sin 𝑡 + 𝑒 −𝑡 ) = 2 cos 𝑡.
𝑑𝑡
{z
}
|
{z
} |
𝑥
𝑑𝑥
𝑑𝑡
And it works yet again!
So there can be many different solutions. For this equation all solutions can be written
in the form
𝑥 = cos 𝑡 + sin 𝑡 + 𝐶𝑒 −𝑡 ,
for some constant 𝐶. Different constants 𝐶 will give different solutions, so there are really
infinitely many possible solutions. See Figure 1 for the graph of a few of these solutions.
We will see how we find these solutions a few lectures from now.
Solving differential equations can be
quite hard. There is no general method
that solves every differential equation. We
will generally focus on how to get exact formulas for solutions of certain differential
equations, but we will also spend a little
bit of time on getting approximate solutions. And we will spend some time on
understanding the equations without solving them.
Most of this book is dedicated to ordinary
differential equations or ODEs, that is, equations with only one independent variable,
Figure 1: Few solutions of 𝑑𝑥
𝑑𝑡 + 𝑥 = 2 cos 𝑡.
where derivatives are only with respect to
this one variable. If there are several independent variables, we get partial differential
equations or PDEs.
Even for ODEs, which are very well understood, it is not a simple question of turning
a crank to get answers. When you can find exact solutions, they are usually preferable
to approximate solutions. It is important to understand how such solutions are found.
Although in real applications you will leave much of the actual calculations to computers,
you need to understand what they are doing. It is often necessary to simplify or transform
your equations into something that a computer can understand and solve. You may even
need to make certain assumptions and changes in your model to achieve this.
To be a successful engineer or scientist, you will be required to solve problems in your
job that you never saw before. It is important to learn problem solving techniques, so that
you may apply those techniques to new problems. A common mistake is to expect to learn
some prescription for solving all the problems you will encounter in your later career. This
course is no exception.
0
1
2
3
4
5
3
3
2
2
1
1
0
0
-1
-1
0
1
2
3
4
5
12
0.2.3
INTRODUCTION
Differential equations in practice
So how do we use differential equations in
Real-world problem
science and engineering? First, we have some
real-world problem we wish to understand. We
abstract
interpret
make some simplifying assumptions and cresolve
ate a mathematical model. That is, we translate Mathematical
Mathematical
the real-world situation into a set of differential
model
solution
equations. Then we apply mathematics to get
some sort of a mathematical solution. There is still something left to do. We have to interpret
the results. We have to figure out what the mathematical solution says about the real-world
problem we started with.
Learning how to formulate the mathematical model and how to interpret the results is
what your physics and engineering classes do. In this course, we will focus mostly on the
mathematical analysis. Sometimes we will work with simple real-world examples so that
we have some intuition and motivation about what we are doing.
Let us look at an example of this process. One of the most basic differential equations is
the standard exponential growth model. Let 𝑃 denote the population of some bacteria on
a Petri dish. We assume that there is enough food and enough space. Then the rate of
growth of bacteria is proportional to the population—a large population grows quicker.
Let 𝑡 denote time (say in seconds) and 𝑃 the population. Our model is
𝑑𝑃
= 𝑘𝑃,
𝑑𝑡
for some positive constant 𝑘 > 0.
Example 0.2.1: Suppose there are 100 bacteria at time 0 and 200 bacteria 10 seconds later.
How many bacteria will there be 1 minute from time 0 (in 60 seconds)?
First we need to solve the equation. We
claim that a solution is given by
0
10
20
30
40
50
60
6000
6000
5000
5000
4000
4000
3000
3000
2000
2000
1000
1000
𝑘𝑡
𝑃(𝑡) = 𝐶𝑒 ,
where 𝐶 is a constant. Let us try:
𝑑𝑃
= 𝐶 𝑘𝑒 𝑘𝑡 = 𝑘𝑃.
𝑑𝑡
And it really is a solution.
OK, now what? We do not know 𝐶, and
we do not know 𝑘. But we know something.
We know 𝑃(0) = 100, and we know 𝑃(10) =
200. Let us plug these conditions in and see
what happens.
0
0
0
10
20
30
40
50
60
Figure 2: Bacteria growth in the first 60 seconds.
100 = 𝑃(0) = 𝐶𝑒 𝑘0 = 𝐶,
200 = 𝑃(10) = 100 𝑒 𝑘10 .
0.2. INTRODUCTION TO DIFFERENTIAL EQUATIONS
Therefore, 2 = 𝑒 10𝑘 or
ln 2
10
13
= 𝑘 ≈ 0.069. So
𝑃(𝑡) = 100 𝑒 (ln 2)𝑡/10 ≈ 100 𝑒 0.069𝑡 .
At one minute, 𝑡 = 60, the population is 𝑃(60) = 6400. See Figure 2 on the preceding page.
Let us talk about the interpretation of the results. Does our solution mean that there
must be exactly 6400 bacteria on the plate at 60s? No! We made assumptions that might
not be true exactly, just approximately. If our assumptions are reasonable, then there
will be approximately 6400 bacteria. Also, in real life 𝑃 is a discrete quantity, not a real
number. However, our model has no problem saying that for example at 61 seconds,
𝑃(61) ≈ 6859.35.
Normally, the 𝑘 in 𝑃 0 = 𝑘𝑃 is known, and we want to solve the equation for different
initial conditions. What does that mean? Take 𝑘 = 1 for simplicity. Suppose we want to
solve the equation 𝑑𝑃
𝑑𝑡 = 𝑃 subject to 𝑃(0) = 1000 (the initial condition). Then the solution
turns out to be (exercise)
𝑃(𝑡) = 1000 𝑒 𝑡 .
We call 𝑃(𝑡) = 𝐶𝑒 𝑡 the general solution, as every solution of the equation can be written
in this form for some constant 𝐶. We need an initial condition to find out what 𝐶 is, in
order to find the particular solution we are looking for. Generally, when we say “particular
solution,” we just mean some solution.
0.2.4
Four fundamental equations
A few equations appear often and it is useful to just memorize what their solutions are. Let
us call them the four fundamental equations. Their solutions are reasonably easy to guess
by recalling properties of exponentials, sines, and cosines. They are also simple to check,
which is something that you should always do. No need to wonder if you remembered the
solution correctly.
First such equation is
𝑑𝑦
= 𝑘 𝑦,
𝑑𝑥
for some constant 𝑘 > 0. Here 𝑦 is the dependent and 𝑥 the independent variable. The
general solution for this equation is
𝑦(𝑥) = 𝐶𝑒 𝑘𝑥 .
We saw above that this function is a solution, although we used different variable names.
Next,
𝑑𝑦
= −𝑘 𝑦,
𝑑𝑥
for some constant 𝑘 > 0. The general solution for this equation is
𝑦(𝑥) = 𝐶𝑒 −𝑘𝑥 .
14
INTRODUCTION
Exercise 0.2.1: Check that the 𝑦 given is really a solution to the equation.
Next, take the second order differential equation
𝑑2 𝑦
2
= −𝑘 2 𝑦,
𝑑𝑥
for some constant 𝑘 > 0. The general solution for this equation is
𝑦(𝑥) = 𝐶1 cos(𝑘𝑥) + 𝐶2 sin(𝑘𝑥).
Since the equation is a second order differential equation, we have two constants in our
general solution.
Exercise 0.2.2: Check that the 𝑦 given is really a solution to the equation.
Finally, consider the second order differential equation
𝑑2 𝑦
2
= 𝑘 2 𝑦,
𝑑𝑥
for some constant 𝑘 > 0. The general solution for this equation is
𝑦(𝑥) = 𝐶1 𝑒 𝑘𝑥 + 𝐶2 𝑒 −𝑘𝑥 ,
or
𝑦(𝑥) = 𝐷1 cosh(𝑘𝑥) + 𝐷2 sinh(𝑘𝑥).
For those that do not know, cosh and sinh are defined by
𝑒 𝑥 − 𝑒 −𝑥
𝑒 𝑥 + 𝑒 −𝑥
,
sinh 𝑥 =
.
2
2
They are called the hyperbolic cosine and hyperbolic sine. These functions are sometimes
easier to work with than exponentials. They have some nice familiar properties such as
𝑑
𝑑
cosh 0 = 1, sinh 0 = 0, and 𝑑𝑥
cosh 𝑥 = sinh 𝑥 (no that is not a typo) and 𝑑𝑥
sinh 𝑥 = cosh 𝑥.
cosh 𝑥 =
Exercise 0.2.3: Check that both forms of the 𝑦 given are really solutions to the equation.
Example 0.2.2: In equations of higher order, you get more constants you must solve for
𝑑2 𝑦
to get a particular solution. The equation 𝑑𝑥 2 = 0 has the general solution 𝑦 = 𝐶1 𝑥 + 𝐶2 ;
simply integrate twice and don’t forget about the constant of integration. Consider the
initial conditions 𝑦(0) = 2 and 𝑦 0(0) = 3. We plug in our general solution and solve for the
constants:
2 = 𝑦(0) = 𝐶1 · 0 + 𝐶2 = 𝐶2 ,
3 = 𝑦 0(0) = 𝐶1 .
In other words, 𝑦 = 3𝑥 + 2 is the particular solution we seek.
An interesting note about cosh: The graph of cosh is the exact shape of a hanging chain.
This shape is called a catenary. Contrary to popular belief this is not a parabola. If you
invert the graph of cosh, it is also the ideal arch for supporting its weight. For example, the
gateway arch in Saint Louis is an inverted graph of cosh—if it were just a parabola it might
fall. The formula used in the design is inscribed inside the arch:
𝑦 = −127.7 ft · cosh(𝑥/127.7 ft) + 757.7 ft.
15
0.2. INTRODUCTION TO DIFFERENTIAL EQUATIONS
0.2.5
Exercises
Exercise 0.2.4: Show that 𝑥 = 𝑒 4𝑡 is a solution to 𝑥 000 − 12𝑥 00 + 48𝑥 0 − 64𝑥 = 0.
Exercise 0.2.5: Show that 𝑥 = 𝑒 𝑡 is not a solution to 𝑥 000 − 12𝑥 00 + 48𝑥 0 − 64𝑥 = 0.
Exercise 0.2.6: Is 𝑦 = sin 𝑡 a solution to
2
𝑑𝑦
𝑑𝑡
= 1 − 𝑦 2 ? Justify.
Exercise 0.2.7: Let 𝑦 00 + 2𝑦 0 − 8𝑦 = 0. Now try a solution of the form 𝑦 = 𝑒 𝑟𝑥 for some (unknown)
constant 𝑟. Is this a solution for some 𝑟? If so, find all such 𝑟.
Exercise 0.2.8: Verify that 𝑥 = 𝐶𝑒 −2𝑡 is a solution to 𝑥 0 = −2𝑥. Find 𝐶 to solve for the initial
condition 𝑥(0) = 100.
Exercise 0.2.9: Verify that 𝑥 = 𝐶1 𝑒 −𝑡 + 𝐶2 𝑒 2𝑡 is a solution to 𝑥 00 − 𝑥 0 − 2𝑥 = 0. Find 𝐶1 and 𝐶2
to solve for the initial conditions 𝑥(0) = 10 and 𝑥 0(0) = 0.
Exercise 0.2.10: Find a solution to (𝑥 0)2 + 𝑥 2 = 4 using your knowledge of derivatives of functions
that you know from basic calculus.
Exercise 0.2.11: Solve:
a)
𝑑𝐴
= −10𝐴,
𝑑𝑡
𝑑2 𝑦
c)
= 4𝑦,
𝑑𝑥 2
𝐴(0) = 5
𝑦(0) = 0,
b)
𝑦 0(0)
=1
𝑑𝐻
= 3𝐻,
𝑑𝑥
𝐻(0) = 1
𝑑2 𝑥
d)
= −9𝑥,
𝑑𝑦 2
𝑥(0) = 1,
𝑥 0(0) = 0
Exercise 0.2.12: Is there a solution to 𝑦 0 = 𝑦, such that 𝑦(0) = 𝑦(1)?
Exercise 0.2.13: The population of city X was 100 thousand 20 years ago, and the population of
city X was 120 thousand 10 years ago. Assuming constant growth, you can use the exponential
population model (like for the bacteria). What do you estimate the population is now?
Exercise 0.2.14: Suppose that a football coach gets a salary of one million dollars now, and a raise
of 10% every year (so exponential model, like population of bacteria). Let 𝑠 be the salary in millions
of dollars, and 𝑡 is time in years.
a) What is 𝑠(0) and 𝑠(1).
b) Approximately how many years will it take
for the salary to be 10 million.
c) Approximately how many years will it take
for the salary to be 20 million.
d) Approximately how many years will it take
for the salary to be 30 million.
Note: Exercises with numbers 101 and higher have solutions in the back of the book.
Exercise 0.2.101: Show that 𝑥 = 𝑒 −2𝑡 is a solution to 𝑥 00 + 4𝑥 0 + 4𝑥 = 0.
Exercise 0.2.102: Is 𝑦 = 𝑥 2 a solution to 𝑥 2 𝑦 00 − 2𝑦 = 0? Justify.
16
INTRODUCTION
Exercise 0.2.103: Let 𝑥𝑦 00 − 𝑦 0 = 0. Try a solution of the form 𝑦 = 𝑥 𝑟 . Is this a solution for some
𝑟? If so, find all such 𝑟.
Exercise 0.2.104: Verify that 𝑥 = 𝐶1 𝑒 𝑡 + 𝐶2 is a solution to 𝑥 00 − 𝑥 0 = 0. Find 𝐶1 and 𝐶2 so that
𝑥 satisfies 𝑥(0) = 10 and 𝑥 0(0) = 100.
Exercise 0.2.105: Solve
𝑑𝜑
𝑑𝑠
= 8𝜑 and 𝜑(0) = −9.
Exercise 0.2.106: Solve:
a)
𝑑𝑥
= −4𝑥,
𝑑𝑡
c)
𝑑𝑝
= 3𝑝,
𝑑𝑞
𝑥(0) = 9
𝑝(0) = 4
b)
𝑑2 𝑥
= −4𝑥,
𝑑𝑡 2
d)
𝑑 2𝑇
= 4𝑇,
𝑑𝑥 2
𝑥(0) = 1,
𝑇(0) = 0,
𝑥 0(0) = 2
𝑇 0(0) = 6
0.3. CLASSIFICATION OF DIFFERENTIAL EQUATIONS
0.3
17
Classification of differential equations
Note: less than 1 lecture or left as reading, §1.3 in [BD]
There are many types of differential equations, and we classify them into different
categories based on their properties. Let us quickly go over the most basic classification.
We already saw the distinction between ordinary and partial differential equations:
• Ordinary differential equations or (ODE) are equations where the derivatives are taken
with respect to only one variable. That is, there is only one independent variable.
• Partial differential equations or (PDE) are equations that depend on partial derivatives
of several variables. That is, there are several independent variables.
Let us see some examples of ordinary differential equations:
𝑑𝑦
= 𝑘 𝑦,
𝑑𝑡
𝑑𝑦
= 𝑘(𝐴 − 𝑦),
𝑑𝑡
𝑑2 𝑥
𝑑𝑥
𝑚 2 +𝑐
+ 𝑘𝑥 = 𝑓 (𝑡).
𝑑𝑡
𝑑𝑡
(Exponential growth)
(Newton’s law of cooling)
(Mechanical vibrations)
And of partial differential equations:
𝜕𝑦
𝜕𝑦
+𝑐
= 0,
𝜕𝑡
𝜕𝑥
𝜕𝑢 𝜕2 𝑢
=
,
𝜕𝑡
𝜕𝑥 2
𝜕2 𝑢 𝜕2 𝑢 𝜕2 𝑢
=
+
.
𝜕𝑡 2
𝜕𝑥 2 𝜕𝑦 2
(Transport equation)
(Heat equation)
(Wave equation in 2 dimensions)
If there are several equations working together, we have a so-called system of differential
equations. For example,
𝑦 0 = 𝑥,
𝑥0 = 𝑦
is a simple system of ordinary differential equations. Maxwell’s equations for electromagnetics,
® = 𝜌,
∇·𝐷
∇ · 𝐵® = 0,
𝜕 𝐵®
∇ × 𝐸® = − ,
𝜕𝑡
®
® = ®𝐽 + 𝜕 𝐷 ,
∇×𝐻
𝜕𝑡
are a system of partial differential equations. The divergence operator ∇· and the curl
operator ∇× can be written out in partial derivatives of the functions involved in the 𝑥, 𝑦,
and 𝑧 variables.
18
INTRODUCTION
The next bit of information is the order of the equation (or system). The order is simply
the order of the largest derivative that appears. If the highest derivative that appears is
the first derivative, the equation is of first order. If the highest derivative that appears is
the second derivative, then the equation is of second order. For example, Newton’s law
of cooling above is a first order equation, while the mechanical vibrations equation is a
second order equation. The equation governing transversal vibrations in a beam,
𝜕2 𝑦
+
= 0,
𝑎
𝜕𝑥 4 𝜕𝑡 2
4𝜕
4𝑦
is a fourth order partial differential equation. It is fourth order as at least one derivative is
the fourth derivative. It does not matter that the derivative in 𝑡 is only of second order.
In the first chapter, we will start attacking first order ordinary differential equations,
𝑑𝑦
that is, equations of the form 𝑑𝑥 = 𝑓 (𝑥, 𝑦). In general, lower order equations are easier to
work with and have simpler behavior, which is why we start with them.
We also distinguish how the dependent variables appear in the equation (or system).
In particular, we say an equation is linear if the dependent variable (or variables) and their
derivatives appear linearly, that is only as first powers, they are not multiplied together,
and no other functions of the dependent variables appear. In other words, the equation is
a sum of terms, where each term is some function of the independent variables or some
function of the independent variables multiplied by a dependent variable or its derivative.
Otherwise, the equation is called nonlinear. For example, an ordinary differential equation
is linear if it can be put into the form
𝑑𝑛 𝑦
𝑑 𝑛−1 𝑦
𝑑𝑦
+ 𝑎 0 (𝑥)𝑦 = 𝑏(𝑥).
𝑎 𝑛 (𝑥) 𝑛 + 𝑎 𝑛−1 (𝑥) 𝑛−1 + · · · + 𝑎 1 (𝑥)
𝑑𝑥
𝑑𝑥
𝑑𝑥
(2)
The functions 𝑎 0 , 𝑎 1 , . . . , 𝑎 𝑛 are called the coefficients. The equation is allowed to depend
arbitrarily on the independent variable. So
𝑒𝑥
𝑑2 𝑦
𝑑𝑦
1
2
+
sin(𝑥)
+
𝑥
𝑦
=
𝑑𝑥
𝑥
𝑑𝑥 2
(3)
is still a linear equation as 𝑦 and its derivatives only appear linearly.
All the equations and systems above as examples are linear. It may not be immediately
obvious for Maxwell’s equations unless you write out the divergence and curl in terms of
partial derivatives. Let us see some nonlinear equations. For example Burger’s equation,
𝜕𝑦
𝜕𝑦
𝜕2 𝑦
+𝑦
= 𝜈 2,
𝜕𝑡
𝜕𝑥
𝜕𝑥
is a nonlinear second order partial differential equation. It is nonlinear because 𝑦 and
are multiplied together. The equation
𝑑𝑥
= 𝑥2
𝑑𝑡
𝜕𝑦
𝜕𝑥
(4)
0.3. CLASSIFICATION OF DIFFERENTIAL EQUATIONS
19
is a nonlinear first order differential equation as there is a second power of the dependent
variable 𝑥.
A linear equation may further be called homogeneous if all terms depend on the dependent
variable. That is, if no term is a function of the independent variables alone. Otherwise,
the equation is called nonhomogeneous or inhomogeneous. For example, the exponential
growth equation, the wave equation, or the transport equation above are homogeneous.
The mechanical vibrations equation above is nonhomogeneous as long as 𝑓 (𝑡) is not the
zero function. Similarly, if the ambient temperature 𝐴 is nonzero, Newton’s law of cooling
is nonhomogeneous. A homogeneous linear ODE can be put into the form
𝑑 𝑛−1 𝑦
𝑑𝑦
𝑑𝑛 𝑦
𝑎 𝑛 (𝑥) 𝑛 + 𝑎 𝑛−1 (𝑥) 𝑛−1 + · · · + 𝑎 1 (𝑥)
+ 𝑎 0 (𝑥)𝑦 = 0.
𝑑𝑥
𝑑𝑥
𝑑𝑥
Compare to (2) and notice there is no function 𝑏(𝑥).
If the coefficients of a linear equation are actually constant functions, then the equation
is said to have constant coefficients. The coefficients are the functions multiplying the
dependent variable(s) or one of its derivatives, not the function 𝑏(𝑥) standing alone. A
constant coefficient nonhomogeneous ODE is an equation of the form
𝑎𝑛
𝑑𝑛 𝑦
𝑑 𝑛−1 𝑦
𝑑𝑦
+ 𝑎 0 𝑦 = 𝑏(𝑥),
+
𝑎
+ · · · + 𝑎1
𝑛−1
𝑛
𝑛−1
𝑑𝑥
𝑑𝑥
𝑑𝑥
where 𝑎 0 , 𝑎1 , . . . , 𝑎 𝑛 are all constants, but 𝑏 may depend on the independent variable 𝑥. The
mechanical vibrations equation above is a constant coefficient nonhomogeneous second
order ODE. The same nomenclature applies to PDEs, so the transport equation, heat
equation and wave equation are all examples of constant coefficient linear PDEs.
Finally, an equation (or system) is called autonomous if the equation does not depend on
the independent variable. For autonomous ordinary differential equations, the independent
variable is then thought of as time. Autonomous equation means an equation that does
not change with time. For example, Newton’s law of cooling is autonomous, so is equation
(4). On the other hand, mechanical vibrations or (3) are not autonomous.
0.3.1
Exercises
Exercise 0.3.1: Classify the following equations. Are they ODE or PDE? Is it an equation or a
system? What is the order? Is it linear or nonlinear, and if it is linear, is it homogeneous, constant
coefficient? If it is an ODE, is it autonomous?
a) sin(𝑡)
𝑑2 𝑥
+ cos(𝑡)𝑥 = 𝑡 2
𝑑𝑡 2
c) 𝑦 00 + 3𝑦 + 5𝑥 = 0,
e) 𝑥 00 + 𝑡𝑥 2 = 𝑡
𝑥 00 + 𝑥 − 𝑦 = 0
b)
𝜕𝑢
𝜕𝑢
+3
= 𝑥𝑦
𝜕𝑥
𝜕𝑦
d)
𝜕2 𝑢
𝜕2 𝑢
+
𝑢
=0
𝜕𝑡 2
𝜕𝑠 2
f)
𝑑4 𝑥
=0
𝑑𝑡 4
20
INTRODUCTION
Exercise 0.3.2: If 𝑢® = (𝑢1 , 𝑢2 , 𝑢3 ) is a vector, we have the divergence ∇ · 𝑢® =

𝜕𝑢1
𝜕𝑥
+
𝜕𝑢2
𝜕𝑦
+
𝜕𝑢3
𝜕𝑧
and

3
3
2
1
2
1
curl ∇ × 𝑢® = 𝜕𝑢
− 𝜕𝑢
, 𝜕𝑢
− 𝜕𝑢
, 𝜕𝑢
− 𝜕𝑢
. Notice that curl of a vector is still a vector. Write
𝜕𝑦
𝜕𝑧
𝜕𝑧
𝜕𝑥
𝜕𝑥
𝜕𝑦
out Maxwell’s equations in terms of partial derivatives and classify the system.
Exercise 0.3.3: Suppose 𝐹 is a linear function, that is, 𝐹(𝑥, 𝑦) = 𝑎𝑥 + 𝑏𝑦 for constants 𝑎 and 𝑏.
What is the classification of equations of the form 𝐹(𝑦 0 , 𝑦) = 0.
Exercise 0.3.4: Write down an explicit example of a third order, linear, nonconstant coefficient,
nonautonomous, nonhomogeneous system of two ODE such that every derivative that could appear,
does appear.
Exercise 0.3.101: Classify the following equations. Are they ODE or PDE? Is it an equation or a
system? What is the order? Is it linear or nonlinear, and if it is linear, is it homogeneous, constant
coefficient? If it is an ODE, is it autonomous?
a)
𝜕2 𝑣
𝜕2 𝑣
+
3
= sin(𝑥)
𝜕𝑥 2
𝜕𝑦 2
b)
c)
𝑑7 𝐹
= 3𝐹(𝑥)
𝑑𝑥 7
d) 𝑦 00 + 8𝑦 0 = 1
e) 𝑥 00 + 𝑡 𝑦𝑥 0 = 0,
𝑦 00 + 𝑡𝑥𝑦 = 0
f)
𝑑𝑥
+ cos(𝑡)𝑥 = 𝑡 2 + 𝑡 + 1
𝑑𝑡
𝜕𝑢 𝜕2 𝑢
= 2 + 𝑢2
𝜕𝑡
𝜕𝑠
Exercise 0.3.102: Write down the general zeroth order linear ordinary differential equation. Write
down the general solution.
Exercise 0.3.103: For which 𝑘 is
𝑑𝑥
𝑑𝑡
+ 𝑥 𝑘 = 𝑡 𝑘+2 linear. Hint: there are two answers.
Chapter 1
First order equations
1.1
Integrals as solutions
Note: 1 lecture (or less), §1.2 in [EP], covered in §1.2 and §2.1 in [BD]
A first order ODE is an equation of the form
𝑑𝑦
= 𝑓 (𝑥, 𝑦),
𝑑𝑥
or just
𝑦 0 = 𝑓 (𝑥, 𝑦).
In general, there is no simple formula or procedure one can follow to find solutions. In the
next few lectures we will look at special cases where solutions are not difficult to obtain. In
this section, let us assume that 𝑓 is a function of 𝑥 alone, that is, the equation is
𝑦 0 = 𝑓 (𝑥).
(1.1)
We could just integrate (antidifferentiate) both sides with respect to 𝑥.
∫
0
𝑦 (𝑥) 𝑑𝑥 =
that is
𝑦(𝑥) =
∫
∫
𝑓 (𝑥) 𝑑𝑥 + 𝐶,
𝑓 (𝑥) 𝑑𝑥 + 𝐶.
This 𝑦(𝑥) is actually the general solution. So to solve (1.1), we find some antiderivative of
𝑓 (𝑥) and then we add an arbitrary constant to get the general solution.
Now is a good time to discuss a point about calculus notation and terminology.
Calculus textbooks muddy the waters by talking about the integral as primarily the
so-called indefinite integral. The indefinite integral is really the antiderivative (in fact the
whole one-parameter family of antiderivatives). There really exists only one integral and
that is the definite integral. The only reason for the indefinite integral notation is that we
22
CHAPTER 1. FIRST ORDER EQUATIONS
can always write an antiderivative as a (definite)
integral. That is, by the fundamental
∫
theorem of calculus we can always write 𝑓 (𝑥) 𝑑𝑥 + 𝐶 as
∫
𝑥
𝑓 (𝑡) 𝑑𝑡 + 𝐶.
𝑥0
Hence the terminology to integrate when we may really mean to antidifferentiate. Integration
is just one way to compute the antiderivative (and it is a way that always works, see the
following examples). Integration is defined as the area under the graph, it only happens to
also compute antiderivatives. For sake of consistency, we will keep using the indefinite
integral notation when we want an antiderivative, and you should always think of the
definite integral as a way to write it.
Example 1.1.1: Find the general solution of 𝑦 0 = 3𝑥 2 .
Elementary calculus tells us that the general solution must be 𝑦 = 𝑥 3 + 𝐶. Let us check
by differentiating: 𝑦 0 = 3𝑥 2 . We got precisely our equation back.
Normally, we also have an initial condition such as 𝑦(𝑥0 ) = 𝑦0 for some two numbers
𝑥0 and 𝑦0 (𝑥0 is usually 0, but not always). We can then write the solution as a definite
integral in a nice way. Suppose our problem is 𝑦 0 = 𝑓 (𝑥), 𝑦(𝑥0 ) = 𝑦0 . Then the solution is
𝑦(𝑥) =
𝑥
∫
𝑓 (𝑠) 𝑑𝑠 + 𝑦0 .
𝑥0
(1.2)
Let us check! We compute 𝑦 0 = 𝑓 (𝑥), via the fundamental theorem of calculus, and
∫by𝑥0 Jupiter, 𝑦 is a solution. Is it the one satisfying the initial condition? Well, 𝑦(𝑥0 ) =
𝑓 (𝑥) 𝑑𝑥 + 𝑦0 = 𝑦0 . It is!
𝑥0
Do note that the definite integral and the indefinite integral (antidifferentiation) are
completely different beasts. The definite integral always evaluates to a number. Therefore,
(1.2) is a formula we can plug into the calculator or a computer, and it will be happy to
calculate specific values for us. We will easily be able to plot the solution and work with it
just like with any other function. It is not so crucial to always find a closed form for the
antiderivative.
Example 1.1.2: Solve
2
𝑦 0 = 𝑒 −𝑥 ,
𝑦(0) = 1.
By the preceding discussion, the solution must be
𝑦(𝑥) =
∫
𝑥
2
𝑒 −𝑠 𝑑𝑠 + 1.
0
Here is a good way to make fun of your friends taking second semester calculus. Tell them
to find the closed form solution. Ha ha ha (bad math joke). It is not possible (in closed
form). There is absolutely nothing wrong with writing the solution as a definite integral.
This particular integral is in fact very important in statistics.
23
1.1. INTEGRALS AS SOLUTIONS
Using this method, we can also solve equations of the form
𝑦 0 = 𝑓 (𝑦).
Let us write the equation in Leibniz notation.
𝑑𝑦
= 𝑓 (𝑦).
𝑑𝑥
Now we use the inverse function theorem from calculus to switch the roles of 𝑥 and 𝑦 to
obtain
𝑑𝑥
1
=
.
𝑑𝑦
𝑓 (𝑦)
What we are doing seems like algebra with 𝑑𝑥 and 𝑑𝑦. It is tempting to just do algebra with
𝑑𝑥 and 𝑑𝑦 as if they were numbers. And in this case it does work. Be careful, however, as
this sort of hand-waving calculation can lead to trouble, especially when more than one
independent variable is involved. At this point, we can simply integrate,
𝑥(𝑦) =
∫
1
𝑑𝑦 + 𝐶.
𝑓 (𝑦)
Finally, we try to solve for 𝑦.
Example 1.1.3: Previously, we guessed 𝑦 0 = 𝑘 𝑦 (for some 𝑘 > 0) has the solution 𝑦 = 𝐶𝑒 𝑘𝑥 .
We can now find the solution without guessing. First we note that 𝑦 = 0 is a solution.
Henceforth, we assume 𝑦 ≠ 0. We write
1
𝑑𝑥
=
.
𝑑𝑦
𝑘𝑦
We integrate to obtain
1
ln |𝑦| + 𝐷,
𝑘
where 𝐷 is an arbitrary constant. Now we solve for 𝑦 (actually for |𝑦|).
𝑥(𝑦) = 𝑥 =
|𝑦| = 𝑒 𝑘𝑥−𝑘𝐷 = 𝑒 −𝑘𝐷 𝑒 𝑘𝑥 .
If we replace 𝑒 −𝑘𝐷 with an arbitrary constant 𝐶, we can get rid of the absolute value bars
(which we can do as 𝐷 was arbitrary). In this way, we also incorporate the solution 𝑦 = 0.
We get the same general solution as we guessed before, 𝑦 = 𝐶𝑒 𝑘𝑥 .
Example 1.1.4: Find the general solution of 𝑦 0 = 𝑦 2 .
First we note that 𝑦 = 0 is a solution. We can now assume that 𝑦 ≠ 0. Write
𝑑𝑥
1
= 2.
𝑑𝑦
𝑦
24
CHAPTER 1. FIRST ORDER EQUATIONS
We integrate to get
𝑥=
We solve for 𝑦 =
1
𝐶−𝑥 .
−1
+ 𝐶.
𝑦
So the general solution is
𝑦=
1
𝐶−𝑥
𝑦 = 0.
or
Note the singularities of the solution. If for example 𝐶 = 1, then the solution “blows up”
as we approach 𝑥 = 1. See Figure 1.1. Generally, it is hard to tell from just looking at the
equation itself how the solution is going to behave. The equation 𝑦 0 = 𝑦 2 is very nice and
defined everywhere, but the solution is only defined on some interval (−∞, 𝐶) or (𝐶, ∞).
Usually when this happens we only consider one of these the solution. For example if
1
we impose a condition 𝑦(0) = 1, then the solution is 𝑦 = 1−𝑥
, and we would consider this
solution only for 𝑥 on the interval (−∞, 1). In the figure, it is the left side of the graph.
-3
-2
-1
0
1
2
3
3
3
2
2
1
1
0
0
-1
-1
-2
-2
-3
-3
-3
-2
-1
0
1
Figure 1.1: Plot of 𝑦 =
2
3
1
1−𝑥 .
Classical problems leading to differential equations solvable by integration are problems
dealing with velocity, acceleration and distance. You have surely seen these problems
before in your calculus class.
Example 1.1.5: Suppose a car drives at a speed 𝑒 𝑡/2 meters per second, where 𝑡 is time in
seconds. How far did the car get in 2 seconds (starting at 𝑡 = 0)? How far in 10 seconds?
Let 𝑥 denote the distance the car traveled. The equation is
𝑥 0 = 𝑒 𝑡/2 .
We just integrate this equation to get that
𝑥(𝑡) = 2𝑒 𝑡/2 + 𝐶.
25
1.1. INTEGRALS AS SOLUTIONS
We still need to figure out 𝐶. We know that when 𝑡 = 0, then 𝑥 = 0. That is, 𝑥(0) = 0. So
0 = 𝑥(0) = 2𝑒 0/2 + 𝐶 = 2 + 𝐶.
Thus 𝐶 = −2 and
𝑥(𝑡) = 2𝑒 𝑡/2 − 2.
Now we just plug in to get where the car is at 2 and at 10 seconds. We obtain
𝑥(2) = 2𝑒 2/2 − 2 ≈ 3.44 meters,
𝑥(10) = 2𝑒 10/2 − 2 ≈ 294 meters.
Example 1.1.6: Suppose that the car accelerates at a rate of 𝑡 2 m/s2 . At time 𝑡 = 0 the car is
at the 1 meter mark and is traveling at 10 m/s. Where is the car at time 𝑡 = 10?
Well this is actually a second order problem. If 𝑥 is the distance traveled, then 𝑥 0 is the
velocity, and 𝑥 00 is the acceleration. The equation with initial conditions is
𝑥 00 = 𝑡 2 ,
𝑥(0) = 1,
𝑥 0(0) = 10.
What if we say 𝑥 0 = 𝑣. Then we have the problem
𝑣0 = 𝑡 2 ,
𝑣(0) = 10.
Once we solve for 𝑣, we can integrate and find 𝑥.
Exercise 1.1.1: Solve for 𝑣, and then solve for 𝑥. Find 𝑥(10) to answer the question.
1.1.1
Exercises
Exercise 1.1.2: Solve
𝑑𝑦
𝑑𝑥
= 𝑥 2 + 𝑥 for 𝑦(1) = 3.
Exercise 1.1.3: Solve
𝑑𝑦
𝑑𝑥
= sin(5𝑥) for 𝑦(0) = 2.
Exercise 1.1.4: Solve
𝑑𝑦
𝑑𝑥
=
1
𝑥 2 −1
for 𝑦(0) = 0.
Exercise 1.1.5: Solve 𝑦 0 = 𝑦 3 for 𝑦(0) = 1.
Exercise 1.1.6 (little harder): Solve 𝑦 0 = (𝑦 − 1)(𝑦 + 1) for 𝑦(0) = 3.
Exercise 1.1.7: Solve
𝑑𝑦
𝑑𝑥
=
1
𝑦+1
for 𝑦(0) = 0.
Exercise 1.1.8 (harder): Solve 𝑦 00 = sin 𝑥 for 𝑦(0) = 0, 𝑦 0(0) = 2.
Exercise 1.1.9: A spaceship is traveling at the speed 2𝑡 2 + 1 km/s (𝑡 is time in seconds). It is pointing
directly away from earth and at time 𝑡 = 0 it is 1000 kilometers from earth. How far from earth is it
at one minute from time 𝑡 = 0?
Exercise 1.1.10: Solve
integral.
𝑑𝑥
𝑑𝑡
= sin(𝑡 2 ) + 𝑡, 𝑥(0) = 20. It is OK to leave your answer as a definite
26
CHAPTER 1. FIRST ORDER EQUATIONS
Exercise 1.1.11: A dropped ball accelerates downwards at a constant rate 9.8 meters per second
squared. Set up the differential equation for the height above ground â„Ž in meters. Then supposing
â„Ž(0) = 100 meters, how long does it take for the ball to hit the ground.
Exercise 1.1.12: Find the general solution of 𝑦 0 = 𝑒 𝑥 , and then 𝑦 0 = 𝑒 𝑦 .
Exercise 1.1.101: Solve
𝑑𝑦
𝑑𝑥
= 𝑒 𝑥 + 𝑥 and 𝑦(0) = 10.
𝑥(1) = 1.
Exercise 1.1.102: Solve 𝑥 0 =
1
,
𝑥2
Exercise 1.1.103: Solve 𝑥 0 =
1
,
cos(𝑥)
𝑥(0) = 𝜋2 .
Exercise 1.1.104: Sid is in a car traveling at speed 10𝑡 + 70 miles per hour away from Las Vegas,
where 𝑡 is in hours. At 𝑡 = 0, Sid is 10 miles away from Vegas. How far from Vegas is Sid 2 hours
later?
Exercise 1.1.105: Solve 𝑦 0 = 𝑦 𝑛 , 𝑦(0) = 1, where 𝑛 is a positive integer. Hint: You have to
consider different cases.
Exercise 1.1.106: The rate of change of the volume of a snowball that is melting is proportional to
the surface area of the snowball. Suppose the snowball is perfectly spherical. Then the volume (in
centimeters cubed) of a ball of radius 𝑟 centimeters is 4/3 𝜋𝑟 3 . The surface area is 4𝜋𝑟 2 . Set up the
differential equation for how 𝑟 is changing. Then, suppose that at time 𝑡 = 0 minutes, the radius is
10 centimeters. After 5 minutes, the radius is 8 centimeters. At what time 𝑡 will the snowball be
completely melted?
Exercise 1.1.107: Find the general solution to 𝑦 0000 = 0. How many distinct constants do you need?
27
1.2. SLOPE FIELDS
1.2
Slope fields
Note: 1 lecture, §1.3 in [EP], §1.1 in [BD]
As we said, the general first order equation we are studying looks like
𝑦 0 = 𝑓 (𝑥, 𝑦).
A lot of the time, we cannot simply solve these kinds of equations explicitly. It would
be nice if we could at least figure out the shape and behavior of the solutions, or find
approximate solutions.
1.2.1
Slope fields
The equation 𝑦 0 = 𝑓 (𝑥, 𝑦) gives you a slope at each point in the (𝑥, 𝑦)-plane. And this is
the slope a solution 𝑦(𝑥) would have at 𝑥 if its value was 𝑦. In other words, 𝑓 (𝑥, 𝑦) is the
slope of a solution whose graph runs through the point (𝑥, 𝑦). At a point (𝑥, 𝑦), we plot
a short line with the slope 𝑓 (𝑥, 𝑦). For example, if 𝑓 (𝑥, 𝑦) = 𝑥𝑦, then at point (2, 1.5) we
draw a short line of slope 𝑥𝑦 = 2 × 1.5 = 3. So, if 𝑦(𝑥) is a solution and 𝑦(2) = 1.5, then the
equation mandates that 𝑦 0(2) = 3. See Figure 1.2.
-3
-2
-1
0
1
2
3
3
3
2
2
1
1
0
0
-1
-1
-2
-2
-3
-3
-3
-2
-1
0
1
2
3
Figure 1.2: The slope 𝑦 0 = 𝑥 𝑦 at (2, 1.5).
To get an idea of how solutions behave, we draw such lines at lots of points in the plane,
not just the point (2, 1.5). We would ideally want to see the slope at every point, but that is
just not possible. Usually we pick a grid of points fine enough so that it shows the behavior,
but not too fine so that we can still recognize the individual lines. We call this picture the
slope field of the equation. See Figure 1.3 on the following page for the slope field of the
equation 𝑦 0 = 𝑥𝑦. Usually in practice, one does not do this by hand, but has a computer do
the drawing.
28
CHAPTER 1. FIRST ORDER EQUATIONS
Suppose we are given a specific initial condition 𝑦(𝑥0 ) = 𝑦0 . A solution, that is, the
graph of the solution, would be a curve that follows the slopes we drew. For a few sample
solutions, see Figure 1.4. It is easy to roughly sketch (or at least imagine) possible solutions
in the slope field, just from looking at the slope field itself. You simply sketch a line that
roughly fits the little line segments and goes through your initial condition.
-3
-2
-1
0
1
2
3
-3
-2
-1
0
1
2
3
3
3
3
3
2
2
2
2
1
1
1
1
0
0
0
0
-1
-1
-1
-1
-2
-2
-2
-2
-3
-3
-3
-3
-2
-1
0
1
2
3
Figure 1.3: Slope field of 𝑦 0 = 𝑥𝑦.
-3
-3
-2
-1
0
1
2
3
Figure 1.4: Slope field of 𝑦 0 = 𝑥 𝑦 with a graph
of solutions satisfying 𝑦(0) = 0.2, 𝑦(0) = 0, and
𝑦(0) = −0.2.
By looking at the slope field we get a lot of information about the behavior of solutions
without having to solve the equation. For example, in Figure 1.4 we see what the solutions
do when the initial conditions are 𝑦(0) > 0, 𝑦(0) = 0 and 𝑦(0) < 0. A small change in the initial condition causes quite different behavior. We see this behavior just from the slope field and imagining what solutions ought to do. We see a different behavior for the equation 𝑦 0 = −𝑦. The slope field and a few solutions is in see Figure 1.5 on the next page. If we think of moving from left to right (perhaps 𝑥 is time and time is usually increasing), then we see that no matter what 𝑦(0) is, all solutions tend to zero as 𝑥 tends to infinity. Again that behavior is clear from simply looking at the slope field itself. 1.2.2 Existence and uniqueness We wish to ask two fundamental questions about the problem 𝑦 0 = 𝑓 (𝑥, 𝑦), (i) Does a solution exist? (ii) Is the solution unique (if it exists)? 𝑦(𝑥0 ) = 𝑦0 . 29 1.2. SLOPE FIELDS -3 -2 -1 0 1 2 3 3 3 2 2 1 1 0 0 -1 -1 -2 -2 -3 -3 -3 -2 -1 0 1 2 3 Figure 1.5: Slope field of 𝑦 0 = −𝑦 with a graph of a few solutions. What do you think is the answer? The answer seems to be yes to both does it not? Well, pretty much. But there are cases when the answer to either question can be no. Since generally the equations we encounter in applications come from real life situations, it seems logical that a solution always exists. It also has to be unique if we believe our universe is deterministic. If the solution does not exist, or if it is not unique, we have probably not devised the correct model. Hence, it is good to know when things go wrong and why. Example 1.2.1: Attempt to solve: 𝑦0 = 1 , 𝑥 𝑦(0) = 0. Integrate to find the general solution 𝑦 = ln |𝑥| + 𝐶. The solution does not exist at 𝑥 = 0. See Figure 1.6 on the following page. The equation may have been written as the seemingly harmless 𝑥𝑦 0 = 1. Example 1.2.2: Solve: 0 q 𝑦 = 2 |𝑦|, 𝑦(0) = 0. See Figure 1.7 on the next page. Note that 𝑦 = 0 is a solution. But another solution is the function ( 𝑥2 if 𝑥 ≥ 0, 𝑦(𝑥) = 2 −𝑥 if 𝑥 < 0. It is hard to tell by staring at the slope field that the solution is not unique. Is there any hope? Of course there is. We have the following theorem, known as Picard’s theorem∗ . ∗ Named after the French mathematician Charles Émile Picard (1856–1941) 30 CHAPTER 1. FIRST ORDER EQUATIONS -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 3 3 3 3 2 2 2 2 1 1 1 1 0 0 0 0 -1 -1 -1 -1 -2 -2 -2 -2 -3 -3 -3 -3 -2 -1 0 1 2 3 -3 -3 Figure 1.6: Slope field of 𝑦 0 = 1/𝑥 . -2 -1 0 1 2 3 Figure 1.7: Slope field of 𝑦 0 = 2 |𝑦| with two solutions satisfying 𝑦(0) = 0. p Theorem 1.2.1 (Picard’s theorem on existence and uniqueness). If 𝑓 (𝑥, 𝑦) is continuous (as a 𝜕𝑓 function of two variables) and 𝜕𝑦 exists and is continuous near some (𝑥0 , 𝑦0 ), then a solution to 𝑦 0 = 𝑓 (𝑥, 𝑦), 𝑦(𝑥0 ) = 𝑦0 , exists (at least for some small interval of 𝑥’s) and is unique. Note that the problems 𝑦 0 = 1/𝑥 , 𝑦(0) = 0 and 𝑦 0 = 2 |𝑦|, 𝑦(0) = 0 do not satisfy the hypothesis of the theorem. Even if we can use the theorem, we ought to be careful about this existence business. It is quite possible that the solution only exists for a short while. p Example 1.2.3: For some constant 𝐴, solve: 𝑦0 = 𝑦 2 , 𝑦(0) = 𝐴. We know how to solve this equation. First assume that 𝐴 ≠ 0, so 𝑦 is not equal to zero at 1 least for some 𝑥 near 0. So 𝑥 0 = 1/𝑦 2 , so 𝑥 = −1/𝑦 + 𝐶, so 𝑦 = 𝐶−𝑥 . If 𝑦(0) = 𝐴, then 𝐶 = 1/𝐴 so 𝑦= 1 . 1/𝐴 − 𝑥 If 𝐴 = 0, then 𝑦 = 0 is a solution. For example, when 𝐴 = 1 the solution “blows up” at 𝑥 = 1. Hence, the solution does not exist for all 𝑥 even if the equation is nice everywhere. The equation 𝑦 0 = 𝑦 2 certainly looks nice. For most of this course we will be interested in equations where existence and uniqueness holds, and in fact holds “globally” unlike for the equation 𝑦 0 = 𝑦 2 . 31 1.2. SLOPE FIELDS 1.2.3 Exercises Exercise 1.2.1: Sketch slope field for 𝑦 0 = 𝑒 𝑥−𝑦 . How do the solutions behave as 𝑥 grows? Can you guess a particular solution by looking at the slope field? Exercise 1.2.2: Sketch slope field for 𝑦 0 = 𝑥 2 . Exercise 1.2.3: Sketch slope field for 𝑦 0 = 𝑦 2 . Exercise 1.2.4: Is it possible to solve the equation 𝑦 0 = 𝑥𝑦 cos 𝑥 for 𝑦(0) = 1? Justify. p Exercise 1.2.5: Is it possible to solve the equation 𝑦 0 = 𝑦 |𝑥| for 𝑦(0) = 0? Is the solution unique? Justify. Exercise 1.2.6: Match equations 𝑦 0 = 1 − 𝑥, 𝑦 0 = 𝑥 − 2𝑦, 𝑦 0 = 𝑥(1 − 𝑦) to slope fields. Justify. a) b) c) Exercise 1.2.7 (challenging): Take 𝑦 0 = 𝑓 (𝑥, 𝑦), 𝑦(0) = 0, where 𝑓 (𝑥, 𝑦) > 1 for all 𝑥 and 𝑦.
If the solution exists for all 𝑥, can you say what happens to 𝑦(𝑥) as 𝑥 goes to positive infinity?
Explain.
Exercise 1.2.8 (challenging): Take (𝑦 − 𝑥)𝑦 0 = 0, 𝑦(0) = 0.
a) Find two distinct solutions.
b) Explain why this does not violate Picard’s theorem.
Exercise 1.2.9: Suppose 𝑦 0 = 𝑓 (𝑥, 𝑦). What will the slope field look like, explain and sketch an
example, if you know the following about 𝑓 (𝑥, 𝑦):
a) 𝑓 does not depend on 𝑦.
b) 𝑓 does not depend on 𝑥.
c) 𝑓 (𝑡, 𝑡) = 0 for any number 𝑡.
d) 𝑓 (𝑥, 0) = 0 and 𝑓 (𝑥, 1) = 1 for all 𝑥.
Exercise 1.2.10: Find a solution to 𝑦 0 = |𝑦|, 𝑦(0) = 0. Does Picard’s theorem apply?
Exercise 1.2.11: Take an equation 𝑦 0 = (𝑦 − 2𝑥)𝑔(𝑥, 𝑦) + 2 for some function 𝑔(𝑥, 𝑦). Can you
solve the problem for the initial condition 𝑦(0) = 0, and if so what is the solution?
32
CHAPTER 1. FIRST ORDER EQUATIONS
Exercise 1.2.12 (challenging): Suppose 𝑦 0 = 𝑓 (𝑥, 𝑦) is such that 𝑓 (𝑥, 1) = 0 for every 𝑥, 𝑓 is
𝜕𝑓
continuous and 𝜕𝑦 exists and is continuous for every 𝑥 and 𝑦.
a) Guess a solution given the initial condition 𝑦(0) = 1.
b) Can graphs of two solutions of the equation for different initial conditions ever intersect?
c) Given 𝑦(0) = 0, what can you say about the solution. In particular, can 𝑦(𝑥) > 1 for any 𝑥?
Can 𝑦(𝑥) = 1 for any 𝑥? Why or why not?
Exercise 1.2.101: Sketch the slope field of 𝑦 0 = 𝑦 3 . Can you visually find the solution that satisfies
𝑦(0) = 0?
Exercise 1.2.102: Is it possible to solve 𝑦 0 = 𝑥𝑦 for 𝑦(0) = 0? Is the solution unique?
Exercise 1.2.103: Is it possible to solve 𝑦 0 =
𝑥
𝑥 2 −1
for 𝑦(1) = 0?
Exercise 1.2.104: Match equations 𝑦 0 = sin 𝑥, 𝑦 0 = cos 𝑦, 𝑦 0 = 𝑦 cos(𝑥) to slope fields. Justify.
a)
b)
c)
Exercise 1.2.105 (tricky): Suppose
(
𝑓 (𝑦) =
0
if 𝑦 > 0,
1
if 𝑦 ≤ 0.
Does 𝑦 0 = 𝑓 (𝑦), 𝑦(0) = 0 have a continuously differentiable solution? Does Picard apply? Why, or
why not?
Exercise 1.2.106: Consider an equation of the form 𝑦 0 = 𝑓 (𝑥) for some continuous function 𝑓 , and
an initial condition 𝑦(𝑥0 ) = 𝑦0 . Does a solution exist for all 𝑥? Why or why not?
33
1.3. SEPARABLE EQUATIONS
1.3
Separable equations
Note: 1 lecture, §1.4 in [EP], §2.2 in [BD]
0
∫ When a differential equation is of the form 𝑦 = 𝑓 (𝑥), we can just integrate: 𝑦 =
𝑓 (𝑥) 𝑑𝑥 + 𝐶. Unfortunately this method no longer works for the general form of the
equation 𝑦 0 = 𝑓 (𝑥, 𝑦). Integrating both sides yields
∫
𝑦=
𝑓 (𝑥, 𝑦) 𝑑𝑥 + 𝐶.
Notice the dependence on 𝑦 in the integral.
1.3.1
Separable equations
We say a differential equation is separable if we can write it as
𝑦 0 = 𝑓 (𝑥)𝑔(𝑦),
for some functions 𝑓 (𝑥) and 𝑔(𝑦). Let us write the equation in the Leibniz notation
𝑑𝑦
= 𝑓 (𝑥)𝑔(𝑦).
𝑑𝑥
Then we rewrite the equation as
𝑑𝑦
= 𝑓 (𝑥) 𝑑𝑥.
𝑔(𝑦)
Both sides look like something we can integrate. We obtain
∫
𝑑𝑦
=
𝑔(𝑦)
∫
𝑓 (𝑥) 𝑑𝑥 + 𝐶.
If we can find closed form expressions for these two integrals, we can, perhaps, solve for 𝑦.
Example 1.3.1: Take the equation
𝑦 0 = 𝑥𝑦.
Note that 𝑦 = 0 is a solution. We will remember that fact and assume 𝑦 ≠ 0 from now on,
𝑑𝑦
so that we can divide by 𝑦. Write the equation as 𝑑𝑥 = 𝑥𝑦. Then
∫
𝑑𝑦
=
𝑦
∫
𝑥 𝑑𝑥 + 𝐶.
We compute the antiderivatives to get
ln |𝑦| =
𝑥2
+ 𝐶,
2
34
CHAPTER 1. FIRST ORDER EQUATIONS
or
|𝑦| = 𝑒
𝑥2
2 +𝐶
𝑥2
𝑥2
= 𝑒 2 𝑒 𝐶 = 𝐷𝑒 2 ,
where 𝐷 > 0 is some constant. Because 𝑦 = 0 is also a solution and because of the absolute
value we can write:
𝑥2
𝑦 = 𝐷𝑒 2 ,
for any number 𝐷 (including zero or negative).
We check:
𝑥2
𝑥2
𝑦 0 = 𝐷𝑥𝑒 2 = 𝑥 𝐷𝑒 2 = 𝑥𝑦.
Yay!
We should be a little bit more careful with this method. You may be worried that we
integrated in two different variables. We seemingly did a different operation to each side.
Let us work through this method more rigorously. Take
𝑑𝑦
= 𝑓 (𝑥)𝑔(𝑦).
𝑑𝑥
We rewrite the equation as follows. Note that 𝑦 = 𝑦(𝑥) is a function of 𝑥 and so is
𝑑𝑦
𝑑𝑥 !
1 𝑑𝑦
= 𝑓 (𝑥).
𝑔(𝑦) 𝑑𝑥
We integrate both sides with respect to 𝑥:
1 𝑑𝑦
𝑑𝑥 =
𝑔(𝑦) 𝑑𝑥
∫
∫
𝑓 (𝑥) 𝑑𝑥 + 𝐶.
We use the change of variables formula (substitution) on the left hand side:
∫
1
𝑑𝑦 =
𝑔(𝑦)
∫
𝑓 (𝑥) 𝑑𝑥 + 𝐶.
And we are done.
1.3.2
Implicit solutions
We sometimes get stuck even if we can do the integration. Consider the separable equation
𝑦0 =
𝑥𝑦
.
+1
𝑦2
We separate variables,
𝑦2 + 1
1
𝑑𝑦 = 𝑦 +
𝑦
𝑦

𝑑𝑦 = 𝑥 𝑑𝑥.
35
1.3. SEPARABLE EQUATIONS
We integrate to get
𝑦2
𝑥2
+ ln |𝑦| =
+ 𝐶,
2
2
or perhaps the easier looking expression (where 𝐷 = 2𝐶)
𝑦 2 + 2 ln |𝑦| = 𝑥 2 + 𝐷.
It is not easy to find the solution explicitly as it is hard to solve for 𝑦. We, therefore, leave
the solution in this form and call it an implicit solution. It is still easy to check that an implicit
solution satisfies the differential equation. In this case, we differentiate with respect to 𝑥,
and remember that 𝑦 is a function of 𝑥, to get

2
𝑦 0 2𝑦 +
= 2𝑥.
𝑦
Multiply both sides by 𝑦 and divide by 2(𝑦 2 + 1) and you will get exactly the differential
equation. We leave this computation to the reader.
If you have an implicit solution, and you want to compute values for 𝑦, you might
have to be tricky. You might get multiple solutions 𝑦 for each 𝑥, so you have to pick one.
Sometimes you can graph 𝑥 as a function of 𝑦, and then flip your paper. Sometimes you
have to do more.
Computers are also good at some of these tricks. More advanced mathematical software
usually has some way of plotting solutions to implicit equations. For example, for 𝐶 = 0 if
you plot all the points (𝑥, 𝑦) that are solutions to 𝑦 2 + 2 ln |𝑦| = 𝑥 2 , you find the two curves
in Figure 1.8 on the following page. This is not quite a graph of a function. For each 𝑥 there
are two choices of 𝑦. To find a function you would have to pick one of these two curves.
You pick the one that satisfies your initial condition if you have one. For example, the top
curve satisfies the condition 𝑦(1) = 1. So for each 𝐶 we really got two solutions. As you can
see, computing values from an implicit solution can be somewhat tricky. But sometimes,
an implicit solution is the best we can do.
The equation above also has the solution 𝑦 = 0. So the general solution is
𝑦 2 + 2 ln |𝑦| = 𝑥 2 + 𝐶,
and
𝑦 = 0.
These outlying solutions such as 𝑦 = 0 are sometimes called singular solutions.
1.3.3
Examples of separable equations
Example 1.3.2: Solve 𝑥 2 𝑦 0 = 1 − 𝑥 2 + 𝑦 2 − 𝑥 2 𝑦 2 , 𝑦(1) = 0.
Factor the right-hand side
𝑥 2 𝑦 0 = (1 − 𝑥 2 )(1 + 𝑦 2 ).
36
CHAPTER 1. FIRST ORDER EQUATIONS
-5.0
5.0
-2.5
0.0
2.5
5.0
5.0
2.5
2.5
0.0
0.0
-2.5
-2.5
-5.0
-5.0
-5.0
-2.5
0.0
2.5
5.0
Figure 1.8: The implicit solution 𝑦 2 + 2 ln |𝑦| = 𝑥 2 to 𝑦 0 =
𝑥𝑦
.
𝑦 2 +1
Separate variables, integrate, and solve for 𝑦:
𝑦0
1 − 𝑥2
=
,
1 + 𝑦2
𝑥2
𝑦0
1
= 2 − 1,
2
1+𝑦
𝑥
−1
− 𝑥 + 𝐶,
arctan(𝑦) =
𝑥

−1
𝑦 = tan
−𝑥+𝐶 .
𝑥
Solve for the initial condition, 0 = tan(−2 + 𝐶) to get 𝐶 = 2 (or 𝐶 = 2 + 𝜋, or 𝐶 = 2 + 2𝜋,
etc.). The particular solution we seek is, therefore,

−1
𝑦 = tan
−𝑥+2 .
𝑥
Example 1.3.3: Bob made a cup of coffee, and Bob likes to drink coffee only once reaches
60 degrees Celsius and will not burn him. Initially at time 𝑡 = 0 minutes, Bob measured the
temperature and the coffee was 89 degrees Celsius. One minute later, Bob measured the
coffee again and it had 85 degrees. The temperature of the room (the ambient temperature)
is 22 degrees. When should Bob start drinking?
Let 𝑇 be the temperature of the coffee in degrees Celsius, and let 𝐴 be the ambient
(room) temperature, also in degrees Celsius. Newton’s law of cooling states that the rate at
which the temperature of the coffee is changing is proportional to the difference between
the ambient temperature and the temperature of the coffee. That is,
𝑑𝑇
= 𝑘(𝐴 − 𝑇),
𝑑𝑡
37
1.3. SEPARABLE EQUATIONS
for some constant 𝑘. For our setup 𝐴 = 22, 𝑇(0) = 89, 𝑇(1) = 85. We separate variables and
integrate (let 𝐶 and 𝐷 denote arbitrary constants):
1 𝑑𝑇
= −𝑘,
𝑇 − 𝐴 𝑑𝑡
ln(𝑇 − 𝐴) = −𝑘𝑡 + 𝐶,
(note that 𝑇 − 𝐴 > 0)
𝑇 − 𝐴 = 𝐷 𝑒 −𝑘𝑡 ,
𝑇 = 𝐴 + 𝐷 𝑒 −𝑘𝑡 .
That is, 𝑇 = 22 + 𝐷 𝑒 −𝑘𝑡 . We plug in the first condition: 89 = 𝑇(0) = 22 + 𝐷, and hence
𝐷 = 67. So 𝑇 = 22 + 67 𝑒 −𝑘𝑡 . The second condition says 85 = 𝑇(1) = 22 + 67 𝑒 −𝑘 . Solving for
𝑘 we get 𝑘 = − ln 85−22
67 ≈ 0.0616. Now we solve for the time 𝑡 that gives us a temperature of
60 degrees. Namely, we solve
60 = 22 + 67𝑒 −0.0616𝑡
ln
60−22
67
to get 𝑡 = − 0.0616
≈ 9.21 minutes. So Bob can begin to drink the coffee at just over 9
minutes from the time Bob made it. That is probably about the amount of time it took us
to calculate how long it would take. See Figure 1.9.
0.0
2.5
5.0
7.5
10.0
90
80
12.5
90
0
20
40
60
80
80
80
60
60
40
40
80
70
70
60
60
20
0.0
2.5
5.0
7.5
10.0
12.5
20
0
20
40
60
80
Figure 1.9: Graphs of the coffee temperature function 𝑇(𝑡). On the left, horizontal lines are drawn at
temperatures 60, 85, and 89. Vertical lines are drawn at 𝑡 = 1 and 𝑡 = 9.21. Notice that the temperature
of the coffee hits 85 at 𝑡 = 1, and 60 at 𝑡 ≈ 9.21. On the right, the graph is over a longer period of time,
with a horizontal line at the ambient temperature 22.
−𝑥 𝑦 2
Example 1.3.4: Find the general solution to 𝑦 0 = 3 (including singular solutions).
First note that 𝑦 = 0 is a solution (a singular solution). Now assume that 𝑦 ≠ 0.
−3 0
𝑦 = 𝑥,
𝑦2
3
𝑥2
=
+ 𝐶,
𝑦
2
38
CHAPTER 1. FIRST ORDER EQUATIONS
𝑦=
3
6
= 2
.
𝑥 + 2𝐶
/2 + 𝐶
𝑥2
So the general solution is,
𝑦=
1.3.4
𝑥2
6
,
+ 2𝐶
𝑦 = 0.
and
Exercises
Exercise 1.3.1: Solve 𝑦 0 = 𝑥/𝑦 .
Exercise 1.3.2: Solve 𝑦 0 = 𝑥 2 𝑦.
Exercise 1.3.3: Solve
𝑑𝑥
= (𝑥 2 − 1) 𝑡, for 𝑥(0) = 0.
𝑑𝑡
Exercise 1.3.4: Solve
𝑑𝑥
= 𝑥 sin(𝑡), for 𝑥(0) = 1.
𝑑𝑡
Exercise 1.3.5: Solve
𝑑𝑦
= 𝑥𝑦 + 𝑥 + 𝑦 + 1. Hint: Factor the right-hand side.
𝑑𝑥
Exercise 1.3.6: Solve 𝑥𝑦 0 = 𝑦 + 2𝑥 2 𝑦, where 𝑦(1) = 1.
Exercise 1.3.7: Solve
𝑑𝑦
𝑦2 + 1
, for 𝑦(0) = 1.
= 2
𝑑𝑥
𝑥 +1
Exercise 1.3.8: Find an implicit solution for
𝑑𝑦
𝑥2 + 1
= 2
, for 𝑦(0) = 1.
𝑑𝑥
𝑦 +1
Exercise 1.3.9: Find an explicit solution for 𝑦 0 = 𝑥𝑒 −𝑦 , 𝑦(0) = 1.
Exercise 1.3.10: Find an explicit solution for 𝑥𝑦 0 = 𝑒 −𝑦 , for 𝑦(1) = 1.
2
Exercise 1.3.11: Find an explicit solution for 𝑦 0 = 𝑦𝑒 −𝑥 , 𝑦(0) = 1. It is alright to leave a definite
integral in your answer.
Exercise 1.3.12: Suppose a cup of coffee is at 100 degrees Celsius at time 𝑡 = 0, it is at 70 degrees
at 𝑡 = 10 minutes, and it is at 50 degrees at 𝑡 = 20 minutes. Compute the ambient temperature.
Exercise 1.3.101: Solve 𝑦 0 = 2𝑥𝑦.
Exercise 1.3.102: Solve 𝑥 0 = 3𝑥𝑡 2 − 3𝑡 2 , 𝑥(0) = 2.
Exercise 1.3.103: Find an implicit solution for 𝑥 0 =
1
,
3𝑥 2 +1
𝑥(0) = 1.
Exercise 1.3.104: Find an explicit solution to 𝑥𝑦 0 = 𝑦 2 , 𝑦(1) = 1.
Exercise 1.3.105: Find an implicit solution to 𝑦 0 =
sin(𝑥)
.
cos(𝑦)
39
1.3. SEPARABLE EQUATIONS
Exercise 1.3.106: Take Example 1.3.3 with the same numbers: 89 degrees at 𝑡 = 0, 85 degrees at
𝑡 = 1, and ambient temperature of 22 degrees. Suppose these temperatures were measured with
precision of ±0.5 degrees. Given this imprecision, the time it takes the coffee to cool to (exactly) 60
degrees is also only known in a certain range. Find this range. Hint: Think about what kind of
error makes the cooling time longer and what shorter.
Exercise 1.3.107: A population 𝑥 of rabbits on an island is modeled by 𝑥 0 = 𝑥 − 1/1000 𝑥 2 , where
the independent variable is time in months. At time 𝑡 = 0, there are 40 rabbits on the island.

a) Find the solution to the equation with the initial condition.
b) How many rabbits are on the island in 1 month, 5 months, 10 months, 15 months (round to
the nearest integer).
40
1.4
CHAPTER 1. FIRST ORDER EQUATIONS
Linear equations and the integrating factor
Note: 1 lecture, §1.5 in [EP], §2.1 in [BD]
One of the most important types of equations we will learn how to solve are the so-called
linear equations. In fact, the majority of the course is about linear equations. In this section
we focus on the first order linear equation. A first order equation is linear if we can put it into
the form:
𝑦 0 + 𝑝(𝑥)𝑦 = 𝑓 (𝑥).
(1.3)
The word “linear” means linear in 𝑦 and 𝑦 0; no higher powers nor functions of 𝑦 or 𝑦 0
appear. The dependence on 𝑥 can be more complicated.
Solutions of linear equations have nice properties. For example, the solution exists
wherever 𝑝(𝑥) and 𝑓 (𝑥) are defined, and has the same regularity (read: it is just as nice).
But most importantly for us right now, there is a method for solving linear first order
equations.
The trick is to rewrite the left-hand side of (1.3) as a derivative of a product of 𝑦 with
another function. To this end we find a function 𝑟(𝑥) such that
𝑟(𝑥)𝑦 0 + 𝑟(𝑥)𝑝(𝑥)𝑦 =
i
𝑑 h
𝑟(𝑥)𝑦 .
𝑑𝑥
This is the left-hand side of (1.3) multiplied by 𝑟(𝑥). So if we multiply (1.3) by 𝑟(𝑥), we
obtain
i
𝑑 h
𝑟(𝑥)𝑦 = 𝑟(𝑥) 𝑓 (𝑥).
𝑑𝑥
Now we integrate both sides. The right-hand side does not depend on 𝑦 and the left-hand
side is written as a derivative of a function. Afterwards, we solve for 𝑦. The function 𝑟(𝑥)
is called the integrating factor and the method is called the integrating factor method.
We are looking for a function 𝑟(𝑥), such that if we differentiate it, we get the same
function back multiplied by 𝑝(𝑥). That seems like a job for the exponential function! Let
𝑟(𝑥) = 𝑒
∫
𝑝(𝑥) 𝑑𝑥
.
We compute:
𝑦 0 + 𝑝(𝑥)𝑦 = 𝑓 (𝑥),
𝑒
∫
𝑝(𝑥) 𝑑𝑥 0
∫
∫
𝑦 + 𝑒 𝑝(𝑥) 𝑑𝑥 𝑝(𝑥)𝑦 = 𝑒
∫
𝑑 h ∫ 𝑝(𝑥) 𝑑𝑥 i
𝑒
𝑦 =𝑒
𝑑𝑥
∫
𝑒
∫
𝑝(𝑥) 𝑑𝑥
𝑦=
𝑦=𝑒
−
𝑝(𝑥) 𝑑𝑥
𝑓 (𝑥),
𝑝(𝑥) 𝑑𝑥
𝑓 (𝑥),
𝑒
∫
∫
𝑝(𝑥) 𝑑𝑥
𝑝(𝑥) 𝑑𝑥
𝑓 (𝑥) 𝑑𝑥 + 𝐶,
∫
𝑒
∫
𝑝(𝑥) 𝑑𝑥

𝑓 (𝑥) 𝑑𝑥 + 𝐶 .
41
1.4. LINEAR EQUATIONS AND THE INTEGRATING FACTOR
Of course, to get a closed form formula for 𝑦, we need to be able to find a closed form
formula for the integrals appearing above.
Example 1.4.1: Solve
𝑦 0 + 2𝑥𝑦 = 𝑒 𝑥−𝑥 ,
2
𝑦(0) = −1.
2
𝑒 𝑥−𝑥 .
First note that 𝑝(𝑥) = 2𝑥 and 𝑓 (𝑥) =
The integrating factor is 𝑟(𝑥) = 𝑒
We multiply both sides of the equation by 𝑟(𝑥) to get
∫
𝑝(𝑥) 𝑑𝑥
= 𝑒𝑥 .
2
𝑒 𝑥 𝑦 0 + 2𝑥𝑒 𝑥 𝑦 = 𝑒 𝑥−𝑥 𝑒 𝑥 ,
𝑑 h 𝑥2 i
𝑒 𝑦 = 𝑒𝑥.
𝑑𝑥
2
2
2
2
We integrate
𝑒 𝑥 𝑦 = 𝑒 𝑥 + 𝐶,
2
𝑦 = 𝑒 𝑥−𝑥 + 𝐶𝑒 −𝑥 .
2
2
Next, we solve for the initial condition −1 = 𝑦(0) = 1 + 𝐶, so 𝐶 = −2. The solution is
𝑦 = 𝑒 𝑥−𝑥 − 2𝑒 −𝑥 .
2
2
∫
Note that we do not care which antiderivative we take when computing 𝑒 𝑝(𝑥)𝑑𝑥 . You
can always add a constant of integration, but those constants will not matter in the end.
Exercise 1.4.1: Try it! Add a constant of integration to the integral in the integrating factor and
show that the solution you get in the end is the same as what we got above.
Advice: Do not try to remember the formula itself, that is way too hard. It is easier to
remember the process and repeat it.
Since we cannot always evaluate the integrals in closed form, it is useful to know how
to write the solution in definite integral form. A definite integral is something that you can
plug into a computer or a calculator. Suppose we are given
𝑦 0 + 𝑝(𝑥)𝑦 = 𝑓 (𝑥),
𝑦(𝑥 0 ) = 𝑦0 .
Look at the solution and write the integrals as definite integrals.
𝑦(𝑥) = 𝑒
−
∫𝑥
𝑥0
𝑝(𝑠) 𝑑𝑠
∫
𝑥
𝑒
∫𝑡
𝑥0
𝑝(𝑠) 𝑑𝑠
𝑥0

𝑓 (𝑡) 𝑑𝑡 + 𝑦0 .
(1.4)
You should be careful to properly use dummy variables here. If you now plug such a
formula into a computer or a calculator, it will be happy to give you numerical answers.
Exercise 1.4.2: Check that 𝑦(𝑥0 ) = 𝑦0 in formula (1.4).
42
CHAPTER 1. FIRST ORDER EQUATIONS
Exercise 1.4.3: Write the solution of the following problem as a definite integral, but try to simplify
as far as you can. You will not be able to find the solution in closed form.
𝑦0 + 𝑦 = 𝑒 𝑥
2 −𝑥
,
𝑦(0) = 10.
Remark 1.4.1: Before we move on, we should note some interesting properties of linear
equations. First, for the linear initial value problem 𝑦 0 + 𝑝(𝑥)𝑦 = 𝑓 (𝑥), 𝑦(𝑥 0 ) = 𝑦0 , there is
always an explicit formula (1.4) for the solution. Second, it follows from the formula (1.4)
that if 𝑝(𝑥) and 𝑓 (𝑥) are continuous on some interval (𝑎, 𝑏), then the solution 𝑦(𝑥) exists
and is differentiable on (𝑎, 𝑏). Compare with the simple nonlinear example we have seen
previously, 𝑦 0 = 𝑦 2 , and compare to Theorem 1.2.1.
Example 1.4.2: Let us discuss a common simple application of linear equations. This type
of problem is used often in real life. For example, linear equations are used in figuring out
the concentration of chemicals in bodies of water (rivers and lakes).
A 100 liter tank contains 10 kilograms of salt dissolved in 60
5 L/min, 0.1 kg/L
liters of water. Solution of water and salt (brine) with concentration
of 0.1 kilograms per liter is flowing in at the rate of 5 liters a minute.
The solution in the tank is well stirred and flows out at a rate of 3
liters a minute. How much salt is in the tank when the tank is full?
Let us come up with the equation. Let 𝑥 denote the kilograms
60 L
of salt in the tank, let 𝑡 denote the time in minutes. For a small
10 kg salt
change Δ𝑡 in time, the change in 𝑥 (denoted Δ𝑥) is approximately
3 L/min
Δ𝑥 ≈ (rate in × concentration in)Δ𝑡 − (rate out × concentration out)Δ𝑡.
Dividing through by Δ𝑡 and taking the limit Δ𝑡 → 0 we see that
𝑑𝑥
= (rate in × concentration in) − (rate out × concentration out).
𝑑𝑡
In our example, we have
rate in = 5,
concentration in = 0.1,
rate out = 3,
concentration out =
𝑥
𝑥
=
.
volume 60 + (5 − 3)𝑡
Our equation is, therefore,

𝑥
𝑑𝑥
= (5 × 0.1) − 3
.
𝑑𝑡
60 + 2𝑡
Or in the form (1.3)
𝑑𝑥
3
+
𝑥 = 0.5.
𝑑𝑡 60 + 2𝑡
43
1.4. LINEAR EQUATIONS AND THE INTEGRATING FACTOR
Let us solve. The integrating factor is
𝑟(𝑡) = exp
∫

3
3
𝑑𝑡 = exp
ln(60 + 2𝑡) = (60 + 2𝑡)3/2 .
60 + 2𝑡
2
We multiply both sides of the equation to get
(60 + 2𝑡)3/2
3
𝑑𝑥
+ (60 + 2𝑡)3/2
𝑥 = 0.5(60 + 2𝑡)3/2 ,
𝑑𝑡
60 + 2𝑡
i
𝑑 h
(60 + 2𝑡)3/2 𝑥 = 0.5(60 + 2𝑡)3/2 ,
𝑑𝑡
∫
(60 + 2𝑡)3/2 𝑥 =
0.5(60 + 2𝑡)3/2 𝑑𝑡 + 𝐶,
−3/2
𝑥 = (60 + 2𝑡)
𝑥 = (60 + 2𝑡)−3/2
𝑥=
(60 + 2𝑡)3/2
𝑑𝑡 + 𝐶(60 + 2𝑡)−3/2 ,
2
1
(60 + 2𝑡)5/2 + 𝐶(60 + 2𝑡)−3/2 ,
10
60 + 2𝑡
+ 𝐶(60 + 2𝑡)−3/2 .
10
We need to find 𝐶. We know that at
𝑡 = 0, 𝑥 = 10. So
10 = 𝑥(0) =
∫
60
+ 𝐶(60)−3/2 = 6 + 𝐶(60)−3/2 ,
10
or
𝐶 = 4(603/2 ) ≈ 1859.03.
We are interested in 𝑥 when the tank is
full. The tank is full when 60 + 2𝑡 = 100, or
when 𝑡 = 20. So
0
5
10
15
20
11.5
11.5
11.0
11.0
10.5
10.5
10.0
60 + 40
𝑥(20) =
+ 𝐶(60 + 40)−3/2
10
≈ 10 + 1859.03(100)−3/2 ≈ 11.86.
10.0
0
5
10
15
20
Figure 1.10: Graph of the solution 𝑥 kilograms of
salt in the tank at time 𝑡.
See Figure 1.10 for the graph of 𝑥 over 𝑡.
The concentration when the tank is full is approximately 0.1186 kg/liter, and we started
with 1/6 or 0.167 kg/liter.
1.4.1
Exercises
In the exercises, feel free to leave answer as a definite integral if a closed form solution
cannot be found. If you can find a closed form solution, you should give that.
Exercise 1.4.4: Solve 𝑦 0 + 𝑥𝑦 = 𝑥.
44
CHAPTER 1. FIRST ORDER EQUATIONS
Exercise 1.4.5: Solve 𝑦 0 + 6𝑦 = 𝑒 𝑥 .
3
Exercise 1.4.6: Solve 𝑦 0 + 3𝑥 2 𝑦 = sin(𝑥) 𝑒 −𝑥 , with 𝑦(0) = 1.
Exercise 1.4.7: Solve 𝑦 0 + cos(𝑥)𝑦 = cos(𝑥).
Exercise 1.4.8: Solve
1
𝑥 2 +1
𝑦 0 + 𝑥𝑦 = 3, with 𝑦(0) = 0.
Exercise 1.4.9: Suppose there are two lakes located on a stream. Clean water flows into the first
lake, then the water from the first lake flows into the second lake, and then water from the second
lake flows further downstream. The in and out flow from each lake is 500 liters per hour. The first
lake contains 100 thousand liters of water and the second lake contains 200 thousand liters of water.
A truck with 500 kg of toxic substance crashes into the first lake. Assume that the water is being
continually mixed perfectly by the stream.
a) Find the concentration of toxic substance as a function of time in both lakes.
b) When will the concentration in the first lake be below 0.001 kg per liter?
c) When will the concentration in the second lake be maximal?
Exercise 1.4.10: Newton’s law of cooling states that 𝑑𝑥
𝑑𝑡 = −𝑘(𝑥 − 𝐴) where 𝑥 is the temperature, 𝑡
is time, 𝐴 is the ambient temperature, and 𝑘 > 0 is a constant. Suppose that 𝐴 = 𝐴0 cos(𝜔𝑡) for
some constants 𝐴0 and 𝜔. That is, the ambient temperature oscillates (for example night and day
temperatures).
a) Find the general solution.
b) In the long term, will the initial conditions make much of a difference? Why or why not?
Exercise 1.4.11: Initially 5 grams of salt are dissolved in 20 liters of water. Brine with concentration
of salt 2 grams of salt per liter is added at a rate of 3 liters a minute. The tank is mixed well and is
drained at 3 liters a minute. How long does the process have to continue until there are 20 grams of
salt in the tank?
Exercise 1.4.12: Initially a tank contains 10 liters of pure water. Brine of unknown (but constant)
concentration of salt is flowing in at 1 liter per minute. The water is mixed well and drained at 1
liter per minute. In 20 minutes there are 15 grams of salt in the tank. What is the concentration of
salt in the incoming brine?
Exercise 1.4.101: Solve 𝑦 0 + 3𝑥 2 𝑦 = 𝑥 2 .
Exercise 1.4.102: Solve 𝑦 0 + 2 sin(2𝑥)𝑦 = 2 sin(2𝑥), 𝑦(𝜋/2) = 3.
Exercise 1.4.103: Suppose a water tank is being pumped out at 3 L/min. The water tank starts at
10 L of clean water. Water with toxic substance is flowing into the tank at 2 L/min, with concentration
20𝑡 g/L at time 𝑡. When the tank is half empty, how many grams of toxic substance are in the tank
(assuming perfect mixing)?
1.4. LINEAR EQUATIONS AND THE INTEGRATING FACTOR
45
Exercise 1.4.104: Suppose we have bacteria on a plate and suppose that we are slowly adding a toxic
substance such that the rate of growth is slowing down. That is, suppose that 𝑑𝑃
𝑑𝑡 = (2 − 0.1 𝑡)𝑃. If
𝑃(0) = 1000, find the population at 𝑡 = 5.
Exercise 1.4.105: A cylindrical water tank has water flowing in at 𝐼 cubic meters per second. Let
𝐴 be the area of the cross section of the tank in meters. Suppose water is flowing from the bottom of
the tank at a rate proportional to the height of the water level. Set up the differential equation for â„Ž,
the height of the water, introducing and naming constants that you need. You should also give the
units for your constants.
46
1.5
CHAPTER 1. FIRST ORDER EQUATIONS
Substitution
Note: 1 lecture, can safely be skipped, §1.6 in [EP], not in [BD]
Just as when solving integrals, one method to try is to change variables to end up with
a simpler equation to solve.
1.5.1
Substitution
The equation
𝑦 0 = (𝑥 − 𝑦 + 1)2
is neither separable nor linear. What can we do? How about trying to change variables, so
that in the new variables the equation is simpler. We use another variable 𝑣, which we
treat as a function of 𝑥. Let us try
𝑣 = 𝑥 − 𝑦 + 1.
We need to figure out 𝑦 0 in terms of 𝑣 0, 𝑣 and 𝑥. We differentiate (in 𝑥) to obtain 𝑣 0 = 1 − 𝑦 0.
So 𝑦 0 = 1 − 𝑣 0. We plug this into the equation to get
1 − 𝑣0 = 𝑣 2 .
In other words, 𝑣 0 = 1 − 𝑣 2 . Such an equation we know how to solve by separating variables:
1
𝑑𝑣 = 𝑑𝑥.
1 − 𝑣2
So
1
𝑣+1
ln
= 𝑥 + 𝐶,
2
𝑣−1
or
𝑣+1
= 𝑒 2𝑥+2𝐶 ,
𝑣−1
or
𝑣+1
= 𝐷𝑒 2𝑥 ,
𝑣−1
for some constant 𝐷. Note that 𝑣 = 1 and 𝑣 = −1 are also solutions.
Now we need to “unsubstitute” to obtain
𝑥−𝑦+2
= 𝐷𝑒 2𝑥 ,
𝑥−𝑦
and also the two solutions 𝑥 − 𝑦 + 1 = 1 or 𝑦 = 𝑥, and 𝑥 − 𝑦 + 1 = −1 or 𝑦 = 𝑥 + 2. We solve
the first equation for 𝑦.
𝑥 − 𝑦 + 2 = (𝑥 − 𝑦)𝐷𝑒 2𝑥 ,
𝑥 − 𝑦 + 2 = 𝐷𝑥𝑒 2𝑥 − 𝑦𝐷𝑒 2𝑥 ,
−𝑦 + 𝑦𝐷𝑒 2𝑥 = 𝐷𝑥𝑒 2𝑥 − 𝑥 − 2,
𝑦 (−1 + 𝐷𝑒 2𝑥 ) = 𝐷𝑥𝑒 2𝑥 − 𝑥 − 2,
𝑦=
𝐷𝑥𝑒 2𝑥 − 𝑥 − 2
.
𝐷𝑒 2𝑥 − 1
47
1.5. SUBSTITUTION
Note that 𝐷 = 0 gives 𝑦 = 𝑥 + 2, but no value of 𝐷 gives the solution 𝑦 = 𝑥.
Substitution in differential equations is applied in much the same way that it is applied
in calculus. You guess. Several different substitutions might work. There are some general
patterns to look for. We summarize a few of these in a table.
When you see
Try substituting
𝑦𝑦 0
𝑦 2 𝑦0
(cos 𝑦)𝑦 0
(sin 𝑦)𝑦 0
𝑦0 𝑒 𝑦
𝑣
𝑣
𝑣
𝑣
𝑣
= 𝑦2
= 𝑦3
= sin 𝑦
= cos 𝑦
= 𝑒𝑦
Usually you try to substitute in the “most complicated” part of the equation with the
hopes of simplifying it. The table above is just a rule of thumb. You might have to modify
your guesses. If a substitution does not work (it does not make the equation any simpler),
try a different one.
1.5.2
Bernoulli equations
There are some forms of equations where there is a general rule for substitution that always
works. One such example is the so-called Bernoulli equation∗ :
𝑦 0 + 𝑝(𝑥)𝑦 = 𝑞(𝑥)𝑦 𝑛 .
This equation looks a lot like a linear equation except for the 𝑦 𝑛 . If 𝑛 = 0 or 𝑛 = 1, then the
equation is linear and we can solve it. Otherwise, the substitution 𝑣 = 𝑦 1−𝑛 transforms the
Bernoulli equation into a linear equation. Note that 𝑛 need not be an integer.
Example 1.5.1: Solve
𝑥𝑦 0 + 𝑦(𝑥 + 1) + 𝑥𝑦 5 = 0,
𝑦(1) = 1.
First, the equation is Bernoulli (𝑝(𝑥) = (𝑥 + 1)/𝑥 and 𝑞(𝑥) = −1). We substitute
𝑣 = 𝑦 1−5 = 𝑦 −4 ,
𝑣 0 = −4𝑦 −5 𝑦 0 .
In other words, (−1/4) 𝑦 5 𝑣 0 = 𝑦 0. So
𝑥𝑦 0 + 𝑦(𝑥 + 1) + 𝑥𝑦 5 = 0,
−𝑥𝑦 5 0
𝑣 + 𝑦(𝑥 + 1) + 𝑥𝑦 5 = 0,
4
∗ There
are several things called Bernoulli equations, this is just one of them. The Bernoullis were a
prominent Swiss family of mathematicians. These particular equations are named for Jacob Bernoulli
(1654–1705).
48
CHAPTER 1. FIRST ORDER EQUATIONS
−𝑥 0
𝑣 + 𝑦 −4 (𝑥 + 1) + 𝑥 = 0,
4
−𝑥 0
𝑣 + 𝑣(𝑥 + 1) + 𝑥 = 0,
4
and finally
4(𝑥 + 1)
𝑣 = 4.
𝑥
The equation is now linear. We can use the integrating factor method. In particular, we use
formula (1.4). Let us assume that 𝑥 > 0 so |𝑥| = 𝑥. This assumption is OK, as our initial
condition is 𝑥 = 1. Let us compute the integrating factor. Here 𝑝(𝑠) from formula (1.4) is
−4(𝑠+1)
.
𝑠
𝑣0 −
𝑒
𝑒−
∫𝑥
1
∫𝑥
1
𝑝(𝑠) 𝑑𝑠
𝑥
∫
= exp
1
𝑝(𝑠) 𝑑𝑠
−4(𝑠 + 1)
𝑒 −4𝑥+4
−4𝑥−4 ln(𝑥)+4
−4𝑥+4 −4
𝑑𝑠 = 𝑒
=𝑒
𝑥 =
,
𝑠
𝑥4

= 𝑒 4𝑥+4 ln(𝑥)−4 = 𝑒 4𝑥−4 𝑥 4 .
We now plug in to (1.4)
𝑣(𝑥) = 𝑒
=𝑒
−
∫𝑥
1
𝑥
4𝑥−4 4
𝑥
∫
𝑝(𝑠) 𝑑𝑠
∫
1
𝑥
𝑒
∫𝑡
1
𝑝(𝑠) 𝑑𝑠
4 𝑑𝑡 + 1

1
𝑒 −4𝑡+4
4 4 𝑑𝑡 + 1 .
𝑡

The integral in this expression is not possible to find in closed form. As we said before, it is
perfectly fine to have a definite integral in our solution. Now “unsubstitute”
𝑥
∫
𝑦 −4 = 𝑒 4𝑥−4 𝑥 4 4
1
𝑦=

𝑒 −𝑥+1
∫𝑥
𝑥 4
1.5.3
𝑒 −4𝑡+4
𝑑𝑡 + 1 ,
𝑡4
𝑒 −4𝑡+4
𝑡4
1
𝑑𝑡 + 1
1/4 .
Homogeneous equations
Another type of equations we can solve by substitution are the so-called homogeneous
equations. Suppose that we can write the differential equation as
0
𝑦 =𝐹
𝑦
𝑥
.
Here we try the substitutions
𝑣=
𝑦
𝑥
and therefore
𝑦 0 = 𝑣 + 𝑥𝑣 0 .
49
1.5. SUBSTITUTION
We note that the equation is transformed into
𝑣 + 𝑥𝑣 0 = 𝐹(𝑣)
𝑥𝑣 0 = 𝐹(𝑣) − 𝑣
or
or
𝑣0
1
= .
𝑥
𝐹(𝑣) − 𝑣
Hence an implicit solution is
∫
1
𝑑𝑣 = ln |𝑥| + 𝐶.
𝐹(𝑣) − 𝑣
Example 1.5.2: Solve
𝑥 2 𝑦 0 = 𝑦 2 + 𝑥𝑦,
𝑦(1) = 1.
We put the equation into the form 𝑦 0 = ( 𝑦/𝑥 )2 + 𝑦/𝑥 . We substitute 𝑣 = 𝑦/𝑥 to get the
separable equation
𝑥𝑣 0 = 𝑣 2 + 𝑣 − 𝑣 = 𝑣 2 ,
which has a solution
∫
1
𝑑𝑣 = ln |𝑥| + 𝐶,
𝑣2
−1
= ln |𝑥| + 𝐶,
𝑣
−1
𝑣=
.
ln |𝑥| + 𝐶
We unsubstitute
𝑦
−1
=
,
𝑥 ln |𝑥| + 𝐶
−𝑥
.
𝑦=
ln |𝑥| + 𝐶
We want 𝑦(1) = 1, so
1 = 𝑦(1) =
−1
−1
=
.
𝐶
ln |1| + 𝐶
Thus 𝐶 = −1 and the solution we are looking for is
𝑦=
1.5.4
−𝑥
.
ln |𝑥| − 1
Exercises
Hint: Answers need not always be in closed form.
Exercise 1.5.1: Solve 𝑦 0 + 𝑦(𝑥 2 − 1) + 𝑥𝑦 6 = 0, with 𝑦(1) = 1.
Exercise 1.5.2: Solve 2𝑦𝑦 0 + 1 = 𝑦 2 + 𝑥, with 𝑦(0) = 1.
50
CHAPTER 1. FIRST ORDER EQUATIONS
Exercise 1.5.3: Solve 𝑦 0 + 𝑥𝑦 = 𝑦 4 , with 𝑦(0) = 1.
Exercise 1.5.4: Solve 𝑦𝑦 0 + 𝑥 =
p
𝑥2 + 𝑦2.
Exercise 1.5.5: Solve 𝑦 0 = (𝑥 + 𝑦 − 1)2 .
Exercise 1.5.6: Solve 𝑦 0 =
𝑥 2 −𝑦 2
𝑥𝑦 ,
with 𝑦(1) = 2.
Exercise 1.5.101: Solve 𝑥𝑦 0 + 𝑦 + 𝑦 2 = 0, 𝑦(1) = 2.
Exercise 1.5.102: Solve 𝑥𝑦 0 + 𝑦 + 𝑥 = 0, 𝑦(1) = 1.
Exercise 1.5.103: Solve 𝑦 2 𝑦 0 = 𝑦 3 − 3𝑥, 𝑦(0) = 2.
Exercise 1.5.104: Solve 2𝑦𝑦 0 = 𝑒 𝑦
2 −𝑥 2
+ 2𝑥.
51
1.6. AUTONOMOUS EQUATIONS
1.6
Autonomous equations
Note: 1 lecture, §2.2 in [EP], §2.5 in [BD]
Consider problems of the form
𝑑𝑥
= 𝑓 (𝑥),
𝑑𝑡
where the derivative of solutions depends only on 𝑥 (the dependent variable). Such
equations are called autonomous equations. If we think of 𝑡 as time, the naming comes from
the fact that the equation is independent of time.
We return to the cooling coffee problem (Example 1.3.3). Newton’s law of cooling says
𝑑𝑥
= 𝑘(𝐴 − 𝑥),
𝑑𝑡
where 𝑥 is the temperature, 𝑡 is time, 𝑘 is some positive constant, and 𝐴 is the ambient
temperature. See Figure 1.11 for an example with 𝑘 = 0.3 and 𝐴 = 5.
Note the solution 𝑥 = 𝐴 (in the figure 𝑥 = 5). We call these constant solutions the
equilibrium solutions. The points on the 𝑥-axis where 𝑓 (𝑥) = 0 are called critical points. The
point 𝑥 = 𝐴 is a critical point. In fact, each critical point corresponds to an equilibrium
solution. Note also, by looking at the graph, that the solution 𝑥 = 𝐴 is “stable” in that
small perturbations in 𝑥 do not lead to substantially different solutions as 𝑡 grows. If we
change the initial condition a little bit, then as 𝑡 → ∞ we get 𝑥(𝑡) → 𝐴. We call such a
critical point stable. In this simple example it turns out that all solutions in fact go to 𝐴 as
𝑡 → ∞. If a critical point is not stable, we say it is unstable.
0
5
10
15
20
0
10
10
5
5
0
0
-5
-5
-10
-10
0
5
10
15
20
Figure 1.11: The slope field and some solutions of
𝑥 0 = 0.3 (5 − 𝑥).
5
10
15
20
10.0
10.0
7.5
7.5
5.0
5.0
2.5
2.5
0.0
0.0
-2.5
-2.5
-5.0
-5.0
0
5
10
15
20
Figure 1.12: The slope field and some solutions of
𝑥 0 = 0.1 𝑥 (5 − 𝑥).
Consider now the logistic equation
𝑑𝑥
= 𝑘𝑥(𝑀 − 𝑥),
𝑑𝑡
52
CHAPTER 1. FIRST ORDER EQUATIONS
for some positive 𝑘 and 𝑀. This equation is commonly used to model population if we
know the limiting population 𝑀, that is the maximum sustainable population. The logistic
equation leads to less catastrophic predictions on world population than 𝑥 0 = 𝑘𝑥. In the
real world there is no such thing as negative population, but we will still consider negative
𝑥 for the purposes of the math.
See Figure 1.12 on the preceding page for an example, 𝑥 0 = 0.1𝑥(5 − 𝑥). There are two
critical points, 𝑥 = 0 and 𝑥 = 5. The critical point at 𝑥 = 5 is stable, while the critical point
at 𝑥 = 0 is unstable.
It is not necessary to find the exact solutions to talk about the long term behavior of the
solutions. From the slope field above of 𝑥 0 = 0.1𝑥(5 − 𝑥), we see that
if 𝑥(0) > 0,


5



lim 𝑥(𝑡) = 0
𝑡→∞
if 𝑥(0) = 0,


 DNE or −∞ if 𝑥(0) < 0.  Here DNE means “does not exist.” From just looking at the slope field we cannot quite decide what happens if 𝑥(0) < 0. It could be that the solution does not exist for 𝑡 all the way to ∞. Think of the equation 𝑥 0 = 𝑥 2 ; we have seen that solutions only exist for some finite period of time. Same can happen here. In our example equation above it turns out that the solution does not exist for all time, but to see that we would have to solve the equation. In any case, the solution does go to −∞, but it may get there rather quickly. If we are interested only in the long term behavior of the solution, we would be doing unnecessary work if we solved the equation exactly. We could draw the slope field, but it is easier to just look at the phase diagram or phase portrait, which is a simple way to visualize the behavior of autonomous equations. In this case there is one dependent variable 𝑥. We draw the 𝑥-axis, we mark all the critical points, and then we draw arrows in between. Since 𝑥 is the dependent variable we draw the axis vertically, as it appears in the slope field diagrams above. If 𝑓 (𝑥) > 0, we draw an up arrow. If 𝑓 (𝑥) < 0, we draw a down arrow. To figure this out, we could just plug in some 𝑥 between the critical points, 𝑓 (𝑥) will have the same sign at all 𝑥 between two critical points as long 𝑓 (𝑥) is continuous. For example, 𝑓 (6) = −0.6 < 0, so 𝑓 (𝑥) < 0 for 𝑥 > 5, and the arrow above 𝑥 = 5 is a down arrow.
Next, 𝑓 (1) = 0.4 > 0, so 𝑓 (𝑥) > 0 whenever 0 < 𝑥 < 5, and the arrow points up. Finally, 𝑓 (−1) = −0.6 < 0 so 𝑓 (𝑥) < 0 when 𝑥 < 0, and the arrow points down. 𝑥=5 𝑥=0 53 1.6. AUTONOMOUS EQUATIONS Armed with the phase diagram, it is easy to sketch the solutions approximately: As time 𝑡 moves from left to right, the graph of a solution goes up if the arrow is up, and it goes down if the arrow is down. Exercise 1.6.1: Try sketching a few solutions simply from looking at the phase diagram. Check with the preceding graphs if you are getting the type of curves. Once we draw the phase diagram, we classify critical points as stable or unstable∗ . unstable stable Since any mathematical model we cook up will only be an approximation to the real world, unstable points are generally bad news. Let us think about the logistic equation with harvesting. Suppose an alien race really likes to eat humans. They keep a planet with humans on it and harvest the humans at a rate of ℎ million humans per year. Suppose 𝑥 is the number of humans in millions on the planet and 𝑡 is time in years. Let 𝑀 be the limiting population when no harvesting is done. The number 𝑘 > 0 is a constant depending on how fast humans multiply. Our equation
becomes
𝑑𝑥
= 𝑘𝑥(𝑀 − 𝑥) − ℎ.
𝑑𝑡
We expand the right-hand side and set it to zero.
𝑘𝑥(𝑀 − 𝑥) − ℎ = −𝑘𝑥 2 + 𝑘𝑀𝑥 − ℎ = 0.
Solving for the critical points, let us call them 𝐴 and 𝐵, we get
𝑘𝑀 +
𝐴=
q
2
(𝑘𝑀) − 4ℎ𝑘
2𝑘
𝑘𝑀 −
,
𝐵=
q
(𝑘𝑀)2 − 4ℎ𝑘
2𝑘
.
Exercise 1.6.2: Sketch a phase diagram for different possibilities. Note that these possibilities are
𝐴 > 𝐵, or 𝐴 = 𝐵, or 𝐴 and 𝐵 both complex (i.e. no real solutions). Hint: Fix some simple 𝑘 and 𝑀
and then vary â„Ž.
For example, let 𝑀 = 8 and 𝑘 = 0.1. When ℎ = 1, then 𝐴 and 𝐵 are distinct and positive.
The slope field we get is in Figure 1.13 on the next page. As long as the population starts
above 𝐵, which is approximately 1.55 million, then the population will not die out. It will in
fact tend towards 𝐴 ≈ 6.45 million. If ever some catastrophe happens and the population
drops below 𝐵, humans will die out, and the fast food restaurant serving them will go out
of business.
∗ Unstable points with one of the arrows pointing towards the critical point are sometimes called semistable.
54
CHAPTER 1. FIRST ORDER EQUATIONS
0
5
10
15
0
20
5
10
15
20
10.0
10.0
10.0
10.0
7.5
7.5
7.5
7.5
5.0
5.0
5.0
5.0
2.5
2.5
2.5
2.5
0.0
0.0
0.0
0
5
10
15
0.0
0
20
Figure 1.13: The slope field and some solutions of
𝑥 0 = 0.1 𝑥 (8 − 𝑥) − 1.
5
10
15
20
Figure 1.14: The slope field and some solutions of
𝑥 0 = 0.1 𝑥 (8 − 𝑥) − 1.6.
When ℎ = 1.6, then 𝐴 = 𝐵 = 4. There is only one critical point and it is unstable. When
the population starts above 4 million it will tend towards 4 million. If it ever drops below 4
million, humans will die out on the planet. This scenario is not one that we (as the human
fast food proprietor) want to be in. A small perturbation of the equilibrium state and we
are out of business. There is no room for error. See Figure 1.14.
Finally if we are harvesting at 2 million humans per year, there are no critical points.
The population will always plummet towards zero, no matter how well stocked the planet
starts. See Figure 1.15.
0
5
10
15
20
10.0
10.0
7.5
7.5
5.0
5.0
2.5
2.5
0.0
0.0
0
5
10
15
20
Figure 1.15: The slope field and some solutions of 𝑥 0 = 0.1 𝑥 (8 − 𝑥) − 2.
55
1.6. AUTONOMOUS EQUATIONS
1.6.1
Exercises
Exercise 1.6.3: Consider 𝑥 0 = 𝑥 2 .
a) Draw the phase diagram, find the critical points, and mark them stable or unstable.
b) Sketch typical solutions of the equation.
c) Find lim 𝑥(𝑡) for the solution with the initial condition 𝑥(0) = −1.
𝑡→∞
Exercise 1.6.4: Consider 𝑥 0 = sin 𝑥.
a) Draw the phase diagram for −4𝜋 ≤ 𝑥 ≤ 4𝜋. On this interval mark the critical points stable
or unstable.
b) Sketch typical solutions of the equation.
c) Find lim 𝑥(𝑡) for the solution with the initial condition 𝑥(0) = 1.
𝑡→∞
Exercise 1.6.5: Suppose 𝑓 (𝑥) is positive for 0 < 𝑥 < 1, it is zero when 𝑥 = 0 and 𝑥 = 1, and it is negative for all other 𝑥. a) Draw the phase diagram for 𝑥 0 = 𝑓 (𝑥), find the critical points, and mark them stable or unstable. b) Sketch typical solutions of the equation. c) Find lim 𝑥(𝑡) for the solution with the initial condition 𝑥(0) = 0.5. 𝑡→∞ Exercise 1.6.6: Start with the logistic equation 𝑑𝑥 𝑑𝑡 = 𝑘𝑥(𝑀 − 𝑥). Suppose we modify our harvesting. That is we will only harvest an amount proportional to current population. In other words, we harvest ℎ𝑥 per unit of time for some ℎ > 0 (Similar to earlier example with ℎ replaced with ℎ𝑥).
a) Construct the differential equation.
b) Show that if 𝑘𝑀 > ℎ, then the equation is still logistic.
c) What happens when 𝑘𝑀 < ℎ? Exercise 1.6.7: A disease is spreading through the country. Let 𝑥 be the number of people infected. Let the constant 𝑆 be the number of people susceptible to infection. The infection rate 𝑑𝑥 𝑑𝑡 is proportional to the product of already infected people, 𝑥, and the number of susceptible but uninfected people, 𝑆 − 𝑥. a) Write down the differential equation. b) Supposing 𝑥(0) > 0, that is, some people are infected at time 𝑡 = 0, what is lim 𝑥(𝑡).
𝑡→∞
c) Does the solution to part b) agree with your intuition? Why or why not?
56
CHAPTER 1. FIRST ORDER EQUATIONS
Exercise 1.6.101: Let 𝑥 0 = (𝑥 − 1)(𝑥 − 2)𝑥 …
Purchase answer to see full
attachment

  
error: Content is protected !!