Fundamental Mathematics from an Advanced Standpoint

Math 4303 - Fall 2009

Helmut Knaust, Department of Mathematical Sciences, UTEP, El Paso TX 79968
hknaust@utep.edu

Last Edits: 9/15/09

Here is the recursive formula to compute (Sqrt[2]). The starting value for the algorithm is 1.

a[1]=1
a[n_]:=a[n]=1/2(a[n-1]+2/a[n-1])

Below are the first approximations as fractions. The second column lists the absolute difference between the square of the approximative value and 2.

Table[{a[n],Abs[a[n]^2-2//N]},{n,1,10}]

We can easily modify the code to compute other square roots (in the example below: (Sqrt[17]), with starting value 4)

Clear[a];
a[1]=4
a[n_]:=a[n]=1/2(a[n-1]+17/a[n-1])
Table[{a[n],Abs[a[n]^2-17//N]},{n,1,7}]