Finding a dense orbit

A computational example

The point behind this notebook is to investigate problem 7 in section 2.13 of our text.

Statement of the problem

We wish to find a number (Subscript[x, 0])∈I=[-2,2] whose orbit is dense in I under iteration of f(x)=(x^2)-2.
  a) Outline and detail a strategy for finding (Subscript[x, 0]).
  b) Find a decimal approximation to (Subscript[x, 0]) that is valid to 10 decimal places.

Solution

Part (a)

Outline: The fundamental ideas are outlined in section 2.7 of our text. Section 2.7.1 defines the doubling map d, section 2.7.2 shows a technique to find a point (Subscript[y, 0])∈H=[0,1) whose orbit is dense in H under iteration of d, and section 2.7.3 shows how to extend results from d to f. What could be easier???

Detail: To find (Subscript[y, 0])∈H=[0,1) whose orbit is dense in H under iteration of d following the strategy outlined in section 2.72, we first enumerate the bits of (Subscript[y, 0]):

0 1 00 01 10 11 000 001 010 011 100 101 110 111 ...

Let’s denote this sequence (Subscript[((Subscript[b, k])), k=1]^∞). Then (Subscript[y, 0]) is simply

(Subscript[y, 0])=(∑_(k=1)^∞)((Subscript[b, k])/(2^k)).

To find (Subscript[x, 0])∈I=[-2,2] whose orbit is dense in I under iteration of f(x)=(x^2)-2, we use the fact that the semi-conjugacy φ(y)=2cos(2π y) maps orbits of d to orbits of f. Thus, (Subscript[x, 0])=2cos(2π (Subscript[y, 0])), where (Subscript[y, 0]) is the number defined above, is the number we seek.

Part (b)

bits = Flatten[Table[Tuples[{0,1},n],{n,1,7}]];
Length[bits]
y0 = N[bits.Table[1/2^k,{k,1,Length[bits]}],1000];
x0 = 2Cos[2Pi*y0];
N[x0,10]

Here’s a reliable picture of the orbit of (Subscript[x, 0]).

Clear[f];
f[x_] = x^2-2;
orbit = NestList[f,x0,1000];
pts = Partition[Flatten[{#,#,#,#}& /@ orbit][[2;;-2]],2];
Plot[f[x],{x,-2,2},
Epilog->{Opacity[0.1],Line[pts]},
AspectRatio->Automatic]