Newton's Method

Graphs a function f (x) and the tangent lines to the graph of f (x) used in Newton's Method to approximate roots of f (x).
How to use   ||   Examples   ||   Other Notes


Try the Derivative Calculator.
How to Use
The text input fields marked "f (x)=" and "f '(x)=" can accept a wide variety of expressions to represent functions, and the buttons under the graph allow various manipulations of the graph coordinates. The text input field marked "x0=" can accept any decimal number.

For assistance computing the derivative f '(x), try the Derivative Calculator.


Examples
Square roots of 2:
f (x)=x2-2
f '(x)=2x
    Approximating Pi:
f (x)=tan(x/4)-1
f '(x)=sec2(x)/4
(x0=5, n=5)
    Which root?
f (x)=sin(x)
f '(x)=cos(x)
Horizontal tangent:
f (x)=x2-2
f '(x)=2x
x0=0
    Diverging:
f (x)=4arctan(x)
f '(x)=4/(1+x2)
(x0=1.5, n=4)
    Multiple root:
f (x)=x3-3x+2
f '(x)=3x2-3
(double root at x=1)

Other Notes
Newton's Method approximates roots of a function using the iteration formula xn+1=xn-f (xn)/f '(xn). So xn+1 is the x-intercept of the tangent line to the graph of f (x) at xn.

Under certain rather technical conditions, Newton's Method can be guaranteed to converge quickly to a root xr of f (x), as long as x0 is sufficiently close to xr. However, Newton's Method encounters problems for x values near where f '(x)=0 or f ''(x)=0.

One example of a problem happens when f '(x0)=0 (see the horizontal tangent example above) -- in this case, the tangent line is horizontal, so it has no x-intercept, and there is no x1.

If x0 is not close enough to the root xr, then Newton's Method may not converge at all (see the diverging example above). Or Newton's Method may converge, but not to the expected root (see the "which root?" example above).

If the root xr satisfies f '(xr)=0, then xr is a multiple root, and even if Newton's Method converges, it will converge more slowly (as in the multiple root example above).