= Solution
On the top side put $z=x+i\pi$, with $x$ running from $R$ to $-R$. Since $e^{i(x+i\pi)^2/\pi}=-e^{ix^2/\pi}e^{-2x}$ and $e^{-2(x+i\pi)}=e^{-2x}$, the reversed orientation cancels the minus sign. The two horizontal integrals therefore sum to
$$
\int_{-R}^R e^{ix^2/\pi}\left(\frac1{1+e^{-2x}}+\frac{e^{-2x}}{1+e^{-2x}}\right)dx
=\int_{-R}^R e^{ix^2/\pi}\,dx.
$$
If the vertical contributions vanish, the previous <residue theorem> evaluation yields the <Fresnel integral>
$$
\boxed{\int_{-\infty}^{\infty}e^{ix^2/\pi}\,dx=\frac{\pi(1+i)}{\sqrt2}.}
$$
This also is an ordinary oscillatory <improper integral>, not merely a symmetric principal value: <integration by parts>, using $(e^{ix^2/\pi})'=(2ix/\pi)e^{ix^2/\pi}$, bounds either tail beginning at $R$ by a constant times $1/R$.
Back to article page