Fractals/Iterations of real numbers/r iterations

Dynamics:

  • real analytic unimodal dynamics[1]


Diagram types edit

2D diagrams edit

  • parameter is a variable on horizontal axis
    • bifurcation diagram : P-curves ( = periodic points) versus parameter[2]
    • orbit diagram : points of critical orbit versus parameter
    • skeleton diagram ( critical curves = q-curves)[3]
    • Lyapunow diagram : Lyapunov exponent versus parameter[4]
    • multiplier diagrams : multiplier of periodic orbit versus parameter
  • constant parameter diagrams
    • cobweb diagram or a Verhulst diagram [5] = Graphical iteration
    • Iterates versus time diagram[6] = connected scatter graph = time series
    • invariant density diagram , histogram,[7] the distribution of the orbit,[8] frequency distribution [9] = power spectrum [10]
    • Poincare plot[11][12]


Transformation edit

Exponential transformation of the parameter axis


3D diagrams edit

Maps edit

  • Due to numerical errors different implementations of the same equation can give different trajectories. For example: r*x*(1-x) and r*x - r*x*x
  • Sensitivity to initial conditions: "small difference in the initial condition will produce large differences in the long-term behaviour of the system. This property is sometimes called the 'butterfly effect'."[13]


Map types


Tent map edit

Orbits of tent map:

Logistic map edit

names :

  • logistic map [14]:  [15]
  • logistic equation  
  • logistic difference equation  
  • discrete dynamical system

The logistic map[16][17] is defined by a recurrence relation ( difference equation) :

 

where :

  •   is a given constant parameter
  •   is given the initial term
  •   is subsequent term determined by this relation

Do not confuse it with :

  • differential equation ( which gives continous version )

Bash code [18] Javascript code from Khan Academy [19]MATLAB code:

r_values = (2:0.0002:4)';
iterations_per_value = 10;
y = zeros(length(r_values), iterations_per_value);
y0 = 0.5;
y(:,1) = r_values.*y0*(1-y0);
for i = 1:iterations_per_value-1
    y(:,i+1) = r_values.*y(:,i).*(1-y(:,i));
end
plot(r_values, y, '.', 'MarkerSize', 1);
grid on;

See also Lasin [20]

Maxima CAS code [21]

/* Logistic diagram by Mario Rodriguez Riotorto using Maxima CAS draw packag  */
pts:[];
for r:2.5 while r <= 4.0 step 0.001 do /* min r = 1 */
		(x: 0.25,
		for k:1 thru 1000 do x: r * x * (1-x), /* to remove points from image compute and do not draw it */
		for k:1 thru 500  do (x: r * x * (1-x), /* compute and draw it */
        	 	 pts: cons([r,x], pts))); /* save points to draw it later, re=r, im=x */
load(draw);
draw2d(	terminal   = 'png,
	file_name = "v",
        dimensions = [1900,1300],
	title      = "Bifurcation diagram, x[i+1] = r*x[i]*(1 - x[i])",
	point_type = filled_circle,
	point_size = 0.2,
	color = black,
	points(pts));

explicit solutions edit

The system with r=4 has the explicit solution for the nth iteration :[22]

  

Precision edit

Numerical Precision in the Chaotic Regime : " the number of digits of precision which must be specified is about 0.6 of the number of iterations. Hence, to determine is x10 000, we need about 6000 digits."

"Hence it is not possible to predict the value of xn for very large n in the chaotic regime." [23]

Better image edit

 
Bifurcation diagram of the logistic map

To show more detaile use tips by User:PAR:

"The horizontal axis is the r parameter, the vertical axis is the x variable. The image was created by forming a 1601 x 1001 array representing increments of 0.001 in r and x. A starting value of x=0.25 was used, and the map was iterated 1000 times in order to stabilize the values of x. 100,000 x -values were then calculated for each value of r and for each x value, the corresponding (x,r) pixel in the image was incremented by one. All values in a column (corresponding to a particular value of r) were then multiplied by the number of non-zero pixels in that column, in order to even out the intensities. Values above 250,000 were set to 250,000, and then the entire image was normalized to 0-255. Finally, pixels for values of r below 3.57 were darkened to increase visibility."

See also :

  • tips from learner.org [24]


   "The "problem" with pretty much all fractal-type systems, is, that, what happens at the beginning of an actually infinite iterational scheme, is often not descriptive of the long-time limit behaviour. And that's happening with the perturbed Lyapunov exponent from Mario Markus' algorithm as well. If I recall correctly, he states in his 90's article something like "let the x-value settle in". It's similar to the statement "for sufficiently large N" in math papers or in general with convergent series.
   The actual value of how many skipping iterations one performs, is, however, (at least afaik) just a guess till you're satisfied with the quality of the image. In my images, I could not get rid of those artifacts in full, one example being the UFO image, where vasyan did a great job removing those spots:
   vasyan's: https://fractalforums.org/index.php?action=gallery;sa=view;id=2388
   my version (with spots): https://fractalforums.org/index.php?action=gallery;sa=view;id=1960" marcm200[25]

Lyapunov exponent edit

Invariant Measure edit

An invariant measure or probability density in state space [27]

Video on Youtube[28]

Real quadratic map edit

 
Lyapunov exponent - image and Maxima CAS code

Great images by Chip Ross[29]

For  , the code in MATLAB can be written as:

c = (0:0.001:2)';
iterations_per_value = 100;
y = zeros(length(c), iterations_per_value);
y0 = 0;
y(:,1) = y0.^2 - c;
for i = 1:iterations_per_value-1
    y(:,i+1) = y(:,i).^2 - c;
end
plot(c, y, '.', 'MarkerSize', 1, 'MarkerEdgeColor', 'black');

Maxima CAS code for drawing real quadratic map :   :

/* based on the code by by Mario Rodriguez Riotorto */
pts:[];
for c:-2.0 while c <= 0.25 step 0.001 do 
                (x: 0.0,
                for k:1 thru 1000 do x: x * x+c, /* to remove points from image compute and do not draw it */
                for k:1 thru 500  do (x:  x * x+c, /* compute and draw it */
                         pts: cons([c,x], pts))); /* save points to draw it later, re=r, im=x */
load(draw);
draw2d( terminal   = 'svg,
        file_name = "b",
        dimensions = [1900,1300],
        title      = "Bifurcation diagram, x[i+1] = x[i]*x[i] +c",
        point_type = filled_circle,
        point_size = 0.2,
        color = black,
        points(pts));

Lyapunov exponent edit

program lapunow;

  { program draws bifurcation diagram y[n+1]=y[n]*y[n]+x,} { blue}
  {  x: -2 < x < 0.25 }
  {  y: -2 < y < 2    }
  {  and Lyapunov exponet for each x { white}

  uses crt,graph,
        { modul niestandardowy }
       bmpM, {screenCopy}
       Grafm;
  var xe,xemax,xe0,yemax,i1,i2:integer;
      yer,y,x,w,dx,lap:real;

  const xmin=-2;         { wspolczynnik   funkcji fx(y) }
        xmax=0.25;
        ymax=2;
        ymin=-2;
        i1max=100;            { liczba iteracji }
        i2max=20;
        lapmax=10;
        lapmin=-10;

   function wielomian2st(y,x:real) :real;
     begin
       wielomian2st:=y*y+x;
     end;  { wielomian2st }

  procedure wstep;
     begin
       opengraf;
       randomize;            { przygotowanie generatora liczb losowych }
       xemax:=getmaxx;              { liczba pixeli }
       yemax:=getmaxy;
       w:=(yemax+1)/(ymax-ymin);
       dx:=(xmax-xmin)/(xemax+1);
     end;

  begin {cialo}
    wstep;
    for xe:=xemax downTo 0 do
      begin {xe}
        x:=xmin+xe*dx;     { liniowe skalowanie x=a*xe+b }
        i1:=0;
        i2:=0;
        lap:=0;
        y:=random;        { losowy wybor    y0 : 0<y0<1 }

        while (abs(y)<ymax) and (i1<i1max)
        do
          begin {while i1}
            y:=wielomian2st(y,x);
            i1:=i1+1;
            lap:=lap+ln(abs(2*y)+0.1);
            if keypressed then halt;
          end; {while i1}

        while (i2<i2max) and (abs(y)<ymax)
         do
          begin   {while i2}
            y:=wielomian2st(y,x);
            yer:=(y-ymin)*w;         { skalowanie }
            putpixel(xe,yemax-round(yer),blue); { diagram bifurkacyjny }
            i2:=i2+1;
            lap:=lap+ln(abs(2*y)+0.1);
            if keypressed then halt;
          end; {while i2}

          lap:=lap/(i1max+i2max);
          yer:=(lap-lapmin)*(yemax+1)/(lapmax-lapmin);
          putpixel(xe,yemax-round(yer),white);         { wsp Lapunowa }
          putpixel(xe,yemax-round(-ymin*w),red);       { y=0 }
          putpixel(xe,yemax-round((1-ymin)*w),green);  { y=1}

      end; {xe}

    {..... os 0Y .......................................................}
    setcolor(red);
    xe0:=round((0-Xmin)/dx);     {xe0= xe : x=0 }
    line(xe0,0,xe0,yemax);
     SetColor(red);
    OutTextXY(XeMax-50,yemax-round((0-ymin)*w)+10,'y=0 ');
    SetColor(blue);
    OutTextXY(XeMax-50,yemax-round((1-ymin)*w)+10,'y=1');
    {....................................................................}
    screenCopy('screen',640,480);
    {}
    repeat until keypressed;
    closegraph;

 end.

{ Adam Majewski
Turbo Pascal 7.0  Borland
 MS-Dos / Microsoft}

Zoom edit

Cycles edit

Points edit

Constants edit

Properities edit

self-similarity, scaling and renormalization edit

  • Feigenbaums Scaling Law For TheLogistic Map [30]


See also edit

software edit

Videos: edit


References edit

  1. FORTY YEARS OF UNIMODAL DYNAMICS: ON THE OCCASION OF ARTUR AVILA WINNING THE BRIN PRIZE by MIKHAIL LYUBICH
  2. Bifurcation and Orbit Diagrams by Chip Ross
  3. math.stackexchange question: what-are-the-lines-on-a-bifurcation-diagram ?
  4. A revision of the Lyapunov exponent in 1D quadratic maps by Gerardo Pastor, Miguel Romera, Fausto Montoya Vitini. PHYSICA D NONLINEAR PHENOMENA 107(1):17 · AUGUST 1997
  5. wiki : Cobweb plot
  6. One-Dimensional Dynamical Systems Part 3: Iteration by Hinke Osinga
  7. wikipedia : histogram
  8. CHAOS THEORY: DEPENDENCE ON PARAMETER R
  9. bat-country by xian
  10. Power Spectrum of the Logistic Map from wolframmathematica
  11. Poincare plot in wikipedia
  12. physics.stackexchange question : Poincaré plane and Logistic Map
  13. The logistic equation by Didier Gonze
  14. May, Robert M. (1976). "Simple mathematical models with very complicated dynamics". Nature. 261 (5560): 459–467. Bibcode:1976Natur.261..459M. doi:10.1038/261459a0. hdl:10338.dmlcz/104555. PMID 934280.
  15. Simple mathematical models with very complicated dynamics by R May
  16. The Logistic Map and Chaos by Elmer G. Wiens
  17. Ausloos, Marcel, Dirickx, Michel (Eds.) : The Logistic Map and the Route to Chaos
  18. Logistic map by M.R. Titchener
  19. khanacademy  ; logistic-map
  20. Lasin - Matlab code
  21. Logistic diagram by Mario Rodriguez Riotorto using Maxima CAS draw package
  22. Double precision errors in the logistic map: Statistical study and dynamical interpretation J. A. Oteo J. Ros
  23. The Logistic Map by A. Peter Young
  24. earner.org textbook
  25. fractalforums.org : what-could-these-artifacts-be-on-my-lyapunov-fractal-renders
  26. calculate lyapunov of the logistic map -LASIN
  27. Invariant Measure Exercise by James P. Sethna, Christopher R. Myers.
  28. Invariant measure of logistic map by todo314
  29. Chip Ross : Bifurcation and Orbit diagrams
  30. demonstrations from wolfram : FeigenbaumsScalingLawForTheLogisticMap