3

Assume that you have the ode system x'=xy-y, y'=xy-x

How would one use pst-ode.sty to draw trajectories and vectorfield, say in the t-y plane?

2
  • 2
    Welcome to TeX.SE! Please show us the code you have tried so far.
    – Mensch
    Commented Mar 16, 2019 at 16:43
  • As t is the independent parameter (e.g. time) you certainly want to produce trajectories and vectors in the x-y plane (two-dimensional space coordinates).
    – AlexG
    Commented Mar 26, 2019 at 12:34

1 Answer 1

2
\documentclass{article}
\usepackage{pst-ode,pst-plot}
\begin{document}
 \psset{xAxisLabel=$t$,xAxisLabelPos={c,-6ex},yAxisLabelPos={-3ex,c}}
 \begin{psgraph}(0,0)(0,0)(-10,1){10cm}{2.5cm}
  \pstODEsolve[algebraic]{TY}{0 1}{0.1}{4.5}{100}{0 0.1}{
    x[0]*x[1]-x[1] | x[0]*x[1]-x[0]
}
\listplot{TY}
\end{psgraph}
\end{document}

I have no idea what parameter you have for x'(0) and y'(0)

enter image description here

3
  • Dear Herbert thank you. Dear Kurt I have tried something similar to Herbert's code. My main issue is how do you deal with the vector field. If I am not mistaken the \psVectorfield command takes care of an ode with one uknown function. Here we have a system with two functions x(t) and y(t). How do you deal with this? So about the vector field Kurt, I have no code I tried because I have no idea how to setup such a command.
    – Antonis
    Commented Mar 17, 2019 at 20:09
  • Nobody knows? So maybe it is not supported?
    – Antonis
    Commented Mar 20, 2019 at 7:15
  • This plots a trajectory starting at x = 0, y = 0.1 in the x-y plane for 0.1 <= t <= 4.5. The abscissa should be labelled x.
    – AlexG
    Commented Mar 26, 2019 at 12:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .