Modelowanie matematyczne

Zajęcia 2, grupa 16 - 18

f[lambda_,iks_]:=lambda iks (1-iks)

Plot[f[λ,x],{x,0,1},PlotRange->{0,1},GridLines->Automatic,Frame->True]

λ=0.5;
x0=0.22;
ListPlot[NestList[f[λ,#]&,x0,50],PlotRange->{0,1},Joined->True]

Manipulate[GraphicsRow[{Plot[f[λ,x],{x,0,1},PlotRange->{0,1},GridLines->Automatic,Frame->True],ListPlot[NestList[f[λ,#]&,x0,50],PlotRange->{0,1},Joined->True]}],{λ,0,4},{{x0,0.22},0,1}]

Manipulate[GraphicsRow[{Plot[{x,f[λ,x]},{x,0,1},PlotRange->{{0,1},{0,1}},Frame->True,GridLines->Automatic,PlotStyle->Thick,AspectRatio->1,
Epilog->Join[{Thick,Gray},Flatten[{Line[{{#,#},{#,f[λ,#]}}],Line[{{#,f[λ,#]},{f[λ,#],f[λ,#]}}]}&/@NestList[f[λ,#]&,x0,nn]]]],
ListPlot[NestList[f[λ,#]&,x0,50],Joined->True,PlotRange->{0,1}]}],{λ,0,4},{{x0,0.12},0,1},{nn,0,10,1}]

norbit=250;
dlambda=0.01;
ListPlot[Flatten[Partition[Riffle[#1,#2,{1,-2,2}],2]&@@@Table[{NestList[f[λ,#]&,x0,norbit][[170;;-1]],λ},{λ,3,4,dlambda}],1],PlotMarkers->{Automatic,2},GridLines->Automatic]

{{0.22`,0.1716`,0.14215344000000002`,0.12194583949616643`,0.10707505172574164`,0.09560998502367139`,0.08646871578744472`,0.07899187697751482`,0.07275216034908398`,0.06745928351362515`,0.06290852858145349`},1}
Riffle[#,1,{1,-2,2}]&@@%
Partition[%,2]
Riffle[{0.22`,0.1716`,0.14215344000000002`,0.12194583949616643`,0.10707505172574164`,0.09560998502367139`,0.08646871578744472`,0.07899187697751482`,0.07275216034908398`,0.06745928351362515`,0.06290852858145349`},1,{1,-2,2}]

Table[1/(2^k),{k,1,10}]

Show[Histogram[Nest[f[4.,#]&,#,5]&/@RandomReal[{0,1},{100}],{0,1,0.01},"PDF"],Plot[(1/(π(Sqrt[x(1-x)]))),{x,0,1},PlotRange->{0,10}]]

HistogramList[Nest[f[4.,#]&,#,5]&/@RandomReal[{0,1},{100}],{0,1,0.01},"PDF"]