[pstricks] Two fail --- Backward solution?
David Arnold
dwarnold45 at suddenlink.net
Fri Feb 6 07:32:43 CET 2009
All,
I'm wondering why my initial conditions at -1.5 and 1.5 fail to draw
in the code below. Also, I am looking for a way to do solutions
backward in time.
\documentclass{article}
\usepackage{amsmath}
\usepackage{pstricks-add}
\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]{0}
{2}{-1.5}{\Funct}
\psplotDiffEqn[linecolor=black,method=varrkiv,varsteptol=0.0001]{0}
{2}{-0.5}{\Funct}
\psplotDiffEqn[linecolor=black,method=varrkiv,varsteptol=0.0001]{0}
{2}{0.5}{\Funct}
\psplotDiffEqn[linecolor=black,method=varrkiv,varsteptol=0.0001]{0}
{2}{1.5}{\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}
More information about the PSTricks
mailing list