0
$\begingroup$

I am trying to plot the Hopf bifurcation of delay system

\begin{eqnarray} &&\displaystyle{\frac{dx(t)}{dt}=r\,x(t)\left(1-\frac{x(t)}{k}\right)-\frac{a\,x(t)\,y(t)}{(x(t)+A)}-E\,q\,x(t)},\\[0.1cm] &&\displaystyle{\frac{dy(t)}{dt}=s\,y(t)\,\frac{1-{y(t-r)}}{x(t-r)+A}}, \end{eqnarray}

where $r=3,a=1,k=100,s=2,A=2,E=0.2,q=0.1$

But I don't know how to do it...any idea!! Thanks

$\endgroup$
  • 1
    $\begingroup$ Do you have a source for these equations? The negative population sizes in @zhk's simulations are a big red flag. I wonder about the interpretation of the predator equation, because predator growth doesn't match the type-II functional response in the prey equation. $\endgroup$ – Chris K Apr 26 '19 at 7:01
  • $\begingroup$ Could it be that the r variable in the second equation is actually the delay tau? r does not seem to have the right dimensions for a time delay in the first equation. $\endgroup$ – Oscillon Apr 26 '19 at 16:23
3
$\begingroup$

This can achieved like this,

Parameter values

a = 1; k = 100; s = 2; A = 2; E1 = 0.2; q = 0.1;

System of ODE's

sol[x0_?NumericQ] := First@NDSolve[{x'[t] == r*x[t]*(1 - x[t]/k) - a*x[t]*y[t]/(x[t] + A)
         - E1*q*x[t], x[t /; t <= 0] == x0, y'[t] == s*x[t]*(1 - y[t - r])/(x[t - r] + A), 
         y[t /; t <= 0] == x0}, {x, y}, {t, 0, 100}];

With delay $r=1$

Block[{r = 1}, ParametricPlot[Evaluate[{x[t], y[t]} /. sol[#] & /@ Range[0, 5, 1]], 
{t, 0, 100}, Frame -> True, PlotRange -> All]]

enter image description here

With delay $r=1$ and a different set of initial conditions

Block[{r = 1}, ParametricPlot[Evaluate[{x[t], y[t]} /. sol[#] & /@ Range[5, 10, 1]],
 {t, 0, 100}, Frame -> True, PlotRange -> All]]

enter image description here

With delay $r=3$

enter image description here

Note: You can also use ParametericNDSolveValue but I am habitual with SetDelay.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.