> #

> # Bifurcation Diagram for Logistic Family.

> #

> with(plots):

> f:=(lmd,x)->4*lmd*x*(1-x):

> a:=1/4:b:=1:m:=200:hn:=300:tn:=100:# To run, choose the parameter range '[a,b]' and the number 'm' for parameter points, the number 'hn' for transcient itereates, and the number 'tn' for the actually plotted iterates. I.e., the trunkated number of the numerical orbit is 'hn+tn', but only the tail end 'tn' points are plotted to capture the underlining attractor structure.

> P:=[[a,0]]:for i from 1 to m+1 do lmd:=a+(i-1)*(b-a)/m: x0:=evalf(rand()/10^12): for j from 1 to hn do x0:=f(lmd,x0): od: for k from 1 to tn do P:=[op(P),[lmd,x0]]:x0:=f(lmd,x0):od:od:

> pointplot(P,symbol=point,axes=BOXED);

>