In this subunit we will explore
the bifurcation diagram for the logistical map
further and deeper.
To do so, we will use the web program
to zoom in on different regions of the bifurcation diagram.
Before doing that, I want to remind you
once again a bifurcation diagram is formed.
So, a bifurcation diagram is a collection
of final state diagrams.
So we need to make alot of final state diagrams.
For each of those final state diagrams
in the collection,
we need to choose r
Iteratre for 100 time steps
100 iterations.
Then, we'll plot the next 200 iterations.
Then you will repeat for a bunch of different r-values.
And then, we will want to glue together.
Line up all those final state diagrams
and you will get a bifurcation diagram.
Which, would give you a glimpse
the different behaviors possible of r values.
As, we zoom in to the bifurcation diagram,
to look more closely at some of its structures and patterns.
We are going to change these numbers.
Sometimes we will need to ask the computer
to iterate for more than 100 times.
Maybe a thousand or maybe more.
And other times, for a different reason,
we are going to need to plot than 200 points.
So, this number 100 and 200,
those are the defaults I've been using so far.
But, we need to change these,
when we do our explorations.
So, let's get started and look at the bifurcation diagram
and start zooming in and seeing what we see.
Here is the bifucation diagram program
and I resized both the browser window
and the image size.
So it fits well in the screen,
so let's start zooming in.
The interesting action happens here on the right.
So, I'll zoom in.
And, there is a close up view.
And, I don't know
Let's say I want to see.
What's going on in this region,
here in the middle
Opps. So let's zoom in on that region
And I'll zoom in once more.
So again I'm seeing this motiff, this pattern
We see occur again and again.
But as I zoomed in so much,
in a sense I've lost resolution.
There aren't that many points here.
And the reaon for that is the x range
is now very small.
I'm going 0.78 to 0.488 aproximately.
So I"m seeing just a very tiny slice.
A very tiny proportion of a long final state diagram.
So, for each r value, I've plotted 200 points.
But most of the points fall off the screen,
and they are above an below this little slice.
So I need to do something so I can see more points.
I want to see what the pattern looks like in here.
And so, I'm going to increase the number here.
I'm going to skip 100, but rather than plotting
the next 200 I'll plot the next 2000.
So let me update that.
And pretty quickly I can see the image is alot darker.
That means there is alot more points,
that means I can see the structure.
I can see what's going on there.
So, this affect the image becoming grainy
or losing resolution.
It is if, if you are zooming in on an old
analogue photograph and you literally
run out of resolution.
You start to see individual grains or pixels.
So the strategy here, once you start to zoom in
and lose dots
is to ask the program to plot more dots.
It's important though
when doing the zooms to not ask the program
to plot too many dots too soon.
The reason for that is, is that the slowest part
of the program is the plotting.
and what I mean is the rendering of each
of these pixels on the screen.
That's the slowest step.
The computer when it does its iterations
is a very fast process.
So, here I'm asking the program
to plot 2000 for each R value.
But, it doesn't actually plot 2000 when I zoom in.
Because, most of the iterates for a particular r value
are going to fall outside this narrow interval.
And so, asking it to plot these extra points.
Doesn't slow the program down too much.
So let me illustrate that as follows.
Let's say I got really excited and I wanated it to do
20,000 points.
So calculate 20,000 points and plot them.
This will take a little bit of time,
but still not much.
Let's give it a try.
One, two ,three.
Sot hat took about three seconds.
And by the way this is--
--if I wanted to look at this,
understand the image, this is too many points.
It's a little bit like an overexposed photograph
or something.
But in any event asking it to do all this iteration
it does about 100 r values,
then iterating for another 20,000 intervals took
about three seconds.
And that's because I wans't asking it to plot that many.
Let me go back to--
--let's say I go back to
this image.
If I asked this to do 20,000
it's going to take a long time.
Let's say how long--
--it might take too long.
Let's give it a try.
1,2,3,4.
Alright so that took about four seconds
longer than it did before.
Let me go bak a little bit more.
Let's try this.
I just want a shot.
1,2,3,4,5...
...26,27,28.
That took almost thirty seconds.
So the moral of the story is,
when you zoom in you start to lose resolution
because there aren't enough points plotted.
Because there aren't enough points plotted.
So, you want to ask the program to plot
more points for you.
However, don't ask the program to plot more points
for you until you need it.
Because plotting takes a long time.
And the program will become very slow to work with.
Ok, so as we zoom in, we need to ask the computer
to plot more points.
And we don't want to plot too many points.
We don't want to ask it to plot too many points
too soon.
There is another issue or subtlety that arises
when zooming on the bifurcation diagram
that's the different from losing resolutions,
not having enough points issue.
That I talked about previously.
So let me illustrate this,
and I'll zoom in here.
And see what's going on.
So this is where the bifurcation is from period 2
to period 4 occurs.
And maybe I want to look right in at that point.
Do that.
And we start to see some weird structures here.
Some, I don't this almost looks like feathering
on my screen. I'm not sure what it will look like
on the video.
And so, going back we expect to show
this analytically.
We are going from period 1 to period 4.
We see periodic behavior as a single narrow line.
A single dot on the final state diagram.
But here right here
where the bifurcation occurs
The single point that we would expect to see.
For period 2 or period 4 these single narrow lines.
They fuzz out, the blurr out here.
We can see why that's the case.
Let's go look at the time series plot
for this r-value right here. 3.44568.
So here is the program that makes
time series plots for the logistical equations.
And I want to know what's going on
for the r value 3.55568.
That's where we are starting to see
this surprising fuzz or smearing
in the bifurcation diagram.
So let's make the time series plot
and there it is,
and maybe it's a little hard to see.
But, maybe it's period two. So up-down,
but it's actually period 4.
So there is a little bit of difference
between these two lower points.
And, if I were to, if I were to plot this
on a bifurcation diagram. --Sorry, a final state
diagram.
I would have actually four points.
Two up here. Two down there.
And they will be very close together.
However, in a final state diagram.
which is what bifurcation diagrams are made of
We are interested in the final state
the long term behavior
So, to check let's see what's going on
for larger numbers of iterates.
So again I'm going to see there is
a period of like period 2,
but not quite,
There is a period of wiggle in here.
But, maybe eventually
it is going to become period 2.
Here am I plotting 1000 points.
And this point it's really hard to see
figure.
Let's go down here, and look at just this
last couple numbers.
If I wait for 1000 time steps.
So I have to iterate for a long time.
Then it actually becomes period 2.
I become .44085, .84937, .44085.
It's gone back again in a period two cycle.
So, when r is 3.44568 in the long run
it is really period 2 not almost period 2, but period four.
But in the long run it's a pretty long time.
If I just wait for the 100 iterates.
That we've been doing before.
It looks like period 4, when it actually is period 2.
Another way of saying this is
that the transitory or temporary behavior
for this is very long lived.
It takes a long time to reach the final state.
Another way, yet another way of saying this
that there is a period 2 antractor but
it's not that strong of an attractor,
It doesn't pull in orbits very quickly.
In this case it takes 1000 iterations
in order for the, for the orbit
to reach the attractor.
So, this means that we will have to
plot, have the program
when we do the bifurcation diagram
have the program skip plotting more iterates
in order to see the long term behavior.
So, let's go back
to the bifurcation diagram program.
And see what we can do.
So here we are at the bifurcation diagram
program again.
And, I'm going to change this number here.
So, skip ploting first 100 iterations
instead I'm going to ask it
to skip plotting 1000 iterations.
So what the program will do now
for each r-value
the program will computer 1000 iterates,
then it will plot the next 200 iterates.
So I'm changing the to 1000,
let's update the plot
and all of a sudden we have seen the smugginess
has gone away.
So here we are seeing
this almost period two
but actually period four
behavior as it wiggles around
back and forth
not quite hitting the period two attractor
but if we wait longer
Woops, sorry.
If we wait longer,
then the period two attractor gets reached
and this thing clears itself up
I could however,
zoom in here again
and now again,
I see this smugginess or smearing
And, again this indicates
this again is not reaching an attractor
and I'm going to change this,
so I skip plotting 10,000.
So now we are asking the program to calculate
10,000 iterates for each r value
ignore those and then plot the next 200.
If we do that this is what it looks like.
Again, the smugginess goes away
if we late longer
and we see this the next period two to period four.
So again as we zoom in
on the bifurcation diagram to look
deeper and deeper to prob it's inner structure.
We are going to need to sometimes
ask it to skip more iterations
and sometimes ask it to plot more orbits.
So we will do that in the next video.