# Why is the curl of the gradient of the polar angle phi zero, counter to my intuition?

I was trying to test my intuition about curl and divergence by constructing vector functions whose curl and divergence I think I have intuitive expectations about. An idea I came up with was to think of a scalar function with some shape whose gradient I would intuitively expect to have the desired property. I thought, for example, the function $$\phi=\arctan(y/x)$$ can be geometrically thought of as a staircase of linearly increasing angle winding around the origin. Therefore I thought that $$\vec{\nabla}\phi$$ would be a vector field whirlpooling around the z-axis (i.e. in the x-y plane), and therefore would have a nonzero curl in the z direction at (0,0). However in this case $$\vec{\nabla}\times\vec{\nabla}\phi = \vec{0}$$ for all (x,y), contrary to my expectation. What is wrong about my intuition here?

• curl of a gradient is always zero. Because partial derivatives commute Oct 20 '20 at 0:29
• @WillJagy, thanks, that seems to put a damper on my idea, but my intuition is still lacking, given what I've written above: the gradient in this case surely seems to be circulating uniformly about the origin, and the rate of change that the angle sweeps is independent of r, so shouldn't decrease near the origin. What am I missing? Oct 20 '20 at 1:59
• $\phi$ is undefined at the origin (and so also its gradient and the curl of its gradient), so the question doesn't really make sense. Oct 20 '20 at 4:58
• @HansLundmark This can't be the whole story: 1) my intuition is that what matters is what is happening infinitesimally away from the origin, and 2) there are classic counterexamples to your claim, such as the potential/E-field of a point charge that has a well-defined divergence, etc, right? Oct 20 '20 at 13:10
• @user1247: You claim in your question that the curl of the gradient is zero for all $(x,y)$, which is simply not true, since it's undefined for $(x,y)=(0,0)$. Your item (1) I don't understand. For item (2), it's also undefined at the location of the point charge. Oct 20 '20 at 13:58

The curl of the gradient is zero away from the origin, but the singular contribution at the origin integrates with the help of Stokes' theorem to $$\int\int_S \hat{z}\cdot(\nabla\times\nabla\phi)\,dxdy=\oint_{\delta S}\nabla\phi\cdot dl=2\pi.$$ Here $$\hat{z}$$ is a unit vector in the $$z$$-direction, $$\phi$$ is the polar angle in the $$x$$-$$y$$ plane, $$S$$ is any surface in the $$x$$-$$y$$ plane containing the origin, $$\delta S$$ is its perimeter and the final integral equals the amount the angle $$\phi$$ increases as we go once around the perimeter.
This integral is expressed by the identification $$\nabla\times\nabla\phi=2\pi\delta(x)\delta(y)\hat{z}.$$
• Thanks, this is helpful. I guess my confusion at root is just that $\vec{\nabla}\times\vec{\nabla}\phi$ seems to be identically equal to $\vec{0}$ for all (x,y), even at the origin, but I should have realized that this curl is invalid at the origin because $\vec{\nabla}\phi$ is singular there. Nov 14 '20 at 0:38
If $$\phi=arctan(y/x)$$ is electric scalar potential, I believe that $$\phi$$ is single valued. If $$\phi$$ is single valued, the vector $$\nabla\phi$$ directs in reverse within the small region $$(2\pi-\epsilon)<\theta<2\pi$$, where $$\epsilon$$ is some positive small number. Thus the vector $$\nabla\phi$$ field is not whirlpooling around the z-axis.