Evaluating $\int_0^{\pi/2}\operatorname{arcsinh}(2\tan x)\,dx$

On the path of Kemono Chen...

\begin{align}J&=\int_0^{\pi/2}\operatorname{arcsinh}(2\tan x)dx\end{align}

Perform the change of variable $y=\operatorname{arcsinh}(2\tan x)$,

\begin{align}J&=\int_0^{+\infty}\frac{2x\cosh x}{4+\sinh^2 x}\,dx\\ &=\int_0^{+\infty}\frac{4x\left(\text{e}^{x}+\text{e}^{-x}\right)}{14+\text{e}^{2x}+\text{e}^{-2x}}\,dx\\ &=\int_0^{+\infty}\frac{4x\text{e}^{-x}\left(\text{e}^{2x}+1\right)}{14+\text{e}^{2x}+\text{e}^{-2x}}\,dx\\ \end{align}

Perform the change of variable $y=\text{e}^{-x}$,

\begin{align}J&=-\int_0^1 \frac{4\ln x\left(1+\frac{1}{x^2}\right)}{14+x^2+\frac{1}{x^2}}\\ &=-\int_0^1 \frac{4\ln x\left(1+x^2\right)}{x^4+14x^2+1}\\ &=\left[-\arctan\left(\frac{4x}{1-x^2}\right)\ln x\right]_0^1+\int_0^1 \frac{\arctan\left(\frac{4x}{1-x^2}\right)}{x}\,dx\\ &=\int_0^1 \frac{\arctan\left(\frac{4x}{1-x^2}\right)}{x}\,dx\\ &=\int_0^1 \frac{\arctan\left(\left(2+\sqrt{3}\right)x\right)}{x}\,dx+\int_0^1 \frac{\arctan\left(\left(2-\sqrt{3}\right)x\right)}{x}\,dx\\ \end{align}

In the first integral perform the change of variable $y=\left(2+\sqrt{3}\right)x$,

In the second integral perform the change of variable $y=\left(2-\sqrt{3}\right)x$,

\begin{align}J&=\int_0^{2+\sqrt{3}}\frac{\arctan x}{x}\,dx+\int_0^{2-\sqrt{3}}\frac{\arctan x}{x}\,dx\\ &=\Big[\arctan x\ln x\Big]_0^{2+\sqrt{3}}-\int_0^{2+\sqrt{3}}\frac{\ln x}{1+x^2}\,dx+\Big[\arctan x\ln x\Big]_0^{2-\sqrt{3}}-\int_0^{2-\sqrt{3}}\frac{\ln x}{1+x^2}\,dx\\ &=\frac{5\pi}{12}\ln\left(2+\sqrt{3}\right)-\int_0^{2+\sqrt{3}}\frac{\ln x}{1+x^2}\,dx+\frac{\pi}{12}\ln\left(2-\sqrt{3}\right)-\int_0^{2-\sqrt{3}}\frac{\ln x}{1+x^2}\,dx\\ &=\frac{\pi}{3}\ln\left(2+\sqrt{3}\right)-\int_0^{2+\sqrt{3}}\frac{\ln x}{1+x^2}\,dx-\int_0^{2-\sqrt{3}}\frac{\ln x}{1+x^2}\,dx \end{align}

In the first integral perform the change of variable $y=\dfrac{1}{x}$,

\begin{align}J&=\frac{\pi}{3}\ln\left(2+\sqrt{3}\right)+\int_{2-\sqrt{3}}^{+\infty}\frac{\ln x}{1+x^2}\,dx-\int_0^{2-\sqrt{3}}\frac{\ln x}{1+x^2}\,dx\\ &=\frac{\pi}{3}\ln\left(2+\sqrt{3}\right)+\int_0^{+\infty}\frac{\ln x}{1+x^2}\,dx-2\int_0^{2-\sqrt{3}}\frac{\ln x}{1+x^2}\,dx\\ &=\frac{\pi}{3}\ln\left(2+\sqrt{3}\right)-2\int_0^{2-\sqrt{3}}\frac{\ln x}{1+x^2}\,dx\\ \end{align}

Perform the change of variable $y=\tan x$,

\begin{align}J&=\frac{\pi}{3}\ln\left(2+\sqrt{3}\right)-2\int_0^{\frac{\pi}{12}}\ln\left(\tan x\right)\,dx\\ \end{align}

It is well known that,

\begin{align} \int_0^{\frac{\pi}{12}}\ln\left(\tan x\right)\,dx=-\frac{2}{3}\text{G} \end{align}

(see: Integral: $\int_0^{\pi/12} \ln(\tan x)\,dx$ )

Thus,

\begin{align}J&=\frac{\pi}{3}\ln\left(2+\sqrt{3}\right)-2\times -\frac{2}{3}\text{G}\\ &=\boxed{\frac{\pi}{3}\ln\left(2+\sqrt{3}\right)+\frac{4}{3}\text{G}} \end{align}

NB:

Observe that,

\begin{align}2-\sqrt{3}&=\frac{1}{2+\sqrt{3}}\\ \ln\left(2-\sqrt{3}\right)&=-\ln\left(2+\sqrt{3}\right)\\ \int_0^\infty \frac{\ln x}{1+x^2}\,dx&=0 \end{align} (perform the change of variable $y=\dfrac{1}{x}$ )


I will begin with the same approach as in @DavidG's answer, but will settle in a different argument. Let

$$ J(t) = \int_{0}^{\infty} \frac{\operatorname{arsinh}(tx)}{1+x^2} \, \mathrm{d}x. $$

Our goal is to compute $J(2)$ using Feynman's trick. Differentiating $J(t)$ and substituting $x=\sqrt{u^{-2}-1}$, we obtain

\begin{align*} J'(t) = \int_{0}^{\infty} \frac{x}{(1+x^2)\sqrt{1+t^2x^2}} \, \mathrm{d}x = \int_{0}^{1} \frac{1}{\sqrt{1 - (1-t^2)(1-u^2)}} \, \mathrm{d}u. \end{align*}

So it follows that

\begin{align*} J(2) &= \int_{0}^{2} \int_{0}^{1} \frac{1}{\sqrt{1 - (1-t^2)(1-u^2)}} \, \mathrm{d}u\mathrm{d}t \\ &= \int_{0}^{1} \int_{0}^{1} \frac{1}{\sqrt{1 - (1-t^2)(1-u^2)}} \, \mathrm{d}u\mathrm{d}t + \int_{1}^{2} \int_{0}^{1} \frac{1}{\sqrt{1 + (t^2-1)(1-u^2)}} \, \mathrm{d}u\mathrm{d}t. \end{align*}

The inner integral is easily computed, yielding

\begin{align*} J(2) &= \int_{0}^{1} \frac{\operatorname{artanh}\left( \sqrt{1 - t^2} \right)}{\sqrt{1 - t^2}} \, \mathrm{d}t + \int_{1}^{2} \frac{\arctan\left(\sqrt{t^2-1}\right)}{\sqrt{t^2 - 1}} \, \mathrm{d}t. \end{align*}

Now we substitute $t = \operatorname{sech} \varphi$ for the first integral and $t = \sec \theta$ for the second integral. This yields

\begin{align*} J(2) &= \int_{0}^{\infty} \frac{\varphi}{\cosh\varphi} \, \mathrm{d}\varphi + \int_{0}^{\frac{\pi}{3}} \frac{\theta}{\cos\theta} \, \mathrm{d}\theta. \end{align*}

These integrals can be computed as follows:

  • Using $ \operatorname{sech}\varphi = \frac{2e^{-\varphi}}{1 + e^{-2\varphi}} = 2 \sum_{n=0}^{\infty} (-1)^n e^{-(2n+1)\varphi} $, we obtain

    $$ \int_{0}^{\infty} \frac{\varphi}{\cosh\varphi} \, \mathrm{d}\varphi = 2 \sum_{n=0}^{\infty} (-1)^n \int_{0}^{\infty} \varphi e^{-(2n+1)\varphi} \, \mathrm{d}\varphi = 2 \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n+1)^2} = 2G. $$

  • Taking integration by parts,

    \begin{align*} \int_{0}^{\frac{\pi}{3}} \frac{\theta}{\cos\theta} \, \mathrm{d}\theta &= \left[ - \theta \log \left( \tan \left( \frac{\pi}{4} - \frac{\theta}{2} \right) \right) \right]_{0}^{\frac{\pi}{3}} + \int_{0}^{\frac{\pi}{3}} \log \left( \tan \left( \frac{\pi}{4} - \frac{\theta}{2} \right) \right) \, \mathrm{d}\theta \\ &= \frac{\pi}{3} \log \left( 2 + \sqrt{3} \right) + 2 \int_{\frac{\pi}{12}}^{\frac{\pi}{4}} \log \left( \tan \theta \right) \, \mathrm{d}\theta. \end{align*}

    This can be computed by using the Fourier series $\log \left( \tan \theta \right) = - 2 \sum_{n=0}^{\infty} \frac{\cos(4n+2)\theta}{2n+1} $ to yield

    \begin{align*} \int_{0}^{\frac{\pi}{3}} \frac{\theta}{\cos\theta} \, \mathrm{d}\theta &= \frac{\pi}{3} \log \left( 2 + \sqrt{3} \right) - 2 \sum_{n=0}^{\infty} \frac{\sin\left( \frac{\pi}{2} (2n+1) \right) - \sin\left( \frac{\pi}{6} (2n+1) \right)}{(2n+1)^2} \\ &= \frac{\pi}{3} \log \left( 2 + \sqrt{3} \right) - \frac{2}{3}G. \end{align*}

Combining two result, we obtain the desired answer.


Here is another variation along a theme which like @DavidG approach uses Feynman's trick of differentiating under the integral sign.

Let $$I(a) = \int_0^{\frac{\pi}{2}} \operatorname{arcsinh} (a \tan x) \, dx, \qquad a > 1.$$ We are required to find $I(2)$. We start by finding $I(1)$ first, which will be needed later on.

For $a = 1$ we have \begin{align} I(1) &= \int_0^{\frac{\pi}{2}} \operatorname{arcsinh} (\tan x) \, dx\\ &= \int_0^{\frac{\pi}{2}} \ln \left (\frac{1 + \sin x}{\cos x} \right ) \, dx\\ &= \int_0^{\frac{\pi}{2}} \ln (1 + \sin x) \, dx - \int_0^{\frac{\pi}{2}} \ln (\cos x) \, dx. \end{align} Now the first of these integrals can be found, for example, by rewriting it as \begin{align} \int_0^{\frac{\pi}{2}} \ln (1 + \sin x) \, dx &= \int_0^{\frac{\pi}{2}} \ln (1 + \cos x) \, dx\\ &= \int_0^{\frac{\pi}{2}} \ln \left (\frac{1}{2} \cos^2 \frac{x}{2} \right ) \, dx\\ &= \frac{\pi}{2} \ln 2 + 4 \int_0^{\frac{\pi}{4}} \ln (\cos x) \, dx \end{align} and then employing the Fourier series representation for $\ln (\cos x)$ found here. The final result is $$\int_0^{\frac{\pi}{2}} \ln (1 + \sin x) \, dx = 2 \mathbf{G} - \frac{\pi}{2} \ln 2.$$ Here $\mathbf{G}$ is Catalan's constant.

The second of the integrals is very well known. Here $$\int_0^{\frac{\pi}{2}} \ln (\cos x) \, dx = - \frac{\pi}{2} \ln 2.$$ Thus $I(1) = 2 \mathbf{G}$.

Moving to the main event, by differentiating under the integral sign with respect to $a$ we have \begin{align} I'(a) &= \int_0^{\frac{\pi}{2}} \frac{\tan x}{\sqrt{a^2 \tan^2 x + 1}} \, dx\\ &= \int_0^{\frac{\pi}{2}} \frac{\sin x}{\sqrt{a^2 - (a^2 - 1) \cos^2 x}} \, dx. \end{align} Observe the term $(a^2 - 1)$ is positive since $a > 1$. Letting $u = \cos x$ one has $$I'(a) = \int_0^1 \frac{du}{\sqrt{a^2 - (a^2 - 1) u^2}} = \frac{1}{\sqrt{a^2 - 1}} \sin^{-1} \left (\frac{\sqrt{a^2 - 1}}{a} \right ).$$

As we require $I(2)$ observe that $$I(2) - I(1) = \int_1^2 I'(a) \, da.$$ Thus $$I(2) = 2 \mathbf{G} + \int_1^2 \frac{1}{\sqrt{a^2 - 1}} \sin^{-1} \left (\frac{\sqrt{a^2 - 1}}{a} \right ) \, da.$$ Integrating by parts leads to $$I(2) = 2 \mathbf{G} + \frac{\pi}{3} \ln (2 + \sqrt{3}) - \int_1^2 \frac{\cosh^{-1} a}{a \sqrt{a^2 - 1}} \, da.$$ Now let $a = \cosh t$. This gives $$I(2) = 2\mathbf{G} + \frac{\pi}{3} \ln (2 + \sqrt{3}) - \int_0^{\ln(2 + \sqrt{3})} \frac{t}{\cosh t} \, dt.$$ Then let $t = \ln y$. This gives $$I(2) = 2\mathbf{G} + \frac{\pi}{3} \ln (2 + \sqrt{3}) - 2\int_1^{2 + \sqrt{3}} \frac{\ln y}{1 + y^2} \, dy.$$ Now let $y = \tan \theta$. Then we have $$I(2) = 2\mathbf{G} + \frac{\pi}{3} \ln (2 + \sqrt{3}) - 2\int_{\frac{\pi}{4}}^{\frac{5\pi}{12}} \ln (\tan \theta) \, d\theta.$$ Finally, enforcing a substitution of $\theta \mapsto \dfrac{\pi}{2} - \theta$ leads to \begin{align} I(2) &= 2\mathbf{G} + \frac{\pi}{3} \ln (2 + \sqrt{3}) + 2 \int_{\frac{\pi}{12}}^{\frac{\pi}{4}} \ln (\tan \theta) \, d\theta\\ &= 2\mathbf{G} + \frac{\pi}{3} \ln (2 + \sqrt{3}) + 2\int_0^{\frac{\pi}{4}} \ln (\tan \theta) \, d\theta - 2 \int_0^{\frac{\pi}{12}} \ln (\tan \theta) \, d\theta. \end{align} For the first of the integrals we have $$\int_0^{\frac{\pi}{4}} \ln (\tan x) \, dx = -\mathbf{G}.$$ While for the second of the integrals we have $$\int_0^{\frac{\pi}{12}} \ln (\tan x) \, dx = -\frac{2}{3} \mathbf{G}.$$ So finally $$I(2) = 2\mathbf{G} + \frac{\pi}{3} \ln (2 + \sqrt{3}) - 2\mathbf{G} + \frac{4}{3} \mathbf{G},$$ or $$\int_0^{\frac{\pi}{2}} \operatorname{arcsinh} (2 \tan x) \, dx = \frac{\pi}{3} \ln (2 + \sqrt{3}) + \frac{4}{3} \mathbf{G},$$ as announced.