Real Analysis – Evaluate Integral with Arctan, Log, and Radical

calculusdefinite integralsintegrationreal-analysissequences-and-series

The following integral appears in More (Almost) Impossible Integrals, Sums, and Series (2023) (evaluation details on pages $301$$306$), the sequel of (Almost) Impossible Integrals, Sums, and Series (2019):
$$\int_0^1 \arctan \left(\sqrt{\frac{1+x^2}{x(1-x) }}\right) \frac{\log (1+x) }{x \sqrt{1+x^2}}\textrm{d}x$$
$$=\frac{1}{2}\log ^2(\sqrt{2}-1)\pi-\frac{\pi^3}{8}-3\pi\operatorname{Li}_2(1-\sqrt{2}),\tag1$$
where $\operatorname{Li}_2$ represents the Dilogarithm function.

Now, in the book, there are two preliminary steps needed before evaluating the preceding integral, which are as follows:
$$\int_0^{\pi/2}\frac{\arctan(\sin(x))\log(1+\sin^2(x))}{\sin(x)} \textrm{d}x$$
$$=\frac{5}{24}\pi ^3-\frac{1}{2}\log ^2(\sqrt{2}-1)\pi+4\pi \operatorname{Li}_2(1-\sqrt{2}) \tag2$$
and
$$\small \int_0^{\pi/2}\frac{\arctan(\sin(x))\log(1+\sin^2(x))}{\sin(x)} \textrm{d}x+2 \int_0^1 \arctan \left(\sqrt{\frac{1+x^2}{x(1-x) }}\right) \frac{\log (1+x) }{x \sqrt{1+x^2}} \textrm{d}x$$
$$=\frac{1}{2}\log^2(\sqrt{2}-1)\pi-\frac{\pi^3}{24}-2\pi\operatorname{Li}_2(1-\sqrt{2}). \tag3$$

Question_1: How would we like to go differently in $(1)$ without involving the mentioned preliminary steps in $(2)$ and $(3)$ (maybe in a more direct way)?

Question_2: I also find interesting the version with the squared arctan. Ideas for its evaluation?
$$\int_0^1 \arctan^2 \left(\sqrt{\frac{1+x^2}{x(1-x) }}\right) \frac{\log (1+x) }{x \sqrt{1+x^2}}\textrm{d}x,$$

or more generally,

$$\mathcal{I}=\int_0^1 \arctan^n \left(\sqrt{\frac{1+x^2}{x(1-x) }}\right) \frac{\log (1+x) }{x \sqrt{1+x^2}}\textrm{d}x, \ n\ge2,\ n \in \mathbb{N}.$$

Best Answer

$$\boxed{\int_0^1 \arctan\left(\sqrt{\frac{1+x^2}{x(1-x)}}\right)\frac{\ln(1+x)}{x\sqrt{1+x^2}}dx=\frac{\pi^3}{48}-\frac{\pi}{2}\operatorname{Li}_2 \left(-\frac{1}{(\delta_S)^2}\right)}$$ Where $\delta_S=1+\sqrt 2\, $ is the silver ratio and $\operatorname{Li}_2(x)$ is the dilogarithm.

I felt like using only $2$ terms for the result is more aesthetic, however it can be expanded into the original closed form by using: $$\operatorname{Li}_2 \left(-\frac{1}{(\delta_S)^2}\right)=\frac{7\pi^2}{24}-\ln^2\left(\delta_S\right) + 6\operatorname{Li}_2 \left(-\frac{1}{\delta_S}\right)$$


$$\int_0^1 \color{blue}{\operatorname{arccot}\left(\sqrt{\frac{1+x^2}{x(1-x)}}\right)}\frac{\ln(1+x)}{\color{blue}{x\sqrt{1+x^2}}}dx =\int_0^1 \color{blue}{\int_0^{\large \sqrt{\frac{1-x}{x}}}} \frac{\ln(1+x)}{\color{blue}{1+x^2(1+y^2)}}\color{blue}{dy}dx$$

$$=\int_0^\infty \int_{0}^{\large \frac{1}{1+y^2}} \frac{\ln(1+x)}{1+(1+y^2)x^2}dxdy\overset{\large (*)}=\int_0^\infty \int_0^\infty \frac{\ln x}{1+(1+y^2)(1+x)^2}dxdy$$

$$=\frac{\pi}{2}\int_0^\infty \frac{\ln x}{(1+x)\sqrt{1+(1+x)^2}}dx\overset{\large x\to \frac{1-x}{x}}=\frac{\pi}{2}\int_0^1 \frac{\ln\left(\frac{1-x}{x}\right)}{\sqrt{1+x^2}}dx$$

Above was essential to start with the $\operatorname{arccot }$ version of the integral as it allows to use the identity:

$$\int_0^{\large \frac{1}{a}} \frac{\ln(1+x)}{1+ax^2}dx=\int_0^\infty \frac{\ln x}{1+a(1+x)^2}dx \tag{*}$$


$$\Rightarrow \int_0^1 \arctan\left(\sqrt{\frac{1+x^2}{x(1-x)}}\right)\frac{\ln(1+x)}{x\sqrt{1+x^2}}dx=\frac{\pi}{2}\underbrace{\int_0^1 \frac{\ln(1+x)}{x\sqrt{1+x^2}}dx}_{\large x\to \frac{2x}{1-x^2}}-\frac{\pi}{2}\underbrace{\int_0^1 \frac{\ln\left(\frac{1-x}{x}\right)}{\sqrt{1+x^2}}dx}_{\large x\to \frac{1-x^2}{2x}}$$

$$\require{cancel} =\frac{\pi}{2}\int_0^{1/\delta_S} \cancel{\ln\left(\frac{(1+\delta_S x)(1-x/\delta_S)}{1-x^2}\right)}\frac{dx}{x}-\frac{\pi}{2}\int_{1/\delta_S}^1 \ln\left(\frac{(\delta_Sx-1)(1+x/\delta_S)}{\cancel{1-x^2}}\right)\frac{dx}{x}$$

$$=\frac{\pi}{2}\left(\operatorname{Li}_2\left(-\frac{1}{\delta_S}\right)-\operatorname{Li}_2 \left(1-\delta_S\right)-\ln \left(\delta_S\right) \ln \left(\delta_S-1 \right) -\operatorname{Li}_2 \left(-\frac{1}{(\delta_S)^2}\right)\right)$$ $$=\frac{\pi}{2}\left(\frac{\pi^2}{24}-\operatorname{Li}_2 \left(-\frac{1}{(\delta_S)^2}\right)\right)$$

The simplification from above follows by plugging $x=\delta_S-1\, $ in $(6)$ from here.


It might be also worth to mention that the $(*)$ identity can be further employed to generate other interesting integrals, by using: $$\int_a^b g(y)\int_0^{\large \frac{1}{f(y)}} \frac{\ln(1+x)}{1+f(y) x^2}dxdy=\int_0^\infty\ln x\int_a^b \frac{g(y)}{1+f(y)(1+x)^2}dydx$$

Related Question