Numerical integration with delta functions?

501 Views Asked by At

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.)