(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 51258, 1551]*) (*NotebookOutlinePosition[ 52076, 1581]*) (* CellTagsIndexPosition[ 52000, 1575]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Simplification of higher order splittings", "Title"], Cell["The basic fourth order method has 9 steps requiring 6 FFT's", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(SplitStep`Private`SplitStep[4, dt, \ v, \ L]\)[u]\)], "Input", CellLabel->"In[22]:="], Cell[BoxData[ \(\(SplitStep`Private`Linear[dt\/\(2\ \((2 - 2\^\(1/3\))\)\), L]\)[ \(SplitStep`Private`Nonlinear[dt\/\(2 - 2\^\(1/3\)\), v]\)[ \(SplitStep`Private`Linear[dt\/\(2\ \((2 - 2\^\(1/3\))\)\), L]\)[ \(SplitStep`Private`Linear[ \(-\(dt\/\(2\^\(2/3\)\ \((2 - 2\^\(1/3\))\)\)\)\), L]\)[ \(SplitStep`Private`Nonlinear[ \(-\(\(2\^\(1/3\)\ dt\)\/\(2 - 2\^\(1/3\)\)\)\), v]\)[ \(SplitStep`Private`Linear[ \(-\(dt\/\(2\^\(2/3\)\ \((2 - 2\^\(1/3\))\)\)\)\), L]\)[ \(SplitStep`Private`Linear[dt\/\(2\ \((2 - 2\^\(1/3\))\)\), L]\)[\(SplitStep`Private`Nonlinear[ dt\/\(2 - 2\^\(1/3\)\), v]\)[ \(SplitStep`Private`Linear[ dt\/\(2\ \((2 - 2\^\(1/3\))\)\), L]\)[u]]]]]]]]]\)], "Output", CellLabel->"Out[22]="] }, Open ]], Cell["Versus 7 requiring 4 FFT's with simplification", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(SplitStep`Private`SimplifySplitStep[4, {dt, \ v, \ L}, \ Infinity]\)], "Input", CellLabel->"In[23]:="], Cell[BoxData[ \(Function[{dt, v, L}, \(SplitStep`Private`Linear[dt\/\(2\ \((2 - 2\^\(1/3\))\)\), L]\)[ \(SplitStep`Private`Nonlinear[dt\/\(2 - 2\^\(1/3\)\), v]\)[ \(SplitStep`Private`Linear[ \(\((\(-1\) + 2\^\(1/3\))\)\ dt\)\/\(2\ \((\(-2\) + \ 2\^\(1/3\))\)\), L]\)[ \(SplitStep`Private`Nonlinear[ \(-\(\(2\^\(1/3\)\ dt\)\/\(2 - 2\^\(1/3\)\)\)\), v]\)[ \(SplitStep`Private`Linear[ \(\((\(-1\) + 2\^\(1/3\))\)\ dt\)\/\(2\ \((\(-2\) + \ 2\^\(1/3\))\)\), L]\)[ \(SplitStep`Private`Nonlinear[dt\/\(2 - 2\^\(1/3\)\), v]\)[ \(SplitStep`Private`Linear[ dt\/\(2\ \((2 - 2\^\(1/3\))\)\), L]\)[#1]]]]]]] &] \)], "Output", CellLabel->"Out[23]="] }, Open ]], Cell["\<\ The difference becomes even greater for higher order. Since the expressions \ will be too large to really look at, a count is made.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(lc\ = \ \(nc\ = \ 0\); Cases[\(SplitStep`Private`SplitStep[10, dt, \ v, \ L]\)[u], \ \((x : \((SplitStep`Private`Linear\ | \ SplitStep`Private`Nonlinear)\))\) \[RuleDelayed] \ If[x\ === \ SplitStep`Private`Linear, \ \(lc++\), \ \(nc++\)], \ {0, Infinity}, \ Heads \[Rule] True];\), "\[IndentingNewLine]", \({lc, \ nc}\)}], "Input", CellLabel->"In[24]:="], Cell[BoxData[ \({162, 81}\)], "Output", CellLabel->"Out[25]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(lc\ = \ \(nc\ = \ 0\); Cases[SplitStep`Private`SimplifySplitStep[10, {dt, \ v, \ L}], \ \((x : \((SplitStep`Private`Linear\ | \ SplitStep`Private`Nonlinear)\))\) \[RuleDelayed] \ If[x\ === \ SplitStep`Private`Linear, \ \(lc++\), \ \(nc++\)], \ {0, Infinity}, \ Heads \[Rule] True];\), "\[IndentingNewLine]", \({lc, \ nc}\)}], "Input", CellLabel->"In[26]:="], Cell[BoxData[ \({82, 81}\)], "Output", CellLabel->"Out[27]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Application to another equation", "Title", CellTags->"ODExample"], Cell["\<\ Here is a precomputed accurate solution of an ordinary differential equation.\ \ \>", "Text"], Cell[BoxData[ \(accsol\ = \ SetPrecision[ NDSolve[{\(x''\)[t]\ + \ x[t] \((1\ + \ Sin[x[t]])\)\ \[Equal] \ 0, x[0]\ \[Equal] \ 1, \ \(x'\)[0]\ \[Equal] \ 0}, x, t, Method \[Rule] NDSolve`Extrapolation, \ WorkingPrecision \[Rule] 40], 30]\)], "Input", Evaluatable->False], Cell["\<\ Since this takes a while to compute, I have saved the value here:\ \>", "Text"], Cell[BoxData[ \(\(accsol\ = \ {0.2409993005122375043176174260655668801334827`30, \(-1.2389427677916917599937563887743513104124595`30\)};\)\)], "Input", CellLabel->"In[28]:="], Cell["\<\ This is a convenient equation to check the temporal convergence of the \ splitting on since it can be done without the expense of doing FFT's. All \ that is required is a local redefinition of Linear and Nonlinear.\ \>", "Text"], Cell["\<\ Checking convergence will require repeating the same types of operations for \ different orders. In cases like this, you often wind up saving time by \ writing a simple function:\ \>", "Text"], Cell[BoxData[ \(CheckConvergence[ord_Integer, \ range_List, prec___, \ opts___Rule]\ := \[IndentingNewLine]Block[ {SplitStep`Private`Linear, \ SplitStep`Private`Nonlinear, dt, \ v\ , \ L, \ split, \ err, \ errtab, \ r, \ tgen, \ ttab}, \[IndentingNewLine]\(SplitStep`Private`Linear[dt_, p___]\)[ {u_, v_}]\ = \ MatrixExp[{{0, 1}, {\(-1\), 0}}\ dt] . {u, v}; \[IndentingNewLine]\(SplitStep`Private`Nonlinear[dt_, p___]\)[{u_, v_}]\ = \ MatrixExp[{{0, 0}, {\(-Sin[u]\), 0}}\ dt]\ . {u, v}; \[IndentingNewLine]tgen\ = \ \(Timing[ \(split\ = \ SplitStep`Private`SimplifySplitStep[ord, {dt, v, L}, prec];\)]\)[\([1]\)]; Block[{$MaxPrecision, \ $MinPrecision}, \[IndentingNewLine]If[ Length[{prec}]\ \[Equal] \ 1\ && \ prec\ > \ $MachinePrecision, \[IndentingNewLine]$MaxPrecision\ = \ prec; \[IndentingNewLine]$MinPrecision\ = \ prec]; \[IndentingNewLine]ttab\ = \ \(Timing[ \(errtab = Table[\[IndentingNewLine]nt\ = \ Ceiling[2^k]; h\ = \ 1/nt; \[IndentingNewLine]err\ = \ Nest[split[h, v, L], {1, 0}, nt]\ - \ accsol; \[IndentingNewLine]err\ = \ Sqrt[err . err]; \[IndentingNewLine]{h, err}, \[IndentingNewLine]Evaluate[ Join[{k}, \ range]]];\)]\)[ \([1]\)];\[IndentingNewLine]]; \[IndentingNewLine]r\ = \ Fit[Log[10, errtab], {1, x}, x]; \[IndentingNewLine]r\ = \ \((r\ - \ \((r\ /. \ x \[Rule] 0)\))\)\ /. \ x \[Rule] 1; \[IndentingNewLine]Print["\", ord, "\< Rate = \>", r, "\<\nTime to generate method = \>", tgen, \ "\<\ntime to run method = \>", ttab]; \[IndentingNewLine]ListPlot[ Log[10, errtab], \ opts]]\)], "Input", CellLabel->"In[29]:="], Cell[CellGroupData[{ Cell[BoxData[ \(\(CheckConvergence[2, {0, 8}];\)\)], "Input", CellLabel->"In[30]:="], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]2\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]2.062160312823319`\[InvisibleSpace]"\nTime to generate \ method = "\[InvisibleSpace]\(0.`\ Second\)\[InvisibleSpace]"\ntime to run \ method = "\[InvisibleSpace]\(0.22000000000002728`\ Second\)\), SequenceForm[ "Order = ", 2, " Rate = ", 2.0621603128233188, "\nTime to generate method = ", Times[ 0.0, Second], "\ntime to run method = ", Times[ .22000000000002728, Second]], Editable->False]], "Print", CellLabel->"From In[30]:="], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.97619 0.395468 0.685463 0.116224 [ [.18526 .09184 -6 -9 ] [.18526 .09184 6 0 ] [.38299 .09184 -12 -9 ] [.38299 .09184 12 0 ] [.58072 .09184 -6 -9 ] [.58072 .09184 6 0 ] [.77846 .09184 -12 -9 ] [.77846 .09184 12 0 ] [.96369 .22057 -12 -4.5 ] [.96369 .22057 0 4.5 ] [.96369 .33679 -12 -4.5 ] [.96369 .33679 0 4.5 ] [.96369 .45302 -12 -4.5 ] [.96369 .45302 0 4.5 ] [.96369 .56924 -12 -4.5 ] [.96369 .56924 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .18526 .10434 m .18526 .11059 L s [(-2)] .18526 .09184 0 1 Mshowa .38299 .10434 m .38299 .11059 L s [(-1.5)] .38299 .09184 0 1 Mshowa .58072 .10434 m .58072 .11059 L s [(-1)] .58072 .09184 0 1 Mshowa .77846 .10434 m .77846 .11059 L s [(-0.5)] .77846 .09184 0 1 Mshowa .125 Mabswid .2248 .10434 m .2248 .10809 L s .26435 .10434 m .26435 .10809 L s .3039 .10434 m .3039 .10809 L s .34344 .10434 m .34344 .10809 L s .42254 .10434 m .42254 .10809 L s .46208 .10434 m .46208 .10809 L s .50163 .10434 m .50163 .10809 L s .54118 .10434 m .54118 .10809 L s .62027 .10434 m .62027 .10809 L s .65982 .10434 m .65982 .10809 L s .69936 .10434 m .69936 .10809 L s .73891 .10434 m .73891 .10809 L s .818 .10434 m .818 .10809 L s .85755 .10434 m .85755 .10809 L s .8971 .10434 m .8971 .10809 L s .93664 .10434 m .93664 .10809 L s .14571 .10434 m .14571 .10809 L s .10616 .10434 m .10616 .10809 L s .06661 .10434 m .06661 .10809 L s .02707 .10434 m .02707 .10809 L s .25 Mabswid 0 .10434 m 1 .10434 L s .97619 .22057 m .98244 .22057 L s [(-4)] .96369 .22057 1 0 Mshowa .97619 .33679 m .98244 .33679 L s [(-3)] .96369 .33679 1 0 Mshowa .97619 .45302 m .98244 .45302 L s [(-2)] .96369 .45302 1 0 Mshowa .97619 .56924 m .98244 .56924 L s [(-1)] .96369 .56924 1 0 Mshowa .125 Mabswid .97619 .12759 m .97994 .12759 L s .97619 .15083 m .97994 .15083 L s .97619 .17408 m .97994 .17408 L s .97619 .19732 m .97994 .19732 L s .97619 .24381 m .97994 .24381 L s .97619 .26706 m .97994 .26706 L s .97619 .2903 m .97994 .2903 L s .97619 .31355 m .97994 .31355 L s .97619 .36004 m .97994 .36004 L s .97619 .38328 m .97994 .38328 L s .97619 .40653 m .97994 .40653 L s .97619 .42977 m .97994 .42977 L s .97619 .47626 m .97994 .47626 L s .97619 .4995 m .97994 .4995 L s .97619 .52275 m .97994 .52275 L s .97619 .54599 m .97994 .54599 L s .97619 .0811 m .97994 .0811 L s .97619 .05785 m .97994 .05785 L s .97619 .03461 m .97994 .03461 L s .97619 .01136 m .97994 .01136 L s .97619 .59248 m .97994 .59248 L s .97619 .61573 m .97994 .61573 L s .25 Mabswid .97619 0 m .97619 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .008 w .97619 .60332 Mdot .85714 .50882 Mdot .7381 .43562 Mdot .61905 .36485 Mdot .5 .29468 Mdot .38095 .22465 Mdot .2619 .15467 Mdot .14286 .08469 Mdot .02381 .01472 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", CellLabel->"From In[30]:=", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgeoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mo oaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003o000P0001Ool000Qoo`03001oogoo 00Qoo`03001oogoo00Qoo`03001oogoo00Uoo`03001oogoo00Qoo`03001oogoo00Qoo`03001oogoo 00Uoo`03001oogoo00Qoo`03001oogoo00Qoo`03001oogoo00Uoo`03001oogoo00Qoo`03001oogoo 00Qoo`03001oogoo00Qoo`03001oogoo00Uoo`03001oogoo00Qoo`03001oogoo00Qoo`03001oogoo 00Uoo`03001oogoo00Qoo`03001oogoo00Qoo`03001oogoo00Uoo`03001oogoo00Qoo`03001oogoo 00Qoo`03001oogoo00Uoo`03001oogoo00Qoo`03001oogoo00Qoo`03001oogoo00Ioo`0027oo00<0 07ooOol027oo00<007ooOol027oo00<007ooOol02Goo00<007ooOol027oo00<007ooOol027oo00<0 07ooOol02Goo00<007ooOol027oo00<007ooOol027oo00<007ooOol02Goo00<007ooOol027oo00<0 07ooOol027oo00<007ooOol027oo00<007ooOol02Goo00<007ooOol027oo00<007ooOol027oo00<0 07ooOol02Goo00<007ooOol027oo00<007ooOol027oo00<007ooOol02Goo00<007ooOol027oo00<0 07ooOol027oo00<007ooOol02Goo00<007ooOol027oo00<007ooOol027oo00<007ooOol01Woo003o OolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003o OolHOol00`00Oomoo`06Ool00?mooaQoo`8000Moo`00ogoo67oo00<007ooOol01Woo003oOolHOol0 0`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol0 0`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00BWoo0P00bgoo0P001goo001:Ool2003;Ool0 0`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol0 0`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo0P001goo003oOolHOol00`00Oomo o`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomo o`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol20007Ool0 0?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool0 0?mooaQoo`03001oogoo00Ioo`00ogoo4Woo0`000goo00<007ooOol01Woo003oOolCOol00`00Oomo o`02Ool00`00Oomoo`06Ool00?mooa1oo`D000=oo`<000Ioo`00K7oo0P00Vgoo10000Woo00@007oo Ool000Aoo`03001oogoo00Ioo`00K7oo0P00XWoo00<007oo000017oo00<007ooOol01Woo003oOolB Ool20004Ool00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo 003oOolHOol20007Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolH Ool00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolH Ool00`00Oomoo`06Ool00?mooaQoo`8000Moo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00 Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00 Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo0P001goo002>Ool20027Ool00`00Oomo o`06Ool008ioo`8008Moo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00 Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo0P001goo003oOolHOol00`00Oomoo`06 Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06 Ool00?mooa5oo`8000Eoo`03001oogoo00Ioo`00ogoo47oo00@007ooOol000Aoo`03001oogoo00Io o`00ogoo4Woo00<007ooOol00goo0`001Woo003oOol:Ool40005Ool00`00Oomoo`02Ool00`00Oomo o`06Ool00?mooa1oo`04001oogoo0004Ool00`00Oomoo`06Ool00?mooa5oo`8000Eoo`03001oogoo 00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo 00Ioo`00ogoo67oo0P001goo002`Ool2001UOol00`00Oomoo`06Ool00;1oo`8006Eoo`03001oogoo 00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo 00Ioo`00ogoo67oo0P001goo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00 ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00 ogoo67oo00<007ooOol01Woo003oOolHOol20007Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo 00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo 00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`8000Moo`00dgoo0P00@Woo00<0 07ooOol01Woo003COol20012Ool00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo47oo 100017oo00<007ooOol01Woo003oOol@Ool00`00Oomoo`05Ool00`00Oomoo`06Ool00?mooa5oo`03 001oogoo00Aoo`<000Ioo`00ogoo2Woo100017oo00<007ooOol00goo00<007ooOol01Woo003oOol@ Ool01000Oomoo`0017oo00<007ooOol01Woo003oOolAOol20005Ool00`00Oomoo`06Ool00?mooaQo o`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQo o`8000Moo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001o ogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001o ogoo00Ioo`00ogoo67oo0P001goo003oOolHOol00`00Oomoo`06Ool00?Eoo`80021oo`03001oogoo 00Ioo`00mGoo0P0087oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001o ogoo00Ioo`00ogoo67oo0P001goo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Io o`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Io o`00ogoo67oo00<007ooOol01Woo003oOolHOol20007Ool00?mooaQoo`03001oogoo00Ioo`00ogoo 67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo 47oo1@000goo00<007ooOol01Woo003oOolBOol00`00Oomoo`03Ool00`00Oomoo`06Ool00?mooa9o o`03001oogoo00=oo`<000Ioo`00ogoo2Woo100017oo00<007ooOol00goo00<007ooOol01Woo003o OolBOol00`00Oomoo`03Ool00`00Oomoo`06Ool00?mooa5oo`8000Eoo`03001oogoo00Ioo`00ogoo 67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`8000Moo`00ogoo67oo00<0 07ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?mooaQoo`8000Moo`00ogoo67oo0P001goo003o OolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo0P001goo0000\ \>"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-2.47158, -5.8978, 0.00883248 , 0.0300537}}] }, Open ]], Cell["\<\ The function seems to work, so you can run it for a sequence of orders:\ \>", "Text"], Cell[BoxData[ \(\(colors\ = \ {RGBColor[0, 0, 0], \ RGBColor[1, 0, 0], \ RGBColor[0, 1, 0], \ RGBColor[0, 0, 1], \ RGBColor[1, 0, 1]};\)\)], "Input", CellLabel->"In[31]:="], Cell[CellGroupData[{ Cell[BoxData[ \(\(Show[ Block[{$DisplayFunction\ = \ Identity}, Table[\[IndentingNewLine]CheckConvergence[ord, \ {0, 8}, \ PlotStyle \[Rule] {PointSize[0.015], \ colors[\([ord/2]\)]}], \[IndentingNewLine]{ord, 2, 10, 2}]]];\)\)], "Input", CellLabel->"In[32]:="], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]2\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]2.062160312823319`\[InvisibleSpace]"\nTime to generate \ method = "\[InvisibleSpace]\(0.`\ Second\)\[InvisibleSpace]"\ntime to run \ method = "\[InvisibleSpace]\(0.16000000000008185`\ Second\)\), SequenceForm[ "Order = ", 2, " Rate = ", 2.0621603128233188, "\nTime to generate method = ", Times[ 0.0, Second], "\ntime to run method = ", Times[ .16000000000008185, Second]], Editable->False]], "Print", CellLabel->"From In[32]:="], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]4\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]4.050069381163629`\[InvisibleSpace]"\nTime to generate \ method = "\[InvisibleSpace]\(0.16000000000008185`\ Second\)\[InvisibleSpace]"\ \ntime to run method = "\[InvisibleSpace]\(0.38999999999987267`\ Second\)\), SequenceForm[ "Order = ", 4, " Rate = ", 4.0500693811636292, "\nTime to generate method = ", Times[ .16000000000008185, Second], "\ntime to run method = ", Times[ .38999999999987267, Second]], Editable->False]], "Print", CellLabel->"From In[32]:="], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]6\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]5.199537453989301`\[InvisibleSpace]"\nTime to generate \ method = "\[InvisibleSpace]\(1.150000000000091`\ Second\)\[InvisibleSpace]"\n\ time to run method = "\[InvisibleSpace]\(1.0399999999999636`\ Second\)\), SequenceForm[ "Order = ", 6, " Rate = ", 5.1995374539893007, "\nTime to generate method = ", Times[ 1.1500000000000909, Second], "\ntime to run method = ", Times[ 1.0399999999999636, Second]], Editable->False]], "Print", CellLabel->"From In[32]:="], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]8\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]5.427323756067498`\[InvisibleSpace]"\nTime to generate \ method = "\[InvisibleSpace]\(6.369999999999891`\ Second\)\[InvisibleSpace]"\n\ time to run method = "\[InvisibleSpace]\(2.8600000000001273`\ Second\)\), SequenceForm[ "Order = ", 8, " Rate = ", 5.4273237560674978, "\nTime to generate method = ", Times[ 6.3699999999998909, Second], "\ntime to run method = ", Times[ 2.8600000000001273, Second]], Editable->False]], "Print", CellLabel->"From In[32]:="], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]10\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]5.205608570364113`\[InvisibleSpace]"\nTime to generate \ method = "\[InvisibleSpace]\(27.62999999999988`\ Second\)\[InvisibleSpace]"\n\ time to run method = "\[InvisibleSpace]\(8.460000000000036`\ Second\)\), SequenceForm[ "Order = ", 10, " Rate = ", 5.2056085703641131, "\nTime to generate method = ", Times[ 27.629999999999882, Second], "\ntime to run method = ", Times[ 8.4600000000000364, Second]], Editable->False]], "Print", CellLabel->"From In[32]:="], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.97619 0.395468 0.603319 0.0420356 [ [.18526 .59082 -6 -9 ] [.18526 .59082 6 0 ] [.38299 .59082 -12 -9 ] [.38299 .59082 12 0 ] [.58072 .59082 -6 -9 ] [.58072 .59082 6 0 ] [.77846 .59082 -12 -9 ] [.77846 .59082 12 0 ] [.96369 .01482 -18 -4.5 ] [.96369 .01482 0 4.5 ] [.96369 .09889 -18 -4.5 ] [.96369 .09889 0 4.5 ] [.96369 .18296 -18 -4.5 ] [.96369 .18296 0 4.5 ] [.96369 .26703 -12 -4.5 ] [.96369 .26703 0 4.5 ] [.96369 .35111 -12 -4.5 ] [.96369 .35111 0 4.5 ] [.96369 .43518 -12 -4.5 ] [.96369 .43518 0 4.5 ] [.96369 .51925 -12 -4.5 ] [.96369 .51925 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .18526 .60332 m .18526 .60957 L s [(-2)] .18526 .59082 0 1 Mshowa .38299 .60332 m .38299 .60957 L s [(-1.5)] .38299 .59082 0 1 Mshowa .58072 .60332 m .58072 .60957 L s [(-1)] .58072 .59082 0 1 Mshowa .77846 .60332 m .77846 .60957 L s [(-0.5)] .77846 .59082 0 1 Mshowa .125 Mabswid .2248 .60332 m .2248 .60707 L s .26435 .60332 m .26435 .60707 L s .3039 .60332 m .3039 .60707 L s .34344 .60332 m .34344 .60707 L s .42254 .60332 m .42254 .60707 L s .46208 .60332 m .46208 .60707 L s .50163 .60332 m .50163 .60707 L s .54118 .60332 m .54118 .60707 L s .62027 .60332 m .62027 .60707 L s .65982 .60332 m .65982 .60707 L s .69936 .60332 m .69936 .60707 L s .73891 .60332 m .73891 .60707 L s .818 .60332 m .818 .60707 L s .85755 .60332 m .85755 .60707 L s .8971 .60332 m .8971 .60707 L s .93664 .60332 m .93664 .60707 L s .14571 .60332 m .14571 .60707 L s .10616 .60332 m .10616 .60707 L s .06661 .60332 m .06661 .60707 L s .02707 .60332 m .02707 .60707 L s .25 Mabswid 0 .60332 m 1 .60332 L s .97619 .01482 m .98244 .01482 L s [(-14)] .96369 .01482 1 0 Mshowa .97619 .09889 m .98244 .09889 L s [(-12)] .96369 .09889 1 0 Mshowa .97619 .18296 m .98244 .18296 L s [(-10)] .96369 .18296 1 0 Mshowa .97619 .26703 m .98244 .26703 L s [(-8)] .96369 .26703 1 0 Mshowa .97619 .35111 m .98244 .35111 L s [(-6)] .96369 .35111 1 0 Mshowa .97619 .43518 m .98244 .43518 L s [(-4)] .96369 .43518 1 0 Mshowa .97619 .51925 m .98244 .51925 L s [(-2)] .96369 .51925 1 0 Mshowa .125 Mabswid .97619 .03584 m .97994 .03584 L s .97619 .05686 m .97994 .05686 L s .97619 .07787 m .97994 .07787 L s .97619 .11991 m .97994 .11991 L s .97619 .14093 m .97994 .14093 L s .97619 .16194 m .97994 .16194 L s .97619 .20398 m .97994 .20398 L s .97619 .225 m .97994 .225 L s .97619 .24602 m .97994 .24602 L s .97619 .28805 m .97994 .28805 L s .97619 .30907 m .97994 .30907 L s .97619 .33009 m .97994 .33009 L s .97619 .37212 m .97994 .37212 L s .97619 .39314 m .97994 .39314 L s .97619 .41416 m .97994 .41416 L s .97619 .45619 m .97994 .45619 L s .97619 .47721 m .97994 .47721 L s .97619 .49823 m .97994 .49823 L s .97619 .54027 m .97994 .54027 L s .97619 .56128 m .97994 .56128 L s .97619 .5823 m .97994 .5823 L s .25 Mabswid .97619 0 m .97619 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 0 0 r .015 w .97619 .57361 Mdot .85714 .53943 Mdot .7381 .51296 Mdot .61905 .48736 Mdot .5 .46198 Mdot .38095 .43665 Mdot .2619 .41134 Mdot .14286 .38603 Mdot .02381 .36072 Mdot 1 0 0 r .97619 .57248 Mdot .85714 .51521 Mdot .7381 .46349 Mdot .61905 .41258 Mdot .5 .36189 Mdot .38095 .31126 Mdot .2619 .26064 Mdot .14286 .21002 Mdot .02381 .15938 Mdot 0 1 0 r .97619 .52895 Mdot .85714 .47386 Mdot .7381 .40106 Mdot .61905 .32526 Mdot .5 .24934 Mdot .38095 .17342 Mdot .2619 .09766 Mdot .14286 .04606 Mdot .02381 .05255 Mdot 0 0 1 r .97619 .57048 Mdot .85714 .45876 Mdot .7381 .33739 Mdot .61905 .22578 Mdot .5 .1224 Mdot .38095 .03053 Mdot .2619 .01472 Mdot .14286 .05017 Mdot .02381 .05691 Mdot 1 0 1 r .97619 .59377 Mdot .85714 .43718 Mdot .7381 .32785 Mdot .61905 .20192 Mdot .5 .07652 Mdot .38095 .03099 Mdot .2619 .03676 Mdot .14286 .05738 Mdot .02381 .07882 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", CellLabel->"From In[32]:=", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgeoo`03001o ogoo00Ioo`00ogoo67oo00<007ooOol01Woo002`Ool201mUOol00`00Oomoo`06Ool00:moo`@07fAo o`8000Moo`00[goo100OI7oo00<007ooOol01Woo002`Ool201mUOol00`00Oomoo`06Ool00?mooaQo o`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool008ioo`83 h8Moo`8000Moo`00SGoo10?PQWoo00<007ooOol01Woo002=Ool40n26Ool00`00Oomoo`06Ool004Yo o`9l049oo`83h8Moo`03001oogoo00Ioo`00BGoo17`0`goo0P001Goo00<007ooOol01Woo0019Ool4 O032Ool01000Oomoo`0017oo00<007ooOol01Woo001:Ool2O033Ool01000Oomoo`0017oo0`001Woo 003oOol:Ool40003Ool20005Ool00`00Oomoo`06Ool00?mooa1oo`04001oogoo0004Ool00`00Oomo o`06Ool00?mooa5oo`8000Eoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003oOolHOol0 0`00Oomoo`06Ool00?mooaQoo`8000Moo`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomo o`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo001/Ool2O02YOol00`00 Oomoo`06Ool006]oo`Al0:Qoo`8000Moo`00Jgoo17`0Z7oo00<007ooOol01Woo001/Ool2O02YOol0 0`00Oomoo`06Ool00;1oo`83h6Eoo`03001oogoo00Ioo`00[goo10?P7goo0W`O@goo00<007ooOol0 1Woo002_Ool40n0NOol4O1m2Ool00`00Oomoo`06Ool00;1oo`83h1moo`Al7d9oo`8000Moo`00dWoo 0W`O@goo00<007ooOol01Woo003AOol401m2Ool00`00Oomoo`06Ool00=5oo`@07d9oo`03001oogoo 00Ioo`00dWoo0P0O>goo0`001Goo00<007ooOol01Woo003oOol@Ool01000Oomoo`0017oo00<007oo Ool01Woo003oOol@Ool01000Oomoo`0017oo0`001Woo003oOol:Ool40002Ool30005Ool00`00Oomo o`06Ool000Ioo`8008Ioo`9l081oo`03001oogoo00Aoo`03001oogoo00Ioo`001Goo1000Q7oo17`0 Ogoo0`0017oo00<007ooOol01Woo0005Ool40024Ool4O026Ool00`00Oomoo`06Ool000Ioo`8008Io o`9l08Moo`03001oogoo00Ioo`00ogoo67oo0P001goo003oOolHOol00`00Oomoo`06Ool00?mooaQo o`03001oogoo00Ioo`00:7oo0P00kGoo00<007ooOol01Woo000WOol4003/Ool00`00Oomoo`06Ool0 02Moo`@00>aoo`03001oogoo00Ioo`00:7oo0P00kGoo0P001goo003BOol20n13Ool00`00Oomoo`06 Ool00=5oo`@3h49oo`03001oogoo00Ioo`00dGoo10?P@Woo00<007ooOol01Woo001:Ool2001TOol2 O00POol20n13Ool00`00Oomoo`06Ool004Uoo`@0069oo`Al06Aoo`03001oogoo00Ioo`00BGoo1000 HWoo17`0I7oo0P001goo001:Ool2001TOol2O01UOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo 00Ioo`00ogoo67oo00<007ooOol01Woo003oOolBOol30003Ool00`00Oomoo`06Ool006aoo`8008Io o`9l7aaoo`03001oogoo009oo`03001oogoo00Ioo`00Jgoo1000Q7oo17`O67oo1@000goo0`001Woo 001[Ool40024Ool4O1lBOol40002Ool01000Oomoo`0017oo00<007ooOol01Woo001/Ool20026Ool2 O1lJOol00`00Ool00004Ool00`00Oomoo`06Ool00?mooa9oo`8000Aoo`03001oogoo00Ioo`00ogoo 67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00?Aoo`807b5oo`8000Moo`00SWoo0P00 @Woo0W`07goo100O87oo00<007ooOol01Woo002=Ool40010Ool4O00NOol401lPOol00`00Oomoo`06 Ool008eoo`@0041oo`Al01moo`807b5oo`03001oogoo00Ioo`00SWoo0P00@Woo0W`087oo0P?P8Goo 00<007ooOol01Woo003cOol40n0POol00`00Oomoo`06Ool00?=oo`@3h21oo`8000Moo`00m7oo0P?P 8Goo00<007ooOol01Woo002`Ool2001UOol00`00Oomoo`06Ool00:moo`@006Aoo`03001oogoo00Io o`00[goo1000I7oo00<007ooOol01Woo002`Ool2001UOol00`00Oomoo`06Ool00?mooaQoo`8000Mo o`00ogoo67oo00<007ooOol01Woo003oOolHOol00`00Oomoo`06Ool00=9oo`8004=oo`03001oogoo 00Ioo`00dGoo10007goo0W`06Goo100017oo00<007ooOol01Woo003AOol4000NOol4O00HOol00`00 Oomoo`05Ool00`00Oomoo`06Ool00=9oo`8001moo`Al01Uoo`03001oogoo00Aoo`<000Ioo`00m7oo 0W`04goo100017oo00<007ooOol00goo00<007ooOol01Woo003oOol@Ool01000Oomoo`0017oo0P?P 1goo003oOolAOol20004Ool40n06Ool00?mooaMoo`@3h0Ioo`00m7oo0P008Goo0P?P1goo003cOol4 000POol20007Ool00?=oo`@0021oo`03001oogoo00Ioo`00m7oo0P008Goo00<007ooOol01Woo003o OolHOol00`00Oomoo`06Ool00?mooaQoo`03001oogoo00Ioo`00ogoo67oo00<007ooOol01Woo003o OolHOol20007Ool003Ioo`@002moo`D0009oo`8000Aoo`8002moo`D002moo`8000Aoo`8000Aoo`80 02ioo`03001oogoo00Ioo`00=Woo00<007ooOol0"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-2.47347, -14.3746, 0.00884565, 0.0832193}}] }, Open ]], Cell[TextData[{ "We don't seem to be getting below about error of ", Cell[BoxData[ \(TraditionalForm\`10\^\(-14\)\)]], "for any of the methods. This is not surprising since machine precision on \ this machine is about 16 digits. With more digits, perhaps the results \ should be better:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(prec\ = \ 32; Show[Block[{$DisplayFunction\ = \ Identity}, Table[\[IndentingNewLine]CheckConvergence[ord, \ {0, 8}, \ prec, PlotStyle \[Rule] {PointSize[0.015], \ colors[\([ord/2]\)]}], \[IndentingNewLine]{ord, 2, 10, 2}]]]; \)], "Input"], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]2\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]2.0621603112819353`\[InvisibleSpace]"\nTime to generate \ method = "\[InvisibleSpace]\(0.`\ Second\)\[InvisibleSpace]"\ntime to run \ method = "\[InvisibleSpace]\(2.3099999999994907`\ Second\)\), SequenceForm[ "Order = ", 2, " Rate = ", 2.0621603112819353, "\nTime to generate method = ", Times[ 0.0, Second], "\ntime to run method = ", Times[ 2.3099999999994907, Second]], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]4\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]4.0499610665076915`\[InvisibleSpace]"\nTime to generate \ method = "\[InvisibleSpace]\(0.10999999999876309`\ Second\)\[InvisibleSpace]"\ \ntime to run method = "\[InvisibleSpace]\(5.1599999999998545`\ Second\)\), SequenceForm[ "Order = ", 4, " Rate = ", 4.0499610665076915, "\nTime to generate method = ", Times[ .10999999999876309, Second], "\ntime to run method = ", Times[ 5.1599999999998545, Second]], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]6\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]5.85997677464305`\[InvisibleSpace]"\nTime to generate method \ = "\[InvisibleSpace]\(0.4899999999997817`\ Second\)\[InvisibleSpace]"\ntime \ to run method = "\[InvisibleSpace]\(15.600000000000364`\ Second\)\), SequenceForm[ "Order = ", 6, " Rate = ", 5.8599767746430498, "\nTime to generate method = ", Times[ .48999999999978172, Second], "\ntime to run method = ", Times[ 15.600000000000364, Second]], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]8\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]8.397876303100183`\[InvisibleSpace]"\nTime to generate \ method = "\[InvisibleSpace]\(3.069999999999709`\ Second\)\[InvisibleSpace]"\n\ time to run method = "\[InvisibleSpace]\(38.1200000000008`\ Second\)\), SequenceForm[ "Order = ", 8, " Rate = ", 8.3978763031001833, "\nTime to generate method = ", Times[ 3.069999999999709, Second], "\ntime to run method = ", Times[ 38.1200000000008, Second]], Editable->False]], "Print"], Cell[BoxData[ InterpretationBox[ \("Order = "\[InvisibleSpace]10\[InvisibleSpace]" Rate = "\ \[InvisibleSpace]9.99163216738367`\[InvisibleSpace]"\nTime to generate method \ = "\[InvisibleSpace]\(12.680000000000291`\ Second\)\[InvisibleSpace]"\ntime \ to run method = "\[InvisibleSpace]\(114.40999999999985`\ Second\)\), SequenceForm[ "Order = ", 10, " Rate = ", 9.9916321673836705, "\nTime to generate method = ", Times[ 12.680000000000291, Second], "\ntime to run method = ", Times[ 114.40999999999985, Second]], Editable->False]], "Print"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.97619 0.395468 0.603319 0.0239278 [ [.18526 .59082 -6 -9 ] [.18526 .59082 6 0 ] [.38299 .59082 -12 -9 ] [.38299 .59082 12 0 ] [.58072 .59082 -6 -9 ] [.58072 .59082 6 0 ] [.77846 .59082 -12 -9 ] [.77846 .59082 12 0 ] [.96369 .00512 -18 -4.5 ] [.96369 .00512 0 4.5 ] [.96369 .12476 -18 -4.5 ] [.96369 .12476 0 4.5 ] [.96369 .2444 -18 -4.5 ] [.96369 .2444 0 4.5 ] [.96369 .36404 -18 -4.5 ] [.96369 .36404 0 4.5 ] [.96369 .48368 -12 -4.5 ] [.96369 .48368 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .18526 .60332 m .18526 .60957 L s [(-2)] .18526 .59082 0 1 Mshowa .38299 .60332 m .38299 .60957 L s [(-1.5)] .38299 .59082 0 1 Mshowa .58072 .60332 m .58072 .60957 L s [(-1)] .58072 .59082 0 1 Mshowa .77846 .60332 m .77846 .60957 L s [(-0.5)] .77846 .59082 0 1 Mshowa .125 Mabswid .2248 .60332 m .2248 .60707 L s .26435 .60332 m .26435 .60707 L s .3039 .60332 m .3039 .60707 L s .34344 .60332 m .34344 .60707 L s .42254 .60332 m .42254 .60707 L s .46208 .60332 m .46208 .60707 L s .50163 .60332 m .50163 .60707 L s .54118 .60332 m .54118 .60707 L s .62027 .60332 m .62027 .60707 L s .65982 .60332 m .65982 .60707 L s .69936 .60332 m .69936 .60707 L s .73891 .60332 m .73891 .60707 L s .818 .60332 m .818 .60707 L s .85755 .60332 m .85755 .60707 L s .8971 .60332 m .8971 .60707 L s .93664 .60332 m .93664 .60707 L s .14571 .60332 m .14571 .60707 L s .10616 .60332 m .10616 .60707 L s .06661 .60332 m .06661 .60707 L s .02707 .60332 m .02707 .60707 L s .25 Mabswid 0 .60332 m 1 .60332 L s .97619 .00512 m .98244 .00512 L s [(-25)] .96369 .00512 1 0 Mshowa .97619 .12476 m .98244 .12476 L s [(-20)] .96369 .12476 1 0 Mshowa .97619 .2444 m .98244 .2444 L s [(-15)] .96369 .2444 1 0 Mshowa .97619 .36404 m .98244 .36404 L s [(-10)] .96369 .36404 1 0 Mshowa .97619 .48368 m .98244 .48368 L s [(-5)] .96369 .48368 1 0 Mshowa .125 Mabswid .97619 .02905 m .97994 .02905 L s .97619 .05298 m .97994 .05298 L s .97619 .07691 m .97994 .07691 L s .97619 .10083 m .97994 .10083 L s .97619 .14869 m .97994 .14869 L s .97619 .17262 m .97994 .17262 L s .97619 .19655 m .97994 .19655 L s .97619 .22047 m .97994 .22047 L s .97619 .26833 m .97994 .26833 L s .97619 .29226 m .97994 .29226 L s .97619 .31618 m .97994 .31618 L s .97619 .34011 m .97994 .34011 L s .97619 .38797 m .97994 .38797 L s .97619 .4119 m .97994 .4119 L s .97619 .43582 m .97994 .43582 L s .97619 .45975 m .97994 .45975 L s .97619 .50761 m .97994 .50761 L s .97619 .53154 m .97994 .53154 L s .97619 .55546 m .97994 .55546 L s .97619 .57939 m .97994 .57939 L s .25 Mabswid .97619 0 m .97619 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 0 0 r .015 w .97619 .58641 Mdot .85714 .56695 Mdot .7381 .55188 Mdot .61905 .53731 Mdot .5 .52286 Mdot .38095 .50845 Mdot .2619 .49404 Mdot .14286 .47963 Mdot .02381 .46523 Mdot 1 0 0 r .97619 .58576 Mdot .85714 .55316 Mdot .7381 .52373 Mdot .61905 .49475 Mdot .5 .46589 Mdot .38095 .43707 Mdot .2619 .40825 Mdot .14286 .37944 Mdot .02381 .35063 Mdot 0 1 0 r .97619 .56099 Mdot .85714 .52963 Mdot .7381 .48819 Mdot .61905 .44504 Mdot .5 .40182 Mdot .38095 .35861 Mdot .2619 .31539 Mdot .14286 .27217 Mdot .02381 .22895 Mdot 0 0 1 r .97619 .58463 Mdot .85714 .52103 Mdot .7381 .45194 Mdot .61905 .38841 Mdot .5 .32958 Mdot .38095 .27175 Mdot .2619 .21408 Mdot .14286 .15644 Mdot .02381 .09882 Mdot 1 0 1 r .97619 .59788 Mdot .85714 .50875 Mdot .7381 .44651 Mdot .61905 .37483 Mdot .5 .30283 Mdot .38095 .2308 Mdot .2619 .15877 Mdot .14286 .08674 Mdot .02381 .01472 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg7oo0P00<7oo0P002Woo0`00;goo0P00;goo0P00 2Woo0`00;7oo0P0O00<007ooOol01goo003oOolDOol401l9Ool00?mooaAoo`@07`Uoo`00ogoo5Goo 0W`O2Woo003oOolDOol4O1l9Ool00?mooaAoo`Al7`Uoo`000Wooo`004`000W`O1`000goo000:Ool0 0`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`09Ool0 0`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool0 0`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`09Ool00`00Oomoo`08Ool00`00Oomoo`08Ool0 0`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool0 0`00Oomoo`09Ool00`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool00`00Oomoo`08Ool0 03Ioo`03001oogoo03Eoo`03001oogoo03Eoo`03001oogoo03Aoo`03001oogoo03Eoo`03001oogoo 00Qoo`00ogoo5Woo00<007ooOol027oo003oOolFOol00`00Oomoo`08Ool00001\ \>"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-2.49388, -25.6688, 0.0089879 , 0.148548}}] }, Open ]], Cell[TextData[{ "Why did I fix precision for calculations with bignums? The basic reason \ is that the precision control mechanism is designed to estimate roundoff \ errors for basic arithmetic and computing functions in ", StyleBox["Mathematica", FontSlant->"Italic"], ". Because it is important that these estimates be correct, the estimates \ are done in a conservative way. The error being measured here is of a \ different sort, typically called local truncation error -- i.e. the error in \ the approximation caused by truncating the series for the solution. It is \ very often the case with iterative methods that roundoff error is small \ compared to the truncation error. However, because the arbtrary precision \ control must treat each part of the computation as independent, over many \ iterations, you may lose all of your precision. Here is an example with the \ fourth order method." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(prec\ = \ 100; split\ = \ \ SplitStep`Private`SimplifySplitStep[2, {dt, v, L}, prec]; \), "\[IndentingNewLine]", \(Table[ nt\ = \ 2^k; \[IndentingNewLine]Precision[ Nest[split[1/nt, Function[2\ # Conjugate[#]], \ 1], \ N[Range[32], prec], nt]], {k, 0, 4}]\)}], "Input", CellLabel->"In[33]:="], Cell[BoxData[ \({87, 78, 58, 20, 16}\)], "Output", CellLabel->"Out[34]="] }, Open ]], Cell["\<\ As you can see, even though the smaller time step should produce a better \ result, most of the precision is lost.\ \>", "Text"] }, Open ]] }, FrontEndVersion->"4.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{905, 611}, WindowMargins->{{33, Automatic}, {Automatic, 20}}, StyleDefinitions -> "ArticleClassic.nb" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{ "ODExample"->{ Cell[5266, 150, 73, 1, 72, "Title", CellTags->"ODExample"]} } *) (*CellTagsIndex CellTagsIndex->{ {"ODExample", 51904, 1568} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1739, 51, 58, 0, 72, "Title"], Cell[1800, 53, 75, 0, 27, "Text"], Cell[CellGroupData[{ Cell[1900, 57, 109, 2, 31, "Input"], Cell[2012, 61, 913, 16, 356, "Output"] }, Open ]], Cell[2940, 80, 62, 0, 27, "Text"], Cell[CellGroupData[{ Cell[3027, 84, 127, 3, 51, "Input"], Cell[3157, 89, 822, 16, 147, "Output"] }, Open ]], Cell[3994, 108, 155, 3, 27, "Text"], Cell[CellGroupData[{ Cell[4174, 115, 431, 8, 91, "Input"], Cell[4608, 125, 68, 2, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4713, 132, 434, 8, 91, "Input"], Cell[5150, 142, 67, 2, 30, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[5266, 150, 73, 1, 72, "Title", CellTags->"ODExample"], Cell[5342, 153, 103, 3, 27, "Text"], Cell[5448, 158, 334, 7, 51, "Input", Evaluatable->False], Cell[5785, 167, 89, 2, 27, "Text"], Cell[5877, 171, 204, 5, 31, "Input"], Cell[6084, 178, 238, 4, 44, "Text"], Cell[6325, 184, 203, 4, 27, "Text"], Cell[6531, 190, 2125, 38, 411, "Input"], Cell[CellGroupData[{ Cell[8681, 232, 90, 2, 31, "Input"], Cell[8774, 236, 596, 12, 63, "Print"], Cell[9373, 250, 9802, 319, 186, 3220, 233, "GraphicsData", "PostScript", "Graphics"] }, Open ]], Cell[19190, 572, 95, 2, 27, "Text"], Cell[19288, 576, 199, 4, 31, "Input"], Cell[CellGroupData[{ Cell[19512, 584, 353, 8, 71, "Input"], Cell[19868, 594, 596, 12, 63, "Print"], Cell[20467, 608, 628, 12, 63, "Print"], Cell[21098, 622, 625, 12, 63, "Print"], Cell[21726, 636, 625, 12, 63, "Print"], Cell[22354, 650, 626, 12, 63, "Print"], Cell[22983, 664, 11656, 386, 186, 4234, 289, "GraphicsData", "PostScript", "Graphics"] }, Open ]], Cell[34654, 1053, 313, 7, 44, "Text"], Cell[CellGroupData[{ Cell[34992, 1064, 323, 7, 71, "Input"], Cell[35318, 1073, 566, 11, 63, "Print"], Cell[35887, 1086, 598, 11, 63, "Print"], Cell[36488, 1099, 595, 11, 63, "Print"], Cell[37086, 1112, 590, 11, 63, "Print"], Cell[37679, 1125, 597, 11, 63, "Print"], Cell[38279, 1138, 11404, 370, 186, 3970, 274, "GraphicsData", "PostScript", "Graphics"] }, Open ]], Cell[49698, 1511, 926, 15, 95, "Text"], Cell[CellGroupData[{ Cell[50649, 1530, 358, 8, 71, "Input"], Cell[51010, 1540, 79, 2, 30, "Output"] }, Open ]], Cell[51104, 1545, 138, 3, 27, "Text"] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)