Gaussian Integral using contour integration with a parallelogram contour

I'm having trouble figuring out how to use contour integration to compute the Gaussian integral. The contour I'm using is a parallelogram with function, $f(z) = \Large \frac{ e^{i \pi z^2}}{sin(\pi z)}$ with a residue $1/\pi$ at $z=0$. The outline is below. I understand that the sides of the parallelogram vanish for $R \rightarrow \infty$ but what about the top and bottom of the parallelogram?

enter image description here

see also if necessary: enter image description here


Solution 1:

So we want to compute

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

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]$.

$$\begin{align}\int_{C_1} dz \frac{e^{i \pi z^2}}{\sin{\pi z}} &= -e^{i \pi/4} \int_{-R}^R dt \, \frac{e^{i \pi (-1/2+e^{i \pi/4} t)^2}}{\sin{\pi (-1/2+e^{i \pi/4} t)}}\\ &=i \int_{-R}^R dt \,\frac{e^{-i \pi e^{i \pi/4} t} e^{-\pi t^2}}{\cos{\left (\pi e^{i \pi/4} t\right )}} \end{align}$$

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

$$\begin{align}\int_{C_3} dz \frac{e^{i \pi z^2}}{\sin{\pi z}} &= e^{i \pi/4} \int_{-R}^R dt \, \frac{e^{i \pi (1/2+e^{i \pi/4} t)^2}}{\sin{\pi (1/2+e^{i \pi/4} t)}}\\ &=i \int_{-R}^R dt \,\frac{e^{i \pi e^{i \pi/4} t} e^{-\pi t^2}}{\cos{\left (\pi e^{i \pi/4} t\right )}} \end{align}$$

Thus,

$$\int_{C_1+C_3} dz \frac{e^{i \pi z^2}}{\sin{\pi z}} = i 2 \int_{-R}^R dt \, e^{-\pi t^2} $$

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

$$\begin{align}\int_{C_2}dz \frac{e^{i \pi z^2}}{\sin{\pi z}} &= \int_{-1/2-R/\sqrt{2}}^{1/2-R/\sqrt{2}} dx \, \frac{e^{i \pi (x-i R/\sqrt{2})^2}}{\sin{\left [\pi \left (x-i R/\sqrt{2} \right ) \right ]}}\\ &= \int_{-1/2}^{1/2} dx \frac{e^{i \pi (x-R e^{i \pi/4})^2}}{\sin{\left [\pi \left (x-R e^{i \pi/4} \right ) \right ]}} \end{align}$$

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

$$\begin{align}\int_{C_4}dz \frac{e^{i \pi z^2}}{\sin{\pi z}} &= -\int_{-1/2+R/\sqrt{2}}^{1/2+R/\sqrt{2}} dx \, \frac{e^{i \pi (x+i R/\sqrt{2})^2}}{\sin{\left [\pi \left (x+i R/\sqrt{2} \right ) \right ]}}\\ &= -\int_{-1/2}^{1/2} dx \frac{e^{i \pi (x+R e^{i \pi/4})^2}}{\sin{\left [\pi \left (x+R e^{i \pi/4} \right ) \right ]}} \end{align}$$

As $R \to \infty$, the integrals about $C_2$ and $C_4$ each vanish. Thus, in this limit,

$$\oint_C dz \frac{e^{i \pi z^2}}{\sin{\pi z}} = i 2 \int_{-\infty}^{\infty} dt \, e^{-\pi t^2}$$

By the residue theorem, the contour integral is equal to $i 2 \pi$ times the residue of the integrand at the pole at $z=0$, which is $1/\pi$. Thus

$$i 2 \int_{-\infty}^{\infty} dt \, e^{-\pi t^2} = i 2 \pi \frac1{\pi} = i 2$$

and the result follows.