1

I want to add equilibrium points to the or direction field of the autonomous system $dx/dt=f(x,y)$, $dy/dt=g(x,y)$. For simplicity I assume that f and g are smooth functions. How can I use NSolve to obtain just real valued solutions to $f(x,y)=0$, $g(x,y)=0$, where the solutions are constrained to lie in the window $[x_1,x_2]$ x $[y_1,y_2]$? Then I can plot them on my direction field. Reduce didn't do it for me. Also, I want to avoid the use of StreamPlot, even if it has a option to plot equilibria.

Stephen
  • 1,156
  • 5
  • 12

1 Answers1

1

As posed, the question is too generic to be answered appropriately. In principle you should be able to use NSolve and appropriate constraints, as long as all constants are given appropriate numerical values. Recall that NSolve is a numerical solver, not a symbolic one.

Consider for instance:

With[
 {x1 = -10, x2 = 10, y1 = -3, y2 = 5},
 NSolve[{Sin[x y] == 0, x^2 + y == 0, x1 <= x <= x2, y1 <= y <= y2}, {x, y}, Reals]
]

(*Out: 
{{x -> 0, y -> 0}, {x -> -1.46459, y -> -2.14503}, {x -> 1.46459, y -> -2.14503}}
*)
MarcoB
  • 67,153
  • 18
  • 91
  • 189