# How to evaluate $\int_0^1 \frac{\ln(x+1)}{x^2+1} dx$

This problem appears at the end of Trig substitution section of Calculus by Larson. I tried using trig substitution but it was a bootless attempt

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

-
To all: Thank you so much for the great help – Logarithm Mar 6 '13 at 6:06
This question may be a duplicate of Evaluate the integral: $\int_{0}^{1} \frac{\ln(x+1)}{x^2+1} \mathrm dx$. – robjohn Apr 19 at 3:54

Let $x = \tan(t)$. We then have $dx = \sec^2(t)dt$ and $\dfrac1{1+x^2} = \dfrac1{1+ \tan^2(t)} = \dfrac1{\sec^2(t)}$.

Hence, $\dfrac{dx}{1+x^2} = dt$. \begin{align} \int_0^1 \dfrac{\ln(1+x)}{1+x^2} dx & = \int_0^{\pi/4} \ln(1+\tan(t)) dt = \int_0^{\pi/4} \ln(\cos(t)+\sin(t)) dt - \int_0^{\pi/4} \ln(\cos(t)) dt\\ & = \int_0^{\pi/4} \ln(\sqrt{2}\cos(t-\pi/4)) dt - \int_0^{\pi/4} \ln(\cos(t)) dt\\ & = \int_0^{\pi/4} \ln(\sqrt{2}) dt + \int_0^{\pi/4}\ln(\cos(t-\pi/4)) dt - \int_0^{\pi/4} \ln(\cos(t)) dt\\ & = \dfrac{\pi \ln(2)}8 + \int_{-\pi/4}^0 \ln(\cos(t)) dt - \int_0^{\pi/4} \ln(\cos(t)) dt\\ & = \dfrac{\pi \ln(2)}8 \,\,\,\,\,\,\,\,(\because \cos(t) \text{ is even}) \end{align}

-
Nice. For the questioner, the substitution is $\tan(t) = x$, so $dx = \sec^2(t) dt$, which cancels with the denominator. – Andrew Salmon Mar 6 '13 at 5:57

First make the substitution $x=\tan t$ to find $$I=\int_0^1 dx\,\frac{\ln(x+1)}{x^2+1}=\int_0^{\pi/4} dt\,\ln(1+\tan t).$$ Now a substitution $u=\frac{\pi}{4}-t$ gives that $$I=\int_0^{\pi/4} du\,\ln\left(\frac{2\cos u}{\cos u+\sin u}\right).$$ If you add these, you get $$2I=\int_0^{\pi/4} dt\,\ln\left(\frac{\sin t+\cos t}{\cos t}\cdot\frac{2\cos t}{\cos t+\sin t}\right)=\frac{\pi}{4}\ln 2.$$

-

Substitute $x=\tan(\theta)$ the integral then reduces to

$$\int_0^{\frac{\pi}{4}} \ln(1+\tan(\theta)) d\theta \\ = \int_0^{\frac{\pi}{4}} \ln(\frac{\sqrt{2}\cos(\pi/4-\theta)}{\cos(\theta)}) d\theta \\ = \int_0^{\frac{\pi}{4}} \ln(\sqrt{2})d\theta \\ = \frac{\pi \ln(2)}{8}$$

-

Like Marvis, let us put $x=\tan\theta$

$$\int_0^1 \dfrac{\ln(1+x)}{1+x^2} dx = \int_0^{\frac\pi4} \ln(1+\tan\theta) d \theta$$

As $\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$

So, $$I=\int_0^{\frac\pi4} \ln(1+\tan\theta) d\theta$$ $$=\int_0^{\frac\pi4} \ln(1+\tan(\frac\pi4-\theta)) d\theta$$ $$=\int_0^{\frac\pi4} \ln\left(1+\frac{1-\tan\theta}{1+\tan\theta}\right)d\theta$$ $$=\int_0^{\frac\pi4} \ln\frac2{(1+\tan\theta)}d\theta$$ $$=\int_0^{\frac\pi4} \{\ln2-\ln(1+\tan\theta)\}d\theta$$ $$=\int_0^{\frac\pi4} \ln2- \int_0^{\frac\pi4}\ln(1+\tan\theta)d\theta$$ $$=\int_0^{\frac\pi4} \ln2d\theta-I$$

So, $$2I=\int_0^{\frac\pi4} \ln2d\theta$$

-

Another approach :

Set $t=\dfrac{1-x}{1+x}\quad\color{red}{\Rightarrow}\quad x=\dfrac{1-t}{1+t}\quad\color{red}{\Rightarrow}\quad dx=-\dfrac{2}{1+t^2}\ dt$, then \begin{align} \int_0^1\frac{\ln(1+x)}{1+x^2}\ dx&=\int_0^1\frac{\ln\left(\frac2{1+t}\right)}{1+t^2}\ dt\\ &=\int_0^1\frac{\ln2}{1+t^2}\ dt-\underbrace{\int_0^1\frac{\ln(1+t)}{1+t^2}\ dt}_{\color{blue}{\text{set}\ t\ =\ x}}\\ 2\int_0^1\frac{\ln(1+x)}{1+x^2}\ dx&=\ln2\int_0^1\frac{1}{1+t^2}\ dt\\ \int_0^1\frac{\ln(1+x)}{1+x^2}\ dx&=\large\color{blue}{\frac\pi8\ln2}. \end{align}

-