Solution (source code)

= Solution

Differentiate the angular relation locally, or use $d\phi=(x\,dy-y\,dx)/(x^2+y^2)$. Holding each other coordinate fixed gives
$$
\boxed{\phi_x=-\frac y{r^2}=-\frac{\sin\phi}{r},\qquad
\phi_y=\frac x{r^2}=\frac{\cos\phi}{r}.}
$$
These are local <partial derivatives> on a consistent angular branch, independent of where its branch cut is placed.