Solutions To Homework Assignment 1: 36-462 January 2009
Solutions To Homework Assignment 1: 36-462 January 2009
36-462
January 2009
1. First, note that the derivative of the logistic map is 4r(1 2x). Second,
the stability
criterion is that a cycle x1 , x2 , . . . xp of period p is stable
Qp
when i=1 |f 0 (xi )| < 1.
(a) The fixed points are the solutions to the equation
x = f (x)
For the logistic map,
x = 4rx(1 x)
or
0 = (4r 1)x 4rx2 = x((4r 1) 4rx)
Written in this form, it is easy to see that there are two solutions,
x=0
and
4r 1
1
=1
4r
4r
which of course is only valid when r 0.25.
xf =
(b) To show that the fixed point is stable below r2 and unstable above
it, there are several possibilities. One is to numerically calculate and
plot the derivative at xf as r varies through r2 .
fixed.point = function(r) {(4*r-1)/(4*r)}
logistic.map.derivative = function(x,r) {4*r*(1-2*x)}
stability.logistic.map.fp = function(r) {
abs(logistic.map.derivative(fixed.point(r),r))
}
curve(stability.logistic.map.fp,from=0.25,to=1)
Another possibility is to use the expression for the stability criterion
at the fixed point found above, |2 4r|. (Notice that nothing in the
derivation of that assumed any special properties of r2 .) If 1/4 <
r < 3/4, then 1 < 4r < 3, and |2 4r| < 1. Similarly, if 3/4 < r < 1,
then 3 < r < 4 and 1 < |2 4r| < 2.
(c) We need to locate the 2-cycle. Recall from the slides that the points
on the this cycle need to be solutions of the equation
x = f (f (x))
Explicitly,
x = 4r(4rx(1 x))(1 4rx(1 x))
Writing this out
x =
Now, this is a fourth-order (quartic) equation, which has four solutions. Finding them is tedious but not impossible. However, as
remarked in the class and in the slides, we already know two of the
solutions: they are the fixed points. After all, if x = f (x), then
f (f (x)) = f (x) = x, so fixed points automatically solve the 2-cycle
equation. One of those fixed points is x = 0, and its plain from the
way I wrote the equation above that this is, in fact, a solution. Since
were not interested in that, we can divide both sides of the equation
by x, leaving us with a cubic equation.
1
The other fixed point is x = (4r 1)/4r. This means that the cubic
equation can itself be factored into a linear and a quadratic term1 .
2
4r 1
4r 1 2
4r 1
4r + 1
4r 1
)
0 = (x
)(x +(2+
)x+
2
+
4r
4r
4r
4r
4r
The two remaining solutions, which make up the 2-cycle, are then
given by a quadratic:
!
r
1
(4r 1)2
4r 1
4r 1
4r + 1
x =
2
3
+4
+44
2
4r
16r2
4r
4r
To check that this monster is what we want, lets plot it:
x.cycle.p = function(r) {
0.5*(2 - fixed.point(r)
+ sqrt(-3*fixed.point(r)*fixed.point(r)
+4*fixed.point(r)+4 -4*(4*r+1)/(4*r)))
}
x.cycle.p = function(r) {
0.5*(2 - fixed.point(r)
+ sqrt(-3*fixed.point(r)*fixed.point(r)
+4*fixed.point(r)+4 -4*(4*r+1)/(4*r)))
}
curve(x.cycle.p,from=0.75,to=1,ylim=c(0,1))
curve(x.cycle.m,from=0.75,to=1,add=TRUE)
Rather than plug in to the algebra to determine stability directly
though thats possible! lets use the computer to do it.
stability.lm.2cycle = function(r) {
abs(logistic.map.derivative(x.cycle.p(r),r) *
logistic.map.derivative(x.cycle.m(r),r))
}
curve(stability.lm.2cycle,from=0.75,to=1)
abline(h=1,lty=2)
(The last command draws a horizontal line at 1, for clarity.) This
shows that the stability criterion for the 2-cycle starts at 1, at r =
r2 = 0.75, but then falls below 1 immediately, and stays below 1 until
about r 0.86. To give a more precise value of r4 , we can use the
uniroot function, which solves one-dimensional equations.
uniroot(function(r) {stability.lm.2cycle(r)-1},interval=c(0.85,0.89))
1 See,
(1)
(2)
(3)
for some p, but this is always true, e.g., for p = 360n. So, if is
rational, p is always a multiple of 360 for some p, and so every
point is periodic.
Suppose is irrational. A periodic point would require an integer
p such that p mod 360 = 0. But this would mean that p was a
multiple of 360, so that = 360/p. But then would be the ratio
of two integers, i.e., rational. Hence there can be no such p.
(b) A map is ergodic when time-averages converge on expectations under
the invariant distribution. Or, said differently, the histogram we get
from an individual time-series needs to converge on the histogram
of the invariant distribution. (Look back to lectures 2 and 3.) So
we want to modify the examples of histograms from the individual
logistic map trajectories to get histograms from an individual circlemap trajectory. (This code is also in the accompanying R file.)
# Do one iteration of the rotation map
# Notes:
4
350
300
250
200
0
50
100
150
2000
4000
6000
8000
10000
0.0015
0.0000
0.0005
0.0010
Density
0.0020
0.0025
Histogram of rts
50
100
150
200
250
300
350
rts
> hist(rts,n=101,probability=TRUE)
> abline(h=1/360,lty=2)
Figure 2: Histogram from the time series in the previous figure. The dashed
horizontal line shows the uniform density over the circle.
0.04
0.03
0.02
0.00
0.01
Density
50
100
150
200
250
300
350
0.04
0.03
0.02
0.00
0.01
Density
50
100
150
200
250
300
350
10
0.04
0.03
Density
0.02
0.01
0.00
0
50
100
150
200
250
300
11
350
1.0
0.5
0.5
0.0
ACF
200
400
600
800
1000
Lag
> theta.ts = rotation.map.ts(1e6,runif(1,0,360),alpha)
> acf(theta.ts,lag.max=1000,main="")
Figure 6: Autocorrelations out to lag 1000 from a rotation map time-series of
length 1 million. Since is bounded, if the map were mixing this should be
decaying to zero.
12