0

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,

Thanks.

rhermans
  • 36,518
  • 4
  • 57
  • 149
AtoZ
  • 471
  • 2
  • 6
  • 1
    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}] – kglr Jun 30 '18 at 06:20
  • @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! – AtoZ Jun 30 '18 at 07:32
  • AtoZ, right. Re bifurcation diagrams using Mathematica see this post by Mark McClure. – kglr Jun 30 '18 at 07:48
  • 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 – rhermans Jun 30 '18 at 10:25
  • What variables do you want on the x- and y-axes of your bifurcation diagram? – Chris K Jun 30 '18 at 13:22
  • 1
    @kglr I think that post by Mark McClure is more for discrete-time difference equations vs. differential equations as here... – Chris K Jun 30 '18 at 13:23
  • @ChrisK yes that post by Mark McClure doesn't seem to be of much help. I want to see bifurcation behavior between γ which is the local strength vs energy (ω), x-axis will be ω and y-axis will be γ. Then this Subscript[ϵ, 1] will have an effect on the bifurcation which I want to see. Actually for stationary case the energy is (ω-w) and for that I have the bifurcation diagram which is just straight lines, but this bifurcation diagram will be interesting.. I am actually very new to Mathematica so unable to plot this. – AtoZ Jul 01 '18 at 03:28

0 Answers0