I understand that $\delta(x)=0$ whenever $x \ne 0$ and that $\displaystyle\int_{x=-a}^{x=b} \delta(x) \, \mathrm{d}x = 1 \space$ $\forall\, a,b \gt 0$ and also that $\displaystyle\int_{x=-\infty}^{x=\infty} \delta(x-a) \, \mathrm{d}x = 1$.
But I see no justification that $\color{blue}{\displaystyle\int_{x=-\infty}^{x=\infty} f(x) \delta(x) \, \mathrm{d}x = f(0)}$ for any arbitrary function $f(x)$.
I'm asking this question because the formula marked blue was given to me in response to this previous related question asked by me. But every-time I search the internet for an explanation of its derivation all I get is the same formula stated without proof. Hence, could someone please prove and/or explain the origin of the formula marked blue?
Thank you.
In most common definitions of the Dirac delta (generalized) function, the formula in your post is taken as a definition. But if, for example, you accept that $\delta(x)$ is the Fourier transform of $1$, then it can be proven as follows:
$$\int_{-\infty}^{\infty} f(x) \delta(x) dx = \int_{-\infty}^{\infty} f(x) \left( \int_{-\infty}^{\infty} e^{-2\pi i kx} dk \right) dx = $$
$$= \int_{-\infty}^{\infty} \left( \int_{-\infty}^{\infty} f(x) e^{-2\pi i kx} dx \right) dk = \int_{-\infty}^{\infty} \tilde{f}(k) dk = \int_{-\infty}^{\infty} \tilde{f}(k) e^{2\pi i k\cdot 0} dk = f(0)$$
where $\tilde{f}(k)$ is the Fourier transform of $f(x)$, and we assume the function is nice enough that we can change the order of integration.