0
$\begingroup$

I am looking at the following plot:

ClearAll[x, y, t, q, d]; 
ode1 = y'[t] == 1 - d x[t] - (3 + 2 q) y[t]; 
ode2 = x'[t] == 1 - q y[t] - (3 + 2 d) x[t]; 
ic = x[0] + y[0] == 1 
sol[t_, d_, q_, x0_, y0_] = 
  {x[t], y[t]} /. 
     (First @ DSolve[{ode1, ode2, x[0] == x0, y[0] == y0}, {x[t], y[t]}, t]) 
Manipulate[
  ParametricPlot[
    Evaluate @ Table[sol[t, d, q, .25, .75], {d, {0.1}}, {q, {0.9}}], 
    {t, 0, k}, 
    PlotRange -> {{0, 1}, {0, 1}}, 
    FrameLabel -> True, 
    Frame -> True, 
    AxesLabel -> {"x[t]", "y[t]"}], 
  {k, .1, 400}]

But I get a blank plot. What is going on here?

Note: my Mathematica is new, and I get a graph on the online version, but it is very unresponsive.

$\endgroup$
  • $\begingroup$ Choose initial value for k to be small enough, but not 0 exactly, say {k, 0.01, 400}. It is impossible to plot from 0 to 0, so MMA complaints. For me Manipulate very smooth when I move slider. And use FrameLabel if you use Frame -> True. About solving ... it is transcendental equation and can't be solved in symbolic closed form. $\endgroup$ – Alx Jul 29 at 14:41
  • $\begingroup$ Now I am working with ClearAll[x, y, t, q, d]; ode1 = y'[t] == 1 - d x[t] - (3 + 2 q) y[t]; ode2 = x'[t] == 1 - q y[t] - (3 + 2 d) x[t]; ic = x[0] + y[0] == 1 sol[t_, d_, q_, x0_, y0_] = {x[t], y[t]} /. (First@ DSolve[{ode1, ode2, x[0] == x0, y[0] == y0}, {x[t], y[t]}, t]) Manipulate[ ParametricPlot[ Evaluate@Table[sol[t, d, q, .25, .75], {d, {0.1}}, {q, {0.9}}], {t, 0, k}, PlotRange -> {{0, 1}, {0, 1}}, FrameLabel -> True, Frame -> True, AxesLabel -> {"x[t]", "y[t]"}], {k, .1, 400}] $\endgroup$ – EverythingEnds Jul 29 at 14:52
  • $\begingroup$ On my online version, it is very laggy, on my personal copy, the graph does not generate $\endgroup$ – EverythingEnds Jul 29 at 14:53
  • $\begingroup$ I just get a blank graph $\endgroup$ – EverythingEnds Jul 29 at 14:54
  • $\begingroup$ I edited the question accordingly $\endgroup$ – EverythingEnds Jul 29 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.