4

Recently, I was requested to evaluate an integral

$$\int_0^{\infty} \frac{\left(\sqrt x-1\right)^2}{\left(x^2+1\right) \ln ^2x} d x.$$ I then try to use the Feynman’s trick by considering the parametrised integral $$ I(a)=\int_0^{\infty} \frac{\left(x^a-1\right)^2}{\left(x^2+1\right) \ln ^2 x} d x $$ then differentiation w.r.t. $a$ once and twice yields $$ \begin{aligned} I^{\prime}(a) & =\int_0^{\infty} \frac{2\left(x^a-1\right) x^a}{\left(x^2+1\right) \ln x} d x \\ I^{\prime \prime}(a) & =2 \int_0^{\infty} \frac{2 x^{2 a}-x^a}{x^2+1} d x \\ & =4 \int_0^{\infty} \frac{x^{2 a}}{x^2+1} d x-2 \int_0^{\infty} \frac{x^a}{x^2+1} d x \\ & =\pi\left[2 \sec (\pi a)-\sec \left(\frac{\pi a}{2}\right)\right] \end{aligned} $$ Integrating back from $x=0$ to $a$ gives $$ \begin{aligned} I^{\prime}(a)= & \pi \int_0^a\left[2 \sec (\pi x)-\sec \left(\frac{\pi x}{2}\right)\right] d x \\ = & 2\left[\ln (\sec (\pi x)+\tan (\pi x)) -\ln \left(\sec \left(\frac{\pi x}{2}\right)+\tan \left(\frac{\pi x}{2}\right) \right)\right]_0^a\\=& 2 \ln \left(\frac{\sec (\pi a)+\tan (\pi a)}{\sec \left(\frac{\pi a}{2}\right)+\tan \left(\frac{\pi a}{2}\right)}\right) \end{aligned} $$ and $$ \begin{aligned} \int_0^{\infty} \frac{(\sqrt{x}-1)^2}{\left(x^2+1\right) \ln ^2 x} d x& =I\left(\frac{1}{2}\right)-I(0) \\ & =2 \int_0^{\frac{1}{2}} \ln \left(\frac{\sec (\pi a)+\tan (\pi a)}{\sec \left(\frac{\pi a}{2}\right)+\tan \left(\frac{\pi a}{2}\right)}\right) d a\\&= \frac{1}{\pi}\left[2 \int_0^{\frac{\pi}{2}} \ln (\sec x+\tan x) d x -4 \int_0^{\frac{\pi}{4}} \ln (\sec x+\tan x) d x\right]\\ \end{aligned} $$


$$ \begin{aligned} \int_0^{\frac{\pi}{2}} \ln (\sec x+\tan x) d x = & \int_0^{\frac{\pi}{2}} \ln (1+\sin x) d x-\int_0^{\frac{\pi}{2}} \ln (\cos x) d x \\ = & \int_0^{\frac{\pi}{2}} \ln (1+\cos x) d x+\frac{\pi}{2} \ln 2 \\ = & \int_0^{\frac{\pi}{2}} \ln \left(2 \cos ^2 \frac{x}{2}\right) d x+\frac{\pi}{2} \ln 2 \\ = & \frac{\pi}{2} \ln 2+4 \int_0^{\frac{\pi}{4}} \ln \cos x d x+\frac{\pi}{2} \ln 2 \\ = & \frac{\pi}{2} \ln 2+2 G-\pi \ln 2+\frac{\pi}{2} \ln 2 \\ = & 2 G \end{aligned} $$


$$ \begin{aligned}\int_0^{\frac{\pi}{4}} \ln (\sec x+\tan x) d x = & {[x \ln (\sec x+\tan x)]_0^{\frac{\pi}{4}} } -\int_0^{\frac{\pi}{4}} x \cdot \frac{\sec x \tan x+\sec x}{\sec x+\tan x} d x \\ = & \frac{\pi}{4} \ln (\sqrt{2}+1)-\int_0^{\frac{\pi}{4}} \frac{x}{\cos x} d x \end{aligned} $$ By the post,we can conclude that $$\int_0^{\infty} \frac{\left(\sqrt x-1\right)^2}{\left(x^2+1\right) \ln ^2x} d x = \frac{4}{\pi}\left[G-\frac{\pi}{4} \ln (\sqrt{2}+1) +\frac{\pi}{2} i \tan ^{-1}\left(\frac{1}{\sqrt{2}}(1+i)\right)-i\left(\operatorname{Li_2}\left( \frac{1}{\sqrt{2}}(1-i)\right)-\operatorname{Li_2}\left( \frac{1}{\sqrt{2}}(-1+i)\right)\right) +i\left(\operatorname{Li_2}(-i)-\operatorname{Li_2}(i)\right) \right] $$


My Question:

Is there other method to get a nicer answer for the integral $\int_0^{\infty} \frac{\left(\sqrt x-1\right)^2}{\left(x^2+1\right) \ln ^2x} d x $ ?

Lai
  • 31,615
  • 3
    It doesn't converge? Integrand is about $1/(x\log x)$ at infinity. –  May 13 '24 at 03:03
  • 1
    @underflow It’s true: It diverges because $\ln\left(\ln\left(x\right)\right)$ becomes the integrand as $x \to \infty$. – Felix Marin May 13 '24 at 03:47
  • Both of you are right! I am sorry that the integral should be $\int_0^{\infty} \frac{\left(\sqrt x-1\right)^2}{\left(x^2+1\right) \ln ^2x}$. – Lai May 13 '24 at 04:06

2 Answers2

3

If you instead use the other answer in the post you linked, you get $$ \int \limits_0^{\pi/4} \frac{x}{\cos(x)} \, \mathrm{d} x = \frac{\pi}{2} \log(1 + \sqrt{2}) - 2 [\mathrm{G} - \operatorname{Ti}_2(\sqrt{2} - 1)] $$ with the inverse tangent integral $\operatorname{Ti}_2$. Then, your integral can be written as $$ \int \limits_0^\infty \frac{(\sqrt{x}-1)^2}{(1+x^2) \log^2(x)} \, \mathrm{d} x = \log(1 + \sqrt{2}) - \frac{4}{\pi} [\mathrm{G} - 2\operatorname{Ti}_2(\sqrt{2} - 1)] \, , $$ which is nicer in the sense that only real functions appear. I don't think that there is a closed-form expression for $\operatorname{Ti}_2(\sqrt{2} - 1)$ though, so it won't get much better than this.

  • I agree that the answer looks like nicer. But I am more familiar with digramma function than the inverse tangent integral and therefore choose $\operatorname{Li_2}$ instead. – Lai May 13 '24 at 10:58
  • 1
    @Lai FWIW we can also give it in terms of trigamma: $$I=-\frac{4G}{\pi}-\frac{\pi}{\sqrt{2}}+\frac{1}{4\sqrt{2}\pi}\left(\psi^{(1)}\left(\frac{1}{8}\right)+\psi^{(1)}\left(\frac{3}{8}\right)\right).$$ It can't be expressed any better than $\operatorname{Li}_2$ values or equivalently with the Clausen function of order $2$. – KStar May 13 '24 at 13:11
  • @KStarGamer, thank you for your good suggestions! Could you please show us as solutions? – Lai May 13 '24 at 14:51
3

Too long for a comment

Let's consider for convenience a bit more general case; namely, $$I(a)=\int_0^\infty\frac{(\sqrt x-1)^2}{(1+x^2)(\ln^2x+a^2)}dx\overset{x=e^t}{=}\frac12\int_{-\infty}^\infty\frac{(e^{t/2}-1)^2}{\cosh (t)\,(t^2+a^2)}dt$$ $$=\frac14\int_{-\infty}^\infty\frac{(e^{t/2}-1)^2+(e^{-t/2}-1)^2}{\cosh (t)(t^2+a^2)}dt=\frac14\int_{-\infty}^\infty\frac{2\cosh t-4\cos\frac t2+2}{\cosh (t)(t^2+a^2)}dt$$ $$=\frac12\int_{-\infty}^\infty\frac{dt}{t^2+a^2}-4\pi\int_{-\infty}^\infty\frac{\cosh(2\pi x)}{\cosh(4\pi x)\big((4\pi)^2x^2+a^2\big)}dx$$ $$+\pi\int_{-\infty}^\infty\frac{dx}{\cosh(2\pi x)\big((2\pi)^2x^2+a^2\big)}$$ Denoting for a while $b=\frac a{4\pi}$ and $c=\frac a{2\pi}$ $$=\frac\pi{2a}-\frac1{4\pi b}\Re\int_{-\infty}^\infty\frac{\cosh(2\pi x)}{\cosh(4\pi x)}\frac{dx}{b-ix}+\frac1{4\pi c}\Re\int_{-\infty}^\infty\frac1{\cosh(2\pi x)}\frac{dx}{c-ix}$$ $$=\frac\pi{2a}-\frac1{4\pi b}\Re\frac{\partial}{\partial b}\int_{-\infty}^\infty\frac{\cosh(2\pi x)}{\cosh(4\pi x)}\ln(b-ix)dx+\frac1{4\pi c }\Re\frac{\partial}{\partial c}\int_{-\infty}^\infty\frac{\ln(c-ix)}{\cosh(2\pi x)}dx$$ To evaluate the integrals we go in the complex plane and consider the rectangular contour $-R\to R\to R+i\to-R+i\to-R$. Using the fact that $\ln\Gamma\big(b-i(z+i)\big)-\ln\Gamma\big(b-iz\big)=\ln(b-iz)$ and that $\cosh(2\pi(z+i))=\cosh(2\pi z)$, we can write $$I_2=\int_{-\infty}^\infty\frac{\cosh(2\pi x)}{\cosh(4\pi x)}\ln(b-ix)dx=-\oint\frac{\cosh(2\pi z)}{\cosh(4\pi z)}\ln\Gamma(b-iz)dz$$ $$=2\pi i\sum\operatorname{Res}\frac{\cosh(2\pi z)}{\cosh(4\pi z)}\ln\Gamma(b-iz)$$ Having simple poles in the points $z=\frac i8;\frac{3i}8;\frac{5i}8;\frac{7i}8$ $$I_2=-\frac1{2\sqrt2}\Big(\ln\Gamma(b+1/8)+\ln\Gamma(b+3/8)-\ln\Gamma(b+5/8)-\ln\Gamma(b+7/8)\Big)$$ In the similar way we handle the second integral and get for the initial integral $$I(a)=\frac\pi{2a}+\frac1{8\sqrt2\pi b}\Big(\psi(b+1/8)+\psi(b+3/8)-\psi(b+5/8)-\psi(b+7/8)\Big)$$ $$-\frac1{4\pi c}\Big(\psi(c+1/4)-\psi(c+3/4)\Big)$$ where $\psi(x)$ denotes digamma-function. Leading $a\to 0$ and using the property of digamma-function $\psi(1-x)-\psi(x)=\pi\cot\pi x$, it is easy to check that $$\frac\pi{2a}+\frac1{8\sqrt2\pi \frac a{4\pi}}\Big(\psi(1/8)+\psi(3/8)-\psi(5/8)-\psi(7/8)\Big)-\frac1{4\pi \frac a{2\pi}}\Big(\psi(1/4)-\psi(3/4)\Big)=0$$ Decomposing $I(a)$ at $a\to0$ we see that the divergent terms cancel. Using also $\psi^{(1)}(1/4)=\pi^2+8G$, and $\psi^{(1)}(1-x)=-\psi^{(1)}(x)+\frac{\pi^2}{\sin^2\pi x}$, we get the answer, presented by @KStarGamer in the comment: $$I(a=0)=-\frac{4G}{\pi}-\frac{\pi}{\sqrt{2}}+\frac{1}{4\sqrt{2}\pi}\left(\psi^{(1)}\left(\frac{1}{8}\right)+\psi^{(1)}\left(\frac{3}{8}\right)\right)$$

Svyatoslav
  • 20,502