1
$\begingroup$

The function is

f[x_, a_] := Piecewise[{{x (1 + a - a*x), x <= 1/2}, {x (1 - a + a*x), x > 1/2}}]

How to make the bifurcation graphic of it? What information may I take from the diagram?

$\endgroup$
  • $\begingroup$ We need an equation not a function. Is this a difference equation or differential equation? $\endgroup$ – Chris K Jul 26 at 8:29
  • $\begingroup$ Ok the difference equation the following: x_{n+1}=f(x_n,a) $\endgroup$ – Javohir Usmonov Jul 26 at 8:47
  • $\begingroup$ What are the ranges of $ x $ and $ a $? $\endgroup$ – Αλέξανδρος Ζεγγ Jul 27 at 9:18
5
$\begingroup$

In general you need a DE or a recurrence relation to generate a bifurcation diagram. For example, the logistic map is:

x[n+1]=r x[n](1-x[n])

Check logistic map at Mathworld: Logistic map

Here is code to generate the bifurcation diagram for the logistic map:

  ListPlot[Table[
  Map[{r, #} &, 
   DeleteDuplicates[
    SetPrecision[
     Take[RecurrenceTable[{x[n + 1] == r x[n] (1 - x[n]), 
        x[1] == 0.6}, x, {n, 1, 100}], -20], 5]]], {r, 1, 4, 
   0.001}], PlotStyle -> Black]

logistic map

$\endgroup$
4
$\begingroup$

This is my answer after guessing the ranges of $ x $ and $ a $:

data = Flatten[Thread /@ 
               ParallelTable[
                             {a, DeleteDuplicates[Chop@FixedPoint[x \[Function] f[x, a], #, 1000] & /@ Subdivide[0., 1., 100]]}, 
                             {a, 0, 2, .001}
                            ], 
               1];

where, to speed up the calculation, I use the parallel version of Table. One can further make it faster by defining a compiled version of f using Compile, I suppose.

Then make the figure:

ListPlot[data, PlotTheme -> {"Scientific", "SansLabels", "LargeLabels"}, FrameLabel -> {"a", "x"}, PlotStyle -> {Blue, PointSize[.0002]}]

enter image description here

$\endgroup$

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.