I have to integrate the following:
$$I = \int _0^a dx \int _0^b dy f(x+y)\delta(x-y) \tag{1}$$
Where $f$ is a generic, non-problematic, function. All the above operates in the real numbers. In my lecture notes is stated that this integral is tricky, because it depends on which variable between $a$ and $b$ is the smallest. We must first integrate over the larger interval. But I don't get why! I would like to really understand how the Dirac delta behaves in this integral.
TL;DR How can we solve (1)?
Best Answer
$\int_0^b dy f(x+y) \delta(x-y)$ is a function of $x$, given by $\begin{cases} f(2x) & x \in (0,b) \\ 0 & x \not \in [0,b] \end{cases}$. Its value at $0$ and $b$ is not defined, but this does not matter for your double integral (because these are just two points and the integrand in the outer integral "is a function" rather than a distribution).
This means that in effect the overall integral is $\int_0^{\min \{ a,b \}} dx f(2x)$. You get the same thing if you do the integral in the other order carefully.