How to compute $\int_{-\infty}^{\infty} | e^{-(y-a)^2/2}-e^{-(y+a)^2/2}| dy$

81 Views Asked by At

I am looking on how to compute or a table of integral that has solution to \begin{align*} \int_{-\infty}^{\infty} | e^{-(y-a)^2/2}-e^{-(y+a)^2/2}| dy \end{align*} Using Wolfram-alpha I found it to be $ 2\sqrt{2 \pi } {\rm erf} \left( \frac{|a|}{\sqrt{2}} \right)$, but I would like a solid reference or a proof.

1

There are 1 best solutions below

0
On BEST ANSWER

The integral is, by symmetry,

$$2 \int_0^{\infty} dy \, \left ( e^{-(y-a)^2/2} - e^{-(y+a)^2/2} \right ) $$

which is

$$\begin{align}2 \int_{-a}^{\infty} dy \, e^{-y^2/2} - 2 \int_{a}^{\infty} dy \, e^{-y^2/2} &= 2 \sqrt{2} \int_{-a/\sqrt{2}}^{\infty} dy \, e^{-y^2}-2 \sqrt{2} \int_{a/\sqrt{2}}^{\infty} dy \, e^{-y^2} \\ &= 2 \sqrt{2} \int_{-a/\sqrt{2}}^{a/\sqrt{2}} dy \, e^{-y^2} \\ &=4 \sqrt{2} \frac{\sqrt{\pi}}{2} \operatorname{erf}{\left (\frac{a}{\sqrt{2}} \right )}\end{align}$$

The result follows.