In section 15.2, Strang's Calculus explains that for any gradient field $\bf{F} = Mi + Nj$, ${\partial M \over \partial y} = {\partial N \over \partial x}$. (Strang calls this "test D" for identifying a vector field as being a gradient of some function.)
This makes sense, since the components of a "gradient field" are the partial derivatives of some function $f$, and we know that for any $f$, ${\partial f \over \partial x \partial y} = {\partial f \over \partial y \partial x}$.
The gradient of $f = \tan^{-1}\left({y \over x}\right)$ is ${-y \over x^2 + y^2}i + {x \over x^2 + y^2}j$. However, this vector field does not seem to pass "test D", since
$$ {\partial \over \partial x}\left({-y \over x^2 + y^2}\right) = {2xy \over (x^2 + y^2)^2} $$
But
$$ {\partial \over \partial y}\left({x \over x^2 + y^2}\right) = -{2xy \over (x^2 + y^2)^2} $$
I'm sure something is wrong with my reasoning, but I am struggling to find the mistake. Can anyone point it out?
You have a tiny mistake.
What you did: $$ {\partial \over \partial x}\left({-y \over x^2 + y^2}\right) $$
$$ {\partial \over \partial y}\left({x \over x^2 + y^2}\right) $$
but you should do:
$$ {\partial \over \partial y}\left({-y \over x^2 + y^2}\right) (1) $$
$$ {\partial \over \partial x}\left({x \over x^2 + y^2}\right) (2) $$
(notice that the first is differentiated with respect to $y$ not $x$ like you did.
we get $(1)=(2)=\frac{y^2-x^2}{(x^2+y^2){^2}}$ which confirms that this is indeed a gradient field.