Is there a rapider or more elegant way to evaluate $\int_0^{+\infty} \frac{\cos(\pi x)\ \text{d}x}{e^{2\pi \sqrt{x}}-1}$?

$$\color{blue}{\int_0^\infty {\frac{{\cos (\pi x)}}{{{e^{2\pi \sqrt x }} - 1}}dx} = \frac{{2 - \sqrt 2 }}{8}}$$

Simple manipulation gives $$\int_0^\infty {\frac{{\cos (\pi x)}}{{{e^{2\pi \sqrt x }} - 1}}dx} = 2\int_0^\infty {\frac{{x\cos (\pi {x^2})}}{{{e^{2\pi x}} - 1}}dx} = \frac{1}{2} \int_0^\infty {\frac{{\sin (\pi {x^2})}}{{{{\sinh }^2}\pi x}}dx} $$ we evaluate the last integral.


Consider the function $$f(z) = \frac{{{e^{i\pi {z^2}}}{e^{2\pi z}}}}{{{{\sinh }^2}\pi z\sinh 2\pi z}}$$ note that $$f(z) - f(z + 2i) = 2\frac{{{e^{i\pi {z^2}}}}}{{{{\sinh }^2}\pi z}}$$

Integrate $f(z)$ around the rectangle with vertices $-R, R, R+2i, -R+2i$, with semicircle indentations at $0$ and $2i$. The indentation at $0$ is above the $x$-axis, while indentation at $2i$ is also above the line $\Im(z) = 2$, denote these two circles as $C_1$ and $C_2$ respectively, both with radius $r$.

Then $$\tag{1} 2\pi i \sum_{k=1}^4 \text{Res}[f(z),\frac{k}{2}i] = 2 \mathcal{P}\mathcal{V} \int_{ - \infty }^\infty {\frac{{{e^{i\pi {z^2}}}}}{{{{\sinh }^2}\pi z}}dz} + \int_{C_1} f(z) dz + \int_{C_2} f(z) dz $$

As $r\to 0$, $$\begin{aligned} \int_{C_1} f(z) dz + \int_{C_2} f(z) dz &= - \int_0^\pi {ri{e^{ix}}\left[ {f(r{e^{ix}}) - f(2i + r{e^{ix}})} \right]dx} \\ &= - \int_0^\pi {\frac{2}{{{\pi ^2}{r^2}{e^{2ix}}}}ri{e^{ix}}dx} + o(1) \\ &= - \frac{4}{{{\pi ^2}r}} + o(1) \end{aligned}$$ where we used the expansion of $f(z)-f(z+2i)$ around $0$. Note the dominant term is real.

Thus $(1)$ becomes $$2\pi i\left( {\frac{1}{\pi } - \frac{1}{{\sqrt 2 \pi }} + \frac{i}{{\sqrt 2 \pi }}} \right) = 2\mathcal{P}\mathcal{V}\int_{ - \infty }^\infty {\frac{{{e^{i\pi {z^2}}}}}{{{{\sinh }^2}\pi z}}dz} - \frac{4}{{{\pi ^2}r}} + o(1)$$

Comparing imaginary part gives $$\int_0^\infty {\frac{{\sin (\pi {x^2})}}{{{{\sinh }^2}\pi x}}dx} = \frac{{2 - \sqrt 2 }}{4} $$


Denote $$I(a) = \int_0^\infty {\frac{{\cos (a\pi x)}}{{{e^{2\pi \sqrt x }} - 1}}dx} $$ then additional values include

$$\begin{aligned}I(2) &= \frac{1}{{16}} \\ I(3) &= \frac{1}{4} - \frac{{\sqrt 2 }}{{24}} - \frac{{\sqrt 6 }}{{18}} \\ I(\frac{1}{2}) &= \frac{1}{{4\pi }} \\ I(\frac{1}{3}) &= 1 - \frac{{3\sqrt 6 }}{8} \\ I(\frac{2}{3}) &= \frac{1}{3} - \frac{{3\sqrt 3 }}{{16}} + \frac{{\sqrt 3 }}{{8\pi }} \end{aligned}$$

In general, $I(r)$ for rational $r$ is algebraic over $\mathbb{Q}(\pi)$.


I just realized the question has been answered here, but that answer is not quite complete.