{VERSION 3 0 "SUN SPARC SOLARIS" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 317 "" 0 1 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 -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 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE " " 3 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 256 "" 0 "" {TEXT -1 51 "Section 6.12 Euler's Numerical \+ Method; Slope Fields" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 159 "Maple can be used to plot slope fields, using the dfie ldplot command, which is part of the DEtools package. Here's the equa tion from section 6.12, Problem 16." }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with(DEtools):" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 12 "with(plots):" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 34 "Here is the differential equation." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "de := diff(y(t),t)=y(t)*(y(t)+1)*(y(t)-1);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "We'll plot the slope fiel d. This is done with the dfieldplot command." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 67 " deplot := d fieldplot( \{de\}, \{y(t)\},t=0..10,y = -2..2,arrows=LINE):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "display(\{deplot\});" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 122 "Imagine \+ starting at some point and drawing a curve whose tangent is given by \+ the slope field at the corresponding point. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 165 "Now we'll use the DEplot comma nd to get Maple to plot some solutions. In each case, we specify the \+ inital value. We'll display these together with the slope field." }} {PARA 0 "" 0 "" {TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "s1 := DEplot (\{de\}, \{y(t) \}, t=0..10, [[y(0)=0.5]], arrows=none, linecolor=magenta):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "s2 := DEplot (\{de\}, \{y(t) \}, t=0..10, [[y(0)=0.75]], arrows=none, linecolor=magenta):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 78 "s3 := DEplot (\{de\}, \{y(t) \}, t=0..10, [[y(0)=1]], arrows=none, linecolor=blue):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "s4 := DEplot (\{de\}, \{y(t)\}, t=0 ..10, [[y(0)=1.1]], arrows=none, linecolor=green,stepsize=1/100 ):" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "s5 := DEplot (\{de\}, \{y(t )\}, t=0..10, [[y(0)=0 ]], arrows=none, linecolor=blue):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "s6 := DEplot (\{de\}, \{y(t)\}, t=0 ..10, [[y(0)=-1 ]], arrows=none, linecolor=blue):" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 85 "s7 := DEplot (\{de\}, \{y(t)\}, t=0..10, [[y (0)=-0.75]], arrows=none, linecolor=magenta):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "s8 := DEplot (\{de\}, \{y(t)\}, t=0..10, [[y(0)= -0.5]], arrows=none, linecolor=magenta):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 110 "s9 := DEplot (\{de\}, \{y(t)\}, t=0..10, [[y(0)=-1.1 ]], arrows=none, linecolor=green,stepsize=1/100,y(t)=-5..-1 ):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 66 " display(\{deplot,s1,s2,s3,s 4,s5,s6,s7,s8,s9\},view=[0..5, -5..5] );" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 237 "The equilibrium solutions are sho wn in blue. The magenta solutions are between two equilibria. The gre en ones are above or below the equilibria. Notice the long term behav ior of the solutions. They either tend to an equilibrium or to " } {XPPEDIT 18 0 "infinity;" "6#%)infinityG" }{TEXT -1 4 " or " } {XPPEDIT 18 0 "-infinity;" "6#,$%)infinityG!\"\"" }{TEXT -1 1 "." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 275 "In the c ase of the solutions tending away from the equilibrium, we had to tell Maple a stepsize. This tells Maple where to compute the numerical sol ution. The default stepsize is too large, so not enough points on the curve are calculated, and you get a curve with a corner." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 177 "Of course, this e quation is separable, and the solution can be found by calculating the integrals (which we'll learn how to do in the next chapter.) You can ask Maple to do it." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "dsolve(de, y(t));" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 120 "You get two answers. Which one is correct depends on the initial condition. If the inital value is positive, you need " }{XPPEDIT 18 0 "y(t);" "6#-%\"yG6#%\"tG" }{TEXT -1 88 " to be positive so you choos e the first one. If the inital value is negative, you need " } {XPPEDIT 18 0 "y(t);" "6#-%\"yG6#%\"tG" }{TEXT -1 80 " to be negative \+ so you choose the second one. For a given initial value problem" }} {PARA 0 "" 0 "" {TEXT -1 38 "for a reasonable first order equation " } {TEXT 317 38 "there is exactly one correct solution." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{MARK "25 0 0" 53 }{VIEWOPTS 1 1 0 1 1 1803 }