Let's use the program to look at the logistic equation for another value of r.
Let's try 3.1.
This is the r value that you worked with in the quiz at the end of the last section,
where I asked you to find the first few iterates for the logistic equation with an r value of 3.1 and an initial condition of 0.1.
Let's try that and see what happens.
Let's scroll down to the orbit or itinerary.
I hope these few numbers look familiar; if you calculated them with a calculator or perhaps a computer program of your own.
The initial condition or seed is point one...
And then we get .279, and .62359, OK
But now, let's look at the long term behavior of this. What's happening in the long run?
The orbit starts to wiggle, and then it seems to settle into a cycle.
To see it a little more clearly, maybe we can plot some more iterates.
Let's look at 50 iterates...
In this view we can see a little more clealy that after some initial transitory phase,
we end up with a period two cycle.
Let's look down at the iterates and we can see that the number is jumping between .55802 and .76457.
So it's a cycle. We call this a cycle of period two because it takes two iterations to complete a cycle.
This behavior is stable; it's attracting.
We can see that, as usual, by trying different initial conditions. Let's scroll down so we can see the plot...
let's try .2: The behavior for the early time is different, but in the long run we see the same behavior,
So different orbits are getting attracted to this cycle.
Let's try something in the middle of the cycle - .66 - let's see what happens then.
Then, instead of wiggling from the out, in; it wiggles from the in, out.
It starts wiggling, and it ends up with the same period two. The numbers we see are the same numbers that we saw before.
Let's try one more; let's try .99, that's always good for some drama.
This is starting the rabbits very close to their doomsday number, the annihilation population...
And again, we see a big crash, but then it grows and again it settles into this cycle of period two.
So this is some new behavior; we haven't really seen this before.
This is a periodic cycle, and it's period two and most importantly, it's stable.
Many orbits are attracted to it, if the population is on this orbit - this cycle of period two - and it moves off it a little bit,
it will return back to it.
Let's summarize the behavior of the logisitic equation for r = 3.1.
We found that there is an attracting cycle of period two,
and the values it cycled between were around 0.56 and 0.76.
It's attracting because nearby orbits are pulled into it.
We can also say that it's stable: If the population was in this cycle and moved a little bit away from it,
it would return back to this cycle.
So, it's stable, just like fixed points are stable.
We can summarize this behavior in our final state diagram as follows:
There will be two dots; 0.56, 0.76. There are two final states here.
If I chose an initial condition, iterated it for a hundred times, and then watched it for a hundred more,
it would be bouncing back and forth between these two values.
I can't really draw arrows on here, like we could for the phase line, because it's moving back and forth.
So instead, in this final state diagram, we are just summarizing the final value or values that the orbits are found in.
Let's experiment with one more r value.
Let's try, instead of three point one, three point five.
I'll choose an initial condition: 0.11.
If I make the time series plot, again we see periodic, cyclic, regular behavior,
and in this instance, the period is not two, but four.
One, two, three, four, and then we're back where we started,
So we would say this is period four because it takes four iterations to complete one cycle.
As before, this behavior is stable, and the easiest way to see this is to try a bunch of different initial conditions.
I'll try some initial conditions, and notice that the long term behavior here doesn't change.
Some of the short term behavior might, but all of the orbits are going to end up in the same place.
Here's a different initial condition; it shifted the phase, but the long-term behavior is the same.
Try .88. Again, we're still seeing period four, the same cycle.
Let's do the dramatic one, point nine nine.
Big crash, fast growth, again we end up with period four.
This program will let you plot a lot of iterates if you want,
So if you wanted to see the really long term behavior, you could do that. Here's two hundred iterates.
The graph gets kind of smooshed together, but again you can see this regular pattern.
One, two, three, four and back to where we started.
We can go down here, and look at the table of numbers, and we can see that it is indeed repeating; the numbers are indeed repeating every four.
So for this r value, we have a stable or attracting cycle of period four.
Let's summarize the experiments we just did on the computer.
We're looking at the logistic equation with r equals 3.5, andd we found an attracting cycle of period 4.
Looking at the orbits - the numbers - we found that it cycles among these numbers.
It's period four, because it takes four iterations to cycle back: One, two, three, four, and then it repeats
It's attracting because nearby orbits are pulled towards it.
Equivalently, it's stable: if the population's on this cycle and gets pushed off of it,
it will return back to this cycle.
Lastly, we can summarize this behavior with a final state diagram,
In this case, there are four final states, because it's cycling among four values.
On my final state diagram, between zero and one, I would have four values, corresponding to the values in the cycle.
One, two, three, four; there they are.
So when r is 3.5, we have an attracting cycle of period four.
So we've seen that the logistic equation is capable of cyclic behavior,
and these cycles are stable or attracting, in the same way that the fixed points we have seen previously are stable or attracting.
Different r values give rise to cycles of different periodicities.
So far, we've seen cycles of period two and period four.
We can tell a story about the period two (or any period) cycle, in terms of the rabbits, if one wanted.
Perhaps one year there are a few too many rabbits and they eat a lot of the food
whatever rabbits eat - grass and rabbit food, I guess - and then the next year, because they ate so much this year,
there's not as much food around, and so the population declines because there are a lot of hungry rabbits.
But then, because there are fewer rabbits, the grass and rabbit food grows back,
So then next year, it's good to be a rabbit, and the population increases.
So we can imagine a cycle of a few too many rabbits, or a few too few rabbits, and that that cycle repeats.
And it's not surprising, I hope, that we're seeing cycles. Cycles are repetitive behavior,
and iteration is about as repetitive as it gets.
We're doing the same thing, applying the same function, the logistic equation with a fixed r value, over and over and over again,
Using the output for one year as the input for the next.
It's not at all surprising, I hope, that we see cyclic and repetitious behavior.
In the quizzes that follow this lecture, you'll get a chance to explore further some of the behaviors that the logistic equation shows.
I strongly suggest you try these explorations before continuing on to the next section.