{VERSION 3 0 "IBM INTEL NT" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 2 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 255 0 255 1 0 1 1 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 255 0 255 1 0 1 1 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 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 "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "Author" 0 19 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 8 8 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 259 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 18 "" 0 "" {TEXT -1 39 "Linearizing, Eigenvalues, and St ability" }}{PARA 18 "" 0 "" {TEXT -1 35 "for Systems Differential Equa tions." }}{PARA 19 "" 0 "" {TEXT -1 23 "Math 374 Winter 1999" }} {PARA 19 "" 0 "" {TEXT -1 11 "Jay Treiman" }}{PARA 0 "" 0 "" {TEXT -1 41 "This worksheet will help you use Maple to" }}{PARA 0 "" 0 "" {TEXT -1 45 "explore the stability of solution to systems " }}{PARA 0 "" 0 "" {TEXT -1 26 "of differential equations." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 17 "Initialize Maple. " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "Restart Maple and load routine s from the " }{HYPERLNK 17 "linalg" 2 "linalg" "" }{TEXT -1 2 ", " }} {PARA 0 "" 0 "" {HYPERLNK 17 "plots" 2 "plots" "" }{TEXT -1 2 ", " } {HYPERLNK 17 "plottools" 2 "plottools" "" }{TEXT -1 6 ", and " } {HYPERLNK 17 "DEtools" 2 "DEtools" "" }{TEXT -1 10 " packages." }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "restart;\nwith(DEtools,DEplot):\nwi th(plots,display):\nwith(plottools,point):\nwith(linalg):" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 34 "Equilibrium solutions for systems " }} {PARA 3 "" 0 "" {TEXT -1 26 "of differential equations." }}{PARA 0 "" 0 "" {TEXT -1 62 "An equilibrium solution for a system of differential equations" }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "diff(y,t) = A*y;" "6#/-%% diffG6$%\"yG%\"tG*&%\"AG\"\"\"F'F+" }{TEXT -1 23 " is a point such th at " }{XPPEDIT 18 0 "diff(y,x) = 0;" "6#/-%%diffG6$%\"yG%\"xG\"\"!" } {TEXT -1 21 ". This means that if" }}{PARA 0 "" 0 "" {TEXT -1 60 "one starts at that point, one will always stay at the point." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 33 "As an example cons ider the system" }}{PARA 0 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "dif f(x,t) = x^2-x+y;" "6#/-%%diffG6$%\"xG%\"tG,(*$F'\"\"#\"\"\"F'!\"\"%\" yGF," }{TEXT -1 10 " and " }{XPPEDIT 18 0 "diff(y,t) = -x+y^2+2*y ;" "6#/-%%diffG6$%\"yG%\"tG,(%\"xG!\"\"*$F'\"\"#\"\"\"*&\"\"#F.F'F.F. " }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 60 "One first must find w here the right side of the differential" }}{PARA 0 "" 0 "" {TEXT -1 14 "equation is 0." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 97 "deq_system_1 := [diff(x(t),t) = x(t)^2-x(t)+ y(t),\n diff(y(t),t)= -x(t)+y(t)^2+2*y(t)];" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 14 "One then uses " } {HYPERLNK 17 "solve" 2 "solve" "" }{TEXT -1 47 " to find where the rig ht hand side is 0. Note " }}{PARA 0 "" 0 "" {TEXT -1 11 "the use of \+ " }{HYPERLNK 17 "rhs" 2 "rhs" "" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 180 "eqns := sub s(\{x(t)=x,y(t)=y\},\n \{rhs(deq_system_1[1])=0,rhs(deq_system_1[ 2])=0\});\nequib_pts := evalf(solve(eqns,\{x,y\})),\n fsolv e(eqns,\{x,y\},\{x=-3..-0.1,y=-3..-0.1\});" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 59 "One can plot the phase portrait and the equilibrium points." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 394 "point_1 := point(subs(equib _pts[1],[x,y]),\n color=blue,thickness=3,symbol=box):\npoin t_2 := point(subs(equib_pts[2],[x,y]),\n color=blue,thickne ss=3,symbol=box):\npoint_3 := point(subs(equib_pts[3],[x,y]),\n \+ color=blue,thickness=3,symbol=box):\nplt1 := DEplot(deq_system_1, \{y(t),x(t)\},t=0..3,\n x=-4..4,y=-4..4,scene=[x,y]):\ndisplay(plt 1,point_1,point_2,point_3);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 56 "Notice the form of the initial conditions. The routine " }{HYPERLNK 17 "dsolve" 2 "dsolve" "" }{TEXT -1 15 " require s a set" }}{PARA 0 "" 0 "" {TEXT -1 81 "the contains the differetial e quations and the initial conditions. Here this was" }}{PARA 0 "" 0 " " {TEXT -1 37 "accomplished through a union of sets." }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 34 "The solutions near the equilibria." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 71 "One can a lso look at the behavior of the solutions near the equilibria." }} {PARA 0 "" 0 "" {TEXT -1 68 "Here the solutions are animated so that o ne can see if the solutions" }}{PARA 0 "" 0 "" {TEXT -1 70 "are approa ching the equilibria or moving away. This is only done for" }}{PARA 0 "" 0 "" {TEXT -1 28 "the equilibrium point [0,0]." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 692 "equib_pt \+ := equib_pts[1];\nxe := subs(equib_pt,x):\nye := subs(equib_pt,y):\nde lta := .2:\ns0 := .2:\nplot_list := []:\nfor i from 1 to 6 do\n plot1 := eval(DEplot(deq_system_1,\{y(t),x(t)\},\n t=0..i*s0,\n [ [x(0)=xe,y(0)=ye+delta/2],\n [x(0)=xe+delta/2,y(0)=ye],\n \+ [x(0)=xe,y(0)=ye-delta/2],\n [x(0)=xe-delta/2,y(0)=ye],\n \+ [x(0)=xe+delta/2,y(0)=ye+delta/2],\n [x(0)=xe-delta/2,y(0)= ye-delta/2],\n [x(0)=xe-delta/2,y(0)=ye+delta/2],\n [x(0 )=xe+delta/2,y(0)=ye-delta/2]],\n x=xe-delta..xe+delta,y=ye-delt a..ye+delta,\n linecolor=black,scene=[x,y])):\n plot_list := eval([op(plot_list),plot1]);\n od:\ndisplay(plot_list,insequence=t rue);\n" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 34 "The Linearized Syste m Around [0,0]" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 55 "One can compare the information obtained above with the" }}{PARA 0 "" 0 "" {TEXT -1 64 "information obtained by approximating t he system of differential" }}{PARA 0 "" 0 "" {TEXT -1 61 "equations wi th a linear system. The linearized system system" }}{PARA 0 "" 0 "" {TEXT -1 69 "is obtained using the first order Taylor polynomial in tw o variables," }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 259 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "f(x,y) = f(xe,ye)+J(f)(xe,ye)*[x-xe, y- ye]+o([x-xe, y-ye]^2);" "6#/-%\"fG6$%\"xG%\"yG,(-%\"fG6$%#xeG%#yeG\"\" \"*&--%\"JG6#F+6$F-F.F/7$,&%\"xGF/F-!\"\",&%\"yGF/F.F9F/F/-%\"oG6#*$)7 $,&F8F/F-F9,&F;F/F.F9\"\"#F/F/" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 5 "Here " }{XPPEDIT 18 0 "J(f);" "6#-%\"JG6#%\"fG" }{TEXT -1 20 " is the Jacobian of " }{XPPEDIT 18 0 "f;" "6#%\"fG" }{TEXT -1 32 " . Ignoring the last term we get" }}{PARA 256 "" 0 "" {TEXT -1 1 " " } {XPPEDIT 18 0 "matrix([[diff(x,t)], [diff(y,t)]]) = matrix([[diff(f_1, x)(xe,ye), diff(f_1,y)(xe,ye)], [diff(f_2,x)(xe,ye), diff(f_2,y)(xe,ye )]])*matrix([[x], [y]]);" "6#/-%'matrixG6#7$7#-%%diffG6$%\"xG%\"tG7#-F *6$%\"yGF-*&-F%6#7$7$--F*6$%$f_1GF,6$%#xeG%#yeG--F*6$F:F16$F " 0 "" {MPLTEXT 1 0 226 "f_1 := subs(\{x(t)=x,y(t)=y\},rhs( deq_system_1[1]));\nf_2 := subs(\{x(t)=x,y(t)=y\},rhs(deq_system_1[2]) );\nA0 := matrix([[diff(f_1,x), diff(f_1,y)], \n [diff(f_2 ,x), diff(f_2,y)]]);\nA := evalm(map2(subs,\{x=xe,y=ye\},A0));" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 53 "Now one c an get the system of differential equations." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 131 "right_side := eva lm(A &* [x(t),y(t)]);\ndeq_system_1a := [diff(x(t),t)=right_side[1],\n diff(y(t),t)=right_side[2]];" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 63 "The linarized system can \+ now be animated in the same way as the" }}{PARA 0 "" 0 "" {TEXT -1 41 "original system to compare the results. " }{TEXT 256 30 "Note theat \+ the equilibrium for" }}{PARA 0 "" 0 "" {TEXT 257 37 "the linearized sy stem is always [0,0]" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 551 "plot_list := []:\nfor i f rom 1 to 6 do\n plot1 := eval(DEplot(deq_system_1a,\{y(t),x(t)\},\n \+ t=0..i*s0,\n [[x(0)=0,y(0)=delta/2],\n [x(0)=delta/2,y (0)=0],\n [x(0)=0,y(0)=-delta/2],\n [x(0)=-delta/2,y(0)= 0],\n [x(0)=delta/2,y(0)=delta/2],\n [x(0)=-delta/2,y(0) =delta/2],\n [x(0)=delta/2,y(0)=-delta/2],\n [x(0)=-delt a/2,y(0)=-delta/2]],\n x=-delta..delta,y=-delta..delta,\n \+ linecolor=black,scene=[x,y])):\n plot_list := eval([op(plot_list), plot1]);\n od:\ndisplay(plot_list,insequence=true);" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 60 "Note how the solutio ns head away from the equilibrium point." }}{PARA 0 "" 0 "" {TEXT -1 74 "This solution is unstable. Here are the eigenvalues and the exact soution" }}{PARA 0 "" 0 "" {TEXT -1 83 "to the linearized system. No tice how one of the eignevalues if positive and one is" }}{PARA 0 "" 0 "" {TEXT -1 76 "negative. If any term involving the exponential wit h a positive exponent is" }}{PARA 0 "" 0 "" {TEXT -1 73 "not zero the \+ solution will eventually go away from the equilibrium point." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "ei genvals(A);\ndsolve(convert(deq_system_1a,set),\{x(t),y(t)\});" }}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 8 "Exercise" }}{EXCHG {PARA 0 "" 0 " " {TEXT -1 59 "Use the methods above to classify the other two equilib rium" }}{PARA 0 "" 0 "" {TEXT -1 35 "points for the diffential equatio n." }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "14" 0 } {VIEWOPTS 1 1 0 1 1 1803 }