This worksheet iterates the function f(x)=rx(1-x).
It plots the graph of the 4-th iterate of f on the interval [a,b].
So if n=4, then we plot the graph of f composed with itself 4 times. (The process g is the power f^n.)
You can use the graph to guess a point of period 4. Note that the deriviative of f^4 is
positive at points of period 1 or 2, and negative at the points of period 4.Let x0 be the value of this guess for a period-4 point. Then the Newton's map gets a better approximation of the period-4 point by iteratingN n1 = 10 times.
Let x1 be the outcome of iterating Newton's method. How many iterates of N were necessary to get a solution to 8 decimal places.
Finally, the first n2 = 16 iterates of x1 by f are calculated to get the rest of the orbit.Note that the fourth iterate is not exactly equal to x1 since x1 is on a repelling periodic orbit.with(plots):r := 3.6:
n := 4:
a := 0.0:
b := 1.0:f := x -> r*x*(1-x):g := proc(x)
local y,i :
y := x:
for i from 1 to n do
y := f(y):
od:
y;
end:pic := {plot(g(x),x=a..b, resolution = 2000)}:
pic := pic union {plot(x,x=a..b)}:display(pic);Calculate the derivate of g(x) = f^n(x) using a loopdfn := proc(x)
local s,z,j:
z := x:
s := r - 2*r*z:
for j from 1 to n-1 do
z := f(z):
s := s*(r - 2*r*z):
od:
s;
end: Calculate the Newton map associated with g(x) - x = f^n(x) -x N := proc(x)
local y:
y := x - (g(x)-x)/(dfn(x)-1):
y;
end:Make a guess for the point of period 4, x0 = .
n1 is the numer of times that the Newton iteration process will be taken.x0 := ;
n1 := 10;printf(`\t k \t\t xk \n`);
printf(`\t 0 \t %1.8f \n`, x0);
for k from 1 to n1 do
x0 := N(x0):
printf(`\t %d \t %1.8f \n`, k, x0);
od:You should be able to see the point of period 4 in the above output.
Take one of those points and use it to define x1 below and then check thatthis point approximates a period-4 point by calculating the first n2 = 16 iterates byf and checking that the point repeats (approximately) every 4 iterates.n2 := 16:
x1 := :
printf(`\t k \t\t xk \n`);
printf(`\t 0 \t %1.8f \n`, x1);
for k from 1 to n2 do
x1 := f(x1):
printf(`\t %d \t %1.8f \n`, k, x1);
od: