3
$\begingroup$

I am using an approximation of the $\delta(x)$ function, in a numerical simulation, given by, $$\delta_\epsilon(x) = \frac{1}{\epsilon\sqrt{\pi}}\exp\left[-\left(\frac{x}{\epsilon}\right)^2\right]$$

The problem now is to estimate the error due to this approximation. I'm not even exactly sure what I mean by the error here (some meaningful measure of how far it's from $\delta(x)$). Since the latter is a distribution and not an exact function, I thought of considering the following to be the relative error, $$E_\epsilon = \frac{1}{ \int_{-\infty}^{\infty} f(x)\delta(x)}\left[\int_{-\infty}^{\infty} f(x)\delta_\epsilon(x) - \int_{-\infty}^{\infty} f(x)\delta(x)\right]$$

Assume that $f(x)$ goes to $0$ at $\pm \infty$, $f(0)\neq 0$ and is finite, and $f'(x)$ exists everywhere (smooth,well-behaved function). At this point, I'm stuck. I tried using integration by parts, but that is not providing any intuitive answer. Can someone help by providing any insight on this matter? Some other intuitive definition of error might also be used and/or references are welcome. I couldn't find a lot of relevant material online.

Edit 1: An order of magnitude estimate of the error as a function of $\epsilon$ and possibly some functional values is also sufficient for my purposes.

$\endgroup$
3
  • 1
    $\begingroup$ Nice question. Here is a very similar one math.stackexchange.com/questions/463724/… $\endgroup$
    – lcv
    May 25 '20 at 6:31
  • $\begingroup$ I just saw this link. Thanks. I'll try and proceed similarly for this. Any other conclusive proof/estimate is also welcome. $\endgroup$
    – Lelouch
    May 25 '20 at 13:03
  • 1
    $\begingroup$ A remark also about the choice of the error. You are measuring here the error of the weak convergence with respect to a chosen function of $C^1$. There is a distance associated to this topology called the Wasserstein or Monge-Kantorovitch distance, related to optimal transport. It is a usual way to measure distances between probability measures. $\endgroup$
    – LL 3.14
    May 25 '20 at 18:22
2
$\begingroup$

EDIT:

Obviously the "error" depends on $f(x)$.

Expanding $f(x)$ to second order should do the trick ( first order will vanish): $\int[f(0)+xf′(0)+{1\over2}x^2f′′(0)]{\delta}_{\epsilon}(x)dx=f(0)+{1\over2}f′′(0)\int x^2{\delta}_{\epsilon}(x)dx$ should be good enough for small enough $\epsilon$

However, Let me propose something else:

You are using $\delta_{\epsilon}(x)$ in a simulation, so you can run the simulation several times with various values of $\epsilon$. The difference in the results as a function of $\epsilon$ is a measure of how far you are from the "true" result. I believe this is part of what is called sensitivity analysis (https://en.wikipedia.org/wiki/Sensitivity_analysis).

$\endgroup$
2
  • $\begingroup$ I thought about doing the same, and will probably be doing it if I cannot find a theoretical estimate. The $f(x)$ for me contains over 7000 terms and is a pain to deal with even numerically. Also, I understand that it depends on $f(x)$ - maybe the error is something like $f'(x)\epsilon^2$ or something, but is it possible to obtain such an expression theoretically ? $\endgroup$
    – Lelouch
    May 25 '20 at 13:02
  • $\begingroup$ edited the answer to add the second order expansion $\endgroup$
    – user619894
    May 25 '20 at 13:35
1
$\begingroup$

Let us assume further that $f''(x)$ also exists and that we have $$ f(x+h)=f(x)+hf'(x)+\frac{h^2}2f''(x)+o\!\left(h^2\right) $$ We can compute $$ \frac1{\epsilon\sqrt\pi}\int_{-\infty}^\infty e^{-(x/\epsilon)^2}\,\mathrm{d}x=1 $$ $$ \frac1{\epsilon\sqrt\pi}\int_{-\infty}^\infty xe^{-(x/\epsilon)^2}\,\mathrm{d}x=0 $$ $$ \frac1{\epsilon\sqrt\pi}\int_{-\infty}^\infty x^2 e^{-(x/\epsilon)^2}\,\mathrm{d}x=\frac{\epsilon^2}2 $$ Then $$ \begin{align} &\int_{-\infty}^\infty f(x)\,\delta_\epsilon(x-y)\,\mathrm{d}x\\ &=\int_{-\infty}^\infty \left[f(y)+(x-y)f'(y)+\frac{(x-y)^2}2f''(y)+o\!\left((x-y)^2\right)\right]\delta_\epsilon(x-y)\,\mathrm{d}x\\ &=f(y)+\frac{\epsilon^2}{4}f''(y)+o\!\left(\epsilon^2\right) \end{align} $$ Thus, the error, for small $\epsilon$, is approximately $$ \frac{\epsilon^2}4f''(y) $$

$\endgroup$
2
  • $\begingroup$ Shouldn't the error be $1/4$... (that is $1/2$ of what you wrote)? $\endgroup$
    – lcv
    May 25 '20 at 18:08
  • 1
    $\begingroup$ Yes. I didn't combine the two $\frac12$s. Thanks. $\endgroup$
    – robjohn
    May 25 '20 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.