{VERSION 4 0 "IBM INTEL NT" "4.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 "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 1 12 111 111 52 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 1 12 111 111 52 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Warning" -1 7 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Plot" -1 13 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 "Normal" -1 256 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 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT 256 42 "SOLVING DIFFERENTIAL EQ UATIONS \nWITH MAPLE" }}{PARA 0 "" 0 "" {TEXT -1 167 "Sometimes you ca n save yourself a lot of work by using a software package such as Mapl e for solving a differential equation problem. I will briefly give som e examples;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 114 "Derivatives can be intruduced in \+ Maple by the command diff. In its most common application diff(f(x),x ) produces " }{XPPEDIT 18 0 "diff(f(x),x)" "6#-%%diffG6$-%\"fG6#%\"xGF )" }{TEXT -1 98 " . Higher derivatives are produced by repeating the a rgument. As an example consider the equation:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "de:=diff(y(x),x,x)+y(x)=0;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,&-%%diffG6$-%\"yG6#%\"xG-%\"$G6$F-\"\"#\"\"\"F* F2\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 184 "An alternative way to write derivatives is to use the differential operator D. Writing D(f) (x) has the same effect as writing diff(f(x),x). The operator can be a pplied repeatedly, e.g." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 " de1:=D(D(y))(x)+y(x)=0;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$de1G/,&- --%#@@G6$%\"DG\"\"#6#%\"yG6#%\"xG\"\"\"-F/F0F2\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "is the same differential equation as de. " } {TEXT 257 188 "Maple has a command \"dsolve\" which attempts to solve \+ ordinary differential equations. I recommend using dsolve with derivat ives specified with diff rather than D, although both will work. " } {TEXT -1 99 "You may wish to look up the Maple \"help\" to find out mo re about the difference between D and diff." }{TEXT 258 97 "In our fi rst example dsolve can be used to find the general solution of a diff erential equation." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "dsolve(de,y(x ));\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "dsolve(de1,y(x));" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#/-%\"yG6#%\"xG,&*&%$_C1G\"\"\"-%$sinGF &F+F+*&%$_C2GF+-%$cosGF&F+F+" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/-%\"y G6#%\"xG,&*&%$_C1G\"\"\"-%$sinGF&F+F+*&%$_C2GF+-%$cosGF&F+F+" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Our second example is a non-homoge neous differential equation:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "de2 :=diff(y(x),x,x)+y(x)=x^2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$de2G/ ,&-%%diffG6$-%\"yG6#%\"xG-%\"$G6$F-\"\"#\"\"\"F*F2*$)F-F1F2" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "applying dsolve again provides the general solution" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "dsolve(de2,y(x ));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/-%\"yG6#%\"xG,*!\"#\"\"\"*$)F' \"\"#F*F**&%$_C1GF*-%$sinGF&F*F**&%$_C2GF*-%$cosGF&F*F*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 116 "We can also use dsolve with initial cond itions. Initial conditions on derivatives are best specified with D no t diff" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "a:=dsolve(\{de2,D(y)(0)=0 ,y(0)=0\},y(x));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"aG/-%\"yG6#%\" xG,(!\"#\"\"\"*$)F)\"\"#F,F,*&F/F,-%$cosGF(F,F," }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "The conditions doesn't necessarily have to be on the initial values e.g." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "b: =dsolve(\{de2,D(y)(1)=0,y(0)=0\},y(x));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"bG/-%\"yG6#%\"xG,*!\"#\"\"\"*$)F)\"\"#F,F,*&*(F/F,,&!\"\"F,- %$sinG6#F,F,F,-F5F(F,F,-%$cosGF6F3F,*&F/F,-F9F(F,F," }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 150 "will work too. As we will discuss in more deta il later, when all the conditions on the sought for function are speci fied as initial conditions (as in " }{TEXT 261 1 "a" }{TEXT -1 19 ") w e talk about an " }{TEXT 259 23 "initial value problem, " }{TEXT -1 52 "when we specify conditions on distinct points (as in" }{TEXT 262 2 " b" }{TEXT -1 24 ") we are dealing with a " }{TEXT 260 23 "boundary value problem." }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 99 "If we w ish to manipulate the result further we can convert the result into a \+ function by using the " }{TEXT 265 7 "unapply" }{TEXT -1 143 " command (which is similar to the -> command for assigning varaiables to funct ions. However, for some reason g:=x->rhs(a); will not work here)." }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "g:=unapply(rhs(a),x);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%\"gGR6#%\"xG6\"6$%)operatorG%&arrowGF(,(!\"#\" \"\"*$)9$\"\"#F.F.*&F2F.-%$cosG6#F1F.F.F(F(F(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 33 "This allows us to plot the result" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 83 "plot(g(t),t=-3..3,labels=[\"t\",\"g(t)\"], t itle=\"Solution to differential equation\");\n" }}{PARA 13 "" 1 "" {GLPLOT2D 303 303 303 {PLOTDATA 2 "6&-%'CURVESG6$7fn7$$!\"$\"\"!$\"3h4 \"*z1],?]!#<7$$!3&*****\\P&3Y$HF-$\"3gGz$[&phaYF-7$$!3!******\\2<#pGF- $\"37r\\W^v81VF-7$$!3')**\\78.K7GF-$\"3P1*>:x*e;SF-7$$!3#)***\\7bBav#F -$\"3.qf6#[T'RPF-7$$!3'***\\(=>P9p#F-$\"3'*>+%e@vIW$F-7$$!36++]K3XFEF- $\"3kczh2x1iJF-7$$!3w******H./jDF-$\"3_D)4VYlY*GF-7$$!3%)****\\F)H')\\ #F-$\"3\\#HeuI0Dk#F-7$$!3))**\\(oXDXV#F-$\"3_*HUhdtjS#F-7$$!3#****\\i3 @/P#F-$\"3ioaa5pq%=#F-7$$!3;++Dr^b^AF-$\"31cS&)*)[t5=F-7$$!3$****\\7Sw %G@F-$\"3u*3KxQt>Z\"F-7$$!3*****\\7;)=,?F-$\"3#*RCp(=+.<\"F-7$$!3/++DO \"3V(=F-$\"3[\"y6C:VG:*!#=7$$!3#******\\V'zViUC\"F-$\"3aG,( =rGr*=F^p7$$!3-++DhkaI6F-$\"3[hD9rLm/8F^p7$$!3s******\\XF`**F^p$\"38rv .m^J8z!#>7$$!3u*******>#z2))F^p$\"3!*3_it&ys)[Fbr7$$!3S++]7RKvuF^p$\"3 %)pw%>0*>aDFbr7$$!3s,+++P'eH'F^p$\"3!3URZ:D@H\"Fbr7$$!3q)***\\7*3=+&F^ p$\"31#GruErD<&!#?7$$!3[)***\\PFcpPF^p$\"35]/9Ktlu;Fgs7$$!3;)****\\7VQ [#F^p$\"3W%p4IXa`;$!#@7$$!32)***\\i6:.8F^p$\"3(3SpHS%)=S#!#A7$$!3Wb+++ v`hHFgs$\"3(Ql&=WxU5k!#H7$$\"3]****\\(QIKH\"F^p$\"3&G5xM1%fHBFht7$$\"3 8****\\7:xWCF^p$\"3]l#\\C_F5(HFb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1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 86 "We can also manipulate the result in oth er ways e.g.to check if the result is correct" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "b:=D(D(g))(x)+g(x)-x^2;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"bG\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "g(0);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "h:=D(g)(x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"hG ,&%\"xG\"\"#*&F'\"\"\"-%$sinG6#F&F)!\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "f:=unapply(h,x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#> %\"fGR6#%\"xG6\"6$%)operatorG%&arrowGF(,&9$\"\"#*&F.\"\"\"-%$sinG6#F-F 0!\"\"F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(0);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"!" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 278 "So far we have only discussed cases where Maple is capab le of producing an exact solution. Often Maple is incapable of findin g an analytic solution and we have to use numerical methods. Maple has mny different options for doing this, but often using the default met hod is good " }}{PARA 0 "" 0 "" {TEXT -1 61 "enough. As an example let us consider a parametric oscillator" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "de3:=diff(y(x),x,x)+cos(x)*y(x)=0;" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%$de3G/,&-%%diffG6$-%\"yG6#%\"xG-%\"$G6$F-\"\"#\"\" \"*&-%$cosGF,F2F*F2F2\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "sol:=dsolve(\{de3,y(0)=1,D(y)(0)=0\},y(x),numeric);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%$solGR6#%(rkf45_xG6'%\"iG%(rkf45_sG%)outpointG %#r1G%#r2G6#%aoCopyright~(c)~1993~by~the~University~of~Waterloo.~All~r ights~reserved.G6\"C&>8&-%&evalfG6#9$@$52-%$absG6#,$F3!\"\"-F<6#,&&%,l oc_controlG6#\"\"#\"\"\"F3F?4-%'memberG6$&FD6#\"\"'<*!\"#F?FGFF$FG\"\" !$F?FR$FFFR$FPFRC%>FD-%%copyG6#=F06#;FG\"#LE\\[lBFGFFFF$FRFR\"\"$Fjn\" \"%$FG!\")\"\"&F]oFNFG\"\"($FG!\"*\"\")\"&++$\"\"*\"%+5\"#5FR\"#6FR\"# 7FR\"#8FR\"#9FR\"#:FR\"#;FR\"#FR\"#?FQ\"#@Fjn\"#AFR\"#BFR \"#CFR\"#DFR\"#EFR\"#FFR\"#GFR\"#HFR\"#IFR\"#JFR\"#KFRFhnFR>%'loc_y0G- FY6#=F06#;FGFFE\\[l#FGFQFFFjn>%'loc_y1G-FY6#=F0FcqE\\[l!@$0F;FRC$>&FD6 #F[oF3@%1%'DigitsG-%'evalhfG6#FdrC$>8%-%*traperrorG6#-Ffr6#-%=dsolve/n umeric_solnall_rkf45G6,%&loc_FG-%$varG6#FD-Fes6#F_q-Fes6#Fgq-Fes6#%'lo c_F1G-Fes6#%'loc_F2G-Fes6#%'loc_F3G-Fes6#%'loc_F4G-Fes6#%'loc_F5G-Fes6 #%)loc_workG@$/Fjr%*lasterrorGC%>8'-%+searchtextG6$.Ffr-%(convertG6$-% #opG6$FG7#Fjr%%nameG>8(-Fdu6$.%)hardwareGFgu@%50FbuFR0F`vFR-Fas6,FcsFD F_qFgqF]tF`tFctFftFitF\\u-%&ERRORG6#FjrFiv7$/%\"xGF7-%$seqG6$/&%$ordG6 #,&8$FGFGFG&F_q6#Fiw/FiwFdqF06%FDF_qFgqF0" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 47 " E.g. if we wish to find the solution for x=3. " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "sol(3);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7%/%\"xG\"\"$/-%\"yG6#F%$!3)3&oe6*=D@\"!# " 0 "" {MPLTEXT 1 0 71 "sol1:=dsolve(\{de3 ,y(0)=1,D(y)(0)=0\},y(x),numeric,output=listprocedure);" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>%%sol1G7%/%\"xGR6#F'6\"6#%aoCopyright~(c)~1993~ by~the~University~of~Waterloo.~All~rights~reserved.GF*9$F*F*F*/-%\"yGF )RF)6&%(rkf45_sG%)outpointG%#r1G%#r2GF+F*C&>8%-%&evalfG6#F-@$52-%$absG 6#,$F9!\"\"-FA6#,&&%,loc_controlG6#\"\"#\"\"\"F9FD4-%'memberG6$&FI6#\" \"'<*!\"#FDFLFK$FL\"\"!$FDFW$FKFW$FUFWC%>FI-%%copyG6#=F*6#;FL\"#LE\\[l BFLFKFK$FWFW\"\"$F_o\"\"%$FL!\")\"\"&FboFSFL\"\"($FL!\"*\"\")\"&++$\" \"*\"%+5\"#5FW\"#6FW\"#7FW\"#8FW\"#9FW\"#:FW\"#;FW\"#FW\" #?FV\"#@F_o\"#AFW\"#BFW\"#CFW\"#DFW\"#EFW\"#FFW\"#GFW\"#HFW\"#IFW\"#JF W\"#KFWF]oFW>%'loc_y0G-Fhn6#=F*6#;FLFKE\\[l#FLFVFKF_o>%'loc_y1G-Fhn6#= F*FhqE\\[l!@$0F@FWC$>&FI6#F`oF9@%1%'DigitsG-%'evalhfG6#FirC$>8$-%*trap errorG6#-F[s6#-%=dsolve/numeric_solnall_rkf45G6,%&loc_FG-%$varG6#FI-Fj s6#Fdq-Fjs6#F\\r-Fjs6#%'loc_F1G-Fjs6#%'loc_F2G-Fjs6#%'loc_F3G-Fjs6#%'l oc_F4G-Fjs6#%'loc_F5G-Fjs6#%)loc_workG@$/F_s%*lasterrorGC%>8&-%+search textG6$.F[s-%(convertG6$-%#opG6$FL7#F_s%%nameG>8'-Fiu6$.%)hardwareGF\\ v@%50FguFW0FevFW-Ffs6,FhsFIFdqF\\rFbtFetFhtF[uF^uFau-%&ERRORG6#F_sF^w& Fdq6#FLF*6%FIFdqF\\rF*/-%%diffG6$F/F'RF)F2F+F*C&>F9F:@$F>C%>FI-Fhn6#=F *F[oE\\[lBFLFKFKF_oF`oF_oFaoFboFdoFboFSFLFeoFfoFhoFioFjoF[pF\\pFWF]pFW F^pFWF_pFWF`pFWFapFWFbpFWFcpFWFdpFWFepFWFfpFVFgpF_oFhpFWFipFWFjpFWF[qF WF\\qFWF]qFWF^qFWF_qFWF`qFWFaqFWFbqFWF]oFW>Fdq-Fhn6#=F*FhqE\\[l#FLFVFK F_o>F\\r-Fhn6#=F*FhqE\\[l!@$FbrC$>FerF9@%FhrC$>F_sF`s@$FcuC%>FguFhu>Fe vFfv@%F[wF^wF`wF^w&FdqFJF*FewF*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 61 "and define the function fy as the substitution of x into y(x)" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "fy:= subs(sol1,y(x));" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#fyGR6#%\"xG6&%(rkf45_sG%)outpointG% #r1G%#r2G6#%aoCopyright~(c)~1993~by~the~University~of~Waterloo.~All~ri ghts~reserved.G6\"C&>8%-%&evalfG6#9$@$52-%$absG6#,$F2!\"\"-F;6#,&&%,lo c_controlG6#\"\"#\"\"\"F2F>4-%'memberG6$&FC6#\"\"'<*!\"#F>FFFE$FF\"\"! $F>FQ$FEFQ$FOFQC%>FC-%%copyG6#=F/6#;FF\"#LE\\[lBFFFEFE$FQFQ\"\"$Fin\" \"%$FF!\")\"\"&F\\oFMFF\"\"($FF!\"*\"\")\"&++$\"\"*\"%+5\"#5FQ\"#6FQ\" #7FQ\"#8FQ\"#9FQ\"#:FQ\"#;FQ\"#FQ\"#?FP\"#@Fin\"#AFQ\"#BF Q\"#CFQ\"#DFQ\"#EFQ\"#FFQ\"#GFQ\"#HFQ\"#IFQ\"#JFQ\"#KFQFgnFQ>%'loc_y0G -FX6#=F/6#;FFFEE\\[l#FFFPFEFin>%'loc_y1G-FX6#=F/FbqE\\[l!@$0F:FQC$>&FC 6#FjnF2@%1%'DigitsG-%'evalhfG6#FcrC$>8$-%*traperrorG6#-Fer6#-%=dsolve/ numeric_solnall_rkf45G6,%&loc_FG-%$varG6#FC-Fds6#F^q-Fds6#Ffq-Fds6#%'l oc_F1G-Fds6#%'loc_F2G-Fds6#%'loc_F3G-Fds6#%'loc_F4G-Fds6#%'loc_F5G-Fds 6#%)loc_workG@$/Fir%*lasterrorGC%>8&-%+searchtextG6$.Fer-%(convertG6$- %#opG6$FF7#Fir%%nameG>8'-Fcu6$.%)hardwareGFfu@%50FauFQ0F_vFQ-F`s6,FbsF CF^qFfqF\\tF_tFbtFetFhtF[u-%&ERRORG6#FirFhv&F^q6#FFF/6%FCF^qFfqF/" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "fy(3);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$!3)3&oe6*=D@\"!#<" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 115 "This form is not suitable for plotting, but we can plot the resul ts using the command odeplot in the library plots:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoords has been redefined\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 99 "odeplot(sol,[x,y(x)],0..8,labels=[x ,\"y(x)\"],title = \"Numerical solution to differential equation\");" }}{PARA 13 "" 1 "" {GLPLOT2D 303 303 303 {PLOTDATA 2 "6%-%'CURVESG6$7T 7$$\"\"!F)$\"\"\"F)7$$\"+hIlK;!#5$\"3SVRkQ>Jn)*!#=7$$\"+AhIlKF/$\"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p'FO$!3%Q=NR[V+k&Fcq7$$\"+ `G9doFO$!3E\\-_@Q)GS%Fcq7$$\"+f\"3/-(FO$!3[vAKJL1nIFcq7$$\"+lMn$=(FO$! 3%**3IF(QGq;Fcq7$$\"+r(QpM(FO$!3MG*fr\\M9X#F27$$\"+xS?5vFO$\"3?P!>kwjS =\"Fcq7$$\"+$QpMn(FO$\"31bD)z!fj.EFcq7$$\"+*oMn$yFO$\"33$zcrM(y6SFcq7$ $\"+&*******zFO$\"3!H\\'p&e;\">aFcq-%'COLOURG6&%$RGBG$\"#5!\"\"F(F(-%+ AXESLABELSG6$%\"xGQ%y(x)6\"-%&TITLEG6#QLNumerical~solution~to~differen tial~equationF[\\l" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 187 "The numerical option for dso lve only works for initial value problems, for boundary value problems we have to use different methods, something that will the topic of mu ch of this course! " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 160 "The default method of the numeric option of dsolve is a Runge-Kutta procedure. Several of the listed references, notably t he books by Enns and McGuire, Press " }{TEXT 263 6 "et al." }{TEXT -1 12 " and Ridley " }{TEXT 264 6 "et al." }{TEXT -1 46 " contains readab le descriptions of the method." }}}}{MARK "2 0 0" 73 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }