Solution (source code)

= Solution

On the boundary the <integral> is $\int_{-\pi}^{\pi}\theta\,dy$. <Integration by parts> has zero endpoint term and leaves
$$
\boxed{-\int_{-\pi}^{\pi}y\,d\theta=-\int_{-\pi}^{\pi}(1+\cos\theta)\sin\theta\,d\theta=0.}
$$