This is an extension to a previous question I've posted:
How to extract specific points from NDSolve solution
I would like to find the intersection of the solution given by NDSolve (code below) with curves on the phase space.
f[x_, y_] := -x + 0.1 y + x^2 y;
g[x_, y_] := 0.5 - 0.1 y - x^2 y;
F1 = 0.5;
F2 = x - x^3;
F3 = f[x, y] == 0
sol = NDSolve[{x'[t] == f[x[t], y[t]], y'[t] == g[x[t], y[t]],
x[0] == 0.6, y[0] == 1.4}, {x, y}, {t, 0, 300}];
sp = StreamPlot[{f[x, y], g[x, y]}, {x, 0, 1}, {y, 0.5, 2},
StreamStyle -> Black];
p = ParametricPlot[{Evaluate[x[t]], Evaluate[y[t]]} /. sol, {t, 0,
100}, PlotStyle -> Red];
pp1 = ParametricPlot[{F1, y}, {y, 0.5, 2}, PlotStyle -> Blue];
pp2 = ParametricPlot[{x, 1 + x - x^3}, {x, 0, 1}, PlotStyle -> Blue]
pp3 = ContourPlot[-x + 0.1` y + x^2 y == 0, {x, 0, 1}, {y, 0.5, 2},
ContourStyle -> Blue];
Show[sp, p, pp1, pp2, pp3]
For example: In the figure below I have three curves, the first is a straight line ( was solved in the prevoius answer), the second is a given function, and the third is the nullcline that is obtained numerically.
For each curve, how can I obtain:
- A list of the points at which the solution intersect with the curve.
- A list with the time at which these intersections have occurred.