Modelowanie matematyczne laboratoria 2

Manipulate[ListPlot[Table[(λ^n),{n,200}]],{{λ,1},0,2}]

Rozwiązanie naiwne nie spełnia naszych oczekiwan. Szukamy lepszego

F[x_,λ_]:=λ x(1-x)

Manipulate[Plot[{x,F[x,λ],F[F[x,λ],λ]},{x,0,1},PlotRange->{0,1}],{{λ,2},0,4}]

NestList[F[#,λ]&,0.1,4]

Manipulate[ListPlot[NestList[F[#,λ]&,x0,nmax],PlotRange->{0,1},Joined->True,Mesh->Full],{{λ,1},0,4},{{nmax,20},10,150,1},{{x0,0.1},0,1}]

Manipulate[GraphicsRow[{ListPlot[NestList[F[#,λ]&,x0,nmax],PlotRange->{0,1},Joined->True,Mesh->Full],Plot[{x,F[x,λ],F[F[x,λ],λ]},{x,0,1},PlotRange->{0,1}]}],{{λ,1},0,4},{{nmax,20},10,150,1},{{x0,0.1},0,1}]

l=3.2;
lista=NestList[F[#,l]&,0.1,100][[-20;;-1]]

Reverse/@Partition[Riffle[lista,l],2]

Flatten[Table[Reverse/@Partition[Riffle[NestList[F[#,l]&,0.1,100][[-20;;-1]],l],2],{l,{1,1.2}}],1]
ListPlot[%]

ListPlot[Flatten[Table[Reverse/@Partition[Riffle[NestList[F[#,l]&,0.1,100][[-30;;-1]],l],2],{l,1,4,0.001}],1],PlotStyle->Directive[PointSize[0.001],Red]]

ListPlot[Flatten[Table[Partition[Riffle[NestList[F[#,l]&,0.1,100][[-30;;-1]],l],2],{l,1,4,0.001}],1],PlotStyle->Directive[PointSize[0.001],Red]]

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

Iter/@RandomReal[{0,1},{100}]

Show[Histogram[Iter/@RandomReal[{0,1},{2000}],{0.01},"PDF"],Plot[(1/(π(Sqrt[x(1-x)]))),{x,0,1},PlotRange->{0,7},PlotStyle->Thick]]

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