0
$\begingroup$

This function f = x*Log[y] is defined for all x and for y>0

f = x*Log[y];
fdomain = FunctionDomain[f, {x, y}]

Mathematica graphics

so I expected StreamPlot to only show streams for y>0 only, even if the range given in the command itself includes negative values. (may be one did not notice the y range includes something outside the domain).

But the stream plots are all missing from y=0 to y=1 and then start above that.

Why are stream lines missing from y=0..1?

f = x*Log[y];
p = StreamPlot[{1, f}, {x, 0, 3}, {y, -1, 3},
        Axes -> True, Frame -> False, AxesOrigin -> {0, 0}
        ]

Mathematica graphics

They show up, when changing the y range to start from zero:

f=x*Log[y];
p = StreamPlot[{1,f},{x,0,3},{y,0,3},
      Axes -> True,Frame -> False,AxesOrigin->{0,0}
      ]

Mathematica graphics

Compare to Maple, for same function and same plot range, it shows correctly the streams for 0..1 for y even though the range asked for starts at -1

f:=x*ln(y);
plots:-fieldplot([1,f],x=0..3,y=-1..3,fieldstrength=fixed);

Mathematica graphics

Mathematica 11.3 on Linux

$\endgroup$
  • $\begingroup$ Same behavior in Mathematica 11.3 Win 10. Could make them show up with this. f = x*Log[y]; p = StreamPlot[{1, f}, {x, 0, 3}, {y, -1, 3}, Axes -> True, Frame -> False, AxesOrigin -> {0, 0}, StreamPoints -> Evaluate[ Flatten[Table[{x, y}, {x, 0, 3, .2}, {y, -0.2, 3, 0.2}], 1]]] $\endgroup$ – Zviovich Jul 31 '18 at 11:56
  • 1
    $\begingroup$ Use {y,0,3} and set PlotRange to whatever you want. That's for a workaround, if you need to know why, I'd ask WRI Support. $\endgroup$ – Kuba Jul 31 '18 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.