Modelowanie matematyczne laboratorium 2

Sprawdzamy zachowanie naiwnego modelu rozwoju kolonii drozdzy:

Manipulate[DiscretePlot[(λ^n),{n,200}],{{λ,1},0,5}]

Manipulate[Plot[λ x(1-x),{x,0,1},PlotRange->{0,1}],{{λ,1},0,4}]

Function

l=1;
y0=0.4;
F=N[l #(1-#)]&
AbsoluteTiming[NestList[F,y0,20]]

l=1;
y0=0.4;
F=N[l #(1-#)]&;
NestList[F,y0,20]

Manipulate[GraphicsRow[{
ListPlot[NestList[λ #(1-#)&,x0,nmax],PlotRange->{0,1},Joined->True,Mesh->All],
Plot[{x,λ #(1-#)&[x],Nest[λ #(1-#)&,x,2]},{x,0,1},PlotRange->{0,1},PlotStyle->Thick]}],

{{λ,1},0,4},{{nmax,20},10,100,1},{{x0,0.1},0,1}]

l=3.1;
lista=Table[Reverse/@Partition[Riffle[NestList[l #(1-#)&,0.1,200][[-20;;-1]],l],2],{l,0,4,0.1}];
ListPlot[Flatten[lista,1]]

Reverse[{1,2,3}]

lista=Table[Reverse/@Partition[Riffle[NestList[l #(1-#)&,0.1,150][[-30;;-1]],l],2],{l,0,4,0.001}];
ListPlot[Flatten[lista,1],PlotStyle->PointSize[0.0001]]

Iter[x_]:=Nest[4#(1-#)&,x,60]

RandomReal[{0,1},{20}]
Iter/@%

Histogram[Iter/@RandomReal[{0,1},{5000}],{0.01},"PDF"]

Show[Histogram[Iter/@RandomReal[{0,1},{10000}],{0.005},"PDF"],Plot[(1/(π(Sqrt[x(1-x)]))),{x,0,1}]]

Integrate[(1/(π(Sqrt[x(1-x)]))),{x,0,1}]