Solving $\int_{0}^{1} \dfrac{\ln(x+1)}{x^2+1} dx$ The integral is:
$$\int_{0}^{1} \dfrac{\ln(x+1)}{x^2+1} dx$$
This is a Putnam question from my calculus book. It was in the section about trig substitution. However, I see no way of how mixing a trig function with a natural logarithm would make it any easier. I've tried the substitution $x=\tan \theta$ and got $$\dfrac 12\int \ln(1+\tan \theta)^2 d \theta$$
However, I wasn't able to simplify it to any integrable form.
 A: One may write
$$ \begin{align}
   \int_0^1\frac{\ln (1+x)}{1+x^2}\:dx&=\int_0^{\pi/4} \ln (1+\tan u)\:du \quad \left(x=\tan u, \,du=\frac{dx}{1+x^2}\right)
   \\\\&=\int_0^{\pi/4} \ln \left(1+\tan \left(\frac\pi4-v\right)\right)\:dv\qquad (u=\frac\pi4-v )
   \\\\&=\int_0^{\pi/4} \ln \left(1+\frac{1-\tan v}{1+\tan v}\right)dv  \quad \left(\tan(a-b)=\frac{\tan a-\tan b}{1+\tan a \tan b}\right)
 \\\\&=\int_0^{\pi/4} \ln \left(\frac2{1+\tan v}\right)dv
   \\\\&=\int_0^{\pi/4} \ln 2\:dv-\int_0^{\pi/4}\!\! \ln (1+\tan v)\:dv
 \end{align}
   $$ giving

$$
\int_0^1\frac{\ln (1+x)}{1+x^2}\:dx=\int_0^{\pi/4}\!\! \ln (1+\tan u)\:du=\frac\pi8 \: \ln 2.
$$

A: It is enough to exploit the substitution $x=\tan t$ and the identity $\sin t+\cos t=\sqrt{2}\cos\left(\frac{\pi}{4}-t\right)$:
$$\begin{eqnarray*}I=\int_{0}^{1}\frac{\log(1+x)}{1+x^2}\,dx &=& \int_{0}^{\pi/4}\log(\sin t+\cos t)-\log(\cos t)\,dt\\&=&\frac{\pi}{8}\log(2)+\int_{0}^{\pi/4}\log\cos\left(\frac{\pi}{4}-t\right)-\log\cos t\,dt\\&=&\frac{\pi}{8}\log(2)+\int_{0}^{\pi/4}\log\cos t\,dt-\int_{0}^{\pi/4}\log\cos t\,dt\\&=&\color{red}{\frac{\pi}{8}\,\log 2}.\end{eqnarray*}$$
A: A substitution other than a trigonometric substitution can be used to evaluate this integral.
Using a so-called self-similar substitution of $u = \dfrac{1 - x}{1 + x}$, one has $x = \dfrac{1 - u}{1 + u}$. Thus $dx = -\dfrac{2}{(1 + u)^2} \, du$ and for the limits of integration when $x = 0, u = 1$ and when $x = 1, u = 0$. 
Noting that $1 + x = \dfrac{2}{1 + u}$ and $1 + x^2 = \dfrac{2(1 + u^2)}{(1 + u)^2}$ the integral becomes
\begin{align*}
I &= \int^1_0 \frac{\ln (1 + x)}{1+ x^2} \, dx\\
&= \int^1_0 \ln \left (\frac{2}{1 + u} \right ) \cdot \frac{(1 + u)^2}{2 (1 + u^2)} \cdot \frac{2}{(1 + u)^2} \, du\\
&= \int^1_0 \ln \left (\frac{2}{1 + u} \right ) \frac{du}{1 + u^2}\\
&= \int^1_0 \left [\ln 2 - \ln (1 + u) \right ] \frac{du}{1 + u^2}\\
&= \ln 2 \int^1_0 \frac{du}{1 + u^2} - \int^1_0 \frac{\ln (1 + u)}{1 + u^2} \, du\\
\Rightarrow 2I &= \ln 2 \cdot \Big{[}\tan^{-1} u \Big{]}^1_0
\end{align*}
giving
$$\int^1_0 \frac{\ln (1 + x)}{1 + x^2} \, dx = \frac{\pi}{8} \ln 2.$$
A: Instead of diverse substitutions we can study the function
$$
f(s) = \int_{0}^{1}\dfrac{\ln(1+sx)}{1+x^2}\, dx
$$
where we are interested in $f(1)$. At first we determine
\begin{gather*}
f'(s) = \int_{0}^{1}\dfrac{x}{(1+sx)(1+x^2)}\, dx = \int_{0}^{1}\dfrac{1}{1+s^{2}}\left(\dfrac{-s}{1+sx}+\dfrac{x+s}{1+x^{2}}\right)\, dx \\[2ex]
= -\dfrac{\ln(1+s)}{1+s^{2}} + \dfrac{\ln(2)}{2(1+s^{2})} + \dfrac{s\pi}{4(1+s^{2})}.
\end{gather*}
Since $f(0)=0$ 
$$
f(1) = \int_{0}^{1}f'(s)\, ds = -\int_{0}^{1}\dfrac{\ln(1+s)}{1+s^{2}}\, ds + \dfrac{\pi\ln 2}{4} = -f(1) +  \dfrac{\pi\ln 2}{4}.
$$
Consequently 
$$
f(1) =  \dfrac{\pi\ln 2}{8}.
$$
