Integral bounds that include imaginary (complex) values I need to do an integration. But I have some doubt on the integration bounds. I need to find the Fourier transform of the function $f(x) = e^{-\frac{x^2}{2\sigma^2}}$.
To come to the main point I will omit some steps and factors in front the integral. We get: $$\tilde f(k) = \int_{\mathbb{R}} e^{-\frac{x^2}{2\sigma^2}}e^{-ikx} dx= \int_{\mathbb{R}}e^{-(\frac{x}{\sqrt{2}\sigma}+\frac{\sqrt 2 \sigma k i}{2})^2+\frac{\sigma^2k^2}{2}} dx. $$ A variable substitution leads to:
$y:= \frac{x}{\sqrt{2}\sigma}+\frac{\sqrt 2 \sigma k i}{2}, \,\,dy = dx.$ The integral bounds due to the variable substitution are now difficult to set. Are the new bounds $y\rightarrow \infty + \frac{\sqrt 2 \sigma k }{2}i, y \rightarrow -\infty + \frac{\sqrt 2 \sigma k }{2}i$ or simply $y\rightarrow \infty, y\rightarrow -\infty \,\,$ ? In case the former is true, will the integral be $\sqrt \pi$ as expected for the Gaussian function ? Can you explain that.
I thank you for any comment.
 A: In making the proposed substitution, the new limits of integration do indeed become complex valued.  Use of Cauchy's Integral Theorem permits a contour deformation back on the real axis.  Let's see how this works.

First, let $F(k)$ be the Fourier Transform of $f(x)=e^{-x^2/2\sigma^2}$.  Then,
$$\begin{align}
F(k)&=\int_{-\infty}^\infty f(x)e^{-ikx}\,dx\\\\
&=\int_{-\infty}^\infty e^{-x^2/2\sigma^2} e^{-ikx}\,dx\\\\
&=\sqrt{2}\sigma \int_{-\infty}^\infty e^{-x^2} e^{-ik\sqrt{2} \sigma x}\,dx\\\\
&=\sqrt{2}\sigma e^{-\sigma^2k^2/2}\int_{-\infty}^\infty e^{-(x+i\sigma k/\sqrt{2})^2}\,dx\tag1
\end{align}$$

Next, we move to the complex plane and make the change of variable $z=x+i\sigma k/\sqrt{2}$.  Then, we see from $(1)$ that
$$F(k) =\sqrt{2}\sigma e^{-\sigma^2k^2/2} \int_{-\infty+i\sigma k/\sqrt{2}}^{\infty+i\sigma k/\sqrt{2}} e^{-z^2}\,dz\tag2$$

Using Cauchy's Integral Theorem, we can deform the implied staight-line contour integral in $(2)$ and write
$$\begin{align}
F(k) &=\sqrt{2}\sigma e^{-\sigma^2k^2/2}\int_{-\infty}^\infty e^{-x^2}\,dx\\\\
&+\sqrt{2}\sigma e^{-\sigma^2k^2/2} \lim_{R\to\infty}\int_0^{\sigma k/\sqrt{2}}e^{-(R+iy)^2}\,dy\\\\
&-\sqrt{2}\sigma e^{-\sigma^2k^2/2} \lim_{R\to\infty}\int_0^{\sigma k/\sqrt{2}}e^{-(-R+iy)^2}\,dy\tag3
\end{align}$$

Finally, it is easy to show that both of the limits in $(3)$ are zero from which we conclude that
$$\begin{align}
F(k)&=\sqrt{2}\sigma e^{-\sigma^2k^2/2}\int_{-\infty}^\infty e^{-x^2}\,dx\\\\
&=\sqrt{2\pi\sigma^2}e^{-\sigma^2 k^2/2} 
\end{align}$$
as expected!
