{VERSION 3 0 "SUN SPARC SOLARIS" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 1 10 255 0 0 1 2 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 "Hyperlink" -1 17 "" 0 1 0 128 128 1 0 0 1 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 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 260 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE " " -1 265 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 269 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 271 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 272 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE " " -1 274 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 275 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 276 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 277 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 278 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 279 "" 1 10 0 0 0 0 0 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Helvetica" 1 10 0 0 0 0 1 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 6 6 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 -1 4 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 3" 4 5 1 {CSTYLE "" -1 -1 "" 1 12 0 0 0 0 1 0 0 0 0 0 0 0 0 }0 0 0 -1 0 0 0 0 0 0 0 0 -1 0 }{PSTYLE "New Page" -1 256 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 1 0 -1 0 }{PSTYLE "" 3 257 1 {CSTYLE "" -1 -1 "" 1 10 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 "" 3 258 1 {CSTYLE "" -1 -1 "" 1 12 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 "" 3 259 1 {CSTYLE "" -1 -1 "" 1 14 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 "" 3 260 1 {CSTYLE "" -1 -1 "" 1 10 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 "" 3 261 1 {CSTYLE "" -1 -1 "" 1 12 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 "" 3 262 1 {CSTYLE "" -1 -1 "" 1 10 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 "" 3 263 1 {CSTYLE "" -1 -1 "" 1 10 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 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT 256 9 "final.mws" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 358 "This worksheet is to be used in conjunction with the final exam. Ski p the stuff that you don't need! After getting started, the first par t illustrates basics: derivatives, integrals, partial fractions, plott ing. Then we recap the templates; if you are familiar with their use, \+ you may want to use them, but nowhere on the exam is this absolutely n ecessary." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 257 "" 0 "" {TEXT -1 1 "G" }{TEXT 257 14 "etting started" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 14 "with( plots ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with( DEtools ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT 258 14 "Basic commands" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "example1:= diff( exp(a*t), t );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "example2:= Int( exp(a *t), t);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "value( example2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "example3:= Int( exp( a*t), t = 0 .. 2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "value ( example3 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "example4:= Int( exp(-2*t), t = 0 .. infinity);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "value( example4 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "Y:= (4 * s^2 )/ ( (s^2+1) * (s-5) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "PFY:= convert( Y, parfrac, s);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "plot(Y, s = -2 .. 4);" }}}} {SECT 1 {PARA 262 "" 0 "" {TEXT -1 20 "template.mws (recap)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 469 "This worksheet is designed to give you a template for many of the things you will be doing with a differential equation. Delete uneccessary lines, and don't forget to execute the w orksheet from the top once you have entered all the desired changes. \+ You may find it useful to keep a completed Maple worksheet open in ano ther window as a guide (\"tile\" the windows so you can see both at on ce). In fact you can even copy and paste from one window to another i f you wish." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 261 "" 0 "" {TEXT 272 15 "Getting started" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 140 "Every Maple worksheet should begin by re-initializi ng the Maple \"kernel\" and loading the additional packages that we ar e most likely to use." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "res tart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with( plots ):" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with( DEtools ):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 " " {TEXT 271 1 "W" }{TEXT 273 19 "orking with a model" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 178 "All differential equation models begin with a \+ differential equation. If the problem is an intial value problem, an i nitial condition is also needed. Replace the question marks ( " } {TEXT 0 1 "?" }{TEXT -1 67 " ) in the following input regions to defin e the relevant ODE model." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "MODEL := diff( %? , %? ) = %? ; # define the differential equati on model" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "IC := %? = %? ; # specify an initial condition" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 29 "Replace the question marks ( " }{TEXT 0 1 "?" } {TEXT -1 80 " ) in the following input regions to create the directio n field for your model." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 " VAR := \{ %? \}; # specify the variables in the mod el" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "DOMAIN := %? = %? .. \+ %? ; # specify a reasonable interval for the independent varia ble" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 92 "RANGE := %? = %? .. \+ %? ; # specify a reasonable interval for the dependent variab le" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "DEplot( MODEL, VAR, D OMAIN, RANGE, arrows = MEDIUM );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 88 "Next plot one or more solution curves corresponding to the specified initial condit ions." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "DEplot( MODEL, VAR , DOMAIN, [ [IC] ], linecolor = BLUE, arrows = MEDIUM );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 105 "DEplot( MODEL, VAR, DOMAIN, [ [IC1 ], [IC2], [IC3] ], linecolor = [BLUE, GREEN, BLACK], arrows = MEDIUM ) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "Look at the help under " }{HYPERLNK 17 "plot,option s" 2 "plot, options" "" }{TEXT -1 50 " to see other ways you can cust omize your plots. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{SECT 1 {PARA 260 "" 0 "" {TEXT -1 20 "template-sys (recap)" }}{EXCHG {PARA 0 "" 0 " " {TEXT -1 513 "This worksheet is designed to give you a template for \+ many of the things you will be doing with a system of differential equ ations (as discussed in Chapter 2 of BDH). Delete uneccessary lines, a nd don't forget to execute the worksheet from the top once you have en tered all the desired changes. You may find it useful to keep a comple ted Maple worksheet open in another window as a guide (\"tile\" the wi ndows so you can see both at once). In fact you can even copy and past e from one window to another if you wish." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 258 "" 0 "" {TEXT 265 7 "Getting " }{TEXT -1 1 " " }{TEXT 266 7 "started" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 140 "Every Maple worksheet should begin by re-initializing th e Maple \"kernel\" and loading the additional packages that we are mos t likely to use." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with( plots ):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "with( DEtools ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 259 18 "Defining the model" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 178 "All differential equation models begin with a differential equation. If t he problem is an intial value problem, an initial condition is also ne eded. Replace the question marks ( " }{TEXT 0 1 "?" }{TEXT -1 67 " ) i n the following input regions to define the relevant ODE model." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "ode1 := diff( %?, %? ) = %? \+ ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "ode2 := diff( %?, %? ) = %? ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "MODEL := \{ ode1 , ode2 \} ; # define the differential equation model" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "IC := [ %? = %?, %? = %? ] ; \+ # specify an initial condition" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "VAR := \{ %?, %? \} ; # identify the variables in the model" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 259 "" 0 "" {TEXT 268 10 "Nullclines" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 213 "It is difficult to give a general outline for the determ ination of nullclines. The key is to set the RHS of each ODE in the sy stem equal to zero and to find all curves on which the resulting equat ion is satisfied." }}}{SECT 1 {PARA 4 "" 0 "" {TEXT 269 12 "x-nullclin es" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " }{XPPEDIT 18 0 "x" "6#% \"xG" }{TEXT -1 69 "-nullclines are found by setting the RHS of the fi rst ODE equal to 0:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "fact or( rhs(ode1) ) = 0 ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " } {XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 90 "-nullcline(s) typically cons ists of curves that can be expressed either as a function of " } {XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 23 " or as a function of " } {XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 4 " : " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 95 "xNULL1 := plot( %?, x = %? .. %?, color=GREEN ): # for a nullcline of the form y=F(x)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 95 "xNULL2 := plot( [ %?, y, y = %? .. %? ], color=GREEN \+ ): # for a nullcline of the form x=G(y)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "xNULLplot := display( [ xNULL1, xNULL2 ], axes=BOXED \+ ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "xNULLplot;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 270 12 "y-nullclines" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " } {XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 69 "-nullclines are found by set ting the RHS of the first ODE equal to 0:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 25 "factor( rhs(ode2) ) = 0 ;" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 4 "The " }{XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 90 "-nullcl ine(s) typically consists of curves that can be expressed either as a \+ function of " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 23 " or as a fu nction of " }{XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 4 " : " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 95 "yNULL1 := plot( %?, x = %? . . %?, color=BLUE ): # for a nullcline of the form y=F(x)" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 95 "yNULL2 := plot( [ %?, y, y = %? .. %? ], color=BLUE ): # for a nullcline of the form x=G(y)" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "yNULLplot := display( [ yNULL1, yNU LL2 ], axes=BOXED ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "yNULLplot; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 61 "The complete nullcline plot is the union of the plot s of the " }{XPPEDIT 18 0 "x" "6#%\"xG" }{TEXT -1 6 "- and " } {XPPEDIT 18 0 "y" "6#%\"yG" }{TEXT -1 12 "-nullclines." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "NULLplot:=display( [xNULLplot, yNUL Lplot]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 " title =\"Nullclines for %?\" ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "NULLplo t;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 261 21 "Equilibrium Solutions" }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 51 "EQUILeqns := \{ rhs( ode1 ) = 0, rhs( ode2 ) = 0 \} ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "EQUILsoln := solve( E QUILeqns, VAR ) ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 1 {PARA 4 "" 0 "" {TEXT 260 52 "Direction Field, Phase Portrait, and Solution Curves" }{TEXT 267 2 " (" }{HYPERLNK 17 "DEplot" 2 "DEpl ot" "" }{TEXT -1 1 ")" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "Replace t he question marks ( " }{TEXT 0 1 "?" }{TEXT -1 80 " ) in the following input regions to create the direction field for your model." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "DOMAIN := %? = %? .. %? ; \+ # specify reasonable interval for indep var" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "WINDOW := %? = %? .. %?, %? \+ = %? .. %? ; # specify reasonable intervals for all dependent vars " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT 262 15 "Direction Field" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "DEplot( MODEL, VAR, DOMAIN, WINDOW, arrows = MEDIUM, " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 43 " title = \"Direction Fie ld for %?\" );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {SECT 1 {PARA 4 "" 0 "" {TEXT 264 14 "Phase Portrait" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "DEplot( MODEL, VAR, DOMAIN, [ IC ], WINDO W," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " scene=[ %?, %? ], arr ows=NONE, linecolor=BLUE," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 " \+ title = \"Phase Portrait for %?\" );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 263 15 "Solution C urves" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "IC := [ %? = %?, %? = %? ] ; # specify an initial condition (not needed for direction f ield)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "P1:= DEplot( MODEL , VAR, DOMAIN, [ IC ]," }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 61 " \+ scene=[ %?, %? ], arrows=NONE, linecolor=BLUE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "P2:= DEplot( MODEL, VAR, DOMAIN, [ IC ]," }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 " scene=[ %?, %? ], arro ws=NONE, linecolor=GREEN ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 78 "display( [ P1, P2 ] , title = \"%? and %? vs. %?\" ); # combined s olution curves" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "display( \+ array([P1,P2]), title = \"%?\" );\010 # side-by-side solution curves" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{SECT 1 {PARA 263 "" 0 "" {TEXT -1 22 "template-eigen (recap)" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 338 " This worksheet contains templates for the creation of direction fields and eigenvalue/eigenvector analysis for 2 x 2 (planar) systems of li near ODEs. There are separate sections for each of the three cases tha t can arise from the computation of the eigenvalues. For guidance on t he usage of these templates, please consult the worksheet " } {HYPERLNK 17 "BDH3.mws" 1 "/math/faculty/miller/www/maple/diffeq/BDH3. mws" "" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "with(DEtools):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT 274 34 "Specification of the planar system" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "A := matrix( [ [ %? , %? ], [ %? , %? ] ] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 275 30 "Linearly Independent Solutions" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "lambda := 'lambda':" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "charpoly( A, lambda );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "eigenvals( A );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "eigenvects( A );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 5 "" 0 " " {TEXT 276 37 "Case 1: Real and Distinct Eigenvalues" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "lambda1 := %? ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "lambda2 := %? ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "V1 := matrix( 2, 1, [ %? , %? ] );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "V2 := matrix( 2, 1, [ %? , %? ] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "The straight- line solutions are:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "Y1 : = exp( lambda1 *t) * evalm( V1 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "Y2 := exp( lambda2 *t) * evalm( V2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 5 "" 0 "" {TEXT -1 1 "C" }{TEXT 277 26 "ase 2: Complex Eigenvalues" }}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 13 "alpha := %? :" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "beta := %? :" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "lambda := a lpha + I * beta;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "V := matrix( 2, 1, [ %? , %? ] ); # be careful to distinguish between Maple's 1 and \+ I" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 314 "The linearly independent solutions are found by the usual steps: exp( eigenvalue * t ) * eigenvector, but recall that the two solutions are the real and imaginary parts of this expression. Th ese calculations are messy - by hand. With Maple it's a little better, but there are some extra commands that must be used." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 304 "We know that the two \+ solutions will consist of the product of an exponential formed with th e real part of the eigenvalues and a vector with trigonometric terms f ormed using the imaginary part of the eigenvalues. Let's begin by look ing at the part of the solution that leads to complex-valued expressio ns:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "assume( t, real );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "mess := exp( I* beta *t ) * evalm( V );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "mess2 := \+ convert( evalc( evalm( mess ) ), trig );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "t := 't';" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "messRE := map( Re, mess2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "messIM := map( Im, mess2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 107 "Using the re al and imaginary parts we can construct the two linearly independent s olutions for this system:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "Y1 := exp( alpha *t) * evalm( messRE );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "Y2 := exp( alpha *t) * evalm( messIM );" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 5 "" 0 " " {TEXT 278 27 "Case 3: Repeated Eigenvalue" }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 14 "lambda := %? ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "V1 := matrix( 2, 1, [ %? , %? ] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "V2 := matrix( 2, 1, [ x2, y2 ] );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 30 "The straight-line solution is:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "Y1 := exp( lambda *t) * evalm( V1 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "To find a sec ond linearly independent solution we must find any vector " } {XPPEDIT 18 0 "V[2]" "6#&%\"VG6#\"\"#" }{TEXT -1 18 " that satisfies \+ " }{XPPEDIT 18 0 "A * V[2] = lambda * V[2] + V[1]" "6#/*&%\"AG\"\"\"& %\"VG6#\"\"#F&,&*&%'lambdaGF&&F(6#\"\"#F&F&&F(6#\"\"\"F&" }{TEXT -1 21 " or, equivalently, " }{XPPEDIT 18 0 "A*V[2] - lambda*V[2] = V[1] " "6#/,&*&%\"AG\"\"\"&%\"VG6#\"\"#F'F'*&%'lambdaGF'&F)6#\"\"#F'!\"\"&F )6#\"\"\"" }{TEXT -1 2 " ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "eqn := evalm( A &* V2 - lambda *V2 = V1 );" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 54 "soln := solve( \{ %? *x2 + %? *y2 = %? \}, \{ \+ x2, y2 \} );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "V2 := subs( soln , y2=1, evalm(V2) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "Y2 := exp( lambda *t ) * ( t * evalm( V1 ) + evalm( V2 ) );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 279 36 "Direction \+ Fields and Solution Curves" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "ode1 := diff( x(t), t ) = %? * x(t) + %? * y(t) ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "ode2 := diff( y(t), t ) = %? * x(t) - %? * y(t) ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "MODEL := \{ ode1, ode2 \}:" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 23 "VARS := \{ x(t), y(t) \}:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "DOMAIN := t=0.. %? :" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 36 "RANGE := x= %? .. %? , y= %? .. %? :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "dirPLOT := DEplot( MODEL, VARS, DOM AIN, RANGE, arrows=MEDIUM ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "dirP LOT;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 127 "IC := [ [ x(0)= %? , y(0)= %? ], [ x(0)= % ? , y(0)= %? ], [ x(0)= %? , y(0)= %? ]: # use more or fewer than 3 IC 's as necessary" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "solPLOT \+ := DEplot( MODEL, VARS, DOMAIN, RANGE, IC, arrows=NONE, linecolor=GREE N ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "#solPLOT;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 127 "ICline := [ [ x(0)= %? , y(0)= %? ], [ x(0)= %? , y(0)= %? ], \n [ x(0)= %? , y(0)= %? ], [ x(0)= %? , y(0)= %? ] ]:" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "linePLOT := DEplot( MODEL, \+ VARS, DOMAIN, RANGE, ICline, arrows=NONE, linecolor=BLUE ):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "#linePLOT;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "display ( [ dirPLOT, solPLOT, linePLOT ], title=\"%?\" ); # omit linePLOT for \+ complex eigenvalues" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}}{MARK "0 0 0 " 0 }{VIEWOPTS 1 1 0 1 1 1803 }