Calculus & Analysis

Newton’s Method

Follow tangent-line root updates, inspect iterates and residuals, and compare convergence with horizontal tangents, repeated roots and cycles.

By Riano · Published · Report a correction

Newton’s Method

Concept Overview

A root of a function satisfies f(x) = 0. Newton’s method replaces a curved graph near the current estimate with its tangent line, then uses the line’s x-intercept as the next estimate. The construction is easy to repeat, but a promising first step does not guarantee convergence. This module makes the estimates, function values and derivatives visible together.

Mathematical Definition

At xn, the tangent line has slope f′(xn) and passes through (xn, f(xn)). Setting its height to zero gives the update, provided the derivative is nonzero.

y = f(xn) + f′(xn)(x − xn)
xn+1 = xn − f(xn) / f′(xn)

The amber segment shows the latest completed tangent update. A dashed tangent at the initial point is only a preview. Green vertical guides return an x-intercept to the curve to evaluate the next function value. The ledger includes the starting point as row zero; completed updates count the transitions after it.

Key Concepts

A square-root example

For f(x) = x2 − 2, the rule simplifies to xn+1 = (xn + 2/xn)/2. Starting at 1 gives 3/2, then 17/12, then 577/408. The third estimate is approximately 1.414215686275; its exact residual is 1/166464, approximately 0.000006007305. Starting at −1 produces the corresponding negative sequence and approaches −√2. The starting guess can determine which root is found.

Local convergence and repeated roots

For a twice continuously differentiable function near a simple root r, with f′(r) ≠ 0 and a sufficiently close initial estimate, Newton’s method converges locally and quadratically. Writing en = xn − r, its leading error relation is:

en+1 ≈ [f″(r) / (2f′(r))] en2

These are local conditions. They do not promise success from every starting point. For the repeated-root preset f(x) = (x − 1)2, the unmodified update is (x + 1)/2 whenever x ≠ 1. Its distance to the root halves at every step. Starting at 3 gives 2, 1.5 and 1.25, whose residual is 0.0625. This is linear convergence. Starting exactly at 1 already solves the equation, so no division is needed despite the zero derivative.

Failure is part of the lesson

  • Horizontal tangent: For x2 − 2 at x = 0, f = −2 and f′ = 0. The tangent never reaches the x-axis, so the update is undefined.
  • A two-cycle: For x3 − 2x + 2 at x = 0, the next estimate is 1; at 1, the next estimate is 0. Neither point is a root. The exact repetition demonstrates failure even though both slopes are nonzero.
  • Small slope: A tiny nonzero derivative can produce a very large step. A large or repeated step is not evidence of a root.

Numerical stopping rules

This bounded demonstration uses double-precision arithmetic and at most twelve updates. It stops first when |f(x)| ≤ 1e-10. Otherwise, a derivative magnitude ≤ 1e-12, a repeated estimate within 1e-12, or a proposed nonfinite estimate or magnitude above 1e6 stops the run. These thresholds are computational safeguards. A nearly repeated estimate is reported as a repeated iterate, not a proof of an exact mathematical cycle. A small residual measures the equation’s remaining mismatch; it does not certify the distance to a root or guarantee uniqueness. Near a flat root those quantities can differ substantially.

The iteration budget is an upper bound. In the positive square-root example, the fourth iterate is 665857/470832. Its exact residual is 1/221682772224, about 4.51e-12, so the residual test stops there even with a budget of twelve. Floating-point evaluation can differ slightly from that exact rational residual. The plot limits its displayed iterates to |x| ≤ 12; the ledger preserves any larger valid numerical values.

Historical Context

Newton’s method belongs to the long tradition of iterative root calculation. The square-root recurrence above is also known as the Babylonian method. Modern numerical analysis studies the derivative-based rule alongside fixed-point iteration, secant methods and bracketing methods, emphasizing convergence conditions and finite-precision computation rather than a universal success guarantee.

Real-world Applications

  • Nonlinear equations: Solve model equations when the function and its derivative can be evaluated.
  • Square roots: Repeatedly refine a numerical estimate using the simplified recurrence.
  • Scientific software: Derivative-based updates are often combined with damping or a bracket to improve reliability. Those extensions are outside this demonstration.

Related Concepts

  • Fixed Point Iteration — Newton’s update can be written as xn+1 = g(xn).
  • Taylor Series — the tangent is the first-order local approximation.
  • Gradient Descent — reduces an objective; Newton root-finding instead solves f(x) = 0.

References

Experience it interactively

Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Newton’s Method module.

Try Newton’s Method on Riano →

More in Calculus & Analysis