2
$\begingroup$

I'm studying a bit about dual integrals by watching this YouTube video.

I was able to plot two polar functions together:

r1=Sqrt[18];R2=6Cos[θ];
g1=PolarPlot[r1,{θ,0,2π}];
g2=PolarPlot[r2,{θ,0,2π}];
Show[{g1,g2}]

Image1

I defined the analysis regions using the RegionPlot function:

RegionPlot[x^2+y^2<18,{x,0,10},{y,0,10},PlotStyle->Yellow]
RegionPlot[(x-3)^2+y^2<9,{x,0,10},{y,0,10},PlotStyle->Blue]
RegionPlot[x^2+y^2<18&&(x-3)^2+y^2<9,{x,0,10},{y,0,10}]

Image2

Using the ImplicitRegion function, you get the intersection between these two graphs:

ℛ=ImplicitRegion[x^2+y^2<18&&(x-3)^2+y^2<9,{x,y}];
RegionDimension[ℛ]

$ 2 $

The question is as follows:

Is it possible to use the PolarPlot function within the RegionPlot function?

I tried something like this, but it was not possible ...

RegionPlot[PolarPlot[r1,{θ,0,2π}]&&PolarPlot[r2,{θ,0,2π},{x,{Y,0,10}]

I only got by the definition of the circle equation ...

$\endgroup$
0
3
$\begingroup$

It is not clear why you want to use PolarPlot within RegionPlot

reg1 = ImplicitRegion[x^2 + y^2 <= 18, {x, y}];
reg2 = ImplicitRegion[(x - 3)^2 + y^2 < 9, {x, y}];
reg3 = RegionIntersection[reg1, reg2];

RegionPlot[{reg1, reg2, reg3}, AspectRatio -> 2 Sqrt[18]/(Sqrt[18] + 6),
 PlotLegends -> "Expressions"]

enter image description here

However, the colors are changed where there is overlap. This can be corrected by using non-overlapping regions.

reg4 = RegionDifference[reg1, reg2];
reg5 = RegionDifference[reg2, reg3];

RegionPlot[{reg4, reg5, reg3}, AspectRatio -> 2 Sqrt[18]/(Sqrt[18] + 6),
 PlotLegends -> "Expressions"]

enter image description here

$\endgroup$
1
  • $\begingroup$ The PolarPlot function seemed interesting because if I did not know the circle equation and having only the radius it is easier to insert the inputs. $\endgroup$ – LCarvalho Jun 21 '17 at 18:03

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.