Change parameters · Explore this notebook model
Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.
Python runs on this device. The first run loads the scientific libraries.
Continue the tangent step into the complex plane
A holomorphic function has a complex linear approximation \(f(z+s)\approx f(z)+f'(z)s\). Requiring this approximation to vanish gives \(s=-f(z)/f'(z)\) wherever the derivative is nonzero. For \(f(z)=z^3-1\), the resulting map is
The second term is a pole at zero. Starting at a small positive number sends the next iterate far to the right, after which large iterates return approximately by multiplication by 2/3. At a root \(r\), write \(z=r+e\) and substitute \(r^3=1\). Exact cancellation of the linear error gives
Sufficiently near \(r\), the new error is about \(e^2/r\). This argument predicts the speed after entry into a local neighbourhood. It has no information about which root a distant initial point will reach.
Let \(s=\exp(2\pi i/3)\). Since \(s^3=1\), symmetry gives
The entire sequence, including its root, rotates with the start. Conjugate starting points likewise produce conjugate histories because the coefficients are real. These are two independent checks for numerical basin maps. We classify a pixel only once its residual falls below a declared tolerance. A starting pole and a trajectory that exhausts its iteration allowance can both appear unclassified. Increasing the allowance separates these cases for many pixels.
Follow a detour before quadratic convergence
From \(z_0=1/2\) the first iterate is \(1/3+4/3=5/3\). The next is \(10/9+3/25=277/225\approx1.23111\). The error initially rises from 0.5 to 0.667. By contrast, starting at 0.1 gives \(z_1=33.4\). The subsequent near-geometric return explains the long shoulder in the second figure. Both starts ultimately approach the real root.
Move the orange sample by writing a complex number such as \(-0.5+0.85i\) in Python as -0.5+0.85j. The sample mark and the residual trace follow the same new starting point. The intricate boundaries in the image are computed from independent point trajectories. Refining the grid examines finer samples of those boundaries; the speed on the residual graph belongs to one particular start.
Set the experimental inputs
Edit these values, then run the calculation and both figures again.
Each grid point starts an independent cubic iteration. Dark grey means the residual criterion was never met within the allowed steps, including the pole at zero.
The dashed line is the actual residual tolerance. A small initial magnitude can produce a large first residual followed by a long return.
Exercise · obtain two basin colours for free
Suppose \(0.75+0.10i\) reaches the real root in five updates. What are the destinations and update counts after multiplying the start by either non-real cube root of one?
Write the original iterates as \(z_k\). By induction \(N^k(sz_0)=sz_k\) and \(N^k(s^2z_0)=s^2z_k\). The destinations are \(s\) and \(s^2\). Since \((sz_k)^3-1=z_k^3-1\), every residual and hence the first crossing of the same threshold is unchanged. Differences in a finely sampled plot may arise because the rotated point falls between pixels.
Exercise · quantify the final two digits
For a real iterate \(z=1.01\), estimate the next error by the quadratic approximation and calculate its exact value using the error formula.
The leading term gives \(0.01^2=10^{-4}\). The exact error is \(10^{-4}(3.02)/(3\times1.01^2)\approx9.8683\times10^{-5}\). The difference is of the next order in the initial error. The small residual after this update is about three times the error because \(f'(1)=3\).