Video 4, chapter 22

Newton Fractals and Where an Approximation Will Land

How Newton's method sorts the starting points of the complex plane by the cube root of unity they approach, why these basins of attraction share one boundary, the Newton fractal, and where the method fails.

  • Video 4, chapter 22
  • A map of mathematical worlds

Newton’s method improves a guess at a solution of an equation by following a tangent line, and near a solution it homes in very fast. Now run it on the equation z3=1z^3 = 1, which has three solutions in the complex plane, from every possible starting point, and color each start by the solution its guesses approach. Will the three colors fill three tidy regions, so that nearby starts always end at the same solution? This page states the method with the conditions it needs, finds the three solutions, and shows that the colored regions share an endlessly detailed boundary, every point of which touches all three colors, and that no start on this boundary reaches any solution.

Key terms

Newton fractal

Definition A Newton fractal is the pattern that appears in the complex plane when Newton’s method for a polynomial equation is started from every point and each start is colored by the root its guesses approach. Complex numbers a+bia + bi, with aa and bb real and i2=−1i^2 = -1, are drawn as the points (a,b)(a, b) of this plane, and ∣z−w∣\lvert z - w \rvert is the distance between the points zz and ww. The standard example is the equation z3−1=0z^3 - 1 = 0, whose roots are the three cube roots of unity 11, ω\omega and ω2\omega^2 described below. Its Newton step is

N(z)=z−z3−13z2=2z3+13z2,\begin{aligned} N(z) &= z - \frac{z^3 - 1}{3z^2} \\[0.4em] &= \frac{2z}{3} + \frac{1}{3z^2}, \end{aligned}

which is defined for every z≠0z \ne 0. The rules are as follows. Choose a start z0z_0, compute z1=N(z0)z_1 = N(z_0), then z2=N(z1)z_2 = N(z_1), and so on, and give z0z_0 the color of a root when the guesses converge to that root. A start for which some guess equals 00, where the step is undefined, or whose guesses converge to no root, gets no root color. The regions of the three colors are the basins of attraction of the three roots. Each basin is open and contains the disk of radius 1/31/3 around its root, so a start that does reach a root can be moved a little without changing its color. The surprise is how the basins meet. The three basins have exactly the same boundary, so every point on the edge of one color is also on the edge of the other two, and every disk around such a point, however small, contains starts of all three colors. Every start off this common boundary converges to one of the roots, and no start on it does. The boundary contains 00 and every start whose guesses land on 00, these starts come arbitrarily close to every point of the boundary, and near each of them the picture around 00 appears again, turned and rescaled, with a better match the closer one looks. The fractal in the picture is this common boundary, which in the theory of iteration is called the Julia set of the map NN. Pictures show the pattern, but they do not by themselves prove these facts or give the boundary’s fractal dimension.

In plain words Newton’s method is reliable near each root, and a start that reaches a root can be nudged without changing the answer. The trouble is the edge between the colors. There all three colors meet at every point, so near the edge the slightest change of start can change which root is found, and on the edge itself no root is found at all.

Example The start z0=−1z_0 = -1 is at distance 11 from ω\omega and from ω2\omega^2 but at distance 22 from 11. Its next guesses are −13-\tfrac13, then 259\tfrac{25}{9}, then 3197916875\tfrac{31979}{16875}, about −0.333-0.333, 2.7782.778 and 1.8951.895, and they converge to 11, the farthest root. A real start gives only real guesses, since the formula then uses only real arithmetic, and 11 is the only real root. The method does not simply find the nearest root.

Now take three starts close to 00, the point where the step is undefined, namely 0.010.01, 0.01+0.01i0.01 + 0.01i and 0.01−0.01i0.01 - 0.01i, no two of them more than 0.020.02 apart. The first step divides by the tiny number 3z023z_0^2, so each start is thrown far away. From 0.010.01 the first guess is about 3333.343333.34, and the guesses come back down the real axis to 11. From 0.01+0.01i0.01 + 0.01i the first guess is exactly

1150−8333350 i,\frac{1}{150} - \frac{83333}{50}\, i,

about 0.0067−1666.66i0.0067 - 1666.66i, far down the imaginary axis. The guesses then shrink back toward the unit circle. After 2020 steps they are within 1/31/3 of ω2\omega^2, and from inside that disk they are certain to converge to ω2\omega^2, as the card on basins of attraction shows. By the mirror symmetry of the picture, the start 0.01−0.01i0.01 - 0.01i converges to ω\omega. Three starts that almost coincide end at three different roots.

Newton’s method

Definition Newton’s method is a procedure for approximating a solution, or root, of an equation f(x)=0f(x) = 0, where ff is a differentiable function. Start from a guess x0x_0 and compute

xn+1=xn−f(xn)f′(xn)x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}

for n=0,1,2,…n = 0, 1, 2, \dots, which is possible only as long as f′(xn)≠0f'(x_n) \ne 0. If some guess has f′(xn)=0f'(x_n) = 0, the next guess is undefined and the method stops. In the graph, xn+1x_{n+1} is the point where the tangent line to y=f(x)y = f(x) at the point (xn,f(xn))(x_n, f(x_n)) crosses the xx-axis. For a polynomial pp in a complex variable zz the same formula is used with complex arithmetic, and the derivative p′p' comes from the usual power rule. The method comes with a guarantee near a simple root, which is a root rr with f′(r)≠0f'(r) \ne 0. Suppose rr is a simple root and ff has a continuous second derivative near rr, as every polynomial does. Then there is a distance δ>0\delta > 0 such that every start within δ\delta of rr gives guesses that are all defined and converge to rr, and there is a constant CC with ∣xn+1−r∣≤C∣xn−r∣2\lvert x_{n+1} - r \rvert \le C \lvert x_n - r \rvert^2 for every nn. The same holds for a simple root of a polynomial in a complex variable, with a disk around the root in place of an interval. Once the guesses are close, the number of correct digits roughly doubles with each step. Farther from a root there is no such promise. The guesses can land where the derivative is zero, jump back and forth forever, or wander.

In plain words Near the current guess, replace the graph by its tangent line, which is easy to solve, and use the point where the tangent meets the axis as the next guess. Close to a simple root the tangent line hugs the graph so well that each step roughly squares the error. Far from a root the tangent can send the next guess somewhere unhelpful.

Example Take f(x)=x2−2f(x) = x^2 - 2, with derivative f′(x)=2xf'(x) = 2x and positive root 2≈1.4142136\sqrt{2} \approx 1.4142136. At the start x0=32x_0 = \tfrac32 the value is f(32)=14f(\tfrac32) = \tfrac14 and the slope is 33, so

x1=32−1/43=1712,x_1 = \frac32 - \frac{1/4}{3} = \frac{17}{12},

about 1.41666671.4166667. The next guess is x2=577408≈1.4142157x_2 = \tfrac{577}{408} \approx 1.4142157. The errors are about 0.0860.086, 0.00250.0025 and 0.00000210.0000021, and the guess after that is off by less than 2⋅10−122 \cdot 10^{-12}. The start x0=0x_0 = 0 fails at once, because f′(0)=0f'(0) = 0 and the tangent line there is horizontal, so it never meets the axis.

A second function shows a different failure. For g(x)=x3−2x+2g(x) = x^3 - 2x + 2 and the start x0=0x_0 = 0, the value is g(0)=2g(0) = 2 and the slope is g′(0)=−2g'(0) = -2, so x1=1x_1 = 1. Then g(1)=1g(1) = 1 and g′(1)=1g'(1) = 1, so x2=0x_2 = 0 again. The guesses alternate between 00 and 11 forever and never approach the only real root, near −1.7693-1.7693. Starts close to 00, such as 0.10.1 and −0.1-0.1, are drawn into the same back and forth, so the failure fills a whole interval and not just one point.

Cube roots of unity

Definition The cube roots of unity are the three complex numbers zz with z3=1z^3 = 1. Factoring z3−1=(z−1)(z2+z+1)z^3 - 1 = (z - 1)(z^2 + z + 1) and solving the quadratic equation z2+z+1=0z^2 + z + 1 = 0 with the quadratic formula gives

z=1,z=ω=−12+32 i,z=ω2=−12−32 i,\begin{gathered} z = 1, \\[0.4em] z = \omega = -\tfrac12 + \tfrac{\sqrt{3}}{2}\, i, \\[0.4em] z = \omega^2 = -\tfrac12 - \tfrac{\sqrt{3}}{2}\, i, \end{gathered}

where ω\omega is the Greek letter omega. All three lie on the unit circle, the circle of radius 11 around 00, at the angles 0∘0^\circ, 120∘120^\circ and 240∘240^\circ measured counterclockwise from the positive real axis. They are the corners of an equilateral triangle with side 3\sqrt{3}, only 11 is real, and they add up to 1+ω+ω2=01 + \omega + \omega^2 = 0. Each is a simple root of z3−1z^3 - 1, because the derivative 3z23z^2 is not 00 at any of them, so the guarantee of Newton’s method applies near each one. Multiplying by ω\omega turns the plane by 120∘120^\circ about 00 and sends 11 to ω\omega, ω\omega to ω2\omega^2 and ω2\omega^2 back to 11. The page Complex Numbers and the Plane Behind the Pictures covers complex multiplication and its effect on angles.

In plain words These are the three numbers whose cube is 11. One is the ordinary number 11, and the other two sit a third of a turn and two thirds of a turn around the unit circle from it, so the three are evenly spaced.

Example Squaring ω\omega and using i2=−1i^2 = -1 gives

ω2=14−32 i+34 i2=−12−32 i.\begin{aligned} \omega^2 &= \tfrac14 - \tfrac{\sqrt{3}}{2}\, i + \tfrac34\, i^2 \\[0.4em] &= -\tfrac12 - \tfrac{\sqrt{3}}{2}\, i. \end{aligned}

The numbers ω\omega and ω2\omega^2 have the form a+bia + bi and a−bia - bi, whose product is a2+b2a^2 + b^2, so ω3=ω⋅ω2=14+34=1\omega^3 = \omega \cdot \omega^2 = \tfrac14 + \tfrac34 = 1. Because ω3=1\omega^3 = 1, also 1/ω2=ω1/\omega^2 = \omega, and the Newton step of z3−1z^3 - 1 satisfies

N(ωz)=2ωz3+13ω2z2=ω(2z3+13z2)=ωN(z).\begin{aligned} N(\omega z) &= \frac{2\omega z}{3} + \frac{1}{3\omega^2 z^2} \\[0.4em] &= \omega \Bigl(\frac{2z}{3} + \frac{1}{3z^2}\Bigr) \\[0.4em] &= \omega N(z). \end{aligned}

So the guesses from ωz0\omega z_0 are the guesses from z0z_0 turned by 120∘120^\circ, and if the guesses from z0z_0 approach a root rr, those from ωz0\omega z_0 approach ωr\omega r. The Newton fractal therefore looks the same after a turn of 120∘120^\circ. The formula for NN has real coefficients, so the step from the mirror image zˉ=a−bi\bar{z} = a - bi of z=a+biz = a + bi in the real axis is the mirror image of the step from zz, and the picture is also symmetric about the real axis. That is why the mirror image of a start that approaches ω2\omega^2 approaches the mirror image of ω2\omega^2, which is ω\omega.

Basin of attraction

Definition Let pp be a polynomial and rr a root of pp with p′(r)≠0p'(r) \ne 0. The basin of attraction of rr under Newton’s method is the set of all starts z0z_0 for which every Newton step is defined, meaning p′(zn)≠0p'(z_n) \ne 0 for every nn, and the guesses znz_n converge to rr. Basins of different roots never overlap, because a sequence cannot converge to two different numbers. Each basin contains a disk around its root, by the guarantee of Newton’s method, and it is an open set, which means that every start in it has a small disk around it that also lies in the basin. The starts that belong to no basin include the zeros of p′p' that are not roots, every start whose guesses land on one of them, and every start whose guesses cycle or wander without converging to a root.

In plain words The basin of a root is its catchment area, all the starts from which Newton’s method ends up at that root. A picture of the basins is a map of where the method will land from each start. It answers a different question from the pictures of Julia sets and of the Mandelbrot set for z2+cz^2 + c. A Julia set picture fixes cc, varies the start and records whether the values escape, and the Mandelbrot set picture fixes the start at 00, varies cc and asks the same question of escape. A basin picture fixes the rule, varies the start and records which root is reached.

Example On the real line the basins of x2−2x^2 - 2 are simple. For this function one step gives exactly

xn+1−2=(xn−2)22xn,x_{n+1} - \sqrt{2} = \frac{(x_n - \sqrt{2})^2}{2x_n},

so from any positive start every later guess is at least 2\sqrt{2}, each step then moves the guess down, and the guesses settle at 2\sqrt{2}. The basin of 2\sqrt{2} is the set of all x>0x > 0, the basin of −2-\sqrt{2} is the set of all x<0x < 0, and only the start 00 belongs to neither.

For z3−1z^3 - 1 a short computation gives

N(z)−1=(z−1)2(2z+1)3z2.N(z) - 1 = \frac{(z - 1)^2 (2z + 1)}{3z^2}.

Suppose ∣z−1∣≤13\lvert z - 1 \rvert \le \tfrac13. Since 2z+1=3+2(z−1)2z + 1 = 3 + 2(z - 1), this gives ∣2z+1∣≤3+23=113\lvert 2z + 1 \rvert \le 3 + \tfrac23 = \tfrac{11}{3}, and also ∣z∣≥23\lvert z \rvert \ge \tfrac23, so 3∣z∣2≥433\lvert z \rvert^2 \ge \tfrac43 and

∣N(z)−1∣≤114∣z−1∣2≤1112∣z−1∣.\begin{aligned} \lvert N(z) - 1 \rvert &\le \tfrac{11}{4} \lvert z - 1 \rvert^2 \\[0.4em] &\le \tfrac{11}{12} \lvert z - 1 \rvert. \end{aligned}

Each step therefore multiplies the distance to 11 by at most 1112\tfrac{11}{12}, the guess never leaves the disk and never equals 00, and the guesses converge to 11. The disk of radius 13\tfrac13 around 11 lies in the basin of 11, and by the turning symmetry the same holds for ω\omega and ω2\omega^2. This gives an honest way to compute a picture. For each start on a grid, run at most a fixed number of steps, such as 100100. Assign the start to a root as soon as a guess comes within 13\tfrac13 of that root, or within a smaller tolerance. Stop with a separate mark if a guess is 00 or so close to 00 that dividing by 3z23z^2 is unreliable, and give every start still undecided after the last step a color of its own. Apart from rounding errors, which matter most near the boundary where small differences grow, every start assigned to a root really lies in its basin. Some pictures also shade each start by the number of steps it needed, which is a separate piece of information from its color.

Check yourself

  1. Use Newton’s method on f(x)=x2−3f(x) = x^2 - 3, starting from x0=2x_0 = 2. Compute x1x_1 and x2x_2 and compare them with 3\sqrt{3}.
Show the answer

Here f′(x)=2xf'(x) = 2x. At x0=2x_0 = 2 the value is f(2)=1f(2) = 1 and the slope is 44, so x1=2−14=74=1.75x_1 = 2 - \tfrac14 = \tfrac74 = 1.75. At x1x_1 the value is 4916−3=116\tfrac{49}{16} - 3 = \tfrac{1}{16} and the slope is 72\tfrac72, so

x2=74−1/167/2=74−156=9756,\begin{aligned} x_2 &= \frac74 - \frac{1/16}{7/2} \\[0.4em] &= \frac74 - \frac{1}{56} = \frac{97}{56}, \end{aligned}

about 1.73214291.7321429. Since 3≈1.7320508\sqrt{3} \approx 1.7320508, the errors of x0x_0, x1x_1 and x2x_2 are about 0.270.27, 0.0180.018 and 0.000090.00009. For this equation each new error is exactly the square of the previous error divided by twice the previous guess, which is why the number of correct digits roughly doubles.

  1. For z3−1z^3 - 1, find every start z0z_0 for which the first Newton step is defined but the second is not. Should a picture color these starts by the nearest root?
Show the answer

The second step is undefined exactly when z1=0z_1 = 0. For z≠0z \ne 0 the step can be written N(z)=(2z3+1)/(3z2)N(z) = (2z^3 + 1)/(3z^2), so z1=0z_1 = 0 happens when 2z03+1=02z_0^3 + 1 = 0, that is, when z03=−12z_0^3 = -\tfrac12. The three solutions are

z0=−2−1/3≈−0.794,z0=2−1/3(12±32 i)≈0.397±0.687 i.\begin{gathered} z_0 = -2^{-1/3} \approx -0.794, \\[0.4em] z_0 = 2^{-1/3} \bigl(\tfrac12 \pm \tfrac{\sqrt{3}}{2}\, i\bigr) \\[0.4em] \approx 0.397 \pm 0.687\, i. \end{gathered}

All three are at distance 2−1/3≈0.7942^{-1/3} \approx 0.794 from 00, at the angles 180∘180^\circ, 60∘60^\circ and 300∘300^\circ, halfway between neighboring roots. None of them should get a root color. Their guesses stop at z1=0z_1 = 0, so they never converge to anything. Each one lies on the common boundary of the three basins, so every disk around it contains starts of all three colors, and coloring it by the nearest root would record an answer the method never gives. Solving N(z)=sN(z) = s for each of these three points ss gives starts whose second guess is 00, so that their third step is undefined, and so on, so infinitely many starts break down in this way. A program should test for guesses equal to 00 or very close to it and give those starts a separate mark.

  1. Change the equation to z2−1=0z^2 - 1 = 0, whose roots are 11 and −1-1. Which starts reach which root, and is the boundary between the two basins a fractal?
Show the answer

The Newton step is

M(z)=z−z2−12z=z2+12z\begin{aligned} M(z) &= z - \frac{z^2 - 1}{2z} \\[0.4em] &= \frac{z^2 + 1}{2z} \end{aligned}

for z≠0z \ne 0. Keep track of the number w=(z−1)/(z+1)w = (z - 1)/(z + 1), defined for z≠−1z \ne -1. A short computation gives

M(z)−1M(z)+1=(z−1)2(z+1)2=w2,\begin{aligned} \frac{M(z) - 1}{M(z) + 1} &= \frac{(z - 1)^2}{(z + 1)^2} \\[0.4em] &= w^2, \end{aligned}

so every Newton step squares ww. Solving for zz gives z=(1+w)/(1−w)z = (1 + w)/(1 - w), so a ww near 00 means a guess near 11, and a very large ww means a guess near −1-1. The size ∣w∣\lvert w \rvert is less than 11 exactly when zz is closer to 11 than to −1-1, which means that the real part of zz is positive. Then repeated squaring drives ww to 00, and the guesses converge to 11. When the real part is negative, ∣w∣>1\lvert w \rvert > 1, repeated squaring makes ww grow without bound, and the guesses converge to −1-1. On the imaginary axis, with z=iyz = iy for a real y≠0y \ne 0, the step gives M(iy)=i2(y−1/y)M(iy) = \tfrac{i}{2}(y - 1/y), again on the imaginary axis. Those guesses stay at distance at least 11 from both roots, so they never converge to a root, and some break down, such as the start ii, for which M(i)=0M(i) = 0.

The basins are the two half-planes on either side of the imaginary axis, and the boundary is a straight line, not a fractal. Arthur Cayley found this answer in 1879. For z3−1z^3 - 1 nothing so simple can happen. The three basins fill everything off their common boundary, and a line leaves only two sides to fill.

How this lesson connects

It also uses derivatives of polynomials.