Alternatives to the Logistic Equation

bifurcation 01tl;dr: bifurcation.R

Yesterday, I decided to plot the bifurcation diagram of the logistic equation.  This is a famous plot from the 70s, that many geeks will be familiar with (left).  It shows that simple systems can switch into “chaos mode” and begin to bifurcate wildly.

To produce the graph, we use code in the R programming language.  Following that is an exploration into using alternative equations to get different graphs.

First off, we set the range and maximum iterations for the plot:

Next we initialize the vector to hold our points:

Here are the guts of the program that collects the points to plot:

The crucial bit, to keep in mind, is the line with the iterating logistic equation.

Lastly we plot the points and save the graph!

OK.  Now that we have our traditional logistic equation bifurcation diagram, what can we do next?  How about finding other equations which produce bifurcation diagrams?  Check these out:

bifurcation 02


The equation, x <- r * x ** ( 1 – x ) generates the plot to the left.





The equation, x <- r ** ( 1 – x ) generates the plot to the left.





The equation, x <- r * cos(x) – sin(x) generates the plot to the left.





The equation, x <- r * exp(x) * ( 1 – exp(x) ) generates the plot to the left.



More alternative equations: “r – x ** 2”  or  “r ** cos( 1 – x )”  or  “r * cos(x) * ( 1 – sin(x) )