# How to view an ImplicitRegion defined by an equality?

Bug introduced in 10.4 and fixed in 11.0

I type

 l = 3
r = ImplicitRegion[(x^2 + y^2)^3 == l *x^2* y^2, {x, y}];
RegionPlot[r]


and I obtain

How could I obtain a good graph for viewing the implicit region, similar to what I obtain if I type <= instead of ==

• I get one petal, not an empty plot in V11.0.1. – Goofy Feb 24 '17 at 23:58
• 10.4.1 for Linux x86 (64-bit): no 2D examples from the docs give a plot. Not even RegionPlot[ImplicitRegion[x^2 + y^2 == 1, {x, y}]]. – corey979 Feb 25 '17 at 0:02
• @Szabolcs In v11.0.1 RegionPlot plots only one petal. It seems the bug is fixed only partially... – Alexey Popkov Feb 25 '17 at 13:37
• @AlexeyPopkov So does 10.3. That would be a different bug. One workaround is to specify the bounds manually. – Szabolcs Feb 25 '17 at 13:58
• @Szabolcs Have you tried it? It doesn't work for me with v.11.0.1. – Alexey Popkov Feb 25 '17 at 14:50

RegionPlot is supposed to work with inequalities, rather than with equations. You can sort of trick it to show the boundary of the region corresponding to your equation:

RegionPlot[r, PlotStyle -> None]


but a more general solution is to use ContourPlot:

ContourPlot[
(x^2 + y^2)^3 == l*x^2*y^2,
{x, y} ∈ Rectangle[{-0.8, -0.8}, {0.8, 0.8}],
PlotPoints -> 100, MaxRecursion -> 3
]


• The common problem of CountourPlot is that is not exactly and there are "noise" in the near of center – Mika Ike Feb 25 '17 at 8:40
• "RegionPlot is supposed to work with inequalities" <- I think it really should plot all 2D regions, and that this is a bug. RegionPlot[Circle[]] works. There are examples with equalities in the documentation of ImplicitRegion. – Szabolcs Feb 25 '17 at 9:31
• @Szabolcs The documentation of RegionPlot is rather consistent on this point though. The first statement in the "Details" section says that RegionPlot takes "any logical combination of inequalities". The PlotStyle -> None "trick" to get a boundary is shown in the relevant "Options" section. The "Properties and Relations" sections also indicates explicitly that ContourPlot should be used for equalities. I'd love for RegionPlot to work with equalities as well, especially since it seems better at it than ContourPlot, but if it behaves in accordance with its docs, is it really a bug? – MarcoB Feb 25 '17 at 13:43
• The documentation is never consistent, just don't take it literally. This is clearly a bug because it worked in previous versions (up to 10.3), it works in the following versions (11.0), and the usage appears in several documentation examples and Wolfram website examples. The fact that they forgot to fully update one doc page is irrelevant. – Szabolcs Feb 25 '17 at 13:57
• The documentation seems to be pretty outdated on RegionPlot. It even says that the default style is grey-black. I submitted a suggestion for improvement (there's a link for that at the bottom of the online version of every doc page). – Szabolcs Feb 25 '17 at 15:46

This is a bug in 10.4. One-dimensional regions embedded in the plane will not be plotted by RegionPlot. For example,

RegionPlot[ImplicitRegion[x^2 + y^2 == 1, {x, y}]]


renders as an empty. In 10.3 and in 11.0.1, it can be plotted without problems.

However, the specific region you show has another problem, present even in 10.3 and 11.0. Only part of the region is shown:

A good workaround for 10.3 is to manually specify the boundaries. Well, we can do it semi-automatically using RegionBounds.

RegionPlot[r, PlotRange -> RegionBounds[r]]


Unfortunately, specifying the PlotRange in 11.0 causes a hang.

As you can see, there are at least 3 seemingly distinct bugs here, which affect different versions:

• 10.4 won't plot 1D regions embedded in 2D. 10.0-10.3 and 11.0 do not suffer from this.

• 10.0-11.0 will only plot a quarter of this specific region unless the PlotRange is manually specified. Also discussed in: Cannot reproduce TransformedRegion example shown in documentation

• 10.4 and 11.0 hang if the PlotRange is manually specified for this region. This problem is not present in 10.0-10.3.

Note: I have not actually tested 10.1 and 10.2. I assumed that when 10.0 and 10.3 behave identically, so do any versions in-between.

In version 11: You can also use RegionBoundary,e.g:

reg = ImplicitRegion[(x^2 + y^2)^3 <= 3 x^2 y^2, {x, y}];
bndy = RegionBoundary[reg];
RegionPlot[bndy]


• with this example I obtain a blank graph (no graph) with windows , and version 10.4.1.0 – Mika Ike Feb 25 '17 at 8:39
• @MikaIke apologies I gave version 11 – ubpdqn Feb 25 '17 at 8:45

Or:

r = ImplicitRegion[(x^2 + y^2)^3 < 3 x^2 y^2, {x, y}];
RegionPlot[r, PlotStyle -> White]


Incidentally, your l = 3 is irrelevant to the question (and should have a semicolon anyway) and should be removed.