Integrating $\frac{\log(1+x)}{1+x^2}$ [duplicate]

Possible Duplicate:
Evaluate the integral: $\int_{0}^{1} \frac{\ln(x+1)}{x^2+1} dx$

I am a bit stuck here in evaluating the following integral:$$\int_{0}^{1}\frac{\log(1+x)}{1+x^2}\,\mathrm dx$$.Your help is appreciated.


Put $x=\tan t$ so that $x=1$ corresponds to $t=\frac \pi 4$, and $x=0$ to $t=0$. Hence,

$$\int_{0}^{1}\frac{\log(1+x)}{1+x^2}dx=\int_{0}^{\frac \pi 4}\frac{\log(1+\tan t)}{(1+\tan^2t)}\sec^2t dt=\int_{0}^{\frac \pi 4}\log(1+\tan t)dt$$

Let $I=\int_{0}^{\frac \pi 4}\log(1+\tan t)dt$, then:

$I=\int_{0}^{\frac \pi 4}\log(1+\tan(\frac \pi 4- t)dt$ using $\int_{a}^{b}f(x)dx=\int_{a}^{b}f(a+b-x)dx$ (Proof)

$I=\int_{0}^{\frac \pi 4}\log\left(1+\frac{1-\tan t}{1+\tan t}\right)dt$

$I=\int_{0}^{\frac \pi 4}\log\left(\frac 2{1+\tan t}\right)dt$

$I=\log 2\int_{0}^{\frac \pi 4}dt-\int_{0}^{\frac \pi 4}\log\left(1+\tan t\right)dt$

$I=\log 2(\frac \pi 4-0)-I$

Hence $2I=\frac \pi 4 \log 2$


A thought: Notice $$\int\limits_0^1 \frac{\log(1 + x)dx}{1 + x^2} = \int\limits_0^1 \frac{\log(1 + x)dx}{1 + 2x -2x + x^2} = \int\limits_0^1 \frac{\log(1 + x)dx}{(x+1)^2 - 2x } \int\limits_0^1 \frac{\log(1 + x)dx}{(x+1)^2 - 2(x+1) + 2}$$ Now put $u = x + 1$ and so youll have

$$\int\limits_1^2 \frac{\log(u)du}{u^2 - 2u + 2} = \int\limits_1^2 \frac{\log(u)du}{(u-1)^2 + 2} = \int\limits_1^2 \log(u)d[\arctan(u-1)]$$

Now use integration by parts..


A related problem. You can get the answer in terms of the dilogarithm function $Li_s(z)$

$$\frac{i}{2}{Li_{2}} \left( \frac{1}{2}+\frac{1}{2}\,i \right)-\frac{i}{2}{Li_2} \left( \frac{1}{2}-\frac{1}{2}\,i \right) +\frac{1}{4}\,\pi \,\ln \left( 2 \right) -{\it Catalan}= 0.2721982614 \,,$$

where $\mathrm{Catalan}= 0.9159655942 $ . See here for the technique. To use the mentioned method, first, use the change of variables $t=x+1$

$$ \int_{0}^{1}\frac{\log(1+x)}{1+x^2}\,\mathrm dx= \int_{1}^{2} \frac{\ln(t)\,dt}{(t-(1+i))(t-(1-i))} \,.$$

Note that, this is a general technique which can handle more general integrals.