Friday, April 9, 2010

Newton Ralphson's method to calculate square root

x^2 = n, need to find x.
f(x) = x^2 - n.
x_{n+1} = x_{n} - f(x_{n}) / f ' (x_{n}).

See the following graph for intuition.
Note that the slope of the tangent line is f ' (x_{n}) = f(x_{n}) / {x_{n+1} - x_{n}}.


No comments:

Blog Archive

Followers