Hello and welcome to Unit 5. This is the second of two units on bifurcations. In this unit we'll look at bifurcations for the iterated logistic function. As we've seen, the iterated logistic function is capable of aperiodic behavior and chaos. This behavior will be reflected in the bifurcation diagram. And so the bifurcation diagram for these iterated functions will be more interesting and certainly much more complex than the bifurcation diagrams for differential equations that were the topic of the previous unit. I'll begin by reviewing the iterated function form of the logistic equation and that will lead us into its bifurcation diagram. So let's get started. So here's the logistic equation, or I'll call it now the logistic map, to distinguish it from the logistic differential equation. So this is an iterated function. Here's the function: rx(1-x); r is a parameter going from zero to 4 that will vary. And we'll iterate the function to produce a time series. We can also write that process this way: this says that the next value of x is a function of the current value of x: r times the current value times one minus the current value. And one other thing just to remind you of, is that this equation, the logistic equation, is a very simple formula. It's just a parabola, a second-order polynomial. So if you expand that out, that's what it looks like; not a very complicated function at all. And we can make a simple plot as well. It's just a downward-opening parabola; so about as simple a function as one can imagine. And, as we've seen though, when you iterate it, we can get aperiodic behavior, chaos, periodic behavior, and so on. So let's begin as we did for the logistic differential equation. I'll consider the behavior of this dynamical system for a couple different values of r. We'll plot, not quite a phase line, but something similar to a phase line for each r value. And then we'll imagine gluing those together to produce the bifurcation diagram. For the logistic equation, or the logistic map, we used a web program to plot time series for us. And let's take a look at that time series plotting program again. And we'll try out a couple r values just to remind you how this works. Here's the program that makes time series plots for the logistic equation. Let's use this to make time series plots for three different parameter values, three different r values. So I'll go down here and the first value I'm going to try is 2.9. So I enter 2.9, I ask the program to make the time series plot, and there it is. And we see that the orbit is approaching a fixed point. As we've seen before, this is an attracting fixed point. It takes a little while to get there, it wiggles back and forth, but we can see it getting closer and closer to this value. And if I look at numbers, it's going to around .65, .66; something like that. So for 2.9, we have an attracting fixed point. Next, let's try 3.2. So I'll go back here, enter a different parameter value, 3.2, and let's make the time series plot; there it is. And here we see a cycle. It's periodic with period 2, and it looks like it's going between .8 and maybe a little more than .5; we can check the numbers and look. And indeed, it's going between .799, about .8; and .51. So for this r value, when r is 3.2, we see periodic behavior with period 2. Let me try one more, and I'll do 3.8. So I'll go up here and I'll enter 3.8, make the time series plot, and it's a little hard to see what's going on here. It's not quite periodic; maybe it wants to be periodic but hasn't found the period yet. So in order to be sure, to see what's going on, I'm going to plot more iterates. Instead of 40, let's plot 200 and see if it becomes periodic or not. So in this view we can see that the orbit is aperiodic. It's not settling down into any cycle and it seems to range from a little bit below .2, maybe .18 is the minimum, and about .95 or a little bit more. So it doesn't fill up the entire interval; it doesn't make it down here, it doesn't make it to the very top. Let me plot - just to see this a little more vividly - I'll do a thousand; this might take a second. There it is. So again, we can see the orbit bounces all around. It's not becoming regular. And the minimum is about 0.18 or so, and the max is probably 0.96, 0.97. So... for this r value, the orbit is aperiodic. For a given r value, we can summarize the behavior of the logistic map with a graphical device called a final state diagram. And I introduced these in Unit 3, but I thought it would be good to review them quickly now. So this was the first r value that we experimented with on the website; r is 2.9. And we said there's a fixed point here at about .65 or .66. So I can draw that, as follows. So let me draw the line for the phase line and I'll use this to get it straight. So I'll just draw that as a line. And the idea is that this is zero and that's 1. And there's a fixed point at 0.66 so that's going to go, I'll go over halfway, and maybe a little bit more, and I'll put a single dot there. And this would be - make a note - this is r is 2.9. So I'm just interested in the long-term behavior; that's why we call these final state diagrams. And I could imagine I could run the program for 40 times, maybe for 400 times, and then I could plot the next 100 points that would appear in the orbit. And in this case, those 100 points would all be the same, they'll all be at the fixed point. So they'll just be one single point in the final state diagram. Let's do the same thing for r=3.2. Here, there's a cycle between .8 and .55 or so. So let me draw the line for the final state diagram. There it is. And this time I've got two final state values: .8 and .55. So I'll draw these; go halfway and a little bit more, and then maybe there. So those might be my two values; this is r=3.2. And again, a way to think about the procedure for this is, we might run this for 40 or 400 or even 4,000 times if we wanted, and then plot the next hundred points. And this time the next hundred points would just be oscillating back and forth between these two values. So that would appear as just two dots here on this line. So that would be the final state diagram for r=3.2. And lastly, let's... think about a final state diagram for r=3.8. This is an aperiodic value. And let me draw the line for the final state diagram. (I'm using this index card so that all the lines are the same size.) Okay, so now, let's see, I'll write r=3.8. And now we see all the dots are more or less filling up all the numbers between about 0.18 and 0.96. So we could do this plot for 2,000 or 20,000 times, and then plot the next several hundred in the orbit. And this orbit would keep bouncing around between these two values. And so, in between those two values, the line would fill up with dots. So let me draw that. The largest value is going to be about over here. The smallest value, .18, maybe that's around here. And then I would just fill this segment up with dots. (Filling it up with dots.) Okay, so the final state diagram might look something like this. and I would interpret this, if I saw this as a final state diagram, I'd say, "Ah, okay. It's not settling down. The orbit is not becoming periodic. If it was periodic, there would just be two or four, or however many the period was, dots here. But the fact that this gets filled up, and appears solid, is an indication that the orbit is aperiodic. I should mention that, if I were to run this for a really long time, I wouldn't fill up all of the numbers between .18 and .96 or whatever these are, because there are an infinite number of numbers between my fingers right now on the number line. In fact, there's an uncountable infinity. And the number of points in an orbit, even an infinite orbit, would be countable. So it's not that the interval gets completely filled up in the literal sense. But the dots, if we were to draw them with any sort of finite thickness, any nonzero thickness, would appear to just end up being a solid smudge of points. So these are the... final state diagrams for three different r values. They're like phase lines but they're different because they don't have arrows on them. And the reason they don't have arrows is that, unlike for differential equations, for these iterated functions there can be oscillations. So this one for 2.9, it wiggles back and forth. So it overshoots, undershoots, overshoots, undershoots. So anyway, we're just drawing the final states; we're not putting arrows on them. So before I go on, I would recommend doing the next quiz, which is, I'll have you practice drawing some final state diagrams for a few different r values. It should be pretty quick and I'll just make sure your brain is back in the gear, back in the mode, of thinking about the discrete logistic equation. So give those a try, and then we'll put these lines together and make a bifurcation diagram.