Definite integral $\int_0^1 \frac{\arctan x}{x\,\sqrt{1-x^2}}\,\text{d}x$

Wanting to calculate the integral $\int_0^1 \frac{\arctan x}{x\,\sqrt{1-x^2}}\,\text{d}x$ it will certainly already known to many of you that an interesting way to attack it is to refer to the method of integration and differentiation with respect to a parameter, getting $\frac{\pi}{2}\,\log\left(1+\sqrt{2}\right)$.

Instead, what it does not at all clear is how software such as Wolfram Mathematica can calculate that result in an exact manner and not only approximate. Can someone enlighten me? Thanks!


Note that

$$\frac{\arctan{x}}{x} = \int_0^1 \frac{du}{1+x^2 u^2} $$

Thus, the integral may be written as

$$\int_0^1 dx \frac1{\sqrt{1-x^2}} \int_0^1 \frac{du}{1+x^2 u^2} = \frac12 \int_0^1 du \, \int_{-1}^1 \frac{dx}{(1+u^2 x^2) \sqrt{1-x^2}}$$

Let's attack the inner integral. We may do this using the residue theorem. Consider the following contour integral:

$$\oint_C \frac{dz}{(1+u^2 z^2) \sqrt{z^2-1}} $$

where $C$ is the following contour:

enter image description here

with the circular-arc detours about the branch points at $z=\pm 1$ have radius $\epsilon$ and the outer circle has radius $R$. The contour integral is equal to

$$\int_{-R}^{-1-\epsilon} \frac{dx}{(1+u^2 x^2) \sqrt{x^2-1}} + i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac1{[1+u^2 (-1+\epsilon e^{i \phi})^2] \sqrt{(-1+\epsilon e^{i \phi})^2-1}} \\ + e^{-i \pi/2} \int_{-1+\epsilon}^{1-\epsilon} \frac{dx}{(1+u^2 x^2) \sqrt{1-x^2}} + i \epsilon \int_{\pi}^{-\pi} d\phi \, e^{i \phi} \frac1{[1+u^2 (1+\epsilon e^{i \phi})^2] \sqrt{(1+\epsilon e^{i \phi})^2-1}} \\ + e^{i \pi/2} \int_{1-\epsilon}^{-1+\epsilon} \frac{dx}{(1+u^2 x^2) \sqrt{1-x^2}} + i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \frac1{[1+u^2 (-1+\epsilon e^{i \phi})^2] \sqrt{(-1+\epsilon e^{i \phi})^2-1}} \\ +\int_{-1-\epsilon}^{-R} \frac{dx}{(1+u^2 x^2) \sqrt{x^2-1}} +i R \int_{-\pi}^{\pi} d\theta \, e^{i \theta} \frac1{(1+u^2 R^2 e^{i 2 \phi})\sqrt{R^2 e^{i 2 \phi}-1}}$$

The first and seventh integrals cancel.

We now evaluate the contour integral in the limits as $\epsilon \to 0$ and $R \to \infty$. As $\epsilon \to 0$, the second, fourth, and sixth integrals vanish. As $R \to \infty$, the eighth integral vanishes.

By the residue theorem, the contour integral is equal to $i 2 \pi$ times the sum of the residues of the integrand at the poles $z_{\pm} = \pm i/u$. Thus,

$$-i 2 \int_{-1}^1 \frac{dx}{(1+u^2 x^2)\sqrt{1-x^2}} = i 2 \pi \frac1{u^2} \left [\frac1{(i 2/u) e^{i \pi/2} \sqrt{1/u^2+1}} + \frac1{(-i 2/u) e^{-i \pi/2} \sqrt{1/u^2+1}} \right ]$$

Note that the poles lie on different branches so that the residue add and do not cancel. So...

$$\int_{-1}^1 \frac{dx}{(1+u^2 x^2)\sqrt{1-x^2}} = \frac{\pi}{\sqrt{1+u^2}} $$

Thus,

$$\int_0^1 dx \frac{\arctan{x}}{x \sqrt{1-x^2}} = \frac12 \pi \int_0^1 \frac{du}{\sqrt{1+u^2}} = \frac{\pi}{2} \sinh^{-1}{(1)} = \frac{\pi}{2} \log{\left (1+\sqrt{2} \right )}$$


I thought it might be instructive to present two approaches that begin with the Feyman "trick" for differentiating under the integral. We write

$$I(a)=\int_0^1\frac{\arctan (ax)}{x\sqrt{1-x^2}}\,dx$$

Then, we differentiate with $I(a)$ to find

$$I'(a)=\int_0^1\frac{1}{(1+x^2a^2)\sqrt{1-x^2}}\,dx$$

can be evaluated by first substituting $x=\sin u$ so that

$$\begin{align} I'(a)&=\int_0^{\pi/2}\frac{1}{1+a^2\sin^2 u}\,du\\\\ &=\frac12 \int_{-\pi/2}^{\pi/2}\frac{1}{1+a^2\sin^2 u}\,du \end{align}$$

Next, we use the trigonometric identity $\sin^2u=\frac{1-\cos(2u)}{2}$ so that

$$\begin{align} I'(a)&=\int_0^{\pi/2}\frac{1}{1+\frac12a^2-\frac12a^2\cos (2u)}\,du \tag 1\\\\ &=\frac14 \int_{-\pi}^{\pi}\frac{1}{1+\frac12a^2-\frac12a^2\cos (u)}\,du \tag 2 \end{align}$$

We pursue evaluation of $(1)$ using the Weirestrass Substitution and evaluation of $(2)$ using contour integration.


First, we enforce the substitution $2u=\tan(x/2)$ in $(1)$. Then, we obtain

$$\begin{align} I'(a)&=2\int_{0}^{\infty}\frac{1}{1+4(1+a^2)x^2}\,dx\\\\ &=\frac{2}{2\sqrt{1+a^2}}\left.\arctan\left(2\sqrt{1+a^2}\,x\right)\right|_{0}^{\infty}\\\\ &=\frac{\pi}{2\sqrt{1+a^2}} \end{align}$$


Alternatively, we let $u=e^{iz}$ in $(2)$ and write

$$\begin{align} I'(a)&=\frac{i}{2a^2}\oint_{|z|=1}\frac{1}{z^2-\left(1+\frac{2}{a^2}\right)z+1}\,dz\\\\ &=\frac{i}{a^2}(2\pi i) \,\,\text{Res}\left(\frac{1}{z^2-2\left(1+\frac{2}{a^2}\right)z+1},z=\left(1+\frac{2}{a^2}\right)-\frac{2\sqrt{1+a^2}}{a^2}\right)\\\\ &=\pi/2\sqrt{1+a^2} \end{align}$$


Finally, following the approach used by @Manu we find from $I'(a)$, $I(1)$ is

$$I(1)=\pi \log(1+\sqrt{2})$$

And we are done!


$\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{\mathrm{i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} &\color{#f00}{\int_{0}^{1}{\arctan\pars{x} \over x\root{1 - x^{2}}}\,\dd x} = \int_{0}^{1}{1 \over \root{1 - x^{2}}}\ \overbrace{\int_{0}^{1}{\dd t \over 1 + x^{2}t^{2}}} ^{\ds{\arctan\pars{x} \over x}}\ \,\dd x \\[5mm] = &\ \int_{0}^{1}\int_{0}^{1}{\dd x \over \root{1 - x^{2}}\pars{1 + t^{2}x^{2}}} \,\dd t \\[5mm] \stackrel{x\ \mapsto\ 1/x}{=}\,\,\,& \int_{0}^{1} \int_{1}^{\infty}{x\,\dd x \over \root{x^{2} - 1}\pars{x^{2} + t^{2}}}\,\dd t \label{1}\tag{1} \end{align}

Note that the last substitution $\ds{\pars{~x \mapsto 1/x~}}$ leads to a $\ds{\ul{trivial\ integration}}$.


With the substitution $\ds{x^{2} \mapsto x}$ in the last integration $\ds{~\pars{\mbox{see}\ \eqref{1}}~}$, \begin{align} &\color{#f00}{\int_{0}^{1}{\arctan\pars{x} \over x\root{1 - x^{2}}}\,\dd x} = \half\int_{0}^{1} \int_{1}^{\infty}{\dd x \over \root{x - 1}\pars{x + t^{2}}}\,\dd t \\[5mm] & \stackrel{x\ \equiv\ 1 + y^{2}}{=}\,\,\,\ \int_{0}^{1}\int_{0}^{\infty}{\dd y \over y^{2} + 1 + t^{2}}\,\dd t = \int_{0}^{1}{1 \over \root{1 + t^{2}}} \int_{0}^{\infty}{\dd y \over y^{2} + 1}\,\dd t \\[5mm] = &\ {\pi \over 2}\int_{0}^{1}{\dd t \over \root{1 + t^{2}}} \stackrel{t\ =\ \sinh\pars{\theta}}{=}\,\,\, {\pi \over 2}\int_{0}^{\mrm{arcsinh}\pars{1}}\,\dd\theta = \color{#f00}{{\pi \over 2}\,\mrm{arcsinh}\pars{1}} \\[5mm] = &\ \color{#f00}{{\pi \over 2}\,\ln\pars{1 + \root{2}}} \end{align}

We first might notice that $$\frac{\arctan(x)}{x}=\int_{0}^{1}\frac{dt}{1+(xt)^{2}}$$

Now using Tonelli's Theorem to switch around the order we get $$\int_{0}^{1}\frac{\arctan(x)}{x\sqrt{1-x^{2}}}\,dx= \int_{0}^{1}\int_{0}^{1}\frac{1}{1+(tx)^{2}}\frac{1}{\sqrt{1-x^{2}}}\,dt \,dx= \int_{0}^{1}\left(\int_{0}^{1}\frac{1}{1+(tx)^{2}}\frac{1}{\sqrt{1-x^{2}}}\,dx\right)\, dt$$

Focusing on the inner integral, denoted $\mathcal{I}(t)$

Making the change of variable $\sin(x)=u$, we the obtain $$\mathcal{I}(t)=\int_{0}^{\frac{\pi}{2}}\frac{\,du}{1+t^{2}\sin^{2}(u)}=\int_{0}^{\frac{\pi}{2}}\frac{\,du}{\cos^{2}(u)+(t^{2}+1)\sin^{2}(u)}=\int_{0}^{\frac{\pi}{2}}\frac{\,d\tan(u)}{1+(t^{2}+1)\tan^{2}(u)}$$

Now doing the substitution $\tan(u)= s$ gives $$\mathcal{I}(t)=\int_{0}^{\infty}\frac{ds}{1+(1+t^{2})s^{2}}= \frac{\pi}{2}\frac{1}{\sqrt{1+t^{2}}}$$

Thus $$\int_{0}^{1}\frac{\arctan(x)}{x\sqrt{1-x^{2}}}\,dx=\int_{0}^{1}\frac{\pi}{2}\frac{1}{\sqrt{1+t^{2}}} \,dt=\frac{\pi}{2}\log(1+\sqrt{2})$$