Calculus/Newton's Method

Newton's Method (also called the Newton-Raphson method) is a recursive algorithm for approximating the root of a differentiable function. We know simple formulas for finding the roots of linear and quadratic equations, and there are also more complicated formulae for cubic and quartic equations. At one time it was hoped that there would be formulas found for equations of quintic and higher-degree, though it was later shown by Neils Henrik Abel that no such equations exist. The Newton-Raphson method is a method for approximating the roots of polynomial equations of any order. In fact the method works for any equation, polynomial or not, as long as the function is differentiable in a desired interval.

In order to explain Newton's method, imagine that $$x_0$$ is already very close to a 0 of $$f(x)$$. We know that if we only look at points very close to $$x_0$$ then $$f(x)$$ looks like its tangent line. If $$x_0$$ was already close to the place where $$f(x)$$ was 0, and near $$x_0$$ we know that $$f(x)$$ looks like its tangent line, then we hope the 0 of the tangent line at $$x_0$$ is a better approximation then $$x_0$$ itself.

The equation for the tangent line to $$f(x)$$ at $$x_0$$ is given by
 * $$y=f'(x_0)\cdot(x-x_0)+f(x_0)$$

Now we set $$y=0$$ and solve for $$x$$.
 * $$0=f'(x_0)\cdot(x-x_0)+f(x_0)$$
 * $$-f(x_0)=f'(x_0)\cdot(x-x_0)$$
 * $$\frac{-f(x_0)}{f'(x_0)}=(x-x_0)$$
 * $$x=\frac{-f(x_0)}{f'(x_0)}+x_0$$

This value of $$x$$ we feel should be a better guess for the value of $$x$$ where $$f(x)=0$$. We choose to call this value of $$x_1$$, and a little algebra we have
 * $$x_1=x_0-\frac{f(x_0)}{f'(x_0)}$$

If our intuition was correct and $$x_1$$ is in fact a better approximation for the root of $$f(x)$$, then our logic should apply equally well at $$x_1$$. We could look to the place where the tangent line at $$x_1$$ is zero. We call $$x_2$$, following the algebra above we arrive at the formula
 * $$x_2=x_1-\frac{f(x_1)}{f'(x_1)}$$

And we can continue in this way as long as we wish. At each step, if your current approximation is $$x_n$$ our new approximation will be $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$$.

Examples
Find the root of the function $$f(x)=x^2$$. $$\begin{align}x_0&=&4\\ x_1&=&x_0-\frac{f(x_0)}{f'(x_0)}=4-\frac{16}{8}=2\\ x_2&=&x_1-\frac{f(x_1)}{f'(x_1)}=2-\frac{4}{4}=1\\ x_3&=&x_2-\frac{f(x_2)}{f'(x_2)}=1-\frac{1}{2}=\frac{1}{2}\\ x_4&=&x_3-\frac{f(x_3)}{f'(x_3)}=\frac{1}{2}-\frac{\frac{1}{4}}{1}=\frac{1}{4}\\ x_5&=&x_4-\frac{f(x_4)}{f'(x_4)}=\frac{1}{4}-\frac{\frac{1}{16}}{\frac{1}{2}}=\frac{1}{8}\\ x_6&=&x_5-\frac{f(x_5)}{f'(x_5)}=\frac{1}{8}-\frac{\frac{1}{64}}{\frac{1}{4}}=\frac{1}{16}\\ x_7&=&x_6-\frac{f(x_6)}{f'(x_6)}=\frac{\frac{1}{256}}{\frac{1}{8}}=\frac{1}{32}\end{align}$$

As you can see $$x_n$$ is gradually approaching 0 (which we know is the root of $$f(x)$$). One can approach the function's root with arbitrary accuracy.

Answer: $$f(x)=x^2$$ has a root at $$x=0$$.