{VERSION 4 0 "IBM INTEL NT" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 259 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 0 "" }{TEXT 256 32 "Analysis for a Competition Model" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT 257 11 "Session 9: " }{TEXT -1 466 "This session uses Map le to perform a standard analysis of a two dimensional system of diffe rential equations. The techniques developed below show numerical simul ation of the differential equation, nullcline analysis, equilibrium an alysis, and local linear analysis about the equilibria. The mathematic al ideas include Maple's ability to simulate differential equations, s olve systems of nonlinear equations, and finding eigenvalues and eigen vectors for 2-D systems. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT 258 36 "Model for Competition and Simulation" }}{PARA 0 "" 0 "" {TEXT -1 123 "We begin with a mathematical model for competition and show so me basic simulations of this system of differential equation." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 129 "dex := diff(x(t),t) = 0.2*x(t)*(1 - x(t)/8000 - 1.1*y(t)/8000); \+ \ndey := diff(y(t),t) = 0.15*y(t)*(1 - 0.7*x(t)/6000 - y(t)/6000);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "with(DEtools): with(plots): " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 84 "Maple can be used to show the direction field and typical solutions for this model. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 237 "Plot1 := DEplot([dex,dey],[x(t),y( t)], t=0..100, x=0..8000, y=0..8000,[[x(0)=200,y(0)=200], [x(0)=200,y( 0)=7000], [x(0)=7000,y(0)=200], [x(0)=7000,y(0)=7000]], arrows=MEDIUM, title=`Competition Model`, linecolor=t/50, color=CYAN):\nPlot1;" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 131 "Maple's dsolve can numerically so lve this system of equations. It produces a procedure that can be used for graphing the solutions." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "ff := dsolve(\{dex,dey,x(0)=200,y(0)=200\},\n \{x(t),y(t)\}, typ e=numeric, output=listprocedure);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "fx := subs(ff,x(t)): fy := subs(ff,y(t)):\n" }{TEXT -1 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 91 "A sequence of points can be create d for plotting. We will use both 2D and 3D plot routines." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 112 "xpts := [seq([n,fx(n)],n=0..100)]: \nypts := [seq([n,fy(n)],n=0..100)]:\nxy3pts := [seq([n,fx(n),fy(n)],n =0..100)]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 133 "Xgraph := pl ot(xpts, t=0..100, title = `Competition Model`, color = BLUE):\nYgraph := plot(ypts, color = RED):\ndisplay(Xgraph,Ygraph);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "The 3D graph shows the trajectory of the \+ differential equation." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "s pacecurve(xy3pts, axes=NORMAL, orientation=[-70,30]);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 0 "" } {TEXT 259 41 "Find the Equilibria and Sketch Nullclines" }}{PARA 0 "" 0 "" {TEXT -1 368 "Standard analysis of differential equations begins \+ with finding the equilibria. Equilibria are found by solving the right hand sides of the system of differential equations equal to zero. Geo metrically, this occurs when the nullclines intersect. Nullclines are \+ lines (more generally curves) when each of the right hand sides of dif ferential equation are equal to zero." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 112 "First we write the right hand sides \+ of the differential equations, then solve them simultaneously equal to zero." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 96 "f1 := (X,Y) -> 0.2*X*(1 - X/8000 - 1.1*Y/8000);\nf2 : = (X,Y) -> 0.15*Y*(1 - 0.7*X/6000 - Y/6000);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "xyeq := solve(\{f1(X,Y)=0,f2(X,Y)=0\},\{X,Y\}); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "Maple finds all 4 equilibria \+ very easily." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 50 "Below we graph the nullclines with BLUE lines for " }{TEXT 260 6 "dx/dt " }{TEXT -1 22 "= 0 and RED lines for " }{TEXT 261 5 "dy/dt" }{TEXT -1 5 " = 0." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "Y1 := solve(f1(X,Y) = 0,Y); Y2 := solve(f2(X,Y)/Y = 0,Y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "Null1 := plot([20,y,y=0..8000],color = BL UE): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "Null2 := plot(Y1, \+ X = 0..8000, color = BLUE): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "Null3 := plot([x,30,x=0..9000],color = RED): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "Null4 := plot(Y2, X = 0..8570, color = RE D): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "display(\{Null1, Nu ll2, Null3, Null4\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "Below we show the overlay of the Phaseportrait with the Nullcines." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "display(\{Null1, Null2, Null3, Null 4,Plot1\});" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 0 "" }{TEXT 262 32 "Linear Analysis about Equilibria" }}{PARA 0 "" 0 "" {TEXT -1 202 "One can determine a great deal about the behavior o f a differential equation by examining the local behavior near an equi librium. Let us find the Taylor series expansion near the equilibrium \+ where both " }{TEXT 263 1 "x" }{TEXT -1 5 " and " }{TEXT 264 1 "y" } {TEXT -1 13 " are nonzero." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "coeq:=xyeq[4];" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 41 "cox := rhs(coeq[2]); coy := rhs(coeq[1]);" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "taylor(f1(x,coy),x=cox);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "taylor(f1(cox,y),y=coy); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 203 "We want to compare the above computation with the one derived by computing the Jacobian matrix and evaluating at the equilibria. In addition, we find the eigenvalues an d eigenvectors at all 4 equilibria." }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "A := vector([f1(X,Y),f2(X,Y)]);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "J := jacobian(A, [X,Y]); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 46 "Analyze the differential equati on near (0, 0)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "X := 0: \+ Y := 0: J0 := J(0,0);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "ei genvects(J0);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 14 "This gives an " }{TEXT 256 13 "unstable node" }{TEXT -1 38 ", since both eigenvalues a re positive." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "Next analyze the coexistence equilibrium." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "X := cox: Y := coy: J0 := J(cox,coy);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "eigenvects(J0);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "This gives a " }{TEXT 256 11 "stable node " }{TEXT -1 38 ", since both eigenvalues are negative." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 246 "Plot2 := DEplot([dex,dey],[x(t),y( t)], t=0..70, x=6030..6120, y=1700..1800,[[x(0)=6030,y(0)=1700], [x(0) =6030,y(0)=1800], [x(0)=6120,y(0)=1700], [x(0)=6120,y(0)=1800]], arrow s=MEDIUM, title=`Competition Model`, linecolor=t/50, color=CYAN):\nPlo t2;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "The plot above shows the l ocal behavior near the coexistence equilibrium." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 54 "Below is the equilibrium, where only species X exists." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "X := 8000: Y := 0: J0 := J(8000,0);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 15 "eigenvects(J0);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "This gives a " }{TEXT 256 11 "saddle node" }{TEXT -1 71 ", sinc e the eigenvalues consists of a positive and negative eigenvalue." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 51 "Finally, \+ we examine the Y species only equilibrium." }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "X := 0: Y := 6000: J0 := J(0,6000);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "eigenv ects(J0);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "This gives a " } {TEXT 256 11 "saddle node" }{TEXT -1 71 ", since the eigenvalues consi sts of a positive and negative eigenvalue." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 240 "Plot3 := DEplot([dex,dey],[x(t),y(t)], t=0..100, x =-100..100, y=5900..6100,[[x(0)=-10,y(0)=5900], [x(0)=-10,y(0)=6100], \+ [x(0)=10,y(0)=5900], [x(0)=10,y(0)=6100]], arrows=MEDIUM, title=`Compe tition Model`, linecolor=t/50, color=CYAN):\nPlot3;" }}}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 0 "" }{TEXT 265 17 "Practice Exercise " }}{PARA 0 "" 0 "" {TEXT -1 57 "Consider the following system of diff erential equations. " }}{PARA 259 "" 0 "" {TEXT -1 0 "" }{XPPEDIT 18 0 "diff(x(t),t) = y(t)-y(t)^3" "6#/-%%diffG6$-%\"xG6#%\"tGF*,&-%\"yG6# F*\"\"\"*$-F-6#F*\"\"$!\"\"" }}{PARA 258 "" 0 "" {TEXT -1 0 "" } {XPPEDIT 18 0 "diff(y(t),t) = -x(t)-y(t)^2;" "6#/-%%diffG6$-%\"yG6#%\" tGF*,&-%\"xG6#F*!\"\"*$-F(6#F*\"\"#F/" }}{PARA 257 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 181 "Draw the phaseportrait, showing rep resentative trajectories. Find all equilibria and graph the nullclines . Determine the eigenvalues and eigenvectors associated with the equil ibria." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "2" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }