5

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.

gt6989b
  • 54,930
  • 1
    There is no reason to expect them to be the same, you should only expect the two Newton method mappings to have a fixed point at $1/a$. And they do. – Ian Apr 08 '18 at 05:55
  • 4
    Incidentally, in practice we use the first method because the second one needs division. – J.G. Apr 08 '18 at 06:03
  • The Newton method for $fg$ is $x_+=x-\frac{fg}{f'g+fg'}=x-\frac{f}{f'+fg'/g}$, thus different to the one purely for $f$ even if $g$ has no roots and thus both find only roots of $f$. – Lutz Lehmann Apr 08 '18 at 06:33

2 Answers2

2

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.

gt6989b
  • 54,930
  • Can I say that the second one, find the root in one iteration, is not a newton method solution? Because the root-finding process is not iterative and there is no update formula $x_{n+1} = g(x_n)$ involved. – user2262504 Jun 16 '20 at 13:54
  • And what does the calculator do to "find" $1/a$? – Oskar Limka Feb 05 '24 at 09:06
  • @OskarLimka I don't know. Maybe it just divides – gt6989b Feb 05 '24 at 11:52
  • @gt6989b but isn't dividing what solving $a-1/x=0$ for $x$ trying to do? So it's circular. Therefore any division (other than dividing by $2$ or its powers which can be implemented as shifts in binary) is self defeating. An accessible paper on the subject is https://doi.org/10.1080/00029890.2022.2093573 . – Oskar Limka Feb 09 '24 at 18:25
0

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 $.

Or Kedar
  • 933