{VERSION 6 0 "IBM INTEL NT" "6.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 Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 23 "Courier" 1 10 0 0 0 0 0 0 0 0 0 0 3 0 0 1 }{CSTYLE " Dark Red Emphasis" -1 256 "Times" 1 12 128 0 0 1 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "Green Emphasis" -1 257 "Times" 1 12 0 128 0 1 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "Maroon Emphasis" -1 258 "Times" 1 12 128 0 128 1 0 1 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 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 } {CSTYLE "Purple Emphasis" -1 265 "Times" 1 12 102 0 230 1 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "Red Emphasis" -1 266 "Times" 1 12 255 0 0 1 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "Blue Emphasis" -1 268 "Times" 0 0 0 0 255 1 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 271 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "Grey Emphasis" -1 272 "Times" 1 12 96 52 84 1 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 275 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 276 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 277 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 278 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 279 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 280 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "Purple \+ Emphasis" -1 281 "Times" 1 12 102 0 230 1 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 282 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 283 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 284 "" 0 10 0 0 0 0 0 0 0 0 0 0 3 0 0 1 }{CSTYLE "" -1 285 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 286 "" 0 10 0 0 0 0 0 0 0 0 0 0 3 0 0 1 } {CSTYLE "" -1 287 "" 0 10 0 0 0 0 0 0 0 0 0 0 3 0 0 1 }{CSTYLE "" -1 288 "" 0 10 0 0 0 0 0 0 0 0 0 0 3 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 "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times " 1 18 0 0 128 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 3 0 3 0 2 2 0 1 } {PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 128 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 "Text Output" -1 6 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 2 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 "Bulle t Item" -1 15 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 15 2 }{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 }{PSTYLE "Normal" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {PARA 3 "" 0 "" {TEXT -1 49 "A Taylor series method for solvin g 2nd order DE's" }}{PARA 0 "" 0 "" {TEXT -1 37 "by Peter Stone, Nanai mo, B.C., Canada" }}{PARA 0 "" 0 "" {TEXT -1 20 "Version: 10.10.2007 " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 5 "load " }{TEXT 0 7 "desolve" } {TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 17 "The Maple m-file " } {TEXT 272 7 "DEsol.m" }{TEXT -1 32 " is required by this worksheet. " }}{PARA 0 "" 0 "" {TEXT -1 121 "It can be read into a Maple session by a command similar to the one that follows, where the file path gives \+ its location." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "read \"K:\\ \\Maple/procdrs/DEsol.m\";" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 45 "load root-finding procedures etc. includi ng: " }{TEXT 0 14 "secant,findmin" }}{PARA 0 "" 0 "" {TEXT -1 17 "The \+ Maple m-file " }{TEXT 272 7 "roots.m" }{TEXT -1 38 " contains the code for the procedures " }{TEXT 0 6 "secant" }{TEXT -1 5 " and " }{TEXT 0 7 "findmin" }{TEXT -1 25 " used in this worksheet. " }}{PARA 0 "" 0 "" {TEXT -1 121 "It can be read into a Maple session by a command simi lar to the one that follows, where the file path gives its location." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "read \"K:\\\\Maple/procdrs /roots.m\";" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{SECT 1 {PARA 4 "" 0 " " {TEXT -1 69 "The Taylor series method for the numerical solution of \+ 2nd order DE's" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}} {PARA 0 "" 0 "" {TEXT -1 88 "We consider the numerical solution of a s econd order differential equation of the form: " }}{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "d^2*y/(d*x^2) = F(x,y,dy/dx);" "6#/*(% \"dG\"\"#%\"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"-%\"FG6%F+F'*&%#dyGF(%#dxGF, " }{TEXT -1 2 ". " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 53 "A typical example is a linear differential equation: " }} {PARA 256 "" 0 "" {XPPEDIT 18 0 "d^2*y/(d*x^2)+f(x);" "6#,&*(%\"dG\"\" #%\"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"F(-%\"fG6#F+F(" }{TEXT -1 1 " " } {XPPEDIT 18 0 "dy/dx+g(x)*y = k(x);" "6#/,&*&%#dyG\"\"\"%#dxG!\"\"F'*& -%\"gG6#%\"xGF'%\"yGF'F'-%\"kG6#F." }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 5 "Let " }{XPPEDIT 18 0 "dy/dx = u;" "6#/*&%#dyG\"\"\"%#dxG! \"\"%\"uG" }{TEXT -1 5 " so " }{XPPEDIT 18 0 "d^2*y/(d*x^2) = F(x,y,u );" "6#/*(%\"dG\"\"#%\"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"-%\"FG6%F+F'%\"uG " }{TEXT -1 2 ".\n" }}{PARA 0 "" 0 "" {TEXT -1 15 "Suppose that y(" } {XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{TEXT -1 4 ") = " }{XPPEDIT 18 0 "y[0];" "6#&%\"yG6#\"\"!" }{TEXT -1 7 " and u(" }{XPPEDIT 18 0 "x [0];" "6#&%\"xG6#\"\"!" }{TEXT -1 4 ") = " }{XPPEDIT 18 0 "u[0];" "6#& %\"uG6#\"\"!" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 31 "We have t he two Taylor series: " }}{PARA 256 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "y(x[0]+h)=y(x[0])+`y '`(x[0])*h+`y ''`(x[0])" "6#/-%\"yG6#,&&%\" xG6#\"\"!\"\"\"%\"hGF,,(-F%6#&F)6#F+F,*&-%$y~'G6#&F)6#F+F,F-F,F,-%%y~' 'G6#&F)6#F+F," }{TEXT -1 1 " " }{XPPEDIT 18 0 "h^2/2!+`y '''`(x[0])" " 6#,&*&%\"hG\"\"#-%*factorialG6#F&!\"\"\"\"\"-%&y~'''G6#&%\"xG6#\"\"!F+ " }{TEXT -1 1 " " }{XPPEDIT 18 0 "h^3/3!+` . . . `" "6#,&*&%\"hG\"\"$- %*factorialG6#F&!\"\"\"\"\"%(~.~.~.~GF+" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 " u(x[0]+h) = u(x[0])+`u '`(x[0])*h+`u ''`(x[0]);" "6#/-%\"uG6#,&&%\"xG6 #\"\"!\"\"\"%\"hGF,,(-F%6#&F)6#F+F,*&-%$u~'G6#&F)6#F+F,F-F,F,-%%u~''G6 #&F)6#F+F," }{TEXT -1 1 " " }{XPPEDIT 18 0 "h^2/2!+`u '''`(x[0]);" "6# ,&*&%\"hG\"\"#-%*factorialG6#F&!\"\"\"\"\"-%&u~'''G6#&%\"xG6#\"\"!F+" }{TEXT -1 1 " " }{XPPEDIT 18 0 "h^3/3!+` . . . `" "6#,&*&%\"hG\"\"$-%* factorialG6#F&!\"\"\"\"\"%(~.~.~.~GF+" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 11 "Note that " } {XPPEDIT 18 0 "`@@`(u,n);" "6#-%#@@G6$%\"uG%\"nG" }{XPPEDIT 18 0 "``(x [0]) = `@@`(y,n+1);" "6#/-%!G6#&%\"xG6#\"\"!-%#@@G6$%\"yG,&%\"nG\"\"\" F1F1" }{XPPEDIT 18 0 "``(x[0]);" "6#-%!G6#&%\"xG6#\"\"!" }{TEXT -1 6 " for " }{XPPEDIT 18 0 "0 <= n;" "6#1\"\"!%\"nG" }{TEXT -1 1 "." }} {PARA 0 "" 0 "" {TEXT -1 8 " \nUsing " }{TEXT 265 47 "the chain rule f or functions of three variables" }{TEXT -1 19 " gives the formula:" }} {PARA 256 "" 0 "" {TEXT -1 3 " " }{XPPEDIT 18 0 "d/dx;" "6#*&%\"dG\" \"\"%#dxG!\"\"" }{TEXT -1 1 " " }{XPPEDIT 18 0 "F(x,y,u) = diff(F(x,y, u),x)+diff(F(x,y,u),y)*u+diff(F(x,y,u),u)*F(x,y,u);" "6#/-%\"FG6%%\"xG %\"yG%\"uG,(-%%diffG6$-F%6%F'F(F)F'\"\"\"*&-F,6$-F%6%F'F(F)F(F0F)F0F0* &-F,6$-F%6%F'F(F)F)F0-F%6%F'F(F)F0F0" }{TEXT -1 2 " " }}{PARA 256 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "`` = F[x](x,y,u)+F[y](x,y,u)*u+F[u](x,y,u)*F(x,y,u);" "6#/%!G,(-&%\"F G6#%\"xG6%F*%\"yG%\"uG\"\"\"*&-&F(6#F,6%F*F,F-F.F-F.F.*&-&F(6#F-6%F*F, F-F.-F(6%F*F,F-F.F." }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 45 "This formula involves the partial deriva tves:" }}{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "diff(F(x,y, u),x) = F[x](x,y,u);" "6#/-%%diffG6$-%\"FG6%%\"xG%\"yG%\"uGF*-&F(6#F*6 %F*F+F," }{TEXT -1 3 ", " }{XPPEDIT 18 0 "diff(F(x,y,u),y) = F[y](x,y ,u);" "6#/-%%diffG6$-%\"FG6%%\"xG%\"yG%\"uGF+-&F(6#F+6%F*F+F," }{TEXT -1 5 " and " }{XPPEDIT 18 0 "diff(F(x,y,u),u) = F[u](x,y,u);" "6#/-%%d iffG6$-%\"FG6%%\"xG%\"yG%\"uGF,-&F(6#F,6%F*F+F," }{TEXT -1 1 "." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 22 "For the e xample, let " }{XPPEDIT 18 0 "F(x,y,u) = x^3*u+sin(y);" "6#/-%\"FG6%% \"xG%\"yG%\"uG,&*&F'\"\"$F)\"\"\"F--%$sinG6#F(F-" }{TEXT -1 59 ". This expression gives the 2nd derivative of the solution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 125 "F := (x, y,u) -> x^3*u+sin(y);\ndiff(F(x,y,u),x)+diff(F(x,y,u),y)*u+diff(F(x,y, u),u)*F(x,y,u):\nG := unapply(simplify(%),x,y,u);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"FGf*6%%\"xG%\"yG%\"uG6\"6$%)operatorG%&arrowGF*,&*& )9$\"\"$\"\"\"9&F3F3-%$sinG6#9%F3F*F*F*" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"GGf*6%%\"xG%\"yG%\"uG6\"6$%)operatorG%&arrowGF*,**&)9$\"\"# \"\"\"9&F3\"\"$*&-%$cosG6#9%F3F4F3F3*&)F1\"\"'F3F4F3F3*&)F1F5F3-%$sinG F9F3F3F*F*F*" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 43 "Thus the 3rd derivative of the solution is " }{XPPEDIT 18 0 "3*x^2*u+cos(y)*u+x^6*u+x^3*sin(y);" "6#,**(\"\"$\"\"\"*$%\"xG\" \"#F&%\"uGF&F&*&-%$cosG6#%\"yGF&F*F&F&*&F(\"\"'F*F&F&*&F(F%-%$sinG6#F/ F&F&" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 63 "Higher derivatives can then be calculated in a similar \+ fashion." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 95 "diff(G(x,y,u),x)+diff(G(x,y,u),y)*u+diff(G(x,y,u),u)* F(x,y,u):\nH := unapply(simplify(%),x,y,u);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"HGf*6%%\"xG%\"yG%\"uG6\"6$%)operatorG%&arrowGF*,2*& 9$\"\"\"9&F1\"\"'*&)F0\"\"&F1F2F1\"\"**&)F0\"\"#F1-%$sinG6#9%F1F3*&F;F 1)F2F:F1!\"\"*(F2F1)F0\"\"$F1-%$cosGF=F1F:*&FEF1F;F1F1*&)F0F7F1F2F1F1* &)F0F3F1F;F1F1F*F*F*" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 121 "These derivatives can be evaluated at each step, and \+ used in the two Taylor series to provide estimates of the values of " }{XPPEDIT 18 0 "y(x[0]+h);" "6#-%\"yG6#,&&%\"xG6#\"\"!\"\"\"%\"hGF+" } {TEXT -1 5 " and " }{XPPEDIT 18 0 "u(x[0]+h);" "6#-%\"uG6#,&&%\"xG6#\" \"!\"\"\"%\"hGF+" }{TEXT -1 24 " at the end of the step." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}} }{SECT 1 {PARA 4 "" 0 "" {TEXT -1 40 "A utility routine for comparing \+ values: " }{TEXT 0 14 "comparewithfcn" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 64 "This utility routine is required by e xamples in a later section." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 21 "comparewithfcn: usage" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 282 18 "Calling Sequence:\n" }}{PARA 0 "" 0 "" {TEXT 283 2 " " }{TEXT -1 36 " comparewithfcn( pts, f ,opti ons )" }}{PARA 0 "" 0 "" {TEXT -1 44 " comparewithfcn( pts, fx, x \+ , options ) " }{TEXT 285 1 "\n" }{TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 11 "Parameters:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 0 "" }{TEXT 23 17 " pts - " }{TEXT 286 18 "a list of points " }{XPPEDIT 18 0 "[[x[1], y[1]], [x[2], y[2]] .. [x[n ], y[n]]];" "6#7$7$&%\"xG6#\"\"\"&%\"yG6#F(;7$&F&6#\"\"#&F*6#F07$&F&6# %\"nG&F*6#F6" }{TEXT 287 1 "." }}{PARA 0 "" 0 "" {TEXT -1 5 " " }} {PARA 0 "" 0 "" {TEXT 23 15 " f or fx - " }{TEXT -1 87 " a func tion of one variable or an expression fx defining a function of one va riable." }}{PARA 0 "" 0 "" {TEXT -1 6 " " }}{PARA 0 "" 0 "" {TEXT 23 17 " x - " }{TEXT 284 65 "the independent variabl e is required when the 2nd argument is an " }{TEXT -1 10 "expression" }{TEXT 288 4 " fx." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 23 3 " " }{TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 12 "Description:" }}{PARA 0 "" 0 "" {TEXT -1 14 "The procedure " }{TEXT 0 14 "comparewithfcn" } {TEXT -1 78 " tabulates the list of points vertically as the first two columns of a matrix." }}{PARA 0 "" 0 "" {TEXT -1 263 "The values of t he 2nd components are compared with the values obtained by applying th e given function to the corresponding 1st components, and listing thes e \"exact values\" in the 3rd column of the matrix. The absolute or re lative error is given in the 4th column." }}{PARA 0 "" 0 "" {TEXT -1 68 "Alternatively, the same information can be printed out line by lin e." }}{PARA 0 "" 0 "" {TEXT -1 128 "The maximum of the absolute or rel ative errors is given. When the absolute error is tabulated, the mean \+ absolute error is given." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 8 "Options:" }}{PARA 0 "" 0 "" {TEXT -1 22 "mode=line byline/matrix" }}{PARA 0 "" 0 "" {TEXT -1 106 "With the option \"mode= linebyline\" the information is printed out line by line. This is the \+ default option." }}{PARA 0 "" 0 "" {TEXT -1 112 "With the option \"mod e=matrix\" the tabulated information is given in a matrix as a return \+ value of the procedure." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 25 "errtype=relative/absolute" }}{PARA 0 "" 0 "" {TEXT -1 152 "This option determines whether the absolute or relative error \+ is given. The default is \"errtype=relative\" in which case the relati ve error is tabulated." }}{PARA 0 "" 0 "" {TEXT -1 73 "\"errtype=RELAT IVE\" and \"errtype=REL\" are equivalent to \"errtype=relative\"" }} {PARA 0 "" 0 "" {TEXT -1 75 "\"errtype=ABSOLUTE\" and \"errtype=ABS\" are equivalent to \"errtype=absolute\"." }}{PARA 0 "" 0 "" {TEXT -1 43 "\"errtype\" can also be typed as \"errortype\"." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 281 4 "Note" }{TEXT -1 77 ": I f the true value of the function is zero, the relative error is infini te. " }}{PARA 0 "" 0 "" {TEXT -1 113 "The maximum relative error is co mputed for the remaining relative errors, ignoring any infinite relati ve errors. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 281 15 "How to activate" }{TEXT -1 1 " :" }{TEXT 268 1 "\n" }{TEXT -1 154 "To make the procedure active open \+ the subsection, place the cursor anywhere after the prompt [ > and pr ess [Enter].\nYou can then close up the subsection." }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 30 "comparewithfcn: implementation" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "comparewithfcn" {MPLTEXT 1 0 6095 "comparewithfcn := proc(pts,f)\n local xx,y1,y2,r,i,j,n,rows, fn,x,prec,prcsn,saveDigits,\n startoptions,Options,md,t,maxerr,forma t1,format2,g,e,zero,\n proctype,ertyp,xmax,prec1,prec2,vars,averr;\n \n proctype := false;\n if nargs<2 then\n error \"invalid arg uments; the basic syntax is 'comparewithfcn([[x1,y1],..,[xn,yn]],f(x), x)' or 'comparewithfcn([[x1,y1],..,[xn,yn]],f)'\"\n end if;\n if n ot type(pts,listlist) then\n error \"the 1st argument, %1, is inv alid .. it should be a list of points\",pts;\n end if;\n if nargs> 2 and not type(args[3],equation) then\n x := args[3];\n if n ot type(x,name) then\n error \"the 3rd optional argument must \+ be the name of the independent variable\"\n end if;\n starto ptions := 4;\n vars := indets(f,name) minus indets(f,realcons);\n if vars<>\{x\} then \n if not type(f,algebraic) or not h as(indets(f),\{Int,Sum\}) then\n error \"the 2nd argument, \+ %1, is invalid .. it should be an expression which depends only on the single variable %2\",f,x;\n end if;\n end if;\n else\n if type(f,procedure) or (type(f,`@`) and type(\{op(f)\},set(proc edure))) then\n proctype := true;\n startoptions := 3; \n else\n error \"the 2nd argument, %1, is invalid .. it \+ should be a function of one variable or an expression in the one varia ble given as a 3rd argument\",f;\n end if;\n end if; \n\n # Get the options.\n md := 0;\n ertyp := 1;\n if nargs>=startopti ons then\n Options :=[args[startoptions..nargs]];\n if not t ype(Options,list(equation)) then\n error \"each optional argum ent must be an equation\"\n end if;\n if hasoption(Options,' mode','md','Options') then\n if not (md='linebyline' or md='ma trix') then\n error \"\\\"mode\\\" must be 'matrix' or 'lin ebyline'\"\n end if;\n if md='linebyline' then md := 0 else md := 1 end if;\n end if;\n if hasoption(Options,'errt ype','ertyp','Options') or \n hasoption(Options,'errortype','e rtyp','Options') then\n if not member(ertyp,\{'absolute','ABSO LUTE','ABS','relative','RELATIVE','REL'\}) then\n error \" \\\"errtype\\\" option must be 'absolute' <-> 'ABSOLUTE' <-> 'ABS' or \+ 'relative' <-> 'RELATIVE' <-> 'REL'\"\n end if;\n if m ember(ertyp,\{'absolute','ABSOLUTE','ABS'\})\n then ertyp := 0 else ertyp := 1 end if;\n end if;\n if nops(Options)>0 then \n error \"%1 is not a valid option for %2\",op(1,Options), pr ocname;\n end if;\n end if;\n n := nops(pts);\n prcsn := 0; \n\n # Check the data and find its maximum precision.\n for i to n do\n if nops(pts[i])<>2 then\n error \"the 1st argument \+ must be a list of points, where each point is itself a list with two m embers\"\n end if;\n t := pts[i,1];\n if type(t,float) \+ and type(t,numeric) then\n prec1 := length(convert(op(1,t),str ing));\n elif type(t,realcons) then\n prec1 := Digits;\n \+ else\n error \"the 1st argument must be a list of points, where each point is itself a list of two real numbers\"\n end if ;\n t := pts[i,2];\n if type(t,float) and type(t,numeric) th en\n prec2 := length(op(1,t));\n elif type(t,realcons) th en\n prec2 := Digits;\n else\n error \"the 1st ar gument must be a list of points, where each point is itself a list of \+ two real numbers\"\n end if;\n prec := max(prec1,prec2);\n \+ if prec>prcsn then prcsn := prec end if;\n end do;\n saveDigit s := Digits;\n Digits := prcsn;\n prec := trunc(prcsn/2);\n \n \+ if proctype then\n fn := f;\n else\n fn := unapply(evalf( f),x);\n end if;\n rows := NULL;\n maxerr := 0;\n averr := 0; \n zero := false;\n format1 := cat(\"%\",convert(prcsn+5,string), \".\",convert(prcsn,string),g);\n format2 := cat(\"%\",convert(prec+ 4,string),\".\",convert(prec-1,string),e);\n\n for i from 1 to n do \n xx := evalf(pts[i,1]);\n y1 := evalf(pts[i,2]);\n y2 := traperror(evalf(fn(xx)));\n if y2=lasterror or not type(y2,nu meric) then\n error \"function failed to evaluate to a real fl oating point number at %1\",xx;\n end if;\n \n if ertyp =0 then\n r := evalf(abs(y1-y2));\n averr := averr+r; \n if r>maxerr then\n maxerr := r;\n xma x := xx;\n end if;\n else\n if y2<>0 then\n \+ r := evalf(abs(y1-y2)/abs(y2));\n if r>maxerr then\n \+ maxerr := r;\n xmax := xx;\n en d if;\n else\n zero := true;\n r := infi nity;\n end if;\n end if;\n\n if md=0 then\n \+ printf(format1,xx);\n printf(` `);\n printf(format1,y 1);\n printf(` function val: `);\n printf(format1,y2 );\n if ertyp=0 then\n printf(` abs err: `);\n \+ printf(format2,r);\n else\n printf(` \+ rel err: `);\n if y2<>0 then\n printf(format 2,r)\n else\n printf(infinity);\n \+ end if;\n end if;\n printf(`\\n`);\n else\n \+ rows := rows,[xx,y1,y2,r];\n end if;\n end do;\n \n prin t(``);\n if ertyp=0 then\n printf(` Maximum absolu te error: `);\n else\n printf(` Maximum relative e rror: `); \n end if;\n printf(format2,maxerr);\n\n if maxer r<>0 then\n printf(`\\n obtained for the input value : `);\n printf(format1,xmax);\n end if;\n \n if ertyp=1 and zero then\n printf(`\\n excluding any cases where t he function value is zero.`);\n end if;\n\n if ertyp=0 then\n \+ averr := averr/n;\n print(``);\n printf(` Mean absolute error: `);\n printf(format2,averr); \n end if;\n\n Digits := saveDigits;\n if md=1 then\n print(``);\n if \+ ertyp=0 then\n return array([[x,\"discrete value\",\"function \+ value\",\"absolute err\"],rows]);\n else\n return array([ [x,\"discrete value\",\"function value\",\"relative err\"],rows]);\n \+ end if;\n else\n return NULL;\n end if;\nend proc:" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 34 "Examples appear in a later section" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }}{SECT 1 {PARA 4 "" 0 "" {TEXT 0 9 "desolveT2" }{TEXT -1 12 ": basic \+ idea" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{PARA 0 "" 0 " " {TEXT -1 115 "The procedure in the next section constructs a numeric al solution for a 2nd order differential equation of the form" }} {PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "d^2*y/(d*x^2) = F(x, y,dy/dx);" "6#/*(%\"dG\"\"#%\"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"-%\"FG6%F+ F'*&%#dyGF(%#dxGF," }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 54 "by \+ using the Taylor series method of prescribed order " }{TEXT 269 1 "n" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 2 " " }}{PARA 0 "" 0 "" {TEXT -1 47 "The numerical solution can be in the form of a " }{TEXT 265 18 "sequence of points" }{TEXT -1 96 " along the solution curve, w hich are equally spaced horizontally, or it can be in the form of a " }{TEXT 265 27 "function of a real variable" }{TEXT -1 99 " which can i nterpolate between the pre-computed points by using an approximate loc al Taylor series." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 197 "Computer algebra systems such as Maple and Mathematica, \+ which allow automatic computation of derivatives, and and the high spe ed of current processors now make this a reasonable method to use when " }{TEXT 265 13 "high accuracy" }{TEXT 258 1 " " }{TEXT -1 11 "is des ired." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 21 " The step-size can be " }{TEXT 265 5 "fixed" }{TEXT -1 4 " or " }{TEXT 265 8 "variable" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 62 "When a variable step-size is used, the error in using an order" }{XPPEDIT 18 0 " ``(n-1)" "6#-%!G6#,&%\"nG\"\"\"F(!\"\"" }{TEXT -1 83 " Taylor s eries for a particular step is approximated by the last term of the or der " }{TEXT 270 1 "n" }{TEXT -1 204 " Taylor series. \nIf the error i s too large for a particular step, a smaller step is taken instead, an d if the error is smaller than required, the step-size is increased f or the next step. This is called " }{TEXT 265 26 "adaptive step-size c ontrol" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 53 "The actual valu e returned is that given by the order " }{TEXT 279 1 "n" }{TEXT -1 71 " Taylor series, even though the error estimates used are for the orde r " }{XPPEDIT 18 0 "``(n-1)" "6#-%!G6#,&%\"nG\"\"\"F(!\"\"" }{TEXT -1 15 " Taylor series." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 66 "A procedure for solving 2nd order DE's by a Tay lor series method: " }{TEXT 0 10 "desolveT2 " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 16 "desolveT2: usage" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 259 18 "Calling S equence:\n" }}{PARA 0 "" 0 "" {TEXT 260 2 " " }{TEXT -1 30 " desolv eT2( \{de, ic\}, rng )" }}{PARA 0 "" 0 "" {TEXT -1 38 " desolveT2 ( \{de, ic\}, y(x), rng )" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT -1 11 "Parameters:" }}{PARA 0 "" 0 "" {TEXT -1 4 " \+ " }}{PARA 0 "" 0 "" {TEXT 23 10 " de - " }{TEXT -1 91 " a 2n d order differential equation with the derivatives given in the form d iff(y(x),x)," }}{PARA 0 "" 0 "" {TEXT -1 94 " ( if x and y are the independent and dependent variables respectively). " }}{PARA 0 "" 0 "" {TEXT -1 58 " A typical ex ample is a linear DE:" }}{PARA 0 "" 0 "" {TEXT -1 89 " \+ diff(y(x),x$2) + f(x)*diff(y(x),x) + g(x)*y(x) = k (x)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } {TEXT 23 10 " ic - " }{TEXT -1 37 " initial coditions of the f orm y(" }{XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{TEXT -1 4 ") = " } {XPPEDIT 18 0 "y[0];" "6#&%\"yG6#\"\"!" }{TEXT -1 8 ", D(y)(" } {XPPEDIT 18 0 "x[0];" "6#&%\"xG6#\"\"!" }{TEXT -1 3 ")= " }{XPPEDIT 18 0 "u[0];" "6#&%\"uG6#\"\"!" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 7 " " }{TEXT 23 8 "rng \+ - " }{TEXT -1 83 " a range of values containing the initial value x 0 of the dependent variable. " }}{PARA 0 "" 0 "" {TEXT -1 9 " \+ " }}{PARA 257 "" 0 "" {TEXT -1 12 "Description:" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 12 "The routine " }{TEXT 0 10 "desolveT2 " }{TEXT -1 54 "gives a numerical solution to an initial value problem" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "d^2*y/(d*x^2) = F(x,y,dy/dx);" "6#/*(% \"dG\"\"#%\"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"-%\"FG6%F+F'*&%#dyGF(%#dxGF, " }{TEXT -1 23 ", y(a) = b, y '(a) = c," }}{PARA 0 "" 0 "" {TEXT -1 26 "by a Taylor series method." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 63 "A typical example is a linear differentia l equation of the form" }}{PARA 256 "" 0 "" {XPPEDIT 18 0 "d^2*y/(d*x^ 2)+f(x);" "6#,&*(%\"dG\"\"#%\"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"F(-%\"fG6# F+F(" }{TEXT -1 1 " " }{XPPEDIT 18 0 "dy/dx+g(x)*y = k(x);" "6#/,&*&%# dyG\"\"\"%#dxG!\"\"F'*&-%\"gG6#%\"xGF'%\"yGF'F'-%\"kG6#F." }{TEXT -1 24 " , y(a) = b, y '(a) = c." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 55 "Both discrete and continuous solutions can be o btained." }}{PARA 0 "" 0 "" {TEXT -1 97 "This solution is in the form \+ of procedure which can be evaluated throughout the specified range. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 261 8 "Options :" }{TEXT -1 1 "\n" }}{PARA 0 "" 0 "" {TEXT 267 46 "Options for both f ixed and variable step-size:" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 23 "stepsize=fixed/variable" }} {PARA 0 "" 0 "" {TEXT -1 109 "With the option \"stepsize=fixed\", equa lly spaced x values are used in construction of the numerical solution ." }}{PARA 0 "" 0 "" {TEXT -1 101 "With the option \"stepsize=variabl e\", the stepsize is controlled by estmating the error at each step." }}{PARA 0 "" 0 "" {TEXT -1 42 "The default option is \"stepsize=variab le\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 7 "o rder=n" }}{PARA 0 "" 0 "" {TEXT -1 38 "The order of the Taylor series \+ method." }}{PARA 0 "" 0 "" {TEXT -1 112 "The default is \"order =min(D igits,15+trunc(abs(Digits-15)^.9))\", which is equal to, or a bit less than,\"Digits\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 34 "info=0, 1, 2, 3 , 4, true or false" }}{PARA 0 "" 0 "" {TEXT -1 116 "With the option \"info=false\" or \"info=0\" no informat ion is printed during the computation of the numerical solution." }} {PARA 0 "" 0 "" {TEXT -1 665 "With the option \"info=1\" the formulas \+ for the various derivatives to be used is printed, and, in the case of variable step-size, the total number of steps is printed.\nWith the o ption \"info=2\", information concerning intermediate steps is printed as the values are computed, and, in the case of variable step-size, t he total number of steps is printed.\nWith the option \"info=3\", the \+ information of both the previous two cases is printed, including the f ormulas for the derivatives and values for intermediate steps.\nWith t he option \"info=4\", the total number of steps used for the case of v ariable step-size is the only printout.\n\"info=true\" is the same as \+ \"info=2\"." }}{PARA 0 "" 0 "" {TEXT -1 28 "The default is \"info=fals e\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "o utput=points/derivpts/points_pair/localtaylor/derivtaylor/taylor_pair " }}{PARA 15 "" 0 "" {TEXT -1 33 "With the option \"output=points\", \+ " }{TEXT 0 9 "desolveT2" }{TEXT -1 11 " returns a " }{TEXT 265 22 "dis crete set of points" }{TEXT -1 72 " corresponding to the steps origina lly computed by the adaptive process." }}{PARA 15 "" 0 "" {TEXT -1 35 "With the option \"output=derivpts\", " }{TEXT 0 9 "desolveT2" }{TEXT -1 11 " returns a" }{TEXT 258 1 " " }{TEXT 265 23 "discrete sets of p oints" }{TEXT -1 78 " for the derivative of the solution. \nAlternativ e: \"output=derivative_points\"." }}{PARA 15 "" 0 "" {TEXT -1 38 "With the option \"output=localtaylor\", " }{TEXT 0 9 "desolveT2" }{TEXT -1 36 " returns a continuous solution as a " }{TEXT 265 19 "numerical \+ procedure" }{TEXT -1 125 " which uses local Taylor series to interpola te between the points of the discrete solution. Alternative: \"output= procedure\". " }}{PARA 15 "" 0 "" {TEXT -1 38 "With the option \"outpu t=derivtaylor\", " }{TEXT 0 9 "desolveT2" }{TEXT -1 11 " returns a " } {TEXT 265 19 "numerical procedure" }{TEXT -1 86 " for the derivative o f the solution, which uses local Taylor series for interpolation." }} {PARA 15 "" 0 "" {TEXT -1 38 "With the option \"output=points_pair\", \+ " }{TEXT 0 9 "desolveT2" }{TEXT -1 11 " returns a " }{TEXT 265 4 "pair " }{TEXT -1 4 " of " }{TEXT 265 22 "discrete set of points" }{TEXT -1 77 " for both the solution and its derivative, which are computed simu ltaneously." }}{PARA 15 "" 0 "" {TEXT -1 38 "With the option \"output= taylor_pair\", " }{TEXT 0 9 "desolveT2" }{TEXT -1 11 " returns a " } {TEXT 265 4 "pair" }{TEXT -1 4 " of " }{TEXT 265 19 "numerical functio ns" }{TEXT -1 140 " for both the solution and its derivative, which ar e constructed simultaneously. \nAlternatives: \"output=procedure_pair \", \"output=proc_pair\"." }}{PARA 0 "" 0 "" {TEXT -1 43 "The default \+ option is \"output=localtaylor\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 273 33 "Options for fixed step-size only:" } {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 7 "steps=n" }}{PARA 0 "" 0 "" {TEXT -1 103 "The number of steps to \+ be used for with the option \"stepsize=fixed\". The default number of \+ steps is 20." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 274 41 "Options for both variable step-size only:" } {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 8 "hstart=h" }}{PARA 0 "" 0 "" {TEXT -1 68 "The step-size for the f irst trial step. The default is \"hstart=0.1*" }{XPPEDIT 18 0 "10^cei l(-Digits/10);" "6#)\"#5-%%ceilG6#,$*&%'DigitsG\"\"\"F$!\"\"F," } {TEXT -1 2 "\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 6 "hmax=h" }}{PARA 0 "" 0 "" {TEXT -1 56 "The maximum step-si ze. The default is \"hmax=order*0.05\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 60 "hmin=h\nThe minimum step-size. The d efault is \"hmin=min(0.5*" }{XPPEDIT 18 0 "10^(-5);" "6#)\"#5,$\"\"&! \"\"" }{TEXT -1 2 ", " }{XPPEDIT 18 0 "hstart/2000;" "6#*&%'hstartG\" \"\"\"%+?!\"\"" }{TEXT -1 3 ")\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 265 4 "Note" }{TEXT -1 40 ": hstart must lie bet ween hmin and hmax." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 10 "maxsteps=n" }}{PARA 0 "" 0 "" {TEXT -1 188 "The maximum number of steps to be used. An error message results if the maximum n umber of steps is reached before reaching the end of the solution inte rval. The default is \"maxsteps=2000\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 10 "tolerance=" }{XPPEDIT 18 0 "epsilon " "6#%(epsilonG" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 166 "When \+ the error control option is set to \"relativeerror\", the step size is chosen adaptively to try to ensure that the relative error for each s tep is no greater than " }{XPPEDIT 18 0 "epsilon;" "6#%(epsilonG" } {TEXT -1 34 ". Other error control options use " }{XPPEDIT 18 0 "epsil on;" "6#%(epsilonG" }{TEXT -1 106 " in an appropriate way. See \"error control\" for more information. The default is \"tolerance=10^(-Digits )\".\n" }}{PARA 0 "" 0 "" {TEXT -1 48 "errorcontrol=auto/absolute/rela tive/accumulative" }}{PARA 0 "" 0 "" {TEXT -1 37 "For the current sett ing of tolerance=" }{XPPEDIT 18 0 "epsilon" "6#%(epsilonG" }{TEXT -1 72 ", the step size is chosen to try to ensure that when \"errorcontro l\" is:" }}{PARA 15 "" 0 "" {TEXT 262 4 "auto" }{TEXT -1 8 " - \+ " }{XPPEDIT 18 0 "abs(y-y[k]) <= epsilon*max(abs(y[k]),abs(u[k]*h),tin y);" "6#1-%$absG6#,&%\"yG\"\"\"&F(6#%\"kG!\"\"*&%(epsilonGF)-%$maxG6%- F%6#&F(6#F,-F%6#*&&%\"uG6#F,F)%\"hGF)%%tinyGF)" }{TEXT -1 9 " , where \+ " }{XPPEDIT 18 0 "u[k];" "6#&%\"uG6#%\"kG" }{TEXT -1 37 " is the value of the derivative when " }{XPPEDIT 18 0 "x = x[k];" "6#/%\"xG&F$6#%\" kG" }{TEXT -1 1 "." }}{PARA 15 "" 0 "" {TEXT 280 8 "absolute" }{TEXT -1 8 " - " }{XPPEDIT 18 0 "abs(y-y[k]) <= epsilon*abs(max(y[max], tiny));" "6#1-%$absG6#,&%\"yG\"\"\"&F(6#%\"kG!\"\"*&%(epsilonGF)-F%6#- %$maxG6$&F(6#F3%%tinyGF)" }{TEXT -1 9 " , where " }{XPPEDIT 18 0 "y[ma x];" "6#&%\"yG6#%$maxG" }{TEXT -1 213 " is updated as the computation \+ progresses, with an initial estimate provided by the option \"maxvalue \" if desired.\nThis error control option would be an appropriate choi ce if the solution is oscillatory in nature.\n" }}{PARA 15 "" 0 "" {TEXT 263 8 "relative" }{TEXT -1 9 " - " }{XPPEDIT 18 0 "abs(y-y [k]) <= epsilon*max(abs(y[k]),tiny);" "6#1-%$absG6#,&%\"yG\"\"\"&F(6#% \"kG!\"\"*&%(epsilonGF)-%$maxG6$-F%6#&F(6#F,%%tinyGF)" }{TEXT -1 170 " \nThis is a general purpose choice except that problems would arise \+ if y is close to 0. If this is likely to happen it would be better to \+ use the default option \"auto\".\n" }}{PARA 15 "" 0 "" {TEXT 264 12 "a ccumulative" }{TEXT -1 8 " - " }{XPPEDIT 18 0 "abs(y-y[k]) <= eps ilon*max(abs(u[k]*h),tiny);" "6#1-%$absG6#,&%\"yG\"\"\"&F(6#%\"kG!\"\" *&%(epsilonGF)-%$maxG6$-F%6#*&&%\"uG6#F,F)%\"hGF)%%tinyGF)" }{TEXT -1 9 " , where " }{XPPEDIT 18 0 "u[k];" "6#&%\"uG6#%\"kG" }{TEXT -1 37 " \+ is the value of the derivative when " }{XPPEDIT 18 0 "x = x[k];" "6#/% \"xG&F$6#%\"kG" }{TEXT -1 94 ".\nThis is the most stringent error cont rol option, which attempts to control the global error." }}{PARA 0 "" 0 "" {TEXT -1 10 "\"tiny\" is " }{XPPEDIT 18 0 "10^(-3*Digits);" "6#) \"#5,$*&\"\"$\"\"\"%'DigitsGF(!\"\"" }{TEXT -1 60 ", and is included t o avoid the possibility of division by 0." }}{PARA 0 "" 0 "" {TEXT -1 35 "The default is \"errorcontrol=auto\"." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 130 "In the cases \"output=derivpts/de rivtaylor\", the error in the derivative y '(x) is controlled by formu las analagous to those above." }}{PARA 0 "" 0 "" {TEXT -1 123 "In the \+ cases \"output=points_pair/taylor_pair\" both the solution and the der ivative must satisfy the appropriate criterion. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 10 "maxvalue=a" }}{PARA 0 "" 0 "" {TEXT -1 239 "This is used for the maximum magnitude of the solut ion in the case where the \"errorcontrol\" option has been set to \"ab solute\". See the option \"error control. If no value is provided the \+ maximum value is updated as the computation procedes." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 10 "maxderiv=a" }}{PARA 0 "" 0 "" {TEXT -1 258 "This is used for the maximum magnitude of the de rivative in the case where the \"errorcontrol\" option has been set to \"absolute\". See the option \"error control. If no value is provided the maximum value of the derivative is updated as the computation pro cedes" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT 265 16 "How to activate:" }{TEXT -1 155 "\nT o make the procedure active open the subsection, place the cursor anyw here after the prompt [ > and press [Enter].\nYou can then close up t he subsection." }}{PARA 0 "" 0 "" {TEXT 265 4 "Note" }{TEXT -1 40 ": B oth procedures must be activated for " }{TEXT 0 9 "desolveT2" }{TEXT -1 9 " to work." }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 25 "desolveT2: imp lementation" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 13536 "desolveT2 := proc() \n local ff,vars,derivs, x,yx,y,u,w,df,dff,Options,mthd,rg,\n dblrk,de,ic0,ic1,lsic,rsic,t 0,x0,y0,u0,x1,y1,t1,x2,x3,\n yx2,df1,df2,df3,diffs,stpsz,adptv,xx ,tt,rghtprt,lftprt,\n outpt,reverse,gw,gxyu,lftstps,rghtstps,stps ,i,\n lft,rght,rng,startopts,yy,ee,z,arg2OK,nvars,order;\n\nrever se := proc(lst::list)\n local n,i;\n n := nops(lst);\n [seq(lst[ n-i],i=0..n-2)];\nend proc:\n \ndblrk := proc(lft::realcons,rght::re alcons,x0::realcons,\n lftprc::procedure,rghtprc::procedure)\n \+ proc(x::realcons)\n local left,right,leftproc,rightproc,xx0,xx,s aveDigits;\n options `Copyright 2002 by Peter Stone`;\n \n \+ leftproc := lftprc;\n rightproc := rghtprc;\n \n saveDigi ts := Digits;\n Digits := max(trunc(evalhf(Digits)),Digits+5);\n \n xx0 := evalf(x0);\n left := evalf(lft);\n right := e valf(rght);\n xx := evalf(x);\n\n if xx<=right and xx>=xx0 t hen\n Digits := saveDigits;\n return rightproc(xx);\n \+ elif xx>=left and xx<=xx0 then\n Digits := saveDigits;\n \+ return leftproc(xx);\n else\n error \"argument mu st be between %1 and %2\",left,right; \n end if;\n end proc;\n end proc: # of dblrk\n\n\n # start of main procedure desolveT2\n i f nargs>0 then \n ff := args[1]\n else\n error \"at least \+ one argument must be supplied\"\n end if;\n if type(ff,\{set(equat ion),list(equation)\}) and nops(ff)=3 then\n ff := map(_u -> if h as(_u,D@@2) then convert(_u,diff) else _u end if,ff);\n de := op( 1,ff);\n ic0 := op(2,ff);\n ic1 := op(3,ff);\n if not h as(de,diff) then\n de := op(2,ff);\n ic0 := op(1,ff); \n end if;\n if not has(de,diff) then\n de := op(3,f f);\n ic1 := op(2,ff);\n end if;\n else\n error \" the 1st argument, %1, is invalid .. it should be a set (or list) of 3 \+ equations\",ff;\n end if;\n\n startopts := 3;\n if nargs>1 then \n ee := args[2];\n if type(ee,range) or type(ee,name=range) then\n rng := ee;\n else\n arg2OK := true;\n \+ if type(ee,function) and nops(ee)=1 then\n yy := op(0, ee);\n xx := op(1,ee);\n if type(xx,name) and ty pe(yy,name) then\n startopts := 4;\n if na rgs>2 then\n rng := args[3];\n else\n \+ error \"expecting a 3rd argument\"\n end if;\n else\n arg2OK := false;\n e nd if;\n else\n arg2OK := false;\n end if; \n if not arg2OK then\n error \"the 2nd argument, % 1, has incorrect form for the dependent variable\",ee; \n end if;\n end if;\n else\n error \"expecting a 2nd argument\" \n end if; \n\n # Check out the derivatives in the DE.\n derivs \+ := indets(de,'specfunc(anything,diff)');\n if derivs=\{\} then\n \+ error \"the 1st argument, %1, is invalid .. it should be a set (or l ist) containing a differential equation and two initial conditions\",f f;\n end if;\n nvars := nops(indets(derivs,name));\n if nvars<>1 then\n if nvars=0 then\n error \"there is a problem with the independent variable occurring in the derivative(s)\";\n els e\n error \"there should only be one independent variable in t he differential equation\"\n end if;\n end if;\n nvars := nop s(indets(derivs,anyfunc(name)));\n if nvars<>1 then\n if nvars= 0 then\n error \"there is a problem with the dependent variabl e occurring in the derivative(s)\"\n else\n error \"there should only be one dependent variable in the differential equation\" \n end if;\n end if;\n\n order := nops(derivs);\n if order= 1 then\n error \"the differential equation should have order 2\" \n elif order>2 then\n error \"there are too many derivatives \+ in the differential equation .. note that the differential equation sh ould have order 2\"\n end if;\n\n (df2,df1) := selectremove(_U->ha s([op(_U)],diff),derivs);\n if nops(df2)<>1 or nops(df1)<>1 then \n \+ error \"the derivatives, %1, do not make sense\",derivs;\n end \+ if; \n (df2,df1) := (op(df2),op(df1));\n\n # Get the arguments in \+ the derivatives.\n if type(df1,function) and op(0,df1)=diff and nops (df1)=2 then\n yx := op(1,df1);\n if not type(yx,anyfunc(nam e)) then\n error \"the 1st argument %1, in the derivative, %2, is invalid .. it should be the 'unknown' dependent variable\",yx,df1; \n end if; \n x := op(2,df1);\n if not type(x,name) the n\n error \"the 2nd argument %1, in the derivative, %2, is inv alid .. it should be the independent variable\",x,df1;\n end if; \+ \n else\n error \"the derivative, %1, does not make sense\",df1 ;\n end if;\n\n if type(df2,function) and nops(df2)=2 and op(0,df2 )='diff' then\n (df3,x3) := selectremove(has,\{op(df2)\},diff);\n if nops(df3)<>1 or nops(x3)<>1 then \n error \"the deriv ative, %1, does not make sense\",df2;\n end if;\n (df3,x3) : = (op(df3),op(x3));\n if type(df3,function) and nops(df3)=2 and o p(0,df3)='diff' then\n yx2 := op(1,df3);\n if not type (yx2,anyfunc(name)) then\n error \"the 1st argument %1, in \+ the derivative, %2, is invalid .. it should be the 'unknown' dependent variable\",yx2,df3;\n end if; \n x2 := op(2,df2);\n \+ if not type(x2,name) then\n error \"the 2nd argument %1, in the derivative, %2, is invalid .. it should be the independent variable\",x2,df3;\n end if; \n if not x2=x3 then\n \+ error \"the 2nd arguments, %1 and %2 in the derivatives %3 a nd %4 should be the same\",x2,x3,df2,df3;\n end if;\n els e\n error \"the derivative, %1, does not make sense\",df3;\n \+ end if\n else\n error \"the derivative, %1, does not make s ense\",df2;\n end if;\n\n # Arguments in the 2 derivatives must be the same.\n if x2<>x or yx2<>yx then\n error \"the differentia l equation contains inconsistent arguments\"\n end if;\n\n y := op (0,yx);\n vars := indets(de,name);\n if member(y,vars) then\n \+ error \"%1 and %2 cannot both appear in the differential equation\",y x,y;\n end if;\n if op(1,yx)<>x then\n error \"the derivative s do not make sense\"\n end if;\n\n # Isolate the 2nd derivative. \023\n gw := subs(yx=y,subs(diff(yx,x)=u,\n \+ subs(diff(yx,x$2)=w,de)));\n gxyu := expand(rhs(isolate(gw,w )));\n if indets(gxyu,'specfunc(anything,RootOf)')<>\{\} then\n \+ error \"cannot isolate the 2nd derivative\"\n end if;\n \n if s tartopts=4 then \n if x<>xx or y<>yy then\n error \"canno t solve the differential equation for %1\",ee;\n end if;\n end \+ if;\n\n # Get the initial conditions.\n lsic := lhs(ic0);\n if t ype(lsic,function) and op(0,lsic)=y and nops(lsic)=1 \n \+ and type(op(1,lsic),algebraic) then\n x0 := op(1,lsic) ;\n if not type(x0,realcons) or has(x0,infinity) then\n e rror \"initial condition value of independent variable must be a finit e real constant\"\n end if;\n y0 := rhs(ic0);\n t0 := 0 ; # flag for y coord or derivative\n if not type(y0,realcons) or \+ has(y0,infinity) then\n error \"initial condition value of dep endent variable must be a finite real constant\"\n end if;\n el if type(lsic,function) and op(0,lsic)=D(y) and nops(lsic)=1 \n \+ and type(op(1,lsic),algebraic) then\n x0 := op( 1,lsic);\n if not type(x0,realcons) or has(x0,infinity) then\n \+ error \"initial condition value of independent variable must be \+ a finite real constant\"\n end if;\n y0 := rhs(ic0);\n \+ t0 := 1; # flag for y coord or derivative\n if not type(y0,realco ns) or has(y0,infinity) then\n error \"initial condition value of derivative must be a finite real constant\"\n end if;\n els e\n error \"initial condition is not decipherable\"\n end if;\n \n lsic := lhs(ic1);\n if type(lsic,function) and op(0,lsic)=y and nops(lsic)=1 \n and type(op(1,lsic),algebrai c) then\n x1 := op(1,lsic);\n if not type(x1,realcons) or ha s(x1,infinity) then\n error \"initial condition value of indep endent variable must be a finite real constant\"\n end if;\n \+ y1 := rhs(ic1);\n t1 := 0; # flag for y coord or derivative\n \+ if not type(y1,realcons) or has(y1,infinity) then\n error \+ \"initial condition value of dependent variable must be a finite real \+ constant\"\n end if;\n elif type(lsic,function) and op(0,lsic)= D(y) and nops(lsic)=1 \n and type(op(1,lsic), algebraic) then\n x1 := op(1,lsic);\n if not type(x1,realcon s) or has(x1,infinity) then\n error \"initial condition value \+ of independent variable must be a finite real constant\"\n end if ;\n y1 := rhs(ic1);\n t1 := 1; # flag for y coord or derivat ive\n if not type(y1,realcons) or has(y1,infinity) then\n \+ error \"initial condition value of derivative must be a finite real c onstant\"\n end if;\n else\n error \"initial condition is \+ not decipherable\"\n end if;\n\n if t0=t1 or x0<>x1 then\n er ror \"initial conditions must supply a value and derivative at a singl e point\"\n end if;\n if t0=1 then u0 := y0; y0 := y1 else u0 := y 1 end if;\n\n if type(rng,equation) then\n z := op(1,rng);\n \+ if not type(z,name) or z<>x then\n error \"left side, %1, o f equation for solution range must be the independent variable\",x;\n \+ end if;\n rg := op(2,rng);\n else\n rg := rng;\n en d if;\n\n if not type(rg,realcons..realcons) or has(rg,infinity) the n\n error \"the range for the solution must have finite real end \+ values\"\n end if;\n \n lft := op(1,rg);\n rght := op(2,rg);\n \n if signum(rght-lft)=0 then\n error \"the range for the so lution must have distinct end points\"\n end if;\n if signum(rght- lft)<0 then # swap over\n tt := lft; lft := rght; rght := tt; \+ \n end if;\n if signum(x0-rght)>0 or signum(x0-lft)<0 then\n \+ error \"the range for the solution must contain the initial value of t he independent variable\"\n end if; \n\n outpt := 'localtaylor';\n adptv := true;\n stps := 20;\n Options :=[];\n if nargs>=star topts then\n Options:=[args[startopts..nargs]];\n if not typ e(Options,list(equation)) then\n error \"each optional argumen t must be an equation\"\n end if;\n if hasoption(Options,'ad aptive','adptv') then\n if not member(adptv,\{true,false\}) th en\n error \"\\\"adaptive\\\" must be 'true' or 'false'\"\n end if;\n elif hasoption(Options,'stepsize','stpsz') the n\n if not member(stpsz,\{'fixed','variable'\}) then\n \+ error \"\\\"stepsize\\\" must be 'fixed' or 'variable'\"\n \+ end if;\n if stpsz='fixed' then adptv := false end if;\n \+ end if;\n if hasoption(Options,'steps','stps') then \n i f not type(stps,'posint') then\n error \"\\\"steps\\\" must be a positive integer\"\n end if;\n adptv := false;\n end if;\n if hasoption(Options,'output','outpt') then\n \+ if not member(outpt,\{'points','derivative_points','derivpts','po ints_pair','localtaylor','procedure','derivtaylor','deriv_procedure',' deriv_proc','procedure_pair','proc_pair','taylor_pair'\}) then\n \+ error \"\\\"output\\\" must be 'points','derivative_points','der ivpts','localtaylor', 'procedure','derivtaylor','points_pair','taylor_ pair','procedure_pair' or 'proc_pair'\"\n end if;\n if outpt='procedure' then\n Options := remove(_U->evalb(op(1, _U)='output'),Options);\n Options := [op(Options),'output'= 'localtaylor'];\n elif outpt='deriv_procedure' or outpt='deriv _proc' then\n Options := remove(_U->evalb(op(1,_U)='output' ),Options);\n Options := [op(Options),'output'='derivtaylor '];\n elif outpt='procedure_pair' or outpt='taylor_pair' then \n Options := remove(_U->evalb(op(1,_U)='output'),Options); \n Options := [op(Options),'output'='proc_pair'];\n \+ elif outpt='derivative_points' then\n Options := remove(_U ->evalb(op(1,_U)='output'),Options);\n Options := [op(Optio ns),'output'='derivpts'];\n end if; \n end if;\n end if ;\n\n if signum(x0-lft)=0 then\n return taylor2(gxyu,x=x0..rght ,y=y0,u=u0,op(Options));\n elif signum(x0-rght)=0 then\n return taylor2(gxyu,x=x0..lft,y=y0,u=u0,op(Options));\n else\n if not adptv then\n lftstps := trunc(evalf((x0-lft)/(rght-lft)*stps, Digits+5));\n rghtstps := stps-lftstps;\n Options := c onvert(\{op(Options)\} minus \{steps=stps\},list);\n rghtprt : = taylor2(gxyu,x=x0..rght,y=y0,u=u0,\n st eps=rghtstps,op(Options));\n lftprt := taylor2(gxyu,x=x0..lft, y=y0,u=u0,\n steps=lftstps,op(Options)); \n else\n rghtprt := taylor2(gxyu,x=x0..rght,y=y0,u=u0,op (Options));\n lftprt := taylor2(gxyu,x=x0..lft,y=y0,u=u0,op(Op tions));\n end if;\n\n if outpt='localtaylor' or outpt='deri vtaylor' then\n return dblrk(lft,rght,x0,lftprt,rghtprt);\n \+ elif outpt='proc_pair' then\n return dblrk(lft,rght,x0,op(1 ,[lftprt]),op(1,[rghtprt])),\n dblrk(lft,rght,x0,op(2,[lftp rt]),op(2,[rghtprt]));\n elif outpt='points' or outpt='derivpts' \+ then\n return [op(reverse(lftprt)),op(rghtprt)];\n else # outpt=points_pair\n return [op(reverse(op(1,[lftprt]))),op(op (1,[rghtprt]))], [op(reverse(op(2,[lftprt]))),o p(op(2,[rghtprt]))];\n end if;\n end if; \nend proc:" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 7 "t aylor2" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18423 "taylor2 := proc(fxyu::algebraic,xrng::(name=realco ns..realcons),\n iy::(name=realcons),iu::(name=realcons)) \n local x,y,u,x0,y0,u0,xk,yk,uk,dk,soln,h,stps,s,j,k,dn,\n sum ,term,fact,yout,uout,outpt,prntflg,saveDigits,Options,\n xrg,xn,f ,i,errcntl,maxval,maxval2,maxtemp,maxtemp2,errc,\n hmx,hmn,hstrt, sgn,ordr,minstepsize,pgrow,pshrink,errcontrol,\n inc,stpsz,adptv, maxstps,t,tt,xstart,xend,eps,tiny,scale,scale2,\n yerr,uerr,errst ,errst2,err,htemp,xnew,hnext,sol,pts,loctaylor,\n maxstepsize,las tstep,stdstep,drvstep,safety,finished;\n \nloctaylor := proc(x_taylor: :realcons)\n local xk,yk,uk,jF,jM,jS,n,h,j,data,xx,saveDigits,\n s um,term,fact,dk;\n options `Copyright (c) 2002 by Peter Stone`;\n\n \+ data := _SOLN;\n\n saveDigits := Digits;\n Digits :=\n min(max (trunc(evalhf(Digits)),trunc(Digits*4/3)),Digits+10);\n\n xx := eval f(x_taylor);\n n := nops(data);\n if (data[1,1] data[n,1] or xxdata[1,1])) then\n error \"independent variable is outs ide the interpolation interval: %1\",evalf(data[1,1])..evalf(data[n,1] );\n end if;\n\n # Peform a binary search for the interval contain ing x.\n n := nops(data);\n jF := 0;\n jS := n+1;\n\n if data[ 1,1] < data[n,1] then\n while jS-jF>1 do\n jM := trunc((jF +jS)/2);\n if xx>=data[jM,1] then jF := jM else jS := jM end if ;\n end do;\n if jM=n then jF := n-1; jS := n end if;\n el se\n while jS-jF>1 do\n jM := trunc((jF+jS)/2);\n i f xx<=data[jM,1] then jF := jM else jS := jM end if;\n end do;\n \+ if jM = n then jF := n-1; jS := n end if;\n end if;\n # Get t he data needed from the list.\n xk := data[jF,1];\n h := xx-xk;\n \n if _DERIV then\n uk := data[jF,3];\n sum := uk;\n \+ fact := evalf(1); \n for j from 1 to nops(data[jF])-3 do\n \+ fact := fact*h/j;\n dk := data[jF,j+3];\n term := \+ dk*fact;\n sum := sum + term;\n end do;\n Digits := \+ saveDigits;\n return evalf(sum);\n else\n yk := data[jF,2] ;\n sum := yk;\n fact := evalf(1); \n for j from 1 to nops(data[jF])-2 do\n fact := fact*h/j;\n dk := data[ jF,j+2];\n term := dk*fact;\n sum := sum + term;\n \+ end do;\n Digits := saveDigits;\n return evalf(sum);\n e nd if;\nend proc: # of loctaylor \n\n # start of main procedure\n \+ x := op(1,xrng);\n y := op(1,iy);\n u := op(1,iu);\n if not typ e(indets(fxyu,name) minus \{x,y,u\},set(realcons)) then\n error \+ \"the 1st argument, %1, must depend only on the variables %2, %3 and % 4\",fxyu,x,y,u;\n end if;\n xrg := op(2,xrng);\n x0 := op(1,xrg) ;\n xn := op(2,xrg);\n y0 := op(2,iy);\n u0 := op(2,iu);\n \n \+ # Get the options.\n # Set the default values to start with.\n m axstps := 2000;\n stps := 20;\n adptv := true;\n outpt := 'local taylor';\n t := Float(1,-Digits);\n ordr := min(Digits,15+trunc(ab s((Digits-15))^0.9));\n hmx := ordr*0.05;\n hstrt := evalf(0.1*10^ (-ceil(Digits/10)));\n hmn := min(0.000005,hstrt/2000);\n errcntl \+ := 0;\n maxtemp := 0;\n maxtemp2 := 0;\n prntflg := 0;\n if na rgs>4 then\n Options:=[args[5..nargs]];\n if not type(Option s,list(equation)) then\n error \"each optional argument must b e an equation\"\n end if;\n if hasoption(Options,'order','or dr','Options') then\n if not type(ordr,posint) or ordr<2 or or dr>100 then\n error \"\\\"order\\\" must be a positive inte ger between 2 and 100 inclusive\"\n end if;\n hmx := o rdr*0.05;\n end if;\n if hasoption(Options,'output','outpt', 'Options') then\n if not member(outpt,\{'points','derivpts',' points_pair','localtaylor','derivtaylor','proc_pair'\}) then\n \+ error \"\\\"output\\\" must be 'points','derivpts','points_pair ','localtaylor','derivtaylor' or 'proc_pair'\"\n end if; \n \+ end if; \n if hasoption(Options,'info','prntflg','Options') th en\n if not member(prntflg,\{0,1,2,3,4,true,false\}) then\n \+ error \"\\\"info\\\" must be 0 <-> false, 1, 2 <-> true, 3 or 4\"\n end if;\n if prntflg=false then prntflg := 0 fi ; \n if prntflg=true then prntflg := 2 fi;\n end if;\n\n \+ if hasoption(Options,'adaptive','adptv','Options') then\n \+ if not member(adptv,\{true,false\}) then\n error \"\\\"ada ptive\\\" must be 'true' or 'false'\"\n end if;\n elif ha soption(Options,'stepsize','stpsz','Options') then\n if not me mber(stpsz,\{'fixed','variable'\}) then\n error \"\\\"steps ize\\\" must be 'fixed' or 'variable'\"\n end if;\n if stpsz='fixed' then adptv := false end if;\n end if;\n if ha soption(Options,'steps','stps','Options') then \n if not type( stps,'posint') then\n error \"\\\"steps\\\" must be a posit ive integer\"\n end if;\n adptv := false;\n end i f;\n\n if adptv then\n if hasoption(Options,'maxsteps','m axstps','Options') then\n if not type(maxstps,posint) then \n error \"\\\"maxsteps\\\" must be a positive integer\" \n end if;\n end if;\n if hasoption(Options ,'tolerance','t','Options') then \n tt := evalf(t); \n \+ if not type(tt,float) or \n tt>Float(1,-iquo(Digi ts,2)) or tthmx) or evalf(hstrt0 then\n \+ error \"%1 is not a valid option for %2\",op(1,Options), procnam e;\n end if;\n end if;\n\n stdstep := evalb(outpt='points' or outpt='localtaylor');\n drvstep := evalb(outpt='derivstep');\n\n \+ saveDigits := Digits;\n Digits :=\n min(max(trunc(evalhf(Digits)), trunc(Digits*4/3)),Digits+10);\n\n # Evaluate any real constants in \+ gxyu\n f := unapply(evalf(fxyu),x,y,u);\n\n dn := array(1..ordr); \n dn[1] := f;\n\n # Use the chain rule to obtain the derivatives. \n for i from 2 to ordr do\n dn[i] := unapply(simplify(diff(dn[ i-1](x,y,u),x)+\n diff(dn[i-1](x,y,u),y)*u+diff(dn[i-1](x,y,u),u )*f(x,y,u)),x,y,u);\n if prntflg=1 or prntflg=3 then\n pr int(`derivative`,i,` `,dn[i]);\n end if;\n end do;\n\n xk \+ := evalf(x0);\n yk := evalf(y0);\n uk := evalf(u0);\n soln := NU LL;\n\n if not adptv then\n h := evalf((xn-x0)/stps);\n \n \+ # Use two Taylor series to calculate yk and uk at each step.\n \+ for k from 1 to stps do\n # loop to calculate the required de rivatives\n s := [xk,yk,uk];\n for j from 1 to ordr do \n dk := traperror(dn[j](xk,yk,uk));\n \+ if dk=lasterror or not type(dk,numeric) then\n error \+ \"evaluation of %-1 derivative failed at %2\",j,xk;\n end i f;\n s := [op(s),dk];\n end do;\n\n # Taylo r series for yk\n sum := yk;\n term := sum;\n \+ fact := evalf(1);\n for j from 1 to ordr do\n fact := \+ fact*h/j;\n term := s[j+2]*fact;\n sum := sum + \+ term;\n end do;\n yout := sum;\n \n # \+ Taylor series for uk\n sum := uk;\n term := sum;\n \+ fact := evalf(1);\n for j from 1 to ordr do\n \+ fact := fact*h/j;\n term := s[j+3]*fact;\n sum : = sum + term;\n end do;\n uout := sum;\n\n if \+ outpt='points' or outpt='derivpts' then\n soln := soln,[xk, yk,uk];\n else\n soln := soln,s;\n end if; \n\n yk := yout;\n uk := uout;\n xk := xk + h; \n if prntflg=2 or prntflg=3 then\n print(`step`,k, ` `,[xk,yk,uk])\n end if;\n end do;\n \n soln := soln,[xk,yk,uk];\n sol := [soln];\n Digits := saveDigits ;\n if outpt='localtaylor' then\n return subs(\{_SOLN=sol,_D ERIV=false\},eval(loctaylor));\n elif outpt='derivtaylor' then\n \+ return subs(\{_SOLN=sol,_DERIV=true\},eval(loctaylor));\n el if outpt='proc_pair' then\n return subs(\{_SOLN=sol,_DERIV=fal se\},eval(loctaylor)),\n subs(\{_SOLN=sol,_DERIV=true\} ,eval(loctaylor));\n elif outpt='points' then\n return ev alf([seq([sol[i,1],sol[i,2]],i=1..nops(sol))]); \n elif outp t='derivpts' then\n return evalf([seq([sol[i,1],sol[i,3]],i=1. .nops(sol))]);\n else # outpt='points_pair'\n return eval f([seq([sol[i,1],sol[i,2]],i=1..nops(sol))]),\n evalf([ seq([sol[i,1],sol[i,3]],i=1..nops(sol))]); \n end if;\n else \+ # stepsize is variable\n xstart := evalf(x0);\n xend := eval f(xn);\n sgn := sign(xend-xstart);\n h := sgn*hstrt;\n \+ eps := evalf(t);\n safety := 0.9;\n tiny := Float(1,-3*saveD igits);\n pgrow := -evalf(1/ordr);\n pshrink := -evalf(1/(or dr-1));\n errcontrol := evalf((5/safety)^(-ordr));\n \n xk \+ := evalf(x0);\n yk := evalf(y0);\n uk := evalf(u0);\n s := [xk,yk,uk];\n for j from 1 to ordr do \n d k := traperror(dn[j](xk,yk,uk));\n if dk=lasterror or not type (dk,numeric) then\n error \"evaluation of %-1 derivative fa iled at %2\",j,xk;\n end if;\n s := [op(s),dk];\n \+ end do;\n\n if errcntl=2 then\n if stdstep then\n \+ if maxtemp<>0 then\n maxval := abs(evalf(maxtemp)) \n else \n maxval := max(abs(yk),tiny)\n \+ end if;\n elif drvstep then\n if maxtemp2< >0 then\n maxval := abs(evalf(maxtemp2))\n el se\n maxval := max(abs(uk),tiny)\n end if;\n \+ else\n if maxtemp<>0 then\n maxval := abs(evalf(maxtemp))\n else \n maxval := ma x(abs(yk),tiny)\n end if;\n if maxtemp2<>0 then \n maxval2 := abs(evalf(maxtemp2))\n else\n \+ maxval2 := max(abs(uk),tiny)\n end if;\n \+ end if;\n end if;\n\n finished := false;\n for k fro m 1 to maxstps do\n if stdstep then \n if errcntl=0 then scale := max(abs(yk),abs(uk*h),tiny)\n elif errcntl=1 then scale := max(abs(yk),tiny)\n elif errcntl=2 then scal e := abs(maxval)\n else scale := max(abs(uk*h),tiny) end if ;\n elif drvstep then\n if errcntl=0 then scale := \+ max(abs(uk),abs(s[4]*h),tiny)\n elif errcntl=1 then scale : = max(abs(uk),tiny)\n elif errcntl=2 then scale := abs(maxv al)\n else scale := max(abs(s[4]*h),tiny) end if;\n \+ else\n if errcntl=0 then\n scale := max(abs( yk),abs(uk*h),tiny);\n scale2 := max(abs(uk),abs(s[4]*h) ,tiny);\n elif errcntl=1 then\n scale := max( abs(yk),tiny);\n scale2 := max(abs(uk),tiny);\n \+ elif errcntl=2 then\n scale := abs(maxval);\n \+ scale2 := abs(maxval2);\n else\n scale := max(abs(uk*h),tiny);\n scale2 := max(abs(s[4]*h),tin y);\n end if;\n end if;\n\n if abs(h)>=hmx \+ then\n h := sgn*hmx;\n maxstepsize := true;\n \+ else\n maxstepsize := false;\n end if;\n \+ if abs(h)<=hmn then\n h := sgn*hmn;\n minste psize := true;\n else\n minstepsize := false;\n \+ end if;\n if (xk+h-xend)*(xk+h-xstart) > 0 then \n \+ h := xend-xk;\n laststep := true;\n else\n \+ laststep := false;\n end if;\n\n # Use two Tay lor series to calculate yk and uk at each step.\n do\n \+ # Taylor series for yk\n sum := yk;\n term : = sum;\n fact := evalf(1);\n for j from 1 to ord r do\n fact := fact*h/j;\n term := s[j+2]* fact;\n sum := sum + term;\n end do;\n \+ yout := sum;\n yerr := abs(term);\n \n \+ # Taylor series for uk\n sum := uk;\n term : = sum;\n fact := evalf(1);\n for j from 1 to ord r do\n fact := fact*h/j;\n term := s[j+3]* fact;\n sum := sum + term;\n end do;\n \+ uout := sum;\n uerr := abs(term);\n\n # err or estimate - last term in Taylor series\n if stdstep then \+ errst := yerr \n elif drvstep then errst := uerr\n \+ else\n errst := yerr;\n errst2 := uerr; \n end if;\n\n if stdstep or drvstep then \n \+ err := abs(errst/scale)/eps;\n else \n \+ err := max(abs(errst/scale),abs(errst2/scale2))/eps;\n \+ end if;\n if err<=1.0 or minstepsize then break end if; \n\n # Shrink, but not too much.\n if prntflg=2 \+ or prntflg=3 then\n print(`reducing step-size and repeat ing step`);\n end if;\n htemp := safety*h*err^ps hrink;\n if h>=0 then\n h := max(htemp,0.1*h) \n else\n h := min(htemp,0.1*h)\n \+ end if;\n xnew := xk + h;\n if xnew=xk then\n \+ error \"stepsize underflow\"\n end if;\n \+ end do;\n\n if outpt='points' or outpt='derivpts' or outpt=' points_pair' then\n soln := soln,[xk,yk,uk];\n else \n soln := soln,s;\n end if;\n\n if err>err control then\n hnext := safety*h*err^pgrow;\n in c := false;\n else\n if abs(h) `,evalf(abs(errst),5),`abs err bound -> `,evalf(abs(scale)*eps,5));\n if stdstep then\n print(`step`,k,` `,h,` \+ `,[xk,yk]);\n elif derivstep then\n print(`s tep`,k,` `,h,` `,[xk,uk]);\n else\n print (`step`,k,` `,h,` `,[xk,yk,uk]);\n end if;\n \+ if laststep then\n print(`last step`);\n eli f inc then\n print(`increasing step-size by a factor of \+ 5`)\n elif maxstepsize then\n print(`used max imum step-size`)\n elif not minstepsize then\n \+ print(`using error to adjust step-size`)\n else \n \+ print(`used minimum step-size`)\n end if;\n \+ print(``);\n end if;\n if (xk-xend)*(xend-xstart)> =0 then\n if prntflg>0 then\n print(`the tota l number of steps is`,k);\n end if;\n finished : = true;\n break;\n end if;\n\n if errcntl=2 then\n if stdstep then \n if abs(yk)>maxva l then maxval := abs(yk) end if;\n elif drvstep then\n \+ if abs(uk)>maxval then maxval := abs(uk) end if;\n \+ else\n if abs(yk)>maxval then maxval := abs(yk) end if ;\n if abs(uk)>maxval2 then maxval2 := abs(uk) end if;\n end if;\n end if;\n\n # calculate the requ ired derivatives for the next step\n s := [xk,yk,uk];\n \+ for j from 1 to ordr do\n s := [op(s),evalf(dn[j](xk,yk,u k))];\n end do;\n h := hnext;\n end do;\n\n \+ if not finished and k>=maxstps then\n error \"reached maximum \+ number of steps before reaching end of interval\"\n end if;\n\n \+ soln := soln,[xk,yk,uk];\n sol := [soln];\n Digits := sa veDigits;\n if outpt='localtaylor' then\n return subs(\{_SOL N=sol,_DERIV=false\},eval(loctaylor));\n elif outpt='derivtaylor' th en\n return subs(\{_SOLN=sol,_DERIV=true\},eval(loctaylor));\n elif outpt='proc_pair' then\n return subs(\{_SOLN=sol,_D ERIV=false\},eval(loctaylor)),\n subs(\{_SOLN=sol,_DERI V=true\},eval(loctaylor));\n elif outpt='points' then\n r eturn evalf([seq([sol[i,1],sol[i,2]],i=1..nops(sol))]); \n e lif outpt='derivpts' then\n return evalf([seq([sol[i,1],sol[i, 3]],i=1..nops(sol))]);\n else # outpt='points_pair'\n ret urn evalf([seq([sol[i,1],sol[i,2]],i=1..nops(sol))]),\n \+ evalf([seq([sol[i,1],sol[i,3]],i=1..nops(sol))]); \n end if; \n \+ end if;\nend proc: # of taylor2" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 39 "Examples are given in the next \+ section." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 0 9 "desolveT2" } {TEXT -1 10 ": examples" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 14 "The procedure " }{TEXT 0 14 "comparewithfcn" }{TEXT -1 6 " . . " }{HYPERLNK 17 "comparewithfcn" 1 "" "comparewithfcn" } {TEXT -1 39 " is required for some of the examples." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 10 "Example 1a" }{TEXT 275 137 " .. constructing discrete solutions for b oth the solution and its derivative with fixed step-size, and correspo nding continuous solutions" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{PARA 0 "" 0 "" {TEXT -1 31 "We find a discrete solution for" } }{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "d^2*y/(d*x^2)+3;" " 6#,&*(%\"dG\"\"#%\"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"F(\"\"$F(" }{TEXT -1 1 " " }{XPPEDIT 18 0 "dy/dx+2*y = sin(x);" "6#/,&*&%#dyG\"\"\"%#dxG!\" \"F'*&\"\"#F'%\"yGF'F'-%$sinG6#%\"xG" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "y(0) = 2" "6#/-%\"yG6#\"\"!\"\"#" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "`y '`(0) = 1;" "6#/-%$y~'G6#\"\"!\"\"\"" }{TEXT -1 1 " " }}{PARA 0 " " 0 "" {TEXT -1 53 "using 30 steps of equal width over the interval fr om " }{XPPEDIT 18 0 "x = -1;" "6#/%\"xG,$\"\"\"!\"\"" }{TEXT -1 4 " to " }{XPPEDIT 18 0 "x = 2" "6#/%\"xG\"\"#" }{TEXT -1 1 "." }}{PARA 0 " " 0 "" {TEXT -1 76 "First we find the corresponding analytical solutio n for comparison purposes." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 120 "de := diff(y(x),x$2)+3*diff(y(x),x )+2*y(x)=sin(x);\nic := y(0)=2,D(y)(0)=1;\ndsolve(\{de,ic\},y(x)):\ng \+ := unapply(rhs(%),x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%%d iffG6$-%\"yG6#%\"xG-%\"$G6$F-\"\"#\"\"\"*&\"\"$F2-F(6$F*F-F2F2*&F1F2F* F2F2-%$sinGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\"\" !\"\"#/--%\"DG6#F(F)\"\"\"" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"gGf* 6#%\"xG6\"6$%)operatorG%&arrowGF(,**&#\"\"$\"#5\"\"\"-%$cosG6#9$F1!\" \"*&#F1F0F1-%$sinGF4F1F1*&#\"#;\"\"&F1-%$expG6#,$*&\"\"#F1F5F1F6F1F6*& #\"#6FDF1-F@6#,$F5F6F1F1F(F(F(" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 160 "de := diff(y(x),x$2)+3*diff (y(x),x)+2*y(x)=sin(x);\nic := y(0)=2,D(y)(0)=1;\npts := desolveT2(\{d e,ic\},y(x),x=-1..2,steps=30,output=points):\ncomparewithfcn(pts,g);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%%diffG6$-%\"yG6#%\"xG-%\" $G6$F-\"\"#\"\"\"*&\"\"$F2-F(6$F*F-F2F2*&F1F2F*F2F2-%$sinGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\"\"!\"\"#/--%\"DG6#F(F)\" \"\"" }}{PARA 6 "" 1 "" {TEXT -1 90 " -1 -8.94066725 function val: -8.940667249 rel err: 1.1185e-10" }}{PARA 6 " " 1 "" {TEXT -1 90 " -0.9660363939 -7.893709393 function val: \+ -7.893709393 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.7941747451 -3.77833028 function val: -3.77833028 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.6244778 881 -1.189299158 function val: -1.189299159 rel err: 8.4 083e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.4454130922 0.4735738 368 function val: 0.473573837 rel err: 4.2232e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.253980901 1.456726167 function va l: 1.4567261672 rel err: 1.3729e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.06 1.926654518 function val: 1.9266545 181 rel err: 5.1903e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ -0.01 1.989646647 function val: 1.9896466475 rel err: \+ 2.5130e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0 \+ 2 function val: 2 rel err: 0.0000e+00" }} {PARA 6 "" 1 "" {TEXT -1 90 " 0.01 2.009653314 funct ion val: 2.0096533142 rel err: 9.9520e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.06 2.048095776 function val: 2.0 480957759 rel err: 4.8826e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ 0.2549540503 2.075391759 function val: 2.0753917588 rel err: 9.6367e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.4522427652 \+ 1.977755768 function val: 1.9777557681 rel err: 5.0562e-11 " }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.6576562189 1.814201562 f unction val: 1.8142015619 rel err: 5.5121e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.8703204978 1.625268857 function val: \+ 1.6252688569 rel err: 6.1528e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ 1.090013051 1.437364282 function val: 1.4373642819 \+ rel err: 6.9572e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.31676169 \+ 1.265567195 function val: 1.265567195 rel err: 0.0000e+ 00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.550823787 1.116471152 \+ function val: 1.1164711516 rel err: 3.5827e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.792672446 0.9906700954 function val: \+ 0.9906700953 rel err: 1.0094e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 2 0.901507807 function val: 0.90150780702 \+ rel err: 2.2185e-11" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%!G" }}{PARA 6 "" 1 "" {TEXT -1 48 " Maximum relative error: 8.4083e-1 0" }}{PARA 6 "" 1 "" {TEXT -1 60 " obtained for the input value: -0.6244778881" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 99 "The points of the discrete solution can be plotted along with the graph of the analytical solution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 132 "plot([pts,g (x)],x=-1..2,color=[black,coral],style=[point,line],\n \+ symbol=circle,labels=[`x`,`y'(x)`]);" }}{PARA 13 "" 1 "" {GLPLOT2D 477 477 477 {PLOTDATA 2 "6'-%'CURVESG6%767$$!\"\"\"\"!$!3 i+++]smS*)!#<7$$!3c******QROg'*!#=$!3'******HR4P*yF-7$$!3o*****4XZ<%zF 1$!3/+++!GI$yPF-7$$!3X+++\"))yZC'F1$!33+++e\"*H*=\"F-7$$!3G+++A48aWF1$ \"3\")*****zOQdt%F17$$!3\")******4!4)RDF1$\"3-+++nhsc9F-7$$!3y******** ******f!#>$\"34+++=XlE>F-7$$!3-+++++++5FK$\"31+++Zmk*)>F-7$$F*F*$\"\"# F*7$$\"3-+++++++5FK$\"3\"******RJ`'4?F-7$$\"3y**************fFK$\"3#)* ****fx&4[?F-7$$\"37+++.0a\\DF1$\"3%*******eF-7$$\"3M+++*=ild'F1$\"30+++i:?9=F-7$$\"3\")*****z(\\?.() F1$\"3,+++d)o_i\"F-7$$\"3!******408+4\"F-$\"35+++#GktV\"F-7$$\"35+++!p hnJ\"F-$\"3/+++&>nbE\"F-7$$\"3!******pyB3b\"F-$\"3\"******>:rk6\"F-7$$ \"33+++YCn#z\"F-$\"3]*****R&4q1**F17$FU$\"3%*******p!y],*F1-%'COLOURG6 &%$RGBGF*F*F*-%&STYLEG6#%&POINTG-F$6%7X7$F($!3xmXH]smS*)F-7$$!3u****\\ (oUIn*F1$!3OzC$QjD7$zF-7$$!3[*****\\P&3Y$*F1$!3NYuh`^y+qF-7$$!3I**\\il :gh!*F1$!3g\"*zn?F>^iF-7$$!3C++Dcx6x()F1$!3%p'e^'fLQb&F-7$$!3%)**\\Pff =d%)F1$!3U$ejc@,!G[F-7$$!3b++]iTDP\")F1$!3uh()41G!*fTF-7$$!3*)******\\ ;?:yF1$!3JC#eQ(ejTNF-7$$!3A****\\P\"\\J\\(F1$!3O@LY(p-S(HF-7$$!3U**\\P %GFE<(F1$!3owfcEv!eX#F-7$$!3g***\\7V0@&oF1$!3IAoF-7$$!3w++Dcexd iF1$!3C#)QCR,'[?\"F-7$$!3j***\\i+#QUcF1$!3))eiNtv,%G&F17$$!3$****\\i!3 %f+&F1$\"3uw[$)z=&GL&FK7$$!3;++D\"oS:P%F1$\"3*)RF7&3USI&F17$$!3h***** \\<#)*=PF1$\"3A\">\\_NWLH*F17$$!3#*****\\(G3U9$F1$\"3ti\"*))p^W97F-7$$ !3Y*****\\-\\r\\#F1$\"3C*o$e1%==Z\"F-7$$!3?+++vGVZ=F1$\"3S'\\rK`lBn\"F -7$$!3_*****\\(4J@7F1$\"3,=F-7$$!3;,+]iIKFlFK$\"30\"f9n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$$\"3++++Ijy5=F-$\"3h7uM,GiA)*F17$$\"31+]P/)fT(=F-$\"33$[R?s6 $Q&*F17$$\"31+]i0j\"[$>F-$\"3OG_C&4b'z#*F17$FU$\"3c88/q!y],*F1-Fgq6&Fi q$\"*++++\"!\")$\")AR!)\\F`clFT-F[r6#%%LINEG-%+AXESLABELSG6$%\"xG%&y'( x)G-%'SYMBOLG6#%'CIRCLEG-%%VIEWG6$;F(FU%(DEFAULTG" 1 2 4 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 76 "We can also obtain points along the graph of the derivative of the solution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 303 "pts 2 := desolveT2(\{de,ic\},x=-1..2,stepsize=fixed,steps=30,output=derivp ts):\ncomparewithfcn(pts2,D(g)); \+ plot([pts2,D(g)(x)],x=-1..2,color=[blue,brow n],style=[point,line],\n symbol=circl e,labels=[`x`,`y'(x)`]);" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ -1 32.14099791 function val: 32.140997911 rel err: 3.1 113e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.9 25.01708 958 function val: 25.017089584 rel err: 1.5989e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.8 19.31339625 function va l: 19.313396253 rel err: 1.5533e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.7 14.76085881 function val: 14.76085 881 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ -0.6 11.14023572 function val: 11.140235722 rel err: \+ 1.7953e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.5 8.272 967308 function val: 8.2729673082 rel err: 2.4175e-11" }} {PARA 6 "" 1 "" {TEXT -1 90 " -0.4 6.013706702 funct ion val: 6.0137067022 rel err: 3.3257e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.3 4.244214468 function val: 4.2 442144682 rel err: 4.7123e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ -0.2 2.868368754 function val: 2.868368753 rel err: 3.4863e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.1 \+ 1.808087994 function val: 1.8080879944 rel err: 2.2123e-10 " }}{PARA 6 "" 1 "" {TEXT -1 90 " 0 1 f unction val: 1 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.1 0.392721462 function val: \+ 0.392721462 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ 0.2 -0.05536339028 function val: -0.0553633902 \+ rel err: 1.4450e-09" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.3 \+ -0.3779160318 function val: -0.3779160318 rel err: 0.0000e+ 00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.4 -0.6021232808 \+ function val: -0.6021232807 rel err: 1.6608e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.5 -0.7499042872 function val: \+ -0.7499042871 rel err: 1.3335e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.6 -0.8388947388 function val: -0.8388947388 \+ rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.7 -0.8832490767 function val: -0.8832490767 rel err: 0.0000 e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.8 -0.8942940893 function val: -0.8942940894 rel err: 1.1182e-10" }}{PARA 6 " " 1 "" {TEXT -1 90 " 0.9 -0.8810611742 function val: \+ -0.8810611743 rel err: 1.1350e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1 -0.8507195877 function val: -0.8507195876 rel err: 1.1755e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ 1.1 -0.8089289267 function val: -0.8089289267 rel err: 0.0 000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.2 -0.7601257 632 function val: -0.76012576321 rel err: 1.3156e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.3 -0.7077566226 function va l: -0.70775662264 rel err: 5.6517e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.4 -0.6544672676 function val: -0.65446726 761 rel err: 1.5280e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ 1.5 -0.6022564271 function val: -0.60225642709 rel err: \+ 1.6604e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.6 -0.5526 006148 function val: -0.55260061476 rel err: 7.2385e-11" }} {PARA 6 "" 1 "" {TEXT -1 90 " 1.7 -0.5065554608 funct ion val: -0.50655546085 rel err: 9.8706e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.8 -0.4648379818 function val: -0.46 483798176 rel err: 8.6051e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ 1.9 -0.4278933962 function val: -0.42789339621 rel err: 2.3370e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 2 - 0.3959494245 function val: -0.39594942453 rel err: 7.5767e-11 " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%!G" }}{PARA 6 "" 1 "" {TEXT -1 48 " Maximum relative error: 1.4450e-09" }}{PARA 6 "" 1 " " {TEXT -1 60 " obtained for the input value: \+ 0.2" }}{PARA 13 "" 1 "" {GLPLOT2D 474 366 366 {PLOTDATA 2 "6'-%'CURV ESG6%7A7$$!\"\"\"\"!$\"3I+++\"z*49K!#;7$$!3A+++++++!*!#=$\"3/+++e*3<]# F-7$$!3U+++++++!)F1$\"3.+++D'R8$>F-7$$!3a**************pF1$\"3-+++\")e 3w9F-7$$!3w**************fF1$\"3(******>dBS6\"F-7$$!3++++++++]F1$\"39+ ++3t'HF)!#<7$$!3A+++++++SF1$\"3N+++-nq8gFH7$$!3))**************HF1$\"3 -+++oW@WUFH7$$!35+++++++?F1$\"3-+++a(o$oGFH7$$!3/+++++++5F1$\"34+++%*z 33=FH7$$F*F*$\"\"\"F*7$$\"3/+++++++5F1$\"3@+++?Y@FRF17$$\"35+++++++?F1 $!33+++G!Rj`&!#>7$$\"3))**************HF1$!3'******zJg\"zPF17$$\"3A+++ ++++SF1$!3%******z!GB@gF17$$\"3++++++++]F1$!3=+++sG/*\\(F17$$\"3w***** *********fF1$!3%)*****zQZ*)Q)F17$$\"3a**************pF1$!3p*****pw!\\K ))F17$$\"3U+++++++!)F1$!3$)*****H*3%H%*)F17$$\"3A+++++++!*F1$!3j*****> u61\"))F17$Fin$!3-+++xe>2&)F17$$\"33+++++++6FH$!3_+++n#*G*3)F17$$\"3%* *************>\"FH$!3E+++KwD,wF17$$\"3/+++++++8FH$!3_+++EicxqF17$$\"3! **************R\"FH$!3e*****fnsYa'F17$$\"3++++++++:FH$!3Z+++rUcAgF17$$ \"33+++++++;FH$!3,+++[h+EbF17$$\"3%**************p\"FH$!3C+++3Ybl]F17$ $\"3/+++++++=FH$!3A+++=)z$[YF17$$\"3!***************=FH$!3)******>'R$* yUF17$$\"\"#F*$!3!)*****\\C%\\fRF1-%'COLOURG6&%$RGBGFhnFhn$\"*++++\"! \")-%&STYLEG6#%&POINTG-F$6%7W7$F($\"3C'ex6z*49KF-7$$!3u****\\(oUIn*F1$ \"3-OL\"RpkO'HF-7$$!3[*****\\P&3Y$*F1$\"3Asd5=6lIFF-7$$!3I**\\il:gh!*F 1$\"3(>)>F@O=TDF-7$$!3C++Dcx6x()F1$\"3)yVD@D@LO#F-7$$!3%)**\\Pff=d%)F1 $\"3w:+\\yjKw@F-7$$!3b++]iTDP\")F1$\"3(3ON/:iA+#F-7$$!3*)******\\;?:yF 1$\"3!f>(=q?DR=F-7$$!3A****\\P\"\\J\\(F1$\"3%>8'>\"\\)o(o\"F-7$$!3g*** \\7V0@&oF1$\"3\"*G%[9vQrT\"F-7$$!3w++DcexdiF1$\"3]+6!=$[\\*>\"F-7$$!3j ***\\i+#QUcF1$\"3eFt%yH^O+\"F-7$$!3$****\\i!3%f+&F1$\"3]A*fgXw!)G)FH7$ $!3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 ++!*>=+:FH$!3Q3/S$fL;-'F17$$\"3-++DE&4Qc\"FH$!3Re]E2p,-dF17$$\"3=+]P%> 5pi\"FH$!3')y=0NO>)R&F17$$\"39+++bJ*[o\"FH$!3yQ/>2=[K^F17$$\"33++Dr\"[ 8v\"FH$!3uS1=^+gX[F17$$\"3++++Ijy5=FH$!3'\\cH\"*pwhg%F17$$\"31+]P/)fT( =FH$!3AS95thmpVF17$$\"31+]i0j\"[$>FH$!3=B+di@)>;%F17$Fjt$!3k2[?XU\\fRF 1-F_u6&Fau$\")#)eqkFdu$\"))eqk\"FduFffl-Ffu6#%%LINEG-%+AXESLABELSG6$% \"xG%&y'(x)G-%'SYMBOLG6#%'CIRCLEG-%%VIEWG6$;F(Fjt%(DEFAULTG" 1 2 4 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }} }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 90 "A conti nuous solution in the form of a numerical function can be obtained via the option \"" }{TEXT 272 18 "output=localtaylor" }{TEXT -1 22 "\" ( \+ or equivalently \"" }{TEXT 272 16 "output=procedure" }{TEXT -1 93 "\" ) which uses local Taylor series to interpolate between the points of a discrete solution. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 220 "de := diff(y(x),x$2)+3*diff(y(x),x )+2*y(x)=sin(x);\nic := y(0)=2,D(y)(0)=1;\ngn := desolveT2(\{de,ic\},x =-1..2,steps=30,output=localtaylor);\nplot([g(x),'gn'(x)],x=-1..2,colo r=[red,green],thickness=[1,2],labels=[`x`,`y(x)`]);" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%#deG/,(-%%diffG6$-%\"yG6#%\"xG-%\"$G6$F-\"\"#\"\"\" *&\"\"$F2-F(6$F*F-F2F2*&F1F2F*F2F2-%$sinGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-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B'>Tc\"Ff]l7$$\"+:K^+5Ff]l$\"+tQ)=^\"Ff]l7 $$\"+7,Hl5Ff]l$\"+%H7wX\"Ff]l7$$\"+4w)R7\"Ff]l$\"+9A**49Ff]l7$$\"+y%f \")=\"Ff]l$\"+'H.)f8Ff]l7$$\"+/-a[7Ff]l$\"+*[yWJ\"Ff]l7$$\"+ial68Ff]l$ \"+;D9p7Ff]l7$$\"+i@Ot8Ff]l$\"+1!ooA\"Ff]l7$$\"+fL'zV\"Ff]l$\"+q6y%=\" Ff]l7$$\"+!*>=+:Ff]l$\"+/gJY6Ff]l7$$\"+E&4Qc\"Ff]l$\"+9]-46Ff]l7$$\"+% >5pi\"Ff]l$\"+15,u5Ff]l7$$\"+bJ*[o\"Ff]l$\"+Kw[V5Ff]l7$$\"+r\"[8v\"Ff] l$\"+DQM55Ff]l7$$\"+Ijy5=Ff]l$\"+,GiA)*Fj]l7$$\"+/)fT(=Ff]l$\"+CFf]l$\"+%4b'z#*Fj]l7$F`\\l$\"+q!y],*Fj]l-Fe\\l6&Fg\\lF []lFh\\lF[]l-F]]l6#Fa\\l-%+AXESLABELSG6$%\"xG%%y(x)G-%%VIEWG6$;F(F`\\l %(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "C urve 1" "Curve 2" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 36 "xx := evalf(sqrt(2));\ng(xx);\ngn(xx);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#xxG$\"+iN@99!\"*" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#$\"+Pr***>\"!\"*" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$ \"+Pr***>\"!\"*" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 71 "A continuous form for the derivative can also be found vi a the option \"" }{TEXT 272 18 "output=derivtaylor" }{TEXT -1 3 "\". \+ " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 288 "de := diff(y(x),x$2)+3*diff(y(x),x)+2*y(x)=sin(x);\nic := y(0 )=2,D(y)(0)=1;\ndgn := desolveT2(\{de,ic\},x=-1..2,stepsize=fixed,step s=30,output=derivtaylor);\nplot([D(g)(x),'dgn'(x)],x=-1..2,color=[brow n,aquamarine],\n thickness=[1,3] ,labels=[`x`,`y'(x)`]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-% %diffG6$-%\"yG6#%\"xG-%\"$G6$F-\"\"#\"\"\"*&\"\"$F2-F(6$F*F-F2F2*&F1F2 F*F2F2-%$sinGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\" \"!\"\"#/--%\"DG6#F(F)\"\"\"" }}{PARA 13 "" 1 "" {GLPLOT2D 376 328 328 {PLOTDATA 2 "6&-%'CURVESG6%7W7$$!\"\"\"\"!$\"3C'ex6z*49K!#;7$$!3u* ***\\(oUIn*!#=$\"3-OL\"RpkO'HF-7$$!3[*****\\P&3Y$*F1$\"3Asd5=6lIFF-7$$ !3I**\\il:gh!*F1$\"3(>)>F@O=TDF-7$$!3C++Dcx6x()F1$\"3)yVD@D@LO#F-7$$!3 %)**\\Pff=d%)F1$\"3w:+\\yjKw@F-7$$!3b++]iTDP\")F1$\"3(3ON/:iA+#F-7$$!3 *)******\\;?:yF1$\"3!f>(=q?DR=F-7$$!3A****\\P\"\\J\\(F1$\"3%>8'>\"\\)o (o\"F-7$$!3g***\\7V0@&oF1$\"3\"*G%[9vQrT\"F-7$$!3w++DcexdiF1$\"3]+6!=$ [\\*>\"F-7$$!3j***\\i+#QUcF1$\"3eFt%yH^O+\"F-7$$!3$****\\i!3%f+&F1$\"3 ]A*fgXw!)G)!#<7$$!3;++D\"oS:P%F1$\"3%)>q=a.:!z'Feo7$$!3h*****\\<#)*=PF 1$\"3A4t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EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "xx := evalf(sqrt(2));\nD(g)( xx);\ndgn(xx);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#xxG$\"+iN@99!\"* " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$!+%36%pk!#5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$!+$36%pk!#5" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 127 "A pair of numerical of numerical procedures fo r the solution and its derivative can be obtained simultaneously via t he option \"" }{TEXT 272 21 "output=procedure_pair" }{TEXT -1 7 "\" (o r \"" }{TEXT 272 16 "output=proc_pair" }{TEXT -1 6 "\" or \"" }{TEXT 272 18 "output=taylor_pair" }{TEXT -1 4 "\"). " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 211 "de := diff( y(x),x$2)+3*diff(y(x),x)+2*y(x)=sin(x);\nic := y(0)=2,D(y)(0)=1;\n(gn2 ,dgn2) := desolveT2(\{de,ic\},x=-1..2,stepsize=fixed,steps=30,output=p roc_pair);\nplot(['gn2'(x),'dgn2'(x)],x=-1..2,color=[red,brown]);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%%diffG6$-%\"yG6#%\"xG-%\"$G 6$F-\"\"#\"\"\"*&\"\"$F2-F(6$F*F-F2F2*&F1F2F*F2F2-%$sinGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\"\"!\"\"#/--%\"DG6#F(F)\" \"\"" }}{PARA 13 "" 1 "" {GLPLOT2D 377 336 336 {PLOTDATA 2 "6&-%'CURVE SG6$7X7$$!\"\"\"\"!$!+]smS*)!\"*7$$!+!pUIn*!#5$!+TcAJzF-7$$!+v`3Y$*F1$ !+a^y+qF-7$$!+l:gh!*F1$!+>F>^iF-7$$!+cx6x()F1$!+'fLQb&F-7$$!+gf=d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PO>)R&F17$Ffz$!+2=[K^F17$F[[ l$!+_+gX[F17$F`[l$!+*pwhg%F17$Fe[l$!+uhmpVF17$Fj[l$!+h@)>;%F17$F_\\l$! +XU\\fRF1-Fd\\l6&Ff\\l$\")#)eqkFi\\l$\"))eqk\"Fi\\lFbgl-%+AXESLABELSG6 $Q\"x6\"Q!Fhgl-%%VIEWG6$;F(F_\\l%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 108 "Discrete lists of poi nts for the solution and its derivative can be obtained simultaneously via the option \"" }{TEXT 272 18 "output=points_pair" }{TEXT -1 2 "\" " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 268 "de := diff(y(x),x$2)+3*diff(y(x),x)+2*y(x)=sin(x);\n ic := y(0)=2,D(y)(0)=1;\n(pts3,pts4) := desolveT2(\{de,ic\},x=-1..2,st epsize=fixed,steps=30,output=points_pair):\nplot([pts3$2,pts4$2],color =[red$2,brown$2],\n style=[point,line,point,line],linestyle=2,sym bol=circle);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%%diffG6$-% \"yG6#%\"xG-%\"$G6$F-\"\"#\"\"\"*&\"\"$F2-F(6$F*F-F2F2*&F1F2F*F2F2-%$s inGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\"\"!\"\"#/- -%\"DG6#F(F)\"\"\"" }}{PARA 13 "" 1 "" {GLPLOT2D 477 477 477 {PLOTDATA 2 "6*-%'CURVESG6%7A7$$!\"\"\"\"!$!3i+++]smS*)!#<7$$!3A++++++ +!*!#=$!35+++c/(e4'F-7$$!3U+++++++!)F1$!3#)*****HFw**)QF-7$$!3a******* *******pF1$!3')*****zUu[>#F-7$$!3w**************fF1$!3;+++Co&y1*F17$$! 3++++++++]F1$\"3E+++N:yCe!#>7$$!3A+++++++SF1$\"37+++MtW!o(F17$$!3))*** ***********HF1$\"3'******HJ!Hx7F-7$$!35+++++++?F1$\"3$******4B*)*H;F-7 $$!3/+++++++5F1$\"3'******>jm9'=F-7$$F*F*$\"\"#F*7$$\"3/+++++++5F1$\"3 %)*****4[\\\"o?F-7$$\"35+++++++?F1$\"3%******R&>%Q3#F-7$$\"3))******** ******HF1$\"3y*****>0a71#F-7$$\"3A+++++++SF1$\"3!******R5J:,#F-7$$\"3+ +++++++]F1$\"3%******>?sL%>F-7$$\"3w**************fF1$\"33+++$31N'=F-7 $$\"3a**************pF1$\"33+++**z2x\"F-$\" 3)******pHn2N\"F-7$$\"3/+++++++8F-$\"3!******4ebtF\"F-7$$\"3!********* *****R\"F-$\"36+++JfC47F-7$$\"3++++++++:F-$\"3%********fDk9\"F-7$$\"33 +++++++;F-$\"3!******H,4()3\"F-7$$\"3%**************p\"F-$\"3)******zu %yN5F-7$$\"3/+++++++=F-$\"3U+++\\O`s)*F17$$\"3!***************=F-$\"3x *****f9ylU*F17$Fin$\"3%*******p!y],*F1-%'COLOURG6&%$RGBG$\"*++++\"!\") FhnFhn-%&STYLEG6#%&POINTG-F$6%F&F]u-Feu6#%%LINEG-F$6%7A7$F($\"3I+++\"z *49K!#;7$F/$\"3/+++e*3<]#Fcv7$F5$\"3.+++D'R8$>Fcv7$F:$\"3-+++\")e3w9Fc v7$F?$\"3(******>dBS6\"Fcv7$FD$\"39+++3t'HF)F-7$FJ$\"3N+++-nq8gF-7$FO$ \"3-+++oW@WUF-7$FT$\"3-+++a(o$oGF-7$FY$\"34+++%*z33=F-7$FhnFiq7$F\\o$ \"3@+++?Y@FRF17$Fao$!33+++G!Rj`&FH7$Ffo$!3'******zJg\"zPF17$F[p$!3%*** ***z!GB@gF17$F`p$!3=+++sG/*\\(F17$Fep$!3%)*****zQZ*)Q)F17$Fjp$!3p***** pw!\\K))F17$F_q$!3$)*****H*3%H%*)F17$Fdq$!3j*****>u61\"))F17$Fiq$!3-++ +xe>2&)F17$F^r$!3_+++n#*G*3)F17$Fcr$!3E+++KwD,wF17$Fhr$!3_+++EicxqF17$ F]s$!3e*****fnsYa'F17$Fbs$!3Z+++rUcAgF17$Fgs$!3,+++[h+EbF17$F\\t$!3C++ +3Ybl]F17$Fat$!3A+++=)z$[YF17$Fft$!3)******>'R$*yUF17$Fin$!3!)*****\\C %\\fRF1-F^u6&F`u$\")#)eqkFcu$\"))eqk\"FcuF`\\lFdu-F$6%F_vF\\\\lFju-%+A XESLABELSG6$Q!6\"Fg\\l-%*LINESTYLEG6#Fjn-%'SYMBOLG6#%'CIRCLEG-%%VIEWG6 $%(DEFAULTGFc]l" 1 2 4 2 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" "Curve 3" "Curve 4" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 10 "Example 1b" }{TEXT 276 60 " .. constructi ng solutions using adaptive step-size control " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{PARA 0 "" 0 "" {TEXT -1 135 "The calculati ons of the last example may be repeated using adaptive step-size contr ol. Slightly fewer steps are needed than previously." }}{PARA 0 "" 0 " " {TEXT -1 31 "We find a discrete solution for" }}{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "d^2*y/(d*x^2)+3;" "6#,&*(%\"dG\"\"#%\" yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"F(\"\"$F(" }{TEXT -1 1 " " }{XPPEDIT 18 0 "dy/dx+2*y = sin(x);" "6#/,&*&%#dyG\"\"\"%#dxG!\"\"F'*&\"\"#F'%\"yGF 'F'-%$sinG6#%\"xG" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "y(0) = 2" "6#/-% \"yG6#\"\"!\"\"#" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "`y '`(0) = 1;" "6# /-%$y~'G6#\"\"!\"\"\"" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 23 " over the interval from " }{XPPEDIT 18 0 "x = -1;" "6#/%\"xG,$\"\"\"!\" \"" }{TEXT -1 4 " to " }{XPPEDIT 18 0 "x = 2" "6#/%\"xG\"\"#" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 76 "First we find the correspondin g analytical solution for comparison purposes." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 120 "de := diff( y(x),x$2)+3*diff(y(x),x)+2*y(x)=sin(x);\nic := y(0)=2,D(y)(0)=1;\ndsol ve(\{de,ic\},y(x)):\ng := unapply(rhs(%),x);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%%diffG6$-%\"yG6#%\"xG-%\"$G6$F-\"\"#\"\"\"*& \"\"$F2-F(6$F*F-F2F2*&F1F2F*F2F2-%$sinGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\"\"!\"\"#/--%\"DG6#F(F)\"\"\"" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"gGf*6#%\"xG6\"6$%)operatorG%&arrow GF(,**&#\"\"$\"#5\"\"\"-%$cosG6#9$F1!\"\"*&#F1F0F1-%$sinGF4F1F1*&#\"#; \"\"&F1-%$expG6#,$*&\"\"#F1F5F1F6F1F6*&#\"#6FDF1-F@6#,$F5F6F1F1F(F(F( " }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 151 "de := diff(y(x),x$2)+3*diff(y(x),x)+2*y(x)=sin(x);\n ic := y(0)=2,D(y)(0)=1;\npts := desolveT2(\{de,ic\},y(x),x=-1..2,outpu t=points):\ncomparewithfcn(pts,g);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# >%#deG/,(-%%diffG6$-%\"yG6#%\"xG-%\"$G6$F-\"\"#\"\"\"*&\"\"$F2-F(6$F*F -F2F2*&F1F2F*F2F2-%$sinGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$ /-%\"yG6#\"\"!\"\"#/--%\"DG6#F(F)\"\"\"" }}{PARA 6 "" 1 "" {TEXT -1 90 " -1 -8.94066725 function val: -8.940667249 rel err: 1.1185e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.9660363 939 -7.893709393 function val: -7.893709393 rel err: 0.0 000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.7941747451 -3.77833 028 function val: -3.77833028 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.6244778881 -1.189299158 function va l: -1.189299159 rel err: 8.4083e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.4454130922 0.4735738368 function val: 0.473573 837 rel err: 4.2232e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.253 980901 1.456726167 function val: 1.4567261672 rel err: \+ 1.3729e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.06 1.926 654518 function val: 1.9266545181 rel err: 5.1903e-11" }} {PARA 6 "" 1 "" {TEXT -1 90 " -0.01 1.989646647 funct ion val: 1.9896466475 rel err: 2.5130e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0 2 function val: \+ 2 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ 0.01 2.009653314 function val: 2.0096533142 rel err: 9.9520e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.06 \+ 2.048095776 function val: 2.0480957759 rel err: 4.8826e-11 " }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.2549540503 2.075391759 f unction val: 2.0753917588 rel err: 9.6367e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.4522427652 1.977755768 function val: \+ 1.9777557681 rel err: 5.0562e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ 0.6576562189 1.814201562 function val: 1.8142015619 \+ rel err: 5.5121e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.8703204978 \+ 1.625268857 function val: 1.6252688569 rel err: 6.1528e- 11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.090013051 1.437364282 \+ function val: 1.4373642819 rel err: 6.9572e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.31676169 1.265567195 function val: \+ 1.265567195 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.550823787 1.116471152 function val: 1.1164711516 \+ rel err: 3.5827e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.792672446 0.9906700954 function val: 0.9906700953 rel err: 1.0094 e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 2 0.901507807 function val: 0.90150780702 rel err: 2.2185e-11" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%!G" }}{PARA 6 "" 1 "" {TEXT -1 48 " \+ Maximum relative error: 8.4083e-10" }}{PARA 6 "" 1 "" {TEXT -1 60 " obtained for the input value: -0.6244778881" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 99 "The point s of the discrete solution can be plotted along with the graph of the \+ analytical solution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 93 "plot([pts,g(x)],x=-1..2,color=[black,cora l],\n style=[point,line],symbol=circle);" }}{PARA 13 "" 1 "" {GLPLOT2D 477 477 477 {PLOTDATA 2 "6'-%'CURVESG6%767$$!\"\"\"\"!$ !3i+++]smS*)!#<7$$!3c******QROg'*!#=$!3'******HR4P*yF-7$$!3o*****4XZ<% zF1$!3/+++!GI$yPF-7$$!3X+++\"))yZC'F1$!33+++e\"*H*=\"F-7$$!3G+++A48aWF 1$\"3\")*****zOQdt%F17$$!3\")******4!4)RDF1$\"3-+++nhsc9F-7$$!3y****** ********f!#>$\"34+++=XlE>F-7$$!3-+++++++5FK$\"31+++Zmk*)>F-7$$F*F*$\" \"#F*7$$\"3-+++++++5FK$\"3\"******RJ`'4?F-7$$\"3y**************fFK$\"3 #)*****fx&4[?F-7$$\"37+++.0a\\DF1$\"3%*******eF-7$$\"3M+++*=ild'F1$\"30+++i:?9=F-7$$\"3\")*****z(\\? .()F1$\"3,+++d)o_i\"F-7$$\"3!******408+4\"F-$\"35+++#GktV\"F-7$$\"35++ +!phnJ\"F-$\"3/+++&>nbE\"F-7$$\"3!******pyB3b\"F-$\"3\"******>:rk6\"F- 7$$\"33+++YCn#z\"F-$\"3]*****R&4q1**F17$FU$\"3%*******p!y],*F1-%'COLOU RG6&%$RGBGF*F*F*-%&STYLEG6#%&POINTG-F$6%7X7$F($!3xmXH]smS*)F-7$$!3u*** *\\(oUIn*F1$!3OzC$QjD7$zF-7$$!3[*****\\P&3Y$*F1$!3NYuh`^y+qF-7$$!3I** \\il:gh!*F1$!3g\"*zn?F>^iF-7$$!3C++Dcx6x()F1$!3%p'e^'fLQb&F-7$$!3%)** \\Pff=d%)F1$!3U$ejc@,!G[F-7$$!3b++]iTDP\")F1$!3uh()41G!*fTF-7$$!3*)*** ***\\;?:yF1$!3JC#eQ(ejTNF-7$$!3A****\\P\"\\J\\(F1$!3O@LY(p-S(HF-7$$!3U **\\P%GFE<(F1$!3owfcEv!eX#F-7$$!3g***\\7V0@&oF1$!3IAoF-7$$!3w++ DcexdiF1$!3C#)QCR,'[?\"F-7$$!3j***\\i+#QUcF1$!3))eiNtv,%G&F17$$!3$**** \\i!3%f+&F1$\"3uw[$)z=&GL&FK7$$!3;++D\"oS:P%F1$\"3*)RF7&3USI&F17$$!3h* ****\\<#)*=PF1$\"3A\">\\_NWLH*F17$$!3#*****\\(G3U9$F1$\"3ti\"*))p^W97F -7$$!3Y*****\\-\\r\\#F1$\"3C*o$e1%==Z\"F-7$$!3?+++vGVZ=F1$\"3S'\\rK`lB n\"F-7$$!3_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IxdzJw[V5F-7$$\"33++Dr\"[8v\"F- $\"3v])GY#QM55F-7$$\"3++++Ijy5=F-$\"3h7uM,GiA)*F17$$\"31+]P/)fT(=F-$\" 33$[R?s6$Q&*F17$$\"31+]i0j\"[$>F-$\"3OG_C&4b'z#*F17$FU$\"3c88/q!y],*F1 -Fgq6&Fiq$\"*++++\"!\")$\")AR!)\\F`clFT-F[r6#%%LINEG-%+AXESLABELSG6$Q \"x6\"Q!Fjcl-%'SYMBOLG6#%'CIRCLEG-%%VIEWG6$;F(FU%(DEFAULTG" 1 2 4 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }} }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 76 "We can \+ also obtain points along the graph of the derivative of the solution. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 247 "pts2 := desolveT2(\{de,ic\},x=-1..2,output=derivpts):\ncompar ewithfcn(pts2,D(g)); \+ plot([pts2,D(g)(x)],x=-1..2,color=[blue,brown],\n \+ style=[point,line],symbol=circle);" }}{PARA 6 "" 1 "" {TEXT -1 90 " -1 32.14099791 function val: 32. 140997911 rel err: 3.1113e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " - 0.9248696605 26.64439942 function val: 26.64439942 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.7536802617 \+ 17.07589871 function val: 17.075898713 rel err: 1.7569e-10 " }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.5846922675 10.65645799 f unction val: 10.656457983 rel err: 6.5688e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.4037900059 6.089731743 function val: \+ 6.089731742 rel err: 1.6421e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " \+ -0.2301054471 3.246121937 function val: 3.2461219377 \+ rel err: 2.1564e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.06 \+ 1.457709696 function val: 1.4577096964 rel err: 2.7440e- 10" }}{PARA 6 "" 1 "" {TEXT -1 90 " -0.01 1.071007707 \+ function val: 1.071007707 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0 1 function val: \+ 1 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.01 0.9309923736 function val: 0.9309923736 \+ rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.06 0.6143951162 function val: 0.6143951162 rel err: 0.0000 e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.2284114237 -0.1584782998 function val: -0.1584782999 rel err: 6.3100e-10" }}{PARA 6 " " 1 "" {TEXT -1 90 " 0.3995675717 -0.6013324042 function val: \+ -0.6013324042 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.5677191678 -0.8156661306 function val: -0.8156661306 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.7419984 424 -0.8913771042 function val: -0.8913771042 rel err: 0.0 000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 0.9278229312 -0.8740698 213 function val: -0.8740698213 rel err: 0.0000e+00" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.12196106 -0.7986781552 function va l: -0.79867815525 rel err: 6.2603e-11" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.323064791 -0.69546501 function val: -0.6954650 101 rel err: 1.4379e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.530 265877 -0.5869022832 function val: -0.58690228326 rel err: \+ 1.0223e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 1.743023406 -0.4880 451639 function val: -0.4880451638 rel err: 2.0490e-10" }} {PARA 6 "" 1 "" {TEXT -1 90 " 1.961073585 -0.4077827873 funct ion val: -0.40778278715 rel err: 3.6784e-10" }}{PARA 6 "" 1 "" {TEXT -1 90 " 2 -0.3959494245 function val: -0.39 594942453 rel err: 7.5767e-11" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#% !G" }}{PARA 6 "" 1 "" {TEXT -1 48 " Maximum relative erro r: 6.5688e-10" }}{PARA 6 "" 1 "" {TEXT -1 60 " obtained f or the input value: -0.5846922675" }}{PARA 13 "" 1 "" {GLPLOT2D 474 366 366 {PLOTDATA 2 "6'-%'CURVESG6%787$$!\"\"\"\"!$\"3I+++\"z*49K! #;7$$!3o*****\\g'p[#*!#=$\"3#******>%*RWm#F-7$$!3?+++7YKFC7$$!3y************* *f!#>$\"3++++'p4xX\"FC7$$!3-+++++++5FL$\"3#******pq252\"FC7$$F*F*$\"\" \"F*7$$\"3-+++++++5FL$\"3y*****ftB*4$*F17$$\"3y**************fFL$\"3!) *****>;^R9'F17$$\"31+++PU6%G#F1$!3++++)*Hy%e\"F17$$\"37+++xcF1$!3Q+++18mc\")F17$$\"39+++CW)*>uF1$!3[ +++U5x8*)F17$$\"3M+++7$H#y#*F1$!3%******H@)pS()F17$$\"32+++g5'>7\"FC$! 3g*****>b\"y')zF17$$\"3'******4zkIK\"FC$!3]++++,lapF17$$\"3%******p(eE I:FC$!3U+++KG-peF17$$\"31+++1M-VFC$! 31+++ty#y2%F17$$\"\"#F*$!3!)*****\\C%\\fRF1-%'COLOURG6&%$RGBGFUFU$\"*+ +++\"!\")-%&STYLEG6#%&POINTG-F$6%7W7$F($\"3C'ex6z*49KF-7$$!3u****\\(oU In*F1$\"3-OL\"RpkO'HF-7$$!3[*****\\P&3Y$*F1$\"3Asd5=6lIFF-7$$!3I**\\il :gh!*F1$\"3(>)>F@O=TDF-7$$!3C++Dcx6x()F1$\"3)yVD@D@LO#F-7$$!3%)**\\Pff =d%)F1$\"3w:+\\yjKw@F-7$$!3b++]iTDP\")F1$\"3(3ON/:iA+#F-7$$!3*)****** \\;?:yF1$\"3!f>(=q?DR=F-7$$!3A****\\P\"\\J\\(F1$\"3%>8'>\"\\)o(o\"F-7$ $!3g***\\7V0@&oF1$\"3\"*G%[9vQrT\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$!3)=`SHE1(\\tF17$$\"3/+](=Yb;J\"FC$!3+hjcoE\\:qF17$$\"3')* ***\\i@Ot8FC$!3eLc'e0#H'o'F17$$\"3')**\\PfL'zV\"FC$!3!R2IT+++!*>=+:FC$!3Q3/S$fL;-'F17$$\"3-++DE&4Qc\"FC$!3Re]E2p,-dF17$$\"3=+] P%>5pi\"FC$!3')y=0NO>)R&F17$$\"39+++bJ*[o\"FC$!3yQ/>2=[K^F17$$\"33++Dr \"[8v\"FC$!3uS1=^+gX[F17$$\"3++++Ijy5=FC$!3'\\cH\"*pwhg%F17$$\"31+]P/) fT(=FC$!3AS95thmpVF17$$\"31+]i0j\"[$>FC$!3=B+di@)>;%F17$F_r$!3k2[?XU\\ fRF1-Fdr6&Ffr$\")#)eqkFir$\"))eqk\"FirF[dl-F[s6#%%LINEG-%+AXESLABELSG6 $Q\"x6\"Q!Fddl-%'SYMBOLG6#%'CIRCLEG-%%VIEWG6$;F(F_r%(DEFAULTG" 1 2 4 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 90 "A con tinuous solution in the form of a numerical function can be obtained v ia the option \"" }{TEXT 272 18 "output=localtaylor" }{TEXT -1 22 "\" \+ ( or equivalently \"" }{TEXT 272 16 "output=procedure" }{TEXT -1 93 " \" ) which uses local Taylor series to interpolate between the points \+ of a discrete solution. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 191 "de := diff(y(x),x$2)+3*diff(y(x),x )+2*y(x)=sin(x);\nic := y(0)=2,D(y)(0)=1;\ngn := desolveT2(\{de,ic\},x =-1..2,output=localtaylor);\nplot([g(x),'gn'(x)],x=-1..2,color=[red,gr een],thickness=[1,2]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%% diffG6$-%\"yG6#%\"xG-%\"$G6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0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 71 "A continuous form for the derivative can also be found via the option \"" }{TEXT 272 17 "ouput= derivtaylor" }{TEXT -1 3 "\". " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 203 "de := diff(y(x),x$2)+3*diff (y(x),x)+2*y(x)=sin(x);\nic := y(0)=2,D(y)(0)=1;\ndgn := desolveT2(\{d e,ic\},x=-1..2,output=derivtaylor);\nplot([D(g)(x),'dgn'(x)],x=-1..2,c olor=[brown,aquamarine],thickness=[1,3]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%%diffG6$-%\"yG6#%\"xG-%\"$G6$F-\"\"#\"\"\"*& \"\"$F2-F(6$F*F-F2F2*&F1F2F*F2F2-%$sinGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\"\"!\"\"#/--%\"DG6#F(F)\"\"\"" }} {PARA 13 "" 1 "" {GLPLOT2D 376 328 328 {PLOTDATA 2 "6&-%'CURVESG6%7W7$ $!\"\"\"\"!$\"3C'ex6z*49K!#;7$$!3u****\\(oUIn*!#=$\"3-OL\"RpkO'HF-7$$! 3[*****\\P&3Y$*F1$\"3Asd5=6lIFF-7$$!3I**\\il:gh!*F1$\"3(>)>F@O=TDF-7$$ !3C++Dcx6x()F1$\"3)yVD@D@LO#F-7$$!3%)**\\Pff=d%)F1$\"3w:+\\yjKw@F-7$$! 3b++]iTDP\")F1$\"3(3ON/:iA+#F-7$$!3*)******\\;?:yF1$\"3!f>(=q?DR=F-7$$ !3A****\\P\"\\J\\(F1$\"3%>8'>\"\\)o(o\"F-7$$!3g***\\7V0@&oF1$\"3\"*G%[ 9vQrT\"F-7$$!3w++DcexdiF1$\"3]+6!=$[\\*>\"F-7$$!3j***\\i+#QUcF1$\"3eFt %yH^O+\"F-7$$!3$****\\i!3%f+&F1$\"3]A*fgXw!)G)!#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45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "xx := evalf(sqrt(2));\nD(g)(xx);\ndgn(xx);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#xxG$\"+iN@99!\"*" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# $!+%36%pk!#5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$!+$36%pk!#5" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 127 "A pair o f numerical of numerical procedures for the solution and its derivativ e can be obtained simultaneously via the option \"" }{TEXT 272 21 "out put=procedure_pair" }{TEXT -1 7 "\" (or \"" }{TEXT 272 16 "output=proc _pair" }{TEXT -1 6 "\" or \"" }{TEXT 272 18 "output=taylor_pair" } {TEXT -1 4 "\"). " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 187 "de := diff(y(x),x$2)+3*diff(y(x),x)+2*y(x)=s in(x);\nic := y(0)=2,D(y)(0)=1;\n(gn2,dgn2) := desolveT2(\{de,ic\},x=- 1..2,output=proc_pair);\nplot(['gn2'(x),'dgn2'(x)],x=-1..2,color=[red, brown]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%%diffG6$-%\"yG6 #%\"xG-%\"$G6$F-\"\"#\"\"\"*&\"\"$F2-F(6$F*F-F2F2*&F1F2F*F2F2-%$sinGF, " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\"\"!\"\"#/--%\"D G6#F(F)\"\"\"" }}{PARA 13 "" 1 "" {GLPLOT2D 377 336 336 {PLOTDATA 2 "6 &-%'CURVESG6$7X7$$!\"\"\"\"!$!+]smS*)!\"*7$$!+!pUIn*!#5$!+TcAJzF-7$$!+ v`3Y$*F1$!+a^y+qF-7$$!+l:gh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fby$!+w,HWjF17$Fgy$!+$fL;-'F17$F\\z$!+3p,-dF17$Faz$!+PO>)R&F17$Ffz$!+2 =[K^F17$F[[l$!+_+gX[F17$F`[l$!+*pwhg%F17$Fe[l$!+uhmpVF17$Fj[l$!+h@)>;% F17$F_\\l$!+XU\\fRF1-Fd\\l6&Ff\\l$\")#)eqkFi\\l$\"))eqk\"Fi\\lFbgl-%+A XESLABELSG6$Q\"x6\"Q!Fhgl-%%VIEWG6$;F(F_\\l%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 108 "Discrete lists of points for the solution and its derivative can be obtained s imultaneously via the option \"" }{TEXT 272 18 "output=points_pair" } {TEXT -1 2 "\" " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 244 "de := diff(y(x),x$2)+3*diff(y(x),x)+2*y(x)=si n(x);\nic := y(0)=2,D(y)(0)=1;\n(pts3,pts4) := desolveT2(\{de,ic\},x=- 1..2,output=points_pair):\nplot([pts3$2,pts4$2],color=[red$2,brown$2], \n style=[point,line,point,line],linestyle=2,symbol=circle);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%%diffG6$-%\"yG6#%\"xG-%\"$G 6$F-\"\"#\"\"\"*&\"\"$F2-F(6$F*F-F2F2*&F1F2F*F2F2-%$sinGF," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\"\"!\"\"#/--%\"DG6#F(F)\" \"\"" }}{PARA 13 "" 1 "" {GLPLOT2D 477 477 477 {PLOTDATA 2 "6*-%'CURVE SG6%787$$!\"\"\"\"!$!3i+++]smS*)!#<7$$!3m******)Qu#*R*!#=$!3!)*****Hs, q9(F-7$$!3a+++A:qiwF1$!3%******fQfnE$F-7$$!3q*****z:jM'fF1$!3W+++o!pHm )F17$$!3=+++)GiU8%F1$\"3_*****>wQ[&oF17$$!3%******Rg(ycBF1$\"30+++@#G( >:F-7$$!3y**************f!#>$\"34+++=XlE>F-7$$!3-+++++++5FK$\"31+++Zmk *)>F-7$$F*F*$\"\"#F*7$$\"3-+++++++5FK$\"3\"******RJ`'4?F-7$$\"3y****** ********fFK$\"3#)*****fx&4[?F-7$$\"32+++*\\WoL#F1$\"37+++?w*)z?F-7$$\" 3u*****zBTT4%F1$\"35+++@Fy0?F-7$$\"3'******fgS2z&F1$\"3/+++!\\74)=F-7$ $\"3_+++8G\"*ovF1$\"3&******z60ls\"F-7$$\"3s*****z(>Gl%*F1$\"3#******4 z1$e:F-7$$\"3-+++d$eT9\"F-$\"3-+++(4**RR\"F-7$$\"3!******\\lM([8F-$\"3 \"******>O'\\V7F-7$$\"3/+++c!)Rf:F-$\"3-+++R_a66F-7$$\"3/+++F-$\"36+++!4)zD!*F17$FU$\"3%******* p!y],*F1-%'COLOURG6&%$RGBG$\"*++++\"!\")FTFT-%&STYLEG6#%&POINTG-F$6%F& F`r-Fhr6#%%LINEG-F$6%787$F($\"3I+++\"z*49K!#;7$F/$\"3#******p')>uw#Ffs 7$F5$\"3')*****pC.hw\"Ffs7$F:$\"3$******4**=B5\"Ffs7$F?$\"3W+++ZTA'G'F -7$FD$\"3%*******ofL>LF-7$FI$\"3++++'p4xX\"F-7$FO$\"3#******pq252\"F-7 $FT$\"\"\"F*7$FX$\"3y*****ftB*4$*F17$Fgn$\"3!)*****>;^R9'F17$F\\o$!3++ ++'>)fl' )4*H*)F17$F`p$!31+++9d'po)F17$Fep$!3o*****zD\"=!)yF17$Fjp$!3A+++@$Qw\" oF17$F_q$!3<+++NnxBdF17$Fdq$!3?+++^pnXZF17$Fiq$!3=+++:\"ou'RF17$FU$!3! )*****\\C%\\fRF1-Far6&Fcr$\")#)eqkFfr$\"))eqk\"FfrFjwFgr-F$6%FbsFfwF]s -%+AXESLABELSG6$Q!6\"Fax-%*LINESTYLEG6#FV-%'SYMBOLG6#%'CIRCLEG-%%VIEWG 6$%(DEFAULTGF]y" 1 2 4 2 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" "Curve 3" "Curve 4" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 9 "Example 2" }{TEXT 277 75 " .. performing c alculations (e.g. root-finding) using continuous solutions " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{PARA 0 "" 0 "" {TEXT -1 46 "C onsider the non-linear differential equation:" }}{PARA 256 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "d^2*y/(d*x^2) = x^3;" "6#/*(%\"dG\"\"#% \"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"*$F+\"\"$" }{TEXT -1 1 " " }{XPPEDIT 18 0 "dy/dx+sin(y);" "6#,&*&%#dyG\"\"\"%#dxG!\"\"F&-%$sinG6#%\"yGF&" } {TEXT -1 3 ", " }{XPPEDIT 18 0 "y(0) = 2" "6#/-%\"yG6#\"\"!\"\"#" } {TEXT -1 3 ", " }{XPPEDIT 18 0 "`y '`(0) = 1" "6#/-%$y~'G6#\"\"!\"\" \"" }{TEXT -1 2 ". " }}{PARA 0 "" 0 "" {TEXT -1 67 "First we find a di screte solution using adaptive step-size control." }}{PARA 0 "" 0 "" {TEXT -1 89 "Joining the points of the discrete solution gives the gen eral form of the solution curve." }}{PARA 0 "" 0 "" {TEXT -1 2 " " }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 267 "de := diff(y(x),x$2)=x^3*di ff(y(x),x)+sin(y(x));\nic := y(0)=2,D(y)(0)=1;\nsoln := desolveT2(\{de ,ic\},x=-1.5..1.5,output=points):\nplot([soln,soln],x=-1.5..1.5,color= [coral,black],style=[line,point],\n linestyle=2 ,symbol=circle,labels=[`x`,`y(x)`]);" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#>%#deG/-%%diffG6$-%\"yG6#%\"xG-%\"$G6$F,\"\"#,&*&)F,\"\"$\"\"\"-F'6$ F)F,F5F5-%$sinG6#F)F5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\" yG6#\"\"!\"\"#/--%\"DG6#F(F)\"\"\"" }}{PARA 13 "" 1 "" {GLPLOT2D 496 345 345 {PLOTDATA 2 "6(-%'CURVESG6%7>7$$!3++++++++:!#<$\"3++++Y(zTe\"F *7$$!3%******>_>5W\"F*$\"3!*******e(\\ma\"F*7$$!3))*****p)f()\\8F*$\"3 #******4s\"=1:F*7$$!3-+++.'z(e7F*$\"3#******4Fs8[\"F*7$$!3'******40ye9 \"F*$\"3%******>damY\"F*7$$!3\"*******3c.L5F*$\"33+++*[-gY\"F*7$$!3+++ ++%G>2*!#=$\"33+++kTXz9F*7$$!33+++'o(QdwFI$\"3)******f#4=6:F*7$$!3b*** ***yhZHgFI$\"3)******>aP$p:F*7$$!3y*****H1()y;%FI$\"3!******4tS`m\"F*7 $$!31+++->s!Q#FI$\"3))******p,W)y\"F*7$$!3y**************f!#>$\"3\"*** ***f*4lT>F*7$$!3-+++++++5F]o$\"31+++Mb/!*>F*7$$\"\"!Fgo$\"\"#Fgo7$$\"3 -+++++++5F]o$\"37+++&RX+,#F*7$$\"3y**************fF]o$\"3!)*****p3@;1# F*7$$\"3'******HTt'zBFI$\"3!)*****f)*QEE#F*7$$\"3;+++2f$)fTFI$\"3=+++A ul)[#F*7$$\"3:+++dmzUfFI$\"3%******Ro#ePFF*7$$\"3\\+++#H()FI$\"3))*****zQ0Q<$F*7$$\"3%******4Bi[+\" F*$\"36+++i2w2MF*7$$\"3-+++aZq66F*$\"3#******p)*Hyh$F*7$$\"3#******fd) e=7F*$\"39+++4V&e&QF*7$$\"34+++08'eJ\"F*$\"35+++WUC4TF*7$$\"33+++\")H$ RS\"F*$\"3q******)>:]Q%F*7$$\"3%******>b%>%[\"F*$\"31+++KO#\\p%F*7$$\" 3++++++++:F*$\"3-+++!*R*[w%F*-%'COLOURG6&%$RGBG$\"*++++\"!\")$\")AR!) \\FftFfo-%&STYLEG6#%%LINEG-F$6%F&-Fat6&FctFgoFgoFgo-Fjt6#%&POINTG-%+AX ESLABELSG6$%\"xG%%y(x)G-%*LINESTYLEG6#Fio-%'SYMBOLG6#%'CIRCLEG-%%VIEWG 6$;$!#:!\"\"$\"#:Ffv%(DEFAULTG" 1 2 4 2 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 133 "Next we find a continuous solu tions in the form of a numerical procedures for both the solution and \+ its derivative over the interval " }{XPPEDIT 18 0 "[-3/2,3/2]" "6#7$,$ *&\"\"$\"\"\"\"\"#!\"\"F)*&F&F'F(F)" }{TEXT -1 1 "." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 202 "de := dif f(y(x),x$2)=x^3*diff(y(x),x)+sin(y(x));\nic := y(0)=2,D(y)(0)=1;\n(fn, dfn) := desolveT2(\{de,ic\},x=-3/2..3/2,output=proc_pair);\nplot(['fn' (x),'dfn'(x)],x=-1.5..1.5,color=[red,COLOR(RGB,.6,.4,1)]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/-%%diffG6$-%\"yG6#%\"xG-%\"$G6$F,\"\" #,&*&)F,\"\"$\"\"\"-F'6$F)F,F5F5-%$sinG6#F)F5" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6$/-%\"yG6#\"\"!\"\"#/--%\"DG6#F(F)\"\"\"" }} {PARA 13 "" 1 "" {GLPLOT2D 393 340 340 {PLOTDATA 2 "6&-%'CURVESG6$7S7$ $!#:!\"\"$\"+Y(zTe\"!\"*7$$!+Q&3YV\"F-$\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Y7$Fdq$\"+y,!)3qFY7$Fiq$\"+8//MwFY7$F^r$\"+&*[HG#)FY7$Fcr$\"+ p$)3V))FY7$Fhr$\"+VBJ*R*FY7$F]s$\"+]3`')**FY7$Fbs$\"+x<(y0\"F-7$Fgs$\" +bRp26F-7$F\\t$\"+\"49&f6F-7$Fat$\"+kGz57F-7$Fft$\"+IOye7F-7$F[u$\"+0R N.8F-7$F`u$\"+wp5^8F-7$Feu$\"+9j,$R\"F-7$Fju$\"+opaP9F-7$F_v$\"+A8jy9F -7$Fdv$\"+\")HlD:F-7$Fiv$\"+`]Vt:F-7$F^w$\"+ch2H;F-7$Fcw$\"+6pe\"p\"F- 7$Fhw$\"+9t.pF-7$Fgx$\"+zCR;@F-7$F\\ y$\"+%RQ?G#F-7$Fay$\"+sOMFDF-7$Ffy$\"+[$)[:GF-7$$\"+nIZU8F-$\"+A!oS+$F -7$F[z$\"+w@4BKF-7$$\"+b!)[/9F-$\"+9q%oY$F-7$F`z$\"+$eU1v$F-7$$\"+`\"3 uY\"F-$\"+=4f4TF-7$Fez$\"+.%zo`%F--%&COLORG6&F\\[l$\"\"'F*$\"\"%F*$\" \"\"Fa[l-%+AXESLABELSG6$Q\"x6\"Q!Fefl-%%VIEWG6$;F(Fez%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2 " }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 62 "We \+ can determine where the derivative is zero. This gives the " }{TEXT 271 1 "x" }{TEXT -1 57 " value at the minimum point on the graph of th e solution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 43 "xmin := secant('dfn(x)',x=-1.1..-1);\nfn(%);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%%xminG$!+qlO%3\"!\"*" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+Q'=ZY\"!\"*" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 14 "The procedure " }{TEXT 0 7 "findmin" } {TEXT -1 41 " from another worksheet may also be used." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "findmin ('fn'(x),x=-1.5..-0.5);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7$$!+qlO%3 \"!\"*$\"+Q'=ZY\"F&" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 113 "The following plots illustrates the relationship betwe en the solution and the derivative as the parametric curve " }}{PARA 256 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "PIECEWISE([y = y(x), ``],[u = y*`'`(x), ``]);" "6#-%*PIECEWISEG6$7$/%\"yG-F(6#%\"xG%!G7$/%\"uG*&F (\"\"\"-%\"'G6#F+F1F," }{TEXT -1 2 ". " }}{PARA 0 "" 0 "" {TEXT -1 25 "Such a curve is called a " }{TEXT 265 11 "phase curve" }{TEXT -1 4 " \+ or " }{TEXT 265 10 "trajectory" }{TEXT -1 2 ". " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 109 "plot(['fn'( x),'dfn'(x),x=0..10],color=COLOR(RGB,.5,0,1),\n labe ls=[`y = y(x)`,`u = y'(x)`]);" }{TEXT -1 0 "" }}{PARA 13 "" 1 "" {GLPLOT2D 488 391 391 {PLOTDATA 2 "6&-%'CURVESG6#7?7$$\"\"#\"\"!$\"\" \"F*7$$\"+r#*G9@!\"*$\"+#\\yj4\"F07$$\"+BPvQAF0$\"+1!zl=\"F07$$\"+a;ya BF0$\"+wEuf7F07$$\"+0:`xCF0$\"+OJ^G8F07$$\"+x;F07$$\"+U>D\"f$F0$ \"+K6r[?F07$$\"+l^q&p$F0$\"+W1Dt@F07$$\"+pu'p!QF0$\"+CLwCBF07$$\"+>GbE RF0$\"+ocy5DF07$$\"+l]N#*RF0$\"+'>FQi#F07$$\"+>iAhSF0$\"+QlY]FF07$$\"+ 0,aLTF0$\"+c)>F*GF07$$\"+Yms4UF0$\"+Fu&H0$F07$$\"+`=G!H%F0$\"+3s(RB$F0 7$$\"+7*zdP%F0$\"+ec4RMF07$$\"+ty)oY%F0$\"+P.EsOF07$$\"+hNQkXF0$\"+X+> QRF07$$\"+\"*yf " 0 "" {MPLTEXT 1 0 1 ";" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 9 "Example 3" }{TEXT 278 80 " .. the phase cu rve or trajectory associated with a solution and its derivative " }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{PARA 0 "" 0 "" {TEXT -1 34 "Consider the initial value problem" }}{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "d^2*y/(d*x^2)+2;" "6#,&*(%\"dG\"\"#%\"yG\"\" \"*&F%F(*$%\"xGF&F(!\"\"F(F&F(" }{TEXT -1 1 " " }{XPPEDIT 18 0 "dy/dx+ 2*y = exp(-x/8)*cos(x);" "6#/,&*&%#dyG\"\"\"%#dxG!\"\"F'*&\"\"#F'%\"yG F'F'*&-%$expG6#,$*&%\"xGF'\"\")F)F)F'-%$cosG6#F3F'" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "y(0) = 1;" "6#/-%\"yG6#\"\"!\"\"\"" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "`y '`(0) = 0;" "6#/-%$y~'G6#\"\"!F'" }{TEXT -1 2 ". " }}{PARA 0 "" 0 "" {TEXT -1 37 "First we find an analytical solution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 130 "de := diff(y(x),x$2)+2*diff(y(x),x)+2*y(x)=exp(-x/8)*cos(x);\ni c := y(0)=1,D(y)(0)=0;\ndsolve(\{de,ic\},y(x)):\ng := unapply(rhs(%),x );" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#deG/,(-%%diffG6$-%\"yG6#%\"xG -%\"$G6$F-\"\"#\"\"\"*&F1F2-F(6$F*F-F2F2*&F1F2F*F2F2*&-%$expG6#,$*&\" \")!\"\"F-F2F>F2-%$cosGF,F2" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#icG6 $/-%\"yG6#\"\"!\"\"\"/--%\"DG6#F(F)F*" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"gGf*6#%\"xG6\"6$%)operatorG%&arrowGF(,(*&#\"$>(\"%N@\"\"\"*&-%$ expG6#,$9$!\"\"F1-%$sinG6#F7F1F1F1*&#\"$T#\"$0$F1*&F3F1-%$cosGF;F1F1F1 *&#F1F0F1*&,&*&\"%C5F1F9F1F1*&\"$[%F1FAF1F1F1-F46#,$*&#F1\"\")F1F7F1F8 F1F1F1F(F(F(" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 18 "With the option ''" }{TEXT 272 21 "output=procedure_pair " }{TEXT -1 3 "'' " }{TEXT 0 9 "desolveT2" }{TEXT -1 85 " constructs n umerical procedures for the solution and its derivative simultaneously . " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 210 "de := diff(y(x),x$2)+2*diff(y(x),x)+2*y(x)=exp(-x/8) *cos(x);\nic := y(0)=1,D(y)(0)=0;\n(gn,dgn) := desolveT2(\{de,ic\},x=0 ..25,output=procedure_pair);\nplot([g(x),'gn'(x)],x=0..25,color=[red,g reen],thickness=[1,2]);" }{TEXT -1 0 "" }}{PARA 13 "" 1 "" {GLPLOT2D 445 268 268 {PLOTDATA 2 "6&-%'CURVESG6%7fq7$$\"\"!F)$\"\"\"F)7$$\"3\\L L$3FWYs#!#=$\"3!H#ek$4=go*F/7$$\"3)pmm;a)G\\aF/$\"36%fCAE5%H*)F/7$$\"3 #***\\7`p)*>yF/$\"3c4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m$!+#[_eu\"Figm7$$\"+i0cd?F[gm$!+U;drDFigm7$$\"+#* \\[$3#F[gm$!+JXZwJFigm7$$\"+G2u'4#F[gm$!+&[s8R$Figm7$$\"+lk**4@F[gm$!+ _M#)RNFigm7$$\"+,ADB@F[gm$!+m8R@OFigm7$$\"+Qz]O@F[gm$!+'pEoj$Figm7$$\" +$))*zi@F[gm$!+sv?![$Figm7$$\"+H=4*=#F[gm$!+[]X)4$Figm7$$\"+&R^K@#F[gm $!+'3)R$e#Figm7$$\"+i4TPAF[gm$!+:*\\1&>Figm7$$\"+V,z#H#F[gm$!+)3iq\"HF ^]o7$$\"+U>KUBF[gm$\"+p'pU4\"Figm7$$\"+cvsoBF[gm$\"+yF@z;Figm7$$\"+qJ8 &R#F[gm$\"+5AR7@Figm7$$\"+8nS?CF[gm$\"+qWVmBFigm7$$\"+b-oXCF[gm$\"+2b& pX#Figm7$$\"+G,%GZ#F[gm$\"+aI8xBFigm7$Fafm$\"+tKWJ@Figm-Fffm6&Fhfm$\"* ++++\"F[gm$\")AR!)\\F[gmF(-F_gm6#\"\"#-%+AXESLABELSG6$Q\"x6\"Q!F^cp-%% VIEWG6$;F(Fafm%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 113 "The following plots illustrates the rela tionship between the solution and the derivative as the parametric cur ve " }}{PARA 256 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "PIECEWISE([y = y(x), ``],[u = y*`'`(x), ``]);" "6#-%*PIECEWISEG6$7$/%\"yG-F(6#%\"xG% !G7$/%\"uG*&F(\"\"\"-%\"'G6#F+F1F," }{TEXT -1 2 ". " }}{PARA 0 "" 0 " " {TEXT -1 25 "Such a curve is called a " }{TEXT 265 11 "phase curve" }{TEXT -1 4 " or " }{TEXT 265 10 "trajectory" }{TEXT -1 2 ". " }} {P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0 1 ";" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 5 "Tasks" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 2 "Q1" }}{PARA 0 "" 0 "" {TEXT -1 57 "Find an analytical solution for the initial val ue problem" }}{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "d^2*y/ (d*x^2)+20;" "6#,&*(%\"dG\"\"#%\"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"F(\"#?F (" }{TEXT -1 1 " " }{XPPEDIT 18 0 "dy/dx+125*y = 9*sin(5*x);" "6#/,&*& %#dyG\"\"\"%#dxG!\"\"F'*&\"$D\"F'%\"yGF'F'*&\"\"*F'-%$sinG6#*&\"\"&F'% \"xGF'F'" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "y(0) = 0" "6#/-%\"yG6#\"\" !F'" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "`y '`(0) = 0;" "6#/-%$y~'G6#\" \"!F'" }{TEXT -1 2 ". " }}{PARA 0 "" 0 "" {TEXT -1 42 "and plot its gr aph over the interval from " }{XPPEDIT 18 0 "x = 0" "6#/%\"xG\"\"!" } {TEXT -1 4 " to " }{XPPEDIT 18 0 "x = 2" "6#/%\"xG\"\"#" }{TEXT -1 2 " . " }}{PARA 0 "" 0 "" {TEXT -1 54 "Also find a discrete numerical over the interval from " }{XPPEDIT 18 0 "x = 0" "6#/%\"xG\"\"!" }{TEXT -1 4 " to " }{XPPEDIT 18 0 "x = 2" "6#/%\"xG\"\"#" }{TEXT -1 106 " by an \+ order 9 Taylor series method using 40 steps and compare this solution \+ with the analytical solution." }}{PARA 0 "" 0 "" {TEXT -1 43 "________ ___________________________________" }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 43 "_______________________________ ____________" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 2 "Q2" }}{PARA 0 "" 0 "" {TEXT -1 96 "Use a Taylor series method to find a continuous numerical solution for the \+ initial value problem" }}{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "d^2*y/(d*x^2)+x^2;" "6#,&*(%\"dG\"\"#%\"yG\"\"\"*&F%F(*$%\"xGF&F (!\"\"F(*$F+F&F(" }{TEXT -1 1 " " }{XPPEDIT 18 0 "dy/dx+x*y = 0;" "6#/ ,&*&%#dyG\"\"\"%#dxG!\"\"F'*&%\"xGF'%\"yGF'F'\"\"!" }{TEXT -1 14 ", y (0) = 0, " }{XPPEDIT 18 0 "`y '`(0) = 1;" "6#/-%$y~'G6#\"\"!\"\"\"" } {TEXT -1 2 ", " }}{PARA 0 "" 0 "" {TEXT -1 23 "over the interval from \+ " }{XPPEDIT 18 0 "x = 0" "6#/%\"xG\"\"!" }{TEXT -1 4 " to " }{XPPEDIT 18 0 "x = 5" "6#/%\"xG\"\"&" }{TEXT -1 22 ", and plot its graph. " }} {PARA 0 "" 0 "" {TEXT -1 99 "Find an analytical solution, and compare \+ the values of the numerical and analytical solutions when " }{XPPEDIT 18 0 "x = pi^2/2" "6#/%\"xG*&%#piG\"\"#F'!\"\"" }{TEXT -1 1 "." }} {PARA 0 "" 0 "" {TEXT -1 43 "_________________________________________ __" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 " " {TEXT -1 43 "___________________________________________" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 2 "Q3" }}{PARA 0 "" 0 "" {TEXT -1 107 "Use a Taylor series method t o find a continuous numerical solution for the non-linear initial valu e problem" }}{PARA 256 "" 0 "" {TEXT -1 2 " " }{XPPEDIT 18 0 "d^2*y/( d*x^2)+x^2;" "6#,&*(%\"dG\"\"#%\"yG\"\"\"*&F%F(*$%\"xGF&F(!\"\"F(*$F+F &F(" }{TEXT -1 1 " " }{XPPEDIT 18 0 "dy/dx+x*y^2 = 0;" "6#/,&*&%#dyG\" \"\"%#dxG!\"\"F'*&%\"xGF'*$%\"yG\"\"#F'F'\"\"!" }{TEXT -1 3 ", " } {XPPEDIT 18 0 "y(0) = 0" "6#/-%\"yG6#\"\"!F'" }{TEXT -1 3 ", " } {XPPEDIT 18 0 "`y '`(0) = 1;" "6#/-%$y~'G6#\"\"!\"\"\"" }{TEXT -1 2 ", " }}{PARA 0 "" 0 "" {TEXT -1 23 "over the interval from " }{XPPEDIT 18 0 "x = 0" "6#/%\"xG\"\"!" }{TEXT -1 4 " to " }{XPPEDIT 18 0 "x = 5 " "6#/%\"xG\"\"&" }{TEXT -1 21 ", and plot its graph." }}{PARA 0 "" 0 "" {TEXT -1 91 "Plot the graph of the derivative of the solution and a lso plot the associated phase curve. " }}{PARA 0 "" 0 "" {TEXT -1 43 " ___________________________________________" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" } }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 43 "____________________ _______________________" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 "; " }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1 ";" }}}}}{MARK "4 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }