xset("window",0);xbasc();
xset("font",2,3);
//
plotframe([0,0,1,1],[0,1,0,1],[%f,%f],["(a) f(x)=4x(1-x)","x","f(x)"]);
deff("y=f(x)","y=4.*x.*(1-x)");
x=[0:0.01:1];
plot2d(x,f(x),1,"000");
plot2d(x,x,1,"000");
x0=0.2;
plot2d([x0,x0],[0,f(x0)],2,"000");
for i=1:50,
   x1=f(x0);
   plot2d([x0,x1],[x1,x1],2,"000");
   plot2d([x1,x1],[x1,f(x1)],2,"000");
   x0=x1;
end;  
//
v(1)=0.3248;
for i=2:1000,
  v(i)=f(v(i-1));
end
//
xset("window",1);xbasc();
xset("font",2,3);
//
plotframe([0,0,1000,1],[0,1,0,1],[%f,%f],["(b) valeurs des iteres","n","u(n)"]);
plot2d([1:1000],v',0,"000");
//
xset("window",2);xbasc();
xset("font",2,3);
//
plotframe([0,0,1,3],[0,1,0,0],[%f,%f],["(d) histogramme","u","frequence"]);
histplot([0:0.1:1],v,1,"000");
//
xset("window",3);xbasc();
xset("font",2,3);
//
plotframe([0,0,1000,1],[0,1,0,1],[%f,%f],["(c) ","n","valeurs triees"]);
tri=gsort(v,"r","i");
plot2d([1:1000],tri',0,"000");
//



