📖 Theory — Newton's method, basins & Cayley's problem
Newton's method in the complex plane
To find a root of a function f(z), Newton's method
iterates
z ← z − f(z)/f′(z). When z is a complex
number this same rule traces a path through the plane. For most
starting points the path spirals into one of the polynomial's roots.
Basins of attraction
The basin of a root is the set of all starting points that
eventually converge to it. We give every root a distinct color and
paint each pixel by the basin it belongs to, shading it brighter when
convergence is fast (few iterations) and darker when it is slow.
The fractal boundary
Where basins meet, the picture never settles down: arbitrarily close
to a point heading for root A there are points heading for root B and
root C. This boundary is a fractal with the striking property that
every boundary point touches all the basins at once.
Cayley's problem
In 1879 Arthur Cayley solved the case z² − 1 (the basin
boundary is just the imaginary axis) but found z³ − 1
"presents considerable difficulty." That difficulty is the
fractal — a structure that could not be seen until computers could
color millions of pixels.
Relaxation & chaos
Over- or under-relaxed Newton uses
z ← z − a·f(z)/f′(z). With a = 1 you get
classic Newton; pushing a away from 1 (or choosing a
polynomial like z³ − 2z + 2 with attracting cycles)
breaks convergence and reveals chaotic, never-converging regions.
About Newton Fractal
Written by MySimulator Team · Reviewed by MySimulator Editorial Review
Last updated: 5 July 2026
Newton's method applied to complex polynomials produces one of mathematics' most beautiful fractal structures. Starting from any complex number zâ'€, the iteration z ← z − a·f(z)/f′(z) (where a is a relaxation parameter, default 1) converges to a root of f(z) = 0. Colouring each starting point by which root it reaches — and shading it by convergence speed — reveals the basin-of-attraction diagram. For degree n ≥ 3 the boundaries between basins are fractal Julia sets of the rational map N(z) = z − f(z)/f′(z), infinitely complex and self-similar at every scale.
Choose from several polynomials (including the "chaotic" z³ − 2z + 2, which has attracting 2-cycles), tune the relaxation parameter and iteration count, and click anywhere to zoom in. The progressive-row renderer updates the canvas as each strip completes so you see the image build in real time. Save your favourite fractal view as a PNG using the button in the controls panel.
Frequently Asked Questions
How does Newton's method work in the complex plane?
Newton's iteration z ← z − f(z)/f′(z) was designed for real numbers but works equally well for complex numbers — the algebra is identical, just with complex arithmetic. Starting from a complex seed zâ'€, the sequence typically spirals toward one of the polynomial's roots. The remarkable discovery is that the set of seeds converging to a given root (the basin of attraction) has a fractal boundary when the polynomial has degree 3 or more.
What makes z³ − 2z + 2 "chaotic"?
The polynomial z³ − 2z + 2 has three real-valued roots near z ≈ −1.769, 0.885 ± 0.590i, but the Newton map N(z) = z − f(z)/f′(z) for this polynomial has attracting 2-cycles — points where the iteration bounces periodically between two values without converging to any root. Regions of the complex plane trapped in these cycles appear as dark non-converging zones, and the boundaries between converging and non-converging regions are especially intricate.
What does the relaxation parameter a do?
Relaxed Newton uses z ← z − a·f(z)/f′(z). With a = 1 this is standard Newton's method with quadratic convergence. Values a < 1 slow convergence but can tame divergence. Values a > 1 accelerate convergence for some starting points but enlarge the chaotic boundary where no root is reached. Setting a far from 1 can create entirely new fractal structures not present in the classical method.
What are the roots of unity and why do they appear so often?
The n-th roots of unity are the n solutions of zⁿ = 1, evenly spaced on the unit circle at angles 2Ï€k/n for k = 0, …, n−1. They are convenient test cases because they have simple exact values, the derivative f′(z) = n·z^{n−1} is easy to compute, and the n-fold rotational symmetry makes the fractal symmetric too. Changing the degree slider from 3 to 9 adds more roots and basins, increasing the fractal's complexity.
Why does the image render progressively in rows?
Each pixel requires up to maxIter Newton steps (up to 80 in this simulation), and a 480×360 canvas means ~172,800 pixels — potentially millions of floating-point operations. To avoid blocking the browser's UI thread, the renderer processes 12 rows per animation frame and yields control between batches. You see the fractal appear from top to bottom; changing any control cancels the current render and starts a fresh one.
How does clicking to zoom work?
Each click re-centres the complex-plane view at the clicked point and halves the scale (scale × 0.5), doubling the magnification. The view is defined by a centre (centerX + centerY·i) and a width (scale in complex units). At each zoom level the same Newton iteration runs at higher resolution — the fractal structure repeats at all scales because the underlying mathematics is scale-invariant on the fractal boundary.
What colour palettes are available and how do they work?
Four palettes are offered. "Vivid" uses saturated HSL colours with hues spread around the colour wheel, one hue per basin. "Pastel" uses lower saturation for a softer look. "Neon" pushes saturation to 100% for a glowing effect. "Mono" maps basins to grayscale tones with slight colour shifts. In all cases, faster-converging pixels are brighter (higher luminance), so the fractal boundary — where convergence is slowest — appears as a dark, intricately patterned region.
What is the connection between Newton fractals and Julia sets?
The Newton map N(z) = z − f(z)/f′(z) is a rational function of degree 2n−2 for a degree-n polynomial. Its Julia set — the boundary between basins of attraction — is exactly the fractal boundary visible in the Newton fractal image. For z³ − 1, this Julia set has Hausdorff dimension approximately 1.29. The Mandelbrot set can be thought of as parametrising which Julia sets are "nice" (connected) vs. "dusty" (Cantor-like).
Can I save my fractal image?
Yes — the "Save PNG" button exports the current canvas contents at the internal render resolution (up to 560×420 pixels). The image captures the exact pixel colours computed by the Newton iteration at the current view, polynomial, palette, and relaxation settings. For a higher-resolution export you would need to increase RW and RH in the source code and allow the longer render time.
What is the Douady-Hubbard theory relevant to these fractals?
Adrien Douady and John Hubbard developed the rigorous mathematical framework for complex polynomial dynamics in the 1980s, proving that the Mandelbrot set is connected and classifying the topology of Julia sets. Their work applies directly to Newton fractals: each basin of attraction corresponds to an immediate basin containing one root, and the fractal boundary is a topological circle (for polynomials with all roots in the same Fatou component) or a Cantor set. This theory explains why every boundary point is simultaneously accessible from all basins.