{VERSION 2 3 "DEC ALPHA UNIX" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 }{PSTYLE " Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Plot" 0 13 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 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 120 "As an example of Heun's method for secon d-order equations,\nconsider the following damped, nondriven mass-spri ng model.\n" }{XPPEDIT 18 0 "d^2x/dt^2 + 2*(dx/dt) + 5*x = 0" "/,(*(% \"dG\"\"#%\"xG\"\"\"*$%#dtG\"\"#!\"\"F(*&\"\"#F(*&%#dxGF(F*F,F(F(*&\" \"&F(F'F(F(\"\"!" }{TEXT -1 9 " " }{XPPEDIT 18 0 "x(0) = 1; dx /dt = 0" "C$/-%\"xG6#\"\"!\"\"\"/*&%#dxG\"\"\"%#dtG!\"\"F'" }{MPLTEXT 1 0 1 "\n" }{TEXT -1 192 "\nBy considering velocity to be a second ind ependent variable, we\ncan implement Heun's scheme for systems of seco nd-order equations.\nThe initial-value problem above is equivalent to \+ the system\n" }{XPPEDIT 18 0 "dx/dt = v" "/*&%#dxG\"\"\"%#dtG!\"\"%\"v G" }{TEXT -1 28 " , " }{XPPEDIT 18 0 "x(0) = \+ 1" "/-%\"xG6#\"\"!\"\"\"" }{TEXT -1 1 "\n" }{XPPEDIT 18 0 "dv/dt = -2v - 5x" "/*&%#dvG\"\"\"%#dtG!\"\",&*&\"\"#F%%\"vGF%F'*&\"\"&F%%\"xGF%F' " }{TEXT -1 11 " , " }{XPPEDIT 18 0 "v(0) = 0" "/-%\"vG6#\"\"! F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "f := (x,v,t) -> v;" } }{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fG:6%%\"xG%\"vG%\"tG6\"6$%)operat orG%&arrowGF*9%F*F*" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "g := (x,v,t) -> -2*v-5*x;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"gG:6%%\"x G%\"vG%\"tG6\"6$%)operatorG%&arrowGF*,&9%!\"#9$!\"&F*F*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "We need to choose the number of steps and the step size:" }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "N := 50; h := 0.1;" }}{PARA 0 "" 0 "" {TEXT -1 51 "and the first p oint in each of the three sequences:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "heun_ptsx := [t[0],x[0]];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 " heun_ptsv := [t[0],v[0]];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "heun_p tsxv := [x[0],v[0]];" }}{PARA 0 "" 0 "" {TEXT -1 37 "Now we can procee d with the for loop." }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "for n from 0 to N-1 do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 " t[n+1] := t[n] + h;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 " slope1x := f(x[n],v[n],t[n]);" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 " slope1v := g(x[n],v[n],t[n]);" } }{PARA 0 "" 0 "" {TEXT -1 65 " First slope is the s lope from Euler's method." }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " slope2x := f(x[n]+h*slope1x,v[n]+h*slope1x,t[n+1]) ;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 " slope2v := g(x[n]+h*slope1x ,v[n]+h*slope1v,t[n+1]);" }}{PARA 0 "" 0 "" {TEXT -1 91 " \+ Second slope is calculated at the points resulting from Euler's method." }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 " s lopex := ( slope1x + slope2x )/2;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 " slopev := ( slope1v + slope2v )/2;" }}{PARA 0 "" 0 "" {TEXT -1 74 " Final value for slope is the average of the two slopes." }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 " x [n+1] := x[n] + h*slopex;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 " v[n +1] := v[n] + h*slopev;" }}{PARA 0 "" 0 "" {TEXT -1 60 " \+ new value = old value + stepsize * slope" }{MPLTEXT 1 0 0 "" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 " new_ptx := [ t[n+1], x[n+1] ];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 " new_ptv := [ t[n+1], v[n+1] ]; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 " new_ptxv := [ x[n+1], v[n+1] ];" }}{PARA 0 "" 0 "" {TEXT -1 78 " define the new est points in the three sequences of points." }{MPLTEXT 1 0 0 "" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 " heun_ptsx := heun_ptsx, new_ptx; " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 " heun_ptsv := heun_ptsv, new_ ptv;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 " heun_ptsxv := heun_ptsxv , new_ptxv;" }}{PARA 0 "" 0 "" {TEXT -1 90 " modify each of the three sequences by adding the new point at the end." } {MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "od:" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 0 "" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"NG\"# ]" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"hG$\"\"\"!\"\"" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%*heun_ptsxG7$\"\"!\"\"\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%*heun_ptsvG7$\"\"!F&" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%+heun_ptsxvG7$\"\"\"\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "plot([heun_ptsx],labels = [`t`,`x`],style=POINT,\ntitle = `x(t ), 10 steps, step size=0.5`);" }}{PARA 13 "" 1 "" {INLPLOT "6&-%'CURVE SG6$7U7$\"\"!$\"\"\"F(7$$\"31+++++++5!#=F)7$$\"36+++++++?F.$\"3')***** *****\\F&*F.7$$\"3*)**************HF.$\"3l*******\\i$z')F.7$$\"3A+++++ ++SF.$\"3$******>\")=\\b(F.7$$\"3++++++++]F.$\"3++++-i)3D'F.7$$\"3y*** ***********fF.$\"3k*****HO5s&[F.7$$\"3c**************pF.$\"3v*****pp$) QX$F.7$$\"3W+++++++!)F.$\"3))*****z!et3@F.7$$\"3A+++++++!*F.$\"3V***** *>BZh()!#>7$F)$!31+++SX)R.#FW7$$\"34+++++++6!#<$!3&******4BNI5\"F.7$$ \"3'**************>\"Fhn$!33+++#*ej3=F.7$$\"3/+++++++8Fhn$!3(******>+q uJ#F.7$$\"3\"**************R\"Fhn$!3()*****R2Nlj#F.7$$\"3++++++++:Fhn$ !31+++[8p!y#F.7$$\"34+++++++;Fhn$!3*******RI>2x#F.7$$\"3'************* *p\"Fhn$!3H+++jQSJEF.7$$\"3/+++++++=Fhn$!3!********fJ(*Q#F.7$$\"3\"*** ************=Fhn$!3++++=$oK2#F.7$$\"\"#F($!38+++\">l(3)o&FW7$$\"3++++++++NFhn$\"3k**** *>@;(pYFW7$$\"34+++++++OFhn$\"31+++\"Qh7f$FW7$$\"3=+++++++PFhn$\"3'*** ****)pXK^#FW7$$\"3#)*************z$Fhn$\"3$******>8Ol[\"FW7$$\"3\"**** ***********QFhn$\"3!)*****Rm6b^&Fas7$$\"\"%F($!30+++Nr+?EFas7$$\"3k*** **********4%Fhn$!3f*****f]_$[$*Fas7$$\"3=+++++++UFhn$!3\"******RN[@FW7$$\"3k*************f %Fhn$!3(******H?!eD@FW7$$\"3=+++++++ZFhn$!3#*******Qq'f+#FW7$$\"3#)*** **********z%Fhn$!3C+++44W5=FW7$$\"3O+++++++\\Fhn$!3'******Hp:-c\"FW7$$ \"\"&F($!32+++8Luv7FW-%'COLOURG6&%$RGBG$\"#5!\"\"F(F(-%+AXESLABELSG6$% \"tG%\"xG-%&TITLEG6#%>x(t),~10~steps,~step~size=0.5G-%&STYLEG6#%&POINT G" 2 294 294 294 5 0 1 0 2 9 0 4 2 1.000000 45.000000 45.000000 10020 10061 10056 10074 0 0 0 20030 0 12020 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "plot([heun_ptsv], labels = [`t`,`v`],style = POINT,\ntitle = `v(t), 50 steps, step size \+ = 0.1`);" }}{PARA 13 "" 1 "" {INLPLOT "6&-%'CURVESG6$7U7$\"\"!F(7$$\"3 1+++++++5!#=$!36+++++++XF,7$$\"36+++++++?F,$!3o**********\\x!)F,7$$\"3 *)**************HF,$!3,+++]()*32\"!#<7$$\"3A+++++++SF,$!30+++>e$>C\"F9 7$$\"3++++++++]F,$!32+++B.JF8F97$$\"3y**************fF,$!3-+++'e,lL\"F 97$$\"3c**************pF,$!3&******pA$4\"G\"F97$$\"3W+++++++!)F,$!3+++ +#)Q*Q<\"F97$$\"3A+++++++!*F,$!3%******zuQ\"G5F97$$\"\"\"F($!3?+++,$pz c)F,7$$\"34+++++++6F9$!3;+++!H1+s'F,7$$\"3'**************>\"F9$!3j**** *f9Rg%[F,7$$\"3/+++++++8F9$!3#)******o\\rQIF,7$$\"3\"**************R\" F9$!38+++**o\"HP\"F,7$$\"3++++++++:F9$\"3S++++\\=(\\*!#?7$$\"34+++++++ ;F9$\"3%******ps8oK\"F,7$$\"3'**************p\"F9$\"3/++++1k,BF,7$$\"3 /+++++++=F9$\"30+++;g$R,$F,7$$\"3\"***************=F9$\"3$)*****HNe9Z$ F,7$$\"\"#F($\"3%******R8!y#p$F,7$$\"34+++++++@F9$\"3H+++VXq/PF,7$$\"3 =+++++++AF9$\"3E+++'e+(RNF,7$$\"3#)*************H#F9$\"3$)*****4:vMB$F ,7$$\"3\"**************R#F9$\"3&)*****p2vF#GF,7$$\"3++++++++DF9$\"39++ +=o[VBF,7$$\"34+++++++EF9$\"3&*******Gl2H=F,7$$\"3=+++++++FF9$\"3***** **pf!R48F,7$$\"3#)*************z#F9$\"3X*****>:k\")4)!#>7$$\"3\"****** *********GF9$\"3o*****4Niy]$Fbt7$$\"\"$F($!3#)******z$e1C&F`p7$$\"34++ +++++JF9$!3(******RC&>&*QFbt7$$\"3=+++++++KF9$!3e+++65[]lFbt7$$\"3#)** ***********H$F9$!3.+++@_Qx%)Fbt7$$\"3\"**************R$F9$!3D+++SQw*p* Fbt7$$\"3++++++++NF9$!3'*******Q)*4F5F,7$$\"34+++++++OF9$!3(******>g\" oE5F,7$$\"3=+++++++PF9$!3I+++ej=y(*Fbt7$$\"3#)*************z$F9$!32+++ >(=Y!*)Fbt7$$\"3\"***************QF9$!34+++TJ6[xFbt7$$\"\"%F($!3))**** *>(z%zS'Fbt7$$\"3k*************4%F9$!3H+++;$=k(\\Fbt7$$\"3=+++++++UF9$ !3;+++)pwb`$Fbt7$$\"3#)*************H%F9$!3*)*****f%=(\\:#Fbt7$$\"3O++ +++++WF9$!3^********)\\L!*)F`p7$$\"3++++++++XF9$\"36++++tto@F`p7$$\"3k *************f%F9$\"3/+++\"*H " 0 "" {MPLTEXT 1 0 102 "plot([heun_ptsxv],labels = [`x`,`v`],style = POINT, \ntitle = `phase plane, 50 steps, step size = 0.1`);" }}{PARA 13 "" 1 "" {INLPLOT "6&-%'CURVESG6$7U7$$\"\"\"\"\"!F*7$F($!36+++++++X!#=7$$\"3 ')**********\\F&*F.$!3o**********\\x!)F.7$$\"3l*******\\i$z')F.$!3,+++ ]()*32\"!#<7$$\"3$******>\")=\\b(F.$!30+++>e$>C\"F97$$\"3++++-i)3D'F.$ !32+++B.JF8F97$$\"3k*****HO5s&[F.$!3-+++'e,lL\"F97$$\"3v*****pp$)QX$F. $!3&******pA$4\"G\"F97$$\"3))*****z!et3@F.$!3++++#)Q*Q<\"F97$$\"3V**** **>BZh()!#>$!3%******zuQ\"G5F97$$!31+++SX)R.#FV$!3?+++,$pzc)F.7$$!3&** ****4BNI5\"F.$!3;+++!H1+s'F.7$$!33+++#*ej3=F.$!3j*****f9Rg%[F.7$$!3(** ****>+quJ#F.$!3#)******o\\rQIF.7$$!3()*****R2Nlj#F.$!38+++**o\"HP\"F.7 $$!31+++[8p!y#F.$\"3S++++\\=(\\*!#?7$$!3*******RI>2x#F.$\"3%******ps8o K\"F.7$$!3H+++jQSJEF.$\"3/++++1k,BF.7$$!3!********fJ(*Q#F.$\"30+++;g$R ,$F.7$$!3++++=$oK2#F.$\"3$)*****HNe9Z$F.7$$!38+++\">l(3:k\")4)FV7$$\"3'******fB9=O(FV$\"3o*****4Niy]$FV7$ $\"3r+++$yR,t(FV$!3#)******z$e1C&Fap7$$\"3U+++qG6vwFV$!3(******RC&>&*Q FV7$$\"3r******ot6msFV$!3e+++65[]lFV7$$\"3'******H'oJylFV$!3.+++@_Qx%) FV7$$\"3s*****\\T\">)o&FV$!3D+++SQw*p*FV7$$\"3k*****>@;(pYFV$!3'****** *Q)*4F5F.7$$\"31+++\"Qh7f$FV$!3(******>g\"oE5F.7$$\"3'*******)pXK^#FV$ !3I+++ej=y(*FV7$$\"3$******>8Ol[\"FV$!32+++>(=Y!*)FV7$$\"3!)*****Rm6b^ &Fap$!34+++TJ6[xFV7$$!30+++Nr+?EFap$!3))*****>(z%zS'FV7$$!3f*****f]_$[ $*Fap$!3H+++;$=k(\\FV7$$!3\"******RN[@FV$\"36++++tto@Fap7$$!3(******H?!eD@FV$\"3/+++\"*H< R6FV7$$!3#*******Qq'f+#FV$\"3%*******=O:i=FV7$$!3C+++44W5=FV$\"37+++&H (4$Q#FV7$$!3'******Hp:-c\"FV$\"39+++f2E4FFV7$$!32+++8Luv7FV$\"3%****** \\Off&GFV-%'COLOURG6&%$RGBG$\"#5!\"\"F*F*-%+AXESLABELSG6$%\"xG%\"vG-%& TITLEG6#%Gphase~plane,~50~steps,~step~size~=~0.1G-%&STYLEG6#%&POINTG" 2 312 312 312 5 0 1 0 2 9 0 4 2 1.000000 45.000000 45.000000 10020 10061 10056 10074 0 0 0 20030 0 12020 0 0 0 0 0 0 0 1 1 0 0 0 0 -12984 0 0 0 0 0 0 }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 173 "As we did w hen using Euler's method for this example, we can compare the results \nof Heun's method to the exact solution, to see how good Heun's metho d is for this step size." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "heunplot := plot([heun_ptsx],style=POINT):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "exactplot := plot(exp(-t)*(cos(2*t)+sin(2*t)/2),t= 0..5):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 89 "display(\{heunplot,exactplot \},labels=[`t`,`x`],\ntitle = `Heun method and exact solution`);" }} {PARA 13 "" 1 "" {INLPLOT "6'-%'CURVESG6%7U7$\"\"!$\"\"\"F(7$$\"31++++ +++5!#=F)7$$\"36+++++++?F.$\"3')**********\\F&*F.7$$\"3*)************* *HF.$\"3l*******\\i$z')F.7$$\"3A+++++++SF.$\"3$******>\")=\\b(F.7$$\"3 ++++++++]F.$\"3++++-i)3D'F.7$$\"3y**************fF.$\"3k*****HO5s&[F.7 $$\"3c**************pF.$\"3v*****pp$)QX$F.7$$\"3W+++++++!)F.$\"3))**** *z!et3@F.7$$\"3A+++++++!*F.$\"3V******>BZh()!#>7$F)$!31+++SX)R.#FW7$$ \"34+++++++6!#<$!3&******4BNI5\"F.7$$\"3'**************>\"Fhn$!33+++#* ej3=F.7$$\"3/+++++++8Fhn$!3(******>+quJ#F.7$$\"3\"**************R\"Fhn $!3()*****R2Nlj#F.7$$\"3++++++++:Fhn$!31+++[8p!y#F.7$$\"34+++++++;Fhn$ !3*******RI>2x#F.7$$\"3'**************p\"Fhn$!3H+++jQSJEF.7$$\"3/+++++ ++=Fhn$!3!********fJ(*Q#F.7$$\"3\"***************=Fhn$!3++++=$oK2#F.7$ $\"\"#F($!38+++\">l(3)o&FW7$$\"3++++++++NFhn$\"3k*****>@;(pYFW7$$\"34+++++++OFhn$\"31 +++\"Qh7f$FW7$$\"3=+++++++PFhn$\"3'*******)pXK^#FW7$$\"3#)************ *z$Fhn$\"3$******>8Ol[\"FW7$$\"3\"***************QFhn$\"3!)*****Rm6b^& Fas7$$\"\"%F($!30+++Nr+?EFas7$$\"3k*************4%Fhn$!3f*****f]_$[$*F as7$$\"3=+++++++UFhn$!3\"******RN[@FW7$$\"3k*************f%Fhn$!3(******H?!eD@FW7$$\"3=+++ ++++ZFhn$!3#*******Qq'f+#FW7$$\"3#)*************z%Fhn$!3C+++44W5=FW7$$ \"3O+++++++\\Fhn$!3'******Hp:-c\"FW7$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0 }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 271 "There is a little improvement ove r the results from Euler's method (note in particular the improved\nac curacy of the times at which x(t) crosses zero) but there is still som e discrepancy.\n\nIn general, the error in the Euler method is roughly proportional to the step size " }{XPPEDIT 18 0 "h" "I\"hG6\"" }{TEXT -1 0 "" }{TEXT -1 58 ";\nthe error in the Heun method is roughly propo rtional to " }{XPPEDIT 18 0 "h^2" "*$%\"hG\"\"#" }{TEXT -1 201 ".\n(Th e constants of proportionality depend on the original differential equ ation, but you can get\nan idea of what the constant is by looking at \+ the change in the results for a few different\nstep sizes." }}}}{MARK "14 0 5" 190 }{VIEWOPTS 1 1 0 1 1 1803 }