6
$\begingroup$

Bug fixed in 10.4.

Why does RegionPlot of the ImplicitRegion give an incorrect plot? Also, will how does this affect calculations with ImplicitRegion (i.e. if the plot is incorrect are calculations using it also incorrect)?

RegionPlot[ImplicitRegion[x^3 <= y <= x^2, {{x, 0, 1}, y}]]

gives,

enter image description here

When it should give this,

Plot[{x^2, x^3}, {x, 0, 1}, PlotStyle -> Blue, Filling -> {1 -> {2}}, AspectRatio -> Automatic]

enter image description here

I think it is not reliable as look at what it does in Plot3D

Plot3D[x + y, {x, y} \[Element] ImplicitRegion[x^3 <= y <= x^2, {{x, 0, 1}, y}]]

enter image description here

When expecting this,

Plot3D[x + y, {x, 0, 1}, {y, 0, 1}, 
 RegionFunction -> Function[{x, y, z}, x^3 <= y <= x^2 \[And] 0 <= x <= 1],
 PlotPoints -> 100]

enter image description here

Am I doing it wrong or is this a bug?


The ImplicitRegion plots work in 10.2 Win 7 Pro 64bit but not in 10.3 Win 7 Pro 64bit. Can others confirm this is a 10.3 bug?


Confirmed "regression in our Region functionality" from WRI for version 10.3 with [CASE:3485986].

$\endgroup$
  • $\begingroup$ What version are you using? I get this: i.imgur.com/iDwQaYM.png , using version 10.2 Linux $\endgroup$ – Jason B. Dec 11 '15 at 13:59
  • $\begingroup$ 10.3 Win 7 Pro 64bit $\endgroup$ – Edmund Dec 11 '15 at 14:00
  • $\begingroup$ Odd, I get the first plot3d to work as well, i.imgur.com/0ouRoCS.png $\endgroup$ – Jason B. Dec 11 '15 at 14:01
  • $\begingroup$ I just tried in 10.2 and it works. I think it is a 10.3 bug. $\endgroup$ – Edmund Dec 11 '15 at 14:01
  • $\begingroup$ Weird, backwards progress - should rename the post to something more informative like "Plotting with ImplicitRegion works better in version 10.2 than in 10.3" $\endgroup$ – Jason B. Dec 11 '15 at 14:03
4
$\begingroup$

To your second question ...does it affect calculations?

reg = ImplicitRegion[x^3 <= y <= x^2 && 0 <= x <= 1, {x, y}]
RegionBounds@reg
{{0, 1}, {0, 1}}

{Area@reg, Integrate[x^2 - x^3, {x, 0, 1}, {y, 0, 1}]}
{1/12, 1/12}

addendum

{g = RegionPlot[reg], greg = DiscretizeGraphics[g]}

enter image description here

{Area@greg, Area@reg // N}
{0.034617, 0.0833333}

Care must be taken. It remains an uneasy feeling.

$\endgroup$
3
$\begingroup$

This is a comment with graphics rather than an answer:

Interestingly, I think that the problem may lie in ImplicitRegion, rather than in RegionPlot. Notice that RegionPlot works fine with the predicate definition of the region itself:

RegionPlot[x^3 <= y <= x^2, {x, 0, 1}, {y, 0, 1}, PlotPoints -> 120]

regionplot result

On the other hand, DiscretizeRegion shows the same problem with your ImplicitRegion definition:

DiscretizeRegion[
  ImplicitRegion[x^3 <= y <= x^2, {{x, 0, 1}, y}],
  Frame -> True
]

discretizeregion

$\endgroup$
  • $\begingroup$ This is definitely the case. In version 10.2, I get the expected result for the DiscretizedRegion $\endgroup$ – Jason B. Dec 11 '15 at 14:28

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.