# How to evaluate $\int_{0}^{\infty}{\ln(x)\over x}\left({1+x+e^x\over e^x+e^{2x}}-{1\over \sqrt{1+ x^2}}\right)\mathrm dx?$

Consider this integral

$$\int_{0}^{\infty}{\ln(x)\over x}\left({1+x+e^x\over e^x+e^{2x}}-{1\over \sqrt{1+x^2}}\right)\mathrm dx=I\tag1$$

My try:

$x=\ln(y)$, then $(1)$ becomes

$$\int_{1}^{\infty}{\ln(\ln y)\over y\ln y}\left({1+y+\ln y\over y+y^2}-{1\over \sqrt{1-\ln^2 y}}\right)\mathrm dy\tag2$$

Try an split $(1)$, but still be complicate

$$\int_{0}^{\infty}{\ln(x)\over xe^x}dx+\int_{0}^{\infty}{\ln(x)\over xe^x(1+e^x)}dx-\int_{0}^{\infty}{\ln(x)\over x\sqrt{1-x^2}}dx=I_1+I_2-I_3\tag3$$

$I_3$ seems to diverged (maybe all seem to diverge)

How can we evaluate $(1)?$

$$\int\limits_0^\infty \frac{\ln x}{x}\left(\frac{1+x+e^x}{e^x+e^{2x}}-\frac{1}{\sqrt{1+x^2}}\right)dx=\int\limits_0^\infty \frac{\ln x}{e^x+e^{2x}}dx - \int\limits_0^\infty \frac{\ln x}{x}\left(\frac{1}{\sqrt{1+x^2}}-\frac{1}{e^x}\right)dx$$

with

$$\int\limits_0^\infty \frac{\ln x}{e^x+e^{2x}}dx=\int\limits_0^\infty \frac{\ln x}{e^x}dx-\int\limits_0^\infty \frac{\ln x}{1+e^x}dx=\frac{(\ln 2)^2-2\gamma}{2}$$

and

$$\int\limits_0^\infty \frac{\ln x}{x}\left(\frac{1}{\sqrt{1+x^2}}-\frac{1}{e^x}\right)dx=\frac{(\ln 2)^2-\gamma^2}{2}$$ .

Therefore the result is $\enspace\displaystyle -\frac{\gamma}{2}(2-\gamma)$ . $\enspace\gamma$ is here the Euler-Mascheroni constant.

For the second integral you can use the integration by parts with:

$$\frac{d}{dx}(\ln x)^2=2\frac{\ln x}{x}$$

$$\int\limits_0^\infty \frac{(\ln x)^2}{e^x}=\gamma^2+\frac{\pi^2}{6}$$

$$\int\limits_0^\infty \frac{x(\ln x)^2}{\sqrt{1+x^2}^3}=\frac{\pi^2}{6}+(\ln 2)^2$$

Based on the comment of Lucian we calculate now $\enspace\displaystyle \int\limits_0^\infty \frac{\ln t}{t}(\frac{1}{\sqrt{1+t^2}}-\frac{1}{e^t}) dt\,$ in a different way than above. Be $\,F(x):=x\Gamma(x)\,$ . We have

$\displaystyle \int\limits_0^\infty \frac{dt}{t^x e^t}=\Gamma(1-x)=F(-x)\enspace$ , $\enspace\displaystyle \int\limits_0^\infty \frac{dt}{t^x \sqrt{1+t^2}}= \frac{\Gamma(\frac{1-x}{2})\Gamma(\frac{x}{2})}{2\sqrt{\pi}} =\frac{2 F(\frac{1-x}{2})F(\frac{x}{2})}{\sqrt{\pi}x(1-x)} \,$ ,

$\enspace\displaystyle F(-\frac{x}{2})F(\frac{1-x}{2})= \frac{\sqrt{\pi}}{2^{1-x}} F(1-x)\,$ , $\,\displaystyle (\ln F(x))’ = \lim\limits_{n\to\infty}(\ln n - \sum\limits_{k=1}^n\frac{1}{k+x})\,$ , $\,\displaystyle (\ln F(x))’’ = \sum\limits_{k=1}^\infty\frac{1}{(k+x)^2}\,$ .

1. $\enspace\displaystyle \int\limits_0^\infty \frac{1}{t^{1-x}} ( \frac{1}{\sqrt{1+t^2}} -\frac{1}{e^t})dt= \frac{1}{x}(\frac{2 F(\frac{1-x}{2}) F(\frac{x}{2})}{\sqrt{\pi}(1-x)}-F(x)) $$\displaystyle =\frac{1}{x}(\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2}) }-F(x)) 2. \enspace\displaystyle \int\limits_0^\infty \frac{\ln t}{t^{1-x}} ( \frac{1}{\sqrt{1+x^2}} -\frac{1}{e^x})dt= \frac{d}{dx} \left( \frac{1}{x} ( \frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2}) } -F(x))\right)= \frac{1}{x^2}\left(- \frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} +F(x) + x (\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} -F(x))’ \right) 3. \enspace L'Hôpital's rule two times \enspace\displaystyle \int\limits_0^\infty \frac{\ln t}{t} ( \frac{1}{\sqrt{1+t^2}} -\frac{1}{e^t})dt=\lim\limits_{x\to 0} \int\limits_0^\infty \frac{\ln t}{t^{1-x}} ( \frac{1}{\sqrt{1+t^2}} -\frac{1}{e^t})dt =$$\displaystyle =\lim\limits_{x\to \pm 0} \frac{1}{x^2} \left(- \frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} +F(x) + x (\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} -F(x))’ \right) = \frac{1}{2} \left(- \frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} +F(x) + x (\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} -F(x))’ \right)’’|_{x=0}$ $\displaystyle = \frac{1}{2}\left(\left(\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})}\right)’’ -F’’(x) + x \left(\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} -F(x) \right)’’’\right)|_{x=0}$

4. $\displaystyle \left(\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})}\right)’’=$$\displaystyle = \frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} ((\ln 2+ ( \ln F(-x) )’+( \ln F(\frac{x}{2}) )’-(\ln F(-\frac{x}{2}))’)^2$$\hspace{3.5cm}\displaystyle + ( \ln F(-x) )’’+ (\ln F(\frac{x}{2}) )’’-(\ln F(-\frac{x}{2}))’’)$

$\hspace{8mm}$ => $\enspace\displaystyle \left(\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})}\right)’’|_{x=0}=$

$\hspace{2cm}\displaystyle =(\ln 2 + \gamma -\frac{\gamma}{2}-\frac{\gamma}{2} )^2+(\frac{\pi^2}{6}+\frac{\pi^2}{24}-\frac{\pi^2}{24})=(\ln 2)^2+ \frac{\pi^2}{6}$

1. $\displaystyle F’’(x)=F(x)((\ln F(x))’^2+(\ln F(x))’’) \enspace$ => $\enspace\displaystyle F’’(0)=\gamma^2 + \frac{\pi^2}{6}$

2. $\enspace\displaystyle \left(x \left(\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} -F(x))’ \right)’’’\right)|_{x=0} = 0\enspace$ since $\enspace\displaystyle \left(\frac{2^x F(-x) F(\frac{x}{2}) }{ F(-\frac{x}{2})} -F(x))’ \right)’’’|_{x=0} \enspace$ is limited

3. $\enspace\displaystyle \int\limits_0^\infty \frac{\ln t}{t}(\frac{1}{\sqrt{1+t^2}}-\frac{1}{e^t}) dt = \frac{1}{2}\left (((\ln 2)^2+\frac{\pi^2}{6})-(\gamma^2+\frac{\pi^2}{6})+0\right)=\frac{(\ln 2)^2-\gamma^2}{2}$

• For the second integral, I prefer differentiation under the integral sign, with regard to the parameter k, as follows: $$I(k)~=~\int_0^\infty\frac{x^k}{\sqrt{1+x^2}}~dx, \qquad J(k)~=~\int_0^\infty\frac{x^k}{e^x}~dx.$$ The former yields a beta function, the latter a $\Gamma$ function, by way of a simple substitution. We are ultimately interested in evaluating $$\lim_{k\to-1}I'(k)-J'(k).$$ – Lucian Aug 31 '17 at 1:47
• @Lucian : I have add the calculation for that above. :-) – user90369 Sep 4 '17 at 13:40