Calculus/Newton's Method

From testwiki
Jump to navigation Jump to search

Newton's Method

In Calculus, 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 the function is differentiable in a desired interval.


Newton's Method

Let f(x) be a differentiable function. Select a point x1 based on a first approximation to the root, arbitrarily close to the function's root. To approximate the root you then recursively calculate using:

xn+1=xnf(xn)f(xn)

As you recursively calculate, the xn's become increasingly better approximations of the functions root.

For n number of approximations,

xn=x0i=0nf(xi)f(xi)

Examples

Find the root of the function f(x)=x2 .
x1=f(2)=4 
x2=x1f(x1)f(x1)=2
x3=x2f(x2)f(x2)=1
x4=x3f(x3)f(x3)=12
x5=x4f(x4)f(x4)=14
x6=x5f(x5)f(x5)=18
x7=x6f(x6)f(x6)=116
x8=x7f(x7)f(x7)=132

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

Answer: f(x)=x2  has a root at x=0 .

Notes

This method fails when f(x)=0. In that case, one should choose a new starting place. Occasionally it may happen that f(x)=0 and f(x)=0 have a common root. To detect whether this is true, we should first find the solutions of f(x)=0, and then check the value of f(x) at these places.

Newton's method also may not converge for every function, take as an example:

f(x)={xr,forxrrx,forxr

For this function choosing any x1=rh then x2=r+h would cause successive approximations to alternate back and forth, so no amount of iteration would get us any closer to the root than our first guess.

See Also

Template:Calculus:TOC