# $\int_0^\infty \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx$

I was facing: \begin{align}J=\int_0^\infty \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx\end{align}

I want to prove that $$\displaystyle J=0$$, or equivalently, that, \begin{align}\int_0^1 \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx=-\dfrac{1}{2}\text{G}\end{align}

$$\text{G}$$ being the Catalan constant.

I know, using so-called Feynman's trick, how to prove this. I would like to obtain a proof, using only integration by parts and change of variable in simple integrals (that is, no multiple integrals) I don't know, if, under these restrictions, such computation is possible.

NB: You're probably wondering what is the link between : $$\int_{0}^{\frac{\pi}4} \ln(\sin{x}+\cos{x}+\sqrt{\sin{2x}})dx$$ and $$J$$.

The link is, for $$x\in\left[0;\frac{\pi}{2}\right]$$, $$(\sin{x}+\cos{x}+\sqrt{\sin{2x}})(\sin{x}+\cos{x}-\sqrt{\sin{2x}})=1$$ and $$\sin(2x)=2\sin x\cos x$$

• Have you made anymore progress with this one? Dec 2, 2019 at 15:29
• Oh, i have forgotten this one :(
– FDP
Dec 2, 2019 at 15:42

Sketch of a possible proof: By roots of unity and partial fractions one may write $$I=\int_0^1 \frac{\log{(1+x-\sqrt{2x})}}{1+x^2} dx = 2\int_0^1 \frac{x}{1+x^4} \log{(1+x^2-\sqrt{2}{x} )}$$

$$= 2\int_0^1 \frac{dx \quad x}{(x+w)(x-w)(1+1/w)(x-1/w)}\log{((x-w)(x-1/w))} \quad, \quad w=e^{i\pi/4}$$

$$= \frac{w^2}{(w^2+1)(w^2-1)}\int_0^1 \big(\log{(x-w)} + \log{(x+w)} \big)\Big(\frac{1}{x+w}+\frac{1}{x-w} - \frac{1}{x+1/w} - \frac{1}{x-1/w}\Big)$$

The factor in front of the integral is $$-i/2.$$ Integrals of the form

$$\int dx \frac{ \log{(x-a)} }{x-b} = \log{(x-a)}\log{(1+(x-a)/(b-a))} + \text{Li}_2((x-a)/(b-a))$$

and when $$b=a,$$ the integral is a square of a logarithm, that is, there is no dilogarithm involved. There's a lot of symmetry involved, so maybe the mess can be simplified. There are also dilog identities which can be invoked. I suspect this to work because it is known that $$\text{Li}_2(i) = i G - \pi^2/48.$$ Using dilog identities is probably not an easy way to get the answer.

• I was going to post the same message. ;)
– FDP
Dec 3, 2019 at 8:25
• Yes, I read the bold statement, and the proposed solution does not use multiple integrals. 'Simple integrals' is up to interpretation, for the integral directly above has a simple integrand (log-trigs seem more complicated to me.) By the way, I don't even like the proposed solution; I hope someone else has something simpler, but it's probably different from the original solution. Dec 3, 2019 at 19:34

Let $$K=\int_0^\infty \frac{\ln(1+x+\sqrt{2x})}{x^2+1}dx$$ and note that $$J+K=\int_0^\infty \frac{\ln(x^2+1)}{x^2+1}\ {dx}$$ \begin{align} J-K=&\int_{0}^\infty \frac{\ln({1+x-\sqrt{2x}})-\ln({1+x+\sqrt{2x}})}{x^2+1}\ \overset{x=t^2}{dx}\\ =&\int_{-\infty}^\infty \frac{t\ln({1+t^2-\sqrt{2}t})-t\ln({1+t^2+\sqrt{2}t})}{t^4+1}\ dt\\ =& \ \frac1{\sqrt2}\int_{-\infty}^\infty \overset{x=\sqrt2t-1}{\frac{\ln(t^2-\sqrt2t+1)}{t^2-\sqrt2t+1}}+ \overset{x=\sqrt2t+1}{ \frac{\ln(t^2+\sqrt2t+1)}{t^2+\sqrt2t+1}}-\overset{x={(t-t^{-1})}/{\sqrt2}}{\frac{(1+t^2)\ln(t^4+1)}{t^4+1}}\ dt\\ =& \ 2\int_{-\infty}^\infty \frac{\ln \frac{x^2+1}2}{x^2+1}dx - \int_{-\infty}^\infty \frac{\ln (2(x^2+1))}{x^2+1}dx =2 \int_{0}^\infty \frac{\ln \frac{x^2+1}8}{x^2+1}dx \end{align} As a result \begin{align} J =\frac12 (J+K) + \frac12 (J-K) =\ \frac32 \int_0^\infty \frac{\ln \frac{x^2+1}4}{x^2+1}dx=0 \end{align}

We can avoid complicated integrations, at the price of doing a little complex analysis.

Consider $$F(z)=\int^\infty_0\frac{\ln(\sqrt t-z)}{t^2+1}dt\qquad z\in\mathbb C\setminus\mathbb R^+$$ where the principal logarithm is used.

One can show without difficulties that $$F$$ is holomorphic on its domain.

## 1. Proof of $$F(0)=0$$

\begin{align} F(0) &=\frac12\int^\infty_0\frac{\ln t}{t^2+1}dt \\ &=\frac12\int^1_0\frac{\ln t}{t^2+1}dt+\frac12\int^\infty_1\frac{\ln t}{t^2+1}dt \\ &=\frac12\int^1_0\frac{\ln t}{t^2+1}dt+\frac12\int^1_0\frac{-\ln t}{t^2+1}dt \qquad (1)\\ &=0 \end{align}

$$(1)$$: the substitution $$t\mapsto\frac1t$$ is applied on the second integral.

## 2. An identity for $$\text{Im } F$$

By the substitution $$t\mapsto\frac1t$$, \begin{align} F(z) &=\int^\infty_0\frac{\ln\left(\frac1{\sqrt t}-z\right)}{t^2+1}dt \\ &=\int^\infty_0\frac{\ln\left[\frac{-z}{\sqrt t}(\sqrt t-\frac1z)\right]}{t^2+1}dt \\ &=\int^\infty_0\frac{\ln(-z)}{t^2+1}dt-\frac12\int^\infty_0\frac{\ln(t)}{t^2+1}dt+F\left(\frac1z\right) \\ &=\frac{\pi}{2}\ln(-z)+F\left(\frac1z\right) \end{align}

If $$|z|=1$$, $$\frac1z=\bar z$$. Also, from the integral representation of $$F$$, $$F(\bar z)=\overline{F(z)}$$.

Hence, for $$z\ne 1$$ on the unit circle, $$F(z)=\frac{\pi}{2}\ln\left|-z\right|+\frac{\pi}{2}\arg(-z)+\overline{F(z)}=\frac{\pi}{2}\arg(-z)+\overline{F(z)}$$ $$F(z)-\overline{F(z)}=\frac{\pi}{2}\arg(-z)\implies \text{Im }F(z)=\frac{\pi}{4}\arg(-z)$$

## 3. Proof of $$F(z)=\frac{\pi}{4}\ln(-z)$$

The result $$\text{Im }F(z)=\frac{\pi}{4}\arg(-z)$$ is already a big hint at $$F(z)=\frac{\pi}{4}\ln(-z)$$. Indeed, $$\text{Im}\big(F(z)-\frac{\pi}{4}\ln(-z)\big)=0$$ in $$\mathbb C\setminus\mathbb R^+$$, thus the desired equality follows by Identity Theorem.

## 4. Evaluation of the integral

By noticing $$1+x-\sqrt{2x}=(\sqrt x-e^{i\pi/4})(\sqrt x-e^{-i\pi/4})$$

we have \begin{align} J&=\int_0^\infty \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx \\ &=F(e^{i\pi/4})+F(e^{-i\pi/4}) \\ &=\frac{\pi}{4}\left[\ln(-e^{i\pi/4})+\ln(-e^{-i\pi/4})\right] \\ &=\frac{\pi}{4}\left[\ln(e^{-3\pi i/4})+\ln(e^{3\pi i/4})\right] \\ &=\frac{\pi}{4}\left(-\frac{3\pi i}{4}+\frac{3\pi i}{4}\right) \\ &\color{red}{=0}\qquad\blacksquare \end{align}

• Sorry, Have you read the specifications?
– FDP
Dec 10, 2019 at 13:16
• @FDP this is almost the solution I came up with, where I expand a complex power series of a related integral and integrate term by term to show all the real parts cancel. Justifying this expansion would require complex analysis, so I don't see a way out. Dec 10, 2019 at 22:40

I will focus on the integral $$\int_0^1 \frac{\ln(1+x-\sqrt{2x})}{1+x^2}dx$$.

I am not sure, if it is straightforward enough, but I used only simple substitutions and some of your hints. First split up the integral:

$$\int_0^1 \frac{\ln(1+x-\sqrt{2x})}{1+x^2}dx=\int_0^1 \frac{\ln(\sqrt{x}(1/\sqrt{x}+\sqrt{x}-\sqrt{2})}{1+x^2}dx=$$ $$=\frac{1}{2}\int_0^1\frac{\ln x}{1+x^2}dx + \int_0^1\frac{\ln(\sqrt{x}-\sqrt{2}+1/\sqrt{x})}{1+x^2}dx$$

And investigate the two integrals separately.

1. The first integral is by definition of Catalan constant equal to $$-\frac{1}{2}G$$.

2. The second integral can be broken up further: Substitute $$\arctan x = u$$ we get $$\int_0^{\pi/4}\ln (\sqrt{\tan u}+\sqrt{cotan u}-\sqrt{2})du=$$ $$= \int_0^{\pi/4}\ln\left(\sqrt{\frac{\sin u}{\cos u}} + \sqrt{\frac{\cos u}{\sin u}} - \sqrt{2}\right)du$$ $$= \int_0^{\pi/4}\ln\frac{\sin u + \cos u - \sqrt{\sin 2u}}{\sqrt{\sin u\cos u}}du$$

Next trick is to use the identity (which you mention), i.e., $$(\sin u + \cos u - \sqrt{\sin 2u})(\sin u + \cos u + \sqrt{\sin 2u}) = 1.$$

$$\int_0^{\pi/4}\ln\frac{\sin u + \cos u - \sqrt{\sin 2u}}{\sqrt{\sin u\cos u}}du = -\int_0^{\pi/4}\ln\left(\sqrt{\cos u \sin u}(\sin u + \cos u + \sqrt{\sin 2u})\right)du =$$ $$= -\frac{1}{2}\int_0^{\pi/4}\ln(\sin u\cos u)du - \int_0^{\pi/4}\ln(\sin u + \cos u + \sqrt{\sin 2u})du.$$

The first integral: $$\int_0^{\pi/4}\ln\left(\sin u \cos u\right)du = \int_0^{\pi/4}\ln\sin u du+\int_0^{\pi/4}\ln \cos u du = \int_0^{\pi/4}\ln\sin u du+\int_0^{\pi/4}\ln \sin (\pi/2 - u)du = \int_0^{\pi/4}\ln\sin u du+\int_{\pi/4}^{\pi/2}\ln\sin u du = \int_0^{\pi/2}\ln\sin u du.$$

It is easy to show (e.g. computing-the-integral-of-log-sin-x) that $$\int_0^{\pi/2}\ln\sin u du = -\frac{\pi}{2}\ln 2$$.

The second part of the integral is mentioned in your link above (integral-int-0-frac-pi4-ln-sinx-cosx-sqrt-sin2xdx) and is equal to:

$$\int_0^{\pi/4}\ln(\sin u + \cos u + \sqrt{\sin 2u})du = \frac{\pi}{4}\ln2$$

Putting everything together leads to (as expected):

$$\int_0^1 \frac{\ln(1+x-\sqrt{2x})}{1+x^2}dx=$$ $$=\frac{1}{2}\int_0^1\frac{\ln x}{1+x^2}dx + \int_0^1\frac{\ln(\sqrt{x}-\sqrt{2}+1/\sqrt{x})}{1+x^2}dx = -\frac{1}{2}G + \frac{1}{2}\frac{\pi}{2}\ln 2 - \frac{\pi}{4}\ln 2 = -\frac{1}{2}G.\ \square$$