[Math] Find area lies inside cardioid $r = 1 + \cos θ$ and outside circle $r = \cos θ$

calculusintegrationpolar coordinates

What is the area of the region that lies inside the cardioid $r = 1 + \cos( θ)$ and outside the circle $r = \cos (θ)$?

The graph for this problem is

enter image description here

In attempting to solve this problem, I reasoned that the area inside the cardioid but outside the circle is the area of the cardioid minus the area of the circle. This gave me the setup: $$\frac12\left(\int^{2\pi}_{0}\left(1+\cos(\theta)\right)^2-\cos^2(\theta)\ d\theta\right)\\=\frac12\left(\int^{2\pi}_{0}1+2\cos(\theta)+\cos^2(\theta)-\cos^2(\theta)\ d\theta\right)\\=\frac12\left(\int^{2\pi}_{0}1+2\cos(2\theta)\ d\theta\right)\\=\frac12\left(\theta+\sin(2\theta)\right)|^{2\pi}_0\\=\pi$$
Why doesn't this method work? Is there something wrong with my calculation or is it my logic that is not holding true?

EDIT:
As I've been working more, I see that this kind of method does not seem to work for this problem either:

What is the area of the region that lies outside the circle $r = \cos θ$ and inside the circle $r = 2 \cos θ$?

I do not seem to be able to simply subtract the area of the second circle from the area of the first. What is wrong with this method? Looking at the graphs it seems like this would work?

Best Answer

Note that the integral limits for the circle is $[-\frac\pi2, \frac\pi2]$. Thus, the integral should be set up as

$$\frac12\int^{\pi}_{-\pi}\left(1+\cos\theta\right)^2d\theta -\frac12\int^{\pi/2}_{-\pi/2}\cos^2\theta\ d\theta = \frac{5\pi}4$$