March 1, 2013---Class 16--- Chaos and Logistic Map
Activities:
Chaos and Logistic Map Continued
We continued looking at our population model, the logistic map.
A program entitled map allows you to follow the time history of a
population. Map takes three command line arguments: r, the
parameter that appears above in the definition of the map; x_0, the
initial value of the population; and iterations, the total number
of generations to calculate.
We have seen what happens after a long time if we use r=0.1.
The population dies out if we start with x=0.1
map 0.1 0.1 100
Students were asked to try different starting values. We then
constructed a shell script to loop over different starting values.
#!/bin/csh
set r = 0.1
foreach x (0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9)
map $r $x 100 >>! temp
end
When r is sufficiently small, no matter what the starting
population, after a long time the population approaches 0.
With r a little greater than 0.25, after many generations the
population approaches a nonzero constant for any starting value
other than 0 or 1.
With larger r values, we see that the final value is increasing.
With r=0.78, we find something very curious. The
population oscillates in time between two different values
5.475744e-01 and 7.729384e-01. You should verify that this does
not depend on the starting value (as long as it is not 0 or 1).
This result is called having an attractor of period 2.
Now, we are getting the idea that there can be different long time
behaviors. For small r, we go to zero; for larger r, we approach a
non-zero constant; for yet larger r, we oscillate between two
values.
With r=0.863, we found that the system has a periodicity of 4.
We would like to explore the long time behavior by looking at the
set of x values on each trajectory. To do this, we want to print
out a certain number of values on the trajectory starting after
a number of generations. A program called fixed_pts.c can do this.
It will do this for a range of r values. It arguments are
rmin rmax dr ntransient nprint
rmin is the minimum value of r to be considered, rmax is the maximum
and dr is the increment in r. ntransient is the number of initial
generations before we start printing x_n. nprint is the number of
generations to print after the transient generations.
With this program we were able to produce pictures of period doubling
and chaos as in Figure 6.2 on page 145.
We would like to better understand how period doubling comes about.
We are looking at the mapping
x_{n+1} = f(x_n)
and when r <= 0.75 we find that the long term behavior is a
constant. We call this a fixed point. Let
x_{n} = x_f + \epsilon_n
where x_f is the fixed point and \epsilon_n is how far we are from
the fixed point at the n th generation.
By Taylor expanding around x_f, we found that if |f'(x_f)| < 1, we
have a stable fixed point, otherwise the fixed point is unstable.
It was easy to find the fixed points from the equation
x_f = 4 r x_f (1-x_f)
There are two solutions, x_f = 0 and x_f = 1- 1/(4r)
We easily calculated the derivatives at the fixed points. For r <
0.25, x_f=0 is a stable fixed point, and the other value is not
between 0 and 1. For 0.25 < r < 0.75, x_f = 1- 1/(4r) is a stable
fixed point and x_f = 0 is unstable. When r > 0.75 neither is a
stable fixed point. However, when we have a trajectory of period
2, then x_(n+2) = f(f(x_)) can have a stable fixed point. We
explored this using Mathematica. Look in
~sg/Documents/February28_chaos.nb
to see what we did in Mathematica.