Help me evaluate $\int_0^1 \frac{\log(x+1)}{1+x^2} dx$

Going a little round-about way. Consider, for $ s \geqslant 0$, a parametric modification of the integral at hand: $$ \mathcal{I}(s) = \int_0^1 \frac{\log(1+s x)}{1+x^2} \mathrm{d} x $$ The goal is to determine $\mathcal{I}(1)$. Now: $$ \begin{eqnarray} \mathcal{I}(1) &=& \int_0^1 \mathcal{I}^\prime(s) \mathrm{d} s = \int_0^1 \left( \int_0^1 \frac{x}{1+s x} \frac{\mathrm{d} x}{1+x^2} \right) \mathrm{d} s \\ &=& \int_0^1 \left.\left( - \frac{1}{1+s^2} \log(1+s x) + \frac{s}{1+s^2} \arctan(x) + \frac{1}{2} \frac{\log(1+x^2)}{1+x^2} \right) \right|_{x=0}^{x=1} \mathrm{d} s \\ &=& \int_0^1 \left( \color\green{ -\frac{\log(1+s)}{1+s^2}} + \frac{1}{4} \frac{\pi s+\log(4)}{1+s^2}\right) \mathrm{d} s = - \mathcal{I}(1) + \frac{1}{4} \pi \log(2) \end{eqnarray} $$ Hence $$ \mathcal{I}(1) = \frac{\pi}{8} \log(2) $$


Here's a solution that uses simpler tools (or at least tools that I'm more familiar with):

$I =\int_0^1\frac{\log(1+x)}{1+x^2} dx $. We change $x$ into $x=\tan(t)$. Then $t=\arctan{x}$, $dt=\frac{1}{1+x^2}dx$, and the integral becomes:

$I = \int_0^{\frac{\pi}{4}}\log(1+\tan(t))dt$. Now $s = \frac{\pi}{4}-t$, $ds=-dt$, and the integral becomes:

$I = -\int_{\frac{\pi}{4}}^0 \log(1+\tan(\frac{\pi}{4}-s))ds = \int_0^{\frac{\pi}{4}} \log(1+\tan(\frac{\pi}{4}-s))ds$

Using $\tan(a-b) = \frac{\tan a - \tan b}{1 + \tan(a)\tan(b)}$, we have

$I = \int_0^{\frac{\pi}{4}} \log(1+\frac{1 - \tan s}{1 + \tan s}) ds = \int_0^{\frac{\pi}{4}}\log(\frac{2}{1+\tan s}) ds = \int_0^{\frac{\pi}{4}} (\log(2) - \log(1+\tan s)) ds = \int_0^{\frac{\pi}{4}}\log(2)ds - I = \frac{\pi}{4}\log(2) - I$.

So $I = \frac{\pi}{4}\log(2) - I$, hence $I = \frac{\pi}{8}\log(2)$.


Let

$$I(a)=\int_0^1 \frac{\log(1+ax)}{1+x^2}dx$$

Differentiate it, to get

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

Integrate that rational function, then integrate w.r.t. $a$ and find $I(a=1)$.

As Theorem suggested, you can also do the following:

$$\int_0^1 \frac{\log(1+x)}{1+x^2}dx$$

$$\int_0^1 \left(\int_0^x \frac{1}{1+y}dy\right)\frac{1}{1+x^2}dx$$

$$\int_0^1 \int_0^x \frac{1}{1+y}dy\frac{1}{1+x^2}dx$$

Now make a change of variables $y=ux$ in the inner integral:

$$\tag 1 \int_0^1 \int_0^1 \frac{x}{1+ux}\frac{1}{1+x^2}dudx$$

Now partial fractions:

$${x \over {1 + xu}}{1 \over {1 + {x^2}}} = {1 \over {1 + {u^2}}}{x \over {1 + {x^2}}} + {u \over {1 + {u^2}}}{1 \over {1 + {x^2}}} - {u \over {1 + {u^2}}}{1 \over {1 + xu}}$$

Now, integrating the first two terms, which account to the same$^1$, gives that you integral is

$$\mathcal I=\frac \pi 4\log 2-\int_0^1\int_0^1 \frac u {1+u^2}\frac{1}{1+xu}dxdu$$

Now, the latter integral is just our original integral, due to symmetry, as you see in $(1)$

This means that $$\mathcal I =\frac \pi 8 \log 2$$

as desired. $1$: symmetry, once again.


See here for a similar integral and its solution with double integrals.

Some insight about the two methods considered:

Note that as Sasha is showing

$$I(1)=\int_0^1 I'(a)da=\int_0^1 \int_0^1\frac{x}{(1+ax)(1+x^2)}dxda$$ which is exaclty what we got in the second option

$$I=\int_0^1\int_0^1 \frac{1 }{1+mx}\frac{x}{1+x^2}dxdm$$

This means any way you find to solve any of the two will indeed solve the other.