# How to find $\int_{-\infty}^\infty \exp(-x^2) \, dx$ with contour integration?

Contour integration is a very powerful tool.

But what if a function has no poles or zero's ?

For instance :

How to find $\int_{-\infty}^\infty \exp(-x^2) \, dx$ with contour integration?

• You can integrate $e^{-\pi x^2}$ using contour integration. See math.stackexchange.com/questions/1266856/… – Ron Gordon Feb 15 '16 at 22:28
• what reason do you have to think you can use Contour Integration to find this integral? – user247327 Feb 15 '16 at 22:29
• @Jonas: Wrong. Not a duplicate - question here explicitly asks about using contour integration, no solution in your link uses it. – Ron Gordon Feb 15 '16 at 22:32
• @Omnomnomnom: actually, the approach is to integrate $$\oint_C dz \frac{e^{-\pi z^2}}{\sin{\pi z}}$$ where $C$ is a $45^{\circ}$ parallelogram. – Ron Gordon Feb 15 '16 at 22:53
• @Ragnar: Although the question in that link is the same, no solution actually uses contour integration. The only solution offered is quite nonsensical and useless. I would thus not mark this question as a duplicate of the previous one. – Ron Gordon Feb 15 '16 at 22:54

It can be found by using a rectangular contour and the function $$\frac{e^{-z^2/2}}{1-e^{-\sqrt{\pi}(1+i)z}}.$$

See the eighth proof in here for the motivation and analysis.

You can perform an integration of certain functions that have no poles by performing a contour integration of another function that may have poles (or a branch cut) in order to transform the contour integral into the sought-after integral. In this case, one may consider

$$\oint_C dz \frac{e^{-\pi z^2}}{\sin{\pi z}}$$

where $C$ is a parallelogram in the complex plane, where $C= C_1+C_2+C_3+C_4$:

Along $C_1$, $z=-1/2 + e^{i \pi/4} t$, $t \in [R,-R]$.

Along $C_2$, $z=x-i (R/\sqrt{2})$, $x \in \left [-1/2-R/\sqrt{2},1/2-R/\sqrt{2} \right ]$.

Along $C_3$, $z=1/2 + e^{i \pi/4} t$, $t \in [-R,R]$.

Along $C_4$, $z=x+i (R/\sqrt{2})$, $x \in \left [-1/2+R/\sqrt{2},1/2+R/\sqrt{2} \right ]$.

One then completes the evaluation by taking the limit as $R \to \infty$. By adding the integrals along $C_1$ and $C_3$, the gaussian integral is reproduced. One then shows that the integrals about $C_2$ and $C_4$ vanish in the limit as $R \to \infty$. For details of the evaluation, see this solution.

• I downvoted because you didn't say if in your opinion it is only a (counter)example or if there is a general method behind it, and you didn't explain how to think to that transformation of $\int_{-\infty}^\infty f(x) dx$ to $\lim_{R \to \infty} \oint_{C(R)} f(z) g(z) dz$ and how to choose $g(z)$ or "why" it is related to the former : so please tell us more or give a reference ! – reuns Feb 16 '16 at 20:00
• @user1952009: thanks for posting that. There are other examples, I just chose to tackle the one the OP put out there. That's why contour integration techniques are at the same time so powerful and yet so difficult to master: there is so much freedom in choosing a contour and/or integrand to produce an integral. But there really isn't anything I am aware of in the way of systematic techniques. If I encounter a nonstandard example, I experiment and play and poke until I get what I want. It is a messy process few people have the patience for. If you want, I will post another example. – Ron Gordon Feb 16 '16 at 20:05
• so you found it nearly "by chance" ? oh I just saw that Ragnar in his related answer posted a link on that trick : it has been discovered only in ~1910 or 1940 ! – reuns Feb 16 '16 at 20:06
• @user1952009: This one? No, I learned how to do this from someone else. However, I have other examples of, say, rectangular contours and really bizarre integrands that lead to specified integrals that I did discover myself. Again, time permitting, I will get a link to you. As for the gaussian...I guess, not sure what you mean. – Ron Gordon Feb 16 '16 at 20:08