Prove $\sin a=\int_{-\infty}^{\infty}\cos(ax^2)\frac{\sinh(2ax)}{\sinh(\pi x)} \operatorname dx$

Derive the integral representation

$$\sin a=\int_{-\infty}^{\infty}\cos(ax^2)\frac{\sinh(2ax)}{\sinh(\pi x)}dx$$ for $|a|\le \pi/2$.

-

Doing a problem like this using contour integration methods involves recognizing the pattern in the integrand; this helps select the contour as much as the integrand. Once this is done, the process of writing out the integrals involved and applying the residue theorem is simple.

Consider the contour integral

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

where $C$ is a rectangular contour with corners at $-R-i,R-i,R+i,-R+i$, but with semicircular detours of radius $\epsilon$ around the poles at $z=\pm i$, as pictured below:

The contour integral may then be written out as a sum over eight integrals:

$$\int_{-R}^{-\epsilon} dx \frac{e^{i a (x-i)^2}}{\sinh{\pi(x-i)}} + i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{e^{i a (-i+\epsilon e^{i \phi})^2}}{\sinh{\pi (-i + \epsilon e^{i \phi})}}\\ + \int_{\epsilon}^R dx \frac{e^{i a (x-i)^2}}{\sinh{\pi(x-i)}} + i \int_{-1}^1 dy \frac{e^{i a (R+i y)^2}}{\sinh{\pi (R+i y)}} \\ + \int_{R}^{\epsilon} dx \frac{e^{i a (x+i)^2}}{\sinh{\pi(x+i)}} + i \epsilon \int_0^{-\pi} d\phi \, e^{i \phi} \frac{e^{i a (i+\epsilon e^{i \phi})^2}}{\sinh{\pi (i + \epsilon e^{i \phi})}}\\ + \int_{-\epsilon}^{-R} dx \frac{e^{i a (x+i)^2}}{\sinh{\pi(x+i)}} + i \int_{1}^{-1} dy \frac{e^{i a (-R+i y)^2}}{\sinh{\pi (-R+i y)}}$$

In the limit as $R \to \infty$ the fourth and eighth integrals vanish so long as $|a| \lt \pi/2$. (I would treat the case $|a|=\pi/2$ separately.) As $\epsilon \to 0$, the second and sixth integrals become equal; using a sine addition theorem or the sort, we see that the each of these integrals approaches

$$i \epsilon e^{-i a} \frac{1}{-\pi \epsilon } (-\pi) = i e^{-i a}$$

Meanwhile, the sum of the first, third, fifth, and seventh integrals approaches a Cauchy principal value. Using the fact that $\sinh{\pi(x\pm i)} = -\sinh{\pi x}$, we have for this sum

$$-PV \int_{-\infty}^{\infty} dx \frac{e^{i a (x-i)^2}-e^{i a (x+i)^2}}{\sinh{\pi x}} = -2 e^{-i a} \int_{-\infty}^{\infty} dx \, e^{i a x^2} \frac{\sinh{2 a x}}{\sinh{\pi x}}$$

(Note that we no longer need the $PV$ because the singularities have been removed.) Now, the contour integral is also equal to $i 2 \pi$ times the residue of the pole at $z=0$, which is simply $i 2 \pi (1/\pi) = i 2$. Thus, we now have

$$-2 e^{-i a} \int_{-\infty}^{\infty} dx \, e^{i a x^2} \frac{\sinh{2 a x}}{\sinh{\pi x}} + 2 i e^{-i a} = 2 i$$

Rearranging, we find that

$$\int_{-\infty}^{\infty} dx \, e^{i a x^2} \frac{\sinh{2 a x}}{\sinh{\pi x}} = i \left (1-e^{i a}\right)$$

or, taking the real part,

$$\int_{-\infty}^{\infty} dx \, \cos{a x^2} \frac{\sinh{2 a x}}{\sinh{\pi x}} = \sin{a}$$

when $|a| \lt \pi/2$. When $|a|=\pi/2$, one may take a different approach, e.g., using a wedge of angle $\pi/4$ in the complex plane, to verify that the equality holds.

$$\int_{-\infty}^{\infty} dx \, \sin{a x^2} \frac{\sinh{2 a x}}{\sinh{\pi x}} = 1-\cos{a}$$