November 4, 2004 --- Class 20 --- Continuation of Logistic Map and Chaos Activities: Period Doubling A graphical technique is useful to find fixed points. If we plot y=x and y = f(x,r) then any point of intersection will be a fixed point, i.e., x = f(x,r) If the abolute value of the slope at the fixed point is less than 1, it will be a stable fixed point. We know that when r > 0.75, we no longer have a fixed point. However, if we consider f^(2) = f( f(x,r), r) then this will have a fixed point if f has an attractor of period two. Under the previous notation f( f(x_n,r), r) is what we called x_(n+2) and for an attractor of period two, that would be x_n. Program iterate.c in ~sg will print f^(2) or a higher iterate of f as a function of x for a given r. Usage: iterate r iterations dx where r is the value of r that you desire. iterations is how many times you want the functional mapping iterated, and dx is the spacing between the x values that are printed. You may pipe the output to axis to make the graph. It is also easy to do this with Mathematica. The program iterate.c is an example of a recursive program. The function f at the bottom of the code calls itself. This can be done in C. An example of an iterative solution is the towers of Hanoi problem. This was described. Thanks to Bruce Tepke for giving the reference of George Gamow's book "One, Two, Three, ... Infinity" for a discussion of this problem. Superstable fixed points We know that fixed points of higher iterates correspond to attractors of the corresponding period. It is not that easy to find the r values where we have bifurcations because they correspond to instabilities. However, it turns out that in each range of r, one of the branches of the bifurcation diagram will cross y = 0.5. That means that x = 0.5 is a fixed point of f^(n) (x,r) = x . We want to find out which values of r have 0.5 as a fixed point. We we are trying to find the root of this equation: f^(n) (0.5, r) = 0.5 The program findroot.c uses routines from Numerical Recipes to accomplish this. The routine is called zbrent and may be found in Chapter 9 on Root Finding. This may be used on the homework on problem 6.6. We discussed how to create a polynomial interpolating function to go through n data points. Quadratic interpolation is used in the Brent algorithm, but is used to interpolate x and function of y. The desired x value is the one for which y=0. This results in a complicated, but linear function, for x the next guess at the root. The zbrent routine is useful when you can bracket the root and only want to evaluate the function whose root you want, not its derivative.