Stable Solutions and Fractals

Posted by Bedaywi, Mark on Febuary 9th, 2020

Read Time: 5 Minutes

On the last blog post I looked at the effect of recursion on functions and how we can use this to solve equations of the form f(x)=x numerically. Suspiciously, this didn't work for some functions at some starting values. The functions were unstable. Inspired by the Mandelbrot Set I decided to investigate this further.

For example, consider the function f ( z ) = ( log z 10 + 1 ) z 10 . When finding the answer to lim n f n ( z ) = f(f(f(f(f(f(f(f(... = k as we did last time we notice that not all starting values of x lead to a solution, and not all of the values who do lead to the same solution.

For example if we start with z=2 the value of k approaches about 1.7344, which I showed last time to be a solution to f(z)=z, but if I start at x=4, for example, the value of k blows up and diverges. I was completely bamboozled as to why this happened and so I decided to to graph this and create a Julia Set.

If a starting value of x doesn't diverge to infinity, i.e. we can use it to solve the equation f ( z ) = z , then I will colour it. The darker the colour the faster it converges, which means it is then more useful for solving the equation. If it diverges to infinity then we colour it white. Doing this with the function above we get this magnificent fractal.

This is incredibly surprising and incredibly cool. Looking closer at this image we see the water fountain-like shape seems to be infinitly self similar, with each tip holding the blob, and on each blob we can see a similar fountain. The claws that surround the entire image look like the claws on the side of the blob suggesting that if we zoom out enough we will see the same shape again. The beautiful patterns created from the lines are probably the result of many tiny bands of the water fountain interacting at the roots.

This shape, while beautiful, is very crowded. To make this easier to analyse I decided to only colour points if they approach 1.7344 . Doing this we get another fractal. While looking very different similar properties can be seen.

We see the fountains on have disappeared but now we can see the finer details of the claws, and what are on them. Inside every claw there seems to be an infinity amount of claws descending. On the sides of each claw are smaller claws that keep going. The coolest part of this fractal, however, are the blobs we can see on the claws. They are exactly the same as the massive blob. I conjecture that, although we cannot see it from this resolution, the number of blobs on each claw is infinite. Zooming into a claw we can see that it is exactly the same.

I suspect that the finer lines are due only to my algorithm, which stops after a finite number of iterations. We can see the same shape again, we can keep zooming in forever. Notice how the middle line that connects the blob to the main body can also be seen on the main body. This means if we zoom out we should find a similar shape like so:

I suspect that there should be a massive blob on the left with massive claws connect them together. If this is true then it suggests that each claw is connected on the tips, but finely. I conjecture that this shape is fully connected.

What if we try this with different functions? For example this is what f ( z ) = 1 + z 2 2 looks like:

While not as cool we can still see similar patterns. The same inifinitly decscending and self repeating property can be seen.

Here is a slideshow of all the functions I tried and cool fractals I created. Click the left or right arrows to go to the next picture.

I created a web app here (that takes a while to load) to view these Julia sets since I couldn't find any other ones online that allow you to input any equation. Try playing with these functions yourself!

While I was on my fractal high I began playing a lot more with the idea of chaos creating fractals. For example, if we look at this chaos game that produces sierpinski's triangle we can generalise it in terms of complex numbers.

If we choose three sides of a triangle, and a starting number, on the complex plane and then take the arithmetic mean of the number and a random vertex of the triangle over and over we can create sierpinski's triangle.

But what if we didn't take the arithmetic mean? We can try playing with this function to get weirder fractals. For example, if we take the geometric mean we get this shape:

And a harmonic mean results in this shape:

It almost looks like serpenski's triangle was generated in non-euclidean space and projected onto the screen. I am still experimenting with different functions but haven't found anything interesting yet other than the ones listed above.

Still on my fractal high, I started looking for more geometrically analysable fractals. A simple one stood out to me. First, we draw a right angle triangle ABC. Then we can drop a perpendicular from the right angle B to the side AC. Then from the point where the new line intersects AC we can drop a perpendicular to AB, then from AB to AC and so on.

We get a zigzag pattern that, while not as beautiful as other fractals, has some intersting properties. For one, we can create a simple proof for an infinite series of trigonometric functions like so.

Notice how we can find side AC0 through both an infinite sum and pythagoras' theorem.

AC 0 = n = 0 sin θ cos 2n θ = sin θ n = 0 cos 2n θ ( AC 0 ) 2 = ( n = 0 sin θ cos 2n+1 θ ) 2 + 1 2 = sin 2 θ ( n = 0 cos 2n+1 θ ) 2 + 1 sin 2 θ ( n = 0 cos 2n θ ) 2 = sin 2 θ ( n = 0 cos 2n+1 θ ) 2 + 1 ( n = 0 cos 2n θ ) 2 - ( n = 0 cos 2n+1 θ ) 2 = csc 2 θ

Cosecant can be represented using an infinite amount of cosines. We can prove another identity by realising that B0C0C1 is similar to AB0C0.

B 0 C 0 C 1 C 0 = C 0 A B 0 C 0 1 sin θ = n = 0 sin θ cos 2n θ 1 = sin θ n = 0 cos 2n θ 1 sin 2 θ n = 0 cos 2n θ = 1

While we can prove these results with algebraic methods, I think the geometric proofs are a lot cooler.

We can construct a line of length cosine to the nth power for any n using this fractal as well. This is probably how the Ancient Greeks could have discovered Trigonometry.

Analysing these fractals gives us new ways to solve problems, interesting results, and mindblowing visuals. Awesome!