Numerical integration of an integrand including the dirac delta function

253 Views Asked by At

I have the following,

$$\int_0^{2\pi} d\xi \, R(\xi) \, \delta[\mathbf{r} - \mathbf{R}(\xi)]$$

I need to evaluate this numerically on a series of grids. The dirac delta function serves to interpolate between two grids, a regular spacial grid (for $\mathbf{r}$) and the $\xi$ grid, which has length $N_\xi$. The two grids are mapped together by finding the spacial position given by $\xi$, e.g. $\mathbf{R}(\xi)$. The spacial grid and the $\xi$ position do not line up perfectly, and I interpolate between the two with a nearest neighbor approach (I believe this is implied by the dirac delta). The integral is calculated by finding the point in the $\mathbf{r}$ grid closest to $\mathbf{R}(\xi)$ and adding $R(\xi)$ to it for all points in the $\xi$ grid.

Unfortunately, my result ends up being exactly $\frac{N_\xi}{2\pi}$ too large, and I think this has to do with translating the integral over $\xi$ into a sum (something to do with the dirac delta function?).

Could someone explain this to me?