11
$\begingroup$
RegionPlot[ImplicitRegion[(2 x - 1)/(x - 1) < 3/2, {x, y}], 
 PlotRange -> {{-9, 9}, {-9, 9}}]

enter image description here

Just checking whether anyone else can replicate this. Can anybody confirm such behavior and, maybe, confirm this as a bug?

$\endgroup$
  • $\begingroup$ Same result with Linux 11.0.1 $\endgroup$ – grbl Feb 8 '17 at 8:34
  • $\begingroup$ It does not work on 10.4.1 too. The following inequalities also do not work: 1/x < 1 and 1/x <-1. $\endgroup$ – Anjan Kumar Feb 8 '17 at 8:50
  • 5
    $\begingroup$ Yes, I think that's a bug and it would be good if you could report it. $\endgroup$ – user21 Feb 8 '17 at 9:50
  • $\begingroup$ The bug is still present in 11.1.0 $\endgroup$ – user58955 Mar 23 '17 at 17:50
9
$\begingroup$

Another thing to do is just cut ImplicitRegion out of the loop altogether. RegionPlot is naturally designed to take a predicate of inequalities.

RegionPlot[(2 x - 1)/(x - 1) < 3/2, {x, -9, 9}, {y, -9, 9}]

Mathematica graphics

There have been other examples of RegionPlot having trouble with ImplicitRegion, and usually the answer is just to give the inequalities to RegionPlot directly.

$\endgroup$
  • $\begingroup$ much simpler (and natural) +1. Hope WA is going well $\endgroup$ – ubpdqn Feb 9 '17 at 0:39
8
$\begingroup$

This can worked around by using Reduce,e.g:

p = Plot[(2 x - 1)/(x - 1), {x, -5, 5}, 
   GridLines -> {{-1, 1}, {3/2, {2, Red}}}, PlotRange -> {-5, 5}, 
   Frame -> True];
rp = RegionPlot[
   ImplicitRegion[Reduce[(2 x - 1)/(x - 1) < 3/2, x], {x, y}], 
   PlotRange -> {{-9, 9}, {-9, 9}}, PlotStyle -> {Pink, Opacity[0.2]}];
Show[p, rp]

enter image description here

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.