{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 0 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 0 0 0 0 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 12 0 0 0 0 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 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 89 "nbdd.ms Nicholson-Bailey density dependent model . \nExploration of stability regions. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 306 "Enter values of growth rate r and density dependence parameter q. The program will generate plots of p opulations vs time and phase plots. It also will calculate the eigenv alues of the linearized equations around the equilibrium values of hos t and parasitoid for the particular values of r and q chosen. " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "res tart; with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "r:=1 .5; q:=0.6; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 " c:=1.0; \+ a:=0.2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 209 "### WARNING: s emantics of type `string` have changed\n### WARNING: semantics of type `string` have changed\ntxtr:=convert(evalf(r),string): txtq:=conver t(evalf(q),string):\nlabelr:=`r = `: labelq:=`, q = `:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "Phat:= r/a*(1-q); Nhat:= Phat/(1-e xp(-a*Phat)); K:= Nhat/q;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "N[0]:= 11; P[0]:= 4; # initial conditions (can be changed!)" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 113 "for i from 0 to 200 do\n \+ N[i+1]:=N[i]* exp(r * (1 - N[i]/K) - a*P[i]);\n P[i+1]:=c*N[i]*(1 - \+ exp(-a*P[i]));\nod:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "full title:= cat(labelr,txtr,labelq,txtq):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 95 "plot(\{ [ [t,P[t]] $ t = 0.. 200], [ [t,N[t]] $ t = 0 ..200] \}, style = line, title=`fulltitle`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "plot([ [N[t],P[t]] $ t=0..200], style = line, ti tle=`fulltitle`);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 242 "\nCompare t he results of these simulations to Figure 2.7 in Hassell 1978. Now go back and try this again with new values for r and q. You should use \+ the Hassell reprint as a guide to pick values that yield qualitatively different behaviors. " }}{PARA 0 "" 0 "" {TEXT -1 465 "\nTo calculate the eigenvalues of the linearized system, we recast the equations in \+ more symbolic terms, converting N(t) to N and P(t) to P. We then calc ulate the partial derivatives of each equation with respect to both N \+ and P. This can be done by hand, as done by calculating a11, a12, a2 1, a22. Alternatively, the jacobian command will do the calculation d irectly. Once the matrix is assembled, the eigenvals command is used \+ to calclulate the eigenvalues. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 242 "Remember that since this is a difference equation model, stability occurs (possibly after damped oscillation) when the eigenvalues are less than 1 in absolute value. Oscillations occur when there are imaginary components to the eigenvalues." }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "r:=1.5; q:=0.6; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "Host_rate:=N* exp(r * (1 - N/K) - a*P);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "a11:=diff(Host_rate, N); \+ a12:=diff(Host_rate, P);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "A11:= evalf(subs(\{N=Nhat, P=Phat\}, a11)); A12:= evalf(subs(\{N =Nhat, P=Phat\}, a12));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 " Parasitoid_rate:=c*N*(1 - exp(-a*P));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "a21:= diff(Parasitoid_rate, N); a22:= diff(Parasito id_rate, P);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "A21:=evalf( subs(\{N=Nhat, P=Phat\}, a21)); A22:= evalf(subs(\{N=Nhat, P=Phat\}, \+ a22));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with (linalg):" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "A:= matrix( 2, 2, [ [A11, \+ A12], [A21, A22] ] );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 94 "\nHere i s the alternate method for computing the coefficient matrix using the \+ jacobian command." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "J:= jacobian( \+ [Host_rate, Parasitoid_rate], [N, P] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "A:= evalf( subs( \{N=Nhat, P=Phat\}, evalm( J ) ) ); \+ # Note we get the same thing as before." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 13 "eigenvals(A);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 219 "How do you i nterpret the behavior of the system if these are the eigenvalues? Go \+ back to the beginning of this part of the worksheet, reset r and q, an d see if the eigenvalue caculations lead to a different conclusion." } }}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 }