How to use newton-raphson to solve 1/a in fixed point

i’d like to solve 1/a by newton-raphson method in fixed-point type, but i don’t have idea about it. Is there any suggestion?


Very confusing post, but here goes!

Several steps:

  1. Write your problem as a root problem:
    i.e. find x so that F(x) = 0.

  2. Pick an inital guess x0 and solve the associated tangent problem:

solve F(x0) + F’(x0)(x-x0) = 0, i.e.
x = x0 - F(x0)/F’(x0)

  1. Repeat, i.e. take
    xn+1 = xn - F(xn)/F’(xn)

unit |F(xn)| is small enough.

Sometimes this doesn’t converge (if the initial guess is poor). Try adding

if (|F(xn+1)| > |F(xn)| (meaning you are getting worse), set xn+1 = xn - 0.5(xn-xn+1), and test again until this criterion is satisfied. Eventually you are guarenteed to have F(xn+1) nearer to zero that F(xn). Then go to 3 and repeat.