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,… produced by repeatedly applying the Newton step.
Newton step — the update rule xn+1=xn−f(xn)/f′(xn), the x-intercept of the tangent line at (xn,f(xn)).
Initial guess — the starting value x0 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)=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)=x3−2x−5 together with its single real root α≈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 x0.
The four readouts under the graph — current iteration index n, current iterate xn, function value f(xn), and the absolute error ∣xn−α∣ — 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=3) — starts on the right side of the root in the smooth basin. Each tangent step pulls the guess sharply toward α and the error collapses within a few iterations.
Crosses over (x0=−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.85) — starts very close to a critical point at x=2/3≈0.816 where f′ is tiny. The tangent comes out nearly horizontal, the correction f/f′ blows up, and x1 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 x0 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 x0 wherever you want it. The drop line shows the corresponding point (x0,f(x0)) 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 Pn on the curve pulses briefly to draw attention.
Tangent — the blue tangent line at Pn 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+1.
To curve — a dashed line lifts from xn+1 up to the curve, locating Pn+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 α, 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=xn−f(xn)/f′(xn), shown once as the algorithm's definition.
Current step — the live values for the running iteration: f(xn), f′(xn), the correction f/f′, and the resulting xn+1. The two outputs are highlighted in blue.
History — a compact table with one row per iteration so far, showing n, xn, f(xn), and ∣xn−α∣. 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) as the culprit and shows where x1 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 f. Starting from an initial guess x0, each iteration replaces the current guess with the x-intercept of the tangent line at that point:
xn+1=xn−f′(xn)f(xn)
Geometrically, the step is the algebraic version of "follow the tangent at (xn,f(xn)) down to where it crosses the x-axis." When f 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 α — where f(α)=0 and f′(α)=0 — let the error at step n be en=xn−α. A Taylor expansion of f around α gives:
en+1≈2f′(α)f′′(α)en2
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) is small relative to f(xn), the correction f/f′ blows up and the next iterate lands far from the root. The Stalls scenario shows this directly: at x0=0.85 the derivative f′(x0)≈0.165 is too small, and x1 is sent off the chart.
Cycles — for certain functions and starting points the iteration becomes periodic. A classic example is f(x)=x3−2x+2 with x0=0, which oscillates between 0 and 1 forever.
Divergence — for slowly growing functions like arctan(x), starting too far from the root makes ∣xn∣ 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 f′ 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) 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.