Newton Method Visualizer

root-finding with tangent steps and convergence diagnostics

Loading interactive simulation...

basins of attraction govern outcomes 🖖

Newton iteration is powerful because it uses local slope information, so a good starting point often doubles the number of correct digits at each step. The same mechanism can fail near flat derivatives or at basin boundaries: tiny changes in x0 may land on a different root, cycle, or diverge.

follow the tangent to the axis 🖖

To find where a curve crosses zero, Newton's method replaces the curve with its tangent line at your current guess and jumps to where that straight line hits the x-axis. Because a smooth curve looks almost straight when you zoom in, that crossing usually lands much closer to the true root. Repeat, and you close in fast. The formula: x_{n+1} = x_n โˆ’ f(x_n)/f'(x_n).

computers divide without dividing 🖖

Modern CPUs often compute a/b by first finding 1/b, and Newton's method does this using no division at all. Applied to f(x) = 1/x โˆ’ a it gives the iteration x_{n+1} = x_n(2 โˆ’ aยทx_n), built from only multiplication and subtraction โ€” operations hardware does cheaply. The same trick underlies fast reciprocal-square-root routines, including the famous one in Quake III.

Example problems

  • fast root - Quadratic root converges rapidly to sqrt(2).
  • flat slope - Near-zero derivative causes slow or unstable progress.
  • diverge - Non-smooth derivative can make Newton jumps erratic.
  • wrong basin - Initial guess determines which root basin convergence picks.
  • negative root - negative root
  • strict tolerance - strict tolerance