Why am I getting no order of magnitude for the error in a Newton-Raphson method problem?

106 Views Asked by At

Here is the sequence equation I am given: $$ a_{k+1} = \frac{1}{2}\left( a_k+ \frac{n}{a_k} \right) $$ I am also given $n = 50$ and $a_0 = 7$.

This is what I calculated: $$ a_1 = \frac{99}{14}, \quad a_2 = \frac{19601}{2772}, \quad a_3 = \frac{54608393}{7722793}. $$

At the end I am supposed to state the order of magnitude of the difference $\sqrt{n} - a_3$.

So for this problem: $\sqrt{50} - \frac {54608393}{7722793}$

But when I plug it into excel I get $0.00$ repeating zeros no matter how far I go. How can there be no error? Am I doing the formula wrong or am I doing something in excel wrong? Thank you in advance for any help.

2

There are 2 best solutions below

0
On BEST ANSWER

Excel does floating-point arithmetic with limited precision. Evidently it evaluates $\sqrt{50}$ and $54608393/7722793$ to the same floating-point number.

You could try Wolfram Alpha.

0
On

Note that the $a_n$ are the iterations obtained by applying Newton's method to solve $f(x) = 0$ where $f(x) = x^2-n$. Hence $f(\sqrt{n}) = 0$, and the update rule becomes $a_{n+1} = a_n - { f(a_n) \over f'(a_n)}$.

Note that $f(a_n)-f(\sqrt{n}) = f'(\sqrt{n})(a_n-\sqrt{n})+ {1 \over 2} f''(\xi_n)(a_n-\sqrt{n})^2$ and so ${f(a_n)-f(\sqrt{n}) \over f'(\sqrt{n})} = a_n-\sqrt{n} +{1 \over \sqrt{n}} (a_n-\sqrt{n})^2$, and so using the update formula (and a little rearranging of the formula), we get $(a_{n+1}-\sqrt{n}) = -{1 \over \sqrt{n}} (a_n-\sqrt{n})^2$.

Using Excel, we get $\sqrt{50}-a_2 \approx -10^{-8}$, hence the previous formula shows that $\sqrt{50}-a_3 \approx -{1 \over \sqrt{50}} 10^{-16}$.

Generally, Newton converges quadratically, and so near a solution, the precision of the answer doubles each iteration.