You are on page 1of 5

MATH4333 Solution to Homework 1

1. Consider the logistic equation x = x(1 x) with x(0) = x0 . Solve analytically by making the
substitution y = 1/x, and solving the differential equation for y.
Solution
Substituting x = 1
y and x = yy2 into the logistic equation yields

y = 1 y
1
y(0) = y0 = x0

The new system can then be solved using separation,


dy
=1y
dt
dy
= dt
y1
Z y Z t
dy
= dt
y y 1
0
0 
y1
ln = t
y0 1
y = 1 + (y0 1)et
1
Substituting y = x gives

1 1
=1+ 1 et
x x0
x0
x(t) =
x0 + (1 x0 )et

2. Consider the coupled logistic equations

x = x(1 x ay),
y = cy(1 bx y).

Determine the stability of all the fixed points, only in the parameter range where they exist, by
way of a Jacobian analysis.
Solution
Let F (x, y) = x(1xay) and G(x, y) = cy(1bxy), then the fixed points (x , y ) are the points
1a 1b
that F (x , y ) = G(x , y ) = 0, so the fixed points are (x , y ) = (0, 0), (0, 1), (1, 0), ( 1ab , 1ab ).
The last one exists only when both a and b are less than 1 or both a and b are larger than 1.
For stability analysis, consider the Jacobian matrix
   
Fx Fy (1 x ay) x ax
J(x, y) = =
Gx Gy bcy c(1 bx y) cy

and its eigenvalues at each fixed point:


(a) At (0, 0),  
1 0
J(0, 0) = = 1 = 1, 2 = c
0 c
Since both eigenvalues are positive, the point (0, 0) is unstable.
(b) At (0, 1),  
1a 0
J(0, 1) = = 1 = 1 a, 2 = c
bc c
The point (0, 1) is stable when a > 1, unstable when a < 1.

1
(c) At (1, 0),  
1 a
J(1, 0) = = 1 = 1, 2 = (1 b)c
0 (1 b)c
The point (1, 0) is stable when b > 1, unstable when b < 1.
1a 1b
(d) At ( 1ab , 1ab ),

1a
1ab a(1a)
1ab
1a 1b
J( , )=

1 ab 1 ab

bc(1b) c(1b)
1ab 1ab
rh i2
(1a)+c(1b) (1a)+c(1b)
1 = 21 1
4c(1a)(1b)(1ab)


1ab 2 1ab (1ab)2
= r h i2
2 = 21 (1a)+c(1b) + 12 (1a)+c(1b)
4c(1a)(1b)(1ab)


1ab 1ab (1ab)2

The real part of 1 is always negative, whereas the real part of 2 is negative only when
4c(1a)(1b)(1ab)
(1ab)2 > 0.
1a 1b
So the point ( 1ab , 1ab ) is stable when a < 1 and b < 1, unstable when a > 1 and b > 1.
3. Consider the following modified Lotka-Volterra equations:
 
U
U = U 1 U V,
K
V = eU V V.
(a) Explain the biology behind the modification.
(b) Determine equilibrium values for U and V .
(c) Determine stability of the equilibrium.
(d) Nondimensionalize the equations in a reasonable way.
(e) Using your dimensionless equations, plot a representative time series, and phase-space diagram
(Modify the MATLAB code placed on the course website.)

Solution
U

(a) An additional factor of 1 K in the first equation models the competition of resources
between prey individuals.
U
  
(b) Let F (U, V ) = U 1 K V and G(U, V ) = V (eU ), then
  

F (U , V ) = G(U , V ) = 0 (U , V ) = (0, 0), (K, 0), , 1
e eK
The last fixed point exists only when < eK.
(c) For stability analysis, consider the Jacobian matrix
U U
    
FU FV 1 K V U
J(U, V ) = = K
GU GV eV eU
and its eigenvalues at the fixed points:
i. At (0, 0),  
0
J(0, 0) = = 1 = , 2 =
0
Since 1 > 0, the point (0, 0) is unstable.
ii. At (K, 0),
 
K
J(K, 0) = = 1 = , 2 = eK
0 eK
The point (K, 0) is stable when > eK, unstable when < eK.

2
  

iii. At e , 1 eK ,

e
   " #
 eK 
J , 1 =
e eK e 1 eK 0
r 2  
1
1 = 2 eK 2 1
4 1


eK eK
= r 2  

2 = 12 eK
+ 21


eK 4 1 eK

The real parts


 of both eigenvalues are negative as by assumption this fixed point exists

only when 1 eK > 0, i.e. < eK.

U
(d) Let x = K , y = V and = t, then the modified Lotka-Volterra equations becomes

dx
= r[x(1 x) xy]
d
dy 1
= (sxy y)
d r
q
with two nondimensional groupings s = eK
and r =

.

(e) The following MATLAB/Octave codes are used to generate the required figures:
function mod_lotka_volterra
% plots time series and phase space diagrams
clear all; close all;
t0=0; tf=12*pi; eps=0.1; delta=0.1;
r=[1/2, 1, 2];
s=[1/2, 1, 2];
options = odeset(RelTol,1e-6,AbsTol,[1e-6 1e-6]);
%time series plots
for i=1:length(r);
for j=1:length(s);
[t,UV]=ode45(@lv_eq,[t0,tf],[1+eps 1+delta],options,[r(i) s(j)]);
U=UV(:,1); V=UV(:,2);
subplot(length(r),length(s),(i-1)*length(s)+j); plot(t,U,t,V, --);
axis([0 6*pi,0 3]); ylabel(predator,prey);
text(3,1.5,[r=,num2str(r(i)),, s=,num2str(s(j))]);
if i==length(r); xlabel(t); end
end
end
subplot(length(r),length(s),1); legend(prey, predator);
%phase space plot
xpos=[1.25 1.25 1.25]; ypos=[7 7 7];%for annotating graph
for i=1:length(r);
for j=1:length(s);
for eps=0.1:0.1:1.0;
[t,UV]=ode45(@lv_eq,[t0,tf],[1+eps 1+eps],options,[r(i) s(j)]);
U=UV(:,1); V=UV(:,2);
figure(2);subplot(length(r),length(s),(i-1)*length(s)+j);
plot(U,V); hold on;
end
axis([0 2 0 8]);
text(xpos(i),ypos(i),[r=,num2str(r(i)),, s=,num2str(s(j))]);
if j==1; ylabel(predator); end;
if i==length(r); xlabel(prey); end;

3
end
end
function dUV=lv_eq(t,UV,rs)
dUV=zeros(2,1);
dUV(1) = rs(1)*(UV(1)*(1-UV(1))-UV(1)*UV(2));
dUV(2) = (1/rs(1))*(rs(2)*UV(1)*UV(2)-UV(2));

3 3 3
prey
2.5 predator 2.5 2.5

2 2 2
predator,prey

predator,prey

predator,prey
1.5 r=0.5, s=0.5 1.5 r=0.5, s=1 1.5 r=0.5, s=2

1 1 1

0.5 0.5 0.5

0 0 0
0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18

3 3 3

2.5 2.5 2.5

2 2 2
predator,prey

predator,prey

predator,prey
1.5 r=1, s=0.5 1.5 r=1, s=1 1.5 r=1, s=2

1 1 1

0.5 0.5 0.5

0 0 0
0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18

3 3 3

2.5 2.5 2.5

2 2 2
predator,prey

predator,prey

predator,prey

1.5 r=2, s=0.5 1.5 r=2, s=1 1.5 r=2, s=2

1 1 1

0.5 0.5 0.5

0 0 0
0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18
t t t

Figure 1: Time series solutions of the nondimensional modified Lotka-Volterra equations.

4
8 8 8
7 r=0.5, s=0.5 7 r=0.5, s=1 7 r=0.5, s=2

6 6 6
5 5 5
predator

4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
0 0.5 1 1.5 2 0 0.5 1 1.5 2 0 0.5 1 1.5 2

8 8 8
7 r=1, s=0.5 7 r=1, s=1 7 r=1, s=2

6 6 6
5 5 5
predator

4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
0 0.5 1 1.5 2 0 0.5 1 1.5 2 0 0.5 1 1.5 2

8 8 8
7 r=2, s=0.5 7 r=2, s=1 7 r=2, s=2

6 6 6
5 5 5
predator

4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
0 0.5 1 1.5 2 0 0.5 1 1.5 2 0 0.5 1 1.5 2
prey prey prey

Figure 2: Phase space diagrams of the nondimensional modified Lotka-Volterra equations.

You might also like