{VERSION 5 0 "SGI MIPS UNIX" "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 }{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 "Heading 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 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 4 "" 0 "" {TEXT -1 60 "Using dsolve for solving first order differential equations." } }{PARA 0 "" 0 "" {TEXT -1 31 "Michael Monagan, October 2005.\n" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 169 "Newton's law of cooling \nT(t) i s the temperature of the body at time t\nTr is the ambient (room) te mperature of the surrounding medium\n k is the cooling rate constant " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "de := diff(T(t),t) = k* (Tr-T(t)); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "dsolve( de, \+ T(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "dsolve( \{de,T(0 )=T0\}, T(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "Tr := 20 ; k := 0.1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "sol := dsolv e( \{de,T(0)=60\}, T(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "plot( rhs(sol), t=0..10, T=0..70 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "initvals := [5,20,40,60];" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 56 "sols := [seq( dsolve(\{de,T(0)=T0\},T(t)), T0=initv als )];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "plot( map(rhs,so ls), t=0..20, T=0..70 );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 162 "Logi stic growth \ny(t) is the population at time t\nYm is the maximum sust ainable population (carrying capacity)\nk = a Ym is the natural growth rate, i.e., a = k/Ym" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "re start;\nde := diff(y(t),t)=a*y(t)*(Ym-y(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "dsolve( de, y(t) );" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 29 "dsolve( \{de,y(0)=y0\}, y(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "a := 0.02; Ym := 10; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "sol := dsolve( \{de,y(0)=0.1\}, y(t) );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "plot( rhs(sol), t=0..60 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "iv := [0,0.1,1,5,8,10,12] ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "de;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "sols := [seq( dsolve(\{de,y(0)=y0\},y(t)), \+ y0=iv) ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "plot( map(rhs, sols), t=0..50, y=-1..13, axes=frame, thickness=2 );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "Using dsolve to compute numerical solutions." } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "sol := dsolve( \{de,y(0)=1 \}, y(t), numeric );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "sol( 1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "sol(2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "plots[odeplot](sol,[t,y(t)],t=0..60 );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 96 "Logistic growth maximum sus tainable population Ym + b t that is, increasing linearly in time. \+ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "de := diff(y(t),t) = a*y(t)*(Ym+b*t -y(t));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "dsolve( de, y(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "dsolve( de, y(t) ) a ssuming a>0,b>0,Ym>0;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "a \+ := 0.02; Ym := 10; b := 0.1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "sol := dsolve( \{de,y(0)=1\}, y(t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "simplify( eval( sol, t=10 ) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "plot( rhs(sol), t=0..60 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "sol := dsolve( \{de,y(0)=1\}, y(t), numeric );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "plots[odeplo t]( sol, [t,y(t)], t=0..60 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "27 0 0" 48 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }