0
$\begingroup$

Let f(x)=ax(1-x) and I=[0,1]. Then f(I) is contained in I for 0≤α≤4. Take any *x*0 in I and study the iterations *x*1=f(*x*0) etc. Convergence or otherwise around the one or two fixed points (depending on a) is of interest. If a≤1 then convergence is easy. The next case is 1≤a≤2 is harder but straightforward. 2≤a≤3 is also ok but different to the previous case. Now it gets mad. For 3≤a≤4 if a is not too much bigger than 3, then the sequence oscillates between its two fixed points and I can demonstrate this. But for a near 4, it becomes chaotic and defies easy analysis. With x, a as above and n being the number of iterations, I cannot make Manipulate manage all three.The one of particular interest is 'a'. I have read the "With" command but I am not that familiar with it. This is the best I have come up with.

a = 3.5
f[x_] :=  a x (1 - x)
Manipulate[ListPlot[NestList[f, x, n]], {x, 0, 1}, {n, 0, 1000, 1}]

which means I have to change the 'a' manually. I hope I have motivated this problem and it is not so evident that I can find it in the documentation. Thanks.

$\endgroup$
  • $\begingroup$ Maybe you need SaveDefinitions -> True?Like this pictrue. $\endgroup$ – yode Jun 1 '16 at 17:45
  • $\begingroup$ Many thanks. That works provided I action the sliders in the right order. The point is, it gives me what I need. Much appreciated. $\endgroup$ – user48633 Jun 2 '16 at 9:09
2
$\begingroup$

One way to put the whole thing into the Manipulate is to define f as having two parameters, x and a.

f[x_, a_] := a x (1 - x);
Manipulate[
 ListPlot[NestList[f[#, a] &, x, n]], {x, 0, 1}, {n, 0, 1000, 1}, {a, 1, 4}]
$\endgroup$
  • $\begingroup$ Many, many thanks. That's great. I tried something like that but it's the # feature that I'll have to learn. It works perfectly now thanks to you! $\endgroup$ – user48633 Jun 2 '16 at 1:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.