This week Occupy Math looks at Newton’s method. If you have a nice smooth formula, like almost everything you get in a calculus class, then Newton’s method starts with a guess at a number that makes the formula equal to zero when you plug it in. Applying Newton’s method improves the guess. If you perform the calculation that Newton’s method specifies over and over, then the guess gets better and better. The place where a formula is zero is often the solution to some problem and so Newton’s method is very useful in science and engineering. Returning to a common theme in Occupy Math, the standard education about Newton’s method does not cover the fact that it is also an artist’s tool.
Newton’s method is a key scientific tool and also a super-powered paintbrush.
How do we use Newton’s method to make a picture? Ignoring the shading — more on that later — consider the red, green, and blue regions of the picture at the top of the post. This picture is based on the formula “a number to the third power is equal to one”. There are three solutions — the obvious solution x=1, and then there are two weird ones that involve the square root of negative one. If we pick any point and use it as a starting point (first guess) to solve this formula, then Newton’s method will — after some number of steps — take that guess to one of the three solutions. The colors come from declaring each of the three solutions to have a color, red, blue, or green. Any mathematical formula that Newton’s method can be used on generates its own picture — and if the formula has three or more answers, that picture is a fractal. The three solutions that correspond to the three colors are just single points. The red area is all the points that Newton’s method takes to the solution x=1. The solution itself is in the middle of the big oval on the right side of the picture. There are two other ovals — a green and a blue one — one third of the way around the circle from the red oval. The center of those is where the two weird solutions are.
The different colored regions have a really curious property, one that causes the images to be fractals. There are a couple of ways to explain this property. Check each of them against the picture at the top of the post — or the ones below.
- Suppose we draw a line from a blue point to a green point; then
that line must include a red point. In fact, a line from one color to
another must cross every other color. If the formula has five solutions, then this rule applies to five colors.
- Think of the points that are the same color as being a “country”. Then a point that is on the border between two countries must be on the border of all countries. Think about how weird that is in the context of countries in the real world.
The practical effect — when there are three or more colors — is that space shatters at the edge of each color creating the fractal nature of the picture. Here is the coolest thing.
We can pick where the solutions that make a formula zero are and so design these fractals!
The pictures below are the first fractal from the top of the post (but in a square frame) and fractals with four and five solutions. The second picture has its solutions at the corners of a tilted rectangle while the third has them spaced like the pips on a “five” on a six-sided die — but with the center raised up a bit. Check the “borders of the countries” properties for these examples of Newton’s method fractals.
So far the shading of all the pictures — the variation in intensity of the individual colors — use the way Newton’s method takes a guess to a solution to pick the shade. When Newton’s method takes an initial guess to one of the solutions, it generates a sequence of points. Consider the last two points in this sequence, or, more precisely the direction of an arrow between them. The intensity of colors varies as the angle that that arrow makes with a horizontal line. This is called cosine shading.
Let’s look at other shading methods.
The first pictures just leaves all the colors flat. The second is the cosine coloring we are already familiar with (for contrast). The last shades the colors according to how close to the solution Newton’s method goes before it is close enough — in this case anything within a distance of 0.01 of the solution. Guesses that end up landing right on top of the solution at the end of the series of guesses are brightest, ones that land just inside the 0.01 radius test zone are darkest. There are many other shading techniques and a huge variety of ways to make cool fractals by choosing where the solutions to a formula go. Let’s look at some examples (right click/view image to enlarge). Some of these images make some of their colors transparent.
The stripes are the result of solutions to the formula that are very close to one another. All of the shapes result from the way the solutions are placed; for example, the mirror symmetry of the first and last picture are the result of symmetry of the solutions used to specify the fractal. Let’s look at some more pictures. These change the colors based on how many steps it takes a guess to arrive at one of the solutions.
We can also change the rule for having found a solution to use strips of space instead of the little circles that the examples so far do. That gives us pictures that look like this:
This post belongs in the “pretty pictures” category — but also it is one of the “math sets you free” posts. Newton’s method is well known as a tool for solving problems. Most of the people that use it don’t know it is a tool for making complex pictures. Occupy Math has several collections of Newton’s method fractals in the fractal taxonomy. This helps us see that, again, we teach people about a useful bit of math while neglecting its startling potential for beauty.
Imagine this. An agronomy class is sent to a rose garden and told to estimate the biomass of plant matter in the garden. This is a good exercise of relevant agronomy skills. Part way through the assignment, one of the students finally notices the roses. She notices that they have a wonderful smell, she sees that they look beautiful, and she finds that they have thorns. She tells the other students about this and they are surprised and pleased. Not a very plausible story, is it? And yet this happens again and again in mathematics. This is the result of the mathematical equivalent of not having a sense of smell together with a very real neglect of intrinsic beauty by the educational process.
Occupy Math knows many examples of hidden beauty in mathematics. Since his mathematical education — before he took over educating himself — was largely traditional, there is an excellent chance that Occupy Math has missed substantial beauty. Do you have examples to share? Please comment or tweet!
I hope to see you here again,
University of Guelph,
Department of Mathematics and Statistics