TITLE: How to evaluate $\int_0^1 \frac{\ln(x+1)}{x^2+1} dx$
QUESTION [7 upvotes]: 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$$

REPLY [3 votes]: 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}