My code is the following

Subscript[ϵ, 1] = 0.5;
Subscript[ϵ, 0] = 2;
ω = 2;
γ = 1;

sol = NDSolve[{Sqrt[-1]*
     x'[t] == ω*x[t] - γ*x[t]*Abs[x[t]]^2 - 
     Subscript[ϵ, 0]*y[t] - 
     Subscript[ϵ, 1]*Abs[y[t]]^2*x[t], 
   Sqrt[-1]*y'[t] == ω*y[t] - γ*y[t]*Abs[y[t]]^2 - 
     Subscript[ϵ, 0]*x[t] - 
     Subscript[ϵ, 1]*Abs[x[t]]^2*y[t], x[0] == 2, 
   y[0] == 0}, {x[t], y[t]}, {t, 0, 100}]

{x[t], y[t]} /. sol[[1]]

ParametricPlot[Evaluate[{x[t], y[t]} /. sol[[1]]], {t, 0, 100}]

It gives me only a frame for the plot but no plot, I don't know what is missing?. I actually want to draw a bifurcation diagram. I would highly appreciate if someone could additionally help with any other fancy way to draw a bifurcation behavior corresponding to this set of nonlinear coupled equations. Any help is much appreciated,


  • 1
    $\begingroup$ try ParametricPlot[Evaluate[Re@({x[t], y[t]} /. sol[[1]])], {t, 0, 100}] or ParametricPlot[Evaluate[ReIm@({x[t], y[t]} /. sol[[1]])], {t, 0, 100}] $\endgroup$
    – kglr
    Jun 30, 2018 at 6:20
  • $\begingroup$ @kglr: Thanks it works. So essentially the first means only plot for real modes, and the second for both imaginary and real ones? Secondly, I was wondering if there is another way to plot the bifurcation behavior. would be really nice to understand what is actually happening. Thanks once again! $\endgroup$
    – AtoZ
    Jun 30, 2018 at 7:32
  • $\begingroup$ AtoZ, right. Re bifurcation diagrams using Mathematica see this post by Mark McClure. $\endgroup$
    – kglr
    Jun 30, 2018 at 7:48
  • $\begingroup$ You should avoid using Subscript while defining symbols (variables). Subscript[x, 1] is not a symbol, but a composite expression where Subscript is an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doing Set[Subscript[x, 1], 2] which is to assign a DownValues to the operator Subscript and not an OwnValues to an indexed x as you may intend. Read how to properly define indexed variables here $\endgroup$
    – rhermans
    Jun 30, 2018 at 10:25
  • 1
    $\begingroup$ @kglr I think that post by Mark McClure is more for discrete-time difference equations vs. differential equations as here... $\endgroup$
    – Chris K
    Jun 30, 2018 at 13:23


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.