Computer Modeling of Population Growth

advertisement
MA354
Project 3: Investigating the Long Term Behavior of Dynamical Systems
Using Mathematica
Objective
The objective of thisproject is to familiarize ourselves with using analytical and numerical techniquesto
investigate a dynamical system, in particular usinganalytical techniques to identify the steady states and
numerical techniques to investigate the trajectories and stability of the steady states. In this project, we will
focus onthe affine linear dynamical system an+1= ran + b. This project also represents an orientation to
Mathematica.
A steady state is a state of the system that remains fixed. Given a
dynamical system an+1=f(an), x is called a fixed point (or equilibrium point)
if f(x)=x.
Steady
States and
Stability:
We say that a fixed point is locally stable if, given an initial condition
sufficiently close to the fixed point, subsequent iterates eventually
approach the fixed point. The behavior of a dynamical system as it
approaches a steady state is called the asymptotic or transient behavior.
If the fixed point is approached for all initial conditions, we say that the
fixed point is globally stable.
Classification of Dynamical Systems: Linear and Non-linear Systems
A discrete dynamical system is linearif it can be written in the form:
an  cn1an1  cn2 an2    c2 a2  c1a1  c0 a0  g (n)
where ci are constants and g(n) is a function of n only.
Example of a linear system: a n 1  ra n


Example of a non-linear system: a n 1  a n  k M  a n a n
(Exponential Growth Model)
(Logistic Growth Model)
Special Cases of Linear Systems:
If g(n) = 0, the system is homogenous. If g(n) is a constant, the system is affine.
Example of a homogeneous linear system: an+1= ran
Example of an affine linear system:an+1= ran + b
(Exponential Growth Model)
A. Mathematica As a Symbolic Calculator
To investigatethe linear dynamical system an+1 = ran.
(Geometric/Exponential Growth Model when b=0)
1) Find a10 by solving the dynamical system by hand:
a. Write down the first three terms of the dynamical system.
a0 =
a1 =
a2 =
b. Find the solution to the dynamical system by writing an explicit equation for the value of the
dynamical system at an arbitrary time step k.
ak =
c. Find a10:
a10 =
2) Find a10 using Mathematica
Enter the dynamical system as a recursive
function by typing:
F[0]=a0;
F[n_]:=F[n-1]*r;
Find the following terms:
Enter the dynamical system as an explicit
function by typing:
H[k_]:=r^k*a0;
Find the following terms:
a0 = F[0] =
a0 = H[0] =
a1 = F[1] =
a1 = H[1] =
a2 = F[2] =
a2 = H[2] =
a10 = F[10] =
a10 = H[10] =
B. Using MathematicaAs a Numeric Calculator
To investigate the linear dynamical system an+1 = ran.
(Geometric/Exponential Growth Model when b=0)
3) Explore the long-term behavior of the dynamical system by plotting the function over 100 time steps:
when r = 1.04 and a0 = 5:
Sketch of 5*1.04k for k ranging
from 0 to 100:
Plot[1.04^k*5,{k,0,100}]
4) Figure out how to plot graphs of H (k )  5r k for multiple values of r (r = {1.04, 1.06 and 1.08}) on a single
graph. Write the command syntax you used here:
5) Sketch graphs containing plots of H (k )  5r k for the following sets of values of r in the table, where k
ranges from 0 to 100:
6)
r = {1.04, 1.06 and 1.08}
r = {0.94, 0.96 and 0.98}
r  1 (Unbounded Growth)
0  r  1 (Decay to 0)
7) Negative values of r require the ‘Table’ function in Mathematica. Sketch graphs containing plots of
H (k )  5r k for the following values of r:
ListPlot[Table[r^k*5,{k,0,20}], PlotJoinedTrue]
r = -0.4
r = -1.4
 1  r  0 (Oscillatory Decay towards 0)
r  1 Unbounded Oscillations
8) For completeness, we shouldn’t missr = 1 and r= -1.
r = -1
r=1
C. Analytic exercise: Determining the Case-by-caseSets of Steady States
To investigate the affine linear dynamical system an+1 = ran+ b.
9) Our general dynamical system is: a n1  ra n  b with initial condition a0.
To find the set of fixed pointsPf, we solve for the set of points a such that a  ra  b :
Pf = {a | a= ra + b}.
10) Organize the set of steady states for the 4 separate cases in this table in terms of the set Pf  {a | a  ra  b} :
b≠ 0
b=0
r =1
Pf =
Pf =
r ≠1
Pf =
Pf =
Project 3 Assignment: (Turn-in only this for Project 3)
Investigating the Fixed Points and Stability of the Linear Affine System an+1 = ran + b
Prepare a report in Mathematica or PowerPoint describing the linear affine dynamical system. Include
figures that describe the steady states and typical trajectories of the system for each of the four cases. Annotate
figures to describe the dynamics of the trajectories (e.g., ‘monotonically increasing’ or ‘oscillatory’) and the
stability of steady states. You will be graded on the clarity of your presentation to provide an overview of
features of the dynamical system.
Amendment February 12th:
To simplify the project, instead of describing the dynamical system comprehensively, consider one appropriate
choice of values for {b,r} for each case and show several trajectories for each choice by varying the initial
condition. Include at least one trajectory that shows the steady state(s) and one trajectory that demonstrates the
steady state(s) stability.
For example, for the first case, you actually only have one choice for {b,r} since you must have {b,r} ={0,1}.
On a single graph, show several trajectories of an+1=an with different starting conditions. For the second case,
you could, for example, choose {b,r} ={7,1} (or {b,r}={-2,1}) since b is free and r is 1 in which case you
would show trajectories of a n 1  a n  7 (or a n 1  a n  2 ).
Keep in mind the difference between the recursive (implicit) description of the dynamical system which is
a n1  ra n  b and the explicit solution to the dynamic system which looks a little different for each case but
which generally has form a(n)  k1 r n  k 2 (you can find expressions for k1 and k2 in terms of r, and b in your
notes). In Exercise A, Mathematica was used to describe the system in both ways, while in Exercise B we
focused on the explicit form of the geometric/exponential case.
Download