Solution (source code)

= Solution

Green's theorem states, for a positively oriented simple boundary $C=\partial R$,
$$
\oint_C(P\,dx+Q\,dy)=\iint_R(Q_x-P_y)\,dA.
$$
The defining <polynomial> becomes
$$
r^2(r^2-2r\cos\theta-\sin^2\theta),
$$
so the region is the <cardioid>
$$
\boxed{0\le r\le1+\cos\theta,\qquad-\pi\le\theta\le\pi.}
$$