# Complex integration with guassian integral and a complex term added to it

How can I integrate this function using complex integration it is the guassian integral with some complex terms added to it

$$\int_{-\infty}^{\infty} e^{-0.5(x+ik)^2}dx$$ where $k$ is a constant.

Wolfram alpha says the answer is $\sqrt{2 \pi}$ which I obtain when I integrate the function

$$\int_{-\infty}^{\infty} e^{-0.5x^2}dx$$ which is not that hard but how do I show the other trailing terms go to 0?

Would this be sufficient ? $$\int e^{-\frac{1}{2} (x+i k)^2}\,dx=i \sqrt{\frac{\pi }{2}} \text{erfi}\left(\frac{k-i x}{\sqrt{2}}\right)=i \sqrt{\frac{\pi }{2}} \text{erfi}\left(-i\frac{(x+ik)}{\sqrt{2}}\right)=-\sqrt{\frac{\pi }{2}} \text{erf}\left(-\frac{x+ik}{\sqrt{2}}\right)=\sqrt{\frac{\pi }{2}} \text{erf}\left(\frac{x+ik}{\sqrt{2}}\right)$$