# Asymptotic integration of $\frac{ x^{a-\frac{1}{2}} \cos \left(\frac{\pi a}{2}-\alpha x\right)}{(e^x-1)\sqrt{\alpha x}}$

asymptoticsdefinite integralsintegration

I need to solve this integration for $$\alpha\gg 1$$
$$\int_0^\infty \frac{ x^{a-\frac{1}{2}} \cos \left(\frac{\pi a}{2}-\alpha x\right)}{\left(e^x-1\right) \sqrt{\alpha x}}{\rm d}x$$
Using the "AsymptoticIntegrate" function in Mathematica I obtained the result
$$\int_0^\infty \frac{ x^{a-\frac{1}{2}} \cos \left(\frac{\pi a}{2}-\alpha x\right)}{\left(e^x-1\right) \sqrt{\alpha x}}{\rm d}x\simeq a \sqrt{\alpha } \zeta (a+1) \left|\sin \left(\frac{\pi a}{2}\right)\right| \Gamma (a)$$
How do I get this result by direct computation using standard identities?

This post was nearly ready when I noticed the comment by @Maxim, describing the same approach. Somehow, I decided to place my solution - with the hope that it will bring some value.

I'm afraid the last formula (asymptotics) is not correct. Let's denote $$I(a,b)=\int_0^\infty \frac{{ x^{a-\frac{1}{2}} \cos\left(\frac{\pi a}{2}-b x\right)}}{{\left(e^x-1\right)\sqrt{b x}}}{\rm d}x$$ This integral converges at $$a\geqslant1$$ (we have to ensure convergence at $$x=0$$).

At $$a=1$$ $$I(1,b)=\frac{1}{\sqrt b}\int_0^\infty \frac{{ \cos\left(\frac{\pi }{2}-b x\right)}}{{e^x-1}}{\rm d}x=\frac{1}{\sqrt b}\int_0^\infty \frac{{ \sin(b x)}}{{e^x-1}}{\rm d}x$$ But the last integral has a closed form (for example, here):

$$I(1,b)=\frac{\pi}{2\sqrt b}\Big(1-\frac{1}{\pi b}+\frac{2}{e^{2\pi b}-1}\Big)\to\frac{\pi}{2\sqrt b}\,\,\text{at}\,\,b\to\infty$$

To find the the asymptotics of $$I(a;b)$$ at $$b\to\infty$$ we can expand the denominator in the series: $$I(a,b)=\frac{1}{\sqrt b}\Re\, e^{\frac{i\pi a}{2}}\int_0^\infty\frac{x^{a-1}e^{-ibx}}{e^x-1}dx=\frac{1}{\sqrt b}\Re\, e^{\frac{i\pi a}{2}}\int_0^\infty x^{a-1}\sum_{k=1}^\infty e^{-x(k+ib)}dx$$ Next we go in the complex plane and make the substitution $$t=x(k+ib)$$. We also change the integration path, and have to make sure that integration over $$t\in[0;\infty)$$ is legal (we do not change the integral value by this substitution). It is in fact, because there is no singularity at $$x=0$$, and the integral along the segment of a big circle (with radius $$R\to\infty$$) is limited by $$\int_{\phi_1=0}^{\phi_2=tan^{-1}\frac{b}{k}}R^ae^{-R\cos\phi}d\phi for any positive and finite $$a, b, k$$. Therefore, $$I(a,b)=\frac{1}{\sqrt b}\Re\, e^{\frac{i\pi a}{2}}\sum_{k=1}^\infty \frac{1}{(k+ib)^a}\int_0^\infty t^{a-1}e^{-t}dt=\frac{\Gamma(a)}{\sqrt b}\Re\, e^{\frac{i\pi a}{2}}\sum_{k=1}^\infty \frac{1}{(k+ib)^a}$$ To approximate the sum we can use the Euler-Maclaurin formula (for example, here)

$$\sum_{k=1}^\infty \frac{1}{(k+ib)^a}=\int_1^\infty\frac{dk}{(k+ib)^a}+\frac{1}{2}(f(1)+f(\infty))+\frac{1}{12}(f'(\infty)-f'(0))+ ...$$ $$=\frac{1}{a-1}\Big(\frac{1}{1+ib}\Big)^{a-1}+\frac{1}{2}\Big(\frac{1}{1+ib}\Big)^{a}+\frac{1}{12}\frac{a}{(1+ib)^{a+1}} + ...$$ Two first terms in this series are both important to identify correctly the first asymptotics term. For example, $$I(a=2,b)=\frac{\Gamma(2)}{\sqrt b}\Re\, e^{\frac{2i\pi}{2}}\Big(\frac{1}{1+ib}+\frac{1}{2}\frac{1}{(1+ib)^2}+ ...\Big) =-\frac{1}{2\sqrt b\, b^2}+O\big(\frac{1}{\sqrt b\,b^3}\big)$$

Using two first terms, the main asymptotics term is $$I(a,b)\sim\frac{\Gamma(a)}{\sqrt b}\Re e^{\frac{i\pi a}{2}}\frac{1+a+2ib}{2(a-1)(1+ib)^a}$$ Making further simplification (please look at the example below) we get the simple closed form for the main asymptotics term: $$\bbox[5px,border:2px solid #C0A000]{I(a,b)\sim-\frac{\Gamma(a)}{2\sqrt b\,b^a},\,\,a>1}$$

There is a very interesting special case of $$a=1$$. At $$a=1$$ the integral converges; moreover, we know its exact value (please, look above).

But if we try to use the asymptotics for this case, we get the answer which does not coincide with the integral exact value at $$a=1$$. This fact puzzled me (I even made a mistake in the initial evaluation).

In fact, according to the asymptotics, $$I(1,b)\sim-\frac{\Gamma(1)}{2\sqrt b\,b^1}=-\frac{1}{2b^\frac{3}{2}}$$ But, as was evaluated above, $$\frac{1}{\sqrt b}\int_0^\infty \frac{{ \cos\left(\frac{\pi }{2}-b x\right)}}{{e^x-1}}{\rm d}x\to\frac{\pi}{2\sqrt b}\,\text{at}\,b\to\infty$$ The answer is that the integral $$I(a,b)$$ does not converge uniformally at $$a\to1$$, and we are not allowed to take the limit under the integral sign. To make it visible, let's denote $$a=1+\epsilon$$. $$I(\epsilon\to 0,b)=-\frac{1}{\sqrt b}\int_0^\infty\frac{x^\epsilon\sin\big(\frac{\pi}{2}\epsilon-bx\big)}{e^x-1}dx$$ $$=\,(\text{at}\,\epsilon\to 0)\,\,\frac{1}{\sqrt b}\int_0^\infty\frac{x^\epsilon\sin (bx)}{e^x-1}dx-\frac{\pi}{2}\frac{\epsilon}{\sqrt b}\int_0^\infty\frac{x^\epsilon\cos (bx)}{e^x-1}dx$$ Evaluating the second term in a standart way $$\int_0^\infty\frac{x^\epsilon\cos (bx)}{e^x-1}dx=\Re\sum_{k=1}^\infty\Big(\frac{1}{k-ib}\Big)^{1+\epsilon}\int_0^\infty t^\epsilon e^{-t}dt$$ $$=\frac{\Gamma(1+\epsilon)}{\epsilon}\frac{1}{(1-ib)^\epsilon}+O\big(\frac{1}{b}\big)\to\frac{1}{\epsilon}+O\big(\frac{1}{b}\big)$$ where $$O\big(\frac{1}{b}\big)$$ does not contain any singularity with regard to $$\epsilon$$. The first integral converges uniformally. Therefore, taking all together, at $$\epsilon\to 0$$: $$I(1+\epsilon,b)\to\frac{1}{\sqrt b}\Big(\frac{\pi}{2}-\frac{1}{2b}+\frac{\pi}{e^{2\pi b}-1}-\frac{\pi}{2}\epsilon\frac{1}{\epsilon}\Big)\to -\frac{1}{2\sqrt b\,b}+o(b^{-\frac{3}{2}})$$

$$\mathbf{Particular \,case \,of \,a=\frac{5}{2}}$$

At a first glance we could expect that the answer would be $$\sim \frac{1}{b^2}$$, but in fact it is $$\sim \frac{1}{b^3}$$ (that is why we kept two terms of the decomposition). $$I(\frac{5}{2},b)\sim\frac{\Gamma\big(\frac{5}{2}\big)}{\sqrt b}\Re e^{\frac{5i\pi}{4}}\frac{1+\frac{5}{4}+2ib}{2(\frac{5}{4}-1)(1+ib)^{\frac{5}{2}}}$$ Using $$(1+ib)^a=\Big(\sqrt{(1+b^2)}\Big)^ae^{ia\tan^{-1}b}=\Big(\sqrt{(1+b^2)}\Big)^ae^{ia(\frac{\pi}{2}-\tan^{-1}\frac{1}{b})}$$ ... and keeping only the biggest (at $$b\gg1$$) terms: $$I(\frac{5}{2},b)\sim\frac{\Gamma\big(\frac{5}{2}\big)}{\sqrt b}\Re e^{\frac{5i\pi}{4}}\frac{\frac{7}{2}+2ib}{3b^\frac{5}{2}}e^{-i\frac{5}{2}(\frac{\pi}{2}-\tan^{-1}\frac{1}{b})}$$ $$\sim\frac{\sqrt\pi}{4b^3}\Big(\frac{7}{2}-2b\sin\big(\frac{5}{2}\tan^{-1}\frac{1}{b}\big)\Big)\sim-\frac{3\sqrt\pi}8\frac{1}{b^3}$$ -in accordance with the general answer.

Numerical check.

Let's take $$b=10$$.

The exact integral value (WolframAlpha): $$I\big(\frac{5}{2},10\big)=-0.000664670194089568510236804...$$ Approximation: $$I\big(\frac{5}{2},10\big)\sim-\frac{3\sqrt\pi}8\frac{1}{10^3}=-0.000664670194089568510236812...$$ It is surprising that the accuracy of the approximation is much better than we could expect. Probably, there are some additional suppression factors for the next terms of this asymptotics.