[Maxima] plotdf trouble

Jaime Villate villate at fe.up.pt
Fri Aug 15 08:27:21 CDT 2008

```On Wed, 2008-08-13 at 21:34 -0300, tyler wrote:
> However, following examples don't work, and I don't know why not. They
> do generate vector fields, but they indicate that n2 is always at
> equilibrium, which is at odds with my hand calculations:
>
> (theta : 1000, c : 0.01, a : 1, E : 0.0005, Z : 0.001);
> eq1: theta - a * c * n1 * n2;
> eq2: E * a * c * n1 * n2 - Z * n2;
> plotdf([eq1, eq2], [n1, n2], [n1, 0, 4000], [n2, 0, 4000]);
>
> (r : 1.1, c : 0.01, a : 1, e : 0.0005, s : 0.001);
> eq1 : r * n1 - a * c * n1 * n2;
> eq2 : e * a * c * n1 * n2 - s * n2;
> plotdf([eq1, eq2], [n1, n2], [n1, 0, 100], [n2, 0, 100]);

I do not see anything wrong with the plot made by plotdf. You have to be
careful when you interpret a direction field. In this case the fact that
all the vectors are horizontal does not allow you to conclude that n2 is
fixed, because the rate of change of n2 is several orders of magnitude
smaller than the rate of change of n1.

Look at the following plot, which gives you a better picture of the
phase portrait:

plotdf([eq1, eq2], [n1, n2], [n1, 0, 40000], [n2, 0, 1.1]);

Notice that in the last interval I used  0 < n2 <1.1, rather than
0 < n2 < 1, because plotdf currently has a bug that will not allow you
to use this last interval.

Regards,
Jaime Villate

```