{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 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "Times" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "Times" 0 10 0 0 0 0 2 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{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 "Headi ng 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 "Heading 3" -1 5 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 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 "List Subitem" -1 256 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 273 5 }{PSTYLE "Normal" -1 257 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 }{PSTYLE "Hea ding 1" -1 258 1 {CSTYLE "" -1 -1 "Helvetica" 1 14 0 0 0 1 1 1 2 2 2 2 1 1 1 1 }1 1 0 0 6 6 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 257 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 41 "ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 37 "Unit 11 -- First-O rder Linear Systems" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {URLLINK 17 "Prof. Douglas B. Meade" 4 "http://www.math.sc.edu/~mea de/" "" }}{PARA 257 "" 0 "" {URLLINK 17 "Industrial Mathematics Instit ute" 4 "http://www.math.sc.edu/~IMI/" "" }}{PARA 257 "" 0 "" {URLLINK 17 "Department of Mathematics" 4 "http://www.math.sc.edu/" "" }}{PARA 257 "" 0 "" {URLLINK 17 "University of South Carolina" 4 "http://www.s c.edu/" "" }}{PARA 257 "" 0 "" {TEXT -1 19 "Columbia, SC 29208\n" }} {PARA 257 "" 0 "" {TEXT -1 7 "URL: " }{URLLINK 17 "http://www.math.s c.edu/~meade/" 4 "http://www.math.sc.edu/~meade/" "" }}{PARA 257 "" 0 "" {TEXT -1 25 "E-mail: meade@math.sc.edu" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 38 "Copyright \251 2001 by Douglas B. Meade" }}{PARA 257 "" 0 "" {TEXT -1 19 "All rights reserved" }} {PARA 257 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 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 11" }} {EXCHG {PARA 14 "" 0 "" {HYPERLNK 17 "11.A" 1 "" "11.A" }{TEXT -1 21 " Equilibrium Analysis" }}{PARA 256 "" 0 "" {HYPERLNK 17 "11.A-1" 1 "" "11.A-1" }{TEXT -1 11 " Nullclines" }}{PARA 256 "" 0 "" {HYPERLNK 17 " 11.A-2" 1 "" "11.A-2" }{TEXT -1 22 " Equilibrium Solutions" }}{PARA 14 "" 0 "" {HYPERLNK 17 "11.B" 1 "" "11.B" }{TEXT -1 19 " Graphical An alysis" }}{PARA 256 "" 0 "" {HYPERLNK 17 "11.B-1" 1 "" "11.B-1" } {TEXT -1 17 " Direction Fields" }}{PARA 256 "" 0 "" {HYPERLNK 17 "11.B -2" 1 "" "11.B-2" }{TEXT -1 16 " Phase Portraits" }}{PARA 256 "" 0 "" {HYPERLNK 17 "11.B-3" 1 "" "11.B-3" }{TEXT -1 16 " Solution Curves" }} {PARA 14 "" 0 "" {HYPERLNK 17 "11.C" 1 "" "11.C" }{TEXT -1 19 " Analyt ic Solutions" }}{PARA 256 "" 0 "" {HYPERLNK 17 "11.C-1" 1 "" "11.C-1" }{TEXT -1 26 " One-Step Solutions using " }{HYPERLNK 17 "dsolve" 2 "ds olve" "" }{TEXT -1 1 " " }}{PARA 256 "" 0 "" {HYPERLNK 17 "11.C-2" 1 " " "11.C-2" }{TEXT -1 20 " Eigenvalue Analysis" }}{PARA 14 "" 0 "" {HYPERLNK 17 "11.D" 1 "" "11.D" }{TEXT -1 20 " Numerical Solutions" }} }{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;" }}{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 16 "with( student ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "pva c := true:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 "11.A" {TEXT -1 25 "11.A Equilibrium Analysis" }}{SECT 0 {PARA 4 "" 0 "11.A-1" {TEXT 256 11 "11.A-1 Null" }{TEXT 258 0 "" } {TEXT 259 0 "" }{TEXT 257 6 "clines" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 145 "A nullcline for a first-order system of differential equations is a curve along which at least one of the variables does not change, e.g., where " }{XPPEDIT 18 0 "Diff(x,t)=0" "6#/-%%DiffG6$%\"xG%\"tG\" \"!" }{TEXT -1 4 " or " }{XPPEDIT 18 0 "Diff(y,t)=0" "6#/-%%DiffG6$%\" yG%\"tG\"\"!" }{TEXT -1 324 ".The key is to assume the first derivativ e of each unknown function is zero and to find all curves on which the resulting equation is satisfied. While it can be difficult to give a \+ general outline for the determination of the nullclines for a general \+ nonlinear system, for a linear system, the nullclines are straight lin es." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 74 "Co nsider the general first-order linear system with constant coefficient s," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "ode1 := diff( x(t), t ) = a*x(t) + b*y(t) + f:" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "ode2 := diff( y(t), t ) = c*x(t) + \+ d*y(t) + g:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "sys := \{ ode1, ode2 \};" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "The nullclines of the system are" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 77 "nullclin e := eval( sys, \{ diff(x(t),t)=0, diff(y(t),t)=0, x(t)=x, y(t)=y \} ) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 16 "The change from " }{XPPEDIT 18 0 "x(t)" "6#-%\"xG6#% \"tG" }{TEXT -1 4 " to " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 10 " a nd from " }{XPPEDIT 18 0 "y(t)" "6#-%\"yG6#%\"tG" }{TEXT -1 4 " to " } {XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 61 " is made to simplify the gra phical display of the nullclines." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 27 "For a concrete example, let" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "valu e_of_constants := \{a=1,b=-2,c=3,d=1,f=2,g=1\};" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 18 "then t he system is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "sys1 := eval( sys, value_of_constants );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 22 "and the nullclines are" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "nullcline1 := eval( sys1, \{ diff(x(t),t)=0, diff(y(t ),t)=0, x(t)=x, y(t)=y \} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 49 "or, expressing each line in slope-intercept form." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "map( isolate, nullcline1, y );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "A graphical view of the nullclines is obtained by creatin g an " }{HYPERLNK 17 "implicitplot" 2 "plots,implicitplot" "" }{TEXT -1 25 " of each nullcline. (The " }{HYPERLNK 17 "implicitplot" 2 "plot s,implicitplot" "" }{TEXT -1 75 " command is needed to handle cases wh ere the nullcline is a vertical line.)" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "WINDOW := x=-5..5, y=-5 ..5:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "plot_nullcline := d isplay( map( implicitplot, nullcline1, WINDOW, color=GREEN ) ):" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "plot_nullcline;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "11.A-2" {TEXT 260 28 "11.A-2 Equilibrium Solutions" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 418 "Equilibrium solutions (if they exist) occur at the intersectio n of nullclines corresponding to each of the differential equations in the system. For a general nonlinear system, special care must be take n to ensure that an intersection point of nullclines is actually an eq uilibrium solution. Fortunately, for a two-dimensional linear system, \+ any intersection of the nullclines is automatically an equilibrium sol ution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "In terms of the example introduced above," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "sys1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 15 "with nullclines" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "nullcline1;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 121 "The i ntersection of the nullclines can be approximated from the plot of the nullclines. The exact solution is found to be" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "equil_soln \+ := solve( nullcline1, \{x,y\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "or, expressed as the coordinates of a point," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "equil_point := eval( [x,y], \+ equil_soln );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 80 "Graphically, the equilibrium solut ion is the intersection of the two nullclines." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 81 "plot_equil \+ := pointplot( equil_point, symbol=CIRCLE, symbolsize=18, color=BLUE ): " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "display([plot_nullcline,plot_eq uil]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{SECT 0 {PARA 3 "" 0 "11.B" {TEXT -1 23 "11.B Graphical Analysis" }}{SECT 0 {PARA 4 "" 0 "11.B-1" {TEXT -1 23 "11.B-1 Direction Fields" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 250 "The direction field can be a source of m uch information about a system of ODEs without knowing an explicit for mula for the solution. For starters, the direction field for a system \+ shows the direction in which the solution moves at any point in space. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 39 "Retur ning to the example considered in " }{HYPERLNK 17 "Unit 11, Section A " 1 "unit11.mws" "11.A" }{TEXT -1 1 "," }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "sys1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "E ven though this is an autonomous system, Maple's " }{HYPERLNK 17 "DEpl ot" 2 "DEtools,DEplot" "" }{TEXT -1 59 " command requires a interval f or the independent variable (" }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 82 "). The specific interval chosen is irrelevant, provided the endpoi nts are numeric." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "DOMAIN \+ := t = 0 .. 1:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "The direction field for this syste m is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "plot_direction_field := DEplot( sys1, [x(t),y(t)], DO MAIN," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 58 " \+ WINDOW, arrows = MEDIUM ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "plot_direction_field;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 236 "From this picture it is eviden t that solutions spiral outward from a point in the second quadrant. T o see that the center of these spirals is the equilibrium solution, su perimpose the plot of the equilibrium solution and the nullclines." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "display( [plot_direction_field, plot_equil, plot_nullcline] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 171 "The nullclines show exactly where the individual compo nents pass through critical points and, hence, where they transition b etween increasing and decreasing functions (of " }{XPPEDIT 18 0 "t" "6 #%\"tG" }{TEXT -1 285 "). In practice, if a computer is not available \+ to create the direction field, the fact that the sign of the derivativ e of each component is constant in each region created by the nullclin es can be used to provide insight into the qualitative behaviour of so lutions to a system of ODEs." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "1 1.B-2" {TEXT 262 21 "11.B-2 Phase Portrait" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 159 "A phase portrait for an autonomous system of ODEs displa ys solutions to the system in \"phase space\". That is, as curves in t he space of the unknown functions (" }{XPPEDIT 18 0 "x" "6#%\"xG" } {TEXT -1 5 " and " }{XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 36 ") and no t the independent variable (" }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 2 ")." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 " To create a phase portrait in Maple, the " }{HYPERLNK 17 "DEplot" 2 "D Etools,DEplot" "" }{TEXT -1 30 " command is recommended. (The " } {HYPERLNK 17 "phaseportrait" 2 "DEtools,phaseportrait" "" }{TEXT -1 24 " command, also from the " }{HYPERLNK 17 "DEtools" 2 "DEtools" "" } {TEXT -1 123 " package, is essentially the same, but there is no reaso n to learn and remember a new command when simple modifications to " } {HYPERLNK 17 "DEplot" 2 "DEtools,DEplot" "" }{TEXT -1 10 " suffice.)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 176 "One so lution curve is generated for each initial condition. For a two-dimens ional system in x(t) and y(t), each initial condition can be specified either as triples of numbers " }{XPPEDIT 18 0 "[ t[0], x(t[0]), y(t[0 ]) ]" "6#7%&%\"tG6#\"\"!-%\"xG6#&F%6#F'-%\"yG6#&F%6#F'" }{TEXT -1 26 " or as pairs of equations " }{XPPEDIT 18 0 "[x(t[0])=x[0], y(t[0])=y[0 ]]" "6#7$/-%\"xG6#&%\"tG6#\"\"!&F&6#F+/-%\"yG6#&F)6#F+&F06#F+" }{TEXT -1 107 ". For example, initial conditions at the points with integer c oordinates along the axes can be specified as" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "ICy := [0,0 ,i] $ i=-5..5;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "ICx := [x (0)=i,y(0)=0] $ i=-5..5;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "IC := ICx, ICy:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 341 "As in the previous uses of DEplot , an interval of values for the independent variable is required. Unli ke the use of DEplot for the creation of direction fields, this argume nt does have a meaning for phase portraits. The time interval provides limits for the numerical methods used to obtain approximate solutions for each initial condition." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "DOMAIN;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "The p hase portrait for this system and these initial conditions is created \+ with" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "DEplot( sys1, [x(t),y(t)], DOMAIN, [ IC ]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " arrows=NONE, scene=[ x, y ], line color=BLUE );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 109 "To restrict the solutions to a pr e-determined \"window\", include the viewing window for the unknown fu nctions:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "WINDOW;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "plot_phase_portrait := \+ DEplot( sys1, [x(t),y(t)], DOMAIN, [ IC ], WINDOW," }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 77 " arrows=NONE, scene=[ x, y ], linecolor=BLUE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "plot_ phase_portrait;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "A simple change to the " } {HYPERLNK 17 "arrows=" 2 "DEtools,DEplot" "" }{TEXT -1 59 " option inc ludes the direction field in the phase portrait." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "DEplot( sys 1, [x(t),y(t)], DOMAIN, [ IC ], WINDOW," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 " arrows=SMALL, scene=[ x, y ], linecolor=BLUE );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 95 "This plot can be superimposed on the direction field, nul lclines, and equilibrium solution with" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "display( [plot_directio n_field, plot_nullcline," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 " \+ plot_equil, plot_phase_portrait] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 42 "Even though t he the independent variable (" }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 228 ") is not explicitly displayed in a phase portrait, it is implicit ly present in that the solution curves are traveled at different speed s. To show the coordination between solutions from different initial c onditions, specify the " }{HYPERLNK 17 "linecolor=" 2 "DEtools,DEplot " "" }{TEXT -1 92 " option with a function or expression that depends \+ on the independent variable. For example," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "DEplot( sys1, [x(t), y(t)], DOMAIN, [ IC ]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 52 " a rrows=NONE, scene=[ x, y ], linecolor=t );\n" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 92 "Note that it is not necessary to be too concerned about the specific range of values of the " }{HYPERLNK 17 "linecolor=" 2 "D Etools,DEplot" "" }{TEXT -1 9 " option; " }{HYPERLNK 17 "DEplot" 2 "DE tools,DEplot" "" }{TEXT -1 61 " automatically normalizes these values \+ to the interval [0,1]." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "WINDOW2 := x=-20..20, y=- 20..20:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "phase_portrait : = T -> DEplot( sys1, [x(t),y(t)], t=0..T, [ IC ]," }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 68 " WINDOW2, arrows=SLIM , scene=[ x, y ]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 62 " \+ linecolor=BLUE, stepsize=0.1 ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "display( [ phase_portrait(0.1), seq( phase_po rtrait(i/4), i=1..10) ], insequence=true );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 91 "Note that \+ to provide a consistent resolution for all solution curves in the anim ation, the " }{HYPERLNK 17 "stepsize=" 2 "DEtools,DEplot" "" }{TEXT -1 22 " option has been used." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "1 1.B-3" {TEXT 263 22 "11.B-3 Solution Curves" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 128 "A solution curve is a plot of one component of the solut ion as a function of the independent variable and is produced using th e " }{HYPERLNK 17 "DEplot" 2 "DEtools,DEplot" "" }{TEXT -1 110 " comma nd. The only changes to the arguments are removing the specification o f the display window size and the " }{HYPERLNK 17 "arrows=" 2 "DEtools ,DEplot" "" }{TEXT -1 27 " argument and changing the " }{HYPERLNK 17 " scene=" 2 "DEtools,DEplot" "" }{TEXT -1 49 " argument to specify the c omponent to be plotted." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 42 "For example, when the initial condition is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "I C := [x(0)=0,y(0)=1];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 14 "graphs of the " }{XPPEDIT 18 0 " x" "6#%\"xG" }{TEXT -1 6 "- and " }{XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 103 "-components of the particular solution satisfying this initial condition are created and displayed with" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 57 "plot_soln_x := DEplot( sys1, [x(t),y(t)], DOMAIN, [ IC ]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 56 " sc ene=[ t, x ], linecolor=BLUE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 57 " plot_soln_y := DEplot( sys1, [x(t),y(t)], DOMAIN, [ IC ]," }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 57 " scene=[ t, y ], linec olor=GREEN ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "display( [ plot_so ln_x, plot_soln_y ], labels=[`t`,``] );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 104 "If multiple initial cond itions are specified, one solution curve is produced for each initial \+ condition." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "IC2 := [x(0)= 0,y(0)=1], [x(0)=0,y(0)=-1];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "plot_soln_x2 := DE plot( sys1, [x(t),y(t)], DOMAIN, [ IC2 ]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 65 " scene=[ t, x ], linecolor=[BL UE,GREEN] ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "plot_soln_y2 := DEp lot( sys1, [x(t),y(t)], DOMAIN, [ IC2 ]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 65 " scene=[ t, y ], linecolor=[BL UE,GREEN] ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "These plots can be displayed as before" } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "display( [ plot_soln_x2, plot_soln_y2 ] , labels=[`t`,``] );" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 135 "To eliminate some of the clutter from the multiple plots , it is sometimes advantageous to display each component in side-by-si de plots." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 46 "display( array([plot_soln_x2,plot_soln_y2]) );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "plot_soln_x2; plot_soln_y2; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 104 "Note how the colors are used to indicate pairs of s olutions corresponding to the same initial condition." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}} {SECT 0 {PARA 3 "" 0 "11.C" {TEXT -1 23 "11.C Analytic Solutions" }} {SECT 0 {PARA 4 "" 0 "11.C-1" {TEXT 264 32 "11.C-1 One-Step Solutions \+ using " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 49 "For a first-order linear system of ODEs, Maple's " } {HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 121 " command should be \+ able to find the general solution to the system and the particular sol ution for any initial condition." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 35 "For example, for the system of ODEs" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "sys1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "the general solution is" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "gen_soln \+ := dsolve( sys1, \{x(t),y(t)\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 49 "The solution \+ satisfying an initial condition, say" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "IC;" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "can be found by substituting the initial condition into the general solution " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "q1 := eval( eval( gen_soln, t=0 ), IC );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "and solving for the constants of integration" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "q2 := sol ve( q1, \{_C1,_C2\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 119 "The corresponding particular s olution to this system of differential equations that satisfies this i nitial condition is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "part_soln := eval( gen_soln, q2 );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "Alternatively, the solution to the initial value problem " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "IVP := sys1 union convert(IC,set);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "c ould be found with the single command" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "ivp_soln := dsolve( IVP , \{x(t),y(t)\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 10 "While the " }{HYPERLNK 17 "odetest " 2 "DEtools,odetest" "" }{TEXT -1 142 " command is unable to check so lutions for a system of ODEs, it is not difficult to verify that the t wo solutions presented above are identical" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "q3 := eval( x(t), part_soln ) = eval( x(t), ivp_soln );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "evalb(q3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "q4 := eval( y(t), part_soln ) = eval( y(t), ivp_soln );" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 10 "evalb(q4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "and satisfy both the sys tem of differential equations" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "q5 := simplify( eval( conver t(sys1,list), ivp_soln ) );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "map( evalb, q5 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 25 "and the initial condition" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "q6 := eval( ivp_soln, t=0 );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "map( evalb, eval( IC, q6 ) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 4 "" 0 "11.C-2" {TEXT 261 26 "11.C -2 Eigenvalue Analysis" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 383 "The sol ution of a first-order linear system of ODEs is possible because the p roblem can be reduced to finding the eigenvalues and eigenvectors of a n appropriate matrix and then knowing how to use this information to c onstruct the general or particular solution. To put the problem in the context of linear algebra and eigenvalues, the system of ODEs should \+ be written in vector form." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 47 "The general form for a linear system of ODEs is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "Diff( X, t ) = A*X + b;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 6 "where " }{XPPEDIT 18 0 "X=X(t)" "6#/%\"XG-F$6#%\"tG" }{TEXT -1 37 " is the vector of unknown \+ functions, " }{XPPEDIT 18 0 "A" "6#%\"AG" }{TEXT -1 31 " is the coeffi cient matrix and " }{XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 43 " is the \+ non-homogeneous (\"forcing\") vector." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 40 "Example 1: R eal and Distinct Eigenvalues" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 27 "Consider the system of ODEs" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "sys2 := [ diff( x(t), t ) = x(t) + y(t), diff( y(t), t ) = x(t) + y(t) ]; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "Let the vector of unknown functions be" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "X := vector( 2, [ x(t), y(t) ] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "The coefficient matrix, \+ " }{XPPEDIT 18 0 "A" "6#%\"AG" }{TEXT -1 22 ", and forcing vector, " } {XPPEDIT 18 0 "b" "6#%\"bG" }{TEXT -1 27 ", can be extracted via the \+ " }{HYPERLNK 17 "genmatrix" 2 "linalg,genmatrix]" "" }{TEXT -1 18 " co mmand from the " }{HYPERLNK 17 "linalg" 2 "linalg" "" }{TEXT -1 9 " pa ckage:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "A := genmatrix( map(rhs,sys2), [x(t),y(t)], `-b` );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "b := evalm( -`-b` );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "Thus, the system can be expressed in vector form as" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "map ( diff, evalm(X), t ) = evalm(A) * evalm(X) + evalm(b);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 46 "The general solution to this system of ODEs is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "gen_soln := dsolve( sys2, \{x(t),y(t)\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 34 "which, when w ritten in vector form" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "X_soln := eval( evalm(X), gen_soln \+ );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 101 "and separated into terms involving at most one of the two constants of integration, can be written as" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "X1 := map ( coeff, X_soln, _C1 ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "X2 := ma p( coeff, X_soln, _C2 ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "Xp := e val( evalm(X_soln), [_C1=0,_C2=0] ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "evalm(X) = _C1 * evalm(X1) + _C2 * evalm(X2) + evalm(Xp);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 337 "Note that, because this is a homogeneous system, the zer o vector is a particular solution and the general solution is written \+ as a linear combination of two vectors. The significance of this form \+ of the solution appears when the terms in the solution are examined si de-by-side with the eigenvalue decomposition of the coefficient matrix ." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "At f irst glance, the output from Maple's " }{HYPERLNK 17 "eigenvectors" 2 "linalg,eigenvectors" "" }{TEXT -1 35 " command is hopelessly complica ted." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "e_decomp := [ eigenvectors( A ) ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 57 "H owever, it is not difficult to extract the eigenvalues (" }{XPPEDIT 18 0 "lambda[i]" "6#&%'lambdaG6#%\"iG" }{TEXT -1 43 ") and correspondi ng basis of eigenvectors (" }{XPPEDIT 18 0 "E[i]" "6#&%\"EG6#%\"iG" } {TEXT -1 11 ") to obtain" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "for i from 1 to nops(e_decomp) do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 " e_val[i] := op(1,e_decomp[i]); " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 " e_vec[i] := op(3,e_decomp[i]) ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 " e_sol[i] := exp( e_val[i]*t) * op(e_vec[i]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 77 " print( lambda [i]=e_val[i], E[i]=evalm(e_vec[i]), XX[i] = evalm(e_sol[i]) );" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "od:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 22 "Note that the vectors " }{XPPEDIT 18 0 "XX[1]" "6#&%#XXG6#\"\"\"" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "XX[2]" "6#&%#XXG6#\"\"#" }{TEXT -1 106 " are the ba sis vectors for the linear combination that is the general solution of this homogeneous system." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 30 "Example 2: Complex Eigenvalues" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "Returning to the system introduced at the beginning of this uni t," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "sys1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 96 "recall that this system is non-h omogeneous. In fact, the coefficient matrix and forcing term are" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "A := genmatrix( map(rhs,sys1), [x(t),y(t)], `-b` );" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 20 "b := evalm( -`-b` );" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 58 "As see n previously, the general solution of this system is" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "gen_soln \+ := dsolve( sys1, \{x(t),y(t)\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "which, when w ritten in vector form and factored, appears as" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "X_soln := e val( evalm(X), gen_soln );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 118 "Since this system is non- homogeneous, the particular solution is non-trivial. In this case, one particular solution is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "Xp := eval( evalm(X_soln), [_C1=0,_ C2=0] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 71 "and a basis for the solution of the corre sponding homogeneous system is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "X1 := map( coeff, X_soln, _C 1 );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "X2 := map( coeff, X_soln, _ C2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "This leads to the following vector form for the general solution of this system" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "evalm(X) = _C1 * evalm(X1) + _C2 * evalm(X2) + evalm(Xp);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 128 "To understand the relat ionship between the general solution and the eigenvalue decomposition \+ of the coefficient matrix, consider" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "e_decomp := [ eigenvectors ( A ) ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 78 "The eigenvalues, and hence the eigenvalue s, appear in complex conjugate pairs." }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "for i from 1 to nops(e_ decomp) do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 " e_val[i] := op(1,e_ decomp[i]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 " e_vec[i] := op(3,e _decomp[i]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " e_sol[i] := exp( \+ e_val[i]*t ) * evalm(op(e_vec[i]));" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 75 " print( lambda[i]=e_val[i], E[i]=evalm(e_vec[i]), XX[i]=evalm(e_s ol[i]) );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "od:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 14 "The functions " }{XPPEDIT 18 0 "XX[1]" "6#&%#XXG6#\"\"\"" }{TEXT -1 5 " a nd " }{XPPEDIT 18 0 "XX[2]" "6#&%#XXG6#\"\"#" }{TEXT -1 119 " are solu tions to the system of ODEs, but they are complex-valued. Real-valued \+ solutions, such as the ones returned by " }{HYPERLNK 17 "dsolve" 2 "ds olve" "" }{TEXT -1 23 ", would be more useful." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 23 "By Euler's formula, if " }{XPPEDIT 18 0 "alpha" "6#%&alphaG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "beta" "6#%%betaG" }{TEXT -1 24 " are real numbers, then " }}{PARA 257 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "exp(alpha+beta*I) = exp(al pha)*(cos(beta)+I*sin(beta))" "6#/-%$expG6#,&%&alphaG\"\"\"*&%%betaGF) %\"IGF)F)*&-F%6#F(F),&-%$cosG6#F+F)*&F,F)-%$sinG6#F+F)F)F)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 95 "To apply this res ult in our case, it is necessary to tell Maple that the independent va riable, " }{XPPEDIT 18 0 "t" "6#%\"tG" }{TEXT -1 95 ", is real-valued. Then, the real and imaginary parts of one of the complex-valued solut ions are" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "assume( t, real );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "XX[1] := map( Re@evalc, evalm(e_sol[1]) );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "XX[2] := map( Im@evalc, evalm(e_sol[1]) );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "unassign('t');" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 157 "These fun ctions form a real-valued basis for the general solution of the homoge neous system. (These solutions may appear to differ from the ones repo rted by " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 92 "; closer \+ inspection reveals that these vectors are, at worst, parallel to the o nes found by " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 35 " and so have the same linear span.)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 5 "" 0 " " {TEXT -1 30 "Example 3: Repeated Eigenvalue" }}{EXCHG {PARA 0 "" 0 " " {TEXT -1 52 "For a final example, consider the homogeneous system" } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "sys3 := [ diff( x(t), t ) = x(t) - 2*y(t), diff( y(t), t ) = y(t ) ];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 47 "which has coefficient matrix and forcing vector" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "A := genmatrix( map(rhs,sys3), [x(t),y(t)], `-b` );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "b := evalm( -`-b` );" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "The \+ general solution to the system, as reported by " }{HYPERLNK 17 "dsolve " 2 "dsolve" "" }{TEXT -1 4 ", is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "infolevel[dsolve] := 3:" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "gen_soln := dsolve( sys3, \{x(t),y( t)\} );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "infolevel[dsolve] := 0: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "A particular solution to the system is the trivial s olution" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "X_soln := eval( evalm(X), gen_soln ):" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 43 "Xp := eval( evalm(X_soln), [_C1=0,_C2=0] );" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 25 "Note that any values for " }{TEXT 19 3 "_C1" }{TEXT -1 5 " and " }{TEXT 19 3 "_C2" }{TEXT -1 117 " will yield a particular so lution; using zero for all constants of integration is the easiest and most common choice." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 71 "A basis for the homogeneous solution is formed by the p air of functions" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "X1 := map( coeff, X_soln, _C1 );" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 32 "X2 := map( coeff, X_soln, _C2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 94 "When these pieces are assembled, the general solution of the sy stem can be written in the form" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "evalm(X) = _C1 * evalm(X1) + _C2 * evalm(X2) + evalm(Xp);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 81 "Notice that both terms i n the homogeneous solution involve the same exponential, " }{XPPEDIT 18 0 "exp(t)" "6#-%$expG6#%\"tG" }{TEXT -1 186 ", and, after factoring the exponential, one of the homogeneous terms has a coefficient that \+ is not constant. These features will have to be explained during the e igenvalue decomposition." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "e_decomp := [ eigenvectors( A ) ]; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 33 "for i from 1 to nops(e_decomp) do" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 32 " e_val[i] := op(1,e_decomp[i]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 " e_vec[i] := op(3,e_decomp[i]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 " e_sol[i] := exp( e_val[i]*t ) * op(e_ve c[i]);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 77 " print( lambda[i]=e_val[ i], E[i]=evalm(e_vec[i]), XX[i] = evalm(e_sol[i]) );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "od:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 8 "Because " }{XPPEDIT 18 0 "lamb da=1" "6#/%'lambdaG\"\"\"" }{TEXT -1 174 " is an eigenvalue with algeb raic multiplicity 2 and geometric multiplicity 1, the eigenvalue decom position yields only one solution to the homogeneous equation. This so lution" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "XX[1] = evalm(e_sol[1]);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 131 "is referre d to as a straight-line solution. The second solution for the basis of the homogeneous solution will be found in the form" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "sol2_form := exp(e_val[1]*t) * (t*op(e_vec[1])+V2);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 5 "where" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "V2 := vector( 2, [x2,y2] ); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 15 "That is, assume" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "r1 := equate( X, evalm(sol2_ form) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 87 "Now, substitution of the proposed solutio n into the (homogeneous) system of ODEs yields" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "sol2_requir es := eval( sys3, r1 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 127 "Note that the second conditi on is trivially satisfied for all values of y2. However, the first con dition is satisfied only when" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "sol2_satisfied := solve( ide ntity(sol2_requires[1],t), \{x2,y2\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "This leads to the one-parameter family of solutions" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "sol2_family := eval( ev alm(sol2_form), sol2_satisfied );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 81 "Notice that t he component of the solution that depends on the remaining parameter" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "map( coeff, sol2_family, x2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 61 "is a multiple of the first solution to the homogeneous system" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "evalm( e_so l[1] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 122 "and so is not needed again in the basis. Therefore, the second basis solution for the homogeneous solution is \+ chosen to be" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "e_sol[2] := eval( evalm(sol2_family), x2=0 );" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 72 "To summarize, the basis of homogeneous solutions found \+ by this method is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 37 "\{ evalm(e_sol[1]), evalm(e_sol[2]) \};" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "and the basis of solutions found by inspection of the dso lve solution is" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 25 "\{ evalm(X1), evalm(X2) \};" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 57 "T he spans of these bases are easily seen to be identical." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "As a final note, observe that this system is decoupled. The ODE for " }{XPPEDIT 18 0 "y(t)" "6#-%\"yG6#%\"tG" }{TEXT -1 24 " is indep endent of x(t) " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 55 "ode_x,ode_y := selectremove( has, sys3, diff(x (t),t) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "and can be solved explicitly without know ledge of " }{XPPEDIT 18 0 "x(t)" "6#-%\"xG6#%\"tG" }}{PARA 0 "" 0 "" {TEXT -1 1 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "sol_y := d solve( ode_y, y(t), [linear] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 11 "Now, since " } {XPPEDIT 18 0 "y(t)" "6#-%\"yG6#%\"tG" }{TEXT -1 59 " is known, this r esult can be substituted into the ODE for " }{XPPEDIT 18 0 "x(t)" "6#- %\"xG6#%\"tG" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "ode_x2 := eval( ode_x, sol_y );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 15 "and solved for " }{XPPEDIT 18 0 "x(t)" "6#-%\"xG6# %\"tG" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "sol_x := dsolve( ode_x2, x(t) );" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 14 "The result is " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "eval( evalm(X), \{sol_x,sol_ y\} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "which is equivalent to any of the solutions obt ained above." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "evalm(X_soln);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}}{SECT 0 {PARA 3 "" 0 "11.D" {TEXT -1 24 "11.D \+ Numerical Solutions" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 36 "The graphic al solutions produced by " }{HYPERLNK 17 "DEplot" 2 "DEtools,DEplot" " " }{TEXT -1 144 " are obtained using a numerical approximation to the \+ solution. The numerical method used to compute the approximations can \+ be specified via the " }{HYPERLNK 17 "method=" 2 "dsolve,numeric" "" } {TEXT -1 26 " argument (the default is " }{HYPERLNK 17 "method=classic [rk4]" 2 "dsolve,classical" "" }{TEXT -1 7 "). The " }{HYPERLNK 17 "ds olve" 2 "dsolve" "" }{TEXT -1 15 " command, with " }{HYPERLNK 17 "type =numeric" 2 "dsolve,numeric" "" }{TEXT -1 90 ", can be used to obtain \+ direct access to a numerical solution to an initial value problem." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 29 "For the i nitial value problem" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "IVP;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 95 "a procedure f or the numerical approximation to the solution via Euler's method is o btained with" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "soln_euler := dsolve( IVP, [x(t),y(t)], type=num eric, method=classical );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 28 "The approximate solution at \+ " }{XPPEDIT 18 0 "t=1" "6#/%\"tG\"\"\"" }{TEXT -1 3 " is" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "soln _euler(1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 75 "The odeplot command can be used to create a phase-portrait for the solution" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "odeplot( soln_euler, [x(t), y(t)], 0..4 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "or a plot of the individual compon ents of the solution" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "odeplot( soln_euler, [[t,x(t)],[t,y(t)]], 0..4," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 51 " labels=[`t`,``], legend=[`x(t)`,`y(t)`] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "See also the discussion in " }{HYPERLNK 17 "Section 1.C" 1 "unit01.mws" "1.C" }{TEXT -1 99 " for additional details and options for working with Maple-generated numer ical solutions to an IVP." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "[Back to " }{HYPERLNK 17 "OD E 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 }