This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · posts/newton-basins

Which root does Newton's method find?

Solve by Newton's method from every point of a square and color each start by the root it reaches. Near a root the answer is obvious. Along the lines between them it is a fractal: every boundary point touches all three basins.

Newton's step for is . It commutes with complex conjugation, so the picture is symmetric top to bottom, and the two complex roots must attract exactly the same number of grid points; the test checks that the counts are equal, not merely close.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 17–75