# Newton’s Method

Newton’s method is a technique to find the roots of a function commonly taught in beginning calculus courses. Given a function $$f(x)$$ and an initial guess $$x_0$$ at a root — that is, a value of $$x$$ for which $$f(x) = 0$$ — we can make a better guess: $$x_1 = x_0 - \frac{f(x_0)}{f'(x_0)}$$. If we take $$x_2 = x_1 - \frac{f(x_1)}{f'(x_1)}$$, and repeat this recursively to create an $$x_n$$ for every positive integer $$n$$, then the sequence $$(x_n)$$ converges (assuming the function and initial guess are somewhat well-behaved) to a root of $$f$$.

It turns out that Newton’s method generalizes to polynomials defined over the complex numbers, $$\mathbb{C}$$. This lends itself naturally to images, since $$\mathbb{C}$$ is easily represented as a two-dimensional plane. For a given function $$f$$, we color every point in the plane based on which root of $$f$$ it eventually converges to when chosen as the initial guess. We also give it a brightness based on how long it takes to converge at all: bright for a short time and dark for a long one.

This applet applies Newton’s method to polynomials only. The white dots represent the roots, so a configuration of them uniquely determines the (monic) polynomial with those roots. The polynomials $$f(z) = z^n - 1$$ have their roots spread evenly around the point $$0$$, and have plots that look particularly nice, so there’s a button to align the roots this way. Finally, to produce a higher-resolution image that doesn’t have the white dots (and to see the polynomial at work), use the download button below.