Take the 2-minute tour ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free, no registration required.

Context: I'm studying non-linear dynamics with Mathematica.

Part of the problem: Given the following system: $\ddot{x} = x - x^3 - 0.2 \dot{x} + g(\sin(t) + \cos(2t))$, find two values of $g$ that correspond to two marginal circles. I'm not sure whether I translate it correctly. A marginal circle is a closed phase curve that the system tends to when $t\to\infty$.

Here is the code I'm using:

deq = x''[t] == x[t] - x[t]^3 - 0.2 x'[t] + g (Sin[t] + Cos[2 t]);

drawOrbit[deq_, label_] :=
 Module[{tmin = 100, tmax = 1000},
  sol =
    {deq}, {x, x'}, {t, 0, tmax},
    AccuracyGoal -> 10, PrecisionGoal -> 10, 
    MaxSteps -> \[Infinity]];
   {x[t], x'[t]} /. sol, {t, tmin, tmax}, 
   AxesLabel -> {"x[t]", "x'[t]"},
   PlotLabel -> label, PlotRange -> All, PlotPoints -> 1000]]

Grid@Partition[#, 3] &@
  drawOrbit[{deq /. g -> k, x[0] == 0, x'[0] == 0}, 
   "g=" <> ToString@k],
  {k, 0.1, 1, 0.1}]

And this is the produced image:

enter image description here

My question is: Do I just pick two closed phase curves and calculate their orbits or is there more here I am missing ? Also, I suppose that I skip the strange attractors and the marginal circles that have >1 period like the one for $g=0.7$.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.