1
$\begingroup$

I have the following discrete map: \begin{equation} x_{n+1}=μ-x^4 \end{equation} for which I have used manipulate to see the way the system evolves depending on the real parameter $μ$:

Manipulate[
 ListLinePlot[
  NestList[μ - #^4 &, x0, 100],
  PlotRange -> {0, 1},
  ImageSize -> {450, 375}],
 {{μ, 0.8, "parameter μ"}, 0, 4, Appearance -> "Labeled"},
 {{x0, 0.2, "Initial \!\(\*SubscriptBox[\(x\), \(0\)]\)"},
  0, 1, Appearance -> "Labeled"}]

What I would like to do is to show in some way the coordinates on the plot, so that one can see the values of $x$ for which a cycle 2 is defined, a cycle 4 is defined, a cycle 8 and so on. If that is not possible, how could I for example print below the plot, the last 16 coordinates of the 100th iteration in this particular map? (so that one can see the recurrence of the 2,4,8,... points).

Thanks!

$\endgroup$
3
  • $\begingroup$ Do you want to show all 101 coordinates on the plot, or just a select few? Would you be happy if it showed the coordinates for the points when the mouse hovers over them? $\endgroup$ – Jason B. Mar 10 '16 at 11:30
  • $\begingroup$ I would like in particular to always show the last 16 coordinates on the plot. That would do it. Even better if I could somehow extract them and print them below the graph $\endgroup$ – Mitscaype Mar 10 '16 at 11:32
  • $\begingroup$ You are probably aware, but for $\mu$ larger than some value, the calculation aborts in an Overflow error. $\endgroup$ – Jason B. Mar 10 '16 at 11:37
3
$\begingroup$

You could add a TableForm below the plot and combine them via Column

Manipulate[Module[{list = NestList[μ - #^4 &, x0, 100]},
  list2 = list;
  Column[{ListLinePlot[
     list,
     PlotRange -> {0, 1},
     ImageSize -> {450, 375}],
    TableForm[Transpose@{Range[86, 101], list[[-16 ;;]]},
     TableHeadings -> {None, {"point", "x"}}]}]
  ],
 {{μ, 0.8, "parameter μ"}, 0, 4, Appearance -> "Labeled"},
 {{x0, 0.2, "Initial \!\(\*SubscriptBox[\(x\), \(0\)]\)"},
  0, 1, Appearance -> "Labeled"}]

enter image description here

$\endgroup$
3
  • $\begingroup$ Thank you so much! One last question, I can see that the points differ by 0.000013 as pairs. My guess is that this happens due to compiling of some error? $\endgroup$ – Mitscaype Mar 10 '16 at 11:43
  • 1
    $\begingroup$ I'm not sure I see what you mean, which points (by number) differ by that amount? Also, another way to get this list would be to use RecurrenceTable[{x[n + 1] == .8 - x[n]^4, x[1] == 0.2}, x, {n, 1, 101}] $\endgroup$ – Jason B. Mar 10 '16 at 11:50
  • $\begingroup$ Ok, my bad, I did not see clearly the decimal digits above. Again thank you very much for your help, I appreciate it. $\endgroup$ – Mitscaype Mar 10 '16 at 12: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.