TITLE: Plotting Differential Equation Phase Diagrams
QUESTION [9 upvotes]: I haven't got Matlab, nor have I found a suitable online tool. Could someone plot the phase diagram for the following, or point me in the right direction?
$$\frac{dx}{dt} = y - x, \frac{dy}{dt} = x(4 - y)$$

REPLY [11 votes]: You could use WolframAlpha:
stream plot (y-x,x(4-y)), x=-1..5, y=-1..5


It's always nice to verify this sort of thing with analytic tools.  The equilibria satisfy
\begin{align}
 y-x &= 0 \\
 x(4-y) &= 0
\end{align}
From the second equation, $x=0$ or $y=4$.  From the first equation, $x=y$.  Thus, there are two equilibria at the points $(0,0)$ and $(4,4)$.  The nature of the equilibria can be determined from the eigenvalues of the matrix
$$
\left(
 \begin{array}{cc}
   -1 & 1 \\
   4-y & -x
 \end{array}
\right)
$$
The rows are the partial derivatives with respect to $x$ and $y$ of the system.  At $x=y=4$, the eigenvalues are $-4$ and $-1$ and at $x=y=0$, there is one positive eigenvalue and one negative eigenvalue.  This is consistent with the picture.