(*********************************************************************** 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[ 16501, 443]*) (*NotebookOutlinePosition[ 17139, 466]*) (* CellTagsIndexPosition[ 17095, 462]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["\<\ Test of quadratic convergence. How does one tell when it is \ occuring?\ \>", "Title"], Cell["Newtons method on", "Text"], Cell[BoxData[ \(\(f[x_] = x\^2 - 14;\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ \(ListOfIterates = NestList[N[\((# - f[#]\/\(f'\)[#])\) &, 30], 1, 8]\), "\[IndentingNewLine]", \(RotateLeft[\((ListOfIterates - 2)\)]\/\((ListOfIterates - 2)\)\^2\)}], \ "Input"], Cell[BoxData[ \({1, 7.5`30.0621, 4.6833333333333333333333333333333333333333333`29.4091, 3.8363285883748517200474495848161328588416594`28.9747, 3.74282551356575472266393320143397068186`28.6572, 3.74165756905871485504663118431995355459`28.356, 3.74165738677394582582687968944325104801`28.0549, 3.74165738677394138558374873231918393088`27.7539, 3.74165738677394138558374873231918393088`27.4529}\)], "Output"], Cell[BoxData[ \({5.5`29.9274, 0.088705234159779614325068870523415977961432323317`29.0377, 0.255035797930229010924378631431583592139572759262`28.4467, 0.516836430155469934401607672578682606913384`28.0382, 0.5733963887752932508519295084082058776278655`27.723, 0.5741656184911224898202068832285113215640059`27.4218, 0.5741657386773912109613669272392029071863026`27.1208, 0.5741657386773941385583748732307862786419153`26.8197, \ \(-0.3296662954709576554233499492916645313747519`26.8197\)}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(ListOfIterates - 2\)], "Input"], Cell[BoxData[ \({\(-1\), 5.5`29.9274, 2.6833333333333333333333333333333333333333333`29.1672, 1.8363285883748517200474495848161328588416594`28.6547, 1.74282551356575472266393320143397068186`28.3253, 1.74165756905871485504663118431995355459`28.0239, 1.74165738677394582582687968944325104801`27.7228, 1.74165738677394138558374873231918393088`27.4218, 1.74165738677394138558374873231918393088`27.1208}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(RotateLeft[ListOfIterates] - ListOfIterates\)], "Input"], Cell[BoxData[ \({6.5`30, \(-2.8166666666666666666666666666666666666666667`29.056\), \ \(-0.847004744958481613285883748517200474491674`28.1576\), \ \(-0.09350307480909699738351638338216217698`26.8806\), \ \(-0.00116794450703986761730201711401712727`24.6743\), \ \(-1.8228476902921975149487670250657`20.5665*^-7\), \ \(-4.44024313095712406711713`12.6522*^-15\), 0``26.7037, \(-2.74165738677394138558374873231918393088`27.3178\)}\)], \ "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(ListPlot[Out[21], PlotJoined \[Rule] True];\)\)], "Input"], 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.0952381 0.119048 0.192665 0.0631775 [ [.38095 .18017 -3 -9 ] [.38095 .18017 3 0 ] [.61905 .18017 -3 -9 ] [.61905 .18017 3 0 ] [.85714 .18017 -3 -9 ] [.85714 .18017 3 0 ] [.13036 .06631 -12 -4.5 ] [.13036 .06631 0 4.5 ] [.13036 .31902 -6 -4.5 ] [.13036 .31902 0 4.5 ] [.13036 .44538 -6 -4.5 ] [.13036 .44538 0 4.5 ] [.13036 .57173 -6 -4.5 ] [.13036 .57173 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 .38095 .19267 m .38095 .19892 L s [(4)] .38095 .18017 0 1 Mshowa .61905 .19267 m .61905 .19892 L s [(6)] .61905 .18017 0 1 Mshowa .85714 .19267 m .85714 .19892 L s [(8)] .85714 .18017 0 1 Mshowa .125 Mabswid .20238 .19267 m .20238 .19642 L s .2619 .19267 m .2619 .19642 L s .32143 .19267 m .32143 .19642 L s .44048 .19267 m .44048 .19642 L s .5 .19267 m .5 .19642 L s .55952 .19267 m .55952 .19642 L s .67857 .19267 m .67857 .19642 L s .7381 .19267 m .7381 .19642 L s .79762 .19267 m .79762 .19642 L s .08333 .19267 m .08333 .19642 L s .02381 .19267 m .02381 .19642 L s .91667 .19267 m .91667 .19642 L s .97619 .19267 m .97619 .19642 L s .25 Mabswid 0 .19267 m 1 .19267 L s .14286 .06631 m .14911 .06631 L s [(-2)] .13036 .06631 1 0 Mshowa .14286 .31902 m .14911 .31902 L s [(2)] .13036 .31902 1 0 Mshowa .14286 .44538 m .14911 .44538 L s [(4)] .13036 .44538 1 0 Mshowa .14286 .57173 m .14911 .57173 L s [(6)] .13036 .57173 1 0 Mshowa .125 Mabswid .14286 .0979 m .14661 .0979 L s .14286 .12949 m .14661 .12949 L s .14286 .16108 m .14661 .16108 L s .14286 .22425 m .14661 .22425 L s .14286 .25584 m .14661 .25584 L s .14286 .28743 m .14661 .28743 L s .14286 .35061 m .14661 .35061 L s .14286 .3822 m .14661 .3822 L s .14286 .41379 m .14661 .41379 L s .14286 .47696 m .14661 .47696 L s .14286 .50855 m .14661 .50855 L s .14286 .54014 m .14661 .54014 L s .14286 .03472 m .14661 .03472 L s .14286 .00313 m .14661 .00313 L s .14286 .60332 m .14661 .60332 L s .25 Mabswid .14286 0 m .14286 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .60332 m .14286 .01472 L .2619 .13915 L .38095 .18676 L .5 .19259 L .61905 .19267 L .7381 .19267 L .85714 .19267 L .97619 .01945 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgaoo`03001oogoo00Ioo`00:Goo00<007oo0000jWoo00<007ooOol01goo000X Ool20002Ool00`00Oomoo`3WOol00`00Oomoo`07Ool002Qoo`8000=oo`03001oogoo0>Eoo`03001o ogoo00Qoo`00:7oo0P0017oo00<007ooOol0hgoo00<007ooOol02Goo000XOol30004Ool00`00Oomo o`3ROol00`00Oomoo`09Ool002Qoo`8000Ioo`03001oogoo0>1oo`03001oogoo00Yoo`009goo00<0 07oo00001goo00<007ooOol0gWoo00<007ooOol02goo000WOol00`00Ool00008Ool00`00Oomoo`3M Ool00`00Oomoo`0;Ool002Moo`03001oo`0000Uoo`03001oogoo0=]oo`03001oogoo00aoo`009goo 00<007oo00002Woo00<007ooOol0fGoo00<007ooOol03Goo000WOol00`00Ool0000;Ool00`00Oomo o`3HOol00`00Oomoo`0=Ool0021oo`@0009oo`04001oogoo000Ool0021oo`03001oogoo00=oo`04001oogoo000=Ool00`00Oomoo`3DOol00`00Oomoo`0?Ool0 025oo`03001oogoo009oo`03001oogoo00<000aoo`03001oogoo0=9oo`03001oogoo011oo`006Woo 100017oo00D007ooOomoo`00009oo`03001oogoo00eoo`03001oogoo0=5oo`03001oogoo011oo`00 8goo00@007ooOol0009oo`03001oogoo00ioo`03001oogoo0Ool00`00Oomoo`3>Ool00`00Oomoo`0BOol0025oo`80009o o`05001oogooOol0000AOol00`00Oomoo`3=Ool00`00Oomoo`0BOol002Eoo`05001oogooOol0000B Ool00`00Oomoo`3;Ool00`00Oomoo`0COol002Eoo`05001oogooOol0000COol00`00Oomoo`39Ool0 0`00Oomoo`0DOol002Eoo`05001oogooOol0000DOol00`00Oomoo`38Ool00`00Oomoo`0DOol002Ao o`03001oogoo009oo`03001oogoo01=oo`03001oogoo0Goo0P001Woo00<007ooOol0@7oo0`00@Goo0P000Woo00<0 07ooOol09Goo000OOol00`00Oomoo`07Ool00`00Oomoo`0kOol3002>Ool00`00Oomoo`0UOol001mo o`03001oogoo00Moo`03001oogoo03ioo`8008]oo`03001oogoo02Ioo`007goo00<007ooOol01goo 00<007ooOol0@7oo2P00P7oo00<007ooOol09goo000OOol00`00Oomoo`07Ool00`00Oomoo`1:OolA 001_Ool00`00Oomoo`0WOol00?l00200005oo`001goo00<007ooOol03Woo00<007ooOol00goo00<0 07ooOol027oo00<007ooOol03Woo00<007ooOol03Woo00<007ooOol03Woo00<007ooOol03Woo00<0 07ooOol03Woo00<007ooOol03Woo00<007ooOol03Woo00<007ooOol03Woo00<007ooOol03Woo00<0 07ooOol03Woo00<007ooOol03Woo00<007ooOol03Woo00<007ooOol03Woo00<007ooOol03Woo00<0 07ooOol01Woo000NOol00`00Oomoo`08Ool00`00Oomoo`11Ool00`00Oomoo`11Ool00`00Oomoo`11 Ool00`00Oomoo`0XOol001ioo`03001oogoo00Qoo`03001oogoo0?Aoo`007Woo00<007ooOol027oo 00<007ooOol0m7oo000NOol00`00Oomoo`08Ool00`00Oomoo`3dOol001eoo`03001oogoo00Uoo`03 001oogoo0?Aoo`007Goo00<007ooOol02Goo00<007ooOol0m7oo000MOol00`00Oomoo`09Ool00`00 Oomoo`3dOol001eoo`03001oogoo00Uoo`800?Eoo`007Goo00<007ooOol02Goo00<007ooOol0m7oo 000LOol00`00Oomoo`0:Ool00`00Oomoo`3dOol001aoo`03001oogoo00Yoo`03001oogoo0?Aoo`00 77oo00<007ooOol02Woo00<007ooOol0m7oo000LOol00`00Oomoo`0:Ool00`00Oomoo`3dOol001ao o`03001oogoo00Yoo`03001oogoo0?Aoo`006goo00<007ooOol02goo00<007ooOol0m7oo000KOol0 0`00Oomoo`0;Ool00`00Oomoo`3dOol001]oo`03001oogoo00]oo`800?Eoo`006goo00<007ooOol0 2goo00<007ooOol0m7oo000KOol00`00Oomoo`0;Ool00`00Oomoo`3dOol001Yoo`03001oogoo00ao o`03001oogoo0?Aoo`006Woo00<007ooOol037oo00<007ooOol0m7oo000JOol00`00Oomoo`0Ool00`00Oomoo`3dOol001Qoo`03001oogoo00ioo`03001oogoo0?Aoo`0067oo 00<007ooOol01Goo10001Goo00<007ooOol0m7oo000HOol00`00Oomoo`05Ool00`00Oomoo`06Ool0 0`00Oomoo`3dOol001Moo`03001oogoo00Moo`03001oogoo00Eoo`<00?Aoo`005goo00<007ooOol0 27oo00<007ooOol017oo00<007ooOol0m7oo000GOol00`00Oomoo`09Ool00`00Oomoo`03Ool00`00 Oomoo`3dOol001Moo`03001oogoo00Ioo`04001oogoo0005Ool00`00Oomoo`3dOol001Moo`03001o ogoo00Moo`8000Ioo`03001oogoo0?Aoo`005Woo00<007ooOol047oo00<007ooOol0m7oo000FOol0 0`00Oomoo`0@Ool00`00Oomoo`3dOol001Ioo`03001oogoo011oo`03001oogoo0?Aoo`005Woo00<0 07ooOol047oo00<007ooOol0m7oo000FOol00`00Oomoo`0@Ool2003eOol001Eoo`03001oogoo015o o`03001oogoo0?Aoo`005Goo00<007ooOol04Goo00<007ooOol0m7oo000EOol00`00Oomoo`0AOol0 0`00Oomoo`3dOol001Eoo`03001oogoo015oo`03001oogoo0?Aoo`005Goo00<007ooOol04Goo00<0 07ooOol0m7oo000DOol00`00Oomoo`0BOol00`00Oomoo`3dOol001Aoo`03001oogoo019oo`03001o ogoo0?Aoo`0057oo00<007ooOol04Woo00<007ooOol0m7oo000DOol00`00Oomoo`0BOol2003eOol0 01Aoo`03001oogoo019oo`03001oogoo0?Aoo`004goo00<007ooOol04goo00<007ooOol0m7oo000C Ool00`00Oomoo`0COol00`00Oomoo`3dOol001=oo`03001oogoo01=oo`03001oogoo0?Aoo`004goo 00<007ooOol04goo00<007ooOol0m7oo000COol00`00Oomoo`0COol00`00Oomoo`3dOol0019oo`03 001oogoo01Aoo`03001oogoo0?Aoo`004Woo00<007ooOol057oo00<007ooOol0m7oo000BOol00`00 Oomoo`0DOol2003eOol0019oo`03001oogoo01Aoo`03001oogoo0?Aoo`004Woo00<007ooOol057oo 00<007ooOol0m7oo000AOol00`00Oomoo`0EOol00`00Oomoo`3dOol0015oo`03001oogoo01Eoo`03 001oogoo0?Aoo`004Goo00<007ooOol05Goo00<007ooOol0m7oo000AOol00`00Oomoo`0EOol00`00 Oomoo`3dOol0015oo`03001oogoo00ioo`03001oogoo00Aoo`03001oogoo0?Aoo`0047oo00<007oo Ool03goo00<007ooOol017oo00<007ooOol0m7oo000@Ool00`00Oomoo`0 Ool00`00Oomoo`0HOol00`00Oomoo`3dOol000ioo`03001oogoo01Qoo`03001oogoo0?Aoo`003Woo 00<007ooOol067oo00<007ooOol0m7oo000=Ool00`00Oomoo`0IOol00`00Oomoo`3dOol000eoo`03 001oogoo01Uoo`03001oogoo0?Aoo`003Goo00<007ooOol06Goo00<007ooOol0m7oo000=Ool00`00 Oomoo`0IOol00`00Oomoo`3dOol000eoo`03001oogoo01Uoo`03001oogoo0?Aoo`0037oo00<007oo Ool06Woo0P00mGoo000"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {0.78958, -3.04963, \ 0.0293408, 0.0552881}}] }, Open ]], Cell["\<\ Results:When newtons method is working properly the approximations \ head steadly to the root. After several iterations ( say 5 the number is \ fairly small ) the quotent above can be used to test for quadratic \ convergence. It should limit to an number. Another sanity check for a \ newton method is that the iterates are getting closer and closer to each \ other. If not the method may not be converging.\ \>", "Text"] }, Open ]] }, FrontEndVersion->"4.0 for X", ScreenRectangle->{{0, 1024}, {0, 768}}, WindowSize->{520, 600}, WindowMargins->{{98, Automatic}, {Automatic, 5}} ] (*********************************************************************** 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->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1739, 51, 97, 3, 236, "Title"], Cell[1839, 56, 33, 0, 32, "Text"], Cell[1875, 58, 55, 1, 29, "Input"], Cell[CellGroupData[{ Cell[1955, 63, 219, 5, 86, "Input"], Cell[2177, 70, 451, 7, 139, "Output"], Cell[2631, 79, 551, 9, 155, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[3219, 93, 51, 1, 27, "Input"], Cell[3273, 96, 464, 8, 139, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[3774, 109, 76, 1, 27, "Input"], Cell[3853, 112, 453, 8, 127, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4343, 125, 80, 1, 27, "Input"], Cell[4426, 128, 11609, 302, 186, 2600, 186, "GraphicsData", "PostScript", \ "Graphics"] }, Open ]], Cell[16050, 433, 435, 7, 104, "Text"] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)