0
$\begingroup$

This question already has an answer here:

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

sdot=((3.33502*10^-7)*p[t]^1.8-.036*s[t]);
pdot=(.059*p[t]-(4.2361*10^7)/s[t]);

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).

sepse=NDSolve[{s'[t]==sdot,p'[t]==pdot,s[0]==seq+1,p[0]==peq-1},{s,p},{t,-110,0}];

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

$\endgroup$

marked as duplicate by Michael E2 differential-equations Mar 8 '17 at 15:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Related/duplicate: mathematica.stackexchange.com/a/80331/4999 $\endgroup$ – Michael E2 Mar 7 '17 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 '17 at 12:11