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 x0 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.
Direct Hit: Four Steps from x₀ = 3
The Direct hit scenario starts at x0=3, to the right of the root and well inside the smooth basin where f′ is large. Four iterations are enough to reach the root to four decimal places.
Read the error figures downward: roughly 10−1, then 10−1, then 10−2, then 10−4. The exponent doubles once the guess is close enough, which is quadratic convergence doing its work.
Direct hit, frozen after 4 iterations
Four tangents, each steep enough to keep its correction small. The P-markers crowd together as they approach α, and the final iterate x3 = 2.095136 is already correct to three decimals.
Geometrically the run is uneventful, and that is the point. Every tangent in the picture is steep — f′ never drops below 11 after the first step — so each correction f/f′ is small and lands the next guess close by. The faded trail shows the iterates bunching up near α rather than spreading out.
The next step, had the animation continued, would put the error near 10−7. That is the practical shape of the quadratic convergence result: a handful of steps from a decent starting guess, and no benefit in asking for more.
Crosses Over: One Tangent Throws the Guess Across the Root
The Crosses over scenario starts at x0=−1, on the far side of the curve where f(−1)=−4 and f′(−1)=1. That slope is shallow compared with the function value, so the correction is large:
x1=−1−1−4=3
The first tangent hurls the guess from −1 all the way to 3, straight past the root at α≈2.0946. From there the run is identical to the direct hit — the same four iterates, the same error collapse.
Crosses over, frozen after 5 iterations
The leftmost tangent, at x0 = -1, is the shallow one: it carries the guess clear across the root to x1 = 3. The remaining four steps repeat the direct-hit run exactly.
The overshoot is not a failure. Newton has no notion of which side of the root it is on; it only follows the tangent to the axis. Landing on the opposite side is common and usually harmless, as here, where the crossover happens to deposit the guess in the good basin.
What makes the difference is the ratio f/f′, not the sign of anything. At x0=−1 that ratio is −4, large enough to jump the root but not large enough to escape the region. Push the start a little further left and the same mechanism throws the iterate somewhere far less convenient — which is exactly what the stalling scenario does with a shallow slope instead of a distant start.
Stalls: What Happens Near a Critical Point
The Stalls scenario starts at x0=0.85, deliberately close to the critical point x=2/3≈0.8165 where f′ vanishes. The numbers there are lopsided:
f(0.85)=−6.0859, f′(0.85)=0.1675
The correction is the quotient of those two, −36.33, so
x1=0.85−(−36.33)=37.18
The tangent leaves P0 almost horizontally and travels a very long way before meeting the axis. The tool stops there and draws an arrow off the right edge, because x1=37.18 is far outside the visible window.
Stalls, frozen at the failing step
f′(0.85) = 0.1675 makes the tangent nearly horizontal, so it meets the axis at x1 = 37.18 - far off the right edge, which is what the red arrow marks. The frame is the step itself, before the tool clears it.
Nothing about this is a defect in the method — it is the formula behaving exactly as written. The step size is f/f′, and any denominator near zero makes that quotient enormous no matter how ordinary the numerator is.
The practical rule follows directly: starting points near critical points of f are unsafe for Newton, and so are iterates that happen to land near one mid-run. From x1=37.18 the method would in fact recover — f′ is huge out there, so the guess marches back down — but it would burn a dozen steps doing what a better start achieves in four. Other ways the method can break down are collected under when Newton's method fails.
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.
Manual start, frozen at x0 = 3
Nothing has run yet: just the draggable x0 on the axis, the drop line up to P0 on the curve, and the grey marker at the root α ≈ 2.0946. Every Step click adds one tangent to this picture.
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.