Newton's Method Calculator

Type a function and a starting guess to find a root.

Use x. Type powers with ^, and functions with brackets: sin(x), e^(2x), ln(x), sqrt(x).

Starting valuex0x_0

A first guess close to the root you want.

Up to 50; it stops early once two guesses agree.

Try

Result

You enteredf(x)=x2−2=0,x0=1f(x) = x^{2} - 2 = 0,\quad x_0 = 1

x≈1.414214\displaystyle x \approx 1.414214
Show the work
  1. Newton's method

    Each step replaces the graph by its tangent line at the current guess and moves to where that line crosses the x-axis.

    Using xn+1=xn−f(xn)f′(xn)x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}

    f′(x)=2xf'(x) = 2x
  2. The first step

    Start at x0=1x_0 = 1.

    x1=1−−12=1.5\begin{aligned} x_1 &= 1 - \frac{-1}{2} \\ &= 1.5 \end{aligned}
  3. Table of the iterations

    The iteration stops when two guesses agree to 12 decimal places.

    nxnf(xn)01−111.50.2521.4166670.00694431.4142160.00000641.4142144.511×10−1251.4142144.441×10−1661.414214−4.441×10−16\begin{array}{c|c|c} n & x_n & f(x_n) \\ \hline 0 & 1 & -1 \\ 1 & 1.5 & 0.25 \\ 2 & 1.416667 & 0.006944 \\ 3 & 1.414216 & 0.000006 \\ 4 & 1.414214 & 4.511\times 10^{-12} \\ 5 & 1.414214 & 4.441\times 10^{-16} \\ 6 & 1.414214 & -4.441\times 10^{-16} \end{array}
  4. Result

    The estimate of the root is x≈1.414214x \approx 1.414214.

Drag to pan. Scroll or pinch to zoom. Arrow keys pan and + / − zoom when the graph has focus.
  • y = x^2 - 2

Points on the graph

  • y = x^2 - 2: zero (1.414214, 0)

Worked examples