# [pstricks] Two fail --- Backward solution?

Sat Feb 7 18:32:25 CET 2009

Dominique,

Here are the solution trajectories my code should reproduce.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.tiff
Type: image/tiff
Size: 46112 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20090207/a2635f43/attachment-0002.tiff
-------------- next part --------------

This image created with the Java version of Dfield, which can be
found at:

http://math.rice.edu/~dfield/dfpp.html

However, here is what my code is producing:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.tiff
Type: image/tiff
Size: 13298 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20090207/a2635f43/attachment-0003.tiff
-------------- next part --------------

Again, here is my code. The solutions with initial conditions greater
than 1 and smaller than -1 are not plotting. That is, these two lines
are doing nothing to the picture.

\psplotDiffEqn[linecolor=black,method=varrkiv,varsteptol=0.0001]{-2}
{2}{-1.0051}{\Funct}
\psplotDiffEqn[linecolor=black,method=varrkiv,varsteptol=0.0001]{-2}
{2}{1.0051}{\Funct}

Full code:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\def\Funct{dup 3 exp exch sub}
\psset{unit=2cm,arrowscale=2}
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psaxes[labels=none,ticksize=0 0pt]{<->}(0,0)(-2,-2)(2,2)[$t$,0][$y$,0]
\psline[linecolor=blue,linewidth=1pt]{<->}(-2,-1)(2,-1)
\psline[linecolor=blue,linewidth=1pt]{<->}(-2,0)(2,0)
\psline[linecolor=blue,linewidth=1pt]{<->}(-2,1)(2,1)
\psplotDiffEqn[linecolor=black,method=varrkiv,varsteptol=0.0001]{-2}
{2}{-1.0051}{\Funct}
\psplotDiffEqn[linecolor=black,method=varrkiv,varsteptol=0.0001]{-2}
{2}{-0.9736}{\Funct}
\psplotDiffEqn[linecolor=black,method=varrkiv,varsteptol=0.0001]{-2}
{2}{0.9736}{\Funct}
\psplotDiffEqn[linecolor=black,method=varrkiv,varsteptol=0.0001]{-2}
{2}{1.0051}{\Funct}
\uput[l](-2,1){$y=1$}
\uput[l](-2,0){$y=0$}
\uput[l](-2,-1){$y=-1$}
\pscircle[fillstyle=solid,fillcolor=white,linecolor=blue](0,1){3pt}
\pscircle[fillstyle=solid,fillcolor=blue,linecolor=blue](0,0){3pt}
\pscircle[fillstyle=solid,fillcolor=white,linecolor=blue](0,-1){3pt}
\psset{arrowscale=1}
\psline[linecolor=red,linewidth=3pt]{->}(0,1.3)(0,1.7)
\psline[linecolor=red,linewidth=3pt]{<-}(0,0.3)(0,0.7)
\psline[linecolor=red,linewidth=3pt]{->}(0,-0.7)(0,-0.3)
\psline[linecolor=red,linewidth=3pt]{->}(0,-1.3)(0,-1.7)
\end{pspicture}
\end{center}

\end{document}

On Feb 7, 2009, at 2:29 AM, Dominique RODRIGUEZ wrote:

Dear David,

In order to improve the plotting of diff-eq solution in pstricks, you
may help us!

> No, your picture is not correct. Although the following picture is
> also incorrect, I will use it to explain.

So, I'm waiting for your explaination!

You need to plot the solution of: y'=3^y-y

I will look at the plotting done with an HP calc.

Regards
Dominique
--
Les Galini?res - 07460 St Andr? de C. FRANCE-- tel: (+33)475.39.05.82