xfor certain values of λ (lambda) and certain starting values of x in the range::=λ x (1-x)

(Note that starting with x=0 or x=1 will just cause x:=0 forever.)0 < x < 1

I often use

References for Logistic Map:

- List of chaotic maps
- Logistic map (and here)

- The Logistic Map and Chaos
- Vivaldi, Franco (1992),
"An experiment with mathematics",
*The New Scientist guide to Chaos*.

At x = 0.5, the product equals 0.25. So for the equation to again yield a value between 0 and 1, we want:

0 < λ < 4

(λ=0 obviously causes x:=0 forever.)

x = 1 - (1/λ)

= (λ-1) / λ

For example, put λ = 2.
You will see that the stable solution for the equation is x =
**0.5**.
You will also see that for *any* starting value of x from 0 to 1,
the process will actually converge to this stable value x = 0.5,
e.g. try starting at
**0.1**
or
**0.9**.

It is known (though not proved here) that for 1 < λ < = 3 the process will converge to the stable solution. Though for precisely 3, convergence is dramatically slow.

At λ = 2.5,
stable solution =
**0.6**,
start also at
**0.61**
or
**0.1**
or
**0.9**.

At λ = 2.9,
stable solution = 19/29 =
**0.65517241379310344827586206896552**,
but convergence time is increasing,
start at
**0.655**
or
**0.6**.

At λ = 3,
stable solution = 2/3 =
**0.6666666666666666666666666666666667**,
but convergence time very long,
start at
**0.666**
or
**0.6**
or
**0.1**.

**
Q. For λ =
1 + √5,
is one of the attractors
exactly 0.5?
Prove it either way (by applying update twice and seeing if get back to 0.5 exactly).
**

**
**
Now try λ = 3.5.
Again, there is a stable solution
(at x = 5/7 =

**
Q. For λ = 3.5, is one of the attractors
exactly 0.875?
Prove it either way (by applying update 4 times and seeing if get back to 0.875 exactly).
**

**
**
The length of the cycle goes to infinity as
λ increases.

In fact, the length of the cycle goes to infinity as λ goes to a constant (the "accumulation point") which is approximately 3.569945672. Between approximately 3.569945672 and 4, we have new behaviour.

Oddly enough, there are sub-regions in which oscillation between a few values
occurs again.

e.g. λ
= **1 + √8 **
= 3.82842712474619009760

Stable soln
**0.73879612503625855748588356095603**.

Other start values bounce between 3 values.

Start at
**0.16**.

From now, we will look at λ = 4, for which there are no oscillations.

In general, given any number c between 0 and 1, there are exactly 2 solutions, both between 0 and 1, to:

4 x (1-x) = cWe can see this as follows:

4x - 4x

4x

(Quadratic Equation)

x = ( 4 ± √(16 - 16c) ) / 8

= ( 1 ± √(1-c) ) / 2

Now c is between 0 and 1, so (1-c) is, so
√1-c is.

So (1 + √1-c) / 2 is between 1/2 and 1.

And (1 - √1-c) / 2 is between 0 and 1/2.

Each solution is of course (1 - the other solution).

So we have 2 unique numbers that lead to c after 1 more iteration.

x = 0.5 - goes to 0 after 2 steps 2 numbers - go to 0 after 3 steps 4 numbers - go to 0 after 4 steps 2^3 numbers - go to 0 after 5 steps 2^4 numbers - go to 0 after 6 steps ...If we consider a sequence of any

x = 0.75 - goes to 0.75 after 0 steps 2 numbers - go to 0.75 after 1 steps 4 numbers - go to 0.75 after 2 steps 2^3 numbers - go to 0.75 after 3 steps 2^4 numbers - go to 0.75 after 4 steps ...If we consider a sequence of any

If the starting value of x is 0.75
it will stay at that value forever.
However, other starting values
(apart from the unusual special cases just listed)
do *not* converge to 0.75, or indeed to anything,
e.g. try starting at x =
**0.7**.
You will see that values bounce around randomly
in the interval between 0 and 1 forever.
The length of the attractor cycle has gone to infinity.
Even try starting at x =
**0.7501**.
You will see that it will rapidly diverge from 0.75,
and never go back.

This illustrates the classic chaotic property that tiny initial differences lead to massive differences later. Here is a system that is deterministic yet unpredictable.

Let f(x) = the result of applying the update to x 29 times with λ = 4.i.e. f(x) = the last line of the sequence here. There are 2

f(0.751) = 0.16135 f(0.752) = 0.62721 f(0.753) = 0.04611 f(0.754) = 0.81176

A smooth curve going up between 0.751 and 0.752?

No. It bounces around in that interval:

f(0.751) = 0.16135 f(0.7511) = 0.96567 f(0.7512) = 0.74842 f(0.7513) = 0.97527 f(0.7514) = 0.08098 f(0.7515) = 0.63691 f(0.7516) = 0.23017 f(0.7517) = 0.68586 f(0.7518) = 0.12163 f(0.7519) = 0.49033 f(0.752) = 0.62721

A smooth curve going up between 0.751 and 0.7511?

No. It bounces around in that interval:

f(0.751) = 0.16135 f(0.75101) = 0.32690 f(0.75102) = 0.43537 f(0.75103) = 0.46383 f(0.75104) = 0.40957 f(0.75105) = 0.27892 f(0.75106) = 0.10807 f(0.75107) = 0.00091 f(0.75108) = 0.12277 f(0.75109) = 0.54406 f(0.7511) = 0.96567

and so on, for all the other tiny intervals.

Note it is symmetric: f(c) = f(1-c).

f(0) = 0.
f(0.5) = 0.
f(1) should be = 0 but is not because of a compiler bug.

Is this what f looks like? No. Let's plot in steps of 0.01:

Is this what f looks like? No. Let's plot in steps of 0.001:

Is this what f looks like? No. Let's plot in steps of 0.0001:

gnuplot can't really draw it.
To draw it is to more or less
just *fill* the square (x=0 to x=1, y=0 to y=1) with points.

Q. Is it *really *to fill the square with points?

We try a close-up of the area between 0 and 0.01.

This does
1000 samples between 0 and 0.01.

Is that all the detail there is? No:

This does 10,000 samples between 0 and 0.01.

**
Q. Does it always go to minus infinity?
**

**
**

<FORM METHOD="GET" ACTION="http://computing.dcu.ie/cgi-bin/humphrys/chaos/chaos-script"> Lambda: <INPUT size=10 maxlength=50 name=lambda VALUE=""> Start value for x: <INPUT size=20 maxlength=50 name=startingvalue VALUE=""> <input type=submit value="Show"> <input type=reset value="Reset"> </FORM>

The URL generated will be like:

** http://prog?arg=value&arg=value
**

This calls a Shell CGI script, which recovers the arguments
from the environment variable, which has value like:

** arg=value&arg=value
**

It then calls the C++ program,
passing the arguments on the command-line:

#!/bin/sh echo Content-type: text/html echo echo '<html> <head> <title> CGI script </title> </head> <body>' first=`echo "$QUERY_STRING" | cut -f1 -d'&'` second=`echo "$QUERY_STRING" | cut -f2- -d'&'` lambda=`echo "$first" | sed "s|lambda=||"` startingvalue=`echo "$second" | sed "s|startingvalue=||"` echo "<pre>" chaos-prog "$lambda" "$startingvalue" echo "</pre>"

The C++ program simply prints to stdout:

In fact, there is also a bit of input-checking. See#include <stdio.h> #include <stdlib.h> main ( int argc, char **argv ) { double lambda = atof ( argv[1] ); double x = atof ( argv[2] ); for ( int i=1; i<=30; i++ ) { printf( "%.5f \n", x ); x = lambda * x * (1-x); } }