{VERSION 5 0 "IBM INTEL NT" "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 256 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{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 "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 }{PSTYLE "List Item" -1 14 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 3 3 1 0 1 0 2 2 14 5 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Ti mes" 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 "List Subitem" -1 257 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 3 3 3 12 1 0 2 2 258 5 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 41 "ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 47 "Unit 13 -- Directi on Fields and Phase Portraits" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 256 "" 0 "" {URLLINK 17 "Prof. Douglas B. Meade" 4 "http://www.m ath.sc.edu/~meade/" "" }}{PARA 256 "" 0 "" {URLLINK 17 "Industrial Mat hematics Institute" 4 "http://www.math.sc.edu/~IMI/" "" }}{PARA 256 " " 0 "" {URLLINK 17 "Department of Mathematics" 4 "http://www.math.sc.e du/" "" }}{PARA 256 "" 0 "" {URLLINK 17 "University of South Carolina " 4 "http://www.sc.edu/" "" }}{PARA 256 "" 0 "" {TEXT -1 19 "Columbia, SC 29208\n" }}{PARA 256 "" 0 "" {TEXT -1 7 "URL: " }{URLLINK 17 "ht tp://www.math.sc.edu/~meade/" 4 "http://www.math.sc.edu/~meade/" "" }} {PARA 256 "" 0 "" {TEXT -1 25 "E-mail: meade@math.sc.edu" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 38 "Copyright \251 \+ 2001 by Douglas B. Meade" }}{PARA 256 "" 0 "" {TEXT -1 19 "All rights reserved" }}{PARA 256 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 67 "--------------------------------------------------------- ----------" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 18 "Outline of Unit 13" }}{EXCHG {PARA 14 "" 0 "" {HYPERLNK 17 "13.A" 1 "" "13.A" } {TEXT -1 37 " Direction Fields and Phase Portraits" }}{PARA 257 "" 0 " " {HYPERLNK 17 "13.A-1" 1 "" "13.A-1" }{TEXT -1 10 " Example 1" }} {PARA 257 "" 0 "" {HYPERLNK 17 "13.A-2" 1 "" "13.A-2" }{TEXT -1 10 " E xample 2" }}{PARA 257 "" 0 "" {HYPERLNK 17 "13.A-3" 1 "" "13.A-3" } {TEXT -1 10 " Example 3" }}{PARA 14 "" 0 "" {HYPERLNK 17 "13.B" 1 "" " 13.B" }{TEXT -1 23 " Non-Autonomous Systems" }}{PARA 257 "" 0 "" {HYPERLNK 17 "13.B-1" 1 "" "13.B-1" }{TEXT -1 10 " Example 4" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 " " {TEXT -1 14 "Initialization" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with( DEto ols ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with( plots ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "with( linalg ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "with( PDEtools ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 "13.A" {TEXT -1 41 "13.A Di rection Fields and Phase Portraits" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 94 "A direction field for a system of ODEs is similar to a slope field for a first-order ODE (see " }{HYPERLNK 17 "Unit 12" 1 "unit12.mws" " " }{TEXT -1 134 "). A direction field displays the infinitesimal direc tion a solution curve moves in phase space. For example, for an autono mous system" }}{PARA 256 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "Diff(x ,t) = f(x,y)" "6#/-%%DiffG6$%\"xG%\"tG-%\"fG6$F'%\"yG" }}{PARA 256 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "Diff(y,t) = g(x,y)" "6#/-%%DiffG6$ %\"yG%\"tG-%\"gG6$%\"xGF'" }}{PARA 0 "" 0 "" {TEXT -1 35 "the directio n field at the point ( " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 2 ", \+ " }{XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 8 " ) with " }{XPPEDIT 18 0 " f(x,y)<>0" "6#0-%\"fG6$%\"xG%\"yG\"\"!" }{TEXT -1 24 " is an arrow wit h slope " }{XPPEDIT 18 0 "Diff(y,x) = g(x,y)/f(x,y)" "6#/-%%DiffG6$%\" yG%\"xG*&-%\"gG6$F(F'\"\"\"-%\"fG6$F(F'!\"\"" }{TEXT -1 8 ". (When " } {XPPEDIT 18 0 "f(x,y)=0" "6#/-%\"fG6$%\"xG%\"yG\"\"!" }{TEXT -1 309 ", the direction field will show an arrow pointing either straight up or straight down.) Since the direction field shows only the direction in which trajectory moves, the length of the arrows in unimportant. A gr aph of solution curves in the space of the dependent variables is a ph ase portrait for the system." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 4 "" 0 "13.A-1" {TEXT -1 16 "13.A-1 Example 1 " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "Consider the nonlinear autonom ous system of differential equations" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "sys1 := \{ diff( x(t), t \+ ) = x(t) * ( 6 - 3*x(t) - 2*y(t) )," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 61 " diff( y(t), t ) = y(t) * ( 5 - x(t) - y(t) ) \};" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " }{HYPERLNK 17 "DEplot" 2 "DEtools,DEplot" "" }{TEXT -1 111 " command is used to create a direction field for this system. \+ The key differences are the specification of the " }{HYPERLNK 17 "scen e" 2 "DEtools,DEplot" "" }{TEXT -1 140 " and the dimensions of the vie wing window; the \"time\" interval is required, but relevant only when solution curves are included in the plot:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "dir_field1 := DEp lot( sys1, \{x(t),y(t)\}, t=0..1," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 " x=-5..5, y=-5..10, scene=[x,y] ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "dir_field1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "This system a ppears to have several equilibrium solutions." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "equil_soln1 := solve( map(rhs,sys1), \{x(t),y(t)\} );" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "or, as a li st of points," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "equil_pts1 := map( subs, [equil_soln1], [x(t),y( t)] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "equil_plot1 := po intplot( equil_pts1, symbol=CIRCLE," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " symbolsize=18, color=BLUE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "display( [dir_field1,equil_plot1], axes=BOX ED );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 166 "From this diagram, it appears that the equilib rium solution at the origin is a source, the one at (0,5) is a sink, a nd the ones at (2,0) and (-4,9) are saddle points." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 250 "To create a phase portra it for this system it is necessary to specify an initial condition for each trajectory. To quickly create a reasonable set of initial condit ions, start with the equilibrium points and a few additional points in the phase plane" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "pt_list := [ op(equil_pts1), [5,0], [1,10], [ -2,10]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 " [0,.2], [0, .5], [0,-.5] ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "perturb these points a small amoun t in each component" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "h := 0.1:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "q1 := [seq( seq( X+dX, dX=[ [h,h], [h,-h], [-h,h], [-h,-h] ] ), " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 " X=pt_list ) ];" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 165 "After converting each initial condition into a pair of e quations, create the phase portrait, and display it along with the dir ection field and equilibrium solutions." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "IC1 := map( p->[x(0)=p [1],y(0)=p[2]], q1 ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 101 "phase_por t1 := DEplot( sys1, \{x(t),y(t)\}, t=0..2, x=-5..5, y=-5..10, IC1, sce ne=[x,y], arrows=NONE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "display ( [dir_field1, equil_plot1, phase_port1], axes=BOXED );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "13.A-2" {TEXT -1 16 "13.A-2 Example 2" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 120 " For the next example, consider the system of ODEs that represents Newt on's Second Law of Motion for a pendulum in which " }{XPPEDIT 18 0 "x( t)" "6#-%\"xG6#%\"tG" }{TEXT -1 86 " is the angle between the stable h anging position and the pendulum's position at time " }{XPPEDIT 18 0 " t" "6#%\"tG" }{TEXT -1 6 " (and " }{XPPEDIT 18 0 "y = Diff(x,t)" "6#/% \"yG-%%DiffG6$%\"xG%\"tG" }{TEXT -1 46 " is the velocity). That is, fo r every integer " }{XPPEDIT 18 0 "k" "6#%\"kG" }{TEXT -1 2 ", " } {XPPEDIT 18 0 "x=2*k*Pi" "6#/%\"xG*(\"\"#\"\"\"%\"kGF'%#PiGF'" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "y = 0" "6#/%\"yG\"\"!" }{TEXT -1 48 " corres ponds to the stable hanging position and " }{XPPEDIT 18 0 "x = (2*k-1) *Pi" "6#/%\"xG*&,&*&\"\"#\"\"\"%\"kGF)F)F)!\"\"F)%#PiGF)" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "y = 0" "6#/%\"yG\"\"!" }{TEXT -1 92 " corresponds to the unstable position with the pendulum pointing straight up from \+ the pivot." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 33 "sys2 := \{ diff( x(t), t ) = y(t)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 " diff( y(t), t ) = -sin(x(t)) \};" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 60 "The direction field for this system appears better when t he " }{HYPERLNK 17 "dirgrid" 2 "DEtools,DEplot" "" }{TEXT -1 84 " opti on is used to increase the resolution of the direction arrows and the \+ axes are " }{HYPERLNK 17 "constrained" 2 "plot,options" "" }{TEXT -1 24 " to use the same scaling" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "dir_field2 := DEplot( sys2, \+ \{x(t),y(t)\}, t=0..1, x=-10..10, y=-5..5," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 74 " scene=[x,y], dirgrid=[25,25], s caling=constrained ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "dir_field2 ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "Although " }{HYPERLNK 17 "solve" 2 "solve" "" }{TEXT -1 52 " finds only one equilibrium solution for this system" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "s olve( map(rhs,sys2), \{x(t),y(t)\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 142 "it is readil y apparent that there is an infinite collection of equilibrium solutio ns. Maple can find the entire family of equilibria when the " } {HYPERLNK 17 "_EnvAllSolutions" 2 "solve" "" }{TEXT -1 29 " environmen t variable is set:" }}{PARA 0 "" 0 "" {TEXT -1 1 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "_EnvAllSolutions := true:" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 52 "equil_soln2 := solve( map(rhs,sys2), \{x(t),y( t)\} );\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "_EnvAllSolutions := fa lse:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "The name " }{TEXT 19 3 "_Z1" }{TEXT -1 33 " that a ppears in the result from " }{HYPERLNK 17 "solve" 2 "solve" "" }{TEXT -1 42 " is Maple's name for an arbitrary integer." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "about( _Z1 \+ );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 43 "On subsequent execution, the name might be " } {TEXT 19 3 "_Z2" }{TEXT -1 2 ", " }{TEXT 19 3 "_Z3" }{TEXT -1 99 ", .. .. In these cases, it will be necessary to modify all occurrences of t his Maple-generated name." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 99 "To plot the equilibrium solutions in the direction field, convert the general expression to a point" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "q1 := op(ma p( subs, [equil_soln2], [x(t),y(t)] ));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "and substitut e appropriate integers" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "equil_pts2 := [ q1 $ _Z1=-3..3 ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "equil_plot2 := pointplot( evalf(equil_pts2), symbol=CIRCLE," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " symbolsize=18, color=BLUE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "display( [dir_field2, equil_plot2] );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 255 "The direction field suggests different behaviors for the equilibria with even and odd integers. Solution curves will further e laborate on these differences. With initial conditions selected from t he \"inflow\" portions of the window of the direction field, " }{TEXT 256 4 "i.e." }{TEXT -1 1 " " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 10 "=10, -5 < " }{XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 9 " < 0 and " } {XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 10 "=-10, 0 < " }{XPPEDIT 18 0 " y" "6#%\"yG" }{TEXT -1 29 " < 5, and from points on the " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 5 "-axis" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "IC2 := [ [x(0)=10,y(0)= i] $ i=-4..-1," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 " [x(0)=-1 0,y(0)=i] $ i=1..4," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " [x( 0)=2*i,y(0)=0] $ i=-4..4 ];\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "the combined direction f ield and phase portrait is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "phase_port2 := DEplot( sys2, \{x(t) ,y(t)\}, t=0..15," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 60 " \+ x=-10..10, y=-5..5, IC2, scene=[x,y]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 53 " arrows=NONE, linecolor=CYAN ): " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "display( [dir_field2, equil_plo t2, phase_port2] );\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 22 "Thus, for any integer " } {XPPEDIT 18 0 "k" "6#%\"kG" }{TEXT -1 14 ", the point ( " }{XPPEDIT 18 0 "2*k*Pi" "6#*(\"\"#\"\"\"%\"kGF%%#PiGF%" }{TEXT -1 24 ", 0 ) is a center and ( " }{XPPEDIT 18 0 "(2*k-1)*Pi" "6#*&,&*&\"\"#\"\"\"%\"kGF 'F'F'!\"\"F'%#PiGF'" }{TEXT -1 24 ", 0 ) is a saddle point." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "13.A-3" {TEXT -1 16 "13.A-3 Example 3" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "For the next example, consider the previous example with an additional \"damping\" term :" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "sys3 : = \{ diff( x(t), t ) = y(t)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 " \+ diff( y(t), t ) = -sin(x(t)) - y(t) \};" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 140 "To fa cilitate comparisons with the previous example, create the direction f ield with the same window, but with a slightly higher resolution:" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "dir_field3 := DEplot( sys3, \{x(t),y(t)\}, t=0..1," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " x=-10..10, y=-5..5, sce ne=[x,y]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 61 " \+ dirgrid=[30,30], scaling=constrained ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "dir_field3;\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 112 "The differences in the directio n fields are obvious. Nonetheless, the system has the same equilibrium solutions:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "_EnvAllSolutions := true:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "equil_soln3 := solve( map(rhs,sys3), \{x(t),y(t)\} ); " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "_EnvAllSolutions := false:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 "where " }{TEXT 19 3 "_Z2" }{TEXT -1 40 " is a Maple-genera ted integer parameter." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "about( _Z2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "q3 := op(map( subs, [equil_s oln3], [x(t),y(t)] ));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "equil_pts3 := [ q3 $ _Z2= -3..3 ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "equil_plot3 := pointplot( evalf(equ il_pts3), symbol=CIRCLE," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " \+ symbolsize=18, color=BLUE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "display( [dir_field3,equil_plot3] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 107 "For the phase portrait, consider the initial conditions from t he top and bottom edges of the viewing window" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "IC3 := [ [x (0)=i,y(0)=5] $ i=-10..10," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " \+ [x(0)=i,y(0)=-5] $ i=-10..10 ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "sol_traj3 := DEplot( sys3, \{x(t),y(t)\}, t=0..5," }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 " x=-10..10, y=- 5..5, IC3," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 " \+ scene=[x,y], arrows=NONE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "disp lay( [dir_field3,equil_plot3,sol_traj3] );" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 103 "From the d irection field and equilibrium solution, it appears as though the equi librium solutions at ( " }{XPPEDIT 18 0 "2*k*Pi" "6#*(\"\"#\"\"\"%\"kG F%%#PiGF%" }{TEXT -1 104 ", 0 ) that were centers in the undamped syst em are sinks in the damped system while the equilibria at ( " } {XPPEDIT 18 0 "(2*k-1)*Pi" "6#*&,&*&\"\"#\"\"\"%\"kGF'F'F'!\"\"F'%#PiG F'" }{TEXT -1 41 ", 0 ) are saddle points for both systems." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 0 {PARA 3 "" 0 "13.B" {TEXT -1 27 "13.B Non-Autonomous Syst ems" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 124 "Any non-autonomous system \+ can be reformulated as an autonomous system via the introduction of th e independent variable, say " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 68 ", and augmenting the system with the (trivial) differential equati on" }}{PARA 256 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "Diff( t, t ) = \+ 1" "6#/-%%DiffG6$%\"tGF'\"\"\"" }{TEXT -1 2 " ." }}{PARA 0 "" 0 "" {TEXT -1 228 "The strange appearance of this differential equation tha t results from using the same name for the independent variable and on e of the unknown functions can be avoided by introducing a new name fo r the independent variable, say " }{XPPEDIT 18 0 "s=t" "6#/%\"sG%\"tG " }{TEXT -1 26 ". Then all occurrences of " }{XPPEDIT 18 0 "t" "6#%\"t G" }{TEXT -1 42 " in the original system are replaced with " } {XPPEDIT 18 0 "s" "6#%\"sG" }{TEXT -1 31 " and the auxiliary ODE becom es " }{XPPEDIT 18 0 "Diff(t,s)=1" "6#/-%%DiffG6$%\"tG%\"sG\"\"\"" } {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 4 "" 0 "13.B-1" {TEXT -1 16 "13.B-1 Example 4" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "For this final example, consider the non-autonomous syste m" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "sys4 := \{ diff( x(t), t ) = y(t)," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 50 " diff( y(t), t ) = -sin(x(t)) - sin(t) \} ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "The conversion to an autonomous system is achieved w ith the help of the " }{HYPERLNK 17 "dchange" 2 "PDEtools,dchange" "" }{TEXT -1 18 " command from the " }{HYPERLNK 17 "PDEtools" 2 "PDEtools " "" }{TEXT -1 9 " package:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "sys4a := dchange( t=s, sys4, s ) union \{ diff( t(s), s ) = 1 \};" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 151 "Because this is a three-dimensional system, it is not realistic to draw a directio n field. Instead, a sample of solution curves with initial conditions " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "IC4a := [ [x(0)=1,y(0)=1,t(0)=0], [x(0)=1,y(0)=-1,t(0 )=0]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 62 " [x(0)=-1,y(0)=1, t(0)=0], [x(0)=-1,y(0)=-1,t(0)=0] ]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "is obtained w ith the " }{HYPERLNK 17 "DEplot3d" 2 "DEtools,DEplot3d" "" }{TEXT -1 9 " command:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "sol_traj4a := DEplot3d( sys4a, \{x(s),y(s),t(s) \}, s=0..10," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 60 " \+ IC4a, scene=[t,x,y], stepsize=0.2 ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "sol_traj4a;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 94 "This plot can be rotated in real time by using the mouse to grab and move a corner of the box. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 136 "Spec ific views of the solution can be obtained by explicitly listing the v iewing coordinates. For example, the x-y view is obtained with" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "display( sol_traj4a, orientation=[0,90] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 228 "Note that the crossing of solutions in this view is not reason for concern -- this is not an autonomous system in x and y -- and the solution cu rves do not intersect in the x-y-t space (the phase space for the augm ented system)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 4 "The " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 1 "-" } {XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 22 " view is obtained with" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "display( sol_traj4a, orientation=[-90,0] );" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "and \+ the t-y view is obtained with" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "display( sol_traj4a, orienta tion=[-90,90] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "As a concluding note, it should be mentioned that the " }{HYPERLNK 17 "DEplot3d" 2 "DEtools[DEplot3d]" " " }{TEXT -1 141 " command is capable of handling non-autonomous system s. A simpler means of plotting the solution trajectories in this examp le would be to use" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "IC4 := [ [x(0)=1,y(0)=1], [x(0)=1,y(0)=-1], " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 " [x(0)=-1,y(0)=1], [x(0 )=-1,y(0)=-1] ]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "DEplot3 d( sys4, \{x(t),y(t)\}, t=0..10, IC4," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " scene=[t,x,y], stepsize=0.2 );" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "[Back to " }{HYPERLNK 17 "ODE Powertool Table of Contents" 1 "unit00.mws" " " }{TEXT -1 1 "]" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }