Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
99 views29 pages

Tarea2 PDF

This document provides a solution to problem 8 from a biomathematical modeling assignment. It first presents the Beverton-Holt stock-recruitment equation and derives it from a sub-model describing larval population dynamics between hatching and recruitment. It then sketches the yield function Y* as a function of stock size N*, showing it will be positive between 0 and the carrying capacity K. Finally, it presents numerical solutions to predator-prey and Leslie models, and illustrates the Allee effect in both, where below a threshold population size the per capita growth rate is negative.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views29 pages

Tarea2 PDF

This document provides a solution to problem 8 from a biomathematical modeling assignment. It first presents the Beverton-Holt stock-recruitment equation and derives it from a sub-model describing larval population dynamics between hatching and recruitment. It then sketches the yield function Y* as a function of stock size N*, showing it will be positive between 0 and the carrying capacity K. Finally, it presents numerical solutions to predator-prey and Leslie models, and illustrates the Allee effect in both, where below a threshold population size the per capita growth rate is negative.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

INTRODUCCI

ON AL MODELAMIENTO EN BIOMATEM

ATICA
TAREA NO. 2
FERNANDA SEP

ULVEDA PENRROZ
CAMILA SOTO ROSALES
INGENIER

IA CIVIL MATEM

ATICA
Date: 19 de octubre de 2013.
1
Problema 8. (Efectos de cosecha y pesca). Estudiar la Seccion 1.5: Harvesting and Fis-
heries de N.F. Britton, Essential Mathematical Biology, Springer-Verlag, London, 2003, pp.
1721, y resolver
dos los ejercicios (Exercises 1.9-1.12)
1.9. Beverton-Holt equation. The Beverton-Holt stock-recruitment curve, given by equation
(1.5.12), is derived from a sub-model in continuous time that describes the dynamics
of the larval population betwen hatching and recruitment to the adult population. Let
L(t) be the number of larvae at time t, and assume that they are subject todensity-
dependent mortality through intraspecic competition or other eects between time
n + t
1
and n + t
2
, where 0 t
1
< t
2
1. In this time, they die according to
dL
dt
= (
1
+
2
L)L
where
1
and
2
are positive constants. If L(n+t1) is proportional to N
n
, the number
of adults in the population at time n, and N
n
+ 1 is proportional to L(n +t2), derive
the Beverton-Holt Equation (1.5.12).
Solucion:
Dado que
dL
dt
=
1
L
2
L
2
(1)
Luego, tomamos M = L
1
de donde se tiene que L = M
1
, por lo tanto
dL
dt
= M
2
dM
dt
Sustituyendo esto en (1), se tiene que
M
2
dM
dt
=
1
M
1

2
M
2
Entonces
dM
dt

1
M =
2
Ahora calculamos el factor integrante, el cual esta dado por
= exp
_

_

1
dt
_
= e

1
t
Luego,
e

1
t
dM
dt

1
e

1
t
M =
2
e

1
t

d
dt
_
e

1
tM
_
=
2
e

1
t

_
t
n+t
1
d
dt
_
e

1
t
M
_
dt =
_
t
n+t
1

2
e

2
t
dt
e

1
t
M(t) e

1
(n+t
1
)
M(n + t
1
) =

1
_
e

1
t
e

1
(n+t
1
)

Multiplicando por e

1
t
M(t) = e

1
(n+t
1
t)
M(n + t
1
)

2

1
(1 e

1
(n+t
1
t)
)
=

1
M(n + t
1
)e

1
(tnt
1
)

2
(1 e

1
(tnt
1
)
)

1
Pero tenamos que M = L
1
, luego
L
1
=

1
L
1
(n + t
1
)e

1
(tnt
1
)

2
(1 e

1
(tnt1)
)

1
=
(
1
e

1
(tnt
1
)
+ L(n + t
1
)
2
(e

1
(tnt
1
)
1))/L(n + t
1
)

1
=
e

1
(tnt
1
)
(
1
+ L(n + t
1
)
2
)
2
L(n + t
1
)

1
L(n + t
1
)
Finalmente suponiendo que L(n + t
1
) = L
0
, obtenemos
L(t) =

1
L
0
(
1
+
2
L
0
)e

1
(tnt
1
)

2
L
0
1.10. A shery population is modelled by
N
n+1
= f(N
n
) Y
n
where Y
n
is the catch taken in year n, the yield. and f is given by the Ricker model
f(N) = Ne

(1 N/K), a model for over-compensatory competition, where r and K


are positive parameters. Sketch Y

as a function of N

.
Solucion:
Sabemos que N
t+1
= f(N
n
) Y
n
y ademas f(N
n
) = Ne
r(1N/K)
. Luego Y
n
= f(N
n
)
N
n+1
, de donde Y

estar a dado por:


Y

= f(N

) N

= N

e
r(1N

/K)
N

= N

(e
r(1N

/K)
1)
Por otro lado
e
r(1N

/K)
1 > 0
e
r(1N

/K)
> 1
r(1 N

/K) > 0
N

/K < 1
N

< K
Por lo tanto, Y

ser a positiva entre 0 y K.


Problema 9 (Efecto de Allee). Estudiar la Seccion 3.8: Threshold Phenomena de J.D.
Murray, Essential Mathematical Biology I: An Introduction, Springer-Verlag, London, 2002,
pp. 105109.
a) Estudiar el texto y resolver numericamente el sistema de EDOs (3.46) y (3.47). El
ejemplo numerico debe ilustrar el efecto de Allee. (Ver tambien p. 71 del mismo libro.)
b) Resumir el texto, incluyendo la solucion numerica, en no m as de 3 paginas (estilo
presente tarea, sin contar anexos (c odigos, etc.) ).
Soluci on:
a) Next some models and their numerical solutions with Allee eect.
predatorprey system: Rabbits and Foxes
dN
dt
= gN d
1
NP
dP
dt
= d
2
P + cNP
where g, c, d
1
, d
2
are positve constants, and F(N) = g
(a) Rabbits amd Foxes Population (b) Phase Rlane Rabbits v/S Foxes
Figura 1. g = 0,5; d
1
= 0,002; d
2
= 0,3; c = 0,004
We can see oscillating solutions, where the foxes population is larger than the
rabbits population almost always and a few times where the number of foxes and
rabbits are equals.
Leslie predator prey model
du
dt
= au bu
2
cuv
dv
dt
= dv e
v
2
u
where a, b, c, c, e are positve constants, with F(u) = a bu
(a) Predator Prey Over Time (b) Phase Plane Prey v/s Predator
Figura 2. a = 0,5; b = 0,002; c = 0,01; d = 0,0015; e = 0,05
Next the Alle eect in both models
(a) Allee eect (b) Rabbits-Foxes
Figura 3. Allee eect
b) Threshold Phenomena, we are interested in a group of models which have a nonzero
stable state such that if the perturbation from it is suciently large or of the right
kind, the population densities undergo large variations before returning to the steady
state. Such models are said to exhibit a threshold eect. We study one such group of
models here.
Consider the model predatorprey system
dN
dt
= N [F(N) P] = f(N, P), (3.46)
dP
dt
= P [N G(P)] = g(N, P), (3.47)
The specic form of F(N) demonstrates the Allee eect which means that the per
capita growth rate of the prey initially increases with prey density but reaches a ma-
ximum at some N
m
and then decreases for larger prey densities.
The Jacobian matrix at a coexistence state for the model is given by
J
(N

,P

)
=
_
N

(N

) N

(P

)
_
which has two steady states, zero and (G(P

), F(N

)) where the second is a positive


steady state.
Now, evaluate J(N

, P

) at the point (G(P

), F(N

))
J
(G(P

),F(N

))
=
_
G(P

)F

(N

) G(P

)
F(N

) F(N

)G

(P

)
_
we get that det J
(G(P

),F(N

))
= F(N

)G(P

)(1F

(N

)G

(P

)) and tr J
(G(P

),F(N

))
=
G(P

)F

(N

) G

(P

)F(N

). The point is stable if det J


(G(P

),F(N

))
> 0 and tr
J
(G(P

),F(N

))
< 0.
Figura 4. Null clines N = 0, P = 0, N = G(P), P = F(N) for the preda-
torprey system (3.46) and (3.47): f = N[F(N) P], g = P[N G(P)]. S

and S are possible stable steady states.


From the Figure 1, this fact happen when the steady state is at S. If the steady state
is at S

tr J
(G(P

),F(N

))
and det J
(G(P

),F(N

))
can be positive or negative since now
F(N

) > 0. Thus S

may be stable or unstable depending on the particular F(N) and


G(P).
a)
b) c)
Figura 5. (a) Null clines for the predatorprey threshold model (3.46) and
(3.47). The steady state S is always stable. A perturbation to X results in
a large excursion in phase space before returning to S. A perturbation to Z
is under the threshold and hence returns to S without a large excursion. (b)
and (c) Schematic time evolution of the solutions illustrating the eect of a
perturbation to X and to Z as in (a).
Suppose we perturb the system to the point X in the phase plane as in Figure 2(a).
Since here f < 0 and g < 0, equations (3.46) and (3.47) imply that
dN
dt
< 0 and
dP
dt
< 0
and so the trajectory starts to move qualitatively as on the trajectory shown in Figure
2 (a): it eventually returns to S but only after a large excursion in the phase plane.
The path is qualitatively indicated by the signs of f and g and hence of
dN
dt
and
dP
dt
. If
the perturbation takes (N, P) to Y then a similar behaviour occurs. If, however, the
perturbation is to Z then the perturbation remains close to S. Figure 2 (b) and (c)
illustrate a typical temporal behaviour of N and P.
There are two type of thresholds perturbation, a threshold perturbation below which
the perturbation always remains close to the steady state and other above which it
does not, even though the solution ultimately returns to the steady state. If the per-
turbation results in the trajectory getting past the maximum N
m
in Figure 2 (a) then
the trajectories are typically like those from X and Y . If the trajectory crosses f = 0
at N > N
m
then no large perturbation occurs. The reason that such a threshold pro-
perty exists is a consequence of the form of the null cline f = 0 which has a maximum
as shown, in this case this is a consequence of the Allee eect in the dynamics of the
model (3.46).
Problema 10. Resolver el problema 2.5, de N.F. Britton, Essential Mathematical Biology,
Springer-Verlag, London, 2003, pp. 5960.
2.5 Let a prey and predator satisfy the Lotka-Volterra equations, but with a refuge for
the prey.
a) Explain the basis for the new model
du
dt
= u (u k)v,
dv
dt
= av(u k 1).
b) What eect does this modication have on the solutions of the system?
Soluci on:
a) El modelo de Lotka y Volterra considerando la capturabilidad de la presa y el predador
p y q respectivamente, y que la pesca o caza se lleva a cabo con un esfuerzo constante
E corresponde a (2.3.7)
dU
d
= U pEU UV,
dV
dt
= eUV qEV V.
por lo que se consideramos ahora Uk en lugar de U en el tercer termino de la primera
ecuaci on y U k en lugar de U en el primer termino de la segunda ecuaci on se tiene
que
dU
d
= U pEU (U k)V,
dV
dt
= e(U k)V qEV V.
as el punto de equilibrio no trivial asociado a este sistema es
(U

, V

) =
_
qE +
e
+ k,
pE
(qE + )
(qE + ke)
_
.
Luego haciendo el siguiente cambio de variables
u = U/U

, v = V/V

y t = ( pE)(qE + ke),
se sigue que
du
dt
=
du
dU
dU
d
d
dt
= u (u k)v
y que
dv
dt
=
dv
dV
dV
d
d
dt
= av(u k 1)
donde a =
qe + + ke
( pE)(qE + ke)
.
b) Veamos ahora que el estado estacionario es estable. En efecto el Jacobiano asociado
al sistema esta dado por
J =
_
_
1 v u + k
av u k 1
_
_
(u

,v

)
.
asi la ecuaci on caracerstica asociada es
(k ) (k + 1) = 0
y sus races a
1,2
=
k
2

_
a(k + 1) +
k
2
4
. Como estas races tienen parte real
negativa siempre que k > 0, se tiene que el estado estacionario es estable.
Problema 11. Resolver el problema 2.13, de N.F. Britton, Essential Mathematical Biology,
Springer-Verlag, London, 2003, p. 70.
2.13 Disturbance-mediated coexistence. In some experiments on competition betwen two
species of hydra, it was found that coexistence was only posible if a fraction of the
population of each species was removed at regular intervals. A model for the system
with this experimental manipulation is given by
dN
1
dt
=
r
1
N
1
K
1
(K
1
m
1
N
1
aN
2
),
dN
2
dt
=
r
2
N
2
K
2
(K
2
m
2
bN
1
N
2
),
Explain the mode. Show that if K
1
= 100, K
2
= 90, a = 12, b = 0,8, m
1
= 2 and
m
2
= 10, then stable coexistence occurs for this system but not for the corresponding
system with m
1
= m
2
= 0.
Soluci on:
Para este modelo vemos que K
i
corresponde a la capacidad del sistema i, r
i
tasa de creci-
miento per c apita, N
i
tama no de la poblaci on i, a corresponde al coeciente de competencia
y b al coeciente complementario de competencia. Tenemos dos especies que ocupan un mis-
mo nicho ecol ogico, por lo tanto, requieren los mismos nutrientes, viven en el mismo h abitat
en el mismo tiempo. Ademas en este modelo se ha agregado una manipulaci on experimental
que trata en retirar una fraccion de cada especie en intervalos regulares.
Para el caso i) se retira un cierta cantidad de cada especie, y podemos observar de los gr a-
cos, que efectivamente se produce la coexistencia de ambas especies, es decir, resulta ser
estable. En cambio en el caso 2, podemos observar que una de las dos especies se extingue,
por lo tanto el sistema con los valores dados resulta inestable.
(a) (b)
Figura 6. Diagrama de fase, caso m
1
= 2, m
2
= 10
(a) (b)
Figura 7. Diagrama de fase, caso m
1
= m
2
= 0
Adem as calcularemos los estados estacionarios,
0 =
r
1
N
1
K
1
(K
1
m
1
N
1
aN
2
)

r
1
N
1
K
1
= 0 N
1
= K
1
m1 aN
2
N
1
= 0, N

1
= K
1
m
1
aN

2
N

1
= K
1
m
1
a(K
2
m
2
bN

1
)
N

1
(1 ab) = K
1
m
1
aK
2
+ am
2
N

1
=
(K
1
m
1
) a(K
2
m
2
)
1 ab
0 =
r
2
N
2
K
2
(K
2
m
2
N
1
aN
2
)
N
2
= 0 N
2
= K
2
m2 bN
1
N

2
= K
2
m
2
bN

1
N

2
= K
2
m
2
b(K
1
m
1
aN

2
)
N

2
(1 ab) = K
2
m
2
bK
1
+ bm
1
N

2
=
(K
2
m
2
) b(K
1
m
1
)
1 ab
Luego, los puntos de estado estacionario son
P
1
= (0, 0); P
2
= (0, N

2
); P
3
= (N

1
, 0); P
4
= (N

1
, N

2
)
De donde obtenemos el Jacobiano del sistema
J

=
_
r
1
N
1
2K
1

r
1
K
1
(m
1
+ aN

2
K
1
) ar
1
N

1
K
1
r
2
N

1
2K
2

r
2
K
2
(m
2
+ b

1
K
2
)
_
Y as, el det(J

) esta dado por


det(J

) = (a b)
r
1
r
2
2K
1
K
2
N

1
N

2
+
r
1
r
2
K
1
K
2
_
ab(N
2
2
N
2
1
) + aN

1
(K
2
m
2
) bN

2
(K
1
m
1
)

Analicemos estos datos para los casos presentados:


Para el caso i) con m
1
= 2, m
2
= 10 tenemos que
N

1
= 50, N

2
= 40
Luego
det(J

p
1
) = 0
det(J

p
2
) = 13,7671r
1
r
2
< 0
det(J

p
3
) =
4
5
r
1
r
2
> 0
det(J

p
4
) =
2
15
r
1
r
2
> 0
Para el caso ii) con m
1
= m
2
= 0 tenemos que
N

1
= 200, N

2
= 250
Luego
det(J

p
1
) = 0
det(J

p
2
) =
40
9
r
1
r
2
> 1
De donde nuevamente observamos la estabilidad para el caso i).
Problema 12. Resolver los problemas 2.19 y 2.20, de N.F. Britton, Essential Mathematical
Biology, Springer-Verlag, London, 2003, pp. 7678.
2.19 a) Find the steady states of the system (2.7.17).
b) Show that species 1 goes extinct if c
1
< e
1
, and species 2 goes extinct if c
2
< e
2
.
c) Asuming that c
1
> e
1
and c
2
> e
2
,sketch the phase plane in two cases, and nd
the condition for species 2 to survive.
d) Deduce that the poorer competitor cansurvive by being a good disperser.
Soluci on:
a) Encontrar los estados estacionarios se reduce a igualar las derivadas a cero, luego
0 = p
1
(c
1
(1 p
1
) e
1
)
p
1
= 0 c
1
(1 p
1
) e
1
= 0
p
1
= 0 p

1
=
c
1
e
1
c
1
p
1
= 0 p

1
= 1
e
1
c
1
0 = p
2
(c
2
(1 p
1
p
2
) e
2
c
1
p
1
)
p
2
= 0 c
1
(1 p
1
) e
1
= 0
p
2
= 0 p

2
= 1 p

e
2
c
2

c
1
p

1
c
2
Por lo tanto los puntos estacionarios son:
P
1
= (0, 0); P
2
= (1
e
1
c
1
, 0); P
3
= (0, 1
e
1
c
1
); P
4
= (p

1
, 1 p

e
2
c
2

c
1
p

1
c
2
)
b) Notemos que e
i
es la tasa local de extinci on de la especie i, c
i
es la taza de colonizaci on
de la especie i.
Luego del item anterior tenemos que un estado estacionario interesante es P
2
=
_
1
e
1
c
1
, 0
_
, adem as sabemos que la extinci on de la especie 1 es independiente de
la especie 2. Por lo tanto si analizamos
_
1
e
1
c
1
_
observamos que si e
1
c
1
implica la
extinci on de esta especie.
Para la otra especie observamos el estado P
4
con p
1
= 0, de donde obtenemos
_
0, 1
e
2
c
2
_
.
An alogamente vemos que la especie 2 no depende de la primera especie, y cuando
e
2
c
2
se tendra la extincion de esta especie.
c) Del item a) podemos ver que si p

1
> 0 y p

2
> 0 la especie 2 sobrevive. Luego, de la
condici on c
1
> e
1
se tiene que p

1
> 0. Ahora veamos la condici on p

2
> 0, de donde
obtenemos
1
e
2
c
2

c
1
p
1
c
2
p

1
> 0

e
2
+ c
1
p

1
c
2
> p

1
1

e
2
c
1
p

1
p

1
1
> c
2

e
2
+ c
1
p

1
1 p

1
< c
2
como p

1
= 1
e
1
c
1
> 0 y a la vez p

1
< 1, tenemos que
c
2
>
e
2
+ c
1
_
1
e
1
c
1
_
1
_
1
e
1
c
1
_
c
2
>
e
2
+ c
1
_
1
e
1
c
1
_
e
1
c
1
c
2
>
c
1
e
2
+ c
2
1
e
1
c
1
c
2
>
1
e
1
_
c
2
1
+ c
2
1
(e
2
e
1
)
_
Por lo tanto, para que la supervivencia de la especie 2 este asegurada si c
2
es mayor
que c
1
.
(a) (b)
Figura 8. Diagrama de Fase para c
1
= 1, c
2
= 3, e
1
= e
2
= 0,7
(a) (b)
Figura 9. Diagrama de fase para c
1
= 2, c
2
= 5, e
1
= e
2
= 1
(a) (b)
Figura 10. Campos de direcciones
d) Tenemos dos especies, una competidora superior y otra inferior, cada patch puede ser
ocupado por una sola especie en un tiempo. La especie inferior puede tener estabilidad
s olo en patches vacos, en cambio la especie superior puede establecerse en un patch
vaco o competir por un lugar con la especie inferior.
Luego, la convivencia estable se produce cuando las especies inferiores tienen altas ta-
sas de dispersion, raz on por la cual persisten en sitios no ocupados por los competidores
superiores.
2.20 Asume that c
1
> e
1
, so that the prey can persist in the absence of predators.
a) Sketch the phase plane for the system in the two cases (i) e
13
/c
3
> 1 e
1
/c
1
and
(ii) e
13
/c
3
< 1 e
1
/c
1
, and deduce that the predators die out if c
3
is too small or
e
13
is too large.
b) Show that in case (ii) the coexistence steady state is stable.
Soluci on:
a) Caso i)
(a) (b)
Figura 11. Diagrama de fase caso i)
Figura 12. Campo de direcciones
Caso ii)
(a) (b)
Figura 13. Diagrama de fase caso ii)
Figura 14. Campo de direcciones
b) En (i) los predadores tienden a desaparecer, de las gr acas obtenidas por el siguiente
c odigo MATLAB se aprecia que si e
13
es grande entonces las presas rapidamente
comienzan a extinguirse lo cual regula la cantidad de predadores ademas si c
3
es
peque na los predadores se extinguen.
dp
1
dt
= c
1
(1 p
1
p
13
)p
1
c
3
p
13
p
1
e
1
p
1
dp
1
3
dt
= c
3
p
13
p
1
e
13
p
13
Tras hacer cero el lado izquierdo, los puntos de estado estacionario son:
P
1
= (0, 0), P
2
=
_
1
e
1
c
1
, 0
_
y P
3
=
_
e
13
c
3
,
c
1
(1
e
13
c
3
) e
1
c
1
+ c
3
_
y el Jacobiano del sistema para el estado estacionario positivo es
J =
_
p
1
c
1
p
1
(c
1
+ c
3
)
p
13
c
3
0
_
As det J = p
1
(c
1
+ c
3
)p
13
c
3
y tr J = p
1
c
1
, evaluando J en P
3
det J
P
3
= e
13
c
1
(1
e
1
c
1

e
13
c
3
) > 0 y tr J
P
3
=
e
13
c
3
c
1
< 0
Por lo que en P
3
los valores propios son reales y negativos por lo tanto el estado
estacionario P
3
es estable.
Anexos
Listing 1. Problema 9
% Sol uci on numerica de l model o predador presa zorros conej os
% dy1/ dt=gy1dy1y2
% dy2/ dt=dy2+cy1y2
[ T, Y] = ode45( @RabbitsFoxes , [ 0 100] , [ 100 1 0 0 ] ) ;
fi gure ( 1)
subplot ( 2 , 1 , 1 ) ;
plot (T, Y( : , 1 ) , r , T, Y( : , 2 ) , bo ) ;
t i t l e ( Rabbi ts and Foxes popul at i on ) ;
legend( Rabbi ts , Foxes ) ;
xlabel ( Time , t )
ylabel ( Popul ati on Si z e s )
grid on ;
subplot ( 2 , 1 , 2 ) ;
plot (Y( : , 1 ) , Y( : , 2 ) ) ;
t i t l e ( Phase pl ane Rabbi ts v/ s Foxes ) ;
xlabel ( Rabbi ts )
ylabel ( Foxes )
grid on ;
% Sol uci on numerica de l model o predadorpresa de Le s l i e
% du/ dt=aubu2cuv
% dv/ dt=dVev 2/u
[ T, Y] = ode45( @Lesl i e , [ 0 100] , [ 400 2 0 0 ] ) ;
fi gure ( 2)
subplot ( 2 , 1 , 1 ) ;
plot (T, Y( : , 1 ) , r , T, Y( : , 2 ) , bo ) ;
t i t l e ( Predator Prey Over ti me )
legend( Prey , Predator )
xlabel ( Time , t )
ylabel ( Popul ati on Si z e s )
grid on ;
subplot ( 2 , 1 , 2 ) ;
plot (Y( : , 1 ) , Y( : , 2 ) ) ;
t i t l e ( Phase pl ane Prey v/ s Predator ) ;
xlabel ( Prey ) ;
ylabel ( Predator ) ;
grid on ;
a =0. 4;
b=0. 001;
g = 0 . 4 ;
xx = 0 : . 1 : 1 0 0 ;
% Al l e e f f e c t Rabbi t s Foxes zc = g
zc = g ;
fi gure ( 3)
subplot ( 2 , 1 , 1 ) ;
plot ( xx , zc )
t i t l e ( Al l e e e f f e c t Foxes Rabbi ts )
% Al l e e f f e c t Le s l i e l e s = aby (1)
l e s = abxx ;
subplot ( 2 , 1 , 2 ) ;
plot ( xx , l e s )
t i t l e ( Al l e e e f f e c t Le s l i e model )
Listing 2. Problema 9
function dy = Le s l i e ( t , y)
a = 0 . 5 ;
b = 0. 002;
c = 0 . 0 1 ;
d = 0. 0015;
e =0. 05;
dy = [ ay(1)b( y(1)2) cy ( 1) y ( 2 ) ;
dy(2)ey( 2) 2/ y ( 1 ) ] ;
end
Listing 3. Problema 9
function dy = Rabbi tsFoxes ( t , y)
g = 0 . 5 ;
d1 = 0. 00 2;
d2 = 0 . 3 ;
c = 0. 004 ;
dy = [ gy(1)d1y ( 1) y ( 2 ) ;
cy ( 1) y ( 2) d2y ( 2 ) ] ;
end
Listing 4. Problema 2.13

function Dhidra=hi dr a ( t , y)
K1=100;
K2=90;
m1=2;
m2=10;
a =1. 2;
b=0. 8;
Dhidra =[ ( y ( 1) /K1) . ( K1m1y(1)ay ( 2 ) ) ;
( y ( 2) /K2) . ( K2m2y(2)by ( 1 ) ) ] ;


Listing 5. Problema 2.13

% Diagrama de f as e
t0 = 0;
t f = 10;
compet i t i on0= [ 1 0 . 5 ] ;
[ t , x ] = ode45( @competi ti on , [ t0 , t f ] , compet i t i on0 ) ;
A = x ( : , 1 ) ;
B = x ( : , 2 ) ;
% Pl ot A( t ) v al ue s i n red wi t h s , B( t ) v al ue s i n b l ue
wi th c i r c l e s .
fi gure ( 1)
plot ( t , A, r , t , B, bo : )
xlabel ( Time , t )
ylabel ( Popul ati on Si z e s )
legend( P1 , P2 )
% Pl ot t he phase pl ane , Av al ue s ver s us Bv al ue s
fi gure ( 2)
plot (A, B)
xlabel ( P1 , A( t ) )
ylabel ( P2 , B( t ) )


Listing 6. Problema 2.19

% Diagrama de f as e
function Dcompeti ti on=compet i t i on ( t , y)
c1=2;
e1=1;
e2=1;
c2=3;
Dcompeti ti on=[ c1y(1). (1 y(1)) e1y ( 1 ) ;
c2y(2). (1 y(1)y(2)) e2y(2)c1y ( 1 ) . y ( 2 ) ] ;


Listing 7. Problema 2.19

cl ear al l
cl c
% Campos de di r e c c i one s
c1=2;
e1=1;
e2=1;
c2=3;
p1 =0: 0. 05: 1;
p2=p1 ;
[ P1 , P2]=meshgrid( p1 , p2 ) ;
dP1=c1P1.(1 P1)e1P1 ;
dP2=c2P2.(1 P1P2)e2P2c1P1. P2 ;
fi gure ( 1)
%s c al e =1;
Li neSpec= bl ack ;
quiver (P1 , P2 , dP1 , dP2 , Li neSpec ) ;
axis image
xlabel ( p1 )
ylabel ( p2 )
s aveas ( 1 , 121 , png ) ;
%%
c1=2;
e1=1;
e2=1;
c2=6;
p1 =0: 0. 05: 1;
p2=p1 ;
[ P1 , P2]=meshgrid( p1 , p2 ) ;
dP1=c1P1.(1 P1)e1P1 ;
dP2=c2P2.(1 P1P2)e2P2c1P1. P2 ;
fi gure ( 2)
%s c al e =1;
Li neSpec= bl ack ;
quiver (P1 , P2 , dP1 , dP2 , Li neSpec ) ;
axis image
xlabel ( p1 )
ylabel ( p2 )
s aveas ( 2 , 122 , png ) ;


Listing 8. Problema 2.20

function de r i v v a l s = pr ed pr ey odes 2 ( t , x)
global c 1 c 3 e 1 e 13 ;
de r i v v a l s = zeros ( si ze ( x ) ) ;
de r i v v a l s ( 1) = c 1 (1x(1)x ( 2) ) x(1)c 3 x ( 2) x(1)e 1 x ( 1 ) ;
de r i v v a l s ( 2) = c 3 x ( 2) x(1)e 13 x ( 2 ) ;
end


Listing 9. Problema 2.20

cl c
cl ear
global c 1 c 3 e 1 e 13 ;
c 1= rand( 1 ) ;
e 1= c 1 rand( 1 ) ;
c 3=rand( 1 ) ;
caso=input ( Caso ( i )=1 o ( i i )=2: ) ;
%caso =1;
i f caso==1
% case ( i ) e 13 /c 3>1e 1 / c 1
e 13=(1e 1 / c 1 ) c 3 + (1c 3 )rand( 1 ) ;
el se
% case ( i i ) e 13 /c 3<1e 1 / c 1
e 13= (1e 1 / c 1 ) c 3 rand( 1 ) ;
end
% Def i ne i n i t i a l and f i n a l t i mes ans v al s
t0 = 0;
t f = 100;
i n i t v a l s = [ 0 . 1 5 0 . 2 5 ] ;
[ t , x ] = ode45( @pred prey odes 2 , [ t0 , t f ] , i n i t v a l s ) ;
A = x ( : , 1 ) ;
B = x ( : , 2 ) ;
% Pl ot A( t ) v al ue s i n red wi t h s , B( t ) v al ue s i n b l ue wi t h c i r c l e s .
fi gure ( 1)
plot ( t , A, r , t , B, bo : )
xlabel ( Time , t )
ylabel ( Popul ati on Si z e s )
t i t l e ( Predator Prey Over ti me )
legend( Prey , Predator )
% Pl ot t he phase pl ane , Av al ue s ver s us Bv al ue s
fi gure ( 2)
plot (A, B)
xlabel ( Prey , A( t ) )
ylabel ( Predators , B( t ) )


F
i
n
F
i
n

You might also like