Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Newton's Method


Local view · f(x) = x³ − 2x − 5

f′(x) = 3x² − 2 · real root α ≈ 2.0946
Drag x₀ on the x-axis, click "Step ▶", or pick a scenario.
n =0
xₙ =3.00
f(xₙ) =16.00
|xₙ − α| =0.91
f(x)tangentdrops







Key Terms

Newton's method (also called Newton-Raphson) — an iterative algorithm for approximating a root of a differentiable function by repeatedly following the tangent line down to the x-axis.

Iterate — one of the values x0,x1,x2,x_0, x_1, x_2, \ldots produced by repeatedly applying the Newton step.

Newton step — the update rule xn+1=xnf(xn)/f(xn)x_{n+1} = x_n - f(x_n) / f'(x_n), the x-intercept of the tangent line at (xn,f(xn))(x_n, f(x_n)).

Initial guess — the starting value x0x_0 from which the iteration begins. Its position relative to the root and to any critical points determines whether the method succeeds.

Quadratic convergence — near a simple root the error roughly squares at each step, so the number of correct digits roughly doubles per iteration.

Critical point — a point where f(x)=0f'(x) = 0. Starting near a critical point makes the tangent nearly horizontal and breaks Newton's method.

Getting Started with the Visualizer

    The visualizer shows the cubic function f(x)=x32x5f(x) = x^3 - 2x - 5 together with its single real root α2.0946\alpha \approx 2.0946, marked by a small triangle below the x-axis.

    The interface has two parts. The left panel holds the graph, three scenario buttons, the Step and Reset controls, and a row of numeric readouts. The right panel is a tabbed sidebar with three views: Computation, Meaning, and Theory.

    There are three ways to drive the tool:

  • Pick a scenario to animate a preset starting point through a sequence of Newton iterations.
  • Drag $x_0$ along the x-axis to place your own starting guess.
  • Click Step to advance one Newton iteration at a time from your custom x0x_0.

  • The four readouts under the graph — current iteration index nn, current iterate xnx_n, function value f(xn)f(x_n), and the absolute error xnα|x_n - \alpha| — update live as the animation progresses.

Choosing a Preset Scenario

    Three buttons sit below the graph, each pinned to a starting value and a label describing what happens next.

  • Direct hit (x0=3x_0 = 3) — starts on the right side of the root in the smooth basin. Each tangent step pulls the guess sharply toward α\alpha and the error collapses within a few iterations.
  • Crosses over (x0=1x_0 = -1) — starts on the wrong side of the curve. The first tangent crosses zero and the iterate lands in positive territory, after which the method converges normally.
  • Stalls (x0=0.85x_0 = 0.85) — starts very close to a critical point at x=2/30.816x = \sqrt{2/3} \approx 0.816 where ff' is tiny. The tangent comes out nearly horizontal, the correction f/ff / f' blows up, and x1x_1 flies off the chart.

  • The third scenario is the failure mode worth studying carefully. Click Reset at any time to clear the current scenario and return x0x_0 to its default position for free dragging.

Stepping Manually from a Custom Start

    To run Newton's method from your own starting point, click Reset first if a preset scenario is active.

    Then:

  • Drag the blue dot on the x-axis to move x0x_0 wherever you want it. The drop line shows the corresponding point (x0,f(x0))(x_0, f(x_0)) on the curve.
  • Click Step to play one full Newton iteration. The animation marks the current point, draws the tangent, slides down to the new x-intercept, and lifts back to the curve.
  • Click Step again to run the next iteration from the updated guess. Each click advances exactly one step, so the convergence (or divergence) unfolds at your own pace.

  • After every step the History table in the Computation tab grows by one row and the live readouts update. The Step button is only available when no preset scenario is running.

Reading the Animation

    Every Newton iteration is broken into five visible phases. A banner at the top of the graph names the current phase, so the geometry on screen lines up with the algebra in the side panel.

  • Mark — the current guess PnP_n on the curve pulses briefly to draw attention.
  • Tangent — the blue tangent line at PnP_n extends across the canvas.
  • To axis — a marker slides along the tangent down to where it meets the x-axis, locating the next iterate xn+1x_{n+1}.
  • To curve — a dashed line lifts from xn+1x_{n+1} up to the curve, locating Pn+1P_{n+1}.
  • Settle — a brief pause before the next iteration begins.

  • Past iterations fade so the latest step stays prominent. The triangle below the axis marks the true root α\alpha, giving you a visual target to compare each iterate against. If the animation halts with a red banner, the iteration has hit a failure mode and an arrow indicates where the off-chart iterate landed.

Reading the Computation Tab

    The Computation tab is the numeric companion to the animation. It has three sections that update together with the geometry.

  • Iteration formula — the Newton step xn+1=xnf(xn)/f(xn)x_{n+1} = x_n - f(x_n) / f'(x_n), shown once as the algorithm's definition.
  • Current step — the live values for the running iteration: f(xn)f(x_n), f(xn)f'(x_n), the correction f/ff / f', and the resulting xn+1x_{n+1}. The two outputs are highlighted in blue.
  • History — a compact table with one row per iteration so far, showing nn, xnx_n, f(xn)f(x_n), and xnα|x_n - \alpha|. The active row is highlighted; failed rows appear in red.

  • The History table is where quadratic convergence becomes obvious: when the method succeeds, the error column drops by a factor that itself grows at every step.

Reading the Meaning and Theory Tabs

    The Meaning tab opens automatically once an iteration sequence finishes. It shows a colored verdict card explaining what happened.

  • Converged (blue) — the iteration reached the root. The card explains quadratic convergence and quotes the final error.
  • Stalls (red) — the iteration failed. The card identifies the value of f(x0)f'(x_0) as the culprit and shows where x1x_1 landed.

  • A second card underneath gives the underlying reason — for success, the asymptotic error formula; for failure, why a small derivative makes the correction blow up.

    The Theory tab is always available and holds five reference blocks: the definition, the geometric derivation of the Newton step from the tangent equation, the quadratic-convergence statement near a simple root, three common failure modes (flat tangent, cycles, divergence), and a summary of what each statement looks like for the specific cubic on screen.

What is Newton's Method?

Newton's method, also called the Newton-Raphson method, is an iterative algorithm for approximating a root of a differentiable function ff. Starting from an initial guess x0x_0, each iteration replaces the current guess with the x-intercept of the tangent line at that point:

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


Geometrically, the step is the algebraic version of "follow the tangent at (xn,f(xn))(x_n, f(x_n)) down to where it crosses the x-axis." When ff is smooth and the starting guess is close enough to a simple root, this sequence converges very rapidly to that root.

For broader coverage of iterative root finders, see the root finding overview page, and for the underlying geometry, see the tangent line page.

Why It Converges Quadratically

Near a simple root α\alpha — where f(α)=0f(\alpha) = 0 and f(α)0f'(\alpha) \neq 0 — let the error at step nn be en=xnαe_n = x_n - \alpha. A Taylor expansion of ff around α\alpha gives:

en+1f(α)2f(α)en2e_{n+1} \approx \frac{f''(\alpha)}{2 f'(\alpha)} \, e_n^2


The new error is proportional to the square of the previous error. In practical terms, the number of correct digits roughly doubles at each iteration. Bisection, by contrast, halves the error per step, so its correct-digit count grows only linearly.

This explains the dramatic drop in the History table's error column when Newton succeeds, and why Newton's method is the workhorse for high-precision root finding. A handful of iterations from a good starting point routinely produces machine-precision accuracy.

When Newton's Method Fails

    Newton's method can break down in three common ways.

  • Flat tangent — if f(xn)f'(x_n) is small relative to f(xn)f(x_n), the correction f/ff / f' blows up and the next iterate lands far from the root. The Stalls scenario shows this directly: at x0=0.85x_0 = 0.85 the derivative f(x0)0.165f'(x_0) \approx 0.165 is too small, and x1x_1 is sent off the chart.
  • Cycles — for certain functions and starting points the iteration becomes periodic. A classic example is f(x)=x32x+2f(x) = x^3 - 2x + 2 with x0=0x_0 = 0, which oscillates between 00 and 11 forever.
  • Divergence — for slowly growing functions like arctan(x)\arctan(x), starting too far from the root makes xn|x_n| grow without bound rather than converge.

  • Production root finders defend against these failures by bracketing the root with bisection until the iterate enters a known basin of attraction, by capping the step size, and by falling back to a slower but more reliable method when Newton misbehaves.

Related Concepts and Tools

    Related concepts:

  • Tangent line — the geometric object Newton's method follows at each step.
  • Derivative — required to compute the Newton step; the method breaks down where ff' vanishes.
  • Quadratic convergence — the rate at which Newton refines a simple root.
  • Bisection method — a slower but more robust root finder that always converges when given a sign-changing bracket.
  • Secant method — a derivative-free cousin of Newton's that replaces f(xn)f'(x_n) with a finite-difference estimate.
  • Fixed-point iteration — the abstract framework that contains Newton's method as a special case.

  • Related tools:

  • Bisection method visualizer — watch a bracket shrink to a root one halving at a time.
  • Secant method visualizer — see how a secant line approximates the tangent.
  • Tangent line visualizer — explore the tangent on its own as the point of tangency moves.