# 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}$$

-
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://math.stackexchange.com/questions/221580/calculate-int-infty-inftye-fracx-it22dx-using-contour-inte", "fetch_time": 1469470773000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2016-30/segments/1469257824337.54/warc/CC-MAIN-20160723071024-00018-ip-10-185-27-174.ec2.internal.warc.gz", "warc_record_offset": 158321131, "warc_record_length": 19457, "token_count": 1243, "char_count": 3334, "score": 3.90625, "int_score": 4, "crawl": "CC-MAIN-2016-30", "snapshot_type": "latest", "language": "en", "language_score": 0.74648517370224, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00046-of-00064.parquet"}