I'm having a problem numerical calculating some separatrices to a dynamic model of housing price and supply. The interpolating function fails to be solved over enough values, resulting in truncated paths. I want paths over a wider range.

The differential equations are


The equilibrium point is

peq = 91300;
seq = 7864;

I find the separatrices by selecting points close to the equilibrium point. For example, the separatrix to the south east is found by solving for the path that goes through (seq+1, peq-1).


I use NDSolve starting at t = -110 because that path goes into the equilibrium point at t = 0.

I plot this with arrows using

ParametricPlot[{s[t], p[t]} /. sepse, {t, -110, 0}, 
PlotRange -> {{5000, 10000}, {50000, 120000}}, AspectRatio -> 1] 
/.Line[s_] :> {Arrowheads[{0., .05, .05, .05, 0.}], Arrow[s]}

See below for the result plotted out (along with the other 3 separatrices), first by themselves, then, in a full phase diagram using StreamPlot.

To sum up, I don't understand why the intepolating function isn't over a wider range. Making the range of NDSolve bigger doesn't seem to help. Are the big and small numbers in sdot and pdot making this problem ill-conditioned? Something else? I want a solution to the path that goes at least to edge of the phase graphs below.

enter image description here

  • $\begingroup$ Related/duplicate: mathematica.stackexchange.com/a/80331/4999 $\endgroup$
    – Michael E2
    Mar 7, 2017 at 20:18
  • $\begingroup$ The interval for t in the linked answer would have to be enlarged a bit to get a long enough curve; WhenEvent stops the solution at the plot boundary. Unless there is some objection, I will mark this as a duplicate of the other. $\endgroup$
    – Michael E2
    Mar 8, 2017 at 12:11


Browse other questions tagged or ask your own question.