How to determine the frequency of oscillations in system of three ODEs?
Using my EcoEvo package as in my answer here.
First, you need to install it with
PacletInstall["EcoEvo", "Site" -> "http://raw.githubusercontent.com/cklausme/EcoEvo/master"]
Then, load the package and define your model:
<< EcoEvo`;
SetModel[{
Aux[x] -> {Equation :> (x[t] (1 - x[t]) - 2*(x[t] - μ)/(x[t] + μ)*(r*α1*y[t] + q*((α2*z[t])/(1 - z[t]))))/ε},
Aux[y] -> {Equation :> (x[t] (1 + β2*z[t]) - α1*y[t] - ((x[t]*(1 + β1*y[t] + β2*z[t]))/((1 - z[t]) + η*(1 - y[t])))*(1 - z[t]))/ξ1},
Aux[z] -> {Equation :> (x[t]*(1 + β1*y[t]) - (α2*z[t])/(1 - z[t]) - ((x[t]*(1 + β1*y[t] + β2*z[t]))/((1 - z[t]) + η*(1 - y[t])))*η*(1 - y[t]))/ξ2}
}];
Simulate for 40 time steps to get on the limit cycle:
sol = EcoSim[{x -> 0.5, y -> 0.1, z -> 0.3}, 40];
GraphicsRow[{PlotDynamics[sol, x], PlotDynamics[sol, y], PlotDynamics[sol, z]}]
Find the limit cycle using FindEcoCycle
:
ec = FindEcoCycle[FinalSlice[sol]];
GraphicsRow[{PlotDynamics[ec, x], PlotDynamics[ec, y], PlotDynamics[ec, z]}]
Make sure the initial and final values are the same:
InitialSlice[ec]
FinalSlice[ec]
(* {x -> 0.617907, y -> 0.522312, z -> 0.989451} *)
(* {x -> 0.617907, y -> 0.522312, z -> 0.989451} *)
Finally, the period can be extracted as the final time of ec
:
FinalTime[ec]
(* 2.71597 *)
Addendum (2/8/21):
To answer E. Chan-López's question, to find equilibria use SolveEcoEq
.
eq = SolveEcoEq[]
(* {{x -> 0, y -> 0, z -> 0}, {x -> 0.000395349, y -> 1., z -> 1.}, {x -> 0.0279224, y -> 0.06391, z -> 0.881397}, {x -> 0.0279224, y -> 0.124848, z -> 1.08789}, {x -> 0.0279224, y -> 0.988952, z -> 1.00342}} *)
Apparently they're all unstable:
EcoStableQ[eq]
(* {False, False, False, False, False} *)