## An integral involving a quadratic phase

This one was first posted on the site Integrals and Series and was brought to my attention on M.SE by Cody. My solution involves a contour integration, although the approach is far from trivial. Yet again, the solution boils down to finding a contour and a function to integrate over the contour.

The problem involves evaluating

$$\int_{0}^{\infty}dx \frac{\cos(\pi x^{2})}{1+2\cosh(\frac{2\pi}{\sqrt{3}}x)}$$

Consider the following integral:

$$\oint_C dz \;f(z)$$

where

$$f(z) = \frac{e^{i \pi z^2}}{\sinh{\left (\sqrt{3} \pi z\right )} \left [ 2 \cosh{\left ( \frac{2 \pi}{\sqrt{3}} z\right )}-1\right ]}$$

and $C$ is the rectangle with vertices in the complex plane $\pm R\pm i \sqrt{3}/2$. This contour integral is thus equal to

$$\int_{-R}^R dx \; f\left (x-i \frac{\sqrt{3}}{2}\right ) + i \int_{-\sqrt{3}/2}^{\sqrt{3}/2} dy \, f(R+i y) \\ \int_R^{-R} dx\; f\left (x+i \frac{\sqrt{3}}{2}\right ) +i \int_{\sqrt{3}/2}^{-\sqrt{3}/2} dy \, f(-R+i y)$$

It should be clear that the second and fourth integrals vanish as $R\to\infty$, as these integrals vanish as $\pi e^{-\pi R}$ as $R\to\infty$. In this limit, then, the contour integral is equal to

$$\int_{-\infty}^{\infty} dx \; \left [ f\left (x-i \frac{\sqrt{3}}{2}\right ) – f\left (x+i \frac{\sqrt{3}}{2}\right )\right ] = i 2 e^{-i 3 \pi/4}\int_{-\infty}^{\infty} dx \frac{e^{i \pi x^2}}{2 \cosh{\left ( \frac{2 \pi}{\sqrt{3}} x\right )}+1}$$

I chose not to clutter up this space with the algebra involved in producing this last equation. The reader, however, should prove to his/herself that this is indeed correct.

By the residue theorem, the contour integral is also equal to $i 2 \pi$ times the sum of the residues of the poles of $f$ inside $C$. I leave it to the reader to verify that these poles are at $z=0$, $z=\pm i \sqrt{3}/3$, and $z=\pm i\sqrt{3}/6$. The residues at these poles are straightforward to compute because the poles are simple:

$$\operatorname*{Res}_{z=0} f(z) = \frac1{\sqrt{3} \pi}$$
$$\operatorname*{Res}_{z=\pm i \sqrt{3}/3} f(z) = \frac{e^{-i \pi/3}}{2 \sqrt{3} \pi}$$
$$\operatorname*{Res}_{z=\pm i \sqrt{3}/6} f(z) = -\frac{e^{-i \pi/12}}{2 \pi}$$

So the residue theorem states, equivalently, that

\begin{align}\int_{-\infty}^{\infty} dx \frac{e^{i \pi x^2}}{2 \cosh{\left ( \frac{2 \pi}{\sqrt{3}} x\right )}+1} &= \frac{e^{i 3 \pi/4}}{\sqrt{3}} + \frac{e^{i 5 \pi/12}}{\sqrt{3}} – e^{i 2 \pi/3}\\ &= \frac1{\sqrt{6}} (-1+i) + \frac1{2 \sqrt{6}} \left [ (\sqrt{3}-1) + i (\sqrt{3}+1)\right ] + \frac12 (1-i \sqrt{3})\end{align}

The integral of interest here is equal to $1/2$ the real part of the above, which is

$$\int_0^{\infty} dx \frac{\cos{\pi x^2}}{2 \cosh{\left ( \frac{2 \pi}{\sqrt{3}} x\right )}+1} = \frac{2+\sqrt{2}-\sqrt{6}}{8}$$