Differential Equations: A Visual Introduction For Beginners: by Dan Umbarger
Differential Equations: A Visual Introduction For Beginners: by Dan Umbarger
A Visual Introduction
for Beginners
First printing
By Dan Umbarger
www.mathlogarithms.com
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3 Using Continuous Math to Solve Growth and Decay Problems; Introduction to Separable Differential
Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
11 Review of Partial Derivatives and Integrals: Getting Ready for Exact Differential Equations . . . . . . . . 113
14 Homogeneous Second-Order Linear O.D.E. Solution Technique with Constant Coefficients . . . . . . . . 145
21 Phase-Plane Portraits for Two-by-Two Systems of Linear Homogeneous Differential Equations . . . . . . 203
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
B Converting a Logistic Differential Equation into Its Algebraic (Integrated) Equivalent . . . . . . . . . . . 285
C Proof
R That the Integrating Factor for a First-Order Differential Expression of the form y0 (x) + P(x)y(x) Is
e P(x) dx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
D Justifying the Algebraic Technique for Solving Second-Order, Linear Homogeneous Differential Equa-
tions with Imaginary Characteristic-Equation Solutions (B2 − 4AC < 0) . . . . . . . . . . . . . . . . . . 291
F Solving for the Integrated Solution of a Two-by-Two System of Differential Equations . . . . . . . . . . . 295
H Solving for the Integrated Solution of an n-by-n System of Differential Equations . . . . . . . . . . . . . 305
A differential equation is an equation in one or more variables involving one or more of its own derivatives. A
major goal of taking a class in differential equations is to solve for f (x) if given f (x), f (x), etc. That is, somehow
work backward and find the function whose derivative is given. For example, given f (x) = 2x, what is f (x)?
f (x) out
f ′(x) in
Once we obtain the mystery f (x), we can evaluate it for any desired x. What would be the function whose
dy dy
derivative, dx , is 2x? We know from differential calculus that the derivative of y = x2 would be 2x. Hence, if dx = 2x
2 2
then y = x . (This can also be stated as: if f (x) = 2x, then f (x) = x .)
But wait! A vertical shift of a
4 4
function does not impact the slope
of tangent lines! In the figure at 3 3
right, the tangent slopes to the
2 2
curves y = x2 − 1 (green), y =
x2 + 2 (red), and y = x2 − 3 (blue) 1 1
−1 −1
not a single functional solution (one
unique function whose derivative is Family of solutions −2
−2
2x), but a set or family of them. We for dy
dx = 2x
−3
would indicate this by stating that x = a −3 x=b
dy
for dx = 2x the set or family of function solutions is x2 + c, where c represents any constant. The vertical lines here,
x = a, x = 0, and x = b are called isoclines. An isocline is notable because the slope of each function at each point
on the isocline is the same. Hence, the goal of solving a differential equation is to solve for a function or family of
functions which, when substituted into the original equation, will balance the two sides or make them equal.
15
16 Differential Equations: A Visual Introduction for Beginners
From that family of function solutions we often, using information given us, will identify the particular one that
is appropriate to our situation and use it to evaluate for specific values of x. That is called solving an initial value
problem (IVP). In differential calculus, we studied how to obtain a derivative function from a given function. In
differential equations, we study how to obtain a function from a given differential.
In a famous French play Le Bourgeois Gentilhomme by Molière, a comical
but buffoonish character, Monsieur Jourdain, is amazed to learn that he had been
speaking prose all his life and didn’t even know it.
“Par ma foi! Il y a plus de quarante ans que je dis de la prose sans que j’en
susse rien, et je vous suis le plus obligé du monde de m’avoir appris cela.”
As Monsieur Jourdain demonstrates, it is quite possible to speak prose with-
out knowing that you are doing it. However, it is very, very difficult to learn
abstract skills and abstractions without, at some conscious or unconscious level,
building upon earlier more primitive ones. Differential-equations teachers will
not tell you the information that follows because they are so smart and they have
internalized it so deeply that they assume that you have too. To be fair to them,
the university curriculum requires that they move at a very fast pace, chop-chop.
Nevertheless, it is a truism that mathematicians are not always “math educators.”
Be grateful if you have a teacher who can move comfortably between the two
worlds. Thank him or her.
It turns out that you have been practicing many of the necessary skills to work
with and solve differential equation problems since algebra and you did not even
know it. Making the connections shown in the following page or so of text will level the steep learning curve leading
to differential equations and perhaps give you the confidence to say, “Wow! I have been doing much of this work
since algebra and I did not even know it!”
Chapter 1 Getting Started 17
There are many, many coplanar lines that can be drawn There are many, many quadratic equations that can be
with the same linear slope. Lines that have the same drawn each with the same function slope. For example,
dy
slope are said to be parallel. They do not intersect. dx = 2x. Coplanar curves with the same slope can be
said to be “parallel.” They do not intersect.
6
y = x2 − b
5
y = mx + b 4
−3 −2 −1 1 2 3
−1
−2
−3
Euclid’s famous fifth postulate suggests that only one The “Theorem of Uniqueness” says that only one of
of a set of parallel lines can pass through a given point. a family of “parallel” curves can pass through a given
point.
6
y = x2 − b
5
y = mx + b 4
(2, 1) 1 (2, 1)
−3 −2 −1 1 2 3
−1
−2
−3
We use the above assumption to identify one of a family We use the above theorem to identify one of a family of
of parallel lines. Find the equation of a line, y = mx + b, “parallel” parabolas. Find the equation of the parabola,
that has a slope of 2 and passes through the point (2, 1). y = x2 + b, that passes through the point (2, 1). Here the
d
slope of y = x2 + b is 2x because dx (x2 + b) = 2x.
12
11
1 10
y = x2 − 3
(2, 1)
m=2 9
8
7
1 2 3
6
5
y = 2x − 3
−1 4
3
2
−2
1 (2, 1)
−4 −3 −2 −1 −1 1 2 3 4
−2
−3 −3
y = mx + b → 1 = 2(2) + b → b = −3 y = x2 + b → 1 = 22 + b → b = −3
The line passing through (2, 1) with a slope of 2 is The parabola passing through (2, 1) with a slope of 2 is
f (x) = 2x − 3. f (x) = x2 − 3.
18 Differential Equations: A Visual Introduction for Beginners
It is possible to find the equation of the line with given It may be possible to find a specific function from a
dy
slope and passing through a given point. You could then family of solutions to dx that passes through a specific
find the value of y for any given x on that line: y = f (x). point. This is called solving an initial value problem
(IVP). You could then find the y for any given x on that
function, y = x2 − 3.
11 34
32 (6, ?)
10
30
9 28
(6, ?)
26 y = x2 − 3
8 24
7
22
20
6 y = 2x − 3 18
16
5
14
4 12
m=2 10
3 8
6
2
4
1
(2, 1)
2 (2, 1)
−6 −5 −4 −3 −2 −1−2 1 2 3 4 5 6
1 2 3 4 5 6 7
y = 2x − 3 → y = 2(6) − 3 → y = 12 − 3 → y = 9 y = x2 − 3 → y = 62 − 3 → y = 36 − 3 → y = 33
The line with slope 2 passing through (2, 1) also passes The parabola with slope 2x passing through (2, 1) also
through (6, 9). Only one straight line does this. passes through (6, 33). Only one parabola does this.
The complicated existence and uniqueness theorem ad-
dresses this in a real differential-equations class.
Math is easier if you can make connections to previous topics! Differential equations
can be seen as a curvilinear version of work done previously with linear functions.
Or, as Monsieur Jourdain would have said, “Par ma foi! Il y a plus de quarante ans que je dis de la prose sans
que j’en susse rien, et je vous suis le plus obligé du monde de m’avoir appris cela.”
dy
In Chapter 1, the differential equation we have been using was dx = 2x (or f 0 (x) = 2x). For that simple equation
it was intuitive from beginning calculus that f (x) = x2 . Any differential equation of any consequence will not be
solved by inspection. It is good to understand that working with differential equations is kind of a reverse process
dy
of differential calculus. Since the differential equation ( f 0 (x) or dx = 2x) was obtained by differentiating f (x), then
perhaps you can anticipate that f (x) will be obtained by integrating f 0 (x).
For f (x) = x2 − 3 the derivative f 0 (x) = 2x. If it is given that the function y = x2 + c passes through the
point (2, 1), then
Therefore it follows that: 1 = 22 + c
dy
dx = 2x given differential equation c = −3
Rdy = 2xRdx multiply by dx y = x2 + c
dy = 2x dx integrate both sides y = x2 − 3 equation of the parabola of form y = x2 + b
y0 dy = 2 x1 dx
R R
integration continued and passing through (2, 1)
y0+1 x1+1
0+1 = 2 1+1 integration continued check: d
dx (x
2 − 3) = 2x!
x2
y=22 simplify When x = 6, y = x2 − 3 = 33.
dy
y = x2 simplify again Of all the functions whose derivative is dx = 2x, only
y = x2 + c There are many functions one passes through the point (2, 1). That function also passes
dy
with dx = 2x. through the point (6, 33).
Chapter 1 Getting Started 19
We are used to working with functions and function notation from both algebra and calculus. We have seen both
symbols f (x) and dx
dy
. However, up to now, that notation has mostly been used to evaluate a scalar or to indicate a
function. For example, for f (x) = x2 , we have f (x) = 2x or f (5) = 10. In differential equations, it will often be
helpful to think of f (x), dx
dy
, as an infinite set of tiny tangent segments, so tiny that each line segment is the length
of a point. (Points don’t have length . . . use your imagination . . . think of a computer screen pixel.) Commercial
computer software is available to create slope fields. Because the brain has a tendency to “fill in” gaps, you can, with
imagination, “see” a finite representation of that desired set of functions that results from solving the “differential
function.” The following is a progression of slope fields with ∆x = 1, 0.6, 0.3, and 0.1.
3 3
2 2
1 1
0 0
−1 −1
−2 −2
−3 −3
−2 0 2 −2 0 2
dy dy
dx = 2x, ∆x = 1 dx = 2x, ∆x = 0.6
3 3
2 2
1 1
0 0
−1 −1
−2 −2
−3 −3
−2 0 2 −2 0 2
dy dy
dx = 2x, ∆x = 0.3 dx = 2x, ∆x = 0.1
20 Differential Equations: A Visual Introduction for Beginners
Putting all these ideas together into one marvelous MATLAB screen we see the slope field family prescribed
by the differential equation dxdy
= f (x) = 2x. We know that there is a specific function, f (x), somewhere in the
slope field family of functions whose derivative is 2x, that passes through the point (2, 1). Solving the differential
equation f (x), we get f (x) = x2 + c where c indicates an integration constant, a vertical shift of f (x) = x2 . Using
the information that the specific function we want passes through the point (2, 1), we solved for c by substituting the
(x, y) values (2, 1) into y = x2 + c to find c = −3. So y = x2 + c becomes y = x2 − 3. Then we could find, for x = 6,
y = 62 − 3 = 33!!
60
Slope field and family of solutions
50
for f ′(x) = 2x, f(x) = x2 + c. Given
40 f(x) passes through (2, 1), c = −3.
Therefore, f(x) = 33 when x = 6.
(6, 33)
30
20
10
0
(2, 1)
−10
−20
0 1 2 3 4 5 6 7 8
Slope = m
y opp
1. The slope = m = x = adj . opp
2. opp = m × adj
adj
New y = old y+∆y. y = 1+16 = 17. We estimate that f (6) for the unknown function, f (x), might be 17. Basically
we have “extended” out (extrapolated) the tangent line until it reached an x value of 6.
19
18 (6, 17)
17
6 = 2 + ∆x
16
15 17 = 1 + ∆y
14
13 dy
= m = 2x
12 dx
∆x = 4 11
x y 10 m = opp
adj =
∆y
∆x
2.0 1.0 9
∆y = m × ∆x
6.0 17.0 8 ∆y = 16
7 = 2x × 4
6 =2×2×4
5
= 16
4
3
2 (2, 1)
1 ∆x = 4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Recall from differential calculus (reviewed in Chapter 0) how we improved our secant slope estimate of a tangent
slope in the example by decreasing ∆x:
y2 −y1
x (domain) y (range) m= x2 −x1
0 0 m = 64−0
8−0 = 8 ↓
4 16 m = 64−16
8−4 = 12 ↓
6 36 m = 8−6 = 14
64−36
↓
7 49 m = 64−49
8−7 = 15 ↓
7.9 62.41 m = 8−7.9 = 15.9
64−62.41
↓
7.99 63.8401 m = 64−63.8401
8−7.99 = 15.99 ↓
7.999 63.984001 m = 64−63.984001
8−7.999 = 15.999 ↓
8 64 m = 8−8 = 0 = 16???
64−64 0
That same “successive approximation” technique can be used in differential equations to improve our estimation
dy
of f (6). That is, given f 0 (x) = dx = 2x and the fact that the function we seek passes through point (2, 1), we can
improve our original estimation of the unknown f (x) at 6— f (6) ∼ 17—by reducing the ∆x we used to project out
from (2, 1).
For the example above, change from ∆x = 4 to ∆x = 1.
!
dy
∆x = 1, ∆y = 2xn × ∆x because = 2x, so dy = 2x × dx
dx
32
31
30
29 (6, 29)
28
27 m = 10
26
25
24
23
22
21
∆x = 1 20
By decreasing ∆x, we get val- x y 19 (5, 19)
ues closer and closer to the actual 2.0 1.0
18 m=8
17
f (6). The text box at right and the 3.0 5.0 16
five text boxes below were gen- 15
4.0 11.0 14
erated by the computer program 5.0 19.0 13
shown on the following page. 12
6.0 29.0 11 (4, 11)
10 m=6
9
8
7 dy
6 dx = m = 2x
5 m=4 (3, 5)
4
3
2
1 (2, 1)
1 2 3 4 5 6 7 8 9 10
For people with a programming background it is not too much of a stretch to understand where the slope fields
and the graphs of a particular function come from. Code based on Euler’s method (or perhaps another iterative
dy
algorithm called the Runge–Kutta method) is used on the given differential equation, dx or f 0 (x), to generate a set
24 Differential Equations: A Visual Introduction for Beginners
Chapter 1 Review
Chapter 1 starts out defining a differential equation as an equation in one or more variables involving one or more
of its own derivatives. A major goal of taking a class in differential equations is to solve for f (x) if given f (x),
f (x), etc. That is, somehow work backward and find the function whose derivative is given. That paradigm is just
the opposite of differential calculus when you are given a function and asked to find its derivative.
Side-by-side examples of coplanar parallel linear lines and coplanar “parallel” parabolas were given. It was
shown that, if given a point on a straight line as well as its slope, you could find the y value of a different point
on that line if given its x value. Similarly, it is the case for the parabolas. The concepts slope field and particular
solution were introduced as well as Euler’s iterative technique for approximating an unknown point on an unknown
function whose derivative and initial value are known.
Online Application
Visit demonstrations.wolfram.com/NumericalMethods
ForDifferentialEquations for a great little application
that will demonstrate some of the concepts from this
chapter. “Numerical Methods for Differential Equa-
tions” from the Wolfram Demonstrations Project. Con-
tributed by Edda Eich-Soellner.
Chapter 4
Solving Separable Differential Equations
In Chapter 3, we studied differential equations that, through algebraic techniques, could be rewritten in such a
way that the numerator differential and its respective variable were together on one side of the equation and the
denominator differential and its respective variable were together on the other side. Then, both sides were integrated.
Differential equations in which this technique can be used are called “separable differential equations.” They are
the easiest type of differential equations to work with. Moving from general to specific,
dy
= f (x) × g(y), g(y) , 0 standard form for a separable differential equation
dx
1
dy = f (x) dx
g(y)
Z Z
1
dy = f (x) dx
g(y)
etc.,
Ex 2 r
Ex 1 dy x Ex 3 Ex 4
=
dy dx y dy dy x2
=3 = x2 + 1 =
dx dy √
q
dx dx 1 − y2
dy 0 0 = x × y−1 dy 2
= 3x × 1y dx
= x + 1 × 1y0 dy 2 −1
dx dx = x × 1 − y2
dy 1 − 1 dx
Separable! = x2 × y 2 Separable! Separable!
dx
Separable!
Ex 5 Ex 6 Ex 7
dy 3x2 + 4x + 2 dy y2 + 1 dy y cos x
= = =
dx 2(y − 1) dx x−1 dx 1 + 2y2
"1 dy dy y
#
dy
= (x − 1)−1 × y2 + 1 = (cos x) ×
= 3x + 4x + 2 × (y − 1)
2 −1
dx 2 dx dx 1 + 2y2
Separable! Separable! Separable!
43
44 Differential Equations: A Visual Introduction for Beginners
The point that is being made here is that if a differential equation can be put into the form
dy
= f (x) × g(y), g(y) , 0,
dx
then it can be solved by the “separable technique” as shown above. As a general rule, it is easier to immediately strive
for separation of the variables and differentials from the beginning rather than to put the equation into the generic
form shown here and then to separate. The example above is just to create an understanding of how to categorize
differential equations.
Your differential-equations teacher sometimes has a perspective, an understanding and a schema that give an
intangible advantage over you when looking at problems. Here is an example.
6
“Solving a separable differential equation is the reverse 5
of implicit differentiation.”
4
So, what is a new skill to the student is just a backward (4, 3)
3
version of what the differential equation teacher taught
back in differential calculus. They blend seamlessly in the 2
teacher’s mind. 1
If you understood that last sentence go ahead and skip
over this next part. Otherwise let’s go back to differen- −6 −5 −4 −3 −2 −1 1 2 3 4 5 6
tial calculus and review explicit and implicit differentia- −1
tion and then revisit this idea. Find the slope of the tan- −2
gent to the circle x2 + y2 = 25 at the point when x = 4.
By substitution, then, 42 + y2 = 25 and y = 3. Using ideas −3
taught in beginning calculus, then, the slope of the tangent −4
would be equal to the derivative of the function evaluated
−5
at (4, 3).
−6
Chapter 4 Solving Separable Differential Equations 45
dy
“Solving a separable differential equation is the reverse of implicit = f (x) × g(y), g(y) , 0
dx
differentiation.” 1
dy = f (x) dx
g(y)
Understanding connections makes mathematics more interesting. It also Z Z
1
lets you see that new ideas are often connected to or related to old ones. dy = f (x) dx
g(y)
We’ll spend the rest of this chapter reviewing those slope fields. Since this is otherwise a short chapter and
slope fields will be used extensively in the next chapter, it might be good to talk more about them again. Slope
fields are useful in anticipating solutions to differential equations and are a necessity when trying to get information
about unsolvable differential equations. Today’s software graphing packages really do all the work for you. However,
like many topics in math, they obscure what really goes on. Just like everything else in postcalculator mathematics
education, those graphing packages have potential for harm. For example, in my first book, Explaining Logarithms,
I posited the scenario of a student claiming that 234 × 4,192 = 8,219 or y = log4.8 714.6, y = 22.9 because “the
calculator said so.”
46 Differential Equations: A Visual Introduction for Beginners
All high school math teachers have heard statements such as these. As another example, when I was in college,
the education majors would take 12 -inch thick SAS or SPSS printouts off m = undefined
the printer and proceed to make incredible conclusions based on their m = −2.41 m = 2.41
“data.” When asked what a correlation or standard deviation was,
they didn’t know and they did not care that they didn’t know. m = −1 m=1
It is best for most people to see how slope fields arise
by doing a few of them the old fashioned way. We’ll m = −0.41 m = 0.41
start with a quick review from trig regarding selected
slope values before proceeding. The following values
are obtained by taking the tangents of 180, 157.5,
m=0 m=0
135, 112.5, 90, 67.5, 45, 22.5, and 0 degrees.
The following shows three different examples of slope fields being graphed “by hand” (without a computer).
dy 4
1. Graph the slope field for dx = − yx
3
Step 1: Red slope segments for x = 0.
dy
= − yx 2
dx
(x, y) (m) Slope color 1
(0, 3) 0 red
0
(0, 2) 0 red
(0, 1) 0 red −1
−4 (−3, 1) 3 black
−4 −2 0 2 4 (−3, 0) undef black
(−3, −1) −3 black
(−3, −2) − 32 black
(−3, −3) −1 black
What you need to do is to try to imagine many, many slope indicators each with diminished length until they
reach the length of a point (points actually do not have length, think pixel). If you are successful in your imagination,
you should be able to “see” (in your mind) the graph of the original function f (x) that, when differentiated, resulted
in −x
y : concentric circles.
48 Differential Equations: A Visual Introduction for Beginners
4
dy
2. Graph the slope field for =y−x
dx 3
Step 1: Red slope segments for x = 0.
dy
2
dx =y−x
(x, y) (m) Slope color 1
(0, 3) 3 red
0
(0, 2) 2 red
(0, 1) 1 red −1
(0, 0) 0 red
−2
(0, −1) −1 red
(0, −2) −2 red −3
(0, −3) −3 red
−4
−4 −2 0 2 4
Ta-Da!!
The slope field at right shows sample slopes of
4
the differential equation dx dy
= y − x. As indicated y
in the graph, there are many functions that have a
3
slope of y − x. If you are given that the graph of
f (x) that you want passes through a specific point, (2, ?)
2
say (−3, −2), that will help you to identify a specific
function, f (x), from the family of functions. This is
1
shown in the figure at right. The progression of ideas
is as follows: You are given a differential equation, (?, 0)
f (x), or the problem you are working on dictates a −4 −3 −2 −1 0 1 2 3 x4
differential equation. The solution to that differential
equation would be an entire family of possibilities, −1
f (x) + c, where c is unknown. You may be given (or
the problem that you are working on will dictate) that −2
(−3, −2)
the solution needed for your case will pass through a
specified point. You are then to use the fact that the −3
general solution, f (x) + c, of the given differential
equation, f , passes through the given point in order −4
to solve for c. From that f (x) + c with known c, you could then find the value of f (x) when x = 2 or perhaps you
would be asked to find the x or y-intercept of the particular f (x) passing through (−3, −2) that is indicated by the
differential equation f (x), also known as dx
dy
. This is called an initial value problem (IVP) and is possible due to
something called the “existence and uniqueness theorem.”
dy
3. Graph the slope field for dx = y3 − y2 − 6y
This example is shown because it demonstrates a differential equation with no explicit x variables. There is a
fancy word for such equations: autonomous. A differential equation with no explicit x values is called autonomous.
This fact will have an impact on the hand-graphing process: If there is no explicit x value in the differential equation,
all the y values will be the same for any given x. The following autonomous differential equation was chosen because
the polynomial in y will factor, making for a nice clean example. y3 − y2 − 6y = y(y2 − y − 6) = y(y − 3)(y + 2).
Regardless of the x value, the derivative (slope) will be zero when y = −2, 0, and 3.
4
3
Start with the zero-slope parts of the field.
2
dy
All x dx
= y3 − y2 − 6y Slope
values y = y(y − 3)(y + 2) color 1
4
3 0 red
0
2
1
0 0 red −1
−1
−2 0 red −2
−3
−3
−4
−4 −2 0 2 4
Chapter 4 Solving Separable Differential Equations 51
3
Now calculate several y-value slopes at once.
All x dy
= y3 − y2 − 6y Slope 2
dx
values y = y(y − 3)(y + 2) color
4 (4)(4 − 3)(4 + 2) = +24 green 1
3 0 red
0
2 (2)(2 − 3)(2 + 2) = −8 blue
1 (1)(1 − 3)(1 + 2) = −6 blue −1
0 0 red
−1 (−1)(−1 − 3)(−1 + 2) = +4 green −2
−2 0 red
−3 (−3)(−3 − 3)(−3 + 2) = −18 blue −3
−4
−4 −2 0 2 4
Finally, since slope lines are “parallel” (do not intersect each other), we can anticipate that the slope lines will
approach the horizontal slope lines at y = −2, 0, and 3 asymptotically. Actually, since the curved slope lines cannot
intersect each other either, each of those (curved) lines will approach each other asymptotically as well.
dy
All x dx
= y3 − y2 − 6y Slope
values y = y(y − 3)(y + 2) color
4 (4)(4 − 3)(4 + 2) = +24 green
3.1 (3.1)(3.1 − 3)(3.1 + 2) = green
4
(3.1)(0.1)(5.1) = 1.6
3 0 red 3
2.9 (2.9)(2.9 − 3)(2.9 + 2) = blue
(2.9)(−0.1)(4.9) = −1.4 2
2 (2)(2 − 3)(2 + 2) = −8 blue
1 (1)(1 − 3)(1 + 2) = −6 blue 1
0.1 (0.1)(0.1 − 3)(0.1 + 2) = blue
(0.1)(−2.9)(2.1) = −0.6 0
0 0 red
−0.1 (−0.1)(−0.1 − 3)(−0.1 + 2) = green −1
(−.1)(−3.1)(−1.9) = 0.6
−1 (−1)(−1 − 3)(−1 + 2) = +4 green −2
−1.9 (−1.9)(−1.9 − 3)(−1.9 + 2) = green
(−1.9)(−4.9)(0.1) = 0.9 −3
−2 0 red
−2.1 (−2.1)(−2.1 − 3)(−2.1 + 2) = blue −4 −2 0 2 4
(−2.1)(−5.1)(−0.1) = −1.1
−3 (−3)(−3 − 3)(−3 + 2) = −18 blue
4 y′ 4
2 3
2
−3 −2 −1 1 2 3 4 1
−2 y
0
−4
−1
−6 −2
y′ = y3 − y2 − 6y
−8 −3
−4
−10 −4 −2 0 2 4
Well alrighty now! The y–y graph in the phase-plane analysis indicates that the slopes are all negative and
asymptotic to y = −2 in the interval (−∞, −2) and all positive and asymptotic to y = 3 in the interval (3, ∞). All the
graphs in both those intervals get steep very fast as they approach infinity. (See the middle figure below.) In the y–y
graph in the phase-plane analysis, slopes in the interval (0, 3) are all negative and cannot pass the lines y = 3 and
y = 0 and hence are asymptotic to them both. Similarly, this can be said for the slopes in the interval (−2, 0) except
that the slopes are positive in that interval. (See figure below right and compare it with the one at the bottom of page
51.
4 y′ 4 4
Positive
0 2 3 3
2 2
−3 −2 −1 1 2 3 4
−2 y 1 1
0
0 0
−4
Negative −1 −1
−6
−2 −2
−8
−3 −3
y′ = y3 − y2 − 6y
−10 −4 −2 0 2 4 −4 −2 0 2 4
Chapter 4 Solving Separable Differential Equations 53
Chapter 4 Review
Chapter 4 showed how to solve a type or category of differential equation called separable dif- dp
=r×p
ferential equations. Here, the numerator and denominator of the derivative of the differential dt
equation were separated by multiplying both sides of the differential equation by the denom- 1
dp = r dt
inator of the derivative. Additionally, the dependent and independent variables were moved Z p Z
to the appropriate sides of the equation using algebra. Then, the respective independent and 1
dp = r dt
dependent variables are obtained by integrating their respective differentials. p
We learned to identify separable differential equations from their generic form, which either looked like or could
dy
be transformed to look like dx = f (x) × g(y), g(y) , 0.
It was shown that solving a separable differential equation was the reverse of implicit differentiation. As a
learning exercise, “slope fields” for three different differential equations were drawn in stages “by hand.” In practice,
these slope fields just magically appear in Mathematica or MATLAB, but it is helpful in the learning process to draw
a few slope fields the old fashioned way to take the magic out of the process.
Several new vocabulary words were introduced:
1. Autonomous differential equations—a differential equation that does not have any x terms
2. Source asymptote—an asymptote from which a particular solution to a differential equation is diverging
4. Node asymptote—an asymptote that has a particular solution converging on one side but diverging from the
other
5. Phase-plane analysis—a technique for studying the behavior of a differential equation. With a differential
equation the axis is labeled using the dependent and independent variables of the equation. With the phase-
plane analysis the axis of the graph is labeled using the dependent variable (of the differential equation) as the
horizontal axis and the derivative of the dependent variable (of the differential equation) as the vertical axis.
Online Application
Visit demonstrations.wolfram.com/DirectionFieldsFor
DifferentialEquations and demonstrations.wolfram.com
/SlopeFields for two great little applications that will
demonstrate some of the concepts from this chap-
ter. “Direction Fields for Differential Equations” from
the Wolfram Demonstrations Project. Contributed by
Stephen Wilkerson and Charles E. Oelsner.
Chapter 5
More Applied Separable Differential Equations
Differential Equations in Chemistry
In a chemical reaction, 100 g of substance A are being dissolved at a rate that is directly proportional to the square
of the undissolved amount remaining. After one hour, only 20 g of substance A remain undissolved. How much of
substance A is present after two hours? How long before the amount of substance A decreases to 1 g?
Let A be the amount of substance A at any time t. From the data and assumption about the rate of dissolution, you
dt = kA . Convert this differential equation to its integrated-function
can write the following differential equation: dA 2
dA
= kA2
dt
can be put into the following form,
dA
= t0 × kA2 , t0 , 0,
dt
which has the form
dA
= f (t) × g(A).
dt
Hence, this problem can be solved as a separable differential equation.
55
56 Differential Equations: A Visual Introduction for Beginners
dA dA
= t0 × kA2 has form = f (t) × g(A)
dt dt At one hour, only 20 g of the substance remained.
dA = kA2 dt separate variables Substituting c3 = −0.01 into the integrated form of
A−2 dA = k dt prepare to integrate the function, we get
A−2 dA = k dt integrate both sides −1
A= we can solve for k
kt + c3
A−1 −1
+ c1 = kt + c2 20 = substitution
−1 (k × 1) + (−0.01)
−1 −1
= kt + c2 − c1 20 =
A k − 0.01
−1
= kt + c3 combine constants 20(k − 0.01) = −1 eliminate the fraction
A
20k − 0.20 = −1 distributive property
−1 = A(kt + c3 ) eliminate the fraction
−1 20k = −0.8 isolate the variable term
= A solve for A k = −0.04 divide both sides by 20
kt + c3
−1 −1
A= A to the left A= substitute for k
kt + c3 −0.04t + (−0.01)
−1 −1 −100
100 = at t = 0, there was 100 g = × simplify
k × 0 + c3 −0.04t + (−0.01) −100
−1 100
100 = = final integrated form
c3 4t + 1
c3 = −0.01
120
How much of substance A is present after two
hours?
Amount of Substance (grams)
100
100 100
80
A= = = 11.11 g
4t + 1 4 × 2 + 1
dp dp
= h0 × −0.2p form: = f (h) × g(p)
dh dh
dp
= −0.2 dh separate variables
p
1
p−1 dp = −0.2 dh = p−1
p
−1
p dp = −0.2 dh integrate both sides
ln |p| + c1 = −0.2h + c2 p−1 = ln |p|
15
MATLAB script for the graph at right is in Appendix A. (5.5, 9.96)
10
5
29,029 ft
Author’s note: 5,280 ft/mi = 5.5 miles.
0
−5
0 3 6 9 12
Pressure (in•Hg)
58 Differential Equations: A Visual Introduction for Beginners
dA −A kg dA
= t0 × has form = f (t) × g(A) eln A = e−0.01t+c3
dt 100 min dt
1 A = e−0.01×t × ec3
dA = −0.01 dt
A A = e−0.01×t × c4
A−1 dA = −0.01 dt
* A = c4 × e−0.01×t
−1
A dA = −0.01 dt A0 = 35 at t0
ln |A| + c1 = −0.01t + c2 35 = c4 × e−0.01×0
ln A = −0.01t + c2 − c1 where A > 0 35 = c4 × e0
ln A = −0.01t + c3 where c3 = c2 − c1 35 = c4
How much salt will be in the tank after five hours (300 min)? The owner has been told that the water must be
less than 0.1% salt (less than one kilogram of salt in 1,000 L) for his new freshwater fish. How long will that take?
40
−0.01×t
A = 35e * above
35
A = 35e−0.01×300 5 h = 300 min
A = 35e−3 30
A = 1.74 g salt 25
Salt (kg)
1 = 35 × e−0.01×t * above 20
1
= e−0.01×t 15
35
0.0285714286 = e−0.01×t
10
ln(0.0285714286) = ln e−0.01×t
5
−3.55534806 = −0.01t (300, 1.74) (355, 1)
t = 355.534806 min
0 50 100 150 200 250 300 350 400 450
Time (min)
*A
mililiter of water has a mass of one gram, so a liter (1,000 mL) has a mass of one kilogram. Then, 3.5% of a kilogram is 35 g, so 1,000 L
must have 35 kg of salt.
Chapter 5 More Applied Separable Differential Equations 59
10 Ω
If a battery supplies a constant
voltage of 30 V, the inductance is
Switch
30 V
(ohms) and I(0) = 0, find I(t) in
general and the current after 0.3
seconds.
2H
dI
L + RI = V(t) 5.0
dt
dI 4.5
2 + 10I = 30
dt
4.0
dI
= 15 − 5I
3.5
Current (amperes)
dt
dI = (15 − 5I) dt 3.0
dI
= dt 2.5
15 − 5I (0.3, 2.33)
(15 − 5I)−1 dI = dt 2.0
1 1.5
− (15 − 5I)−1 (−5) dI = dt
5
1
1
1.0 Note that tlim
→∞ (−3e + 3) = 3.
5t
Note that − u−1 du = − ln |u| 0.5
5 5
1 0.0
− ln |15 − 5I| + c1 = t + c2 0.0 0.2 0.4 0.6 0.8 1.0 1.2
5
1 Time (seconds)
− ln |15 − 5I| = t + c2 − c1 MATLAB script for the graph above in Appendix A.
5
1
− ln |15 − 5I| = t + c3
5
ln |15 − 5I| = −5t − 5c3 I(0) = 0 Hence, at 0.3 seconds
ln |15 − 5I| = −5t + c4 0 = c6 e−5×0 + 3
ln |15−5I| −5t+c4
I = −3e−5×0.3 + 3
e =e 0 = c6 × 1 + 3
−5t c4
I = −3e−1.5 + 3
|15 − 5I| = e ×e c6 = −3
I = −3 × 0.2231301601 + 3
|15 − 5I| = c5 e−5t Therefore, from ***, I = −0.6693904804 + 3
15 − 5I = c5 e−5t
I = −3e−5t + 3. I = 2.33060952 A at 0.3 s
I = c6 e−5t + 3 ***
60 Differential Equations: A Visual Introduction for Beginners
dT
= k × (T − T a ) T = object’s temperature, T a = temperature of surrounding medium (air or H2 O)
dt
dT
= k × dt dT on the left is differential of temperature, dt on right is differential of time
T − Ta
Z Z
dT
=k dt
T − Ta
Z Z
(T − T a )−1 dT = k t0 dt
ln |T − T a | + c1 = kt + c2 the ts are all confusing. Remember that the capital T s represent the object’s and the
ambient temperature, whereas the lowercase t represents time
ln |T − T a | = kt + c2 − c1
ln |T − T a | = kt + c3
eln|T −Ta | = ekt+c3 bm × bn = bm+n , therefore ekt+c3 = ekt ec3
T − T a = ekt ec3 object is cooling toward the ambient temp, therefore T − T a > 0
T = T a + e c4 kt
T f = T a + Cekt *** final temp = ambient temp + original temp × a decay factor. What a mess!
There are lots of unknowns. We can simplify a bit by letting T f be T 0 when t = 0.
T 0 = T a + Cek×0
T 0 = T a + Ce0
T0 = Ta + C × 1
C = T0 − Ta
T f = T a + (T 0 − T a ) × ekt substitute C = T 0 − T a into the equation above ***
A person was murdered in a mansion. Police forensic specialists arrive at (arrival time, t0 ) and note the tempera-
ture of the body to be (initial temperature upon arrival, T 0 ). t hours later, the temperature of the body was rechecked
and found to be (temperature t hours later, T f ). The thermostat in the room had been set to maintain a constant
temperature of (thermostat temperature, T a ). Assume the person’s temperature was 98.6 ◦ F while living. What was
the time of death, t? Since the room was cooler than the body at the time of death, the ambient air would have acted
to cool the body. Since “e” is a known constant and variables T f , T a , T 0 , and t are all known, you could substitute
all that known information into the Newton’s Law of Cooling T f = T a + (T 0 − T a ) × ekt , and solve for k, the constant
of variation for that equation.
Let’s do that again. A person was murdered in a mansion. Police forensic specialists arrive at 10 am and note the
temperature of the body to be 83 ◦ F (T 0 ). After 2.5 (t) hours (12:30 pm), the temperature of the body was rechecked
and found to be 72 ◦ F (T f ). The thermostat in the room had been set to maintain a constant temperature of 67 ◦ F
(T a ). Assume the person’s temperature was 98.6 ◦ F when alive. Estimate the time of death. In Newton’s Law, there
are five unknowns. After substituting in for T f , T a , T 0 , and t, we only have one unknown, k, for which we can solve.
Chapter 5 More Applied Separable Differential Equations 61
With k now known, we can rework the problem with the newly found k in conjunction with a different T f , 98.6 ◦ F,
to solve for t.
To determine the time (t) of death, substitute 98.6 ◦ F
into T f (final temperature) and solve for t.
T f = T a + (T 0 − T a ) × ekt
72 = 67 + (83 − 67) × ek×2.5 98.6 = 67 + (83 − 67) × e−0.4652603239×t
5 = 16 × ek×2.5 31.6 = 16 × e−0.4652603239×t
5 31.6
= ek×2.5 = e−0.4652603239×t
16 16
0.3125 = e2.5k ln 1.975 = ln e−0.4652603239×t
ln 0.3125 = ln e2.5k 0.6805683983 = −0.4652603239 × t
−1.16315081 = 2.5k 0.6805683964
t=
−0.4652603239
k = −0.4652603239
= −1.46 h
Moving to the right, the red line appears asymptotic to 67 = −1:28
◦ F.
Why? Do you recall a sink asymptote from Chapter 4?
10 am − 1:28 = 8:32 am time of death
100
Time of death
95
90
Temperature (°F)
85 83 °F at 10:00 am
80
75 72 °F at 12:00 pm
70
65
60
−2 0 2 4 6 8 10
Time (hours)
MATLAB script for graph above in Appendix A.
† ‡
Billard Room
Cellar
Dining Room with
envelope Library
‡ †
62 Differential Equations: A Visual Introduction for Beginners
dp
= 0.05p − 23,000 t
dt 0.05p − 23,000 = ±(c5 × e 20 )
dp = (0.05p − 23,000) dt 0.05p − 23,000 = c6 × e 20
t
c6 > 0
dp t
= dt 100(0.05p − 23,000) = 100 × c6 × e 20
0.05p − 23,000 t
t
ln |0.05p − 23,000| = + c4 For t = 20 yrs
20
eln |0.05p−23,000| = e 20 +c4 p20 = 460,000 − 160,000 × e1
t
|0.05p − 23,000| = e
t
20 × ec4 p20 = 460,000 − 434,925.0926
t p20 = 25,074.91
|0.05p − 23,000| = c5 × e 20 c5 > 0
It appears that 20 years after drawing down his principal at $23,000 a year, he will still have principal remaining:
$25,074.91. The flaw in that approach can best be shown by a visual. As was shown before, continuous compounding
of principal results in a continuous accumulation of principal. However, the yearly drawdown of principal described
in the problem above would be, for practical purposes, discrete: It happens all at once. If the yearly drawdown is
greater than the amount of money earned during the preceding twelve months, then, over time, the original principal
($300,000) will be depleted.
Chapter 5 More Applied Separable Differential Equations 63
500,000
400,000
300,000
200,000
100,000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
If the yearly drawdown is less than the amount of money earned during the preceding twelve months, then,
over time, the original principal ($300,000) will increase, but at a much slower rate than in the earlier continuous
accumulation problem.
500,000
400,000
300,000
200,000
100,000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
If you understand computer programming, you can use Euler’s method to simulate both continuous compounding
of interest and continuous withdrawals (combining both) to analyze the problem above (continuous compounding of
interest with yearly lump sum drawdown) to any specified tolerance allowable in your computer.
The following program was run first showing Euler’s method used with a ∆t of 10−7 year to calculate compound
interest accumulating on $300,000 at 5% for 20 years. The answer, as you know now, would be p f = p0 ert =
300,000 × e0.05×20 = $300,000 × e1 = $815,484.5485. The answer obtained by the code was $815,484.57. The num-
bers differ because Euler’s method gives discrete-math results whereas differential equations gives continuous-math
results. The code that does the “continuous compounding” is combined with the code for “continuous withdrawal.”
Here the term “continuous” reflects the 10−7 ∆t used by Euler’s algorithm in the code. However, as pointed out
above, “continuous” withdrawal is theoretically possible but not convenient in the real world. The yearly drawdown
might be done in a lump sum at either the beginning or end of the year. This is done on the following page with the
drawdown done at the beginning of the year. Notice that first of the year drawdown deprives the retiree of interest
from $23,000 that year.
64 Differential Equations: A Visual Introduction for Beginners
250,000
200,000
150,000
100,000
50,000
(20, 5,150)
0 5 10 15 20 25
Chapter 5 More Applied Separable Differential Equations 65
Exponential growth
Exponential decay
Online Application
Visit demonstrations.wolfram.com/MixingSaltInWater
InOneTank for a great little application that will
demonstrate some of the concepts from this chapter.
“Mixing Salt in Water in One Tank” from the Wolfram
Demonstrations Project. Contributed by Stephen
Wilkerson.
Chapter 6
Solving Separable Logistic Equations
Exponential Growth versus Logistic Growth
The term exponential growth is often used when talking about population growth. Assuming unlimited supplies of
various resources, the growth rate is proportional to the existing population. In logistic growth, the growth rate is also
proportional to the existing population, but the concept takes into account limited resources, disease, and predation.
Consequently, logistic growth is bounded. That boundary is called the “carrying capacity of the environment.” See
the figures below.
dP P
dP
= kP = kP 1 −
dt dt K
1. Exponential (unrestricted) growth 2. Logistic (restricted) growth
The population’s growth The environment’s carrying capacity
rate accelerates
The rate
Population Size
Population Size
slows
The rate
accelerates
Time Time
In exponential growth, there is no upper limit, but growth is limited in
logistic growth. Logistic growth is usually considered more realistic than ex-
ponential growth when studying populations. In 1798 a British economist,
Thomas Malthus, became quite famous for writing that, while population
growth might be exponential, shortages in food supply, war, disease and star-
vation create conditions which would slow that exponential growth. See the
figures above.
When we studied continuous compound interest the exponential growth
model was appropriate, but the logistic growth model is more appropriate
when studying population growth. A better match between the problem be-
ing studied and the model used to study it generally gives more reliable study
results.
Thomas Malthus
67
68 Differential Equations: A Visual Introduction for Beginners
The K or carrying capacity in the logistic differential equation sets a maximum bound
on P.
dP dP P
dt = kP dt = kP 1 − K
exponential growth logistic growth
k = 0.05 k = 0.05, K = 2,000
t P deltaP t P deltaP
1 1,050.00 50.00 1 1,025.00 25.00
2 1,102.50 52.50 2 1,049.98 24.98
3 1,157.63 55.13 3 1,074.92 24.94
4 1,215.51 57.88 4 1,099.78 24.86
5 1,276.28 60.78 5 1,124.53 24.75
6 1,340.10 63.81 6 1,149.14 24.61
7 1,407.10 67.00 7 1,173.59 24.44
.. .. .. .. .. ..
. . . . . .
195 13,549,189.55 645,199.50 195 1,999.91 0.005
196 14,226,649.03 677,459.48 196 1,999.91 0.0046
197 14,937,981.48 711,332.45 197 1,999.92 0.0045
198 15,684,880.56 746,899.07 198 1,999.92 0.0042
199 16,469,124.59 784,244.03 199 1,999.923 0.0040
200 17,292,580.82 823,456.23 200 1,999.927 0.0038
Growth here is unbounded Growth here is bounded
Unbounded Growth Bounded Growth
Population Size
slows
The rate
accelerates
Time Time
Following are five examples of situations where there is a limit to how much something can grow. Each of these
situations could be modeled using the logistic growth curve.
dP P
= kP 1 −
dt K
dp
= kP separable differential equation
dt
dP P
= kP 1 − logistic differential equation
dt K
Hold onto this idea as you proceed through your differential-equations class. There will be many occasions where
more than one technique can be used to solve a problem.
70 Differential Equations: A Visual Introduction for Beginners
If dP
dt = kP 1 − KP is separable, then it should be possible to convert it to the form: f (t) × g(P). Let’s try.
Attempt #1 Attempt #3
Attempt #2
dP P dP P
= kP 1 −
= kP 1 − dP P
dt K = kP 1 − dt K
dt K
P
P
dP = kP 1 −
dP = kP 1 −
P dt
K
dt dP = kP 1 − dt K
K
kP2
!
P dP P dP = kP −
dP = kP − kP dt =k 1− dt dt
K P K K
P dP
dP = kP dt − kP dt??? ???????????? = dt separated!
K kP − kPK
2
The integration of the left side in #3 can be very difficult. It turns out that there is a way to avoid such difficult
integrations. Chapter 6 teaches a clever way to do this. Be patient. What follows is a review from beginning algebra.
It is often helpful to bridge into new ideas by connecting them to old ones.
Solve the following quadratic equation.
x2 − 2x − 15 = 0 original quadratic
(x + 3)(x − 5) = 0 factor the trinomial into the product of two binomials
x + 3 = 0 or x − 5 = 0 zero product property, if a × b = 0 then a = 0, b = 0, or both.
x = −3 or x = 5
But wait! What could you do if the quadratic did not factor? In that case you switched to another attack called
“Completing the square.”
Solve
2x2 − 9x − 4 = 0 original quadratic
9 4
x2 − x − = 0 divide both sides by 2 so that the x2 term has a coefficient of 1
2 2
9 4
x − x=
2
isolate the x terms
2 2
!2
9 81 81 1 9
x − x+
2
=2+ complete the binomial square by adding × to both sides
2 16 16 2 2
!2
9 32 81
x− = + change form: a2 − 2ab + b2 = (a − b)2 , prepare to add fractions
4 16 16
!2
9 113
x− = add like fractions
4 16
√
9 113
x− =± take the square root of both sides
4 4√
9 113
x= ± isolate the x
4 √4
9 ± 113
x= combine like fractions
4
Oh, that was fun. Let’s do it again! Solve the following quadratic equation.
3x2 − 7x − 5 = 0
Just kidding!! We could solve this equation using the technique shown above. However, the process for solving
this equation will be the same as the process for solving the first one above with only the coefficients being different.
Perhaps we could do the same process with symbols (a, b, and c) for the constants, ax2 + bx + c = 0; then we would
have a generic template for all quadratics.
Chapter 6 Solving Separable Logistic Equations 71
2
ax2 + bx + c = 0 b b2 c 4a
x+ = 2
− ×
ax2 + bx + c 0 2a 4a a 4a
= b
2
b2 4ac
a a x+
b c = − 2
x2 + x + = 0 2a 4a 2 4a
a a 2
b b − 4ac
2
b c x+ =
2
x + x=− 2a 4a2
a a
2 2 2 2
b b c b b b − 4ac
2
x + x+ =− + x+ =
a 2a a 2a 2a 4a2
2 √
b c b2 b2 − 4ac
x+ =− + 2 ± x +
b
= ±
2a a 4a 2a 2a
2 √
b b2 c −b ± b2 − 4ac
x+ = 2− x=
2a 4a a 2a
a generic formula which will work for all quadratic equations!
The same sort of thing happens
when working with “logistic equations.” The differential equation form of a
dP P
“logistic equation” is dt = kP 1 − K where P is the population at time t, k is the constant of proportionality, and K
is the “carrying capacity.” From that point forward there is a significant amount of calculus and algebraic acrobatics
needed to solve this equation for the specifics of the equation at hand, very much like all that effort shown above to
solve an unfactorable quadratic equation by the process of completing the square. Just
√ like finding the general-form
−b± b2 −4ac
quadratic equation, ax2 + bx + c = 0, once to get a general-form answer, x = 2a , it is best to take the time
dP
to solve the general-form logistic differential equation, dt = kP 1 − K , for its analytic form, P = (A×eK−kt +1) , where
P
A = K−P 0
P0 . From that point forward, we can substitute into the problem-specific analytic (integrated) form quickly,
and relatively painlessly obtain the desired information.
If you wish to know how to convert from the general logistic differential equation form to its algebraic (differen-
tiated) form please do access Appendix B. It is two pages long and rather involved.
2 − 4a
c
√b
−b ± 2a
x=
r
olve
l g e bra S r x
A es fo
Solv
+ c=0
2 bx
ax + K 1
−kt +
= Ae K − P0
P(t) ere A
= P0
wh
tial
eren
Diff Solver
ti o n )
Equa s for P(t
(1 − K)
e
Solv
P
dP = kP
dt
72 Differential Equations: A Visual Introduction for Beginners
Now let’s return to those concrete examples! Following are five examples of situations where there is a limit
on how much something can grow: cooties, a rumor, genetic transfer, population growth, and product awareness.
dt = kP(1− K ), or its equivalent
Therefore, each of these situations could be modeled using the logistic growth curve, dP P
integrated form.
Differential Equation Using the Logistic Model Integrated-Equation Form Using the Logistic Model
dP
dt = kP(1 − P
K) . . . this is separable, but how??? P= K
(A×e−kt +1)
, where A = K−P0
P0
(See Appendix B for a derivation of this formula.)
After spring break, a college campus nurse identified 10 students with cooties. At Day 4, she identified 30 infected
students. There are 800 students on campus. Assuming the logistic model, how many students will be infected after
two weeks? After five weeks?
dP P
= kP 1 − carrying capacity = 800
dt K
dP P
= kP 1 − switch to integrated form
dt 800
K K − P0
P= where A =
(A × e + 1)
−kt P0
Step 1: Identify the carrying capacity and the initial population.
Solve for A.
K − P0 800 − 10 790
A= = = = 79
P0 10 10
Step 2: Use K and A to solve for k on Day 4 using the integrated-equation form
K
P=
(A × e−kt + 1)
800
30 = substitute into the integrated logistic growth model equation
(79 × e−k×4 + 1)
80
3= divide both sides by 10
(79 × e−4k + 1)
3 × 79 × e−4k + 1 = 80 multiply to eliminate the denominator
80
79 × e−4k + 1 = divide both sides by 3
3
80 3
79 × e−4k = − subtract 1 from both sides
3 3
77
79 × e−4k = combine like fractions
3
77 1 77
e−4k = × = divide away the 79
3 79 237
77
e−4k = 0.3248945148 convert to a decimal
237
ln e−4k = ln(0.3248945148) take the natural log of both sides
−4k = −1.124254719 ln eu = u
k = 0.2810636798 finally, solve for k
Chapter 6 Solving Separable Logistic Equations 73
Step 3: Use A, K and k to determine logistic population numbers after two and five weeks.
K
P=
(A × e−kt + 1)
After 2 weeks (14 days) After 5 weeks (35 days)
800 800
P= P=
79 × e−0.2810636798×14 +1 79 × e−0.2810636798×35 +1
800 800
P= P=
79 × e−3.934891517 + 1 79 × e−9.837228793 + 1
800 800
P= P=
1.544277766 + 1 0.004220588 + 1
800 800
P= P=
2.544277766 1.0042205875
P = 314 infected P = 797 infected
MATLAB script for graph below in Appendix A.
Logistic growth as P → K
800
(35, 797)
700
600
Number of Students Infected
500
400
200
100
0 10 20 30 40 50
Days
74 Differential Equations: A Visual Introduction for Beginners
dP P
= kP 1 − carrying capacity = 2,000
dt K !
dP P
= kP 1 − switch to integrated form
dt 2,000
K K − P0
P= where A = and Po = 20
(A × e + 1)
−kt P0
Step 1: Identify the carrying capacity and the initial population.
Solve for A.
K − P0 2,000 − 20 1,980
A= = = = 99
P0 20 20 Bertha Elena
Step 2: Use K and A to solve for k on Day 1 using the integrated-equation form (70 people know at the end of
Day 1).
K
P=
(A × e−kt + 1)
2,000
70 = substitute into the integrated logistic growth model equation
(99 × e−k×1 + 1)
70 × 99 × e−k + 1 = 2,000 multiply to eliminate the fractions
99 × e−k + 1 = 28.57142857 divide both sides by 70
99 × e−k = 27.57142857 subtract 1 from both sides
e = 0.2784992785 divide away the 99
−k
ln e−k = ln(0.2784992785) take the natural log of both sides
−k = −1.27833981 ln eu = u on left, ln value taken on right
k = 1.27833981
Step 3: Use A, K and k to determine how many days before half the school knows.
K
P= integrated form
(A × e−kt + 1)
2,000
1,000 = substitute 12 × 2,000 = 1,000 students into the integrated
(99 × e−1.27833981t + 1) logistic growth model
1 1
= divide both sides by 2,000
2 99 × e
−1.27833981t +1
99 × e−1.27833981t + 1 × 1 = 2 × 1 cross multiply the proportion
99 × e−1.27833981t + 1 = 2 a × 1 = a
99 × e−1.27833981t = 1 subtract 1 from both sides
1
e−1.27833981t = divide away the 99
99
1
e−1.27833981t = 0.01010101 change to a decimal
99
ln(e−1.27833981t ) = ln(0.010101) a = b iff ln a = ln b
−1.27833981t = −4.59511985 ln eu = u
t = 3.59 days
Chapter 6 Solving Separable Logistic Equations 75
2000
1500
500
0 1 2 3 4 5 6 7 8 9 10
Days since Breakup
MATLAB script for the graph above in Appendix A.
0.7 P= substitute t = 8
2.333e−0.516×8 + 1
0.6 1
P= e−0.516×8 = e−4.131
0.5 2.333e −4.131 +1
0.4 1
P= e−4.131 = 0.0161
0.3
2.333 × 0.0161 + 1
(0, 30) 1
0.2 P=
0.037 + 1
0.1 1
P=
1.037
0.0 1 2 3 4 5 6 7 8 9 10 11
Generations P = 0.9638
MATLAB script for graph above in Appendix A.
After ten generations
Generation Have the trait 100%
0 30.0% P=
2.333e−0.516×10 + 1
1 1
2 P=
2.333e−5.164 + 1
3 1
4 P=
2.333 × 0.0057 + 1
5 85.0% 1
6 P=
0.013 + 1
7 1
P=
8 96.4% 1.013
9 P = 0.9868
10 98.7%
78 Differential Equations: A Visual Introduction for Beginners
dP P
= kP 1 −
dt K
dP P
= kP 1 − maximum awareness
dt 1,000,000
K K − P0
P= −kt
, where A =
A×e +1 P0
Step 1: Solve for A.
K − P0 1,000,000 − 100,000 900,000
A= = = =9
P0 100,000 100,000
Step 2: Solve for k at Year 1
1,000,000
400,000 = substitute for A, K, t
9 × e−k×1 + 1
10 1,000
Number of Residents Aware of the Product (Thousands)
4=
9e−k×1 +1 900 (3, 960)
4 × (9e−k×1 + 1) = 10
800
9e−k + 1 = 2.5 (2, 800)
700
9e−k = 1.5 600
e−k = 0.166666667 divide away the 9 500
−k
ln(e ) = ln(0.166666667) a = b iff ln a = ln b 400
u (1, 400)
−k = −1.791759469 ln e = u 300
k = 1.791759469 200
100
(0, 100)
0 0.5 1 1.5 2 2.5 3 3.5 4
Years
Substitute to find awareness after Year 2 Substitute to find awareness after Year 3
1,000,000 1,000,000
P= P=
9e−1.791759473×2 +1 9e−1.791759469×3 +1
1,000,000 1,000,000
P= P=
9e−3.583518938 + 1 9e−5.375278408 + 1
1,000,000 1,000,000
P= P=
9 × 0.0277777778 + 1 9 × 0.0046296296 + 1
1,000,000 1,000,000
P= P=
0.25000000 + 1 0.0416666667 + 1
1,000,000 1,000,000
P= P=
1.25000000 1.0416666666
P = 800,000 people had heard of the product P = 960,000 people had heard of the product
Chapter 6 Solving Separable Logistic Equations 79
A better match between the problem being studied and the model used to study it generally provides more
reliable study results. The logistic-growth model is only one of several hypothetical models that can be used to study
phenomena. Following are a few others that we will not cover in this book.
Population
Malthusian Catastrophe
Resources
Stagnation
Decline
Maturity
Growth
Vision
12
World Population (billions)
10
Spawners
Beverton-Holt stock-recruitment curves
Chapter 6 Review
Chapter 6 introduced a new kind of differential equation, (a) Exponential (unrestricted) growth
a logistic differential equation. The exponential-growth dif-
ferential equation differs from logistic differential equation
Population Size
1. disease control
Time
2. sociology (b) Logistic (restricted) growth
Environment’s carrying capacity
3. population growth bounded by available food Growth
Population Size
slows
4. the spread of genetic traits
P
dP Point of
= kP 1 − maximum
5. advertising awareness dt K
growth
Growth
Although logistic equations were a type of separable accelerates
differential equation, it was noted that their signature form and resulting curve differed. Time
Chapter 6 Solving Separable Logistic Equations 81
It was observed that the algebra necessary to solve a logistic differential equation was significantly more difficult
than solving a separable exponential-growth problem, and considerable time, effort, and page space (Appendix B)
were spent on obtaining a closed algebraic formula
K K − P0
P= , where A =
(A × e + 1)
−kt P0
which would allow for a “plug-and-chug substitution solution” for all future logistic differential equations. Thus, all
the tedious details involved in the development of the generic form were eliminated from all future logistic-problem
situations.
Several other modeling curves were shown for the reader’s consideration, and
it was noted that a model chosen to more closely model a situation generally Logistic
Separable Differential Equations
produces better the prediction results. Differential Equations
It was pointed out that logistic differential equations are a subset of separable
differential equations, so it should be obvious that categorizing the different types of differential equations will
become more complicated. The following chart should be considered a primitive and simplistic attempt to help
beginning students (the target audience for this book) review, differentiate, and mentally organize their thoughts to
this point in the book.
= kP(1 − K )
dP P
dt
Logistic growth
Online Application
Visit demonstrations.wolfram.com/LogisticEquation
for a great little application that will demonstrate
some of the concepts from this chapter. “Logis-
tic Equation” from the Wolfram Demonstrations
Project. Contributed by Jeff Bryant.
Appendix B
Converting a Logistic Differential Equation into
Its Algebraic (Integrated) Equivalent
Chapter 6 introduces
the idea
of a logistic differential equation. Since logistic differential equations—equations of
dP P dy
the form dt = kP 1 − K —are a subset of separable differential equations—equations of the form dx = f (x) ×
g(y), g(y) 0—they can be separated and solved as separable equations.
slows
Logistic
Point of maximum growth Separable Differential Equations
Differential Equations
The rate
accelerates
Time
Logistic Differential Equation
However, because of the complications involved in making that transformation, it is considered best to convert
a “generic logistic equation” into its generic algebraic (integrated) form and just use the algebraic form whenever
the need arises to solve a logistic differential equation. Remember that Chapter 6 makes the analogy
√
with the idea of
2 −b± b2 −4ac
solving a general quadratic equation, ax + bx + c = 0, using the quadratic formula, x = 2a .
Differential Equation Using the Logistic Model Integrated Equation Using the Logistic Model
dP P
= kP 1 − this is separable K
P = (Ae−kt +1)
, where A = K−P
P0
0
dt K
The following text shows how to convert from the generic Differential Equation for a Logistic Model to its
algebraic or integrated form. It is located here in Appendix B for those students who are curious as to how this con-
version is done. It is not really necessary for application-oriented students to understand the following logic in order
to solve logistic differential equations, but it is definitely desirable!! That is the difference between “mathmagic” and
P
mathematics.
dP
= kP 1 − original logistic differential equation form
dt K
P
dP = kP 1 − dt separation of differential dP from differential dt
K
K P
dP = kP − dt preparing to combine fractions
K K
K − P
dP = kP dt combine like fractions
K
K dP = kP(K − P) dt multiplying by K (“carrying capacity”) on both sides
K
dP = k dt grouping variables P and differential dP to the left
P(K − P)
285
286 Differential Equations: A Visual Introduction for Beginners
K
dP = k dt recopying from above after arithmetic detour
P(K − P)
A(K − P) + BP
dP = k dt >>>>> substituting for K from notes above <<<<<
P(K − P)
1(K − P) + 1 × P
dP = k dt substituting into A and B from notes above
P(K − P)
(K − P) + P
dP = k dt
P(K − P)
P + (K − P)
dP = k dt commutative property of addition
P(K − P)
" #
P (K − P)
+ dP = k dt splitting the numerator
P(K − P) P(K − P)
!
1 1 P K−P
+ dP = k dt canceling and
(K − P) P P K−P
Z ! Z
1 1
+ dP = k dt integrating both sides
(K − P) P
Z Z
1 1
dP + dP = kt + c1 integral of a sum on left, integral of k dt on right
K−P P
Z Z
(K − P)−1 dP + P−1 dP = kt + c1
Z Z Z
− (K − P) (−1) dP +
−1
P dP = kt + c1 preparing to apply
−1
u−1 du = ln u
Z
− ln |K − P| + c2 + ln |P| + c3 = kt + c1 u−1 du = ln u applied twice on left
K−P
= ±c5 × e−kt removing the absolute value
P
K−P
= c6 × e−kt substituting ±c5 = c6
P
Appendix B Converting a Logistic Differential Equation into Its Algebraic (Integrated) Equivalent 287
-
K−P
K−P
9−kt arbitrary substitution so that the final form is in the = Ae−kt
= Ae P
P standard format
K Let P = P(t). At
− 1 = A × e−kt splitting the numerator: K
P − P
P = K
P −1 time 0, then, P(t) =
P
K P(0) = P0 , so
= A × e−kt + 1
P K − P0
= Ae−k×0
K = A × e−kt + 1 × P P0
K K − P0
=P = A×1
(A × e−kt + 1) P0
K K − P0
P= where A = K−P0
A=
(A × e−kt + 1) P0
HH
Y : P0
H
Whew! Thanks patrickjmt on YouTube!! HH
H
H