Engineering Math - Quick Reference                                 Home : www.sharetechnote.com Chaos - Logistic Equation   In this section I would like to show you one of the most famous equation in Chaos theory and one of the trigger that was one of the strongest catalyst in early stage of Chaos theory.   Let's start with intuition. Look at the following graph. How does it look like ? Does it look simple or complex ? Does it look like it is based on a simple rule (function) or based on a very complicated rule ? Do you think you can even draw this graph with any mathematicaly equation ? Doesn't it look like simple random sequence of numbers ?   My first impression when I first studied Chaos theory was "It may not be completely random sequence ? (If it is the case, I would not see this on textbook :)), but I would at least need pretty complicated equation (function) to draw this.". What is your thought ? Now here goes the equation to draw this plot. What is the first impression ? Even though the expression looks a little bit different from what you learned from what you learned in high school, isn't it enough to give you the impression that it looks much simpler than you expected. Usually our expectation (or prejudice) would be 'you would need a simple function to draw a simple graph and would need a complicated function to draw a complicated graph'. (The graph in this context can represent a natural phonemina in real life). If you were asked to come up with any function to draw the graph as shown above, you would say 'I would give up.. I not sure if there is any equation for this.. if any, it would be extremely complicated'. This graph is based on a simple rule stated as follows. (What is meaning of this equation and how to calculate the values for each point, refer to 'Recursive/Iterative Function' page). If you want to play with this equation with Matlab or Octave, try with following code. N = 200; r = 3.8; x0 = 0.001;   x = zeros(1,N); x(1) = x0;   for n = 1:N-1     x(n+1) = r .* x(n) .* (1.0 - x(n)); end;   plot(x);xlim([1 N]);ylim([0 1]);title(strcat('x0 = ',num2str(x0),' ; ','r = ',num2str(r)));   This is one of the key idea of Chaos..  "Even a very complicated phenomina (at least apparently very complicated one) can be described by very simple rule". With Chaos theory, a lot of real life problems (engineering, physics, biolology etc) which used to be taken as a area that cannot be desribed by mathematical way since it is too complicated now became a part of formal/mathematical research and application.   Now let's look at another intuitive aspect of the Chaos phenomena. Look at the following for graph (A),(B),(C),(D). What do you think ? My impression is .. (A) looks simple.. and I think I can come up with some simple equation to draw this. (B) looks a little bit complicated comparing to (A), but I think I can come up with some equation if I try hard. (C) looks more complicated comparing to (B) and very complicated comparing to (A). I am not sure if I can figure out any equation to draw this plot. (D) ?  I would give up ! it looks beyond my understanding. Here goes 'Surprise'. All of these graph are from the same equation as below. (Yes.. it is the equation that I explained above). All of the above graphs came from this same equation. The only difference among these graph is the value of 'r' in the equation.   Here goes another important properties of Chaos model. With Chaos model, there are many cases where many of drastically different looking phenomena can be described (explained) by a same rule (function).   Now a question would pop up in your mind. Is there only four different types of graph for this equation ? Definately Not. Even though you haven't calculated the values on your own, you would get the intuition that you would have different patterns of the graph which is different from the four examples shown above. If you want to know the graph for various different 'r' value, you can draw a couple of hundred graph with different 'r' values as shown above. For example, you can draw 300 separate graphs for 2.5 <= r <= 4.0 with r being incremented by 0.005. You can draw the several hundred graph one by one on different paper, but with all those separate graph it would be a little tricky to compare those graphs and find any patterns from the hundreds of graph. Would there be any way to combine all of the hundreds of graph onto single coordinate system (on a single graph) ?   One of the common method for combining all of the individual plot is to draw a graph as shown below. You may not be exactly sure what is the meaning of this graph.. or how to explain this graph.. at least you may feel 'It looks nice.. it looks like a broomstick (Good interpretation :)). At least, I think I see some pattern even though I don't know how to describe the pattern in my own words'. It is good enough for now if you have this kind of impression. Following is Matlab/Octave code that I used to draw the plot shown above. N = 200; x0 = 0.001;   for r = 2.5:0.005:4.0       x = zeros(1,N);     x(1) = x0;       for n = 1:N-1         x(n+1) = r .* x(n) .* (1.0 - x(n));     end;          xstate = x(100:N);     rval = xstate;     rval(:) = r;       plot(rval,xstate,'bo','MarkerSize',1);xlim([2.5 4.0]);ylim([0 1]);hold on;   end;   Now you would have more serious question. What is the meaning of the plot shown above. Exactly how you can draw the plot. I don't think I can describe the details in words without confusing you and confusing myself. In stead I tried to exaplain it in illustration as shown below. Give sometime and think on your own, I think you can grasp the meaning. The graph shown above is a good technique to find a pattern from many graphs from a same equation (we call this graph as 'bifurcation graph'. 'Bifurcation' means 'Branching into two segment'. If you closely look at the plot, you may find some places where the graph branch into two path (bifurcate), that's why we call it 'bifurcation' plot)   There are another techniques that would help you find some pattern from a single graph. One example is shown below. Do you see any similarity between the left and right graph ? Can you imagine that these two graph is from the exactly the same data ? Believe it or not. These two graph are from the same data sequence.  but you may think it would look almost random data or very complicated data on the left side graph, but you would see pretty clear pattern on the right side graph. The right side graph is drawn by a special technique called 'Embedding'. Refer to Embbeding page for the detailed explanation of the technique. 