function y=fun(x,r)
y=r*x.*(1-x);
