The explanation
Near a point where the derivative is 0 the tangent is almost flat, so one step can fling a start anywhere and neighbouring starts head for different roots. The result: every point on the border touches all three colours at once, however far you zoom in.
01Closing in along tangents
To solve , guess , draw the tangent to the curve there, and take where it meets the axis as a better guess:
Finding means solving . From : , , , , with 1, 2, 5 and 11 correct decimal places. Near a root the error is roughly squared each step and the digits double: quadratic convergence.
02Into the complex plane
The same formula works for complex numbers, with the complex derivative as the "tangent". For one Newton step can be written with the roots alone:
That is how the stage computes it, which is why you can drag the roots.
For the points equally far from form the imaginary axis; starts on either side go to the nearer root, and the border is a straight line, as Cayley proved in 1879. Of he wrote that the case "appears to present considerable difficulty".
03Why the border is a fractal
For one Newton step is . At the derivative is 0, the tangent is flat and the step divides by zero; points near 0 are flung far away in one step.
The point on the real axis lands exactly on 0 in one step. Its neighbours land all around 0 and are then sent in every direction, so all three colours crowd around it. Infinitely many points land on points like this one, and around each the same thing happens: petals on petals.
A theorem of complex dynamics says that for maps like this the border of every territory is one and the same set (the Julia set). So every border point touches all three territories, the "three-basin property", the same strange phenomenon as the Lakes of Wada in topology.
04When Newton’s method fails
For one Newton step sends 0 to 1 and 1 back to 0:
And since the cycle pulls nearby points in, so a whole patch of starts around 0 and around 1 never reaches a root, shown in black. In practice equation solvers check for convergence and try another start when it fails.
Questions
What does the brightness show?
The colour says which root a start reaches; the brightness says how many steps it took, brighter meaning more, so starts next to a root, which arrive in a step or two, are darkest. Each ring is a set of starts needing the same number of steps. The thin white lines are the borders: starts within one pixel there head for different roots.
Why does the picture blur when I zoom far in?
The stage computes on the graphics card in single precision, about 7 significant digits, so it stops at a view 0.0002 wide. The fractal itself is infinitely fine; with more precision you could keep zooming.
Is this related to the Mandelbrot set?
Yes. Both come from repeating a function on the complex plane, the subject of complex dynamics. Mathematicians studying Newton’s method for cubics found that if you vary the coefficients and colour those for which the method fails, small copies of the Mandelbrot set appear.
The syllabus side
Related curves
Sources: Newton fractal — Wikipedia · Newton’s method — Wikipedia · Lakes of Wada — Wikipedia