Professional Documents
Culture Documents
RAFAEL GRANERO-BELINCHON
Abstract. In this notes we present some autonomous differential equations and applications. We also provide some examples with solutions
(in blue).
Contents
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
Introduction
Malthus law
Limited growth and equilibrium
Logistic growth
Integrating factors
Forward Euler method
Exercises
The Lotka and Volterra predator-prey model
SIR models for epidemics
A model for a zombie outbreak
A model for Bieber fever
Exercises
1
1
2
4
6
7
9
10
12
14
16
16
1. Introduction
Remember that a differential equation has the general form
dn
dn1
P
(t)
=
F
(P
(t),
P
(t),
P
(t),
...,
P (t), t).
dtn
dtn1
In what follows (excerpt in the integrating factors part), we will restrict
ourselves to the case with n = 1 and where the function F does not depend
explicitly on t. Thus, we consider the case
P (t) = F (P (t)).
2. Malthus law
Lets start from the very beginning: Malthus Law. This population
dynamics model was introduced by Thomas Robert Malthus (XVIII). There
are two basic hypotheses:
(1) the population change is proportional to itself.
(2) there is no growth restriction (as it might be caused by finite space,...)
1
R. GRANERO-BELINCHON
17B NOTES
R. GRANERO-BELINCHON
N P (t)
P
| + ln |P | = rt + C
= ert+C ,
N
N P (t)
N ert+C
.
N + ert+C
We need to find the constant C. We use that at t = 0 we have P (0) = P0 ,
so
N P0
N P0
N eC
C
= e C = ln
.
P (0) =
N + eC
N P0
N P0
When we introduce this expression for C we get
P (t) =
P (t) =
P0
N ert NNP
0
P0
N + ert NNP
0
1
N P0 ert N P
0
0
1 + ert N PP
0
N P0 ert
.
N + (ert 1)P0
17B NOTES
Logstica x = r x (1 x/N)
r=1
5
N=5
10
9
8
7
6
5
4
3
2
1
0
0
5
t
10
6070 5263(e10r 1)
5674 5263(e5r 1)
=
.
5263e5r 5674
5263e10r 6070
Using e10r 1 = (e5r + 1)(e5r 1), after some simplifications,
6070(e5r + 1)
5674
=
,
5263e5r 5674
5263e10r 6070
R. GRANERO-BELINCHON
and
5674(5263e10r 6070) = 6070(e5r + 1)(5263e5r 5674).
If we write x = e5r the previous equation is a second order
algebraic equation thar we can solve with the second order
equation formula getting
r 0.036.
With this value of r we recover
N 9400 million people.
Using these two values we estimate that, in 2015, would be 7123
million people on Earth. ***]
Lets notice that the equilibria for the logistic equation are
y = 0 and y = N.
In this case the derivative is
d
d
(rP (1 P/N )) =
(rP rP 2 /N ) = r 2rP/N.
F (P ) =
dP
dP
When we evaluate F (P ) at the equilibria, using r > 0, we get
F (0) = r > 0 and F (N ) = r 2r = r < 0,
so, y = 0 is an unstable equilibrium and y = N is a stable equilibrium (see
Figure 2).
5. Integrating factors
Lets assume that we have the following equation
P (t) = (t)P (t) + f (t), P (0) = P0 .
Notice that this equation is NOT autonomous. We are going to use the
Fundamental theorem of Calculus with the chain rule to solve this equation.
The idea is to find a function (the integrating factor) such that, by multiplying by this function, we get an exact derivative on the left hand side.
Notice that
Z
d t
(s)ds = (t),
dt 0
and notice that
d (t)
e P (t) = e(t) P (t) + P (t) (t)e(t) .
dt
Our equation can be written
P (t) + (t)P (t) = f (t), P (0) = P0 ,
so, if we multiply both sides by
Rt
(s)ds
we get
Rt
(s)ds
Rt
P (t) + e
(s)ds
Rt
(t)P (t) = e
(s)ds
f (t), P (0) = P0 .
17B NOTES
Rt
Now we use the previous formula with (t) = 0 (s)ds, and we get
Rt
d R t (s)ds
e0
P (t) = e 0 (s)ds f (t).
dt
Integrating
Rt
Z t Ru
(s)ds
0
e
e 0 (s)ds f (u)du + C,
P (t) =
0
Z t R
Rt
u
e 0 (s)ds f (u)du + C .
P (t) = e 0 (s)ds
0
P (0) = P0 = e
R0
0
(s)ds
Z
0 Ru
(s)ds
f (u)du + C
= C.
Example 3. Solve
P (t) = 4P (t) + f (t), P (0) = P0 .
[*** We need to find the integrating factor. As before, notice that the equation reads
P (t) + 4P (t) = f (t), P (0) = P0 ,
and, multiplying by e4t we get,
d 4t
e P (t) = e4t f (t), P (0) = P0 .
e4t P (t) + 4e4t P (t) =
dt
Integrating,
Z t
Z t
4s
4t
4t
e f (s)ds + C P (t) = e
e4s f (s)ds + e4t C.
e P (t) =
0
***]
6. Forward Euler method
In general its very difficult (or even impossible) to find the exact solution
of a given differential equation. As you can imagine, we are going to use
the computer to find an approximate solution. The construction of numerical methods to approximate solutions of differential equations is an area of
expertise by itself.
Assume that we have the ODE
P (t) = F (P (t)), P (0) = P0 .
Integrating we get
P (t) P (0) =
F (P (s))ds.
The problem is that, as we dont have the expression for P (s), the RHS has
no meaning. Then we are going to approximate the RHS as
Z t
F (P (s))ds tF (P (0)).
0
R. GRANERO-BELINCHON
This is just some sort of Riemann sum (as it was presented in the very
beginning of the course) taking the height of the rectangle equal to the
left endpoint. To achieve a better accuracy, if we want to approximate
the solution up to time T > 0, we are going to define a partition (with n
subintervals) of the time interval
0 = t0 < t1 = T /n < t2 = 2T /n, ..., tn = T,
and we are going to compute n step:
Z t1
F (P (s))ds (t1 t0 )F (P (t0 )),
P (t1 ) P (t0 ) =
t0
P (t2 ) P (t1 ) =
t2
t1
Z t3
P (t3 ) P (t2 ) =
t2
until
P (tn ) P (tn1 ) =
tn
17B NOTES
90
80
70
60
50
40
30
20
10
0.2
0.4
0.6
0.8
1.2
1.4
1
, P (0) = 1
P (t)
c)P (t) =
P (t)
, P (1) = 4
3t
R. GRANERO-BELINCHON
10
Exercise 3. Find the integrating factor and solve the following ODE
a)P (t) + t2 P (t) = 0, P (0) = 1,
b)P (t) + sin(t)P (t) = cos(t), P (1) = 3,
8. The Lotka and Volterra predator-prey model
In the mid 20s, an italian biologist, DAncona, was studying the variations in the populations of different fish in the Mediterranean sea.
40
35
30
25
20
15
10
Aos
Year % sharks
1914
11.9
1915
21.4
1916
22.1
1917
21.2
1918
36.4
1919
27.3
1920
16.0
1921
15.9
Table 1. Shark captures
He noticed that from 1914 to 1918 the captures go from 11.9 to 36.4
%. Lets recall that the Great War or World War I devastate Europe and
Africa during the same years. DAncona ask Vito Volterra, an italian mathematician, about the problem. Volterra simplified the problem with some
hypotheses:
(1) There are only preys, F , and predators, S.
(2) There is no growth restriction for the preys. This means that, in
absence of sharks, the prey population grows according to Malthus
law.
(3) The number of encounters between preys and predators depends
from the populations itself as F S.
17B NOTES
11
(4) In absence the preys, the predators starve and die with an exponential decay.
(5) The predator population grows when the sharks are fed.
(6) There is no other effect (like fishing...).
With these hypotheses, the system of equations is
dF = F SF
dt
dS
= cS + SF
dt
To find the equilibria of this system we need to solve
0 = F SF
0 = S + SF
The solutions are (0, 0) and (1, 1). The first point, the origin is not very
interesting as it represent the absence of animals in the sea. Around the
point (1, 1), we find closed curves (see Figure 5). This means that the fish
and shark population oscillates (the qualitative behaviour is like sin(x) and
cos(x)).
prey = (A B predator) prey
predator = (D prey C) predator
A = 0.4
C = 0.3
LotkaVolterra
B = 0.01
D = 0.005
80
70
60
predator
50
40
30
20
10
0
0
20
40
60
prey
80
100
120
R. GRANERO-BELINCHON
12
df = 1 + f (1 + s)(1 + f )
dt
ds
= (1 + s) + (1 + s)(1 + f )
dt
df = 1 + f (1 + f + s + sf )
dt
ds
= 1 s + 1 + f + s + f s
dt
df = s sf
dt
ds
= f + f s
dt
Now, we simplify
df = s sf
dt
ds
= f + f s
dt
As << 1 we can approximate the system by the simpler system
df = s
dt
ds
=f
dt
Now, notice that, if we take a second derivative in any of the previous
equation, we get
d2 f
d
= s = by the second equation = f.
2
dt
dt
Recall that
d2
sin(x) = sin(x),
dt2
so, we can expect (kind of) periodic solutions close to the equilibrium (1,1).
9. SIR models for epidemics
Lets assume that we have a population that can be split in three subsets:
Susceptible (S)
Infected (I)
Recovered (they cant get sick again)(R)
The flow of an epidemic is
S I R.
The model is
(1)
dS
= rS(t)I(t)
dt
dI
= rS(t)I(t) I(t)
dt
dR
= I(t)
dt
17B NOTES
13
where r is the rate of new infected coming from encounters between infected
individuals and susceptible individuals and is the amount of people that
are healthy again.
Example 5. Use the integrating factor method to compute the number of
infected individuals:
[*** Multiplying by et , we get
dI
+ et I(t) = rS(t)et I(t),
et
dt
d t
e I(t) = rS(t)et I(t),
dt
Z
t
S(s)es I(t)ds,
I(t) = I(0)et + et r
***]
Notice that the total population is
N (t) = S(t) + R(t) + I(t),
and its variation is
d
d
d
d
N (t) = S(t) + R(t) + I(t) = using the system = 0.
dt
dt
dt
dt
So, the total population doesnt change. Then as the total population
doesnt change,
N (t) = N (0) = S(0) + R(0) + I(0) R(t) = N (0) I(t) S(t).
To simplify, lets take N (0) = 1 (thus, S, R, I are percentages). The system
(1) now reads
dS = rS(t)I(t)
dt
(2)
dI
= rS(t)I(t) I(t)
dt
The equilibria are solutions of
d
if S(t) = I(t) = 0,
r
dt
d
if S(t) > I(t) > 0,
r
dt
d
if S(t) < I(t) < 0.
r
dt
So, we conclude a very interesting fact: if initially
R. GRANERO-BELINCHON
14
s=rsi
i=rsibi
r = 0.2
b = 0.1
Modelo SIR
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
0.1
0.2
0.3
0.4
0.5
s
0.6
0.7
0.8
0.9
17B NOTES
15
/Z
O
dS
= S(t)Z(t) S(t)
dt
dZ
(3)
= S(t)Z(t) S(t)Z(t) + R(t)
dt
R. GRANERO-BELINCHON
16
/B
The system is
(4)
dS
= N B(t) N S(t) S(t) P S(t) + P R(t)
dt
dB
= N B(t) bB(t) + S(t) + P S(t)
dt
dR
= N S(t) + bB(t) P R(t)
dt
12. Exercises
Exercise 4. Define N (t) = S(t) + Z(t) + R(t) as in (3). Study its evolution
in time and define a new system, equivalent to (3) with only to unknown.
(HINT: Compare (1) and (2))
Exercise 5. Find the equilibria for the system (3).
Exercise 6. Define N (t) = S(t) + B(t) + R(t) as in (4). Study its evolution
in time and define a new system, equivalent to (4) with only to unknown.
(HINT: Compare (1) and (2))
Exercise 7. Find the equilibria for the system (4).
Exercise 8. Find the equilibria for the system (4) without media effects
(P = N = 0).
E-mail address: rgranero@math.ucdavis.edu
Department of Mathematics, University of California, Davis, CA 95616,
USA