0% found this document useful (0 votes)
166 views55 pages

Differential Equations: A Visual Introduction For Beginners: by Dan Umbarger

This document is a textbook on differential equations aimed at beginners. It contains 25 chapters that introduce key concepts related to differential equations, such as separable differential equations, systems of differential equations, and the Laplace transform. The textbook includes illustrations and MATLAB scripts in the appendices to provide visual and computational support. The introduction chapter explains that the goal of solving a differential equation is to find the function whose derivative is given, and that there may be a family of possible functions rather than a single solution. It also notes that students have been building the skills needed for differential equations since their algebra courses.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
166 views55 pages

Differential Equations: A Visual Introduction For Beginners: by Dan Umbarger

This document is a textbook on differential equations aimed at beginners. It contains 25 chapters that introduce key concepts related to differential equations, such as separable differential equations, systems of differential equations, and the Laplace transform. The textbook includes illustrations and MATLAB scripts in the appendices to provide visual and computational support. The introduction chapter explains that the goal of solving a differential equation is to find the function whose derivative is given, and that there may be a family of possible functions rather than a single solution. It also notes that students have been building the skills needed for differential equations since their algebra courses.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 55

Differential Equations:

A Visual Introduction
for Beginners
First printing

By Dan Umbarger
www.mathlogarithms.com

Illustrations by Al Diaz and Mark Lewkowicz


Contents

Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

0 Equations and Differentials, Review of Differential Calculus . . . . . . . . . . . . . . . . . . . . . . . . 1

1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2 Using Discrete Math to Solve Growth and Decay Problems . . . . . . . . . . . . . . . . . . . . . . . . . 25

3 Using Continuous Math to Solve Growth and Decay Problems; Introduction to Separable Differential
Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4 Solving Separable Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

5 More Applied Separable Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

6 Solving Separable Logistic Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

7 Predator–Prey: Introduction to Systems of Differential Equations . . . . . . . . . . . . . . . . . . . . . . 83

8 Solving “Linear” Differential Equations Using an Integrating Factor . . . . . . . . . . . . . . . . . . . . 89

9 Differential Equations in Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

10 Bernoulli Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

11 Review of Partial Derivatives and Integrals: Getting Ready for Exact Differential Equations . . . . . . . . 113

12 Exact Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

13 Homogeneous First-Order Substitution Technique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

14 Homogeneous Second-Order Linear O.D.E. Solution Technique with Constant Coefficients . . . . . . . . 145

15 Hooke’s Law and Homogeneous Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

16 Predator–Pursuit Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

17 Review of Algebraic Systems of Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

18 Epistemology: Axioms (Postulates) vs. Theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

19 Eigenvalues, Eigenvectors, and Mat × ~ε = λ × ~ε . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

20 Solving Systems of Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189


iii
iv Differential Equations: A Visual Introduction for Beginners

21 Phase-Plane Portraits for Two-by-Two Systems of Linear Homogeneous Differential Equations . . . . . . 203

22 Background Necessary to Understand the Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . 215

23 The Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

24 Applications of the Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

25 Reteaching, Reinforcing, Reviewing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

A MATLAB Scripts by Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

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

2.71828 Euler’s Equation, an Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293

F Solving for the Integrated Solution of a Two-by-Two System of Differential Equations . . . . . . . . . . . 295

G Analyzing a Generic Two-by-Two System of Ordinary Differential Equations . . . . . . . . . . . . . . . 299

H Solving for the Integrated Solution of an n-by-n System of Differential Equations . . . . . . . . . . . . . 305

I Calculate the Laplace Transform of sin(at) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309


Chapter 1
Getting Started

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

are all equal when x = a, when


x = 0, and when x = b. There is −4 −3 −2 −1 1 2 3 4 −3 −2 −1 1 2 3

−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

Do you remember in calculus how you learned


to successively approximate the slope of a tangent
line by calculating the slope of approaching secant Slope field for f ′(x) = 2x
lines? (See Chapter 0.) Well a smart Swiss mathe-
For the particular solution
matician, Leonhard Euler, 1707–1783, figured out
passing through (2, 1),
there is a way to find f(6) (6, ??)
a way to successively approximate the solution to
a differential equation for a given value of x. The
without solving for f(x).
genius of Euler—who is credited with this itera-
dy
tive method of solving for f (x) if given dx , that is

f (x)—was that 1) he could mentally visualize the
dy
entire slope field for dx , that is every f (x) whose (2, 1)
derivative is f  (x), and 2) he realized that he could
use the known fact that (x, y) was on the unknown
f (x) to successively approach f (z) for any z using
algebra and trigonometry and the known f  (x)—i.e., dx dy
. Today, we have graphing calculators and computer software
packages that will help us see what Euler could visualize in the 1700s. As the slope indicators become shorter and
the tangent indicators become more numerous, each specific (particular) slope field approaches a particular solution,
f (x). Using the information we do have, dx dy
= f  (x) = 2x and the fact that f (x) passes through the point (2, 1), we
can get an initial estimation of f (6) without knowing the function f (x).
In the figure above, we have a point (2, 1) and we know the slope of the unknown function at x = 2 is 4. That is,

f (2) = 2 × 2 = 4. We wish to find the unknown point (6, ?) on the unknown function f (x). With the two given x
values (2 & 6), we can determine ∆x = 6 − 2 = 4. If we could determine ∆y, we could calculate y + ∆y and obtain
Chapter 1 Getting Started 21
opp=y
the new y value. How can we determine the ∆y value? We know from studying trigonometry that tan θ = adj=x hence
rise=y
opp = (tan θ) × adj. We know from studying algebra that m = run=x . So, tan θ = m.

Slope = m
y opp
1. The slope = m = x = adj . opp
2. opp = m × adj

adj

Substituting into opp = m × adj


∆y = m × ∆x
∆y = 2x × 4 . . . m at point (2, 1) is 2x
∆y = 4 × 4 = 16 . . . m at point (2, 1) = 4

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

Indeterminate division by zero


22 Differential Equations: A Visual Introduction for Beginners

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

N xn = xn−1 + ∆x ∆y = 2 × xn−1 × ∆x yn = yn−1 + ∆y (xn ,yn)


1 x1 = 2 (given) Not applicable y1 = 1 (given) (2, 1)
2 x2 = 2 + 1 = 3 2×2×1=4 y2 = 1 + 4 = 5 (3, 5)
3 x3 = 3 + 1 = 4 2×3×1=6 y3 = 5 + 6 = 11 (4, 11)
4 x4 = 4 + 1 = 5 2×4×1=8 y4 = 11 + 8 = 19 (5, 19)
5 x5 = 5 + 1 = 6 2 × 5 × 1 = 10 y5 = 19 + 10 = 29 (6, 29)

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

∆x = 4 ∆x = 1 ∆x = 0.1 ∆x = 0.01 ∆x = 0.001


x y x y x y x y x y
2.0 1.0 2.0 1.0 2.0 1.00 2.00 1.00 2.000 1.000
6.0 17.0 3.0 5.0 2.1 1.40 2.01 1.04 2.001 1.004
4.0 11.0 2.2 1.82 2.02 1.08 2.002 1.008
5.0 19.0 .. .. 2.03 1.12 2.003 1.012
. .
6.0 29.0 .. .. 2.004 1.016
5.7 29.12 . .
.. ..
5.8 30.26 5.97 32.60 . .
Compare (6, 32.996) for ∆x = 0.001, 5.9 31.42 5.98 32.72 5.997 32.960
with the exact solution (6, 33) we got 6.0 32.66 5.99 32.84 5.998 32.972
several pages back. Fortunately, these 6.00 32.96 5.999 32.984
answers are close. Otherwise, there 6.000 32.996
would be egg on the author’s face!
Chapter 1 Getting Started 23

public class EulersMethodSolvingAnODE


{
public static void main(String args[])
{
double x = 2;
double y = 1;
double deltaX = 1; // ∆x is run for 4, 1, 0.1, 0.01, and 0.001
System.out.println("x y"); // column headers
while (x <= 6)
{
System.out.println(x + ", " + y);
// tan theta = opp/adj, so opp = tan theta * adj. Ergo y n = y n - 1 + dy/dx * ∆ x
y = y + (2 * x) * deltaX; // new y = old y + length side opposite theta
x = x + deltaX; // new x = old x + deltaX
} // end while
} // end main
} // end JavaTemplate

There are software packages available that al-


low you to experiment with the ideas taught in a
differential equations class. A jar file can be pur-
chased from Cengage Publishers. One of the op-
tions allows the user to experiment with Euler’s
method for different differential equations.
Below, passing through (0.24, 1.2), you see
Euler’s method for ∆x = 1, 0.5, 0.25, 0.125, and
the Runge–Kutta 4 algorithm applied to the differ-
ential equation dy
dt = y − 4t.
2

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

4 of ordered pairs of points which,


as closely as desired, approxi- ∆x = 0.001
3 x y
mate points lying on the un-
2 2.000 1.000
known function, f (x). Then, us-
2.001 1.004
1 y −t
2 ing the slope information immedi-
2.002 1.008
ately available from the differen-
0 dy 2.003 1.012
tial equation ( dx = m, right?) to-
2.004 1.016
−1 gether with any desired delta value .. ..
and simple trig function knowl- . .
−2 5.995 32.936
edge such as shown above in Eu-
−3 ler’s method, one could write code 5.996 32.948
to identify end points of a tangent 5.997 32.960
−4
−4 −2 0 2 4 segment to the unknown f (x). The 5.998 32.972
code to draw straight-line segments between two points is well known and precoded in 5.999 32.984
many languages (e.g., g.drawLine in Java). Voilà! There you have a tangent segment 6.000 32.996
drawn to a point that is on, or very, very close to being on the unknown function curve. If
you bring your delta close to zero, then the tangent-line slope segment approaches length “zero” which in “comput-
erese” means one pixel. Then your graph would be a very close visualization of the unknown solution function itself.
That function (shown above) can be thought of as a particular example of the family of solutions differentiated from
the others by the fact that each of its tangent-slope segments are of length “one pixel.” Look at the figure and reread
this paragraph if it was not clear at first.

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.

Continuous Compounding of Interest Continuous Population Growth Carbon 14 Decay


dp dP dC
=r×p =r×P = r×C
dt dt dt
1 1 1
dp = r dt dP = r dt dC = r dt
p Z P Z Z C Z
1 1
Z Z
1
dp = r dt dP = r dt dC = r dt
p P C
etc. etc. etc.

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

we get the following examples.

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

Reverse Implicit Differentiation


Explicit Differentiation dy −x
Implicit Differentiation =
x2 + y2 = 25 (25 is r2 ) dx y
x2 + y2 = 25
y2 = 25 − x2 y dy = −x dx
d  2  d
 1 x + y2 = (25) Z Z
y = ± 25 − x2 2 *** dx dx y dy = − x dx
dy
dy 1 − 1 2x + 2y = 0
= ± 25 − x2 2 (−2x) dx y2 x2
dx 2 dy + c1 = − + c2
−x 2y = −2x 2 2
= 1 dx x 2 y2
± 25 − x2 2 dy −x + =C
−x = 2 2
= √ dx y x2 + y2 = K 2
± 25 − x2
−x Here, the derivative is in terms of
= (from *** above) For x = 4 and y = 3, K = 5.
y both x and y.
x2 + y2 = 25

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

(0, 0) indet red −2


(0, −1) 0 red
−3
(0, −2) 0 red
−4
(0, −3) 0 red −4 −2 0 2 4

Step 2: Green slope segments for x = 1.


dy
dx = − yx
(x, y) (m) Slope color
(1, 3) − 13 green
4
(1, 2) − 12 green
(1, 1) −1 green 3
(1, 0) undef green
2
(1, −1) 1 green
(1, −2) 1
2 green 1
1
(1, −3) green
3 0
Step 3: Blue slope segments for x = −1.
dy −1
dx = − yx
(x, y) (m) Slope color −2
1
(−1, 3) 3 blue
(−1, 2) 1
blue −3
2
(−1, 1) 1 blue −4
(−1, 0) undef blue −4 −2 0 2 4
(−1, −1) −1 blue
(−1, −2) − 12 blue
(−1, −3) − 13 blue
Chapter 4 Solving Separable Differential Equations 47

Step 4: Brown slope segments for x = 2.


dy
dx = − yx
(x, y) (m) Slope color
(2, 3) − 23 brown
4
(2, 2) −1 brown
(2, 1) −2 brown 3
(2, 0) undef brown
2
(2, −1) 2 brown
(2, −2) 1 brown 1
2
(2, −3) brown
3 0
Step 5: Orange slope segments for x = −2.
dy −1
dx = − yx
(x, y) (m) Slope color −2
2
(−2, 3) 3 orange
(−2, 2) 1 orange −3
(−2, 1) 2 orange −4
(−2, 0) undef orange −4 −2 0 2 4
(−2, −1) −2 orange
(−2, −2) −1 orange
(−2, −3) − 23 orange Step 6: Purple slope segments for x = 3.
dy
dx = − yx
(x, y) (m) Slope color
(3, 3) −1 purple
4
(3, 2) − 23 purple
3 (3, 1) −3 purple
(3, 0) undef purple
2
(3, −1) 3 purple
1 (3, −2) 3
2 purple
(3, −3) 1 purple
0
Step 7: Black slope segments for x = −3.
−1 dy
dx = − yx
−2 (x, y) (m) Slope color
(−3, 3) 1 black
−3 (−3, 2) 3
black
2

−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

Step 2: Green slope segments for x = 1.


dy
dx =y−x
(x, y) (m) Slope color
(1, 3) 2 green
4
(1, 2) 1 green
3 (1, 1) 0 green
(1, 0) −1 green
2
(1, −1) −2 green
1 (1, −2) −3 green
(1, −3) −4 green
0
Step 3: Blue slope segments for x = −1.
−1 dy
dx =y−x
−2 (x, y) (m) Slope color
(−1, 3) 4 blue
−3 (−1, 2) 3 blue
−4 (−1, 1) 2 blue
−4 −2 0 2 4 (−1, 0) 1 blue
(−1, −1) 0 blue
(−1, −2) −1 blue
(−1, −3) −2 blue
Chapter 4 Solving Separable Differential Equations 49

Step 4: Brown slope segments for x = 2.


dy
dx =y−x
(x, y) (m) Slope color
(2, 3) 1 brown
4
(2, 2) 0 brown
(2, 1) −1 brown 3
(2, 0) −2 brown
2
(2, −1) −3 brown
(2, −2) −4 brown 1
(2, −3) −5 brown
0
Step 5: Orange slope segments for x = −2.
dy −1
dx =y−x
(x, y) (m) Slope color −2
(−2, 3) 5 orange
(−2, 2) 4 orange −3
(−2, 1) 3 orange −4
(−2, 0) 2 orange −4 −2 0 2 4
(−2, −1) 1 orange
(−2, −2) 0 orange
(−2, −3) −1 orange
Step 6: Purple slope segments for x = 3.
dy
dx =y−x
(x, y) (m) Slope color
(3, 3) 0 purple
4
(3, 2) −1 purple
3 (3, 1) −2 purple
(3, 0) −3 purple
2
(3, −1) −4 purple
1 (3, −2) −5 purple
(3, −3) −6 purple
0
Step 7: Black slope segments for x = −3.
−1 dy
dx =y−x
−2 (x, y) (m) Slope color
(−3, 3) 6 black
−3 (−3, 2) 5 black
−4 (−3, 1) 4 black
−4 −2 0 2 4 (−3, 0) 3 black
(−3, −1) 2 black
(−3, −2) 1 black
(−3, −3) 0 black
50 Differential Equations: A Visual Introduction for Beginners

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

Except for instructional materials on beginning differen-


4
tial equations, there is very little need to graph a lot of slope
fields by hand. In this third case, graphing the slope field for 3
dy
dx = y − y − 6y, there is the benefit in that we get a vi-
3 2
2
sual on what the term autonomous means. Above, the term
autonomous differential equation was defined as a differential 1
equation that did not have any x terms. We can now add to that
definition. An autonomous equation is a differential equation −4 −3 −2 −1 0 1 2 3 4
dy
that, for each y, has the same slope, dx , for all x values. This −1
is also a good time to talk about sources and sinks. A source
−2
asymptote (y = 3, y = −2 at right) is a line from which the
slope lines on each side are “leaving.” A sink asymptote (y = 0) −3
is a line that is being approached by slope lines on both sides.
−4
Note that approaching and leaving are taken from the point of
view of x increasing.
52 Differential Equations: A Visual Introduction for Beginners

A node asymptote has slopes approaching from one side 4


but leaving from the other as shown in this unrelated graph.
3
Another benefit to hand graphing an autonomous differen- y = x2
tial equation (e.g., dx = y3 − y2 − 6y) is to introduce the 2
dy
dy
concept of phase-plane analysis. Above, dx = y3 − y2 − 6y 1
dy
was factored as dx = y(y − 3)(y + 2). That looks very much node
0
like the polynomials we studied in precalculus. We remem- node
ber graphing cubic polynomials. Often they crossed the in- −1
dependent axis at three places. This cubic polynomial would −2
obviously cross at −2, 0, and 3. That suggests the following.
−3
Graph y = y3 −y2 −6y just as you were taught in precalculus
except, since all the independent and dependent values have −4−4 −2 0 2 4
changed, you would label the vertical and horizontal axes accordingly: the vertical axis as y and the horizontal
axis as y (figure below left). Since the coefficient of the y3 term is positive, the graph will increase from negative
infinity, cross at y = −2, then ascend above the y-axis until it reaches a local maximum where it descends and crosses
again at y = 0. It then continues descending below the y-axis until it reaches a local minimum where it again starts
ascending until it crosses the y-axis at y = 3 and continues on to positive infinity. For each place where the graph of
y = y3 − y2 − 6y crosses the y-axis, the graph of the solution to our differential equation, dxdy
= y3 − y2 − 6y, would
have a slope value of zero at that y value. This is shown in the x–y graph at the right.

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

3. Sink asymptote—an asymptote toward which a particular solution is converging

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

form to obtain the amount of substance after two hours.

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.

Fundamental Photographs Fundamental Photographs

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

60 How long before the amount of the substance


decreases to 1 g?
40
100
1=
20
4t + 1
(2, 11.11) 4t + 1 = 100
(24.75, 1)
0 4t = 99
−5 0 5 10 15 20 25
Time (hours) t = 24.75 h
MATLAB script for the above graph is located in
before the substance is reduced to one gram.
Appendix A.
Chapter 5 More Applied Separable Differential Equations 57

Differential Equations in Meteorology—Barometric Pressure


It seems counterintuitive, but air has weight. A column of air above your head is pushing down on you right now. At
sea level the weight of that column of air would be more than if you were standing on top of Mt. Everest because
there would be a shorter column of air over your head on top of Mt. Everest than there would be at sea level. For
points on the earth’s surface, a simplistic model of barometric pressure, p (in inches of mercury in a barometer),
is that, with increasing altitude, pressure decreases in direct proportion to the current pressure: dp
dh = −0.2p where
p = 29.92 inches of mercury at sea level where h = 0 (miles). Find the barometric pressure at the top of Mt. Everest
at 29,029 ft.

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|

ln p = −0.2h + c3 constants, p > 0


eln p = e−0.2h+c3 a = b so ea = eb
p = e−0.2h × ec3 bm+n = bm × bn
p = e−0.2h × c4 new constant ***
−0.2×0
29.92 = c4 × e p = 29.92 at sea level
0
29.92 = c4 × 1 e =1
c4 = 29.92
p = 29.92 × e−0.2h from *** above
−0.2× 29,029
p = 29.92e 5,280 Everest’s h in miles
p = 29.92 × e−0.2×5.497916667 35
−1.099583333
p = 29.92 × e 30
p = 29.92 × 0.3330098089 25
Altitude (miles)

p = 9.96 inches of mercury


20

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

Mixing as a Differential Equation


After all his salt-water fish died, the owner of a large 1,000 L cylin-
drical fish tank has decided to replace them with freshwater fish.
The owner could have just drained and cleaned the tank but instead
he decided to drain the salt water from the tank at 10 L per minute
while simultaneously replacing it with freshwater. The water had
been kept at 3.5% (0.035) salt content meaning that in the 1,000 L
tank there was 35 kg of salt.* The solution in the tank is kept mixed
during the replacement process. How much salt will be in the tank
after five hours? The owner has been told that the water must be
less than 0.1% salt before he can put in his freshwater fish. How
long will that take?
Let A(t) = amount of salt in kilograms remaining after t min-
utes. Then, A(0) = 35 kg, the amount of salt at time 0: 0.035 × 1,000 L. A(t) = ??, amount of salt at time t. A(300) =
0 kg A kg
amount of salt at time 5 h. dA dA L L
dt = amount of salt coming in − amount of salt exiting. dt = 10 L ×10 min − 1,000 L ×10 min .
dA kg A kg
dt = 0 min − 100 min , the first term will drop out.

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

Differential Equations in Electrical Circuits—Kirchhoff’s Laws


In 1845 German physicist Gustav Kirchhoff (1824–1887) announced Kirchhoff’s laws, which allowed calculation
of the currents, voltages, and resistances of electrical networks. Kirchhoff’s current law states that the current (flow
of electrons) entering a junction is equal to the current leaving the junction. Kirchhoff’s voltage law states that, in a
circuit with only resistors and inductors, the sum of the voltage drops of the resistors and the inductors in a closed

loop equals the total voltage gain of the source. That is, the sum of the voltages around a closed loop is 0, vi = 0.
The resistors and the inductors in a circuit both work to reduce voltage; the difference is that a resistor works to
impede or reduce voltage whereas the inductor only works to impede or reduce a change in current. Kirchhoff’s
voltage law is often written as L dIdt + RI = V(t) using Ohm’s law (V = IR) as a measure of voltage drop in an
inductor. Solving for I gives you an integrated formula to calculate current at a given time.

10 Ω
If a battery supplies a constant
voltage of 30 V, the inductance is
Switch

2 H (henrys), the resistance is 10 Ω

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

Newton’s Law of Cooling


Sir Isaac Newton found that the rate at which an object cools is directly proportional to the difference between
the object’s temperature and the temperature of the surrounding medium (air, water). Hopefully your attention was
caught by the following phrases: “rate of cooling (over time)” and “directly proportional.” Déjà vu! Something seems
familiar here. Follow the following progression of thought from words to symbols.
Rate of cooling (over time) is directly proportional to the difference between the object’s temperature and the
ambient temperature.
Change of temp (over time) = k× (object’s temp − ambient temp)

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.

† ‡

Kitchen Ballroom Conservatory

Billard Room
Cellar
Dining Room with
envelope Library

Lounge Hall Study

‡ †
62 Differential Equations: A Visual Introduction for Beginners

Differential Equations for Continuous Compound Interest—Revisited


At the risk of oversimplifying, investments are categorized as eq-
uities (stocks), with various levels of risk, and bonds with lower,
but “guaranteed,” fixed levels of income. In planning for retire-
ment a retired person moved $300,000 out of an equity account
into income-producing bonds. If that account returned 5% a year
compounded continuously, how much money could the retiree
count on to spend from the interest from his account each year?
Well, in Chapter 3, we studied the formula p f = p0 × ert . For the
conditions stated above, this would be p1 = $300,000 × e0.05×1 .
p = $300,000 × 1.051271096 = $315,381.33. Therefore, the re-
tiree could withdraw $15,381.33 a year without drawing down
his principal. However, without a paycheck coming in anymore, the retiree needs more than $15,381.33 a year to
cover his living expenses. Given his family history, the retiree decides to plan on 20 years of additional life ex-
pectancy. In addition to the 5% annual growth of his money, could he draw down an additional $23,000 a year and
still not outlive his money at the end of that 20 years? We solved the previous continuous interest problem using the
differential equation dp dp
dt = 0.05p, so it is tempting to solve this problem with dt = 0.05p − $23,000. There is a flaw
with that approach, but we will start out that way and then discuss the results.

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

(0.05p − 23,000)−1 dp = dt 5p − 2,300,000 = c7 × e 20


t
5p = 2,300,000 + c7 × e 20
Z Z
(0.05p − 23,000)−1 dp = dt t
c7 × e 20
Z p = 460,000 +
20 (0.05p − 23,000)−1 × 0.05 dp = t + c1 5
t
p = 460,000 + c8 × e 20 *** t = 0, p = 300,000
20 ln |0.05p − 23,000| + c2 = t + c1 0
300,000 = 460,000 + c8 × e 20
20 ln |0.05p − 23,000| = t + c1 − c2
−160,000 = c8 × 1
20 ln |0.05p − 23,000| = t + c3
c8 = −160,000
1
ln |0.05p − 23,000| = (t + c3 )
20 Finally, substituting into *** above
t c3
ln |0.05p − 23,000| = +
20 20 p = 460,000 − 160,000 × e 20
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

public class ContinuousGrowthOfPrincipal Code check for “continuous”


{ interest
public static void main(String args[]) p f = p0 ert
{
= 300,000 × e0.5×20
double t = 0;
double r = 0.05; = 300,000 × e
double p = 300000; = 815,484.5485
double deltaT = 0.000001; // 10E-6 Annual withdrawal is
double annualWithdrawal = 23000; $0
boolean exactYear = true; deltaT is 0.000001
System.out.println("Annual Withdrawal is " + AnnualWithdrawal); t p
System.out.println("Delta t is " + deltaT); 0 300,000.00
System.out.println(" t p"); // column headers 1 315,381.33
System.out.println("\n " + (int)t + ", " + p); // initial 2 331,551.29
// remove Java comment symbol for output at right 3 348,550.27
.. ..
p -= annualWithdrawal; // starting annual drawdown . .
while (t < 20) 18 737,880.95
{ 19 775,712.92
// output for p shown top right 20 815,484.57
p += ((r * p) * deltaT); // compound annual interest calculated
// "continuously" Annual withdrawal is
t += deltaT; $23,000
exactYear = (t - (int)t) < deltaT; deltaT is 0.000001
if(exactYear) t p
{ 0 300,000.00000000000
System.out.println(" " + (int)t + ", " + p); 1 291,202.09511577286
// remove Java comment symbol for output right 2 281,953.10913769866
p -= annualWithdrawal; // annual drawdown 3 272,229.92028027700
.. ..
} // end if . .
} // end while 18 49,538.19527624527
} // end main 19 27,898.83764041088
} // end class 20 5,150.00639080917

300,000 (0, 300,000)

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

Checking Solutions to Differential Equations


Since beginning algebra, you should have been encouraged to check your work
2
by substituting the scalar answer back into the original algebraic equation. x−2=4
3
Up to this point, all of our work has been checked using slope fields drawn 2
!
in MATLAB and fitting a particular solution through given initial condition. The 3 x−2 =3×4
3
old way (before Mathematica and MATLAB) to check work done solving a dif- 2x − 6 = 12
ferential equation was to take the derivative of the solution and see if it matches
2x = 18
with the given differential equation. For the sake of nostalgia, that way to check
x=9
work on a differential equation is shown below.
Is x2 + y2 = Cy a solution of dxdy
= x22xy ? In other words, is x2 + y2 = Cy a check by back substituting
−y2
solution of y0 = x22xy ? 2 ?
−y2 ×9−2=4
If C = 5, will the particular (specific) solution pass through the point (2, 4)? 3
?
Substituting as appropriate into the original general solution, we get x2 + y2 = 6−2=4
? ?
Cy → 22 + 42 = 5 × 4 → 4 + 16 = 20 → 20 = 20. Yes, the point (2, 4) will lie on 4 = 4 ck
the particular curve that results when C = 5.
Will the point (3, −1) lie on that particular curve when C =
d  2  d
x + y = (Cy)
2 ? ? ?
5? 32 + (−1)2 = 5 × (−1) → 9 + 1 = −5 → 10 = −5. No.
dx dx
dy dy
2x + 2y = C
dx dx Chapter 5 Review
dy dy
2y − C = −2x
dx dx Following up on the three examples of separable differential
dy
(2y − C) = −2x equations in Chapter 4, several more examples of that type or
dx
dy −2x category of differential equation were presented. The differential
= equations applied to
dx 2y − C
!
dy −2x y 1. chemistry
= ×
dx 2y − C y
dy −2xy 2. meteorology
= 2
dx 2y − Cy
3. mixing problems
dy −2xy
=
dx 2y2 − x2 + y2 4. electrical circuits

dy −2xy
= 5. Newton’s Law of Cooling
dx y2 − x2
dy −2xy −1 6. continuous compound interest with withdrawals
= ×
dx y2 − x2 −1
dy 2xy Finishing out Chapter 5, an example of the pre-Mathematica,
= 2 ck pre-MATLAB technique of checking solutions to differential
dx x − y2
dy 2xy
Yes, x2 + y2 = Cy is a solution of dx = x2 −y2 . equations was shown. Today many differential equation books
start out showing that technique when introducing the reader to
what a differential equation is. The book will have a function that it says it got somewhere and, by substitution,
show that it satisfies a differential equation. The author then assumes that he/she has properly introduced what a
differential equation is. Of course many beginning students will be fixated on where that “mystery” function came
from and not be able to focus on the successful substitution and on the point that the author is trying to introduce.
Many, many math teachers and authors believe that math instruction should at all times be complete and rigorous
and deal with all contingencies at the time of introduction. My philosophy is that sort of thinking discounts the
importance of “student readiness” and is counterproductive for most beginners. What follows is a primitive chart to
help beginning students (the target audience for this book) differentiate and mentally organize their thoughts to this
point in the book. Bear in mind that it will have to be adjusted as more knowledge and information is covered.
66 Differential Equations: A Visual Introduction for Beginners

Ordinary Differential Equations (ODE) by category


* Introduced
*** Covered

Only a decimal Closed form (analytical


approximation solution) and decimal
can be found approximation can be found

Euler’s method Separable (*** Chapters 1–5)


(*** Chapter 1) y′ = f(x) × g(y), g(y) ≠ 0
Runge–Kutta dy
dx = f(x) × g(y), g(y) ≠ 0

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

Point of maximum growth

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

The population’s growth The environment’s carrying capacity


rate accelerates
The rate
Population Size

Population Size

slows

Point of maximum growth

The rate
accelerates
Time Time

public class JavaTemplate


{
public static void main(String args[])
{
double r = 0.05; // rate of growth
int K = 2000; // carrying capacity
double P = 1000; // population, principal, whatever
System.out.println(" t P deltaP" + "\n");
for (int t = 1; t < = 200; t++)
{
double oldP = P;
P += r * P * (K - P)/K; // logistic growth
// P += r * P; // exponential growth
double deltaP = P - oldP;
System.out.println(" " + t + " " + P + " " + deltaP);
} // end loop
} // end main
} // end class
Chapter 6 Solving Separable Logistic Equations 69

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

1. Differential Equations in Disease Control


After spring break, a college campus nurse identified 10 students with cooties. At Day 4, she identified 30
students. There are 800 students on campus. Assuming the infection grows logistically, how many students
will be infected after five weeks? Disease spread is limited to 800 students.

2. Differential Equations in Sociology—Measuring the Spread of Rumors


In a high school with 2,000 students, a couple breaks up. By the end of the day, 20 people know about it. By
the end of the next day, 70 people know about it. Assuming the gossip spreads logistically, how many days
will it take for half the school to know? Rumor spread is limited to 2,000 students.

3. Differential Equations in Biology—Measuring Population Growth


A population of prairie dogs is estimated to be 800 prairie dogs. After four weeks there are 1,000 prairie
dogs. Biologists estimate that there is only food for 1,800 prairie dogs. Assuming the population grows
logistically, how many prairie dogs will there be after 10 weeks? After 20 weeks? The number of prairie dogs
is limited to 1,800.

4. Differential Equations in Genetics—Monitoring Inheritance of Characteristics


A geneticist is studying a population of mice to determine how quickly a physical trait will spread into the
next generation. At the start of the study (t = 0), she has established that 30% of the population has the
characteristic. After five generations (t = 5) she finds that 85% of the population has the characteristic. Use
the logistic function to determine the percentage of mice that will have the studied trait after eight generations.
The percentage of population is limited to 100%.

5. Differential Equations in Advertising—Monitoring Effectiveness of an Advertising Campaign


A company making and selling widgets is engaged in a marketing campaign in a large metropolitan area of 1
million people. Assuming logistic growth, use the given IVP conditions to measure the effectiveness of the
campaign. The maximum number of people who could hear about the product is 1 million people.

We’ll look at each of these examples in more detail


later, but first we should look a little more closely at the
theory behind logistic equations and their relationship to Logistic
separable differential equations. Logistic equations are a Separable Differential Equations
subset of separable differential equations, although this Differential Equations
is not evident when comparing the two:

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

Ex 1. Differential Equations in Disease Control—Logistic Model

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

300 (14, 314)

200

100

0 10 20 30 40 50
Days
74 Differential Equations: A Visual Introduction for Beginners

Ex 2. Differential Equations in Sociology—Measuring the Spread of Rumors


In a high school with 2,000 students, a couple breaks up. By the end of the day, 20 people know. By the end of the
next day, 70 people know. If the logistic model holds, how many days will it take for before half the school knows?

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

Students Who Know


1000
(3.59, 1,000)

500

0 1 2 3 4 5 6 7 8 9 10
Days since Breakup
MATLAB script for the graph above in Appendix A.

Ex 3. Differential Equations in Game Management—Measuring Population Growth


A population of prairie dogs is estimated to be 800. After four weeks, there are
1,000 prairie dogs. Biologists estimate that there is only food for 1,800 prairie
dogs. Assuming the logistic model holds, how many prairie dogs there will be
after 10 weeks? 20 weeks? 30 weeks?
dP P
= kP(1 − )
dt K
dP P
= kP(1 − ) carrying capacity = 1,800
dt 1,800
K K − P0
P= −kt
, where A = , integrated form of the logistic-model equation
(A × e + 1) P0
Step 1: Solve for A.
1,800 − 800 1,000
A= = = 1.25
800 800
1,800
P=
(1.25 × e−kt + 1)
Step 2: Use K and A to solve for k at time four weeks
K
P=
(A × e−kt + 1)
1,800
1,000 = substitute for A, K, and t into the integrated form of
(1.25 × e−k×4 + 1)
logistic-model equation
1,000 × (1.25 × e−k×4 + 1) = 1,800 multiply to eliminate the fraction
(1.25 × e−k×4 + 1) = 1.8 divide away the 1,000
76 Differential Equations: A Visual Introduction for Beginners

1.25 × e−k×4 = 0.8 subtract 1 from both sides


0.8
e−k×4 = divide away the 1.25
1.25
e−k×4 = 0.64 convert fraction to a decimal
ln e−k×4 = ln 0.64 a = b iff ln a = ln b
−k × 4 = −0.4462871026 ln eu = u on left, ln value on right
k = 0.1115717757 solve for k

Substitute A, K, and k into the integrated logistic-growth-model


1800
equation. Solve for t = 10, 20, 30.
1600 (30, 1,724)
K (20, 1,587)
P= , for t = 10 1400
(A × e−kt + 1)

Prairie Dog Population


1,800 1200 (10, 1,277)
P=
(1.25 × e−0.1115717757×10 + 1) 1000
1,800 800
P= −1.115717757
multiply by 10 in the
(1.25 × e + 1)
exponent of e 600
1,800
P= calculate e−1.115717757 400
(1.25 × 0.32768000 + 1)
200
1,800
P= calculate product
(0.4096000 + 1) 0 5 10 15 20 25 30
1,800 Weeks
P= add 1 in the denominator
1.4096000
P = 1,277
K
P= , for t = 20
(A × e−kt + 1)
1,800
P= −0.1115717757×20
(1.25 × e + 1)
1,800
P= e−0.1115717757×20 = e−2.231435514
(1.25 × e−2.231435514 + 1)
1,800
P= calculate e−2.231435514
(1.25 × 0.1073741823 + 1)
1,800
P=
(0.1342177279 + 1)
1,800
P=
1.134217728
P = 1,587
K
P= , for t = 30
(A × e−kt + 1)
1,800
P= −0.1115717757×30
(1.25 × e + 1)
1,800
P= e−0.1115717757×30 = e−3.3471532710
(1.25 × e−3.3471532710 + 1)
1,800
P= calculate e−3.3471532710
(1.25 × 0.0351843720 + 1)
1,800
P=
(0.0439804650 + 1)
1,800
P=
1.0439804650
P = 1,724
Chapter 6 Solving Separable Logistic Equations 77

Ex 4. Differential Equations in Genetics—Monitoring Inheritance of Characteristics


A geneticist is studying mice to determine how quickly a physical trait will spread through a population from one
generation to the next. At the start of the study (t = 0), she has established that 30% of the population has the
characteristic. After five generations (t = 5), she finds that 85% of the population has the characteristic. Assume the
logistic growth model to determine the percentage of mice that will have the studied trait after eight generations and
after 10 generations.
Step 2: After five generations
dP  P K
= kP 1 − P=
dt K A × e−kt + 1
dP  P 
= kP 1 − carrying capacity: 100% 100%
dt 100% 85% = P = 85%
2.333e−k×5 + 1
K   when t=5
P= , logistic model integrated form −5k
A × e−kt + 1 0.85 × 2.333e + 1 = 1
2.333e−5k + 1 = 1.176
Step 1: Solve for A.
2.333e−5k = 0.176
K − P0 100% − 30% 70% e−5k = 0.076
A= = = = 2.333
P0 30% 30%
ln e−5k = ln(0.076) a = b iff ln a = ln b
−5k = −2.582 ln eu = u
1.0
k = 0.516
0.9 (8, 96.38) (10, 98.68)
0.8 (5, 85) After eight generations
100%
Portion Having Trait

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

Ex 5. Differential Equation Modeling Advertising Awareness


A company making and selling widgets is engaged in a marketing campaign in a large metropolitan area of 1 million
people. At the beginning of an advertising campaign, only 10% (100,000) of the citizens had heard of the product.
At the end of one year, 40% (400,000) of the citizens had heard of the product.. Assuming the amount of advertising
stays the same and assuming that awareness of the product grows as in the logistic model, how many people will
have heard of the product at the end of the second year? At the end of the third year?

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.

Gompertz Growth Model Molecular Model

Population

Malthusian Catastrophe
Resources

Malthusian Growth Model Exponential Growth and Decay

Stagnation

Decline

Maturity

Growth

Vision

Sigmoid Growth Model


Weibull Model
80 Differential Equations: A Visual Introduction for Beginners

12
World Population (billions)

10

0 500 1000 1500 2000 2300


CE Year
Hyperbolic Model Ricker’s Function
Recruits

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

in that the latter had some sort of natural bounds placed


dp The growth accelerates
upon the upper limit of growth of the data being observed. = kP
dt
Five examples were given:

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.

Ordinary Differential Equations (ODE) by category * Introduced


*** Covered

Only a decimal Closed form (analytical


approximation solution) and decimal
can be found approximation can be found

Euler’s method Separable (*** Chapters 1–5)


(*** Chapter 1) y′ = f(x) × g(y), g(y) ≠ 0
dy
Runge–Kutta dx= f(x) × g(y), g(y) ≠ 0
Exponential growth
Exponential decay

Logistic (*** Chapter 6)


P′ = kP(1 − K )
P

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

The environment’s carrying capacity


The rate
Population Size

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

************************** arithmetic trickery . . . separation of fractions **************************


K A B K−P A B P A(K − P) + BP
Let = + = × + × =
P(K − P) P K − P K − P P K − P P P(K − P)
>>>>>>>> So, by the transitive rule, K = A(K − P) + BP <<<<<
Let P=0 Let P=K
Then K = A(K − 0) + B × 0 Then K = A(K − K) + BK clever substitutions to simplify
K = AK K = A × 0 + BK
A=1 K = 0 + BK
B=1
******************************************************************************************

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

− ln |K − P| + ln |P| = kt + c4 combining all three constants of integration


−1 × [− ln |K − P| + ln |P|] = −1 × (kt + c4 ) eliminating the leading −1 from the left side
ln |K − P| − ln |P| = −kt − c4 distributive property both sides

K − P a
ln = −kt − c4 log = log a − log b
P b
K−P
eln| P | = e−kt−c4 if m = n, then bm = bn

K − P = e−kt × e−c4 eln u = u on left, ea+b = ea × eb on right
P

K − P = c × e−kt substituting e−c4 = c
P 5 5

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

You might also like