Anda di halaman 1dari 2

Numerical Methods for Differential Equations

and Applications
Camile Fraga Delfino Kunz
15th November 2018
Exercises - Matlab
1) The Lotka–Volterra equations, also known as the predator–prey equations,
are frequently used to describe the dynamics of biological systems in which two
species interact, one as a predator and the other as prey. The following equation
models through difference equations the dynamics between fish (F) and sharks
(S) populations through the months n:
(
F (n + 1) − F (n) = aF (n) − (hS(n))F (n) − eF 2 (n)
S(n + 1) − S(n) = (dF (n))S(n) − cS(n) − f S 2 (n)

with the parameters:


a: birth rate of fish population;
h: measures the death rate of fishes when interacting with sharks;
e: intraspecific competition on fish population;
d: represents the birth rate of sharks, which is related to predation;
c: death rate of sharks;
f: intraspecific competition on shark population;
a) Through a Matlab routine, simulate the behavior of this population for the
set of parameters: a=0.7; h=0.8; e=0.3; d=0.7; c=0.7; f=0.2. and with initial
conditions F0 = 2 and S0 = 1. Plot graph for time versus Sharks and Fishes
and another for Fishes versus Sharks. What do you observe?
b) For finding the steady-states for this equation, we would have to solve a
nonlinear system. For that, we can use the Newton’s method:
Input: Function f (x) = (f1 (x), . . . , fn (x)); Jacobian matrix J of the function
f. Initial guess x0 . Tolerance  and maximum iterations M AXIT .
Output: Approximation to the solution x = (x1 , . . . , xn ) to the nonlinear sys-
tem f (x) = 0.
while Iter < M AXIT and f (x) <  do:
Solve linear system J(x)s = −f (x);
Set x = x + s
Iter = Iter + 1
Implement the Newton method on Matlab to find a steady-state for the predator-
prey system given the parameters chosen on item a). Plot the same graph as a)

1
and compare the results with or without fishing. If was possible to find a steady
state, make an stability analysis using the Jacobian eigenvalues: is it stable or
unstable?
c) If we introduce some fishing factor on the system, the equations now would
be:
(
F (n + 1) − F (n) = aF (n) − (hS(n))F (n) − eF 2 (n) − rF (n)
S(n + 1) − S(n) = (dF (n))S(n) − cS(n) − f S 2 (n) − sS(n)

where r is the fishing rate for the fish population and s for the sharks. Plot the
solutions now with the same parameters as a) and r = 2 and s = 0.05. Which
population is more affected by the fishing?

2) The continuous predator-prey system for the fish and shark populations can
be written like:
dF


 = aF − bF S − eF 2 − rF
 dt
 dS

 = dF S − cS − f S 2 − sS
dt
where r = 0 and s = 0 represents the case without fishing.
a) Write an Euler’s Method algorithm to solve the IVP with initial conditions
F0 = 2 and S0 = 1 and the same parameters as the exercise 1). Compare the
fishing and no fishing cases.
b) Use the Newton method to find a steady state for this system. Is it stable
or unstable?

References
1 Edelstein-Keshet, L. Mathematical Models in Biology, SIAM, 2005.

Anda mungkin juga menyukai