# Integral calculation with exponential

What is the integral: \begin{align} \int_{-\infty}^{+\infty}\frac{1}{\sqrt{4\pi}}e^{x}e^{-\frac{x^2}{4}}dx \end{align} I tried with the change of variable $$y=e^x$$, but without any success.

• Hint: Complete the square in the exponent. Do you know the formula for $\int_{-\infty}^\infty e^{-x^2}\; dx$? – Robert Israel Mar 31 at 19:43

Perhaps this will help: $$e^{x}e^{-\frac{x^2}{4}}=e\cdot e^{\frac{-4+4x-x^2}{4}}$$
$$= e\cdot e^{\frac{-(x-2)^2}{4}}$$
• Great, it works very well. Here's what I found: $e\cdot \int_{-\infty}^{+\infty} \frac{1}{\sqrt{2\pi}\sqrt{2}}\exp(-\frac{(x-2)^2}{2\cdot2})dx = e \cdot 1$ where we recognize the pdf of the normal $N(2,2)$ – Victor Mar 31 at 19:53