# [pstricks] Example of 2005 doesn' work -- psplotDiffEqn

Thu May 13 20:07:10 CEST 2010

Hi,

found an example which seems to very helpfully but it doesn't work:

http://tug.org/mailman/htdig/pstricks/2005/002975.html

What is the problem?

regards
Marco

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\pagestyle{empty}
\begin{document}

This is the phase portrait of the planar differential system
$\begin{cases} x^\prime = x(1-x-(5/2)y)\\ y^\prime = y(2-x-2y), \end{cases}$
defined on the region $x\geq 0$, $y\geq 0$,
where the unknown are $x(t)$ and $y(t)$.
Only two arrows have been placed by hand'' on two orbits.
Each orbit should have one o more arrows, indicating the sense of the
increasing $t$'s.

\begin{center}
\psset{unit=25mm}
\begin{pspicture}(-.2,-.2)(2,2)
\psline[linewidth=2pt,ArrowInside=->](.1,0)(.9,0)
\psline[linewidth=2pt,ArrowInside=-<](1.1,0)(2,0)
\psline[linewidth=2pt,ArrowInside=->](0,.1)(0,.9)
\psline[linewidth=2pt,ArrowInside=-<](0,1.1)(0,2)
\newcommand{\FuncAlg}{y[0]*(1-y[0]-2.5*y[1]);y[1]*(2-y[0]-2*y[1])}
\psset{algebraic=true,method=rk4,whichabs=0,whichord=1,linewidth=2pt}
\psplotDiffEqn{0}{3.7}{.95 .09}{\FuncAlg}%
\psplotDiffEqn[arrows=->]{.5}{2.5}{.95 .09}{\FuncAlg}%
%
\psplotDiffEqn{0}{2.9}{2 .5}{\FuncAlg}%
\psplotDiffEqn[arrows=->]{1}{1.5}{2 .5}{\FuncAlg}%
%
\psplotDiffEqn{0}{2.5}{2 1}{\FuncAlg}%
\psplotDiffEqn[arrows=->]{1}{1.25}{2 1}{\FuncAlg}%
%
\psplotDiffEqn{0}{2.4}{2 1.5}{\FuncAlg}%
\psplotDiffEqn[arrows=->]{.85}{1.1}{2 1.5}{\FuncAlg}%
%
\psplotDiffEqn{0}{1.8}{2 2}{\FuncAlg}%
\psplotDiffEqn[arrows=->]{1}{1.2}{2 2}{\FuncAlg}%
%
\psplotDiffEqn{0}{1.4}{1 2}{\FuncAlg}%
\psplotDiffEqn[arrows=->]{.5}{.65}{1 2}{\FuncAlg}%
%
\psplotDiffEqn{0}{3.1}{.11 .04}{\FuncAlg}%
\psplotDiffEqn[arrows=->]{.5}{2}{.11 .04}{\FuncAlg}%
%
\uput[-90](2,0){$x$} \uput[180](0,2){$y$}%
\uput[-135](0,0){$0$}\uput[180](0,1){$1$}%
\uput[-90](1,0){$1$}%
\rput(0,0){$\bullet$}%
\rput(1,0){$\bullet$}%
\rput(0,1){$\bullet$}%
\end{pspicture}
\end{center}

\end{document}

--
____________________________________
Dipl.-Sicherheits.-Ing. Marco Daniel
Beerentaltrift 90g
21077 Hamburg