A Geometric View of Newton' s Method

newton[f_,x0_,a_,b_,n_,zoom_]:=Module[{list=NestList[#-((f[#])/(f'[#])) &,x0,n]},Grid[{{Plot[f[x],{x,a,b},PlotRange->{{zoom a,zoom b},{-1+2zoom,1-2zoom}},Epilog->{{Arrowheads[Small],Arrow[Most[Flatten[Map[{{#,0},{#,f[#]}} &,list],1]]]},{PointSize[0.015],Point[{x0,0}]}},ImageSize->{300,190}]}}]];

Manipulate[newton[Sin[4π ((#)^4)] &,x0,0.0,0.78,n,zoom],

(*Manipulate Controllers*)
Style["Newton's Method",Bold,12],(*Title*)
Delimiter,

{{x0,0.5},0.01,0.77,ImageSize->Tiny},{{n,2},{0,1,2,3,4,5},ControlType->SetterBar},
Style["",Bold,12],Style["",Bold,12],Style["",Bold,12],
{{zoom,1},.1,1,ImageSize->Tiny},ControlPlacement->Left,SaveDefinitions->True]

BASED UPON THE NOTEBOOK

"Two Geometric Views of Newton's Method" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/TwoGeometricViewsOfNewtonsMethod/

Contributed by: Bruce Atwood

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »