In this video, I'll show you how to use a web program, to make bifurcation diagrams for the logistic equation. But before we look at that program, there are a few things about final state diagrams that I want to highlight. So first, let's go back to the parameter r = 2.9 and I drew the final state diagram, like so. There's a single attracting fixed point. It's around 0.65, so I draw it there. So, as a practical matter we need to tell the computer two things. We're interested in the final state, so we want it to not plot the first 20, or 40 or even 100 or 200 values in the orbit since we're interested in the long term behavior. We don't care about the short run, so we need to tell it how many iterates to ignore, and then once we think we're in the long run, when we're at time 100, or 200, or 300, then we need to tell the program how many points to plot. Here that seems almost silly, there's just one point, so we will only need to plot one. But in general, we don't know what the final state is, and so we'll need to tell the computer to plot a bunch of points so we understand what the behavior is. For example, if, instead of 2.9, we had an aperiodic value, here again I would tell the computer to iterate 400 times, say, and then maybe plot the next 100. If I plotted just the next 3 or 4, I wouldn't see that the orbit was really periodic. So the two things that we need to tell the computer: how many iterates to ignore, i.e. iterate, but don't plot, and then, how many iterates to plot, once you've ignored the ones you're going to ignore. And then lastly, we'll need to repeat this process for many, many different r values, and then put them all together to make a bifurcation diagram, like this. And so, we'll need to tell the program what r value to start at, what r value to end at, and how many intermediate r values to do the numerical experiment to make the final state diagram that then gets smooshed together to become the bifurcation diagram. So, let's take a look at the program and see how it works. So here's the program that will plot bifurcation diagams for you. You can find the link to this program right underneath this video on the Complexity Explorer site, and at the end of this unit, I've made a separate sub-unit, a separate page, that has a link to this program, and the other two programs from Unit 3. And there's also a zip file that you can download, so you can run these programs on your own computer and they'll work even if you're not connected to the internet. So let me show you some of the basic features of this program, and in subsequent videos, we'll explore more deeply. So, here it is, the bifurcation diagram for the logistic map, and I'd suggest you might need to resize your window, the overall browser window, so it fits well on whatever computer you're working on. One thing you can do is you can change the size of the plot, how big it is on your screen. And in order to make it fit a little better, I'm going to make it a little bit smaller. I'm going to change the width to 500, and the height to 250, and I'll click on 'Update Plot'. And now, it fits a little better in the screen. I guess I can make it a little bit bigger. Let's do this.... Ok, so here's the bifurcation diagram, it goes from zero to four. So, one thing to note is that if you put the cursor in the plot, it will show you the co-ordinates, where your cursor is. So for example, right now the cursor is at an r value of 2.91, and an x value of 0.65 and notice that those values change as I move around. So if you want to know the co-ordinates, the r value and the x value for a particular point, you can do that just by moving the mouse over there. Alright, so in order to make this bifurcation diagram, the program starts by iterating the seed 0.5, and the seed you put in doesn't really matter, but you can change it if you want, to see if it looks different, and then it will iterate, how it is now, for 100. So we'll skip plotting the first 100, and then it will plot 200, and those are numbers that we can change, and we'll do that in later videos. Alright, so let's see how we can use this to zoom in. So you could zoom in by changing the min and max x and r's, but it's more fun and much quicker to just highlight a region with a mouse. So here I've highlighted this box in blue, and then if I do 'Update Plot', it shows me a zoomed-in version of what was in that box and you can go back, I'm going to click on the back button, and it will show you the box that you just entered, and then forward zooms in there. And I can zoom in again, let's say I want to zoom in here, and then I 'Update Plot'. And I can move back, and forwards through the plot. Let's zoom in one more time, let me zoom in on this region. 'Update Plot', there it is, and we can see bifurcations, so this is some sort of a period down in the bifurcation. This splits into two, each of those split into two, and so on. So we see the same general shape appearing again and again and again. And once you have a bunch of rectangles selected, you can move through them backwards and forwards. So let me zoom in here. This is the bifurcation diagram now from about 3 up until 4, and let me zoom in on a different rectangle. I'm going to zoom in here. So I'll do that, 'Update Plot', and notice what's going on in here. So we have this more or less solid dark region. That indicates that the orbits are aperiodic. They're filling up an entire interval. But then here we have what's called a periodic window. So, where my cursor is now, is period 5. 1, 2, 3, 4, 5. Let's figure what the r value is for that. I'll move the cursor here, and I see, looking at the lower right, that the r value is about 3.739 / 3.74, and that was one of the r values that you explored in one of the quizzes, earlier in this unit. So this is a period 5 window. Let's zoom in here just for fun. 'Update Plot'. We can see that same period doubling structure again. Let me go back, and let me zoom in here. This is another periodic window. This one is period 123. 1, 2, 3. The r value in this region is about 3.84, and that's also an r value that you've explored previously. We'll go back again. Here is the logistic equation from about 2.9 to 4. Let me zoom in on this large region here. And so we can see that the regions of chaos, that's when we have a ... if you were to go straight up, it would be a more or less solid collection of dots, indicating an aperiodic orbit. It's filling up an interval. But in these regions of chaos, we see lots of windows of periodicity. Again, these are known as periodic windows. Let's look at just one more. Let's see what this window is. 1, 2, 3, 4, 5, 6, 7. So here's a region of period 7, the small little region at about 3.702. And let me go back. So this program will let you make bifurcation diagrams for the logistic equation, and you can zoom in and out, and one of the things to notice, and we'll talk lots more about this in this unit and the next, is that we see this period doubling pattern appearing again and again, and also in regions of chaos, we see lots of very small periodic windows. So in the next unit I'll talk a little bit more about some of the features of this program and we'll dive, literally, deeper into the bifurcation diagram.