# Proper way to produce StreamPlot

I have faced with problem of not completely correct phase trajectories of ODE, which was produced by StreamPlot.

Next following code ends up with this plot:

 f[x_, y_] = x/(-x - 2 y)
StreamPlot[{1, f[x, y]}, {x, -10, 10}, {y, -10, 10}, Frame -> False,
Axes -> True, AspectRatio -> 1/GoldenRatio, StreamStyle -> "PinDart"] Unfortunately, streamlines are interrupting on line $y = -\dfrac{x}{2}$, when they should go as they were. By this, I mean that there should be only clockwise directed streamlines.

Is there any straightforward way to deal with this issue? Thank you!

• But are you sure this is not right? y=-x/2 is where the direction of tangent changes. Just plug in x=-1, y=1 above this line and x=-1 y=0 below this line, and you get the slope of +1 for the former case and -1 for the latter case. – MathX Mar 19 '16 at 0:38
• What is the ODE you're trying to plot the trajectories of? – Rahul Mar 19 '16 at 1:34
• @Rahul This one: $y' = \dfrac{x}{-x-2y}$ – RuD_wow Mar 20 '16 at 13:44
• @RuD_wow: The denominator of that ODE cannot be $y = -\dfrac{x}{2}$, else the ODE is undefined. This is a line as shown in the phase portrait, so the phase portrait you show above is is correct. – Moo Mar 20 '16 at 14:22
• @Moo But, what if we will calculate the eigenvalues of system $\dfrac{dx}{dt}, \dfrac{dy}{dt}$ and, considering their Real values, make a conclusion that DE' s phase trajectories are logarithmic clockwise spiral? – RuD_wow Mar 21 '16 at 18:12

Clear[f]