Area and perimeter of a cardioid (source code)

= Area and perimeter of a cardioid
{title2=$\mathcal A=3\pi a^2/2,\quad \ell=8a$}

For $a>0$, the <cardioid> $r=a(1+\cos\theta)$ traces its boundary once over $0\leq\theta\leq2\pi$. The <polar area element> gives
$$
\mathcal A=\frac{a^2}{2}\int_0^{2\pi}(1+\cos\theta)^2d\theta=\frac{3\pi a^2}{2}.
$$
The <polar arc length> integrand is $2a|\cos(\theta/2)|$. Splitting at the cusp parameter $\theta=\pi$ gives perimeter $8a$. The powers of $a$ distinguish the scaling of <area> and <length>.