Newtons method for finding reciprocal

8.2k Views Asked by At

Define a function 1 which is $f_1(x)=a-1/x$ and function 2 which is $f_2(x)=1-ax $

If I set both to zero I am looking for when $x=1/a$ as the root using Newtons method.

When I do this I get two different answers however and they should surely both be the same.

for 1 I get $$x(n+1)=x(n)+x(n) (1-ax(n) )$$ and for 2 I get $$x(n+1)=x(n)+(1/a)(1-ax(n))$$

difference being the $1/a$ term.

2

There are 2 best solutions below

0
On

I think you had a wrong calculation in 2. You have $$x_1=x_0-\frac {1-ax_0}{-a}=x_0+\frac {1}{a}-x_0=\frac {1}{a}. $$ So basically you converge to the desired result by one step. Think of it geometrically. You start with a point and continue all the way on your function until you reach zero.

Edit: your calculation was correct but you did not make the last step of canceling the $x_n $.

4
On

For $f_1(x) = a-1/x$ you have $f'_1(x) = 1/x^2$ so the iteration is $$ x_{n+1} = x_n - \frac{f_1(x_n)}{f'_1(x_n)} = x_n - \frac{a-1/x_n}{1/x_n^2} = x_n-ax_n^2+x_n = 2x_n - ax_n^2. $$ For the second one you get $f_2(x) = 1-ax$ and $f_2'(x) = -a$, hence $$ x_{n+1} = x_n - \frac{f_1(x_n)}{f'_1(x_n)} = x_n - \frac{1-ax_n}{-a} = \frac{1}{a}, $$ which is expected since $f$ is linear, so Newton's method finds the root in one iteration.