3
$\begingroup$

I was given the problem to find the area bounded by the polar curve

$$r=\frac{1}{2}+\frac{3}{2}\cos(\theta)$$

which looks like

                                       enter image description here

To be clear, the region meant is the lighter of the two here

                                       enter image description here

I know the integrals needed to actually find the area, and that really isn't the question anymore. Instead, visualization is. I believe that can define the region that I am interested in with the code block (a and b were defined for generality)

a=1/2;
b=3/2;
v={(a c+b c Cos[t])Cos[t],(a c+b c Cos[t])Sin[t]};
R1=ParametricRegion[v,{{c,0,1},{t,0,(2\[Pi])/3}}];
R2=ParametricRegion[v,{{c,0,1},{t,2\[Pi])/3,(4\[Pi])/3}}];
R3=ParametricRegion[v,{{c,0,1},{t,(4\[Pi])/3,2\[Pi]}}];

R=RegionDifference[RegionUnion[R1,R3],R3];

I can look at these individually, but when I use Region to visualize the whole thing, it doesn't return even a picture, just some internal expression. How can I visualize just the region of interest?

$\endgroup$
  • $\begingroup$ Your code works for me, but very slowly. I obtained R1 in several minutes. $\endgroup$ – user64494 Apr 29 at 19:02
4
$\begingroup$

We can construct such a region with CrossingPolygon and in this instance Polygon will work too.

c = 1;
pts = Table[v, {t, Subdivide[0., 2π, 200]}];
pts[[-1]] = pts[[1]];

Graphics[{EdgeForm[ColorData[97][1]], Opacity[.3], ColorData[97][2], Polygon[pts]}]

CrossingCount[Polygon[pts], {0.5, 0}]
2
$\endgroup$
2
$\begingroup$

I think your plot is not quite correct, as the region should only extend to $x=2$ on the horizontal axis.

Here's how to plot it using RegionPlot:

RegionPlot[-1/2 + 3/2 x/Sqrt[x^2 + y^2] < Sqrt[x^2 + y^2] < 1/2 + 3/2 x/Sqrt[x^2 + y^2],
  {x, -1/2, 2}, {y, -5/4, 5/4}, PlotPoints -> 100]

enter image description here

The trick is to use $r=\sqrt{x^2+y^2}$ and $\cos(\theta)=x/r$.

$\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.