C2 Differential Equations - RIT

C2
Differential Equations
4040-849-03: Computational Modeling and Simulation
Instructor: Linwei Wang
Part IV
Dynamic Systems
Equilibrium: Stable or Unstable?
•  Equilibrium is a state of a system which does not change
–  A differential equation / a system of differental equations:
setting a derivative (all derivatives) to zero.
dN
N
= r0 N(1! )
dt
K
Example 1: Logistic model
N*
r0 N (1" ) = 0 # N * = 0,N * = K
K
Equilibrium N*:
*
Example 2: System of
differential equation
!
Equilibrium
x*,y*:
!
" dx
$ dt = f (x, y)
#
$ dy = g(x, y)
% dt
" f (x * , y * ) = 0
# * *
$ g(x , y ) = 0
Equilibrium: Stable or Unstable?
•  Equilibrium is a state of a system which does not change
–  A differential equation / a system of differential equations:
setting a derivative (all derivatives) to zero.
–  A difference equation (discrete time)
Example: Ricker’s model (discrete-time analog of logistic model)
N t +1 = f (N t ) = N t exp[r(1"
Nt
)]
K
Equilibrium N*:
!
*
N
N * = N * exp[r(1" )] " N * = 0,N * = K
K
Equilibrium: Stable or Unstable?
•  An equilibrium is considered stable (for simplicity we will
consider asymptotic stability only) if the system always returns
to it after small disturbances. If the system moves away from the
equilibrium after small disturbances, then the equilibrium is
unstable.
–  One differential equation: stable equilibria are characterized by a negative
first derivative, df/dN (negative feedback), whereas unstable equilibria are
characterized by a positive one (positive feedback).
dN
N
= r0 N(1" )
dt
K
!
Equilibrium: Stable or Unstable?
•  An equilibrium is considered stable (for simplicity we will
consider asymptotic stability only) if the system always returns to
it after small disturbances.
–  System of differential equations: stable equilibria are characterized
by negative real parts of ALL eigenvalues of the Jacobian matrix.
If there is one eigenvalue with a positive real part, the equilibrium
point is unstable
#"f
%"x
A =%
%"g
%$"x
"f &
"y (
(
"g (
"y ('
Equilibrium: Stable or Unstable?
•  An equilibrium is considered stable (for simplicity we will
consider asymptotic stability only) if the system always returns to
it after small disturbances
N t +1 = f (N t )
–  One difference equation:
The equilibrium point is stable if and only if
"1 <
Example: Ricker’s model
!
df
!|N = N * < 1
dN
Nt
N = f (N t ) = NNt t exp[r(1" )]
N t +1 = f (N t t)+1= N t exp[r(1"
)]
K
K
df
rN t
Nt
Nt = N *
= (1"
)exp[r(1" )] # ##$1" r
dN t
K
K
!
Ricker’s model has!a stable equilibrium point N* if 0<r<2
!
Equilibrium: Stable or Unstable?
•  An equilibrium is considered stable (for simplicity we will
consider asymptotic stability only) if the system always returns to
it after small disturbances.
–  One difference equation
Equilibrium: Stable or Unstable?
•  An equilibrium is considered stable (for simplicity we will
consider asymptotic stability only) if the system always returns to
it after small disturbances.
–  System of difference equations: ALL eigenvalues of the Jacobian
matrix have to lie within the circle with radius = 1 in the complex
plain
•  Find equilibrium points
•  Approximate Jacobian matrix
•  Calculate eigenvalues of the Jacobian matrix
Equilibrium: Stable or Asymptotically Stable
•  An equilibrium is considered stable if the solution starting close
enough to the equilibrium remain close forever
–  If for every ε >0, there exists a ! = ! (" ) > 0 such that, if || x(0) ! xe ||< ! ,
Then || x(t) ! xe ||< ! for every t>=0
•  An equilibrium is considered to be asymptotically stable if the
solution starting close enough to the equilibrium not only remain
close but also converge to the equilibrium.
–  If it is stable and if there exists ! > 0 such that if || x(0) ! xe ||< ! ,
|| x(t) # xe ||= 0
then lim
t!"
Growth and Decay Processes
•  Growth of
-  Population
-  Pollution
-  Cancer cell
-  Poverty
-  Investment
-  …… -  Nonlinear: limiting nature of growth
-  Coupled / intertwined
Discrete Growth Processes
•  Growth of money in a saving account
–  Annual rate of interest r%
–  The interest is paid & compound n times a year
–  Deposite can be made at any time, but start to earn interest
from the beginnng of the next time period
–  y(k): total funds at the end of the kth period
u(k): total deposits made during the kth period
y(k) = y(k "1) + (r /n)y(k "1) + u(k) = (1+ r /n)y(k "1) + u(k)
Discrete Growth Processes
•  Mortage
–  Total debt: d dollars
–  Monthly mortage interest: r
–  Monthly payment: p
–  What should be the value of p if the debt is to be paid off by
N payments?
–  y(k): balance at the end of the kth period
u(k): amout of the kth period = p
y(k) = y(k "1) + ry(k "1) " u(k) = (1+ r)y(k "1) " u(k)
= (1+ r)y(k "1) " p,
y(0) = d
!
Discrete Growth Process
•  Growth of rabbit population
–  A pair of rabbits is born to each pair of adult rabbits at the
end of every month
–  A newborn pair produces first offspring at two months of
age
–  A pair of rabbits keep producing forever according to the
above rules
–  y(k): number of rabbit pairs at the end of kth month
y(k) = y(k "1) + y(k " 2)
!
Continuous Growth
•  Population growth
–  Assumption: when a population is introduced into an
environment, where it is not already found, growth occurs at
a rate that is directly proportional to the size of the
population
dN
= kN,
dt
" N(t) = N 0e kt
N(0) = N 0
–  A large number of growth / decay phenomena follows this
equation
! (physical, chemical, biological, medical, social
sicence)
Example 1: Drug Dose
•  Dose level of a drug
–  Concentration level in the blood y(t)
–  The rate of change of concentration in the blood is directly
proportationally to the amount present
–  Ingestion of medicine is added to the body with a constant
amount y0 at intervals of time T
dy
= "ky # y = y 0e"kt
dt
y(T) = y 0e"kT + y 0
y(2T) = (y 0e"kT + y 0 )e"kT + y 0
!
!
!
!
y(nT) = (y 0 + y 0e"kT + " + y 0e"( n"1)kT )e"kT + y 0
y 0 (1" e"( n +1)kT )
=
1" e"kT
Example 1: Drug Dose
•  To achieve constant drug concentration
y 0 (1" e"(n +1)kT )
y(nT) =
1" e"kT
t "#
–  What is the initial dose plan? (yinit for first dose, y0 afterwards)
!
!
y(nT) = (y 0 + y 0e"kT + ! + y init e"( n"1)kT )e"kT + y 0
y 0 (1" e"nkT )
y0
"nkT
=
+
y
e
=
init
1" e"kT
1" e"kT
y init =
!
y0
1" e"kT
Example 2: Body Burden
•  Body burden: study the effect of environmental
pollutants on human health; defined as the level of
pollutants in the organs, blood or other body fluids of
an organism
–  x(t): amount excreted through urine and faeces in (0,t)
–  y(t): amount consumed via food and beverages in (0,t)
–  z(t): amount per unit volume of blood at t
–  u(t): amount inspired via lungs in (0,t)
–  v(t): amount stored in body tissues in (0,t)
Example 2: Body Burden
–  x(t): amount excreted through urine and faeces in (0,t)
–  y(t): amount consumed via food and beverages in (0,t)
–  z(t): amount per unit volume of blood at t
–  u(t): amount inspired via lungs in (0,t)
–  v(t): amount stored in body tissues in (0,t)
dz(t)
dy(t) du(t) dx(t) dv(t)
= "(
+
#
#
)
dt
dt
dt
dt
dt
Generally, the rate of change in the tissue is proportional to the amount in the blood
!
dz
d(y + u) dx
+ bz = " (
# )
dt
dt
dt
Example 3: Mathematical Economics
•  Building steel mills in a developing country
–  Sa(t): Quantity of steel produced / available at t
–  Sc(t): Capacity of mills at t
–  Assume all other materials & labors are abundant, the rate of
steel production is propotational to the mill capacity
–  Because building mills needs steel, the rate of mill building
(mill capacity) is proportional to available steels
" dSc
Sc (0) = c1
$$ dt = kc Sa ,
#
$ dSa = k S ! bS ,
Sa (0) = c2
a c
a
$% dt
Limits To Growth
•  Population growth: competition for food and resources
lower birth rate, higher death rate
dN
= kN = (b " m)N
dt
!
!
m = m1N
dN
N
= b(1" )N, M = b /m1
dt
M
!
(MN 0 /(M " N 0 ))e bt
N(t) =
1+ (N 0 /(M " N 0 ))e bt
Small t:
N(t) =
!
Large t:
!
MN 0
e bt
(M " N 0 )
N(t) " M
Limits To Growth
•  Population growth: In practice, environmental factors are
•  much more complicated
•  much harder to collect data for validation
dN
= k(t)N + Q(t)
dt
Enviromental factors !
Abnormal growth pa7ern, such as sudden natural calamity, hun<ng habits of predator, seasonal factor, etc Competition Among Species
• 
• 
• 
• 
• 
Biological species
Political parties
Business enterprises
Coupled reacting chemical components
……
Competition Among Species
•  Ecological niche
•  Two species S1 and S2 with ecological niches θ1 and
θ2, respectively
dN1
= (b1 " m1N1 )N1,
dt
dN 2
= (b2 " m2 N 2 )N 2 ,
dt
N1 (0) = N10
N 2 (0) = N 20
•  !In the initial growth stage: N1 /N 2 = (N10 /N 20 )exp(b1 " b2 )t
•  Coexist only happens if b1=b2!
!
!
Competition Among Species
•  Possible explanations
–  Geographical isolation
–  Ecological differentiation: different specialization
–  Interbreeding & merging
•  Apply to business and other problems as well
•  Revision to the model
–  Add interaction between species
dN1
= m1 (M1 " N1 " #12 N 2 )N1,
dt
dN 2
= m2 (M 2 " N 2 " # 21N1 )N 2 ,
dt
N1 (0) = N10
N 2 (0) = N 20
Predator-Prey Systems
• 
• 
• 
• 
• 
• 
Consumer-resource
Prey-plant
Parasite-host
Tumor cells (virus) – immune systems
Susceptible – infectious
……
Predator-Prey Systems
•  Lotka-Vloterra model
–  Prey: H
–  Predator: P
–  Assumption:
•  In the absence of predator, prey population grows exponentially
•  In the absence of prey, predator population declines exponentially
•  Interaction: prey decreases and predator increases at a rate proportional
to the frequency of predator-prey encounters
H˙ = bH " sHP
P˙ = "dP + esHP
H(0) = H 0
P(0) = P0
Predator-Prey Systems
•  Equibilirium points
# H(b " sP) = 0
$
% P("d + esH) = 0
(H * ,P * ) = (0,0),(H * ,P * ) = (
•  Stability
!
!
#b " sP
"sH &
J =%
(
$ esP "d + esH'
!
!
!
#b 0 &
J(0,0) = %
(
$0 "d'
#
d&
d b %0! " e (
J( , ) = %
(
es s % e 0 (
$b
'
!
d b
, )
es s
"1 = b, "2 = #d
ed
" = ±i
be
Predator-Prey Systems
d b
(H ,P ) = ( , )
es s
*
!
*
•  Stable, but not
asymptotically stable
Since a model is not a precise descrip<on of a system, qualita<ve predic<on should not be altered by slight modifica<ons! Predator-Prey Systems
•  Change of assumption:
–  In the absence of predator, prey population grows by the
logistic model
#˙
H
% H = bH(1" ) " sHP
K
$
%& P˙ = "dP + esHP
!
H(0) = H 0
P(0) = P0
Predator-Prey Systems
•  Equibilirium points
(H * ,P * ) = (0,0)
(H * ,P * ) = (K,0)
d b
d
(H * ,P * ) = ( , (1"
))
es s
esK
#
H
% H(b(1" ) " sP) = 0
$
K
%& P("d + esH) = 0
•  Stability
!
!
# 2bH
&
b
"
"
sP
"sH
(
J =%
K
%$
esP
"d + esH('
!
#b 0 &
J(0,0) = %
(
0
"d
$
'
#"b
"sK &
J(K,0) = %
( "1 = #b, "2 = esK # d
$ 0 "d + esK '
J(
!
d b
d
, (1" ! )) = ?
es s
esK
Predator-Prey Systems
(H * ,P * ) = (
d b
d
, (1"
))
es s
esK
b
Kes Kes
<4
(
"1)
d
d
d
Structurally stable!
Predator-Prey Systems
•  More realistic assumptions:
–  Intra-species competition
–  Relation between the predator’s consumption rate and prey
density
–  Efficiency of converting prey to predator
#
H
aH HP
˙
H
=
r
H
(1"
)"
H
%%
K
b+H
$
% P˙ = aP HP " cP
%&
b+H
#˙
H
H
=
r
H(1"
) " sHP
H
%
K
$
% P˙ = r P(1" P )
p
&
cH
Leslie’s model !
Consump<on rate is increasing func<on of prey ! a limit at high density density but approaching Predator-Prey Systems
•  More realistic assumptions:
–  Fluctuating environment
–  Time-delay for reproduction
N(t " T)
N˙ = rN(t)(1"
)
K(t)
!
Any more?
Epidemic Model
•  Kermack-McKendrick epidemic model
–  Population is divdied into three disjoint groups
•  Suseptible (S) individuals are capable of contracting the diseases and
become infective
•  Infective (I) individuals are capable of trasmitting the diseases to others
•  Removed (R) individuals have had the diseases and are dead, recovered &
permanently immune, or are isolated until recovery & permanent
immunity occur
–  Rules
•  The rate of change in S is proportional to the contacts between S & I
•  I are removed at a rate proportional to their number
•  Total number of population is constant
Epidemic Model
# S˙ = "iSI
%
$ I˙ = iSI " rI
%˙
& R = rI
•  Implications
–  Initial number
! of S vs. occurance of epidemic: critical value
of susceptible population
–  In the case of a deadly diseases, an epidemic has less chance
to occur!
Exercise
•  Harvesting renewable resources, e.g. fish
–  Use logistic population with an addiitonal mortality term
(harvesting yield, proportional (catch rate) to the population).
Find equilibrium population, determine the catch rate for
stable equiblibrium, and determine the corresponding
maximum yield
N
N˙ = rN(1" ) " cN
K
Equilibrium point & stable condition
Maximum yield
!
c
N * = K(1" ),c < r
r
c = r /2,(cN) max = rK /4
!
Exercise
•  Now assume constant yield H0, analyze the equilibrium
points and what happens when H0 approaches rK/4
N
N˙ = rN(1" ) " H 0
K
1
H
N *1 = K(1" 1" 4 0 )
2
rK
!
!
1
H
N * 2 = K(1+ 1" 4 0 )
2
rK