How do I compute this integral with a Dirac's delta? While studying probability I encountered this integral
$$I=\int_{\mathbb{R}^2}\exp\left({-\frac{x_1^2+x_2^2}{2}}\right)\delta\left(r-\sqrt{x_1^2+x_2^2}\right)\,dx_1\,dx_2$$
If I compute this in polar coordinates i get
$$I=\int_0^{2\pi}\,d\theta \int_0^{+\infty}\exp\left(-\dfrac{\rho^2}{2} \right)\rho\delta(r-\rho)\,d\rho=2\pi r\exp\left(-\dfrac{r^2}{2}\right)$$
but in cartesian coordinates I only get
$$I=\exp\left(-\frac{r^2}{2}\right)$$
I don't understand why. I just thougth that I was using the Dirac's delta's properties in both cases. I think the first result is the correct one and there is something I don't know about Dirac's delta with more than one variable.
Which result is correct and why?

In Cartesian coordinates, you have
\begin{align}
I=&\ \int dx\ \exp\left(-\frac{x_1^2+x_2^2}{2} \right)\delta(r-\sqrt{x_1^2+x_2^2})\\
 =&\ \int_{r=\sqrt{x_1^2+x_2^2}} d\sigma\ 
\exp\left(-\frac{x_1^2+x_2^2}{2} \right)
\end{align}
since
\begin{align}
|\nabla (r- \sqrt{x_1^2+x_2^2})| = 1.
\end{align}
Hence, it follows that
\begin{align}
I = \int_{r=\sqrt{x_1^2+x_2^2}} d\sigma\ 
\exp\left(-\frac{r^2}{2} \right) = 2\pi r\exp\left(-\frac{r^2}{2} \right).
\end{align}
