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

  • $\begingroup$ Use polar coordinates $\endgroup$ – Yuriy S Oct 19 '18 at 17:12
  • $\begingroup$ 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)$$ $\endgroup$ – Yuriy S Oct 19 '18 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.