How to evaluate the following integral: $\int_0^1\frac{\log(1+x)}{1+x^2}dx$ I would like to evaluate:
$$\displaystyle\int_0^1 \frac{\log(1+x)}{1+x^2}\, dx$$
I have tried to evaluate this using integration by parts but failed. How can I evaluate it?

The previously presented solution is perhaps the simplest. Here is my favorite. 
We define a function $$f(t) = \int^1_0 \frac{\ln (xt+1)}{x^2+1} \text{ d}x.$$ The goal is to evaluate $f(1)$. We notice that $f(0)=0$. Differentiating $f$ with respect to $t$ (and differentiating under the integral; allowable by Leibniz's rule) gives, $$f'(t) = \int^1_0 \frac{x}{(xt+1)(x^2+1)} \text{ d}t.$$ Using partial fractions, we see $$\frac{x}{(xt+1)(x^2+1)} = \frac{A}{xt+1} + \frac{Bx+C}{x^2+1} \,\,\, \implies \,\,\, x = A(x^2+1) + (Bx+C)(xt+1) $$ $$ \implies \,\,\, A+Bt = 0 \,\,\, , \,\,\, B+ Ct = 1 \,\,\, , \,\,\, A + C = 1.$$ This system is uniquely solved by $$A = \frac{-t}{t^2+1} \,\,\, , \,\,\, B = \frac{1}{t^2+1} \,\,\, , \,\,\, C = \frac{t}{t^2+1}.$$ Then \begin{align*} f'(t) &= \int^1_0 \left\{ \frac{A(t)}{xt+1} + \frac{xB(t)}{x^2+1} + \frac{C(t)}{x^2+1} \right \} \text{ d}x \\ &= \left. \left\{ \frac{A(t)}{t} \ln (xt+1) + \frac{B(t)}{2} \ln(x^2+1) + C(t) \tan^{-1}(x) \right\} \right|_{x=0}^{x=1} \\ &= -\frac{\ln(t+1)}{t^2+1} + \frac{\ln(2)}{2}\frac{1}{t^2+1} + \frac{\pi}{4} \frac{t}{t^2+1}.\end{align*} Integrating from $t=0$ to $t=1$ yields $$f(1) = -f(1) + \frac{\ln(2)}{2} \frac{\pi}{4} + \frac{\ln(2)}{2}\frac{\pi}{4}$$ $$\implies \,\, \boxed{f(1) = \frac{\pi \ln(2)}{8}}.$$
