{VERSION 5 0 "IBM INTEL LINUX" "5.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 "Hyperlink" -1 17 "" 0 1 0 128 128 1 2 0 1 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 "2D Input" 2 19 "" 0 1 255 0 0 1 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "H eading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } 1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 8 2 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Error" 7 8 1 {CSTYLE "" -1 -1 "" 0 1 255 0 255 1 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Bullet Item" 0 15 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 3 3 0 0 0 0 0 0 15 2 } {PSTYLE "List Subitem" 14 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 3 12 0 0 0 0 273 0 }{PSTYLE "Normal" -1 278 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 }} {SECT 0 {SECT 1 {PARA 3 "" 0 "" {TEXT -1 12 "Introduction" }}{PARA 0 " " 0 "" {TEXT -1 53 "Most of this was copied from http://www.maplesoft. com" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 14 "Initialization" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "rest art;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with( DEtools ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with( plots ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "with( linalg ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "1.A" {TEXT -1 44 "1.A Ente ring differential equations in Maple" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 130 "A differential equation can be entered in Maple using any of t he methods for constructing algebraic, transcendental, or any other " }{HYPERLNK 17 "equation" 2 "equation" "" }{TEXT -1 153 " in Maple. It \+ is a good idea to assign each differential equation to a unique, and d escriptive, Maple name. Such assignments are typically done using an \+ " }{HYPERLNK 17 "assignment statement" 2 "assignment" "" }{TEXT -1 1 " ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "ode := diff( x(t), t ) = k * x(t);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 233 "When Maple expec ts an equation and receives an expression, the expression is assumed t o be the left-hand side of an equation whose right-hand side is zero. \+ For example, when working with Newton's second law of motion, one migh t have:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "eq_of_motion := \+ F = m*a;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "eq_of_motion2 : = eval( eq_of_motion, a=diff(x(t),t,t) );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "When the " }{HYPERLNK 17 "assign" 2 "assign" "" }{TEXT -1 23 " command is applied to " }{TEXT 19 13 "eq_of_motion2" }{TEXT -1 1 "," }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "assign(eq_of_motion2) ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 34 "the result is that the Maple name " }{TEXT 19 1 "F" }{TEXT -1 27 " has been assigned a value," }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "F;" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 10 "Note that " }{TEXT 19 1 "F" }{TEXT -1 277 " is only an \+ expression, not an equation. In most instances, when Maple receives an expression when an equation is expected, it is assumed that the expre ssion is the left-hand side of the equation and the right-hand side is zero. Thus, the following two commands are equivalent:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "dsolve( F, x(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "dsolve( F=0, x(t) );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 130 "A first-order differential equation is a n equation that expresses a relationship between a function, x, its in dependent variable, " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 22 ", and the derivative, " }{XPPEDIT 18 0 "diff(x(t),t)" "6#-%%diffG6$-%\"xG6# %\"tGF)" }{TEXT -1 183 ". (Note that Maple expresses all derivatives a s partial derivatives. This is a fact of life that we must accept.) Ot her numeric or symbolic parameters can appear in the equation. The " } {HYPERLNK 17 "diff" 2 "diff" "" }{TEXT -1 5 " and " }{HYPERLNK 17 "D" 2 "D" "" }{TEXT -1 53 " commands are used to represent derivatives in \+ Maple." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "q1 := `x'` = diff (x(t), t ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "q1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "conv ert( q1, D );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 60 "The general form for a first-order differential equation is " }{XPPEDIT 18 0 "F(t,x(t) ,diff(x(t),t))=0" "6#/-%\"FG6%%\"tG-%\"xG6#F'-%%diffG6$-F)6#F'F'\"\"! " }{TEXT -1 65 ". In most cases it will be possible to solve for the d erivative, " }{TEXT 257 4 "i.e," }{TEXT -1 1 " " }{XPPEDIT 18 0 "diff( x(t),t) = G(t,x(t))" "6#/-%%diffG6$-%\"xG6#%\"tGF*-%\"GG6$F*-F(6#F*" } {TEXT -1 9 ". While " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 78 " can generally work with ODEs specified in either form, the graphi cal command " }{HYPERLNK 17 "DEplot" 2 "DEplot" "" }{TEXT -1 63 " requ ires the explicit format (or its equivalent for a system)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 63 "A second- order derivative of a function x can be entered using " }{HYPERLNK 17 "diff" 2 "diff" "" }{TEXT -1 3 " as" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "q2 := `x''` = diff( x(t), \+ t,t ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "q2;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "The co rresponding derivative expressed in terms of " }{HYPERLNK 17 "D" 2 "D " "" }{TEXT -1 3 " is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "convert( q2, D );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 93 "I f the right-hand side of this expression were entered explicitly, the \+ syntax would be one of" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "(D@D)(x)(t);" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 2 "or" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "(D@@2)(x)(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "The second form is functionally eq uivalent to the " }{HYPERLNK 17 "composition" 2 "@" "" }{TEXT -1 27 " \+ of D with itself, that is," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "D( D(x) )(t);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 37 " Higher derivatives follow similarly." }}}}{SECT 1 {PARA 3 "" 0 "1.B" {TEXT -1 39 "1.B solutions to differential equati ons" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " }{HYPERLNK 17 "dsolve " 2 "dsolve" "" }{TEXT -1 290 " command is used to obtain a solution t o a differential equation. If initial and/or boundary conditions are s pecified, Maple attempts to find a particular solution to the specifie d initial or boundary value problem. Otherwise, the result is a genera l solution to the differential equation. " }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 4 "" 0 "1.B-1" {TEXT -1 23 "1.B-1 General solutions" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 100 "The simples t form of the dsolve command requires the differential equation and th e unknown function:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "ode := diff( x(t), t ) = k*x(t);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "fn := x(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "sol := dsolve( ode, fn );" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 117 "The methods considered and execut ed by Maple to obtain a solution to an ODE or IVP can be observed by i ncreasing the " }{HYPERLNK 17 "infolevel" 2 "infolevel" "" }{TEXT -1 5 " for " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 7 " to 3 :" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "infolevel[dsolve] := 3:" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "Then, re-executing the previous \+ example yields :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "dsolve( ode, fn );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "To suppress the ad ditional information, reset the " }{HYPERLNK 17 "infolevel" 2 "infolev el" "" }{TEXT -1 5 " for " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" } {TEXT -1 7 " to 0 :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "info level[dsolve] := 0:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 "Notes:" }} {PARA 15 "" 0 "" {TEXT -1 85 "all occurrences of the unknown function \+ in the ODE include the independent variable, " }{XPPEDIT 18 0 "x(t)" " 6#-%\"xG6#%\"tG" }{TEXT -1 30 ", not just the function name, " } {XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 1 ";" }}{PARA 15 "" 0 "" {TEXT -1 158 "since this is a general solution to a first-order equation, th e general solution is a one parameter family of solutions, the default name of the parameter is " }{TEXT 19 3 "_C1" }{TEXT -1 1 ";" }}{PARA 15 "" 0 "" {TEXT -1 14 "the result of " }{HYPERLNK 17 "dsolve" 2 "dsol ve" "" }{TEXT -1 70 " is an equation, to access the right-hand side of this definition use " }{HYPERLNK 17 "rhs" 2 "rhs" "" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "X := rhs(sol);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 15 "" 0 "" {TEXT -1 13 "applying the " }{HYPERLNK 17 "assign" 2 "assign" "" } {TEXT -1 26 " command to the result of " }{HYPERLNK 17 "dsolve" 2 "dso lve" "" }{TEXT -1 6 " does " }{TEXT 258 3 "not" }{TEXT -1 141 " conver t the solution to a Maple function of the independent variable, to obt ain the solution as a function of the independent variable, use " } {HYPERLNK 17 "unapply" 2 "unapply" "" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "X := unapply( rhs(sol), t );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "X(0);" }}}}{SECT 0 {PARA 4 "" 0 "1.B -2" {TEXT -1 48 "1.B-2 Solutions to initial value problems (IVPs)" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 217 "An initial value problem is an OD E together with an appropriate set of initial conditions. To find the \+ solution of an IVP with dsolve, the first argument must be a set consi sting of the ODE and the initial conditions:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "ode;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "ic := x(0)=A;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "sol:=dsolve( \{ode,ic\}, fn );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 259 "For an IVP for an ODE of order n requires n initial conditions , i.e., values for the unknown function and its first (n-1) derivative s at a single point. The following example is the second-order IVP is \+ equivalent to the the first-order system just considered." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "ode2 := diff( x(t), t,t ) + diff( x(t), t ) - 2*x(t) = 0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "ic2 := x(0)=X0, D(x)(0)=0;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "sol2 := dsolve( \{ode2,ic2\} , x(t) );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 18 "Note that Maple's " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 136 " command is not sa vvy enough to know what to do with a differential equation that does n ot explicitly identify the independent variable:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "dsolve( D(x )=k*x, x(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "dsolve( D (x)(t)=k*x(t), x(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "convert(D(x)(0)=2,diff); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "This is just one of many reas ons why most users prefer to use " }{HYPERLNK 17 "diff" 2 "diff" "" } {TEXT -1 39 " when creating a differential equation." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " } {HYPERLNK 17 "D" 2 "D" "" }{TEXT -1 98 " operator is generally used to specify derivative initial and/or boundary conditions. For example," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "dsolve( \{diff(x(t),t)=k*x(t), D(x)(0)=1\}, x(t) );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 93 "While the derivative condition can be converted to an equ ivalent expression in terms of diff," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "convert(D(x)(0)=1,diff); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "it is not practical to use this expression as an ini tial condition in " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 1 " :" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "dsolve( \{diff(x(t),t)=k*x(t), convert(D(x)(0),diff)= 1\}, x(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}} {SECT 1 {PARA 3 "" 0 "1.D" {TEXT -1 33 "1.D Graphical solutions to an \+ IVP" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "One of the graphical tools \+ for analyzing the solution of an IVP, " }{HYPERLNK 17 "odeplot" 2 "plo ts,odeplot" "" }{TEXT -1 6 ". The " }{HYPERLNK 17 "DEplot" 2 "DEtools, DEplot" "" }{TEXT -1 19 " command, from the " }{HYPERLNK 17 "DEtools" 2 "DEtools" "" }{TEXT -1 108 " package, provides graphical information directly from the differential equation(s). In it's simplest form, " }{HYPERLNK 17 "DEplot" 2 "DEtools,DEplot" "" }{TEXT -1 45 " can create a plot of the solution to an IVP:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "ode;\node:=subs(k=3,ode);\n ic:=x(0)=1;\nsol:=dsolve(\{ode,ic\},x(t));" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 37 "DEplot( ode, x(t), t=-1..2, [[ic]] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 81 "The extra set of square brackets around the initial condition a re needed because " }{HYPERLNK 17 "DEplot" 2 "DEtools,DEplot" "" } {TEXT -1 226 " facilitates the display of the solution to several diff erent initial conditions in a single plot. For example, the plot of th e solution for two additional sets of initial conditions can be added \+ with one simple change to the " }{HYPERLNK 17 "DEplot" 2 "DEtools,DEpl ot" "" }{TEXT -1 9 " command:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "ic1:=x(0)=1;\nic2:=x(0)=2;\n ic3:=x(0)=3;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "DEplot( ode, x(t), t=-1..2, [[ic1],[ic2],[i c3]] );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 45 "Plots in general need \+ to be defined by a map:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 " G:=x->sin(20*x)*exp(x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 " plot(G,x=-5..5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "Why didn't th is work?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "plot(G(x),x=-5..5);" }}}}{SECT 1 {PARA 3 "" 0 "1.E" {TEXT -1 10 "1.E Using " }{HYPERLNK 17 "odeadvisor" 2 "odeadvisor" "" }{TEXT -1 19 " to classify an ODE" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " }{HYPERLNK 17 "odeadvisor" 2 "odeadvisor" "" }{TEXT -1 22 " c ommand, part of the " }{HYPERLNK 17 "DEtools" 2 "Detools" "" }{TEXT -1 118 " package, provides a method to check the classification of an \+ ODE prior to obtaining a solution. The basic syntax for " }{HYPERLNK 17 "odeadvisor" 2 "odeadvisor" "" }{TEXT -1 16 " is very simple." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "ode := diff( y(t), t ) = a*y(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "odeadvisor( ode, y(t) );" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 142 "This resul t is a little surprising. Most users, including myself, generally clas sify this ODE as either separable or first-order linear. When " } {TEXT 19 10 "odeadvisor" }{TEXT -1 76 " returns an unexpected, or unfa miliar, response it can be useful to include " }{TEXT 19 4 "help" } {TEXT -1 26 " as the final argument to " }{TEXT 19 10 "odeadvisor" } {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 1 " " }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 30 "odeadvisor( ode, y(t), help );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 122 "To check if an ODE is solvable by one or more specific methods , a list of methods can be included as an optional argument." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "o deadvisor( ode, y(t), [separable] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "odeadvisor( ode, y(t), [exact] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 112 "A \+ (seemingly) simple modification to the ODE can significantly alter the classification of the ODE. For example," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "ode2 := diff( y(t), \+ t ) = a*y(t) + f(t):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "ode advisor( ode2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "odeadvi sor( ode2, [separable] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "2.A" {TEXT -1 46 "2.A General Solution Me thod for Separable ODEs" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "re start;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with( DEtools ):" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with( plots ):" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 15 "with( linalg ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 92 "A separable differential e quation is a differential equation that can be written in the form" }} {PARA 278 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "diff( y(x), x ) = f(y (x))/g(x)" "6#/-%%diffG6$-%\"yG6#%\"xGF**&-%\"fG6#-F(6#F*\"\"\"-%\"gG6 #F*!\"\"" }{TEXT -1 2 " ." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "ode := y(x)/x*diff( y(x), x ) = exp (x)/y(x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 16 "As discussed in " }{HYPERLNK 17 "Unit 1 ( Section E)" 1 "unit01.mws" "1.E" }{TEXT -1 6 ", the " }{HYPERLNK 17 "o deadvisor" 2 "DEtools,odeadvisor" "" }{TEXT -1 59 " command can be use d to check the classification of an ODE." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "odeadvisor(ode,[sepa rable]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 110 "In this case, it is easily seen that the variables are separated in this ODE when it is multiplied by y(x)*x : " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "sep_var := ode * y(x)*x ;" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 131 "Once in se parated form, the solution is obtained by integration of the separated equation with respect to the independent variable:" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "int_sep_v ar := map( Int, sep_var, x );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 155 "Evaluating these indefi nite integrals, and adding a constant of integration to one side of th e equation, leads to an implicit form of the general solution:" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "gen_impl_soln := value( int_sep_var ) + (0=C);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 88 "O f the three explicit expressions for y(x) that are obtained from this \+ implicit solution" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 48 "all_expl_soln := solve( gen_impl_soln, \{y(x )\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "only one is real-valued:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "real_expl_s oln := op(op(remove( has, \{all_expl_soln\}, I )));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "O f course, the constant " }{XPPEDIT 18 0 "3*C" "6#*&\"\"$\"\"\"%\"CGF% " }{TEXT -1 72 " could be replaced by a new constant, but this is not \+ an essential step." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 36 "If an initial condition is provide d," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "ic := y(1)=2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "it can be used to dete rmine a specific value for the constant in the solution:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "eqn_for_C := subs(x=1,ic,real_expl_ soln);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "soln_C := solve( \+ eqn_for_C, \{C\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "The resulting (explicit) particula r solution to the IVP is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "real_part_soln := subs( soln_C, rea l_expl_soln );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 46 "A plot of this solution could be o btained with" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "plot( rhs(real_part_soln), x=-1..3 );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 174 "The initial condition can be applied earlier in the prob lem, at the time of the integration. This would require the following \+ modification of the previous solution procedure:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "int_sep_var 2 := map( Int, sep_var, x=1.._x );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "part_impl_soln2 := subs( _x=x, ic, value( int_sep_var 2 ) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 228 "In the above two commands, note i) the use of \+ the dummy name, _x, as the upper limit of integration and ii) that it \+ was not necessary to introduce an integration constant. The real-value d solution to this equation is, as before," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "real_part_soln2 := op(op( remove( has, \{ solve( part_impl_soln2, \{y(x)\} )\}, I ) ));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "2.B" {TEXT -1 28 "2.B Cross-Check of Solutions" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 75 "Obser ve that all solutions, implicit or explicit, satisfy the original ODE: " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "odetest( gen_impl_soln, ode );" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 31 "odetest( real_part_soln, ode );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "odetest( part_impl_soln2, ode );" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "odetest( real_part_soln2, \+ ode );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "2.C" {TEXT -1 19 "2.C Closing Remarks" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " }{HYPERLNK 17 "DEtools" 2 "DEtools" "" } {TEXT -1 18 " package contains " }{HYPERLNK 17 "separablesol" 2 "DEtoo ls,separablesol" "" }{TEXT -1 71 ", a procedure designed specifically \+ for the solution of separable ODEs." }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "separablesol( ode );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 74 " \+ command returns the same result, but might not have used the same meth od." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "infolevel[dsolve] := 3:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "dsolve( ode, y(x) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "To force " } {HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 65 " to use a specific m ethod, an optional argument can be specified:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "dsolve( ode , y(x), [separable] );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "infolevel [dsolve] := 0:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "For additional information about t his syntax, please consult the help topic " }{HYPERLNK 17 "dsolve,educ ation" 2 "dsolve,education" "" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "3.A" {TEXT -1 32 "3.A Exponential Growth and Decay" }}{SECT 0 {PARA 4 "" 0 "3.A-1" {TEXT -1 22 "3.A-1 General Solution" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 74 "T he general model for exponential growth and decay with \"growth\" cons tant " }{XPPEDIT 18 0 "k" "6#%\"kG" }{TEXT -1 4 ", is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "ode := d iff( x(t), t ) = k * x(t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "and initial condition" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "ic := x(0) = A;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 80 "This equation is seen to be sepa rable, and Maple agrees with this classification" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "odeadvisor( ode, [separable] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "To find the general solution from first principles," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "impl_soln := subs( _t=t, map( int, ode/x(t) , t=0.._t ) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "impl_part _soln := subs( ic, impl_soln );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "expl_part_soln := op(solve( impl_part_soln, \{x(t)\} ));" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 49 "Of course, the same result could be obtained from" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "infolevel[dsolve] := 3:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "so ln2 := dsolve( \{ode, ic\}, x(t), [separable] );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "infolevel[dsolve] := 0:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "simplify( soln2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "3.A-2" {TEXT -1 19 "3.A-2 \+ Doubling Time" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 142 "The doubling tim e for a process growing exponentially is the time needed for the quant ity to double from its original size. That is, the time " }{XPPEDIT 18 0 "t[d]" "6#&%\"tG6#%\"dG" }{TEXT -1 11 " such that " }{XPPEDIT 18 0 "x(t[d]) = 2*x(0)" "6#/-%\"xG6#&%\"tG6#%\"dG*&\"\"#\"\"\"-F%6#\"\"!F -" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 65 "double_eqn := subs( t=t[d], x(t[d])=2*x(0), \+ ic, expl_part_soln );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "do uble_time := solve( double_eqn, \{t[d]\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 213 "One of th e important characteristics of the doubling time is that not only is i t the time needed for the initial size to double, it is the time neede d for the size to double at any point in an exponential process." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "q1 := x(T+t[d])/x(T)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 " = subs( t=T+t[d]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 69 " rhs (expl_part_soln) ) / subs( t=T, rhs(expl_part_soln) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "q1;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "`` = simplify(eval( rhs(q1), double_time ));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "3.A-3" {TEXT -1 15 "3.A-3 Half-Life" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 145 "The half-l ife for a quantity that is decaying according to an exponential model \+ is the time after which exactly half the original amount remains." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "half_eqn := subs( t=t[h], x(t[h])=1/2*x(0), ic, expl_part_soln ) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "half_time := solve( ha lf_eqn, \{t[h]\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 10 "Note that " }{XPPEDIT 18 0 "k" "6# %\"kG" }{TEXT -1 91 "<0 for a decaying process. Thus, the half-life fo r an exponential model with \"growth\" rate " }{XPPEDIT 18 0 "-k" "6#, $%\"kG!\"\"" }{TEXT -1 76 " is the same as the doubling time for an ex ponential model with growth rate " }{XPPEDIT 18 0 "k" "6#%\"kG" } {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 1 {PARA 3 "" 0 "3.B" {TEXT -1 21 "3. B Logistic Equation" }}{SECT 1 {PARA 4 "" 0 "3.B-1" {TEXT -1 22 "3.B-1 General Solution" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 120 "The general \+ logistic equation is a modification of the exponential model in which \+ the growth is tempered by the factor (" }{XPPEDIT 18 0 "K-x(t)" "6#,&% \"KG\"\"\"-%\"xG6#%\"tG!\"\"" }{TEXT -1 2 ")." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "logistic_ode := diff( x(t), t ) = A * x(t) * ( K - x(t) );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 22 "with initial condition" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "logistic_ic := x(0)=X[0]; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "lode:=subs(\{K=1,A=10\} ,logistic_ode);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "This ODE is ea sily separated," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 46 "sep_log_ode := logistic_ode / (x(t)*(K-x(t))); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 57 "integrated from the initial t ime, 0, to any other time t," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "part_log_soln := subs( _t=t, logistic_ic, map(int,sep_log_ode,t=0.._t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 15 "and solv ed for " }{XPPEDIT 18 0 "x(t)" "6#-%\"xG6#%\"tG" }{TEXT -1 32 " to obt ain the explicit solution" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "part_expl_soln := collect(op( solve ( part_log_soln, \{x(t)\} ) ),exp);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "A quick check that this is, in fact, a solution to the original ODE shows" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 40 "odetest( part_expl_soln, logistic_ode );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 31 "and, for the initial condition," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "eval( part_expl_s oln, t=0 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 8 "" 1 "" {TEXT -1 70 "Error, (in solve) cannot solve expressions with d iff(x(t),t) for x(t)\n" }}}{SECT 1 {PARA 4 "" 0 "3.B-2" {TEXT -1 23 "3 .B-2 Carrying Capacity" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 141 "Before \+ discussing the generic properties of the logistic model, it is instruc tive to use graphical methods to examine a specific example. Let" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "param := \{ A = 1/2, K=3 \};" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "l_ode := subs(param,logistic_ode);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "T hen, the direction field for this model is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "DEplot( l_ode, x( t), t=0..10, x=0..10);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "The equilibrium solution at " } {XPPEDIT 18 0 "x=3" "6#/%\"xG\"\"$" }{TEXT -1 64 " is obvious in the g raph (and the equation); the equilibrium at " }{XPPEDIT 18 0 "x=0" "6# /%\"xG\"\"!" }{TEXT -1 97 " is obvious from the equation. Initial cond itions that will produce the equilibrium solutions are" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "equil_ ic := [ [x(0)=0], [x(0)=3] ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "equil_plot := DEplot( l_ode, x(t), t=0..5, equil_ic, x=0..10," } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 53 " arrows=SMALL , linecolor=CYAN ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "equil_plot; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "A sample of solutions with initial conditions betwee n the two equilibria" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "ic1 := [ [x(0)=i/2] $ i=1..5 ]:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "soln_plot1 := DEplot( l_ode, x(t), t=0..5 , ic1, x=0..10, arrows=SMALL," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " \+ linecolor=GREEN ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "soln_plot1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 71 "Note that all of these solutions a re increasing and appear to approach " }{XPPEDIT 18 0 "x=3" "6#/%\"xG \"\"$" }{TEXT -1 4 " as " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 23 " \+ continues to increase." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 82 "Next, a sample of solutions with initial conditions \+ above the positive equilibrium" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "ic2 := [ [x(0)=2*i] $ i=2..5 ]:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "soln_plot2 := DEplot( l_ode, x(t), t=0..5, ic2, x=0..10, arrows=SMALL," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 53 " linecolor=BLUE, stepsize=0.1 ): " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "soln_plot2;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "The se solutions are all decreasing and also appear to approach the " } {XPPEDIT 18 0 "x=3" "6#/%\"xG\"\"$" }{TEXT -1 4 " as " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 11 " increases." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 21 "The composite plot is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "displa y( [equil_plot, soln_plot1, soln_plot2] );" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 124 "To investi gate some of the general properties of solutions to the logistic equat ion, note that the equilibrium solutions are" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "equil_sol := solv e( rhs(logistic_ode)=0, \{x(t)\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "A quick inspe ction of the ODE shows that " }{XPPEDIT 18 0 "diff(x(t),t)" "6#-%%diff G6$-%\"xG6#%\"tGF)" }{TEXT -1 14 " > 0 when 0 < " }{XPPEDIT 18 0 "x(t) " "6#-%\"xG6#%\"tG" }{TEXT -1 3 " < " }{XPPEDIT 18 0 "K" "6#%\"KG" } {TEXT -1 5 " and " }{XPPEDIT 18 0 "diff(x(t),t)" "6#-%%diffG6$-%\"xG6# %\"tGF)" }{TEXT -1 10 " < 0 when " }{XPPEDIT 18 0 "x(t)" "6#-%\"xG6#% \"tG" }{TEXT -1 3 " > " }{XPPEDIT 18 0 "K" "6#%\"KG" }{TEXT -1 97 ". T he long-term behavior of the solutions can be determined from the expl icit solution to the IVP" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "limit_size := Limit( part_expl_soln , t=infinity );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "value( l imit_size );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "Maple is unable to evaluate this limit be cause it is unable to decide if " }{XPPEDIT 18 0 "exp(A*K*t)" "6#-%$ex pG6#*(%\"AG\"\"\"%\"KGF(%\"tGF(" }{TEXT -1 10 " tends to " }{XPPEDIT 18 0 "0" "6#\"\"!" }{TEXT -1 4 " or " }{XPPEDIT 18 0 "infinity" "6#%)i nfinityG" }{TEXT -1 62 " (or does not exist). However, under the physi cal assumptions," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "assume( A>=0, K>0 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "the limi ting size is found to be" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "value( limit_size );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "Because all solutions with " }{XPPEDIT 18 0 "x(0)" "6#-%\"xG6# \"\"!" }{TEXT -1 3 " > " }{XPPEDIT 18 0 "K" "6#%\"KG" }{TEXT -1 13 " d ecrease to " }{XPPEDIT 18 0 "x=K" "6#/%\"xG%\"KG" }{TEXT -1 28 " and a ll solutions with 0 < " }{XPPEDIT 18 0 "x(0)" "6#-%\"xG6#\"\"!" } {TEXT -1 3 " < " }{XPPEDIT 18 0 "K" "6#%\"KG" }{TEXT -1 13 " increase \+ to " }{XPPEDIT 18 0 "x=K" "6#/%\"xG%\"KG" }{TEXT -1 16 ", the paramete r " }{XPPEDIT 18 0 "K" "6#%\"KG" }{TEXT -1 60 " is known as the carryi ng capacity of the logistic equation." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "unassign('A','K');" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} }}{MARK "0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }