Curl of gradient is not zero I have heard that for some functions $T$, if we calculate $\nabla \times (\nabla  T )$ in $2$-dimensional polar coordinates, then we get the delta function. Why do we get that result?
 A: Consider $T = \theta$, the angular polar coordinate. This is badly behaved at the origin, and cannot be defined continuously around the origin (although $\nabla \theta$ can be), so we will need some new ideas to make sense of $\nabla \times \nabla \theta$. Let's try!

One sensible thing we could do is compute the area integral
$$ I = \int_{S} {\rm d}^2x \ \nabla \times \nabla \theta$$
using Stokes's Theorem to convert it into a line integral:
$$ I = \int_{\partial S} {\rm d} {\bf l} \cdot \nabla \theta$$
Here, $\partial S$ is the boundary of $S$, so it is a circle if $S$ is a disc.
Now this is the integral of a total derivative along a line, and generally that just evaluated to the difference of the function at the start and end points:
$$ I = \theta[\mbox{end}] - \theta[\mbox{start}]$$
But the start and end points are the same, because the boundary is a closed loop!
Suppose that the area $S$ did not include the origin. Then $\theta$ is just a smooth continuous function. Hence $I = 0$.
But suppose it did include the origin. Now the loop $\partial S$ goes around the origin! But $\theta$ is discontinuous as you go around a circle. In particular, it is $2\pi$ bigger after going around the origin once. Hence $I = 2\pi$.
Thus
$$I = \begin{cases} 2\pi & \mbox{if $S$ contains $\bf 0$} \\ 0 & \mbox{otherwise} \end{cases}$$
and consequently
$$\nabla \times \nabla \theta = 2\pi \delta({\bf x})$$

There are other ways to think about this result, but this is one of the most natural!
Note that the above argument shows that this situation is inherently about non-single-valued functions, with branch cuts. This is very closely related with the fact that the usual 2D Green's function for the Laplacian is proportional to $\log r$, but $\log r$ cannot be extended continuously to the complex plane without a branch cut.
(Indeed, look at $\log (r e^{i\theta}) = \log r + i \theta$. This shows that $\theta$ is the harmonic conjugate of $\log r$. This is why it appears in the solution.)
