Continuous Models with ODEs Explained
Continuous Models with ODEs Explained
dx
= kx(2000 − x), (3.1)
dt
ISTUDY
124 Mathematical Modeling: Models, Analysis and Applications
Z Z
dx 1 1 1
= k dt ⇒ + dx = k dt,
x(2000 − x) 2000 x 2000 − x
1 x
⇒ ln = kt + C,
2000 2000 − x
x
⇒ = A e2000kt , where A = e2000C .
2000 − x
2000 A e2000kt 2000A 1
⇒ x(t) = 2000kt
. Given x(0) = 40 ⇒ 40 = ⇒ A= .
1+A e 1+A 49
2000 e2000kt
⇒ x(t) = . After 2 days, 200 employees heard the rumor.
49 + e2000kt
2000 e4000k 1 49
⇒ 200 = ⇒ k= ln .
49 + e4000k 4000 9
Therefore, the number of employees who have heard the rumor is given by
2000 e 2 ln( 9 )
t 49
2000
x(t) = ⇒ x(t) = . (3.2)
t
ln( 49 ) − 2t ln( 49
9 ) + 1
49 + e 2 9 49 e
We now pose a question that how much time will the rumor take to reach
1000 employees? Substituting x(t) = 1000, we obtain
2000 2 ln 49
1000 = ⇒ t= = 4.6 days.
− 2t ln( 49
9 ) ln(49/9)
49 e +1
ISTUDY
Continuous Models Using Ordinary Differential Equations 125
ISTUDY
126 Mathematical Modeling: Models, Analysis and Applications
3.3 Stability
In layman’s language, we say that an equilibrium point or a steady-state
solution x˜e is locally stable, if all solutions that start near x˜e (that is, the
initial conditions are in the neighborhood of x˜e ) remain near x˜e for all the time.
Furthermore, if all the solutions starting near x˜e approach x˜e as t → ∞, we say
that the equilibrium point or steady-state solution x˜e is locally asymptotically
stable.
ISTUDY
Continuous Models Using Ordinary Differential Equations 127
dX
= f (x∗ + X) = f (x∗ ) + Xf ′ (x∗ ) + ... (higher-order terms),
dt
dX
≈ f ′ (x∗ )X, since f (x∗ ) = 0 and neglecting higher-order terms.
dt
Therefore, we conclude that the system is stable if f ′ (x∗ ) < 0 (decreasing
function) and unstable if f ′ (x∗ ) > 0 (increasing function). If f ′ (x∗ ) = 0, no
definite conclusion can be drawn from linear stability analysis.
Let us now consider the model given by the system of differential equations
of the form
dx dy
= f (x, y), = g(x, y). (3.4)
dt dt
Let (x∗ , y ∗ ) be the steady-state solution of (3.4), then f (x∗ , y ∗ ) = 0 and
g(x∗ , y ∗ ) = 0. We now give a small perturbation to the system about the
steady state, and mathematically this means we put x = X + x∗ and y =
Y + y ∗ . This implies
dX
= f (x∗ + X, y ∗ + Y )
dt
= f (x∗ , y ∗ ) + Xfx (x∗ , y ∗ ) + Y fy (x∗ , y ∗ ) + ... higher-order terms
(by Taylor series expansion of two variables).
Similarly,
dY
= g(x∗ , y ∗ ) + Xgx (x∗ , y ∗ ) + Y gy (x∗ , y ∗ ) + ... higher-order terms,
dt
where fx (x∗ , y ∗ ) is ∂f ∗ ∗
∂x evaluated at the steady state (x , y ). Since by
definition, f (x∗ , y ∗ ) = 0, g(x∗ , y ∗ ) = 0, by neglecting second and higher-order
ISTUDY
128 Mathematical Modeling: Models, Analysis and Applications
terms, we obtain
dX
= fx (x∗ , y ∗ )X + fy (x∗ , y ∗ )Y,
dt
dY
= gx (x∗ , y ∗ )X + gy (x∗ , y ∗ )Y,
dt
which can be put in matrix form as
dx̃ x fx fy
= Ax̃, where x̃ = and A = . (3.5)
dt y gx gy
Let x̃ = vbeλt be a trial solution of (3.5), where vb (6= 0) is some fixed vector
which needs to be determined. Then
dx̃
= vbλeλt = Ab
v eλt ⇒ Ab
v = λb
v.
dt
From linear algebra, it can be easily concluded that λ is the eigenvalue of the
matrix A, whose eigenvector is νb. The eigenvalues are obtained by solving
fx − λ fy
det(A − λI) = 0 ⇒ = 0,
gx gx − λ
⇒ λ2 − (fx + gy )λ + fx gy − fy gx = 0 ⇒ λ2 − trace(A) λ + det(A) = 0.
Let λ1 and λ2 be the two eigenvalues of the matrix A. The necessary and
sufficient condition that λ1 and λ2 will be negative (if real) or have negative
real parts (if complex) is
trace(A) = fx + gy < 0,
det(A) = fx gy − fy gx > 0.
Example 3.3.1 The fish growth model by Von Bertalanffy [42] is given by
dF (t)
= αF 3/2 (t) − βF (t),
dt
ISTUDY
Continuous Models Using Ordinary Differential Equations 129
where F (t) denotes the weight of the fish, and α and β are positive constants.
β 3 + 5β − 2 4β 2
⇒ λ2 + + = 0.
(β − 1)2 β−1
Clearly, β 3 + 5β − 2 > 0, for all β > 1. Therefore, by Routh Hurwitz’s
criteria,
∗ ∗ 2β β−1
the system is always stable about the equilibrium point (x , y ) = β−1 , 2β .
ISTUDY
130 Mathematical Modeling: Models, Analysis and Applications
ISTUDY
Continuous Models Using Ordinary Differential Equations 131
| V (x̃) |→ ∞ as norm(x̃) =k x̃ k→ ∞.
dx dy
ẋ = = −x − y, ẏ = = x − y3.
dt dt
Check the local and global stability of the stable.
We consider a function V (x, y) = ax2 +by 2 , where a and b are some positive
constants to be determined. Clearly, the function V (x, y) is positive definite
as V (x, y) > 0, ∀ (x, y) 6= (0, 0) and V (0, 0) = 0. Also,
dV ∂V ∂V
V̇ (x, y) = = ẋ + ẏ
dt ∂x ∂y
= 2ax(−x − y) + 2by(x − y 3 )
= −2ax2 − 2by 4 + 2xy(b − a).
ISTUDY
132 Mathematical Modeling: Models, Analysis and Applications
If we choose b = a = 1, then
dV
V̇ (x, y) = = −2x2 − 2y 4 < 0, ∀ (x, y) 6= (0, 0),
dt
= 0, ∀ (x, y) = (0, 0).
This implies V̇ (x, y) is negative definite. Hence, by Lyapunov’s direct method,
(0,0) is locally asymptotically stable (LAS).
Global Stability
Clearly, the linear system has a unique steady state (0, 0), provided
det(A) = λ1 λ4 − λ2 λ3 6= 0. The solution of (3.10) can be visualized as
trajectories moving in the xy-plane and can be sketched, which are known
as phase portraits.
For a better understanding of the system, we consider a much more
simplified linear system of the form
dx dy
= λ1 x and = λ4 y, (3.11)
dt dt
where (0, 0) is the unique equilibrium solution of (3.11). This can be put in
matrix form as
d x λ1 0 x
= .
dt y 0 λ4 y
ISTUDY
Continuous Models Using Ordinary Differential Equations 133
λ1 0
The characteristic equation of the matrix B = is
0 λ4
λ1 − k 0
= 0 ⇒ (λ1 − k)(λ4 − k) = 0 ⇒ k = λ1 , λ4 ,
0 λ4 − k
which are the roots of the characteristic equation, also called the eigenvalues
of the matrix B.
x = x(0)eλ1 t , y = y(0)eλ4 t ,
Case I: If both the eigenvalues λ1 and λ4 are negative, all the trajectories
approach (0, 0), that is, all the solutions of the system converge to the
equilibrium solution (0, 0), no matter what the initial conditions may be (fig.
3.1(a)). The steady state (0, 0) is called a stable node (fig. 3.1(b)).
x(t), (t)
5 4
4 2
-2
1
-4
t
1 4 5 -4 -2 0 2 4
FIGURE 3.1: Phase portrait showing all the trajectories approach (0, 0), a
stable node.
Case II: If both the eigenvalues λ1 and λ4 are positive, all the trajectories
move away from (0, 0), that is, all the solutions of the system diverge from the
equilibrium solution (0, 0), irrespective of the initial conditions (fig. 3.2(a)).
In this case, the steady state (0, 0) is called an unstable node (fig. 3.2(b)).
Case III: If the eigenvalues are opposite in sign, say, λ1 < 0 and λ4 > 0,
then x(t) decreases whereas y(t) increases exponentially (fig. 3.3(a)). All the
solutions, in this case, approach the steady state (0,0) for some time until
they come close to it, and then they start moving away from the steady state,
ISTUDY
134 Mathematical Modeling: Models, Analysis and Applications
x(t)()
4
2
0.15
0.10
-2
0.05
-4
t
0.6 1.0 -4 -2 0 2 4
FIGURE 3.2: Phase portrait showing all the trajectories move away from
(0, 0), an unstable node.
irrespective of the initial solutions. The steady state (0, 0) is called a saddle
point (fig. 3.3(b)).
(i) If a < 0, then both the eigenvalues have negative real parts, the term
eat decays for increasing t, and hence the solution decreases (fig. 3.4(a)). In
this case, all the trajectories spiral towards the steady state (0, 0), irrespective
of the initial conditions and the steady state is known as a stable spiral or
stable focus (fig. 3.4(b)).
(ii) If a > 0, both the eigenvalues have positive real parts, the term eat
grows exponentially and so is the solution, for t > 0 (fig. 3.5(a)). In this case,
all the trajectories spiral away from the steady state (0, 0), irrespective of the
initial conditions and the steady state is called an unstable spiral or unstable
focus (fig. 3.5(b)).
(iii) If a = 0, both the eigenvalues are purely imaginary. In this case, all
the trajectories are closed orbits about the steady state (0, 0). The solutions
are periodic (fig. 3.6(a)) and the steady state is called a center (fig. 3.6(b)).
Please note that for simplicity, we have considered the linear system of the
form
dx dy
= λ1 x and = λ4 y. (3.12)
dt dt
ISTUDY
Continuous Models Using Ordinary Differential Equations 135
x(t)()
4
2
0
150
100 -2
50
-4
t
0.6 1.0 -4 -2 0 2 4
FIGURE 3.3: Phase portrait shows all the trajectories approach the steady
state (0,0) for some time until they come close to it, and then they start
moving away from it, a saddle.
λ1 − k λ2
= 0 ⇒ k 2 − (λ1 + λ4 )k + (λ1 λ4 − λ2 λ3 ) = 0,
λ3 λ4 − k
1h √ i
⇒ k 2 − Trace(A) k + Det(A) = 0 ⇒⇒ k = Trace(A) ± Discriminant ,
2
where Discriminant = (Trace(A))2 − 4Det(A).
Case II: Let Det(A) > 0 and Discriminant = (Trace(A))2 − 4Det(A) > 0,
that is,
s
√ Det(A)
Discriminant = Trace(A) 1 − < Trace(A).
(Trace(A))2
h √ i h √ i
1 1
Therefore, 2 Trace(A) + Discriminant and 2 Trace(A) − Discriminant
will have the same signs. The eigen values will be positive if Trace(A) >0 and
negative if Trace(A) < 0.
ISTUDY
136 Mathematical Modeling: Models, Analysis and Applications
x(t)#$(%)
4
1.0
2
0.5 0
-2
t
1 ! " 5 6
-4
-0.5 -4 -2 0 2 4
FIGURE 3.4: Phase portrait showing all the trajectories spiral towards (0, 0),
a stable spiral or a stable focus.
Conclusions:
(i) Discriminant > 0, Trace(A) < 0 ⇒ phase portrait is a stable node.
(ii) Discriminant > 0, Trace(A) > 0 ⇒ phase portrait is an unstable node.
(iii) If Discriminant = 0, then the phase portrait is stable or unstable node
according as Trace(A) < 0 or Trace(A) > 0.
Case III: Let Discriminant = (Trace(A))2 − 4Det(A) < 0, then the values
of k are complex conjugates, namely,
1h √ i 1h √ i
Trace(A) + i Discriminant and Trace(A) − i Discriminant .
2 2
The phase portrait will be a stable spiral if Trace(A) <0 and an unstable
spiral if Trace(A) > 0. If Trace(A) = 0, the phase portrait will be center.
ISTUDY
Continuous Models Using Ordinary Differential Equations 137
x(')()(') 4
& × 106
2
2 × 106
0
1 × 106
-2
t
5 6 7 8 9 10 -4
6
-1 × 10
-4 -2 0 2 4
FIGURE 3.5: Phase portrait showing all the trajectories spiral away from
(0, 0), an unstable spiral or an unstable focus.
Example 3.4.1 Determine the type and stability of steady state at (0, 0) of
the following systems:
dx dy dx dy
(i) = 2x + 7y, = −5x − 10y. (ii) = 3x − 4y, = 2x − y.
dt dt dt dt
ISTUDY
138 Mathematical Modeling: Models, Analysis and Applications
x(t)*+(t)
4
6
2
4
2 0
t
5 10 15 20
-2
-2
-4 -4
-6
-4 -2 0 2 4
FIGURE 3.6: Phase portrait showing all the trajectories are closed orbits
about (0, 0), a center.
2−λ 7
= 0 ⇒ λ2 + 8λ + 15 = 0 ⇒ λ = −3, −5.
−5 −10 − λ
The eigenvalues are real, unequal and negative, implying that the phase
portrait is a stable node (asymptotically stable).
2−λ 7
= 0 ⇒ λ2 − 2λ + 5 = 0 ⇒ λ = 1 + 2i, 1 − 2i.
−5 −10 − λ
The eigenvalues are imaginary with positive real part, implying that the phase
portrait is an unstable focus.
ISTUDY
Continuous Models Using Ordinary Differential Equations 139
material which got its carbon from the air. Carbon 14 (C 14 ), a radioactive
isotope of carbon, is a result of constant bombardment by radiation from the
sun in the atmosphere. During this bombardment, neutrons hit nitrogen 14
atoms and transmute them to carbon.
ISTUDY
140 Mathematical Modeling: Models, Analysis and Applications
where A0 is the initial amount of C 14 present in the sample and λ is the decay
constant of the sample. The fossil contains 20% of the original amount at time
t, which implies
A(t) 20 20 1
= ⇒ e−λt = ⇒ t = ln(5). (3.15)
A0 100 100 λ
Since the half-life is the amount of time required by the decaying substance
to reduce to half, we get,
A0
= A0 e−λτ , where τ is the half-life.
2
1 1 τ
⇒ − λτ = ln ⇒ = . (3.16)
2 λ ln(2)
ln(5) 1.6094
t=τ = 5730 × ≃ 13305 years.
ln(2) 0.6931
C0
C(t) = , where C(0) = C0 .
1 + C0 kt
Let an equal dose of drug C0 be given to the body at equal time intervals, T .
Then, immediately after the second dose, the concentration of the drug inside
the body is
C0
C1 = C0 + .
1 + C0 kT
ISTUDY
Continuous Models Using Ordinary Differential Equations 141
Immediately after the third dose, the concentration of the drug inside the
body is
C1
C2 = C0 + .
1 + C1 kT
In a similar manner, we can conclude that
Cn−1
Cn = C0 + , (3.18)
1 + Cn−1 kT
lim Cn−1
t→∞
⇒ lim Cn = C0 + ,
t→∞ 1 + kT lim Cn−1
t→∞
C∞
⇒ C∞ = C0 + where C∞ = lim Cn = lim Cn−1 ,
1 + C∞ kT t→∞ t→∞
2
⇒ kT C∞ − kT C0 C∞ − C0 = 0,
p
kT C0 ± k 2 T 2 C02 + 4C0 kT
⇒ C∞ = ,
2kT
r
C0 C0 4
⇒ C∞ = + 1+ (taking positive sign only).
2 2 C0 kT
This implies C0 < Cn < C∞ (since Cn is an increasing function), that is, the
concentration is bounded.
ISTUDY
142 Mathematical Modeling: Models, Analysis and Applications
R L
V
K
which there will be a voltage drop across R, which will also oppose the applied
voltage. Let, at any time t, i be the current in the circuit increasing from 0 to
a maximum value at a rate of increase di dt . Now, the potential difference across
di
the inductor is V1 = L dt and across the resistor is V2 = iR. The differential
equation modeling of this scenario is given by
di
V = L + iR (since V = V1 + V2 ),
dt
Z i Z
di R t i R
⇒ V
= − dt ⇒ log e i − = − t,
0 i − R
L 0 V /R L
V R
⇒ i(t) = 1 − e− L t ,
R
V
which shows that the current grows exponentially. As t → ∞, i → R = I
(say), a steady value (fig. 3.8(a)).
Current Current
60
50
50
40
40
30
30
20 20
10 10
Time 0 Time
100 200 300 400 500 0 100 200 300 400 500
FIGURE 3.8: Graphs showing the (a) growth and (b) decay of current, with
L = 50, R = 1 and V = 50.
We now put the key in the OFF position. Initially, when the key was in
the ON position, a steady current I = VR was flowing. With no current flowing
in the circuit, the flux will reduce gradually, resulting in a voltage drop iR
di
across the resistance R and the induced e.m.f. L dt across the inductance L.
ISTUDY
Continuous Models Using Ordinary Differential Equations 143
Now, since the key is OFF, the current becomes open, implying that the
impressed voltage is zero.
The differential equation showing this scenario is given by
di
0 = L + iR (since V = V1 + V2 = 0),
dt
Z i Z t
di R
⇒ =− dt (since at t = 0, i = I),
i 0 L
I
i R V −Rt
ln = − t ⇒ i(t) = e L .
I L R
Thus, the current decays exponentially as time increases and ultimately goes
to zero (fig. 3.8(b)).
x
P
O F a A
dv µ
mv = −m ,
dx x
dv
where v dx is the acceleration of the particle of mass m. Since the force is
attractive, the sign of right-hand side is negative. Integrating, we get,
v2
= −µ ln x + constant.
2
Initially, let the particle start from rest (from A) at a distance a from the
fixed point O (origin), then at time t = 0, x = a, v = 0,
a
⇒ constant = µ ln a ⇒ v 2 = 2µ ln .
x
ISTUDY
144 Mathematical Modeling: Models, Analysis and Applications
r a
dx
⇒v= = − 2µ ln (negative sign as distance decreases with time).
dt x
p Z T Z 0
dx
⇒ 2µ dt = − q , where T is the time taken by the particle
0 a ln xa
to reach the origin. Therefore,
Z ∞ −y2
p ae (−2y)dy a
2µT = − Substitute ln = y2
0 y x
Z ∞ Z ∞ −z
2 e
= 2a e−y dy = a √ dz (Put z = y 2 )
0 0 z
Z ∞ r
−z 12 −1 1 √ π
=a e z dz = a Γ =a π ⇒T =a .
0 2 2µ
d1 d2
O1 A a P O2
FIGURE 3.10: A particle at rest is attracted by two forces towards two fixed
centers O1 and O2 , respectively.
ISTUDY
Continuous Models Using Ordinary Differential Equations 145
d2 x
m = −mµn1 O1 P n + mµn2 O2 P n . (3.20)
dt2
When the particle is slightly displaced from the equilibrium position A to
the position P , it tends to come back to its original position. Doing so, O1
becomes the origin of attraction and O2 , the origin of repulsion. This explains
the reason for the first term on the right-hand side of (3.20) to be negative
and the second term to be positive.
d2 x
Therefore, = −µn1 (d1 + x)n + µn2 (d2 − x)n ,
dt2 n n
x x
= −µn1 dn1 1 + + µn2 dn2 1 − ,
d1 d2
nx n(n − 1) x2
= −µn1 dn1 1 + + + ...
d1 2! d21
nx n(n − 1) x2
+ µn2 dn2 1 − + + ... ,
d2 2! d22
d2 x
or, = −µn1 dn1 − nxµn1 d1n−1 + µn2 dn2 − nxµn2 d2n−1 ,
dt2
(Since x is small, neglecting higher powers of x)
2
d x
⇒ = −n µn1 d1n−1 + µn2 d2n−1 x,
dt2 ( n−1 n−1 )
n aµ2 n aµ1
= −n µ1 + µ2 x,
µ1 + µ2 µ1 + µ2
nµ1n−1 µ2n−1 an−1
= − (µ1 + µ2 )x,
(µ1 + µ2 )n−1
d2 x (µ1 µ2 a)n−1
⇒ = −n x.
dt2 (µ1 + µ2 )n−2
ISTUDY
146 Mathematical Modeling: Models, Analysis and Applications
that is,
AO − AB
mg = T0 = λ (by Hooke’s law)
AB
b−a
⇒ mg = λ , λ is the modulus of elasticity. (3.21)
a
given by
d2 x B
m = mg − T, where T is the tension of the string.
dt2 O
d2 x b+x−a b − a λx
⇒ m 2 = mg − λ = mg − λ − , -
dt a a a
d2 x λx P
⇒ =− (using (3.21)).
dt2 am D
2kv
O
v P
ISTUDY
Continuous Models Using Ordinary Differential Equations 147
2.0
200
/:5
100
1.0
.:5
;< 100 =;< 200 >;<
5. 100 /5. 200 65.
-100
-.:5
-1.0 -200
namely, the free oscillation (first part) and forced oscillation (second part).
The arbitrary constants A and B can be obtained from the initial conditions.
From the expression (3.22), it is clear that the amplitude of free oscillation
decreases with time t because of the factor e−kt and ultimately vanishes for
large t. However, the amplitude of the forced oscillation persists as there is no
diminishing factor, whose period of oscillation is 2π
b . This is also evident from
fig. 3.13(a).
ISTUDY