Given:
$\begin{cases} \dot{x}=-x-By^2 \\ \dot{y}=Ax-y^3 \end{cases}$
where $x,y$ - variables;
$A=[2;4],B=[0.2;2]$ - positive parameters;
My task is to find the time $t_n$ of the first intersection of a variable with zero. I do this with code:
pars = {A = 2, B = 1}
{sol, points} =
Reap@NDSolve[{x'[t] == -y[t] - B x[t]^2, y'[t] == A x[t] - y[t]^3,
x[0] == y[0] == 1, WhenEvent[x'[t] == 0, Sow[{t, x'[t]}]]}, {x,
y}, {t, 15}];
Plot[{Evaluate[x'[t] /. sol]}, {t, 0, 3},
Epilog -> {PointSize[Medium], Red, Point @@ points},
PlotRange -> Full, PlotPoints -> 200]
tn = points[[1, 1]][[1]]
How to build surfaces $t_n(A,B)$ for the specified range of parameters A and B?
x'[t] == -y[t] - B x[t]^2
versusx'[t] == -x[t] - B y[t]^2
$\endgroup$