Characteristic Function of Gaussian/ Change of Variables in Complex Plane In the process of finding the characteristic function of a Guassian random variable, one must evaluate the following integral:
$$
\int_{-\infty}^{\infty} e^{-(x- it)^2} dx.
$$
One way to evaluate this is to use a contour integral over a rectangle and then use the residue theorem.  This is presumably rigorous.  Another short cut is to use the substitution $y = x-it$, which converts the integral into a standard integral on the real line.  Note that $dy/dx = 1$.  My question is whether this method is rigorous or can be rigorously justified?
 A: Here is one approach that does not require a change of variables and contour deformation.  First we write
$$\begin{align}
\int_{-\infty}^\infty e^{-(x-it)^2}\,dx&=e^{t^2}\int_{-\infty}^\infty e^{-x^2+i2xt}\,dx\\\\
&=e^{t^2}\int_{-\infty}^\infty e^{-x^2}\cos(2tx)\,dx\tag1
\end{align}$$
Let $f(t)$ be given by the integral
$$f(t)=\int_{-\infty}^\infty e^{-x^2}\cos(2tx)\,dx\tag2$$
Differentiation reveals of $(2)$
$$f'(t)=\int_{-\infty}^\infty (-2xe^{-x^2})\sin(2tx)\,dx\tag3$$
Integrating by parts the integral in $(3)$ with $u=\sin(2tx)$ and $v=e^{-x^2}$ we obtain the ODE
$$f'(t)=-2tf(t) \tag4$$
Using $f(0)=\sqrt \pi$, we find from $(4)$ that 
$$f(t)=\sqrt\pi e^{-t^2}\tag5$$
Substituting $(5)$ into $(1)$ yields the coveted result
$$\int_{-\infty}^\infty e^{-(x-it)^2}\,dx=\sqrt \pi$$
A: 
Another short cut is to use the substitution $y = x-it$, which converts the integral into a standard integral on the real line.

Unless $t = 0$, the substitution transforms the integral into an integral over the horizontal line $\operatorname{Im}(z) = -t$, not over the real line. This method is really part of the contour integral method. If $t > 0$, we consider the contour integral $\displaystyle\oint_{\Gamma(R)} e^{-z^2}\, dz$, where $\Gamma(R)$ is a clockwise-oriented rectangle in the complex plane with vertices at $-R, R, R - it$, and $-R - it$. The integrals of $e^{-z^2}$ along the vertical edges can be shown to be $O(e^{-R^2})$ as $R \to \infty$. Since $e^{-z^2}$ is entire, Cauchy's theorem gives $\displaystyle\oint_{\Gamma(R)} e^{-z^2}\, dz = 0$. Hence $\displaystyle\lim_{R\to \infty} \int_{-R - it}^{R - it} e^{-z^2}\, dz = \lim_{R\to \infty} \int_{-R}^R e^{-x^2}\, dx$, or $$\int_{-\infty}^\infty e^{-(x-it)^2}\, dx = \int_{-\infty}^\infty e^{-x^2}\, dx$$A similar argument holds when $t < 0$.
