The Newton-Raphson Method for Root-finding

Newton's method (also known as the Newton-Raphson method or the Newton-Fourier method) is an efficient algorithm for finding approximations to the zeros (or roots) of a real-valued function \normalsize f(x).

The iteration goes on in this way:

x_{k+1} = x_k - \frac{f(x_k)}{f(x_k)}

From the starting value \normalsize x_0, vertical lines and points are plotted to show the location of the sequence of iteration values \normalsize x_1, \normalsize x_2, …; tangent lines are drawn to illustrate the relationship between successive iterations; the iteration values are in the right margin of the plot.

Animation

Go along with the tangent lines and iterate. </ani>

R code

library(animation)
saveHTML({
    ani.options(nmax = 100, interval = 1)
    par(mar = c(3, 3, 1, 1.5), mgp = c(1.5, 0.5, 0), pch = 19)
    newton.method(function(x) 5 * x^3 - 7 * x^2 - 40 * x + 100, 
        7.15, c(-6.2, 7.1), main = "")
}, img.name = "newton_method", htmlfile = "newton_method.html", 
    ani.height = 500, ani.width = 500, outdir = getwd(), title = "Demonstration of the Newton-Raphson Method", 
    description = c("Go along with the tangent lines and iterate."))

Further Reading

compstat/newton_s_method.txt · Last modified: 2011/01/31 08:27 by nan.xiao
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki