integral to infinity + imaginary constant

A proof I’m reading tries to evaluate the integral (where $i$ is the regular imaginary unit)

$$\int_{-\infty}^{\infty} e^{-(x-\alpha i)^2}\mathrm{d}x$$

by doing a substitution $u=x-\alpha i$. Normally, one would also have to change the bounds of integration.

$$\int_{-\infty+\alpha i}^{\infty+\alpha i} e^{-x^2}\mathrm{d}x$$

But this proof leaves the bounds as +/- infinity.

$$\int_{-\infty}^{\infty} e^{-x^2}\mathrm{d}x$$

Why is this valid?

Solutions Collecting From Web of "integral to infinity + imaginary constant"

Consider

$$\oint_C dz \, e^{-z^2}$$

where $C$ is a rectangle having vertices $-R$, $R$, $R+i \alpha$, $-R+i \alpha$. By Cauchy’s Theorem, this integral is zero. On the other hand, it is also equal to

$$\int_{-R+i \alpha}^{R+i \alpha} dx \, e^{-x^2} + i \int_{\alpha}^0 dy \, e^{-(R+i y)^2} -\int_{-R}^R dx \, e^{-x^2} -i \int_0^{\alpha} dy \, e^{-(-R + i y)^2} $$

As $R\to\infty$, the 2nd and 4th integrals vanish because each integral is bounded by the value

$$e^{-R^2} \int_0^{\alpha} dy \, e^{y^2} \le |\alpha| e^{-(R^2-\alpha^2)}$$

Thus, we are left with the equality

$$\int_{-\infty}^{\infty} dx \, e^{-x^2} = \int_{-R+i \alpha}^{R+i \alpha} dx \, e^{-x^2}$$

as was to be shown.