Newton's Iteration

Author

Eric W. Weisstein
October 11, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumericalMath/NewtonsIteration.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/NewtonsIteration.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

NewtonsIteration[n_,k_]:=NestList[1/2(#+n/#)&,1,k]

General Case

v5.0

RSolve[{R[k]==(1/2)(R[k-1]+(n/(R[k-1]))),R[0]==1},R[k],k]

v5.1

RSolve[{R[k]==(1/2)(R[k-1]+(n/(R[k-1]))),R[0]==1},R[k],k]

FullSimplify[%]

V7

RSolve[{R[k]==(1/2)(R[k-1]+(n/(R[k-1]))),R[0]==1},R[k],k]

Alternate Form

TrigToExp[(Sqrt[n]) Coth[(2^k) ArcTanh[(Sqrt[n])]]]//FullSimplify

(Sqrt[n])(1+(2/(-1+ (((((1+(Sqrt[n]))/(1-(Sqrt[n])))))^(2^k)))))

FullSimplify[ExpandAll[TrigToExp[Subtract@@{(1+(2/(-1+ (((((1+(Sqrt[n]))/(1-(Sqrt[n])))))^(2^k))))) (Sqrt[n]),(Sqrt[n]) Coth[(2^k) ArcTanh[(Sqrt[n])]]}]],n>0&&k>0]

Explicit Terms

a[0]:=n
a[i_]:=a[i]=(1/2)(a[i-1]+(n/(a[i-1])))

a/@Range[4]//Factor

Solution By Rearranging

Solve[((xk-(Sqrt[n]))/(xk+(Sqrt[n])))==(((((xk1-(Sqrt[n]))/(xk1+(Sqrt[n])))))^2),xk]

v5.1

RSolve[{((x[k]-(Sqrt[n]))/(x[k]+(Sqrt[n])))==(((((x[k-1]-(Sqrt[n]))/(x[k-1]+(Sqrt[n])))))^2),x[0]==1},x[k],k]

((xk-(Sqrt[n]))/(xk+(Sqrt[n])))==(((((xk1-(Sqrt[n]))/(xk1+(Sqrt[n])))))^2)==((((((((((xk2-(Sqrt[n]))/(xk2+(Sqrt[n])))))^2)-(Sqrt[n]))/((((((xk2-(Sqrt[n]))/(xk2+(Sqrt[n])))))^2)+(Sqrt[n])))))^2)

Simplify[ExpandAll[Together[((((((((((xk2-(Sqrt[n]))/(xk2+(Sqrt[n])))))^2)-(Sqrt[n]))/((((((xk2-(Sqrt[n]))/(xk2+(Sqrt[n])))))^2)+(Sqrt[n])))))^2)]]]

FullSimplify[Solve[((xk-(Sqrt[n]))/(xk+(Sqrt[n])))==(((((1-(Sqrt[n]))/(1+(Sqrt[n])))))^(2^k)),xk][[1,1]],n>0&&k>0]

ExpandAll[Table[(-1-(2/(-1+(((-1+(2/(1+(Sqrt[n])))))^(2^k))))) (Sqrt[n]),{k,3}]]//FullSimplify//Factor

V7

RSolve[{((x[k]-(Sqrt[n]))/(x[k]+(Sqrt[n])))==(((((x[k-1]-(Sqrt[n]))/(x[k-1]+(Sqrt[n])))))^2),x[0]==1},x[k],k]

Alternative Form

TrigToExp[(Sqrt[n]) Coth[(2^k) ArcTanh[(Sqrt[n])]]]//FullSimplify

FullSimplify[ExpandAll[TrigToExp[Subtract@@{(1+(2/(-1+ (((((1+(Sqrt[n]))/(1-(Sqrt[n])))))^(2^k))))) (Sqrt[n]),(Sqrt[n]) Coth[(2^k) ArcTanh[(Sqrt[n])]]}]],n>0&&k>0]

Table[%,{k,10}]

Specific Cases

n==1

RSolve[{R[i]==(1/2)(R[i-1]+(1/(R[i-1]))),R[0]==1},R[i],i]

n==2

RSolve[{R[i]==(1/2)(R[i-1]+(2/(R[i-1]))),R[0]==1},R[i],i]//FullSimplify

l=Table[(Sqrt[2]) Coth[(2^i) ArcTanh[(Sqrt[2])]],{i,0,6}]//TrigExpand

NewtonsIteration[2,6]

Numerically

NewtonsIteration[2.,4]

n==3

RSolve[{R[i]==(1/2)(R[i-1]+(3/(R[i-1]))),R[0]==1},R[i],i]//FullSimplify

l=Table[(Sqrt[3]) Coth[(2^i) ArcTanh[(Sqrt[3])]],{i,0,6}]//TrigExpand