<<

Math 2030 Fall 2012

3 Definitions, Applications, Examples, Numerics

3.1 Basic Set-Up Discrete means “not continuous” or “individually disconnected,” dynamical refers to “change over time,” and system is the thing that we are talking about. Thus this course is about studying how elements in some ambient space move according to discrete time steps. The introductory material in this course will involve so-called one-dimensional systems. Nonetheless, we introduce the general notion of a Discrete since it will play a major role later. A Discrete Dynamical System consists of a set X (called the state space) and a map F ( ) (called the dynamic map) that takes elements in X to elements in X; that is, F ( ): X· X. Given a point x X, the first iterate of x is defined by · → 0 ∈ 0 x1 = F (x0). The second iterate of x0 is nothing but the first iterate of x1, and is denoted 2 x2 = F (x1)= F F (x0) =: F (x0). Note that the power of F in the last expression is not a “power” in the usual sense, but the number of times F has been used in the iteration. The  th process repeats, where the k iterate xk is given by

xk = F (xk−1)

= F F (xk−2) . = . 

= F F F(x ) ··· 0   k times  = F k(x ) | {z0 } The of the seed x is denoted by x is defined as the (ordered) collection of all of the 0 h 0i iterates of x0. Notationally, this means

x = x ,x ,x ,... h 0i { 0 1 2 } = F k(x ): k = 0, 1, 2,... , { 0 } 0 where in the last set, F (x0)= x0 by convention. It is helpful to view an iterate x1 as the state that x0 moves to over one “discrete time th th step”. The k iterate xk is the state that x reaches at the k time step. The orbit x is 0 h 0i then all the states that x0 reaches at some time step. This is what is meant by a discrete dynamical system. By “ordered” we mean that the two sets a,b and b,a are considered as different sets { } { } if a = b. On the other hand, repeated elements in the set should be counted only once, 6 1 and so the sets a,a and a are considered as the same set. The following sets are also { } { } considered the same (with a = b): a,b,a , a,b,a,b,a,b,... and a,b . An orbit can be a finite set. 6 { } { } { }

Exercise 3.1. (a) If an orbit x consists of only one element x = x , what is F (x )? h 0i h 0i { 0} 0 (b) Describe precisely when an orbit consists of only finite many elements.

(c) Can the set 1, 2, 3, 1, 3 be an orbit for any dynamic map F : R R? Why or why not? { } →

(d) Suppose an orbit of F ( ) is 1 = 1, 3, 5, 7, 9, 2, 4, 6, 8 . What is the orbit with seed 1 of the map F 2( )? What· abouth i F 3({)? } · · A very important and special kind of orbit is when it consists of only a single element. This can be characterized as a property of the dynamics.

Definition 3.1. Given F : X X, a fixed point of F is a point x¯ X such that F (¯x) =x ¯. → ∈ The main focus of this course is the study of the asymptotic behavior of orbits, and a fixed point gives the simplest kind of behavior because it is always constant. The major underlying issue is to predict what happens to xk when k is very large, and how this depends on the seed x0 and perhaps other parameters. What kind of behavior might one expect? First, an observation:

Observation 1. If y0 x0 , then the eventual behavior of y0 is the same as the eventual behavior of x . ∈ h i h i h 0i 3.2 Applications There is a myriad of applications of both continuous and discrete dynamical systems. We give two very simple ones here, and then give two more theoretical type applications on how discrete dynamical systems can arise in the development of algorithms.

3.2.1 Application in Finance One can describe the change in the amount of money in a bank account (= the state of the system) over time using the discrete dynamical systems. Suppose a bank offers annual interest at r% that is compounded monthly (with r> 0). If the initial amount is $ x0, then r r 2 the amount after 1 month is 1+ 12 x0, after two months 1+ 12 x0, and after k months k 1+ r x . In this case, we have F (x) = 1+ r x, and an explicit formula for the kth 12 0  12  k r k iterate is just F (x)= 1+ x. It is clear that xk as k .  12  →∞ →∞ 

2 3.2.2 Application in Biology A crude way to predict the growth rate of a species is that it is proportional to the size of the population (the more species then the more that can reproduce). Described with discrete time, this means that the new population size after one time period is a multiple of the previous size, say xk+1 = λxk. Again we have a simple description of the entire system since k the size at the kth period is λ x0, where x0 is the initial size. In fact, this model is the same r as the financial model above if λ = 1+ 12 .  3.2.3 Newton’s method Discrete dynamical systems arise naturally in the construction of algorithms. For example, recall Newton’s Method of finding a root of an equation f(x) = 0 (this should have been covered in your Math 1550 class). One can approximate the rootx ¯ of the equation

f(x) = 0 by beginning at some (hopefully) nearby point x0 and defining the iterates

f(x0) xk+1 = xk 0 . − f (xk)

Provided f 0(x) = 0 for all the x’s that come under consideration, this is an example of a discrete dynamical6 system. In this case, the iteration step is not naturally “time”as in the finance and biology examples above, but rather the number of times the algorithm has been iterated. As we study systems in general, it is often helpful to think of it as time nonetheless with each iterate taking one time step. Note that the function F ( ) in this case is given by · f(x) F (x)= x . (1) − f 0(x)

Exercise 3.2. Consider the function f(x) = x2 2, which obviously has roots √2. Use x = 1 as a seed, approximate √2 by using F ( ) as− in (1) and by taking successive± iterates. 0 · How large must k be in order to have xk √2 < .0001? Work this out numerically, say, with Excel - see the next section). | − |

3.2.4 Euler’s method of discretizing differential equations

Given a continuous function f( ): R R and initial value x0 R, an ordinary differential equation has the form · → ∈

x˙(t)= f x(t) for t [0, ) ∈ ∞ (2) x(0) = x0, 

d wherex ˙(t) = dtx(t) is the time derivative of the solution x( ). The theory of Ordinary Differential Equations (ODEs) is an enormous and important subject· (you should be taking a course in it soon, say Math 2090). When f( ) is nonlinear (Math 2090 deals only with ·

3 linear f( )) and continuous, solutions of (2) are known to exist, but can be very difficult if · not impossible to find concretely. A way to approximate a solution is to first fix a (small) parameter h> 0, and then successively “follow the dots” by using the discrete time step h:

x1 = x0 + h f(x0)

x2 = x1 + h f(x1) . . . = .

xk+1 = xk + h f(xk) . . . = .

We then interpolate these data points by defining

h x (t)= xk +(t k h)xk when k h t< (k + 1)h (3) − +1 ≤ which is a piecewise linear function, called an Euler polygonal arc. The reason xh( ) should be “close” to an actual solution of (2) is because whenever kh

h xk+1 xk x˙ (t)= f(xk)= − h

which looks close to (2) if h is small (remember, the sequence xk also depends on h). Here is a picture of approximating the ODE where f(x) = x and x0 = .1. The solution in this case is easy to find, and is x(t)=(.1)et.

3.3 Examples In all the examples of this section, we consider a map F ( ): R1 R1. Some of the · → Mathematica code that generates the graphics below is given in Section 3.5.

4 3.3.1 Linear Examples Actually the two applications of the previous subsection are special cases of so-called Linear Systems, in which F ( ) has the form · F (x)= ax + b (4)

for some constant a and b.

Exercise 3.3. Let F be as in (4). What are teh fixed points of F ? What is the general formula for F k(x)? (The answer should be given in terms of a and b). For what values of a k and b does F (x0) with x0 = 0 have a (finite) limit as k ? (You can peek ahead to the next subsection for all the answers, but it is worth trying→∞ to do yourself first.)

It turns out that just about the only type of dynamics for which there exists an explicit formula for a general iterate are the linear or piecewise linear ones.

3.3.2 The tent map Consider the map 2x if x 1 F x x 2 ( ) = 1 2 1 = ≤ 1 − − (2 2x if x 2 . − ≥

Exercise 3.4. What happens to an orbit with a seed x0 < 0, or with one with x0 > 1? Which orbits remain bounded? That is, for which x0 is it the case that there exists a constant c> 0 so that xk c for all k = 1, 2 ... ? | |≤ 3.3.3 The doubling map This is the map given by 2x 2n if n x < n + 1 D(x) = 2x (mod 1) = − ≤ 2 2x 2n 1 if n + 1 x < n + 1. ( − − 2 ≤ (Here n is any integer.) Notice 0 D(x) < 1 for all x, and it is simpler to consider D defined≤ only on X = [0, 1).

Exercise 3.5. Describe the orbits of the double map for the following seeds: 4 1 2 1 1 1 34 x = − , , , , , , . 0 3 3 3 5 7 64 3

5 3.3.4 The Cantor (or big tent) map We shall in considerable detail study the Cantor map, given by:

3x if x 1 T (x)= ≤ 2 3x +3 if x 1. (− ≥ 2 Although this looks very much like the tent map in 2.2.5, its behavior is almost completely different.

Exercise 3.6. What happens to the orbits when x0 < 0 or x0 > 1? For which x0 will the orbit remain bounded? (The second question is tricky and actually difficult to answer. The set of seeds whose orbits are bounded is called the Cantor mid- dle thirds set, and will be studied in depth later in the course.) 3.3.5 The tripling map In a manner similar to the doubling map, we can consider F (x) = 3x (mod 1).

Exercise 3.7. Draw a graph of the tripling map. For which seeds x0 will the orbit evenetually become 0? That is, for which x0 is it the case that xk = 0 for all large k?

3.3.6 The quadratic family of maps For c a parameter, consider the collection of maps given by 2 Qc(x)= x + c. This is just a very simple quadratic function, but we shall study it in great detail. There is an amaz- ing theory in studying the orbits of Qc for different c values. We could similarly carry out this devel- opment for the that was introduced above in Example 2.2.5, where the same type of properties hold. The parameter enters differently for the logistic family, and is somewhat harder to analyze analytically, so we (following Devaney) will focus mainly on the quadratic family Qc(x) and leave the logistic family as exercises.

2 Exercise 3.8. What are the fixed points for each of the Quadratic Maps Qc(x) = x + c where c = 1 , 0, −1 , 1, 2? Where are these points located on their graphs? 2 2 − −

6 3.3.7 Logistic Maps This is an interesting family of maps that arise naturally in population dynamics, and for which we will study in considerable detail. The family is described by

Lλ(x)= λx (1 x) − where λ> 0 is a parameter. It is an amazing fact that although all these maps “look the same” for all λ > 0, the behavior of them can change con- siderably and with incredible as the parameter λ is varied.

Exercise 3.9. First consider the case 0 <λ< 1. What do the orbits do when .5 1? For which x0 will the orbit remain bounded? Finally, consider the case λ> 4. Are there orbits with 0

xk = λxk(1 xk), +1 − where we can think of 1 as the maximum possible size the population can attain (and if it is achieved that, everyone would immediately die by starvation). This is the discrete dynamical system of the logistic map, where the constant λ acts as the growth rate when the population is small.

3.4 Numerics

OK, so we are interested in the behavior of orbits “in the long run” - what happens to xk k as k , where xk = F (x )? It turns out that under only very special circumstances → ∞ 0 can this be done in closed form. “Closed form” means that a specific formula for xk can be obtained, and from it, then, one can take the limit as k to draw conclusions about asymptotic behavior. → ∞

7 3.4.1 Linear systems The main special circumstance alluded to above is the linear case where F (x)= ax + b for some constants a and b. For given x , we can calculate (at least when a = 1) 0 6

x1 = F (x0)= ax0 + b 2 x2 = F (x1)= F (ax0 + b)= a(ax0 + b)+ b = a x0 + ab + b 2 3 2 x3 = F (x2)= F (ax1 + b)= a(a x0 + ab + b)+ b = a x0 +(a + a + 1)b ......

xk = F (xk−1)= F (axk−1 + b)= ... k−1 k − 1 a = akx +(ak 1 + + a + 1)b = akx + ai b = akx + − b. (5) 0 ··· 0 0 1 a i=0 ! X − k− 1 1 ak We used in (5) that ai = − , a fact that was proven earlier in Section 2. 1 a i=0 X − Exercise 3.10. (a) How many fixed points of F (x)= ax + b are there?

(b) Under what conditions will xk converge to a fixed point? Does this depend on x0? (c) The case a = 1 seems to be very special. Why? First consider when b = 0, and then consider general− b.

The reason we can now analyze the behavior of xk is because we cal let k in (5) →k ∞ and calculate the limit. Recall Theorem 2.1, which says if a < 1, then lim a = 0. So | | k→∞ b assuming a < 1, passing to the limit in (5) gives xk as k , and this does not | | → 1−a → ∞ depend on the initial seed x0!

But what happens for dynamics that are not linear? Let us look more closely at the logistic map F (x) = λx (1 x)with a given λ > 0. Suppose we start at some point x − 0 satisfying 0

x = λx (1 x ) 1 0 − 0 x = λx (1 x )= λ λx (1 x ) 1 λx (1 x ) 2 1 − 1 0 − 0 − 0 − 0    x3 = ??

One quickly sees that the formula becomes very complicated - the formula for x3 is th already an 8 degree polynomial in x0. One cannot reasonably hope to calculate x1000, say, 1000 which is a polynomial in x0 of degree 2 . The question is, though, can we still make a prediction about this value? We shall see that it depends very much on the value of λ (and th to a lesser extent on the seed x0. But the point here is that a formula for the k iterate F k(x) is way too complicated and unwieldy to be of any use, which is one reason we want to use computers to help in the calculations (a calculator could also be used, but I would prefer you not to do so since a calculator is limited in other ways).

8 3.4.2 Excel I hope you have had some experience with Excel, but if not, you certainly have access to it or something similar on your computer. We will use only very (and I mean very!) simple operations, but is worthwhile to do because of the ease with which early entries of orbits can be calculated. We will go over this in class, but the following is some output we would like to see in relation to the Cantor map.

Notice that in the snipped graphic above, the cell B3 is selected, and the string

=(IF(B2<0.5,3*B2,-3*B2+3))

is typed into the function bar. One can then select and copy just this one cell, and past into other cells and the operation is immediately carried out much like an iteration.

3.4.3 The Logistic map Here is a more detailed page that uses Excel for the Logistic map with different values of the parameter of λ.

9 Exercise 3.11. Make your own sheet somewhat like the preceding one. (Notice how we input the function in cell F4, which is what is displayed in the formula bar). What can you see happens for the following value λ = 2.5, no matter what initial seed x0 you use? What seems to be happening at λ = 3.1? And then what about at λ = 4? And at values λ > 4? Experiment with different seeds as well. Does the initial seed always affect the asymptotic behavior?

3.4.4 The Doubling map Recall the doubling map D(x) was introduced in Section 3.3.3 and is given by

2x 2n if n x < n + 1 D(x) = 2x (mod 1) = − ≤ 2 2x 2n 1 if n + 1 x < n + 1. ( − − 2 ≤ Let us simplify our discussion by considering only those x values that belong to [0, 1). It is clear that D : [0, 1) [0, 1), and so we can think of the dynamical system being restricted only to the interval →X = [0, 1). It turns out that one can also give an explicit formula for Dk(x). For example,

4x if 0 x< 1 ≤ 4 4x 1 if 1 x< 1 D2(x)= D(2x) (mod 1) = 4x (mod 1) =  − 4 ≤ 2 4x 2 if 1 x< 3  2 4   − 3 ≤ 4x 3 if 4 x< 1.  − ≤  Exercise 3.12. What is a the formula for Dk (x) for a general k N? ∈ Notice that even with an explicit formula for Dk(x), it is not exactly clear how to to calculate the limit lim x for an arbitrary x0 [0, 1). It is rather confusing, in fact. So let’s k→∞ ∈ explore the numerics, first in Excel. 1 Some of this is rather predictable. For example, in Column E, we use the seed x0 = 3, 2 2 4 1 and see that x1 = 3, x2 = D 3 = 3 (mod 1) = 3 = x0, and the iterates repeat with x3 = x1, x = x , etc. In fact, we can see directly from the definition of D(x) that D 1 = 2 and 4 0  3 3 D 1 = 2 . This means that 1 = 1, 2 , which is an example of a 2-cycle. Let’s see if this 3 3 3 3 3  is consistent with iterating in Excel; if we continue our Excel iterations, what happens to   x45? It starts to break the pattern (which could be seen earlier in the orbit if one uses more than 4 decimal places).

Exercise 3.13. Why does this happen?

3.4.5 The doubling map and binary expansions

1 1 Let I0 = 0, 2 and I1 = 2 , 1 . It is clear that    I I = φ and I I = [0, 1). 0 ∩ 1 0 ∪ 1

10 Thus for each x [0, 1) there exists a unique number s that is either 0 or 1 so that x Is0 . ∈ 0 ∈ That is 0 if x I0 s0 = ∈ 1 if x I . ( ∈ 1 And since D(x) also belongs [0, 1), we can similarly define s1 as the index 0 or 1 of the interval that contains D(x). We can continue this for each k = 0, 1, 2 ... . That is, define sk by k 0 if D (x) I0 s0 = ∈ 1 if Dk(x) I . ( ∈ 1 Exercise 3.14. Show that ∞ s x = k . 2k+1 k=0 n X sk 1 (Hint: Let Sn = and show x Sn < .) 2k+1 | − | 2n+1 k X=0 The sequence consisting of 0’s and 1’s defined above and associated to a number x [0, 1) is called the binary expansion of x. Excel is a convenient tool to calculate and∈ display iterates, but Maple and Mathematica are more powerful and accurate, although it is more complicated to get an attractive display.

3.4.6 Orbits in Maple The ensuing Maple code accepts the following four arguments: (1) a function F , (2) a seed x0, (3) a number skipiter of initial iterations that should not appear in the display, and (4) a number displayiter stipulating how many iterations should be displayed. You should type the following into a Maple Command window and use it to analyze orbits. (I stole this code from somewhere on the web - I forget where...) > maporbit := proc(F, x0, skipiter, displayiter) > local x, k, c, orbit; > x:=x0; > for k from 1 to skipiter do x:=F(x); od: > orbit := array(1..displayiter,1..6); > for c from 1 to 3 do > for k from 1 to displayiter do > orbit[k,2*c-1] := skipiter+(c-1)*displayiter+k-1; > orbit[k,2*c] := x; > x:=F(x); > od: > od: > op(orbit); > end:

11 To use this command in a specific instance, one first needs to define the function F ( ) · that is used for iterating. The following does that for the Doubling function. > Double:= x -> piecewise(x<.5,2*x,x>.5,2*x-1): > maporbit(Double,1/3,1000,10);

3.5 Some Mathematica code 3.5.1 Orbits in Mathematica There is a simple way to do orbits in Mathematica. The code

m[x , c ]:=cx(1 x) − l[0, x , c ]:=x; l[k , x , c ]:=l[k,x,c]= m[l[k 1,x,c],c]; − TableForm[Table[ k,l[k,.4, 4] , k, 210, 220 ], TableHeadings None, Iteration, State ] { } { } →{ { }} produces the output

3.5.2 Time Series in Mathematica

A time series is just the sequence (k,xk) in which we monitor the movement of the orbit { } by plotting xk above k successively as k increases. Mathematica can easily plot the orbit as a time series and manipulate the parameters:

12 which was produced using the code

Manipulate[Graphics[Table[Point[ k,l[k,x,c] ], k, kmin, kmax ], { } { } AspectRatio 1, Axes True], x,.1,.3 , c, 3, 4 , kmin, 1, 200, 1 , kmax, 10, 300, 1 ] → → { } { } { } { }

The values in the graphic are x0 = .1, c = 3.5, kmin = 40, and kmax = 170.

3.5.3 The tent and doubling maps The graph of the tent map (resp. doubling map) was made by

Plot[1 Abs[2 x 1], x, .2, 1.2 , AspectRatio Automatic, − ∗ − { − } → PlotStyle->Thickness[.01], PlotLabel "The Tent Map", → BaseStyle-> FontWeight->"Bold", FontSize→ 14 ] { → } Plot[Piecewise[ 2 x + 1,x<,x< 0 , 2 x, .5 Thickness[.}}01],{PlotLabel− } "The Doubling→ Map", → BaseStyle-> FontWeight->"Bold", FontSize→ 14 ] { → } 3.5.4 The Logistic maps Here is some code to use in Mathematica to study the logistic maps. l(k,x,c) is the kth iterate of the map m(x,c)= cx (1 x). First, define the maps and iteration:−

m[x , c ]:=cx(1 x); − l[0, x , c ]:=x; l[k , x , c ]:=l[k,x,c]= m[l[k 1,x,c],c]; − Here is the way to display the 210 220 iterations of the orbit with x = .4 and c = 3.4. − 0 TableForm[Table[ k,l[k,.4, 3.4] , k, 210, 220 ], TableHeadings None, Iteration, State ] { } { } →{ { }} This lets you manipulate the parameters in the time series graph:

Manipulate[Graphics[Table[Point[ k,l[k,x,c] ], k, 200, 300 ], AspectRatio 1], x,.1,.3 , c, 3, 4 ] { } { } → { } { } Here we graph cx(1 x) for c = 1, 2, 3, 4. − logisticPlot = Plot[ m[x, 1],m[x, 2],m[x, 3],m[x, 4] , x, .2, 1.2 ]; { } { − } Graphics[logisticPlot]

Although they all look the same, their orbit behavior makes dramatic changes when c is around 3.4

13 3.6 Exercises 1. (A shifted absolute value function) Let F (x)= x 1 , and so | − | x 1 if x 1 F (x)= − ≥ 1 x if x< 1. ( −

Describe all the orbits of different seeds associated with this map. That is, given x0, describe x for various values of x . h 0i 0 x3 2. Let Fc(x)= c x . Find all the fixed points of Fc( ) (they will depend on c). − 3 ·   1 3. Write your own Mathematica program that graphs the quadratic maps Qc(x) for c = 2, 0, −1 , 1, 2. 2 − −

4. Consider the logistic map Lλ(x) = λx(1 x). Explore numerically the difference − among the orbits with seed x0 = .2 for the values of λ = 3, 3.4, 3.5, 3.55, 3.6, 3.7, and 4. Use both Excel and Mathematica.

5. Analogous to the doubling map, consider the ten-fold map T en(x) = 10 x(mod1). Con- 1 1 √ sider the first ten iterates of the orbits under T en( ) for these seeds: x0 = 3 , 1000, 2, π,e. In representing the numbers as a decimal expansion,· what relationship do these iterates have with the decimal expansion? Which seeds eventually get mapped to 0?

6. The Hassel family has two parameters λ > 0 and β > 0, and is given by Hλ,β(x) = λx (1+x)β . Graph Hλ,20(x) for the λ values λ = 5, 12, 17, 20. What is the longtime behavior of the respective orbits all beginning at a seed x0 = .1? Conversely, one can fix a value of λ and study the family by varying β. Graph H21.5,β(x) for the β values β = 6, 12, 15, 20. What is the longtime behavior of the respective orbits all beginning at a seed x0 = .1?

14