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.
ParametricPlot[Evaluate[Re@({x[t], y[t]} /. sol[[1]])], {t, 0, 100}]
orParametricPlot[Evaluate[ReIm@({x[t], y[t]} /. sol[[1]])], {t, 0, 100}]
$\endgroup$ – kglr Jun 30 '18 at 6:20Subscript
while defining symbols (variables).Subscript[x, 1]
is not a symbol, but a composite expression whereSubscript
is an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doingSet[Subscript[x, 1], 2]
which is to assign aDownValues
to the operatorSubscript
and not anOwnValues
to an indexedx
as you may intend. Read how to properly define indexed variables here $\endgroup$ – rhermans Jun 30 '18 at 10:25