How to calculate the following integral? I am trying to calculate the following integral
$$
\int_{-\infty}^{\infty}\frac{\lambda_{1}}{2}e^{-\lambda_{1}|x|-\frac{\lambda_{2}}{2}x^{2}}dx
$$
After some simplification I got
$$
2\int_{0}^{\infty}\frac{\lambda_{1}}{2}e^{-\lambda_{1} x-\frac{\lambda_{2}}{2}x^{2}}dx
$$
Does anyone know how to continue?
Also, can this be solved using the gamma function?
Thanks.
 A: Note that we can write
$$\begin{align}
I(\lambda_1,\lambda_2)&=\frac{\lambda_1}{2}\int_{-\infty}^\infty e^{-\lambda_1 |x|-\frac12 \lambda_2 x^2}\,dx\\\\
&=\frac{\lambda_1}{2}\int_{-\infty}^\infty e^{-\frac12 \lambda_2 \left(x^2+2\frac{\lambda_1}{\lambda_2}|x|\right)}\,dx\\\\
&=\frac{\lambda_1}{2}e^{ \lambda_1^2/2\lambda_2}\int_{-\infty}^\infty e^{-\frac12 \lambda_2 \left(|x|+\frac{\lambda_1}{\lambda_2}\right)^2}\,dx\\\\
&=\lambda_1 e^{ \lambda_1^2/2\lambda_2}\int_0^\infty e^{-\frac12 \lambda_2 \left(x+\frac{\lambda_1}{\lambda_2}\right)^2}\,dx\\\\
&=\lambda_1 e^{ \lambda_1^2/2\lambda_2}\int_{\lambda_1/\lambda_2}^\infty e^{-\frac12 \lambda_2 x^2}\,dx\\\\
&=\lambda_1 \sqrt{\frac{2}{\lambda_2}}e^{ \lambda_1^2/2\lambda_2}\int_{\lambda_1/\sqrt{2\lambda_2}}^\infty e^{-x^2}\,dx\\\\
&= \sqrt{\frac{\pi \lambda_1^2}{2\lambda_2}}e^{ \lambda_1^2/2\lambda_2}\text{erfc}\left(\sqrt{\frac{\lambda_1^2}{2\lambda_2}}\right)
\end{align}$$
where $\text{erfc}(x)$ is the complementary error function.
A: Using Dr.  MV solution, as the OP asked for it, this is a solution with the incomplete gamma function.
$$I(\lambda_1,\lambda_2)= \sqrt{\frac{ \pi \lambda_1^2}{2\lambda_2}}e^{ \lambda_1^2/2\lambda_2} -\sqrt{\frac{ \lambda_1^2}{2\lambda_2}}e^{ \lambda_1^2/2\lambda_2}\gamma\left({1\over 2},\frac{\lambda_1^2}{2\lambda_2}\right)$$
A: Defining Fourier Transform (FT) by the following formula:
$$\tag{1}\hat f(u):=\int_{-\infty}^{\infty}e^{2i\pi t u}f(t)dt$$
one has the isometry formula:
$$\tag{2}\int_{-\infty}^{\infty}f(t) g(t) dt \ = \ \int_{-\infty}^{\infty}\hat f(u) \hat g(u) du$$
Let us calculate separately (or adapt from tables because they are "avatars" of classical transform pairs) the FT of 


*

*$f(t):=\frac{\lambda_{1}}{2}e^{-\lambda_{1} |t|}$ is $\hat f(u)=\dfrac{\lambda_1^2}{\lambda_1^2+4 \pi^2 u^2}$ ("a symmetric exponential (Laplace dist.) is exchanged with a Cauchy function").

*$g(t):=e^{-\frac{\lambda_2}{2}t^2}$ is $\hat g(u)=\sqrt{\dfrac{2\pi}{\lambda_2}}e^{-\frac{2 \pi^2}{\lambda_2}u^{2}}$ ("a peaky Gaussian function is tranformed into a flat Gaussian function")
It suffices now to apply (2) to obtain:
$$\int_{-\infty}^{+\infty}\dfrac{\lambda_1^2}{\lambda_1^2+4 \pi^2 u^2}\sqrt{\dfrac{2\pi}{\lambda_2}}e^{-\frac{2 \pi^2}{\lambda_2}u^{2}}du=\sqrt{\dfrac{2\pi}{\lambda_2}}\int_{-\infty}^{+\infty}\dfrac{1}{1+(K u)^2}e^{-\frac{1}{2 \sigma^2}u^{2}}du$$
where $K:=\dfrac{2 \pi}{\lambda_1} \ \ \text{and} \ \ \sigma:=\dfrac{\lambda_2}{2 \pi}.$
Expanding into series $\dfrac{1}{1+(K u)^2}=\sum_{n=0}^{\infty}(-1)^n(Ku)^{2n}$, integrating term by term by using the classical moments of the normal distribution ($\hat{m}_{2n} = \sigma^{2n} (2n-1)!!$), one recognizes the development of the complementary error function:
$$\sqrt{\pi}\lambda_3 \text{erfc}(\lambda_3) \ \ \text{where} \ \ \lambda_3:=\dfrac{\lambda_1}{\sqrt{2 \lambda_2}}$$
Remark: I have done at first this computation with Mathematica...
