2
$\begingroup$

More specifically above r=6 and below r=4+4cos(θ)

graph of the two curves

PolarPlot[{6, 4 + 4 Cos[t]}, {t, 0, 2 Pi}]
$\endgroup$
2
  • $\begingroup$ Area will help you $\endgroup$ Apr 30 '15 at 17:18
  • $\begingroup$ There are 3 possibilities. $\endgroup$
    – Narasimham
    Apr 30 '15 at 20:21
6
$\begingroup$
 Integrate[Max[0, (4 + 4 Cos[t])^2/2 - 6^2/2 ], {t, -Pi, Pi}]

or

 Integrate[(4 + 4 Cos[t])^2/2 - 6^2/2 , {t, -Pi/3, Pi/3}]

18 Sqrt[3] - 4 Pi

Edit: another approach:

 Area[{r Sin[t], r Cos[t]}, {t, -Pi, Pi}, {r, 6, Max[6, 4 + 4 Cos[t]]}] 

or

 Area[CoordinateTransform[ "Polar" -> "Cartesian", {r, t}],
                         {t, -Pi, Pi}, {r, 6, Max[6, 4 + 4 Cos[t]]}]

2 (9 Sqrt[3] - 2 Pi)

$\endgroup$
2
  • 1
    $\begingroup$ This is a much better way to do it than mucking about with the Area function (IMHO). Just to elaborate on it a bit: in polar coordinates, the area of a wedge bounded by the function $r(\theta)$ is $\frac{1}{2} \int r^2(\theta) d \theta$. $\endgroup$ Apr 30 '15 at 20:12
  • 1
    $\begingroup$ Plus, it gives on a result (on my machine) in 0.06 seconds, compared to 16.8 seconds for the Area method. A little thought ahead of time results in a speed-up by a factor of over 250. :-) $\endgroup$ Apr 30 '15 at 20:16
4
$\begingroup$

As HyperGroups suggests, we can take advantage of the Area function new in v10.

First, we'll represent the region implicitly. We want:

$$ 6 < r < 4 + 4\cos\theta \\ 6 < \sqrt{x^2+y^2} < 4 + 4\cos\arctan\frac y x $$

First we'll plot this region to make sure we're correct:

Show[
 RegionPlot[6 < Sqrt[x^2 + y^2] < 4 + 4 Cos[ArcTan[x, y]], {x, -8, 8}, {y, -8, 8}]
 PolarPlot[{6, 4 + 4 Cos[t]}, {t, 0, 2 Pi}]
]

enter image description here

Now we can represent this as an ImplicitRegion:

region = ImplicitRegion[6 < Sqrt[x^2 + y^2] < 4 + 4 Cos[ArcTan[x, y]], {x, y}];

And finally we can compute the area:

area = Area[region];

This takes 20 seconds on my laptop, and produces a pretty nasty expression. In order to simplify it I had to do:

FullSimplify @ ComplexExpand @ ToRadicals @ FullSimplify[area]
(* 18 Sqrt[3] - 4 π *)
$\endgroup$
8
  • $\begingroup$ I have 10.1 on OS X and your Area[region] gives the message Area::nmet: Unable to compute the area of region ImplicitRegion[...]. $\endgroup$ Apr 30 '15 at 19:45
  • $\begingroup$ @StephenLuttrell I get a (long) answer on 10.0.0.0, Windows 8.1 64-bit $\endgroup$ Apr 30 '15 at 19:47
  • $\begingroup$ @Stephen You can always solve it the "easy" way: Reduce[6 < 4 + 4 Cos[\[Theta]] && -Pi < \[Theta] < Pi, {\[Theta]}] then Integrate[r, {\[Theta], -Pi/3, Pi/3}, {r, 6, 4 + 4 Cos[\[Theta]]}] $\endgroup$ Apr 30 '15 at 20:04
  • $\begingroup$ On my machine with 10.0.2, 2012rcampion's Area[region] works fine. $\endgroup$
    – Taiki
    Apr 30 '15 at 20:09
  • $\begingroup$ @Stephen How about if we define the region parametrically? region = ParametricRegion[{{r Cos[\[Theta]], r Sin[\[Theta]]}, 6 < r < 4 + 4 Cos[\[Theta]]}, {{\[Theta], -Pi, +Pi}, {r, 0, 8}}] works for me $\endgroup$ Apr 30 '15 at 20:09
3
$\begingroup$

We can use any one of the line integrals that by Green's Theorem yield the area:

dA = RandomChoice[{x Dt[y], -y Dt[x], (x Dt[y] - y Dt[x])/2}]
param = {x -> r Cos[θ], y -> r Sin[θ]};
boundary1 = {r -> 6};
boundary2 = {r -> 4 + 4 Cos[θ]};
θ0 = θ /. Solve[{Equal @@ (r /. {boundary1, boundary2}), -Pi < θ <  Pi}, {θ}];
Integrate[dA /. param /. boundary2 /. Dt[θ] -> 1, Flatten[{θ, θ0}]] -
 Integrate[dA /. param /. boundary1 /. Dt[θ] -> 1, Flatten[{θ, θ0}]] // Simplify
(*
  1/2 (-y Dt[x] + x Dt[y])

  18 Sqrt[3] - 4 π
*)

Now this is an interesting bug result (the double integral in polar coordinates):

Integrate[r, {r, θ} ∈ ImplicitRegion[6 <= r <= 4 + 4 Cos[θ], {r, θ}]]

Mathematica graphics

As Michael Siefert astutely pointed out, the problem is that the range of θ is assumed to be all reals. Restricting θ to one period of length 2 Pi gives the right answer:

Integrate[r, {r, θ} ∈ ImplicitRegion[6 <= r <= 4 + 4 Cos[θ] && 0 <= θ <= 2 Pi, {r, θ}]]
(*  2 (9 Sqrt[3] - 2 π)  *)
$\endgroup$
2
  • 2
    $\begingroup$ Not really a bug; Mathematica doesn't "know" that the natural range of $\theta$ is from -π to π without you providing that context. So it gives you an infinite sum of integrals, corresponding to the regions $\theta = [-\pi/3, \pi/3], \theta = [5\pi/3, 7\pi/3], \theta = [11\pi/3, 13\pi/3]$, and so on. $\endgroup$ May 1 '15 at 13:26
  • $\begingroup$ @MichaelSeifert Ah, I see. I didn't think of that. Thanks. I suppose it's a "smart" answer, in that it could have said it diverges. $\endgroup$
    – Michael E2
    May 1 '15 at 13:27

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.