Dirac Delta from cartesian to polar coordinates An infinitely long wire carries a constant electric current $I$ along the $z$ axis. Thus, the current density $\mathbf{j}$ of the wire is given by, in cartesian coordinates:
$$\mathbf{j}(\mathbf{r})=I\delta(x)\delta(y)\mathbf{\hat{z}}$$
I am required to calculate the following integral:
$$\mathcal{I}=\iint_S\mathbf{j}(\mathbf{r})\cdot\mathbf{\hat{z}}\ \text{d}S$$
Where $S$ is a circle with radius $R>0$ on the $[XY]$ plane. Calculating $\mathcal{I}$ in cartesian coordinates gives:
$$\mathcal{I}_{\text{cartesian}}=I\int_{-R}^{+R}\int_{-\sqrt{R^2-x^2}}^{+\sqrt{R^2-x^2}}\delta(x)\delta(y)\ \text{d}y\text{d}x\underbrace{=}_{0\in(-\sqrt{R^2-x^2},+\sqrt{R^2-x^2})}I\int_{-R}^{+R}\delta(x)\ \text{d}x\underbrace{=}_{0\in[-R,+R]}I$$
However, when I try to calculate the integral using polar coordinates, where:
$$\delta(x)\delta(y)=\frac{\delta(r)}{2\pi r}$$
I get:
$$\mathcal{I}_{\text{polar}}=I\int_{0}^{2\pi}\int_{0}^{R}\frac{\delta(r)}{2\pi r}\ r\text{d}r\text{d}\theta=I\int_0^R\delta(r)\ \text{d}r$$
Because of course $\mathcal{I}_{\text{cartesian}}=\mathcal{I}_{\text{polar}}$, the integral I got should be equal to $1$, but I don't understand why. From my personal experience, integrals like this, where the zero of the argument of the dirac-delta function is one of the integral limits, are not well-defined. Why then in this case it is equal to $1$? I suspect my construction of the integral is wrong, but I'm not sure where I was wrong.
Thanks!
 A: This comes from the fact that the Dirac delta is not a function but a measure and so one should not use the integral notation with upper and lower bounds to be rigorous. In particular, with this integral notation one cannot make the difference between $\delta_0([0,1]) = \int_{[0,1]} \delta_0(\mathrm{d}x) = 1 ≠ \int_{(0,1)} \delta_0(\mathrm{d}x)= 0$. This is a property of the Lebesgue measure and of any measure absolutely continuous with respect to the Lebesgue measure. For such an absolutely continuous measure $ \mu$, there exists a function $f_\mu$ such that $\mu(\mathrm{d}x) = f(x)\,\mathrm{d}x$ and then
$$
\mu([a,b]) = \int_{[a,b]} \mu(\mathrm{d}x) = \int_a^b f(x)\,\mathrm{d}x = \int_{(a,b)} \mu(\mathrm{d}x).
$$
With that in mind, you understand that in the same way for your double integral, the change of variable in polar coordinates changes $\mathbb{R}^2$ into $([0,2\pi)× (0,\infty)) \cup \{0\}$.
A: $\def\vr{{\bf r}}$Consider the integral
$$I = \int_{\mathbb{R}^d} 
g(\vr)\delta(\vr-\vr_0)dV_d.$$
(Here $dV_d = \prod_{i=1}^d dx_i$ is the $d$-dimensional volume element in Euclidean space.)
A standard delta sequence on $\mathbb{R}$ is
$$\delta_n(x)=\sqrt{\frac{n}{\pi}}e^{-nx^2}$$
so $I = \lim_{n\to\infty}I_n$ where
\begin{align*}
I_n &= \int_{\mathbb{R}^d} 
g(\vr)
\left(
\prod_{i=1}^d \delta_n(x_i-x_{i0}
\right)
dV_d \\
&= \int_{\mathbb{R}^d} 
g(\vr)
\left(\prod_{i=1}^d 
\sqrt{\frac{n}{\pi}}e^{-n(x_i-x_{i0})^2}
\right)
dV_d \\
&= \int_{\mathbb{R}^d} 
g(\vr) 
\left(\frac{n}{\pi}\right)^{d/2} 
e^{-n(\vr-\vr_0)^2} dV_d.
\end{align*}
Now assume that
$\vr_0 = {\bf 0}$ and
$g = g(r)$.
Then
\begin{align*}
I_n &= \int_{\mathbb{R}^d} g(r) 
\left(\frac{n}{\pi}\right)^{d/2} 
e^{-n r^2} dV_d \\
&= 
\int_{\textrm{solid angle}} \int_0^\infty 
g(r) \left(\frac{n}{\pi}\right)^{d/2} 
e^{-n r^2} r^{d-1}  dr \,d\Omega_d 
    & (\textrm{hyperspherical coordinates})\\
&= \Omega_d \int_0^\infty 
g(r) \left(\frac{n}{\pi}\right)^{d/2} 
r^{d-1} e^{-n r^2}  dr 
    & (\textrm{$g=g(r)$ used}) \\
&= \frac {2 \pi^{d/2}} {\Gamma (d/2)} 
\int_0^\infty 
g(r) \left(\frac{n}{\pi}\right)^{d/2} 
r^{d-1} e^{-n r^2}  dr
    & (\textrm{known result for $\Omega_d$})\\
&= \int_0^\infty 
g(r) 
\frac{2 n^{d/2}}{\Gamma(d/2)}
r^{d-1} e^{-n r^2}  dr.
\end{align*}
Thus,
$$\delta_n(r) = \frac{2 n^{d/2}}{\Gamma(d/2)}
r^{d-1} e^{-n r^2}$$
must be a delta sequence for $\delta(r)$.
Critically, note that
$$\int_0^\infty \delta_n(r) dr = 1$$
for any $n>0$.
Also, for $d>1$ we have $\delta_n(0) = 0$ and
$\operatorname{argmax}\,\delta_n(r) = \sqrt{\frac{d-1}{2n}} > 0$.
This gives us the fruitful intuition that the "spike" for $\delta(r)$ is not at $r=0$, but at $r=0^+$.
For $d=2$ we find
$$\delta_n(r) = 2 n r e^{-n r^2} dr.$$
Below we give a plot of $\delta_n(r)$ for $d=2$ and $n=10,100,1000$.

Figure 1. $\delta_n(r)$ for $d=2$ and  $n=10,100,1000$.
