CHAPTER 11, Newton’s Method for Real Quadratics and Cubics

11.1 Iteration of Maps of the Form  f(x)=(x+a)((x^2)+b).

We now examine Newton’s method for cubics of the form: f(x)=(x+a)((x^2)+b),  where a  and  b are real parameters. It is convenient to show the iterations of such maps using a web diagram. The following module iterates Newton’s method. The parameters are the function g(x), the end points of the interval [a,b], on which the function is being plotted, the point being iterated (Subscript[x, 0]), and the number of iterations n.

iterate[g_,a_,b_,x0_,n_]:=Module[{x,f,t},f[x_]=g[x];
	t[x_]:=x-f[x]/f'[x];
DynamicModule[{m=0,data={x0},data2,data3,data4},
  Manipulate[
data=NestList[t,x0,m];data2=Flatten[Table[{data[[i]],0,data[[i]],f[data[[i]]]},{i,Length[data]}]];
		data3=Partition[data2,2];
		data4=Drop[data3,-1];
Plot[ f[x],{x,a,b},PlotStyle->{Red,Thickness->0.005},AspectRatio->Automatic,Ticks->None,
Epilog->{Blue, Line[data4] }],
{{m,0,Dynamic[Panel[Row[{Column[{"n=","x="}],
                     Column[{m,N[data[[-1]]]}]}]] ]},0,n,1}]
]]

Clear[f,x];f[x_]:=(x+2)(x^2+.466)

iterate[f,-2.5,1,.75,10]

We see that the map: f(x)=(x+2)((x^2)+.466),  has a 3-cycle. If we graph the third iterate of the Newton function, it seems to have a single 3-cycle.

g[x_]:=x-f[x]/f'[x]

Plot[{x,g[g[g[x]]]},{x,-2.2,1.3}]

A rough idea of where the 3-cycle occurs can be seen as follows.

FindRoot[g[g[g[x]]]==x,{x,-.6}]
FindRoot[g[g[g[x]]]==x,{x,.2}]
FindRoot[g[g[g[x]]]==x,{x,.7}]

Set f(x)=(x^3)-x-c,  where c  is a real parameters. Using a ManipulatePlot on f(x) and iterates of ite Newton function, for different values of  c , give some insight into the behavior of this map.

f[x_,c_]:=x^3-x-c

n[x_,c_]:=x-f[x,c]/(3x^2-1)

h[x_,c_]:=n[n[x,c],c]

g[x_,c_]:=n[n[n[x,c],c],c]

k[x_,c_]:=n[n[n[n[x,c],c],c],c]

Manipulate[Plot[{x,f[x,c]}, {x,-3.2,2}],{c,0,4}]

11.2 A More Dynamical Iteration Method.

Here we give a more interactive dynamical iteration for Newton’s method.

DynamicNewton:=Manipulate[
Module[{func},
Clear[x];
func[x_,formula_]=Function[x,formula];
Module[{f=func[x,expr],g,list},
g[x_]=x-f[x]/f'[x];
list=NestList[g,x0,n];Column[{TraditionalForm@Text@Style[Row[{"Iterations ",Range[0,n],": ",N[ list]}],14],Plot[f[x],{x,a,b},PlotRange-> All,
Epilog->{
{Red,Arrowheads[Medium],Arrow[Most[Flatten[Map[{{#,0},{#,f[#]}} &,list],1]]]},
{PointSize[Medium],Point[{x0,0}]}},ImageSize->{600,325}]},Center]]],
{{expr,x^3-5x^2+1,"f(x)="},ControlType -> InputField},
{{n,1,"n"},0,6,1,Appearance->"Labeled"},
{{x0,3,Subscript["x","0"]},a,b,Appearance->"Labeled" },
{{a,-5,"a"},-10,b-0.1,Appearance->"Labeled" },
{{b,5,"b"},a+0.1,20,Appearance->"Labeled" }]

DynamicNewton