Newton Chases the Root Down the Tangent
How do you find a root of an equation f(x)=0? Most of the time there is no clean formula. Newton's answer is elegant. At your current point, draw the tangent to the curve, and take where that straight line crosses the x-axis as your next guess. The curve may be hard, but a straight line finds its own zero easily. In symbols, xn+1=xn - f(xn)/f'(xn). Repeat it and the guess slides down toward the root. When it works, it is frighteningly fast: each step roughly doubles the number of correct digits, which we call quadratic convergence. But it is not infallible. Where the slope is flat the tangent flings the guess far away, and on an awkward curve it can loop between two points or diverge forever. A slightly different start can even land you on a different root. Still, set it beside the safe, plodding bisection method and you see at a glance just how overwhelming Newton's speed is.
The gray curve is f(x)=x²-2, whose root is √2≈1.414. Set the start x0 with the slider, then press step. A gold tangent is drawn at the current point, and where it meets the x-axis (the small circle) becomes the next guess. Each press slides the dot down toward the root, and f(x) below drops toward 0. The trick is to chase the zero of an easy straight line instead of the curve itself. Use reset to watch it again from the top.
Look at the error of the same equation as log bars. Each bar is |xn - √2| after one step. On a log scale shorter means more accurate, and a bar that hits the floor is nearly perfect. Move the x0 slider. Wherever you start, the bars fall off a cliff within a few steps, because each step roughly squares the error. An error of 0.1 does not become 0.01 but shrinks on the order of its own square. The doubling of correct digits per step shown in the readout is quadratic convergence.
Fast does not always mean safe. Pick the three failures. Overshoot happens when x0 is near 0 so f'(x)≈0: the tangent is almost horizontal and flings the guess off the screen. Cycle: starting f=x³-2x+2 at 0, it bounces between 0 and 1 forever and never reaches a root. Diverge: on a curve that flattens far out, like arctan, the steps grow larger and wander away. Watch how the tangent arrows miss. This is why Newton needs a good starting point and a safety net.
Now f=x³-x, with three roots at -1, 0, and +1. Slide x0 and the color tells you which root Newton falls to: green is -1, gold is 0, blue is +1, gray is divergence. The whole strip is a map coloring the fate of each starting point. Near the middle it heads cleanly to 0, but around ±1/√5 the colors tangle finely like hair. There, nudging the start by a hair changes which root you reach. It is striking that the same simple rule carves such delicate boundaries.
Finally, compare speed. Solve f=x²-2 on [1,2], where a single step button advances both Newton (gold, x0=2) and bisection (blue, on [1,2]) at once. Bisection picks the half where the sign flips and halves the interval each time. It is safe but gains only about 0.3 digits per step, slowly. Newton, in the same number of steps, sees its error plunge. Compare the two errors in the readout. Within three or four steps Newton leaves bisection far behind. Bisection for safety, Newton for speed: in practice you blend the two.