Numerical integration with delta functions?

I would like to integrate the following numerically:

$$\int\limits_{-\infty}^{+\infty} \int\limits_{-\infty}^{+\infty} \delta(x^2+y^2-1) dx dy = \pi$$

I could replace the dirac delta function with a Gaussian and divide the grid up into small pieces. But I have a feeling that the grid will just "miss" the delta function peak. I think I would have to adjust the grid along with the sharpness of the Gaussian simultaneously. Is there some theory and practice that is commonly known about how to do this?

(I know there are other ways to solve this integral but I am particularly interested to solve it numerically in a 2D grid.)

• Use polar coordinates – Yuriy S Oct 19 '18 at 17:12
• Maybe, if you really don't want to make your life easier, use Fourier integral definition of the delta-function? $$\int _{-\infty }^{\infty }1\cdot e^{2\pi ix\xi }\,d\xi =\delta (x)$$ – Yuriy S Oct 19 '18 at 17:17