$(2a^2 - r^2) \, dr = r^3 \sin \theta \, d\theta$
$\dfrac{(2a^2 - r^2) \, dr}{r^3} = \sin \theta \, d\theta$
$\dfrac{2a^2 \, dr}{r^3} - \dfrac{r^2 \, dr}{r^3} = \sin \theta \, d\theta$
$\displaystyle 2a^2 \int r^{-3} \, dr - \int \dfrac{dr}{r} = \int \sin \theta \, d\theta$
$2a^2 \left( \dfrac{r^{-2}}{-2} \right) - \ln r = -\cos \theta + \ln c$
$-a^2 r^{-2} - \ln r = -\cos \theta + \ln c$
$\cos \theta - \dfrac{a^2}{r^2} = \ln c + \ln r$
$\cos \theta - \dfrac{a^2}{r^2} = \ln cr$
$\ln e^{(\cos \theta - a^2/r^2)} = \ln cr$
$e^{(\cos \theta - a^2/r^2)} = cr$
$\dfrac{e^{(\cos \theta - a^2/r^2)}}{r} = c$
when θ = 0, r = a
$\dfrac{e^{(\cos 0 - a^2/a^2)}}{a} = c$
$\dfrac{e^{(1 - 1)}}{a} = c$
$\dfrac{e^0}{a} = c$
$c = \dfrac{1}{a}$
Thus,
$\dfrac{e^{(\cos \theta - a^2/r^2)}}{r} = \dfrac{1}{a}$
$ae^{(\cos \theta - a^2/r^2)} = r$
$r = a \exp \left( \cos \theta - \dfrac{a^2}{r^2} \right)$ answer