# Calculate $I=\int_0^1\frac{\ln(1+x)}{1+x^2}\,dx$ [duplicate]

How can I calculate the integral $I=\int_0^1\frac{\ln(1+x)}{1+x^2}\,dx$ by substituting $t=\frac{1-x}{1+x}$.

## marked as duplicate by gebruiker, Watson, user228113, Jennifer, colormegoneJun 3 '16 at 19:25

• @RonGordon That's why I put here because it's not an ordinary integration by substitution. – pourjour May 6 '13 at 22:37
• @pourjour You mean that you're actually integrating from $0$ to $\frac{1-x}{1+x}$? (I don't see how that makes sense) – apnorton May 6 '13 at 22:40
• @anorton sorry I meant 1 not t – pourjour May 6 '13 at 22:44

OK, the substitution you suggest works very well. Note that

$$x = \frac{1-t}{1+t}$$

$$1+x = \frac{2}{1+t}$$

$$1+x^2 = \frac{2(1+t^2)}{(1+t)^2}$$

$$dx = -\frac{2}{(1+t)^2} dt$$

Then

$$\int_0^1 dx \frac{\log{(1+x)}}{1+x^2} = \int_0^1 dt \frac{\log{2} - \log{(1+t)}}{1+t^2}$$

With a little bit of algebra, we see immediately that

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

Another way. Setting $x= \tan(t)$, we get that \begin{align} I & = \int_0^{\pi/4} \ln(1+\tan(t))dt = \int_0^{\pi/4} \ln \left(\sqrt2 \cos(\pi/4-t)\right) dt - \int_0^{\pi/4} \ln(\cos(t)) dt\\ & = \int_0^{\pi/4} \ln(\sqrt2) dt + \underbrace{\int_0^{\pi/4}\ln \left(\cos(\pi/4-t)\right) dt}_{\pi/4-t \to t \text{ gives }\int_0^{\pi/4} \ln(\cos(t)) dt} - \int_0^{\pi/4} \ln(\cos(t)) dt\\ & = \dfrac{\pi \ln(2)}8 \end{align}