# Obtaining circle circumference by Integrating in cartesian coordinates

Is it possible to obtain the circumference of a circle by Integrating a Term like

$$I = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\delta(x^2+y^2-r^2)dxdy$$

in cartesian coordinates? I do of course know how to obtain the result in a polar coordinate system. Evaluating the Integral in cartesian coordinates does, however, not seem to make sense.

By restricting ourselves to the first quadrant in the x-y plane and integrating over x we obtain $$\frac{I}{4} = \int_{0}^{r}\frac{1}{2\sqrt{r^2-y^2}}dy = \frac{\pi}{4}$$

which is not the desired result. I am suspect of this approach since integrating over $\delta(\frac{x^2+y^2}{r^2} -1)$ in the original term would yield a different result.

My question is whether there is any way to properly evaluate terms like this without changing to a different coordinate system.

Try to evaluate $$I_2 = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\delta\left(\underbrace{\sqrt{x^2+y^2}-r}_{g(x)}\right)dxdy\ ,$$ instead...
This entails $$\sqrt{x^2+y^2}=r\Rightarrow x^*=\pm\sqrt{r^2-y^2}\ .$$ Therefore $$I_2=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\frac{\delta\left(x-\sqrt{r^2-y^2}\right)}{|g'(x^*)|}dxdy+\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\frac{\delta\left(x+\sqrt{r^2-y^2}\right)}{|g'(x^*)|}dxdy$$ $$=2\int_{-r}^r dy\frac{r}{\sqrt{r^2-y^2}}=2\pi r\ .$$
Magic of the Dirac delta, $I\neq I_2$....