{VERSION 3 0 "IBM INTEL NT" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 1 1 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R 3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 128 0 128 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 128 128 1 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "restart; gc();" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 134 "May, RM 1981. Models for single \+ populations. pp 12 - 17 in May, RM (ed). Theoretical Ecology: Princip les and applications. Sinauer." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 38 "DISCRETE GROWTH (DIFFERENCE EQUATIONS)" } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 186 "Many po pulations have discrete generations, with no overlap, so that growth o ccurs in discrete steps. Examples are annual animals or plants that h ave a single breeding season each year." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 164 "To model this situation, we use a d ifference equation with a time step of a generation, rather than a dif ferential equation with an infinitesimally small time step." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 35 " N(t+1) = F(N(t) )" }}{PARA 0 "" 0 "" {TEXT -1 78 "The simplest such equation is the di screte version of the exponential equation" }}{PARA 0 "" 0 "" {TEXT -1 41 " N(t+1) = lambda * N(t)" }}{PARA 0 "" 0 "" {TEXT -1 93 "We can model this in Maple by writing a loop that calcula tes population size each generation:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "lambda:=1.5; # population growth \+ rate" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "N[0]:= 10; # start with initial population" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "for t from 0 to 10 do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "N[t+1]:= lambda* N[t] ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "od: #end of time loop" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "plot( [[ i, N[i] ] $i = 0..10], style=line ,title=`Exponential Difference Equation`);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "What did the plot look like?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 69 "How different is it from the plot \+ of the differential equation model?" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 42 "2.3.3 Stable points, stable cycles, chaos." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 231 " Difference equati ons have a range of very interesting behaviors, even when only a singl e population is involved. These behaviors run the range from stable e quilibria, oscillations, and chaotic behavior which appears random." } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 100 "Let us now examine a Density De pendent difference equation that is similar to the logistic equation: " }}{PARA 0 "" 0 "" {TEXT -1 51 " N(t+1) = N(t) + r * N(t) * ( 1 - N(t) / K)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "N[0]:=100;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "Th is is the initial population size" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "K:=1000;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "This is the carrying capacity" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "r:=1.2;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "This is the growth rate" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "for t from 0 to 30 do" }}{PARA 0 "" 0 "" {TEXT -1 52 "This loop allows time to progress for 30 generations" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "N[t+1]:=N[t] + (r/K) * N[t] *(K- N[t]);" }}{PARA 0 "" 0 "" {TEXT -1 48 "This is the logistic equation in differ ence form" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "od; " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 131 "This is the end of the time loop. As the prog ram runs, you will see the population size at each time step displayed on the screen." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with (plots):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 272 "When you plot, you have to use a new name for the time variable, \+ different from what you used in the main program loop. Otherwise Mapl e gets confused and refuses to do anything. So we use i as the time v ariable in the plot statement, since we used t in the main program." } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "plot( [[ i, N[i] ] $i = 0..30], s tyle=line,title=`Difference Equation Logistic`);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 42 "Does this plot look like a logistic curve?" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 187 "We will try to reproduce May's Figure 2.2, which shows a range of dynamic behavior of population density as a function of time, usin g difference equation B in Table 2.2. This equation is" }}{PARA 0 "" 0 "" {TEXT -1 42 " N(t+1) = N(t) * exp(r*(1-N(t)/K))" }}{PARA 0 "" 0 "" {TEXT -1 147 "The reason for using this equation, is that po pulation density can never become negative, whereas in the more common form of the logistic equation," }}{PARA 0 "" 0 "" {TEXT -1 42 " \+ N(t+1) = N(t) + r*N(t)*(1-N(t)/K)" }}{PARA 0 "" 0 "" {TEXT -1 112 " It is possible with high growth rates r, for the population to decline below zero, which is clearly unrealistic." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 143 "May's Figure 2.2 reports the r esults of simulations with 5 different values for the growth rate r, a nd plots population size for 30 time steps." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 29 "We define a list of r values:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "lst:=[1.8,2.3,2.6,3.3,5.0];" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 93 "We then tell Maple to use each of \+ the values of r in the list and make a graph for each case:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "for r in lst do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "N[0]:=0.075;" }}{PARA 0 "" 0 "" {TEXT -1 52 "This is \+ the initial population size in units of N/K" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "for t from 0 to 30 do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "N[t+1]:=N[t]*exp(r*(1-N[t]/1.0));" }}{PARA 0 "" 0 "" {TEXT -1 82 "Note that K has been set to 1.0, so that the graph will be plotted in units of N/K" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "od; # end of ti me list" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "title1:=convert(r,string );" }}{PARA 0 "" 0 "" {TEXT -1 63 "This is a way to put the value of r into the title on the graph" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "plo t( [[ i, N[i] ] $i = 0..30], style=line,title=title1);" }}{PARA 0 "" 0 "" {TEXT -1 14 "Plot the graph" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 " od;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 64 "Repeat the process until a ll items in the r list have been used." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 66 "What do the graphs look like? How si milar are they to Figure 2.2?" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 364 "We will now examine in detail t he pattern of change in behavior as r is increased from 1.0 to 3.0, an d will attempt to reproduce Figure 2.1. In order to illustrate this, \+ we will generate both Figure 2.1, and the underlying individual plots \+ of numbers versus time that generate the data used in Fig 2.1. The nu mbers vs time plots will be produced as an animation." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 436 "The bifurcation plot shows the values of population size that \+ exist around the 'equilibrium' at each value of r. Here the values ar e found by saving the population sizes during time steps 60 to 100 in \+ each simulation. We assume that the system has reached its final beha vior after 60 time steps. A more rigorous approach would wait for tim e steps 2000-3000, but you would have to wait a very long time to see \+ the plot if we did that." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 351 "In a bifurcation plot, you are plotting r on the horizo ntal axis and N[i] on the vertical axis, so you would write the plot s tatement differently, putting r as the first item in the plot list, an d N[i] as the second item. The range of time steps to be plotted in a bifurcation plot could be steps 20 to 30, so you specify those values in the range :" }}{PARA 0 "" 0 "" {TEXT -1 47 "plot( [[ r, N[i] ] $i = 20..30], style=point);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "graf_list:=N ULL; #create a place to store the time plots" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "plot_list:=NULL; #create a place to store bifurc ation data" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "for r from 0.5 to 3.0 by 0.1 do" }} {PARA 0 "" 0 "" {TEXT -1 65 " Try a range of values of r from 0.5 to \+ 3.0 in increments of 0.1" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "N[0]:= 100; # start with same init ial population " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "for t from 0 to \+ 100 do" }}{PARA 0 "" 0 "" {TEXT -1 39 " Do 100 time steps in each si mulation" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "N[t+1]:=N[t] + (r/K) * \+ N[t] *(K- N[t]);" }}{PARA 0 "" 0 "" {TEXT -1 36 " Use traditional lo gistic equation" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "if t >60 then pl ot_list:=plot_list,[ r, N[t+1]]; #save x,y pairs (r,N[t]) " }}{PARA 0 "" 0 "" {TEXT -1 74 "Save only the last 40 points in each simulation to put on bifurcation plot" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 " f i; #end of if clause" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "od; #end of time loop" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "graf_list:=graf_list, plot( [[ i, N[i] ] $i = 0..100], style=line);" }}{PARA 0 "" 0 "" {TEXT -1 42 " Save a complete graph of each trajectory" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 18 "od: #end of r loop" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 13 "with (plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "plot([plot_list],style=point,symbol=cross, title=`May Figure 2.1`);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "This is the bif urcation plot. How similar is it to figure 2.1? " }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 75 "display([graf_list],insequence=true,title=`Animatio n of Dynamic Behavior`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "Try the animation by pressing the play button (>)." }}{PARA 0 "" 0 "" {TEXT -1 103 "Resize the ani mation plot by grabbing an edge with the mouse and dragging with the l eft button pressed." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 464 "Move the bifurcation plot so you can see it at the sam e time you are running the animation. As the animation runs, you are \+ moving along the r axis in the bifurcation plot. You will first see o nly a single stable population size from time 60 to 100. Then you wil l see stable oscillation between 2 points, which shows up as a split i n the bifurcation plot. Later you will see oscillation between 4 poin ts, which shows up as another split in the bifurcation plot." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 337 "If you slow do wn the animation using the (<<) button, you can see each individual ti me plot. Each time plot corresponds to one of the points along the r \+ axis in the bifurcation plot. Try moving a pencil along the r axis of the bifurcation plot while the animation runs, to see the corresponde nce between the time and bifurcation plots." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 177 "Have a look \+ at Table 2.3 in the article. This shows the points where behavior of \+ the model shifts from stability to chaos. Do you think that these con ditions are reasonable? " }}{PARA 0 "" 0 "" {TEXT -1 208 "In answerin g this question, first decide what r is. Remember r is proportional g rowth in population size from one generation to the next. A value of \+ r = 1.0 means 100% population growth in one generation. " }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 0" 14 }{VIEWOPTS 1 1 0 1 1 1803 }