2

I am trying to make a phase portrait of two differential equations. The equations are:

x'=x-y

y'=1-x^2

I have tried to google it, and looked in here, but haven't found a sufficient answer. I did find this though: How to draw slope fields with all the possible solution curves in latex

But problem is they have to be in the same picture. I have uploaded a picture that shows how i would like it to look - any ideas? this is the picture

Black Mild
  • 17,569
Soren
  • 93
  • you have tried pgfplots I guess? – cgnieder Nov 18 '15 at 12:17
  • Yes but i am hoping it is posible to do it without making a huge table. – Soren Nov 18 '15 at 12:30
  • You could iterate the function in Lua with LuaTeX and plot the end points. – Henri Menke Nov 18 '15 at 14:11
  • I have never used lua - but just looked (a bit) into it. It might work, because i think I might be able to make a algorithm, witch does what i want to. But i would have thought that a latex package might be made for this specific purpose. – Soren Nov 18 '15 at 14:44
  • Your question suggests that you want to combine two different plots into one plot. Can you do each of the single plots yourself (at least partially)? If yes, please provide the code. That would greatly help anyone who might want to help you. – jarauh Nov 18 '15 at 19:10
  • Actually its a 3d plot representet in 2d. There is a t varible, that effekts the system, but not directly in the system. But i have x' and y', witch is used to plot it. The lines you see in the figur is actually slope vectors, made out with x' and y' by taking a random point and se how x' and y' is behaving in that exact point. – Soren Nov 19 '15 at 11:23
  • I just tried to plot your system with Matlab. Are you sure you don't have a typo in your system equations? my plots don't look similar to your example. What initial conditions have been used to obtain your example plot? I got highly unstable solutions which quickly diverged to nonsense values like 10^42. – T. Pluess Sep 23 '18 at 15:47
  • @Soren I see that the figure is quite interesting: 1 layer of dash curves and one layer of solid curves with arrows. The question will attract more attention (at least to me ^^) if you provide some involving context/modeling/real-life problem – Black Mild Dec 27 '22 at 13:42
  • 1
    Why does my answer to that other question https://tex.stackexchange.com/questions/139064/how-to-draw-slope-fields-with-all-the-possible-solution-curves-in-latex not answer this question? – Benjamin McKay Dec 27 '22 at 14:56

0 Answers0