I'm looking for a function $f(x)$ that approximates Dirac's $\delta$ distribution that has the following properties:
- $f\in C^\infty(\mathbf R)$, it has finite derivatives of all orders.
- $f$ has a simple definition (in increasing complexity: polynomial $\rightarrow$ rational $\rightarrow$ exponentials $\rightarrow$ trigonometric/hyperbollic ). Ideally it has a simple expression, but if necessary it can also be defined piecewise.
- $f$ has bounded support, its only nonzero values occur within a closed interval centered at the origin.
- $f$ approximates the $\delta$ distribution in the sense that it has total integral of $1$, it is a symmetric function, and it has a parameter $\lambda$ that can be adjusted such that in the limit of either $\lambda\to0$ or $\lambda\to\infty$ you have $f(0)\to\infty$ and $f(x\neq0)\to0$.
Does such a function exist? If so, what's the simplest one you know of?
I need this function for a program I'm writing, (3) and (4) are very necessary for me. If the restrictions are too harsh it's OK as long as $f$ is at least continuously differentiable or even if $f$ doesn't satisfy (2) in the sense that it's defined in terms of more complicated transcendental functions I could work around it.
Example of functions that approximate the $\delta$ distribution but don't satisfy all requirements are:
- $\frac{1}{2\lambda}[1-\tanh^2(x/\lambda)]$ is $C^\infty$, simple, but doesn't have bounded support.
- The function $\frac{1}{\lambda}\zeta(x/\lambda)$ in this other MSE post has compact-, and therefore bounded-, support but it doesn't have a simple expression as it is defined in terms of a transcendental function.
- The piecewise defined function $f(x)=\{0, ~\text{if}~ |x|>\frac{\pi\lambda}{2}; \quad\frac{2}{\pi\lambda}\cos^2(x/\lambda), ~\text{if}~ |x|\leq\frac{\pi\lambda}{2}$. It does have bounded support but its expression is not so simple because it's defined piecewise and it also violates (1), since it's second derivative is discontinuous.
Thanks.