DOC

How calculators work

Newton’s Method: How Calculators Find Roots

Newton’s method turns a tangent line into a better root estimate. Learn the update rule, units, worked examples, convergence checks, and when the iteration fails.

Many equations do not hand over their answers in a tidy formula. A calculator can still solve them by asking a more practical question: if the curve looks straight right here, where would that local straight line cross zero? Newton’s method repeats that question, shifting the tangent line after every answer.

It is a remarkably efficient bargain when the guess is near a simple root. It is also easy to overtrust. A tangent can point at the wrong root, leap across a boundary, stall on a flat patch, or cycle forever. The formula is short; the judgment around it is not.

A person uses a tangent line touching a curve to locate the curve's next crossing of the horizontal axis
Each update uses the x-intercept of a local tangent line. The new point becomes the place where the next tangent is drawn.
To solve f(x) = 0xn+1 = xn − f(xn) / f′(xn)

The next estimate is the current estimate minus its residual divided by its local slope.

What every part of the update carries

xncurrent guess

The current x-coordinate, with the units of the unknown: metres, seconds, kelvin, or a dimensionless number.

f(xn)residual

How far the equation is from zero, expressed in the output units of f.

f′(xn)local slope

Output units per x-unit. It tells the tangent how rapidly the residual changes nearby.

niteration

A dimensionless counter that records repeated approximation, not elapsed time.

The units supply a quiet error check. The quotient f(xn) / f′(xn) has x-units, so it can be subtracted from xn. If that subtraction mixes unlike units, either the derivative or the model has been defined incorrectly.

NIST’s Digital Library of Mathematical Functions gives this rule for real twice-continuously differentiable functions and complex analytic functions. Its origin is only a first-order approximation.

Derive the rule from one tangent

At a current estimate xn, approximate the curve a short distance Δx away:

1. Linearize nearbyf(xn + Δx) ≈ f(xn) + f′(xn)Δx
2. Set tangent to zero0 ≈ f(xn) + f′(xn)Δx
3. Solve correctionΔx ≈ −f(xn) / f′(xn)
4. Move the guessxn+1 = xn + Δx

The approximation is the entire bargain. Newton’s method does not know the curve between samples; it temporarily replaces the curve with its tangent. The NIST phase-field numerical guide describes Newton-type methods in the same sequence: linearize, calculate a correction, iterate.

A person follows a succession of tangent-like steps that rapidly approach a marked root on a curved path
Near a well-behaved root, tangent corrections can become dramatically smaller. That speed is local, not guaranteed from every starting point.

Worked example 1: finding √2 with no square-root key

Set f(x) = x² − 2; then f′(x) = 2x. The update simplifies to:

xn+1 = xn − (xn² − 2)/(2xn) = ½(xn + 2/xn)

Start at x0 = 1.5, a value above √2.

First correctionx1 = 1.5 − 0.25/3 = 17/12 = 1.4166666667
Second correctionx2 = 17/12 − (1/144)/(17/6) = 577/408 = 1.4142156863
Third correctionx3 = 665857/470832 = 1.41421356237469
Residual checkx3² − 2 ≈ 4.51 × 10−12

The reference value begins √2 = 1.41421356237310…. Three corrections have delivered eleven matching decimal places. The root is simple, its derivative is not zero, and the first guess is close enough for the tangent approximation to improve itself. DLMF calls this local behavior quadratic convergence: once in the right neighborhood, the number of correct digits can roughly double per step.

Worked example 2: a cubic whose root is not obvious

Solve x³ − 2x − 5 = 0 from x0 = 2. Here f′(x) = 3x² − 2.

estimateresidualslopenext estimate
2−1102 − (−1/10) = 2.1
2.10.06111.232.094568121104185
2.0945681211041850.00018572317327211.1616468418382.094551481698199
2.0945514816981991.739761224 × 10−911.1614377284522.094551481542327

Substitution at the final value leaves a residual of about 9 × 10−16 in IEEE double arithmetic. That is a strong numerical result, not a proof that a displayed decimal is exact. A serious result needs a tolerance, a stopping rule, and the function’s permitted domain.

When a fast tangent becomes a bad guide

Nearly flat slope

If f′(xn) is zero or tiny, the division is undefined or launches a huge step. Rescale or use a safeguarded method.

Wrong starting basin

The tangent may land near a different root or far outside the meaningful domain. A plausible first guess is not a guarantee.

A cycle

For x³ − 2x + 2, starting at 0 gives 1, then 0 again. Track residual history and stop after a finite count.

Multiple root

For (x − 1)², the update becomes (xn + 1)/2: error halves rather than squares.

A person stands by an almost flat tangent line whose distant crossing makes the next step unreliable
A flat tangent has a distant x-intercept. Dividing by a small slope is Newton’s most visible warning sign.

Stop on two kinds of evidence

Step test|xn+1 − xn| ≤ x tolerance

Has the estimate stopped moving materially in the units that matter?

Residual test|f(xn+1)| ≤ residual tolerance

Does the estimate satisfy the equation to the required output accuracy?

Safety testn < maximum iterations

Return an explicit failure state rather than silently accepting a stall or cycle.

Neither numerical test is sufficient alone. A small step can mean the solver is trapped in a flat region; a small residual can mislead when the equation is badly scaled. Practical solvers often combine Newton’s fast local step with a bracket, damping, or a line search. NIST’s work on regulated Newton-Raphson methods makes the same broader point: global reliability needs extra structure.

Newton’s method can tell you how a smooth equation’s nearby tangent points toward zero. It cannot certify that the selected root is unique, physically permitted, globally reachable, or accurate beyond the precision of the supplied function and derivative. A fast update is evidence to check, not a conclusion to announce.