top of page

Newton's fractal, and a look into the chaos in numerical methods.

Updated: Oct 24, 2021

People who have done good amount of their education in the field of STEM would have come across numerical methods to find roots of a polynomial equation (single variable) will know Newton-Raphson method.


but, however I'll try explaining it first



The Newton-Raphson method (also known as Newton's method) is a way to quickly find a good approximation for the root of a real-valued function f(x) = 0. It uses the idea that a continuous and differentiable function can be approximated by a straight line tangent to it.


Suppose you need to find the root of a continuous, differentiable function f(x), and you know the root you are looking for is near the point X = Xo. Then Newton's method tells us that a better approximation for the root is


This process may be repeated as many times as necessary to get the desired accuracy. In general, for any X-value Xn​, the next value is given by

and also note that this method is true for complex valued functions as well.


Newton Raphson Method check this article to get a better understanding

knowing what Newton-Raphson (N-R) method is, we can start talking about Newton's fractal (Newton had no idea about it) If we closely observe the initial guess we make in N-R method Xo which can be any number on the Z-plane and if we find the nearest root to that Xo and color it with a unique color we get the below image and it is called Voronoi Diagram.

Here we are trying to find cube roots of unity and the equation is


each color in above image represents our initial guess Xo being closer to a particular root of unity.

therefore,

points colored 'marron' being closer to the root

points colored 'light blue' being closer to the root

points colored 'dark blue' being closer to the root

So now knowing what does this colors mean in these images lets start calculating the root using

N-R method, thereby after our first iteration lets try to find to which root our point X1 is closer to and will use our color scheme to get an idea of how it looks.




If you see the image we can say things have started to get little more interesting then we would have expected them to be.

but, its not chaotic yet.






So now lets go do our second iteration X2, use the same method as above






Still there is no sign of chaos, but however it has started becoming more and more interesting.







3rd iteration





I guess now we are able to see the onset of chaos








few more iterations shown below


iteration 5,8,15 respectively





























By the time we reach iteration 20 the things will become really chaotic and these are called Newton's fractal

If you look at those boundaries, that's where things have became really chaotic and it's really interesting to note that a simple problem like finding the cube roots of unity using Newton-Raphson method can also end up being this chaotic. I guess that's how nature is encapsulating chaotic behavior in simplest of the simplest equations.

here is a GIF which shows how this method leads towards chaos based on number of iterations,



Some of my renders for other roots of unity


There is also a property called 'Peculiar Property' which tries to explain why this method of finding roots become chaotic, which I'll explain in a follow-up article until then stay tuned.


you can have a look at some of the colorful renders











Resources related to this topic -


Python code to create these images:


Comments


Post: Blog2_Post

©2020 by Sciencified.

bottom of page