This worksheet iterates the function f(x)=rx(1-x). It plots the graph of the n-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. It also allows plot the graphical representation of iterates of f^n for the initial condition x0. (The process g is the power f^n.) The first n*n0 iterates of f are taken without plotting, then the next n1 iterates of f^n are plotted. If n0 or n1 =0 then this is not done. n iter of f plotted x0 initial condition n0 number of iterates of x0 taken by f^n without plotting n1 number of iterates of x0 taken by f^n which are plotted with(plots): r := 4.0: n := 3: n0 := 0: n1 := 0: a := 0.0: b := 1.0: x0 := 0.1: 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,thickness=3, color=black,tickmarks=[2,3])}: pic := pic union {plot(x,x=a..b,thickness=3, color=black,tickmarks=[2,3])}: for i from 1 to n0 do x1:= g(x0): x0:=x1: od: for i from 1 to n1 do x1:= g(x0): pic := pic union {plot([[x0,x0],[x0,x1],[x1,x1]], color = blue)}: x0:=x1: od: display(pic);