> # Phase diagrams for 1st order ODEs are considered and studied. # -------------------------------------------------------------------------------- # # Art Belmonte # Thu, 25/Jan/96 # Math 308-509 # Section 2.6: Population Dynamics and Some Related Problems # # Recall that `T' stands for the textbook by Boyce and Diprima (`M' # would signify lab manual), 22/1 means page 22 / problem #1, and # that S2.1 indicates the problem is from Section 2.1 -------------------------------------------------------------------------------- # T-62/3-1: # dN/dt = F > F:=N->N * (N-1) * (N-2);\ plot(F(N), N=0..3, y=-1..2, labels=[`N`, `dN/dt`],\ xtickmarks=3, ytickmarks=2); -------------------------------------------------------------------------------- # T-62/3-2: NOTE: The overflow errors/warnings are probably # indicative of an asympotote in the solution corresponding to the # initial condition N(0) = 2.1. > unassign('N');\ deq:={diff(N(t), t) = N(t) * (N(t) - 1) * (N(t) - 2)};\ inits:={[0, 0.2], [0, 0.8], [0, 1.7], [0, 2.1]};\ DEplot1(op(deq), N(t), t=0..3, inits, N=-1..3); -------------------------------------------------------------------------------- # T-62/3-3: Here are implicit and explicit solutions from dsolve. (It # this case dsolve COULD explicitly solve for N(t). This may not # always be the case.) Note that this NONLINEAR equation has # three equilibrium solutions which are NOT accounted for in the # dsolve solutions: N(t) = 0, N(t) = 1, and N(t) = 2. This is why we # can't speak of a "general" solution to a nonlinear differential # equation like we can for a linear one. > deq; dsolve(deq, N(t));\ dsolve(deq, N(t), explicit); -------------------------------------------------------------------------------- # T-63/9-1: > unassign('N');\ F:=N->N^2 * (N^2-1);\ plot(F(N), N=-2..2, y=-1..2, labels=[`N`, `dN/dt`],\ xtickmarks=3, ytickmarks=2);\ -------------------------------------------------------------------------------- # T-63/9-2: NOTE: The overflow errors/warnings are probably # indicative of an asympotote in the solution corresponding to the # initial condition N(0) = 1.1. > unassign('N');\ deq:={diff(N(t), t) = N(t)^2 * (N(t)^2 - 1)};\ inits:={[0, 0.2], [0, 0.8], [0, 1.1], [0, -0.3], [0, -1.7]};\ DEplot1(op(deq), N(t), t=0..3, inits, N=-2..2); -------------------------------------------------------------------------------- # T-63/9-3: Here is an implicit solution to the D.E. Note that dsolve # was not able to isolate an explicit solution. Note that this # NONLINEAR equation has three equilibrium solutions which are # NOT accounted for in the dsolve solution: N(t) = -1, N(t) = 0, and # N(t) = 1. This is why we can't speak of a "general" solution to a # nonlinear differential equation like we can for a linear one. > deq; dsolve(deq, N(t));\ dsolve(deq, N(t), explicit); --------------------------------------------------------------------------------