[Math] Computing the square root function with Newton’s method

numerical methods

Show that Newton's method can be used to compute the square root function $\sqrt a$ using the formula

$$x_{n+1} = \frac{1}{2}\left(x_{n} + \frac{a}{x_{n}}\right)$$

show that the error is

$$\sqrt a – x_{n+1} = -\frac{1}{2x_{n}}\left(\sqrt a – x_{n}\right)^2$$

edit: As pointed out below $x^2-a$ has $\sqrt a$ as a root.

I have done as suggested below and plugged in $\sqrt a + \epsilon$ for $x_n$ giving me

$$x_{n+1} = \frac{2\epsilon\sqrt a + \epsilon^2}{2(\sqrt a + \epsilon)}$$ and once again not sure where to proceed.

Best Answer

Hint: start with the fact that $f(x) = x^2-a$ has $\sqrt{a}$ as a root.

Use the Newton's Method formula:

$$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}$$

where $f(x_n) = x_n^2-a$ and $f'(x_n) = 2 x_n$.

Plug these into the above equation and the first result is obtained with a little algebra. For the second result, note that

$$\sqrt{a}-x_{n+1} = \sqrt{a}-\frac{1}{2} \left (x_n + \frac{a}{x_n} \right )$$

What you can do here is multiply that last piece out and factor out $-1/(2 x_n)$. What you should get is 3 terms that fit a pattern of a binomial squared. Look at the result you are trying to show to guide you.

Related Question