# Diagram 12: Cobweb plot / logistic map

It's a way to graphically calculate iterations of a function. You start with a graph of some function f(x). Then add the diagonal d(x)=x. Given a starting value x, you can find f(x) by going vertically up until you hit the curve of the function.

Before we can start over (that's what iteration is about), we need to convert our y coordinate on the curve to a point on the x axis. To get there, go horizontally to the diagonal. On it, y = x so the new x position is right below on the x axis. The animation below shows lots of paths obtained like that for a famous family of functions i'll talk about in a minute.

This technique can also be found under graphical iteration or Verhulst diagram . That name is in honor of **Pierre François Verhulst**, who was inspired by **Thomas Malthus** *'An Essay on the Principle of Population'*, before he came up with a differential equation to model growth behaviour in 1845. Much later, in 1976, the biologist **Robert McCredie May** applied the concept to model a time series instead and obtained the much simpler, discrete iteration formula :

f(x) = r * x * (1-x)

http://en.wikipedia.org/wiki/Logistic_map

It's a restricted population growth model where the population x can range from 0 (none) to 1 (every inch inhabited). In plain english it says: The next year's population is a reproduction rate r multiplied by the current years' population x, multiplied by the space currently unused in the environment (1-x).

If you plot this, you'll get a parabola going through x=0 and x=1. It opens downwards and the maximum depends on r. With a little differential calculus (or experimenting) we can see that when r exceeds 4, part of the parabola is above y=1, and that could result in a population greater than one in the next year.

After that 1976 paper the logistic map became very popular as a simple example for chaos . No wonder, it shows most of what can happen in a simple 1 dimensional dynamical system (a lot). It's simplicity makes it an excellent first programming project and graphing a time series can be done in a handful of lines. If you do, i'd like to suggest to try these values for r and stare at the results:

1.5 approaches a limit from one side 2.5 approaches a limit from both sides 3.2 the limit bifurcated, we now have period two 3.56995 period doubling concludes to practically period infinity 3.828 intermittency happens just before... 3.82843 ...a stable period three appears!

The image is from wikipedia's page on the cobweb plot , you can find a still snapshot there:

http://en.wikipedia.org/wiki/Verhulst_diagram

If you want to know how Robert May got his title as **Baron May of Oxford**, try this:

http://en.wikipedia.org/wiki/Robert_May,_Baron_May_of_Oxford

More about Verhulst's differential equation can be found here: