Вы находитесь на странице: 1из 32

ME 406

The Logistic Map


sysid

Mathematica 6.0.3, DynPac 11.02, 4ê22ê2009

plotreset; imsize = 250;

intreset;

‡ 1. Introduction
The logistic map is discussed in many references. A very complete and readable discussion is given in
Chapter 10 of Nonlinear Dynamics and Chaos by Steven Strogatz, Addison-Wesley, 1994. Many of the
interesting properties of the map were discovered by the mathematical biologist Robert May ("Simple Mathemati-
cal Models with Very Complicated Dynamics," Nature 261, 459, 1976.) The basic form of the map is
xn+1 = rxn (1 - xn ) .

In many applications, the map is a model for the dynamics of a population, and xn is the population of the nth
generation. As the work of May and others has shown, this map exhibits an astonishing range of behavior as the
growth rate r is varied. We will use the range 0 < r b 4. For r = 4, the interval [0,1] is mapped onto itself; for 0
< r < 4, it is mapped into itself. ,Many of the basic features of this map can be established analytically, and some
of this analyis may be seen in section 10.3 of Strogatz. In this notebook, our approach will be primarily numeri-
cal, using the functions built-in to DynPac. We begin by defining the system for DynPac. We start with the
command setmap, which tells DynPac that this is a mapping and not a differential equation.

setmap;
Now we define the state variable, the mapping function, which is assigned to slopevec, and the optional system
name.

slopevec = 8r * x * H1 - xL<; sysname = "Logistic Map";


setstate@8x<D; setparm@8r<D;

We check our definitions with a sysreport.


2 logistmap.nb

sysreport

SYSTEM DEFINITION H11.02L

System name: sysname = Logistic Map

State vector: statevec = 8x<

State units: stateunits = 8<

Slope vector: slopevec = 8r H1 - xL x<

Parameter vector: parmvec = 8r<

Parameter values: parmval = 8r<

Parameter units vector: parmunits = 8<

Time unit: timeunit =

System Type: sysmode = mapping

We could have used this same function as the slope for a differential equation, in which case we would
use the command setde to tell DynPac that we are working with a differential equation. The primary differencebe-
tween the mapping and differential equation modes is just the actual stepping algorithm used in constructing
solutions -- a Runge-Kutta step for a differential equation, and a map iteration for the mapping. All of the other
supporting code is essentially identical in the two cases.

‡ 2. Equilibrium Points
We start by viewing the map for several different values of the parameter r.

parmval = 80.5<;
logistmap.nb 3

viewmap@D;

r H1 - xL x, 8r< = 8 0.50<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
parmval = 82.0<;

viewmap@D;

r H1 - xL x, 8r< = 8 2.00<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
For r = 0.5, there is a single equilibrium point at r = 0. For r = 2, there are two equilibrium points -- one at x = 0
and the other at x = 0.5. For a general value of r, the fixed points are

findpolyfix@D

:80<, : >>
-1 + r
r

Thus there are always two equilibria, but the second one is relevant (in the range [0,1]) only for 1 b r b 4. The
stability of the equilibria is determined by the derivative of the mapping. We have

D@slopevec, xD ê. x Ø 0

8r<
4 logistmap.nb

Simplify@D@slopevec, xD ê. x Ø H1 - 1 ê rLD

82 - r<

r > 1 it is relevant. It is stable as long as »2 - r» < 1, hence for 1 < r < 3. At r = 1, the two equilibria coincide at x
Thus the equilibrium at the origin is stable for 0 < r < 1. The other equilibrium is not relevant for 0 < r < 1. For

= 0, and we recognize a transcritical bifurcation at r =1.


We could also have determined the stability of the equilibria by using the function classifymap. We do
that now for three different values of r.

eq0 = 80<; eq1 = 81 - 1 ê r<;

parmval = 80.5<;

classifymap@eq0D

strictly stable

parmval = 82.0<;

classifymap@eq0D

unstable

classifymap@eq1D

strictly stable

parmval = 83.5<;

classifymap@eq0D

unstable

classifymap@eq1D

unstable

No surprises in the answers, although they do raise the question of the nature of the attractor when r > 3.

We finish our discussion of equilibrium by looking at orbits approaching stable equilibria. We do this
first for r = 0.5, then for r = 1.5, and finally for r = 2.5.

parmval = 80.5<;
The only stable equilibrium for this value of r is the origin. We now use the function
iterate[init,initime,niter,ntoss,ncomp] to construct a sequence of iterations. The first four arguments of iterate are
required. The fifth argument is optional. The starting value for the iteration is init, the starting time is initime,
the total number of iterations performed is niter + ntoss, and the first ntoss of these are thrown away (useful in
some cases to eliminate transient approaches to attractors). The optional fifth argument is the level of functional
composition for the map. If the fifth argument is omitted, the default is 1, which means the map itself is iterated.
In looking for periodic solutions later, we will see uses for higher levels of composition. We try this now,
carrying out 15 iterations, starting at x = 0.8 and time = 0, and throwing away none of the iterates.
logistmap.nb 5

iterate@0.8, 0.0, 15, 0D

:80., 0.8<, 81., 0.08<, 82., 0.0368<, 83., 0.0177229<,


84., 0.00870439<, 85., 0.00431431<, 86., 0.00214785<,
87., 0.00107162<, 88., 0.000535235<, 89., 0.000267474<,
810., 0.000133701<, 811., 0.0000668417<, 812., 0.0000334186<,
813., 0.0000167088<, :14., 8.35424 µ 10 >, :15., 4.17708 µ 10 >>
-6 -6

We see that the output is a list of pairs. Each pair has the form {t , x }. We also see that the iterations are
converging well to the stable fixed point at the origin. We may visualize this process by constructing a cobweb
plot. The function that does that is cobweb[init,niter,ntoss,ncomp]. The significance of the arguments is the
same as for iterate. We try it.

cobweb@0.8, 15, 0D;

r H1 - xL x, 8r< = 8 0.50<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
This gives us a good geometric view of the monotonic convergence to the equilibrium at the origin.

Now we repeat these calculations for r = 1.5.

parmval = 81.5<;
The equilibria are now at

eqstateval@eq0D

80<
6 logistmap.nb

eqstateval@eq1D

80.333333<

We can check directly that these are fixed points by evaluating the map at those values.

mapval@eq0D

80<

mapval@eq1D

80.333333<

From our calculations earlier, we know that eq0 is unstable and eq1 is stable. We check this.

classifymap@eq0D

unstable

classifymap@eq1D

strictly stable

We look at an iteration starting near x = 0.

iterate@0.05, 0.0, 30, 0D

880., 0.05<, 81., 0.07125<, 82., 0.0992602<, 83., 0.134111<,


84., 0.174188<, 85., 0.21577<, 86., 0.25382<, 87., 0.284093<,
88., 0.305076<, 89., 0.318007<, 810., 0.325318<, 811., 0.329229<,
812., 0.331256<, 813., 0.332288<, 814., 0.332809<,
815., 0.333071<, 816., 0.333202<, 817., 0.333268<, 818., 0.3333<,
819., 0.333317<, 820., 0.333325<, 821., 0.333329<, 822., 0.333331<,
823., 0.333332<, 824., 0.333333<, 825., 0.333333<, 826., 0.333333<,
827., 0.333333<, 828., 0.333333<, 829., 0.333333<, 830., 0.333333<<

Not surprisingly, we converge to the stable equilibrium at x = 1/3. We show this process with 12 iterations on a
cobweb plot.
logistmap.nb 7

cobweb@0.05, 12, 0D;

r H1 - xL x, 8r< = 8 1.50<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
Again a very nice monotonic convergence.

Finally we look at r = 2.5 and go through the same sequence.

parmval = 82.5<;

eqstateval@eq0D

80<

eqstateval@eq1D

80.6<

mapval@eq0D

80<

mapval@eq1D

80.6<

classifymap@eq0D

unstable
8 logistmap.nb

classifymap@eq1D

strictly stable

iterate@0.05, 0.0, 30, 0D

880., 0.05<, 81., 0.11875<, 82., 0.261621<, 83., 0.482939<,


84., 0.624272<, 85., 0.586391<, 86., 0.606341<, 87., 0.596729<,
88., 0.601609<, 89., 0.599189<, 810., 0.600404<, 811., 0.599798<,
812., 0.600101<, 813., 0.599949<, 814., 0.600025<, 815., 0.599987<,
816., 0.600006<, 817., 0.599997<, 818., 0.600002<, 819., 0.599999<,
820., 0.6<, 821., 0.6<, 822., 0.6<, 823., 0.6<, 824., 0.6<, 825., 0.6<,
826., 0.6<, 827., 0.6<, 828., 0.6<, 829., 0.6<, 830., 0.6<<

cobweb@0.05, 15, 0D;

r H1 - xL x, 8r< = 8 2.50<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
Again we get rapid convergence, but there is a new feature here. In the final stages, the iterates are oscillating
around the equilibrium, rather than approaching it from one side as in the two previous cases. It turns out that
such behavior is predictable. Consider two successive iterates when we are very close to the equilibrium, which
we will call x* . Then

xn+1 - xn = f(xn ) - f(xn-1 ) º f '(x* ) (xn - xn-1 ) .

Thus when f ' is positive, the sign of successive differences is always the same, and when f ' is negative, the sign
of the difference alternates with each iteration. We check this by first defining the derivative of the map, and
then evaluating it at the equilibria for the three values of r we have considered.

D@slopevec, xD ê. Thread@statevec Ø eqD ê. Thread@parmvec Ø parmvalD


mapslope@eq_D :=
logistmap.nb 9

parmval = 80.5<;

mapslope@eq0D

80.5<

parmval = 81.5<;

mapslope@eq0D

81.5<

mapslope@eq1D

80.5<

parmval = 82.5<;

mapslope@eq0D

82.5<

mapslope@eq1D

8-0.5<

Thus the results are consistent with what we know about the stability and the signs of successive iterate
differences.
Now we consider what happens when r exceeds 3 and neither of the equilibria are stable.

‡ 3. Periodic Orbits
We choose r = 3.2 and first verify that our equilibria are both unstable.

parmval = 83.2<;

eqstateval@eq0D

80<

eqstateval@eq1D

80.6875<

mapval@eq0D

80<
10 logistmap.nb

mapval@eq1D

80.6875<

classifymap@eq0D

unstable

classifymap@eq1D

unstable

We can also check stability by looking at the eigenvalues of the map at the equilibria. The function eigvalmap
returns the eigenvalues of the mapping linearized about the equilibrium. For stability, the eigenvalues must be
less than 1 in modulus.

eigvalmap@eq0D

83.2<

eigvalmap@eq1D

8-1.2<

Thus, as we already knew, both equilibria are unstable. We see that the divergence near eq0 is monotonic,
whereas the divergence near eq1 is oscillatory.
As neither fixed point is stable for this value of r, there might be a periodic orbit. Let's perform a short
iteration with a more or less arbitrary intial condition of 0.23. We ask for 20 iterates with none thrown away.

sol1 = iterate@0.23, 0.0, 20, 0D

880., 0.23<, 81., 0.56672<, 82., 0.785755<, 83., 0.538701<,


84., 0.795207<, 85., 0.521129<, 86., 0.798571<, 87., 0.514736<,
88., 0.799305<, 89., 0.513333<, 810., 0.799431<, 811., 0.513091<,
812., 0.799452<, 813., 0.513052<, 814., 0.799455<,
815., 0.513046<, 816., 0.799455<, 817., 0.513045<,
818., 0.799455<, 819., 0.513045<, 820., 0.799455<<

The numbers show pretty clearly that we have found a period two orbit. We can also ask DynPac to check for
periodicity:

periodmap@sol1D

Solution contains a periodic orbit; period = 2

Another approach to finding this periodic orbit is to consider the fixed points of the first iterated map-
ping. First we graph the mapping.
logistmap.nb 11

viewmap@2D;

Comp 2 of r H1 - xL x, 8r< = 8 3.20<


1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
We see four fixed points. Of course two will be the fixed points of the original map, but the other two should be
the points on the period-two orbit of the original map. We check this by using nfindpolyfix to find all fixed
points. We use argument 2 to set the level of function composition.

nfindpolyfix@2D

880.<, 80.513045<, 80.6875<, 80.799455<<

We see the two fixed points of the original map and the two values that showed up explicitly in the orbit calcu-
lated above. We check the stability of the period two orbit by checking the stability of these as fixed points of
the second iterated mapping.

classifymap@80.513045<, 2D

strictly stable

classifymap@80.799455<, 2D

strictly stable

Thus the period two orbit is stable.

The last few function evaluations have provided examples of applying functions to higher compositions
of the map -- in this case the second composition. It is the optional last argument 2 that causes this. We haven't
yet looked explicitly at the second composition, although we can do that easily with mapcomp[n], which returns
the nth composition.

mapcomp@2D

9r2 H1 - xL x H1 - r H1 - xL xL=

Now construct a cobweb plot to show the approach to the stable orbit of period 2. We start with an
initial condition 0.23, and we ask for 100 iterations, throwing none away before plotting.
12 logistmap.nb

cobweb@80.23<, 100, 0D;

r H1 - xL x, 8r< = 8 3.20<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
We see the eventual approach to the orbit. We can get the pure orbit by throwing away the transients. We
perform the same calculation, only now throwing away 100 points first.

cobweb@80.23<, 100, 100D;

r H1 - xL x, 8r< = 8 3.20<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
Now we get the pure orbit.

What happens as we increase r. We try it. We set r = 3.5 and carry out a short iteration.
logistmap.nb 13

What happens as we increase r. We try it. We set r = 3.5 and carry out a short iteration.

parmval = 83.5<;

sol2 = iterate@80.23<, 0.0, 30, 0D

880., 0.23<, 81., 0.61985<, 82., 0.824726<, 83., 0.505936<,


84., 0.874877<, 85., 0.383136<, 86., 0.8272<, 87., 0.500291<,
88., 0.875<, 89., 0.382813<, 810., 0.826935<, 811., 0.500896<,
812., 0.874997<, 813., 0.38282<, 814., 0.826941<,
815., 0.500884<, 816., 0.874997<, 817., 0.38282<, 818., 0.826941<,
819., 0.500884<, 820., 0.874997<, 821., 0.38282<, 822., 0.826941<,
823., 0.500884<, 824., 0.874997<, 825., 0.38282<, 826., 0.826941<,
827., 0.500884<, 828., 0.874997<, 829., 0.38282<, 830., 0.826941<<

Inspection of the iterates shows an orbit of period 4. We verify that.

periodmap@sol2D

Solution contains a periodic orbit; period = 4

The points on the 4-orbit should be fixed points of the fourth composition of the map. We first plot the fourth
composition. We first make the image a little larger to see more clearly what is happening.

imsize = 320;

viewmap@4D;

Comp 4 of r H1 - xL x, 8r< = 8 3.50<


1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
imsize = 250;
We now look at the roots for the mapping, the second composition and the fourth composition.
14 logistmap.nb

root1 = nfindpolyfix@D

880.<, 80.714286<<

root2 = nfindpolyfix@2D

880.<, 80.428571<, 80.714286<, 80.857143<<

root3 = nfindpolyfix@4D

880.<, 80.049385 - 0.0241573 Â<, 80.049385 + 0.0241573 Â<,


80.166354 - 0.0761994 Â<, 80.166354 + 0.0761994 Â<,
80.38282<, 80.428571<, 80.500884<, 80.505703 - 0.177965 Â<,
80.505703 + 0.177965 Â<, 80.714286<, 80.826941<, 80.857143<,
80.874997<, 80.985737 - 0.00710473 Â<, 80.985737 + 0.00710473 Â<<

We see that the original mapping has the usual two equilibria, now at 0 and 0.714286. The second composition
has these two roots, plus two others, 0.428571 and 0.857143. These two constitute a period two orbit. The
fourth function composition has all of these four roots plus four additional ones, at 0.38282, 0.500884, 0.826941,
and 0.874997. On the basis of what we have seen so far, we might guess that we have two unstable equilibria,
one unstable period two orbit, and a stable period four orbit. Let's verify all of that, both by stability determina-
tion and by iterations.
First we check the stability, using classifymap. Although it is redundant, we check all points of the periodic
orbits instead of just one.

classifymap@0D

unstable

classifymap@0.714286D

unstable

classifymap@0.428571, 2D

unstable

classifymap@0.857143, 2D

unstable

classifymap@0.38282, 4D

strictly stable

classifymap@0.500884, 4D

strictly stable
logistmap.nb 15

classifymap@0.826941, 4D

strictly stable

classifymap@0.874997, 4D

strictly stable

Our stability conjectures have been confirmed. Now we look at some iterations. We start on the period two
orbit. Because it is unstable, we expect slight numerical errors to cause us to drift off the orbit. We try 50
iterations.

iterate@0.428571, 0.0, 50, 0D

880., 0.428571<, 81., 0.857143<, 82., 0.428572<, 83., 0.857143<,


84., 0.428571<, 85., 0.857143<, 86., 0.428572<, 87., 0.857143<,
88., 0.42857<, 89., 0.857142<, 810., 0.428573<, 811., 0.857144<,
812., 0.42857<, 813., 0.857142<, 814., 0.428573<, 815., 0.857144<,
816., 0.428569<, 817., 0.857142<, 818., 0.428575<,
819., 0.857144<, 820., 0.428567<, 821., 0.857141<, 822., 0.428576<,
823., 0.857145<, 824., 0.428565<, 825., 0.85714<, 826., 0.428579<,
827., 0.857147<, 828., 0.428562<, 829., 0.857138<, 830., 0.428584<,
831., 0.857149<, 832., 0.428556<, 833., 0.857135<, 834., 0.42859<,
835., 0.857152<, 836., 0.428548<, 837., 0.857131<, 838., 0.428601<,
839., 0.857158<, 840., 0.428534<, 841., 0.857124<, 842., 0.428618<,
843., 0.857166<, 844., 0.428513<, 845., 0.857114<, 846., 0.428644<,
847., 0.857179<, 848., 0.428481<, 849., 0.857097<, 850., 0.428685<<

We are drifting off the orbit, but fairly slowly, so we might speculate that the instability is rather weak. Let's
look at the eigenvalue.

eigvalmap@0.428571, 2D

8-1.25001<

It is greater than 1, but not really large, so it will take awhile to drift off the orbit. We iterate longer but only
print out the final result.

iterate@0.428571, 0.0, 200, 0D;

lastx

80.38282<

Now the drift has carried us onto the stable period four orbit.

We look now at some iterations showing another approach to the period four orbit. We start arbitrarily at
x = 0.25 with 50 iterations.
16 logistmap.nb

iterate@0.25, 0.0, 50, 0D

880., 0.25<, 81., 0.65625<, 82., 0.789551<, 83., 0.581561<,


84., 0.851717<, 85., 0.442033<, 86., 0.863239<, 87., 0.4132<,
88., 0.84863<, 89., 0.449599<, 810., 0.866109<, 811., 0.405875<,
812., 0.843991<, 813., 0.460845<, 814., 0.869634<,
815., 0.396797<, 816., 0.837722<, 817., 0.475803<, 818., 0.872951<,
819., 0.388177<, 820., 0.831235<, 821., 0.490992<, 822., 0.874716<,
823., 0.383558<, 824., 0.827544<, 825., 0.499502<, 826., 0.874999<,
827., 0.382815<, 828., 0.826937<, 829., 0.500893<, 830., 0.874997<,
831., 0.38282<, 832., 0.826941<, 833., 0.500884<, 834., 0.874997<,
835., 0.38282<, 836., 0.826941<, 837., 0.500884<, 838., 0.874997<,
839., 0.38282<, 840., 0.826941<, 841., 0.500884<, 842., 0.874997<,
843., 0.38282<, 844., 0.826941<, 845., 0.500884<, 846., 0.874997<,
847., 0.38282<, 848., 0.826941<, 849., 0.500884<, 850., 0.874997<<

We are clearly on the period four orbit. Let's do a cobweb plot of this same iteration.

cobweb@0.25, 50, 0D;

r H1 - xL x, 8r< = 8 3.50<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
Now we do a cobweb plot showing the pure periodic orbit, by throwing away 50 iterates first.
logistmap.nb 17

cobweb@0.25, 50, 50D;

r H1 - xL x, 8r< = 8 3.50<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
At what value of r do we make the transition from a stable fixed point to a stable period two orbit, and at
what value of r do we make the transition from a stable period two orbit to a stable period 4 orbit? We can
estimate those values of r by using the derivative criterion for stability. Or we can just explore the question
numerically by making runs for many different r-values. We try the derivative approach for now. The stable
period two orbit is a fixed point of the second composition, namely

maptwo = mapcomp@2D

9r2 H1 - xL x H1 - r H1 - xL xL=

The fixed points of this are given by

rootsorbtwo = findpolyfix@2D

:80<, : >, : >, : >>


-1 + r r + r2 - r -3 - 2 r + r2 r + r2 + r -3 - 2 r + r2
r 2 r2 2 r2

The third and fourth of these are the points on the orbit of period two. We name the first of these.

orbpoint = First@rootsorbtwo@@3DDD

r + r2 - r -3 - 2 r + r2
2 r2

The relevant derivative is


18 logistmap.nb

orbtwoder = First@FullSimplify@D@maptwo, xD ê. x Ø orbpointDD

4 - H-2 + rL r

We now find where this is equal to ±1:

Solve@orbtwoder ã 1, rD

88r Ø -1<, 8r Ø 3<<

Solve@orbtwoder ã -1, rD

::r Ø 1 - 6 >, :r Ø 1 + 6 >>

Plot@8orbtwoder, 1, -1<, 8r, 0, 4<D

1 2 3 4

-2

-4

From the numbers and the graph, we see that the relevant derivative is less than 1 in magnitude for r between 3
and 1 + 6 = 3.449. This is the r-range in which the period two orbit is the attractor.
What happens when r exceeds 3.449? We try r = 3.55 to see what we can find.

parmval = 83.55<;
We iterate to see what we get.

sol8 = iterate@0.25, 0.0, 200, 0D

880., 0.25<, 81., 0.665625<, 82., 0.790118<, 83., 0.588703<,


84., 0.859568<, 85., 0.428523<, 86., 0.869363<, 87., 0.403176<,
88., 0.854219<, 89., 0.442077<, 810., 0.87559<, 811., 0.38671<,
812., 0.841937<, 813., 0.472431<, 814., 0.884802<, 815., 0.361843<,
816., 0.81974<, 817., 0.524571<, 818., 0.885357<, 819., 0.360325<,
, , , ,
logistmap.nb 19

820., 0.818243<, 821., 0.527961<, 822., 0.884725<, 823., 0.362054<,


824., 0.819946<, 825., 0.524102<, 826., 0.885438<, 827., 0.360104<,
828., 0.818023<, 829., 0.528458<, 830., 0.884625<, 831., 0.362326<,
832., 0.820212<, 833., 0.523497<, 834., 0.88554<, 835., 0.359824<,
836., 0.817745<, 837., 0.529085<, 838., 0.884497<, 839., 0.362676<,
840., 0.820554<, 841., 0.52272<, 842., 0.885668<, 843., 0.359475<,
844., 0.817397<, 845., 0.52987<, 846., 0.884333<, 847., 0.363124<,
848., 0.82099<, 849., 0.521727<, 850., 0.885824<, 851., 0.359046<,
852., 0.816968<, 853., 0.530835<, 854., 0.884125<, 855., 0.363692<,
856., 0.821541<, 857., 0.52047<, 858., 0.886012<, 859., 0.35853<,
860., 0.816451<, 861., 0.531998<, 862., 0.883865<, 863., 0.364398<,
864., 0.822223<, 865., 0.518911<, 866., 0.88623<, 867., 0.357933<,
868., 0.81585<, 869., 0.533348<, 870., 0.883552<, 871., 0.365252<,
872., 0.823042<, 873., 0.517035<, 874., 0.88647<, 875., 0.357276<,
876., 0.815186<, 877., 0.534836<, 878., 0.883192<, 879., 0.366232<,
880., 0.823977<, 881., 0.514889<, 882., 0.886713<, 883., 0.356608<,
884., 0.814508<, 885., 0.536351<, 886., 0.882809<, 887., 0.367273<,
888., 0.824962<, 889., 0.512619<, 890., 0.886935<, 891., 0.355999<,
892., 0.813887<, 893., 0.537737<, 894., 0.882445<, 895., 0.368263<,
896., 0.825891<, 897., 0.510472<, 898., 0.887111<, 899., 0.355516<,
8100., 0.813391<, 8101., 0.53884<, 8102., 0.882145<, 8103., 0.369077<,
8104., 0.82665<, 8105., 0.508713<, 8106., 0.88723<, 8107., 0.355187<,
8108., 0.813053<, 8109., 0.539592<, 8110., 0.881935<,
8111., 0.369645<, 8112., 0.827177<, 8113., 0.507491<,
8114., 0.887301<, 8115., 0.354993<, 8116., 0.812854<,
8117., 0.540034<, 8118., 0.88181<, 8119., 0.369984<, 8120., 0.82749<,
8121., 0.506763<, 8122., 0.887338<, 8123., 0.354892<, 8124., 0.81275<,
8125., 0.540265<, 8126., 0.881744<, 8127., 0.370163<,
8128., 0.827655<, 8129., 0.506379<, 8130., 0.887356<,
8131., 0.354843<, 8132., 0.812699<, 8133., 0.540378<,
8134., 0.881712<, 8135., 0.37025<, 8136., 0.827736<, 8137., 0.506192<,
8138., 0.887364<, 8139., 0.35482<, 8140., 0.812675<, 8141., 0.540431<,
8142., 0.881697<, 8143., 0.370291<, 8144., 0.827774<,
8145., 0.506104<, 8146., 0.887368<, 8147., 0.354809<,
8148., 0.812665<, 8149., 0.540455<, 8150., 0.88169<, 8151., 0.37031<,
8152., 0.827791<, 8153., 0.506064<, 8154., 0.887369<,
8155., 0.354804<, 8156., 0.81266<, 8157., 0.540466<, 8158., 0.881687<,
8159., 0.370319<, 8160., 0.827799<, 8161., 0.506045<,
8162., 0.88737<, 8163., 0.354802<, 8164., 0.812657<,
8165., 0.540471<, 8166., 0.881686<, 8167., 0.370322<,
8168., 0.827802<, 8169., 0.506037<, 8170., 0.887371<,
8171., 0.354801<, 8172., 0.812656<, 8173., 0.540473<,
8174., 0.881685<, 8175., 0.370324<, 8176., 0.827804<,
8177., 0.506034<, 8178., 0.887371<, 8179., 0.354801<,
8180., 0.812656<, 8181., 0.540474<, 8182., 0.881685<,
8183., 0.370325<, 8184., 0.827805<, 8185., 0.506032<,
8186., 0.887371<, 8187., 0.354801<, 8188., 0.812656<,
8189., 0.540474<, 8190., 0.881684<, 8191., 0.370325<,
8192., 0.827805<, 8193., 0.506031<, 8194., 0.887371<,
8195., 0.354801<, 8196., 0.812656<, 8197., 0.540475<,
8198., 0.881684<, 8199., 0.370325<, 8200., 0.827805<<
20 logistmap.nb

periodmap@sol8D

Solution contains a periodic orbit; period = 8

The numbers generated and the function periodmap both suggest a periodic orbit of period 8! Let's look at the
cobweb for this iteration.

cobweb@0.25, 200, 0D;

r H1 - xL x, 8r< = 8 3.55<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
Now the cobweb for the pure periodic orbit.
logistmap.nb 21

cobweb@0.25, 100, 200D;

r H1 - xL x, 8r< = 8 3.55<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
If you examine all of the fixed points for the eighth function composition, you find two unstable fixed points of
the original map, an unstable orbit of period two, an unstable orbit of period 4, and a stable orbit of period 8, the
one we saw above. This sequence of period doublings continues indefinitely, although the r values at which the
bifurcations occur approach a finite value, namely 3.569946... . With a lot more numerical exploration, one can
establish the following bifurcation sequence (the numbers are taken from Strogatz, p. 355):

Parameter Range Type of Attractor

Equilibrium at 1 - 1 ê r
0 < r < 1 Equilibrium at r = 0
1 < r < 3
3 < r < 3.449 ... Orbit of Period 2
3.449 ... < r < 3.54409 ... Orbit of Period 4
3.54409 ... < r < 3.5644 ... Orbit of Period 8
3.5644 ... < r < 3.568759 ... Orbit of Period 16
................... ............
3.569946 ... < r ?

At this point, we can summarize the situation. When the growth parameter r is less than 3, there is a
single stable equilibrium point, and in general the iteration will converge to that point. Once r exceeds 3, there
are no stable equilibria, but in the range 3 < r < 3.569946..., there is always a stable periodic solution. As we
move through this r-range, we encounter a sequence of period-doubling bifurcations, so that the stable orbits are
getting longer and longer. The major question which all of this raises, is what happens when r exceeds
3.569946..? There are no longer any stable periodic solutions. An informal way to describe it is to say that we
seem to have reached an oscillatory solution with an infinite period, and that sounds like chaos!
At this point, we can summarize the situation. When the growth parameter r is less than 3, there is a
single stable equilibrium point, and in general the iteration will converge to that point. Once r exceeds 3, there
22 are no stable equilibria, but in the range 3 < r < 3.569946..., there is always a stable periodic solution. Aslogistmap.nb
we
move through this r-range, we encounter a sequence of period-doubling bifurcations, so that the stable orbits are
getting longer and longer. The major question which all of this raises, is what happens when r exceeds
3.569946..? There are no longer any stable periodic solutions. An informal way to describe it is to say that we
seem to have reached an oscillatory solution with an infinite period, and that sounds like chaos!

‡ 4. Chaotic Orbits
We explore the system with a parameter value in the question-mark range. We take r = 3.7.

parmval = 83.7<;
We do a 100 point iteration, arbitrarily starting at 0.23.

sol3 = iterate@80.23<, 0, 100, 0D

880, 0.23<, 81, 0.65527<, 82, 0.835798<, 83, 0.507788<, 84, 0.924776<,
85, 0.257393<, 86, 0.707225<, 87, 0.766114<, 88, 0.662979<,
89, 0.82672<, 810, 0.530039<, 811, 0.921661<, 812, 0.267146<,
813, 0.724383<, 814, 0.738713<, 815, 0.714159<, 816, 0.755303<,
817, 0.683835<, 818, 0.799958<, 819, 0.592094<, 820, 0.893619<,
821, 0.351736<, 822, 0.843666<, 823, 0.488007<, 824, 0.924468<,
825, 0.25836<, 826, 0.708958<, 827, 0.763446<, 828, 0.668206<,
829, 0.820315<, 830, 0.545374<, 831, 0.917383<, 832, 0.28043<,
833, 0.746619<, 834, 0.699963<, 835, 0.777055<, 836, 0.64099<,
837, 0.851451<, 838, 0.467984<, 839, 0.921207<, 840, 0.268562<,
841, 0.726815<, 842, 0.734653<, 843, 0.72127<, 844, 0.743846<,
845, 0.704995<, 846, 0.769515<, 847, 0.656238<, 848, 0.834682<,
849, 0.510555<, 850, 0.924588<, 851, 0.257983<, 852, 0.708283<,
853, 0.764487<, 854, 0.666172<, 855, 0.822831<, 856, 0.539387<,
857, 0.91926<, 858, 0.274618<, 859, 0.73705<, 860, 0.717086<,
861, 0.750632<, 862, 0.69258<, 863, 0.787779<, 864, 0.618579<,
865, 0.872974<, 866, 0.410293<, 867, 0.895225<, 868, 0.347049<,
869, 0.838443<, 870, 0.501189<, 871, 0.924995<, 872, 0.256704<,
873, 0.705986<, 874, 0.768008<, 875, 0.659235<, 876, 0.831183<,
877, 0.519175<, 878, 0.92364<, 879, 0.260959<, 880, 0.71358<,
881, 0.756219<, 882, 0.682102<, 883, 0.802304<, 884, 0.586865<,
885, 0.897082<, 886, 0.341606<, 887, 0.832172<, 888, 0.516748<,
889, 0.923962<, 890, 0.259947<, 891, 0.711787<, 892, 0.759042<,
893, 0.67672<, 894, 0.809449<, 895, 0.570692<, 896, 0.90651<,
897, 0.313575<, 898, 0.796409<, 899, 0.599925<, 8100, 0.888056<<

Now there is no obvious repetition. We check it for periodicity anyway.

periodmap@sol3D

Solution does not contain a periodic orbit.

Are there fixed points?

nfindpolyfix@D

880.<, 80.72973<<
logistmap.nb 23

nfindpolyfix@2D

880.<, 80.390022<, 80.72973<, 80.880248<<

nfindpolyfix@4D

880.<, 80.0447134 - 0.015327 Â<, 80.0447134 + 0.015327 Â<,


80.158911 - 0.0516384 Â<, 80.158911 + 0.0516384 Â<, 80.321626<,
80.390022<, 80.504402 - 0.130338 Â<, 80.504402 + 0.130338 Â<,
80.575652<, 80.72973<, 80.807276<, 80.880248<, 80.903824<,
80.987784 - 0.00424622 Â<, 80.987784 + 0.00424622 Â<<

There are two fixed points, a period two orbit and a period four orbit. Presumably they are all unstable, since
they don't show up in our iteration. Are there orbits of higher period? If we try nfindpolyfix[8], Mathematica
goes away for a very long time and returns with a large list of roots, mostly complex, and missing most of the
real roots that we already know from above. Let's look at the stability of the orbits we have found. It is suffi-
cient to check just one point on each orbit.

classifymap@80<D

unstable

classifymap@80.72973<D

unstable

classifymap@80.390022<, 2D

unstable

classifymap@80.321626<, 4D

unstable

If this system with r = 3.7 has a stable attractor, we haven't found it yet. We try a cobweb plot.
24 logistmap.nb

cobweb@80.23<, 200, 0D;

r H1 - xL x, 8r< = 8 3.70<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
This could be chaotic. Let's do a fancy cobweb plot now with color, showing the sensitive dependence on initial
conditions. We take 26 initial points in the range [0.20,0.25], and we assign a gradually varying color from red
to blue. First we construct the color list.

collist = Table@RGBColor@H1 - iL, 0, iD, 8i, 0, 1, 0.04<D;

colorvec = collist; collpoint = 1;


We construct a list of initial conditions, all in the range [0.2, 0.25].

initvec = Table@0.2 + i, 8i, 0, 0.05, 0.002<D;


Now we construct the cobweb plot.

plrange = 880, 1<, 80, 1<<; asprat = 1;

imsize = 350;
logistmap.nb 25

cobweb@initvec, 6, 0D;

r H1 - xL x, 8r< = 8 3.70<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
This looks chaotic. We can also make a plot of x versus time by using timeplot. We construct a solution
with 50 iterates and then plot it as a function of time.

plrange = 880, 50<, 80, 1<<; asprat = 0.7; setcolor@8Black<D;

soltime = iterate@80.23<, 0, 50, 0D;

pointcon = True;
26 logistmap.nb

timeplot@soltime, 1D

Logistic Map 8r< = 8 3.70<


x
1.0

0.8

0.6

0.4

0.2

0.0 t
0 10 20 30 40 50

pointcon = False; plrange = 880, 1<, 80, 1<<;


Both the time plot and the cobweb plot show the chaotic nature of this orbit. In particular the cobweb
plot shows clearly the spread of an initially compact set of initial conditions. To get an overview of the map
behavior as a function of r, we will next consider the construction of a plot known as a bifurcation diagram.

‡ 5. Bifurcation Diagram
We consider here the construction of a plot in which the x-values in the attractor are plotted as a function
of the growth parameter r. The function which does this is
bimap[npts,ntoss,nparm,xname,xrange,initvec,pname,prange,ncomp].

The arguments are npts, the number of iterates plotted at each parameter value; ntoss, the number of transient
iterates thrown away before plotting; nparm, the number of parameter values at which the calculations are done;
xname, the name of the state variable; xrange, the plotting range for the state variable; initvec, the starting point
for the iteration (which may contain parameter symbols); pname, the name of the parameter being plotted;
prange, the range for the parameter variation; an optional final argument ncomp which is the level of function
composition, with the default of 1. Generally for the logistic map about 200 iterates have to be thrown away to
get good results, and about 100 to 200 iterates have to be plotted, at about 100 to 200 parameter values. We
carry this out for r in the range 2.8 to 4. We ask for a larger image size, for a background color of Wheat, and
points plotted in Blue.

setback@WheatD; imsize = 350; setcolor@8Blue<D;


logistmap.nb 27

ptsize = 0.002; asprat = 0.7;

biout = bimap@200, 200, 200, x, 80, 1<, 80.23<, r, 82.8, 4.0<D;

8r H1 - xL x<
1.0

0.8

0.6
x

0.4

0.2

0.0
2.8 3.0 3.2 3.4 3.6 3.8 4.0
r
We see clearly the bifurcation from a stable fixed point to a stable orbit of period 2 at r = 3, and then the bifurca-
tion from period two to period four at r between 3.4 and 3.5. The further period doublings occur at decreasing
increments in r, and the orbit becomes chaotic for r º 3.57. Note the intriguing window just beyond 3.8. Let's
explore this briefly. We set r to 3.83. We iterate and throw away 100 initial points in an effort to get rid of the
transients.

parmval = 83.83<;

sol4 = iterate@80.23<, 0, 30, 100D

88100, 8101, 8102,


8103, 8104, 8105, 8106,
0.957417<, 0.156149<, 0.504666<,

8107, 8108, 8109, 8110,


0.957417<, 0.156149<, 0.504666<, 0.957417<,

8111, 8112, 8113, 8114,


0.156149<, 0.504666<, 0.957417<, 0.156149<,

8115, 8116, 8117, 8118,


0.504666<, 0.957417<, 0.156149<, 0.504666<,

8119, 8120, 8121, 8122,


0.957417<, 0.156149<, 0.504666<, 0.957417<,

8123, 8124, 8125, 8126,


0.156149<, 0.504666<, 0.957417<, 0.156149<,

8127, 8128, 8129, 8130,


0.504666<, 0.957417<, 0.156149<, 0.504666<,
0.957417<, 0.156149<, 0.504666<, 0.957417<<

A surprising result -- a period 3 orbit!

periodmap@sol4D

Solution is periodic; period = 3

Because we saw it, it surely is stable, but we can check that.


28 logistmap.nb

classifymap@80.504666<, 3D

strictly stable

classifymap@80.957414<, 3D

strictly stable

classifymap@80.156149<, 3D

strictly stable

Let's look at the cobweb plot for this.

asprat = 1;

plrange = 880, 1<, 80, 1<<;

imsize = 250;

cobweb@80.23<, 50, 0D;

r H1 - xL x, 8r< = 8 3.83<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
Now we throw away the transients and look at the periodic orbit.
logistmap.nb 29

cobweb@80.23<, 15, 100D;

r H1 - xL x, 8r< = 8 3.83<
1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
We look at the third iterated mapping.

viewmap@3D;

Comp 3 of r H1 - xL x, 8r< = 8 3.83<


1.0

0.8

0.6

0.4

0.2

0.0
0.0 0.2 0.4 0.6 0.8 1.0
x
nfindpolyfix@1D

880.<, 80.738903<<

nfindpolyfix@3D

880.<, 80.156149<, 80.16357<, 80.504666<,


80.524001<, 80.738903<, 80.955294<, 80.957417<<

The third iterated map has 8 fixed points. Two of these are unstable fixed points of the basic map. The other six
turn out to be the components of two period 3 orbits, one stable and one unstable. From the iteration carried out
above, we know that the components of the stable orbit are 0.156149, 0.504666, and 0.957417. The unstable
period 3 orbit then is {0.16357, 0.524001, and 0.955294}. Let's start on this unstable orbit and iterate, and see
what happens.
30 logistmap.nb

The third iterated map has 8 fixed points. Two of these are unstable fixed points of the basic map. The other six
turn out to be the components of two period 3 orbits, one stable and one unstable. From the iteration carried out
above, we know that the components of the stable orbit are 0.156149, 0.504666, and 0.957417. The unstable
period 3 orbit then is {0.16357, 0.524001, and 0.955294}. Let's start on this unstable orbit and iterate, and see
what happens.

sol6 = iterate@80.16357<, 0.0, 100, 0D

880., 0.16357<, 81., 0.524001<, 82., 0.955294<, 83., 0.16357<,


84., 0.524001<, 85., 0.955294<, 86., 0.16357<, 87., 0.524002<,
88., 0.955294<, 89., 0.163571<, 810., 0.524002<, 811., 0.955294<,
812., 0.163571<, 813., 0.524003<, 814., 0.955293<,
815., 0.163572<, 816., 0.524005<, 817., 0.955293<,
818., 0.163573<, 819., 0.524008<, 820., 0.955292<, 821., 0.163575<,
822., 0.524013<, 823., 0.955292<, 824., 0.163578<, 825., 0.524021<,
826., 0.95529<, 827., 0.163583<, 828., 0.524035<, 829., 0.955288<,
830., 0.163592<, 831., 0.524057<, 832., 0.955283<, 833., 0.163606<,
834., 0.524093<, 835., 0.955277<, 836., 0.16363<, 837., 0.524154<,
838., 0.955265<, 839., 0.163669<, 840., 0.524256<, 841., 0.955247<,
842., 0.163734<, 843., 0.524424<, 844., 0.955215<, 845., 0.163844<,
846., 0.524706<, 847., 0.955162<, 848., 0.164029<, 849., 0.525182<,
850., 0.955071<, 851., 0.164346<, 852., 0.525999<, 853., 0.954911<,
854., 0.164904<, 855., 0.527431<, 856., 0.954618<, 857., 0.165925<,
858., 0.530049<, 859., 0.954042<, 860., 0.16793<, 861., 0.535165<,
862., 0.952764<, 863., 0.172368<, 864., 0.546378<, 865., 0.949262<,
866., 0.184467<, 867., 0.576181<, 868., 0.935273<, 869., 0.231859<,
870., 0.682126<, 871., 0.83046<, 872., 0.53925<, 873., 0.9516<,
874., 0.176401<, 875., 0.556436<, 876., 0.945301<, 877., 0.198036<,
878., 0.608273<, 879., 0.912601<, 880., 0.305483<, 881., 0.812584<,
882., 0.583275<, 883., 0.93094<, 884., 0.246233<, 885., 0.710858<,
886., 0.787215<, 887., 0.641555<, 888., 0.880755<, 889., 0.402247<,
890., 0.920902<, 891., 0.278982<, 892., 0.770409<, 893., 0.677446<,
894., 0.836905<, 895., 0.522777<, 896., 0.955513<, 897., 0.162805<,
898., 0.522028<, 899., 0.955642<, 8100., 0.162356<<

Although it isn't very strongly unstable, we can see that it is drifting off the orbit. Here's a longer run.

sol7 = iterate@80.16357<, 0.0, 1000, 0D;

lastx

80.156149<

Thus after a 1000 steps starting on the unstable period 3 orbit, we end up on the stable period 3 orbit.

It is of interest to look more closely at the region around this window with the period three orbit. We
construct a second bifurcation diagram with a narrower range of r-values.

asprat = 0.7;

imsize = 350;
logistmap.nb 31

biout = bimap@200, 200, 200, x, 80, 1<, 80.23<, r, 83.80, 3.85<D;

8r H1 - xL x<
1.0

0.8

0.6
x

0.4

0.2

0.0
3.80 3.81 3.82 3.83 3.84 3.85
r
We see the period three orbit at 3.83. We also see that just beyond 3.84, there is a bifurcation into a
period 6 orbit. Let's look closely at one branch of this. We choose the lowest branch by narrowing the x-range
to [0.12, 0.18]. Following the work of Campbell as presented in Strogatz (p. 357), we choose the r-range to be
[3.847, 3.857].
32 logistmap.nb

bimap@200, 200, 200, x, 80.12, 0.18<, 80.23<, r, 83.847, 3.857<D;


biout =

8r H1 - xL x<
0.18

0.17

0.16

0.15
x

0.14

0.13

0.12
3.848 3.850 3.852 3.854 3.856
r
This magnified view of a small piece of our original diagram looks strikingly like the original diagram.

‡ 6. Feigenbaum Number
We finish our discussion of the logistic map by looking at an amazing discovery made by Feigenbaum in
1975. We go back to the period-doubling bifurcations of the logistic map. We let rn be the value of r at which a
stable 2n cycle first appears. Then by careful numerical work, one can show that
rn - rn-1
ö d = 4.669 ...
rn+1 - rn nz¶
Thus the successive bifurcations are separated by a distance that asymptotically decreases geometrically by the
factor d. Feigenbaum's discovery was that this is true for a wide class of other maps -- roughly those maps with
a similar shape ((concave down with a single maximum) -- and that the value of d is the same for all such maps.
Thus this bifurcation sequence has a universality. This is discussed in much more detail in section 10.6 of
Strogatz. As an experiment, you might want to try to verify this result for the sine map, given by
xn+1 = rsin Hp xn L with 0 § r § 1.

Вам также может понравиться