Solution (source code)

= Solution
{c}

In <polar coordinates>, $x=r(\theta)\cos\theta$ and $y=r(\theta)\sin\theta$. The <product rule> gives
$$
x'=r'\cos\theta-r\sin\theta,\qquad y'=r'\sin\theta+r\cos\theta.
$$
Squaring and adding cancels the mixed terms and gives $(x')^2+(y')^2=(r')^2+r^2$. Hence the <arc length> is
$$
\boxed{s=\int_{\theta_1}^{\theta_2}\sqrt{r(\theta)^2+\left(\frac{dr}{d\theta}\right)^2}\,d\theta.}
$$