For me, Solve
reports an error until only the right side is extracted (without the derivative) via
eqns =
{x' == -1 - z - 3*y + x^2 - x*z,
y' == (x*z/m[z/y]) - y*(2*z - 4 - x),
z' == -(x*z/m[z/y]) - 2 z*(z - 2)}
and isolating RHS to avoid a "This cannot be solved via the methods available toSolve
" error,
listRHS = eqns /. (lhs_ == rhs_) :> (rhs)
Solve[Thread[listRHS == 0], {x, y, z}]
which together make the seperate definition of f[x,y,z], etc. unnecessary for a moment (which may end up actually being more convenient for you given that Solve
runs seemingly indefinitely).
The reason for this is because some systems never reach true equilibrium (asymptotically for example). You can still get numerical solutions within NDSolve
and track equilibrium, incorporating a threshold in the form of a Method
within the numerical integrator that then Reaps
the just how small the derivatives of your state variables are at that time.
For example if
dstateVariables = {x'[t], y'[t], z'[t]}
then your addition to Sjoerd's answer here (while they are all excellent, his lack of 3rd party functions supports things like PrecisionalGoal
, AccuracyGoal
etc.) would be:
equilibriaThreshold =
10^-11.1; (* Units of state variable input per unit time. *)
equiCond = Total@Thread[Abs@dstateVariablesExplicit];
Method -> {"EventLocator", "Event" -> equiCond < equilibriaThreshold,
"EventAction" :> Throw[end = t, "StopIntegration"]}
Where as you can see, the equilibrium condition achieved in my system (which is the sum of 100+ state variables' derivatives) is damned small , so pretty much zero (steady-state). The Throw
term in the last line tells it to automatically stop the integration automatically once the relative equilibria time is found.
This works with 100+ coupled differential equations within a Manipulate
that isn't too slow. Similarly, I tried using Solve
with the steady-state scenario; a few nine to twelve hour waits while Mathematica populates all 8 GB of RAM were my punishment then.
If you want to begin to format your equations for input into NDSolve, the answer to this may be of interest. In fact, while this was a novice question (& duplicate), in the question, when posting it, I provided the code (mostly found elsewhere) to construct the Manipulate
to vary any physical constants etc. via real-time sliders, which more than encompasses the proper formatting necessary for input into NDSolve
etc. Then, all you've left to do is step through the motions of other answers (such as Sjoerd's linked earlier) to come up with the equilibria.
I just started about four months ago, so it's certainly within your capacity to set this up. If I think of further details I'll update the answer.
:=
and patterns to define functions. Second, without the functionm
, I doubt someone will understand what the issue is. $\endgroup$