Problem in limit involving Dirac Delta

dirac deltaintegration

I want to compute the following integral:
$$
\lim_{\epsilon\rightarrow0}\int_{-2}^{\infty}f(x)\phi\left(\frac{x+\epsilon}{\sqrt{2\epsilon}}\right)dx\tag{1}
$$

where $f(x)=\frac{1}{1+\exp\left\{ -x\right\} }$ and $\phi\left(\cdot\right)$
is the normal pdf. It seems to me $\phi\left(\frac{x+\epsilon}{\sqrt{2\epsilon}}\right)$
is a ''nascent delta function'', but I am not sure. That is I guess
that $\lim_{\epsilon\rightarrow0}\int_{-\infty}^{\infty}\phi\left(\frac{x+\epsilon}{\sqrt{2\epsilon}}\right)g(x)=g(0)$
for any function $g(\cdot)$. Suppose it is nascent delta function indeed.
Then, I get that:
$$
\lim_{\epsilon\rightarrow0}\int_{-2}^{\infty}f(x)\phi\left(\frac{x+\epsilon}{\sqrt{2\epsilon}}\right)dx=f(0)=0.5
$$

But when I plot the function inside the limit in (1) on matlab for
small values of epsilon I get the graph below. Notice that as $\epsilon$ goes to zero, the plot matlab gives me does not go to 0.5 as expected, since my integral is a continuous function of $\epsilon$. I have no idea about what is going on.
enter image description here

Best Answer

The usual nascent delta function is $\frac{1}{\epsilon}\phi(\frac{x}{\epsilon})$, from which the substitution $y=\frac{x}{\epsilon}$ reveals the limiting behaviour. Your example is more involved. We have$$\phi\bigg(\frac{x+\epsilon}{\sqrt{2\epsilon}}\bigg)=\frac{1}{\sqrt{2\pi}}\exp\bigg(-\frac{x^2}{4\epsilon}-\frac{x}{2}-\frac{\epsilon}{4}\bigg),$$so$$f(x)\phi\bigg(\frac{x+\epsilon}{\sqrt{2\epsilon}}\bigg)=\sqrt{2\epsilon}\exp-\frac{\epsilon}{4}\frac{f(x)\exp -\frac{x}{2}}{\sqrt{4\pi\epsilon}}\exp\bigg(-\frac{x^2}{4\epsilon}\bigg).$$Why did I write it in that complicated way? Well,$$\lim_{\epsilon\to 0^+}\int_{-2}^\infty f(x)\phi\bigg(\frac{x+\epsilon}{\sqrt{2\epsilon}}\bigg)=\lim_{\epsilon\to 0^+}\sqrt{2\epsilon}\exp-\frac{\epsilon}{4}\int_{-2}^\infty\frac{f(x)\exp -\frac{x}{2}}{\sqrt{4\pi\epsilon}}\exp\bigg(-\frac{x^2}{4\epsilon}\bigg).$$On the right-hand side, the integral $\to f(0)\exp-\frac{0}{2}=f(0)$, but its coefficient $\sqrt{2\epsilon}\exp-\frac{\epsilon}{4}\to 0$.