LogisticMapConjugacy.nb

runIteratedMap := Module[{cobwebDiagram},
nList = Range[0, nIterations];
path = {{x0, x0}};
iterates = {x0};  (* this will give the seqence of iterates *)
x = x0;  (* x is always the current x_n, x0 is unchanged *)
Do[
newx = g[x];
iterates = AppendTo[iterates, newx];
path = Join[path, {{x, newx}, {newx, newx}}];
x = newx,
{nIterations}  (*Do it this many times *)
];
cobwebDiagram = Plot[{g[x], x}, {x, xMin, xMax}, AspectRatio -> Automatic (* y = x is 45° degree line *), PlotStyle ->{Automatic, Dotted}, Epilog -> {PointSize[Large],Point[{x0, x0}],Line[path]}
];
Print@TableForm[{nList, iterates}, TableHeadings-> {{"n", "x_n"}, None}];
Show[cobwebDiagram]
];

g[x_] := 2 x^2 - 1;
x0 = 0.1;
xMin = -1;
xMax =1;
nIterations =1000;
(* Define parameters before running Module *)
runIteratedMap

This g(x) is the Chebyshev polynomial T_2.
You can also check that g^n(x) = T_{2^n} by modifying the cell and running it again.

Plot[{g[x], ChebyshevT[2, x]}, {x, -1, 1}, AspectRatio -> Automatic, PlotStyle -> {Red,{Thick,Dashed, Blue}}]

An early pseudo-random number generator used this map.  The distribution of points in the orbit, however, is not uniform.  The next plot approximates the Cumulative Distribution Function (CDF).

sortedIterates = Sort[iterates];
ListPlot[sortedIterates]

However, if we take the arccos of each iterate, the distribution is uniform.  Here’s the new CDF.

acIterates = ArcCos[iterates];
sortedAcIterates = Sort[acIterates];
ListPlot[sortedAcIterates]

However, this is a very bad random number generator since the next number is predicted from the current number.  Ploting x_{i+1} vs. x_i gives points on the graph of g.

iteratePairs = Table[{iterates[[i]], iterates[[i+1]]}, {i, 1, Length[iterates] - 1}];
ListPlot[iteratePairs, AspectRatio -> Automatic]

The next cell illustrates that the tent map is conjugate to the logistic map.

acIteratePairs = Table[{acIterates[[i]], acIterates[[i+1]]}, {i, 1, Length[iterates] - 1}];
ListPlot[acIteratePairs, AspectRatio -> Automatic]