# How does one approximate a real function as a sum of delta functions?

As a physicist, I have frequently encountered the argument that a function may be approximated as a sum of delta functions. However, the exact correspondence is never given. What is it?

My attempt yields the following equation:

$$f(x) \approx f_{\text{approx}}(x) \equiv \sum_n \delta(x-x_n) \, \Delta x \, f(x_n)$$

where $\Delta x$ is understood to be a finite real number approaching zero and $x_n \equiv n \, \Delta x$. I found this by requiring that a definite integral of $f_{\text{approx}}$ over a given interval should tend toward the definite integral of $f$ over that same integral.

Formally we have $\displaystyle f(x)=\int_{-\infty}^\infty f(y)\delta(x-y)\,dy\,,$ and approximating this integral by its corresponding Riemann sums gives what you wrote, in a physicist's sense.