Answer
$r=\cos \pi \theta -1$
Work Step by Step
We need to find the anti-derivative for $\dfrac{dr}{d \theta}=-\pi \sin \pi \theta $
Thus, we have $r=\cos \pi \theta +C$
Apply the initial condition $r(0)=0$ in the above equation to solve for $C$.
we get $1+C=0 \implies C=-1$
Hence, $r=\cos \pi \theta -1$