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

$$\int_{0}^{1} \frac{\ln(x+1)}{x^2+1} \mathrm dx$$
Put $x = \tan\theta$, then your integral transforms to $$I= \int_{0}^{\pi/4} \log(1+\tan\theta) \ d\theta. \tag{1}$$

Now using the property that $$\int_{0}^{a} f(x) \ dx = \int_{0}^{a} f(a-x) \ dx,$$ we have $$I = \int_{0}^{\pi/4} \log\biggl(1+\tan\Bigl(\frac{\pi}{4}-\theta\Bigr)\biggr) \ d\theta = \int_{0}^{\pi/4} \log\biggl(\frac{2}{1+\tan\theta} \biggr) \ d\theta.\tag{2}$$

Adding $(1)$ and $(2)$ we get $$2I = \int_{0}^{\pi/4} \log(2) \ d\theta\Rightarrow I= \log(2) \cdot \frac{\pi}{8}.$$
You can use the residue theory to calculate
$$J=\int_{-\infty}^\infty \frac{\ln|1+x|}{(1+x^2)} \, dx $$
by putting 
$$f(z)=\frac{\ln(1+z)}{(1+z^2)}$$ and we obtain 
$$J = 2\pi i\frac{\ln(1+i)}{(i+i)}=\pi\ln\left(\sqrt2e^{\frac14\pi i}\right)=\pi\left(\frac12\ln2+\frac14\pi i\right)=\frac{\pi}{2}\ln 2+\frac{\pi^2i}4$$ 

$$J=\int_{-\infty}^{-1}\frac{\ln(1+x)}{1+x^2} \, dx 
+\int_{-1}^0 \frac{\ln(1+x)}{1+x^2} \, dx 
+\int_0^1\frac{\ln(1+x)}{1+x^2} \, dx 
+\int_1^\infty \frac{\ln(1+x)}{1+x^2} \, dx$$  

Then by putting $(t-1)e^{\pi i}=1+x$ in the first integral we obtain:
$$\int_{-\infty}^{-1}\frac{\ln(1+x)}{1+x^2}dx=\int_1^{\infty}\frac{\pi i+\ln(t-1)}{t^2+1}dt=\frac{\pi^2i}4+\int_1^{\infty}\frac{\ln(t-1)}{t^2+1}dt$$

Then by putting $t=-x$ in the second integral we obtain:
$$\int_0^1\frac{\ln(1-x^2)}{1+x^2}dx+\int_1^{\infty}\frac{\ln(x^2-1)}{1+x^2}dx=\frac{\pi}2\ln2$$

then by putting $t=1/x$ in the second integral we obtain:
$$\int_0^1\frac{\ln(1-x^2)}{1+x^2}dx-\int_0^1\frac{\ln x}{1+x^2}dx=\frac{\pi}4\ln2$$

and we put $x=(1-t)/(1+t)$ in the first integral 
we obtain after calculus :
$$\int_0^1 \frac{\ln \, (1+x)}{1+x^2}= \frac{\pi}{8} \ln 2$$