Đặt $x=\tan t \Rightarrow dx =\dfrac{dt}{cos^2 t}$
$I=\int_0^{\frac{\pi}{4}} \ln (1+\tan t) \dfrac{1}{\cos^2 t}. \dfrac{1}{1+\tan^2 t}=\int \ln (1+\tan t) dt$
Đặt $t=\dfrac{\pi}{4}-u \Rightarrow -dt=du$
$I=\int_0^{\frac{\pi}{4}} \ln \bigg [ 1+ \tan ( \dfrac{\pi}{4}-u ) \bigg ]du \ (*)$
Trong đó $1+\tan (\dfrac{\pi}{4}-u )=1+ \dfrac{1-\tan u}{1+\tan u}=\dfrac{2}{1+\tan u} $ thay vào $(*)$
$I=\int \ln \dfrac{2}{1+\tan u} du =\int \ln 2 du- \int \ln (1+\tan u)du$
$ =x \ln 2 \bigg |_0^{\frac{\pi}{4}} -\int \ln (1+\tan t) dt =\dfrac{\pi}{4}\ln 2 - I$
$\Rightarrow 2I =\dfrac{\pi}{4}\ln 2 \Rightarrow I=\dfrac{\pi}{8}\ln 2$