8

Could someone help me with the proving that the value of this integral is

$$\int_0^\infty \left( \frac{1}{u(e^u-1)}-\frac{1}{u^2}+\frac{e^{-u}}{2u} \right)\,du = -\frac{1}{2}\log 2\pi$$ This is from a paper on the Hardy-Ramanujan asymptotic expression for the integer partition function, and I'm struggling with solving this integral. The paper itself includes a source for this claim, but I can't access it online.

user
  • 27,958
kaeli
  • 479
  • Something related: https://math.stackexchange.com/q/1607314/42969 – Martin R Apr 22 '25 at 14:35
  • 2
    See also this answer (of mine). – metamorphy Apr 23 '25 at 07:30
  • 3
    Using Binet's integral for log Gamma should get you pretty close, e.g $$\log\Gamma(z)=\frac{1}{2}\log (2\pi)-z+\left(z-\frac{1}{2}\right)\log z+\int_0^\infty \frac{\mathrm e^{-zt}}{t}\left(\frac{1}{\mathrm e^t-1}-\frac{1}{t}+\frac{1}{2}\right)\mathrm dt$$ Which gives $$\int_0^\infty \frac{\mathrm e^{-t}}{t}\left(\frac{1}{\mathrm e^t-1}-\frac{1}{t}+\frac{1}{2}\right)\mathrm dt=1-\frac{1}{2}\log(2\pi)$$ Adding/subtracting some integral representations for the digamma function on the left hand side should get you what you're looking for. – K.defaoite Apr 23 '25 at 22:33

3 Answers3

4

Probably, the shortcut to the answer is the usage of analytical continuation - the solution by @metamorphy (the link in the comment above). You can consider the integral $\int_0^\infty u^\lambda\left(\frac1{u(e^u-1)}-\frac{e^{-au}}{u^2}+\frac{e^{-u}}{2u}\right)du$ or, integrating by part first, $\int_0^\infty u^\lambda\left(\frac1{u(e^u-1)}-\frac1{e^u-1}-\frac1{(e^u-1)^2}+\frac{e^{-u}}{2u}-\frac{e^{-u}}2\right)du$. Choosing $\lambda>1$ and handling every integral separately, you get the answer in the form of the analytical function of $\lambda$ and then take $\lambda=0$ in the final expression - to get the answer $\zeta'(0)$.

However, if you want to get the answer $-\frac{\ln(2\pi)}2$ at once, you can use another approach. $$I=\int_0^\infty\left(\frac1{2u}\big(\coth\frac u2-1\big)-\frac1{u^2}+\frac{e^{-u}}{2u}\right)du\overset{u=2\pi x}{=}$$ $$=\frac12\int_0^\infty\left(\coth(\pi x)-1-\frac1{\pi x}+e^{-2\pi x}\right)\frac{dx}x$$ Integrating by parts $$=\frac{2\pi}2\int_0^\infty\ln x\,e^{-2\pi x}dx+\int_0^\infty\left(\frac\pi2\frac{\ln x}{\sinh^2(\pi x)}-\frac{\ln x}{2\pi x^2}\right)dx$$ $$=-\frac\gamma2-\frac{\ln(2\pi)}2+\lim_{r\to 0}\left(\frac\pi2\int_r^\infty\frac{\ln x}{\sinh^2(\pi x)}dx-\frac1{2\pi}\int_r^\infty\frac{\ln x}{x^2}dx\right)$$ $$=-\frac\gamma2-\frac{\ln(2\pi)}2+\lim_{r\to 0}\left(I_1(r)+I_2(r)\right)\tag{1}$$ where $$I_2(r)=-\frac1{2\pi}\int_r^\infty\frac{\ln x}{x^2}dx=-\frac{\ln r}{2\pi r}-\frac1{2\pi r}\tag{2}$$ $$I_1(r)=\frac\pi2\int_r^\infty\frac{\ln x}{\sinh^2(\pi x)}dx=\frac\pi 4\Re\left(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln x}{\sinh^2(\pi x)}dx\right)$$ $$=\frac\pi 4\Re\left(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln (ix)}{\sinh^2(\pi x)}dx\right)$$ Formally speaking, we have to define the cut in the upper half-plane - to make the $\ln x$ and whole integrand single-valued functions. But its position only affects the imaginary part of the integral.

Now, let's consider the integral in the complex plane $$-\frac\pi 4\Re\oint_C\frac{\ln\Gamma(iz)}{\sinh^2(\pi z)}dz$$ along the following contour:

enter image description here

where $r$ is small but fixed parameter.

Noting that $\ln\Gamma(i(z-i))-\ln\Gamma(iz)=\ln(iz), \,\sinh^2(\pi(z-i))=\sinh^2(\pi z)$, that integrals along the paths 1 and 2 tend to zero at $R\to\infty$ and that there are no poles insider to contour $C$ $$-\frac\pi 4\Re\oint_C\frac{\ln\Gamma(iz)}{\sinh^2(\pi z)}dz=\frac\pi4\Re\left(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln\Gamma(i(x-i))-\ln\Gamma(ix)}{\sinh^2(\pi x)}dx+I_{C_1}+I_{C_2}\right)=0$$ $$\Rightarrow\,\frac\pi4\Re\left(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln(ix)}{\sinh^2(\pi x)}dx\right)=I_1(r)=-\frac\pi4\Re\left(I_{C_1}+I_{C_2}\right)\tag{3}$$ where $I_{C_{1,2}}$ denotes the integrals along the small arches of the radius $r$ $$-\frac\pi4\left(I_{C_1}+I_{C_2}\right)=\frac\pi4\int_\pi^{2\pi}\frac{\ln\Gamma(ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi+\frac\pi4\int_0^\pi\frac{\ln\Gamma(1+ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi$$ $$=\frac\pi4\int_\pi^{2\pi}\frac{\ln\Gamma(ire^{i\phi})-\ln\Gamma(1+ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi+\frac\pi4\int_0^{2\pi}\frac{\ln\Gamma(1+ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi$$ $$=-\frac\pi4\int_\pi^{2\pi}\frac{\ln(ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi+\frac\pi4\int_0^{2\pi}\frac{\ln\Gamma(1+ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi\tag{3a}$$ where, decomposing the integrand at $r\to0$ $$-\frac\pi4\int_\pi^{2\pi}\frac{\ln(ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi$$ $$=-\frac\pi4\frac{\pi i}2\int_\pi^{2\pi}\frac{ie^{-i\pi}}{\pi^2r}d\phi-\frac{\pi i}4\int_\pi^{2\pi}\frac{i\phi\, e^{-i\phi}}{\pi^2r}d\phi-\frac\pi4\frac{\ln r}{\pi^2r}\int_\pi^{2\pi}e^{-i\phi}id\phi+O(r\ln r)$$ integrating the second term by parts, $$=\frac{\ln r}{2\pi r}+\frac1{2\pi r}+\text{imaginary terms}+O(r\ln r)\tag{4}$$ Using also $\Gamma(1+s)=1-\gamma s+O(s^2)$ $$\frac\pi4\int_0^{2\pi}\frac{\ln\Gamma(1+ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi=\frac\gamma2+O(r)\tag{5}$$ Taking the real part and then putting (4), (5) into (3a) and then into (3) $$I_1(r)=\frac{\ln r}{2\pi r}+\frac1{2\pi r}+\frac\gamma2+O(r\ln r)\tag{6}$$ Putting (6) and (2) into (1) $$I=-\frac\gamma2-\frac{\ln(2\pi)}2+\lim_{r\to0}\left(\frac{\ln r}{2\pi r}+\frac1{2\pi r}+\frac\gamma2+O(r\ln r)-\frac{\ln r}{2\pi r}-\frac1{2\pi r}\right)=-\,\frac{\ln(2\pi)}2$$

Svyatoslav
  • 20,502
3

Answer here will use an extension of Fullani's integral and uses the notation in my answer to

Evaluate $\int_0^{\infty } \Bigl( 2qe^{-x}-\frac{\sinh (q x)}{\sinh \left(\frac{x}{2}\right)} \Bigr) \frac{dx}x$

Refer to that link frequently to understand this answer. Write your integral as

$I=\int_0^\infty \frac{dx}{x}\Big[ \Big(\frac{1}{e^x-1} -\frac{1}{x} + \frac{1}{2}\Big) - \frac{1}{2}\Big(1-e^{-x}\Big) \Big].$

The first big parenthesis is related to function $f$ and the second is $g.$ We have $a=b=1, f(0)=g(0)=0,$ and $f(\infty)=g(\infty) = 1/2.$ Function $v(s)=-1/2.$ Function $u(s)$ is determined by the analytic continuation of $f(x)-f(\infty)=\frac{1}{e^x-1} -\frac{1}{x} = \sum_{k=0}^\infty u(k) (-x)^k/k! $ Use the Bernoulli number representation to get

$f(x)-f(\infty)=\sum_{k=1}^\infty \frac{B_k}{k!}x^{k-1} = \sum_{k=0}^\infty \cos(\pi\,k)\frac{B_{k+1}}{k+1} \frac{(-x)^k}{k!} .$

Use $B_{k+1}/(k+1) = -\zeta(-k,1)$ so that $u(s)=-\cos(\pi s)\zeta(-s,1).$ Thus

$I=\frac{1}{2} \frac{d}{ds}\log(-2u(s))\big|_{s=0}$ and lookup in a reference book or Mathematica can be used to do the final evaluation.

user321120
  • 6,895
2

Indeed, as I mentioned in the comments, the most painless way of obtaining this result is via Binet's formula and some elementary integration.

By Binet's formula, we have $$\frac{1}{2}\log(2\pi)=1+\int_0^\infty \left(-\frac{\mathrm e^{-t}}{t(\mathrm e^t-1)}+\frac{\mathrm e^{-t}}{t^2}-\frac{\mathrm e^{-t}}{2t}\right)\mathrm dt$$ Letting $$I=\int_{0}^\infty \left(\frac{1}{t(\mathrm e^t-1)}-\frac{1}{t^2}+\frac{\mathrm e^{-t}}{2t}\right)\mathrm dt$$ And thus we find $$\frac{1}{2}\log (2\pi)+I=1+\int_0^\infty \left(\frac{1-\mathrm e^{-t}}{t(\mathrm e^t-1)}+\frac{\mathrm e^{-t}-1}{t^2}\right)\mathrm dt$$ Which, after some elementary algebra, we can write as $$\frac{1}{2}\log (2\pi)+I=1+\int_0^\infty \frac{\mathrm e^{-t}}{t^2}(1+t-\mathrm e^t)\mathrm dt$$ Now, a straightforward application of Taylor series gives $$1+t-\mathrm e^{t}=-\sum_{k=2}^\infty \frac{t^k}{k!}=-\sum_{k=0}^\infty\frac{t^{k+2}}{(k+2)!}$$ Thus (interchanging summation and integration, because I said so!) $$\frac{1}{2}\log (2\pi)+I=1-\int_0^\infty \frac{\mathrm e^{-t}}{t^2}\sum_{k=0}^\infty \frac{t^{k+2}}{(k+1)!}\mathrm dt \\ =1-\sum_{k=0}^\infty \frac{1}{(k+2)!}\int_0^\infty \mathrm e^{-t}t^{-1+(k+1)}\mathrm dt \\ =1-\sum_{k=0}^\infty \frac{\Gamma(k+1)}{(k+2)!} $$ Which, using $\Gamma(k+1)=k!$ we may write as $$=-1+\sum_{k=0}^\infty \frac{1}{(k+1)(k+2)} \\ =0$$ A simple telescoping sum. Thus $$I=-\frac{1}{2}\log(2\pi)$$ As desired.

K.defaoite
  • 13,890