General[PStricks] differentials equations

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
yesugei
Posts: 4
Joined: Wed Mar 26, 2008 10:43 pm

[PStricks] differentials equations

Post by yesugei »

Hello everybody,

I am trying to use differentials tools with the package pstricks-add and I have some issues :

I don't really understand the way to define equations. My equations are :

Code: Select all

$\left\{\begin{array}{l}
\frac{dx}{dt}=\lambda_1 x\\
\frac{dy}{dt}=\lambda_2 y
\end{array}\right.$
with $\lambda_i$ fixed in $\mathbb{R}*$.

there is my code to draw it :

Code: Select all

\def\Func{-y[0]/4|y[1]/2}%
\psset{linewidth=0.5pt, plotpoints=50,algebraic=true}%,
\begin{pspicture}(-5,-5)(5,5)
\psclip{\psframe[linestyle=none](-4.95,-5)(4.95,5)}%
\multido{\rx =-5+1}{10}{%
\multido{\ry=-5+1}{10}{%
\psplotDiffEqn[linecolor=red,arrows=->,ArrowInside=->,ArrowInsidePos=0.50,arrowscale=1.5]{0}{5}{\rx \space\ry}{\Func}%
\psplotDiffEqn[linecolor=blue,arrows=->,ArrowInside=->,ArrowInsidePos=0.90,arrowscale=1.5]{0}{-5}{\rx\space\ry}{\Func}
}%
}%
\psaxes[labels = none, linewidth =0.8pt ]{->}(0,0)(-5,-5)(5,5)%
\endpsclip
\end{pspicture}
My main goal is to have the solution drawn with a little arrow which indicate the evolution with the time.

For the arrow it is nearly good (except for the second "\psplotDiffEqn" which draw them in the wrong way) but the drawing i get is very bad ! it is absolutely not the good function !


May could you help me?

thanks.

Yesugei.

ps: please forgive my bad english...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

yesugei
Posts: 4
Joined: Wed Mar 26, 2008 10:43 pm

Re: [PStricks] differentials equations

Post by yesugei »

I have found how to correct the drawing : i must set this options : "whichabs = 0,whichord =1".

but the way where pstricks places the arrow is bad : an arrow for each plot point! that's meanning 200 arrows ! it is to much !! i just need 1 or 2 arrow by curve!!

do you know how to do it?

Yesugei.
Post Reply