Fixed Point Iterations

g1[x_] := x^2 - 2 ; g2[x_] := Sin[x] ; g3[x_] := x - Tan[x] ;

Plot[{g3[x], x}, {x, -2, 3}] ;

x = 1 ;

For[i = 1, i <= 10, i ++, <br />      x = g3[x] // N ; <br />      Print[i, "    ", x] ; <br />     ] ;

g1 has repelling fixed points
g2 has attracting fixed point, but very slow.
g3 has attracting fixed point, quadratic convergence.

x=x-Tan[x]=0  =>  Tan[x]=0 => Sin[x]=0.

g2 and g3 are both trying to find zeroes of Sin[x].  One works well, the other not so good.


Converted by Mathematica  (January 8, 2003)