# Calculate $\int_{-\infty}^{+\infty}e^{-\frac{(x-it)^2}{2}}dx$ using contour integration

When one wants to calculate the characteristic function of a random variable which is of normal distribution, things boil down to calculate: $$\int_{-\infty}^{+\infty}e^{-\frac{(x-it)^2}{2}}dx$$ There are several ways to calculate this integral. I tried to calculate this integral using contour integration: $$\oint_C f(z)dz=\int_{-a}^af(z)dz+\int_{Arc(a)}f(z)dz$$ where $$f(z)=e^{-\frac{(z-z_0)^2}{2}}, z_0=it$$ and $C$ is the union of a semicircle and $[-a,a]$. How can I calculate $$\lim_{a\to+\infty}\int_{Arc(a)}f(z)dz?$$ Alternatively, from the very beginning, I get $$\lim_{a\to+\infty}\int_{-a-z_0}^{a-z_0}e^{-\frac{z^2}{2}}dz.$$ But I have no idea how to choose contour.

-
Using an arc is overkill. What integral that is "like" this integral but has a solution that you know? – Thomas Andrews Oct 26 '12 at 15:40

This assumes you already know that $\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$. If that is not already known, this proof will not work.

For $N>0$, let $C_N$ be the rectangle curve that goes from $-N+0i$ to $N+0i$, then $N+0i$ to $N+ti$, then from $N+ti$ to $-N+ti$ and finally from $-N+ti$ to $-N+0i$.

Then $\int_{C_N} e^{-z^2} dz=0$. Note that the size of the contribution of the sides of the rectangle approach zero as $N\to\infty$, so that means that $\lim_{N\to\infty} \left(\int _{-N}^N e^{-x^2}dx - \int_{-N}^N e^{-(x+ti)^2} dx\right) = 0$

-
Second paragraph, should "$-N+ti$ to $0$" be "$-N+ti$ to $-N+0i$"? – Jack Oct 26 '12 at 16:30
Thanks, @Jack. Fixed – Thomas Andrews Oct 26 '12 at 16:32
In the last formula: if i'm not wrong, should $(x+it)$ be $(x-it)$? And do you mean the left and the right vertical sides of the rectangle when you say "sides of the rectangle" in your last paragraph? – Jack Oct 26 '12 at 16:44
@Jack No, it should be $x+ti$. $t$ is some fixed real number. The sides are, as you inferred, the left and right sides of the rectangle (the side from $N+0i$ to $N+ti$ and the side from $-N+ti$ to $-N+0i$) – Thomas Andrews Oct 26 '12 at 17:00
Fair enough, I see. Thanks. – Jack Oct 26 '12 at 18:02

Read the 8-th proof in this delightful paper by K. Conrad. Since he defines a complex function that seems taken out of the blue, you can read there also an explanation for it and references for past papers and books that have that idea.

-

Why not just do this?: $$\begin{eqnarray} I\left(t\right) &=& \int_{-\infty}^{\infty} dx \exp\left[-\frac{1}{2}\left(x-i t\right)^2\right] \\ &=& \int_{-\infty-i t}^{\infty - i t} du \exp\left(-\frac{1}{2} u^2\right) \end{eqnarray}$$ Now deform the contour so that part of it goes along the real axis: $$\begin{eqnarray} I\left(t\right)&=& \lim_{r \rightarrow \infty} \left\{\int_{-t}^{0} dy \exp\left[-\frac{1}{2} \left(-r+iy\right)^2\right] + \int_{0}^{-t} dy \exp\left[-\frac{1}{2} \left(r+iy\right)^2\right]\right\} \\ &+& \int_{-\infty}^{\infty} dx \exp\left(-\frac{1}{2} x^2\right) \\ &=& \lim_{r \rightarrow \infty} \int_{-t}^{0} dy\left\{ \exp\left[-\frac{1}{2} \left(-r+iy\right)^2\right] - \exp\left[-\frac{1}{2} \left(r+iy\right)^2\right]\right\} + \sqrt{2 \pi} \\ &=& 2 i \lim_{r \rightarrow \infty} e^{-r^2/2} \int_{-t}^{0} dy\left\{ e^{y^2/2} \sin \left(r y\right)\right\} + \sqrt{2 \pi} \\ &=& \sqrt{2 \pi} \end{eqnarray}$$

-