How to compute the integral $\int^{\pi/2}_0\ln(1+\tan\theta)d\theta$? How to compute the integral $\int^{\pi/2}_0\ln(1+\tan\theta)d\theta$. If we let $t=\tan\theta$, then the integral becomes to
$$\int^{\pi/2}_0\ln(1+\tan\theta)d\theta=\int_0^\infty\frac{\ln(1+t)}{1+t^2}dt$$. 
Can we calculate this integral explicitly?

$$\begin{align}\int_0^{\pi/2}  d\theta \, \log{(1+\tan{\theta})} &=\int_0^{\pi/2}  d\theta \, \log{(\sin{\theta}+\cos{\theta})} - \int_0^{\pi/2}  d\theta \, \log{(\cos{\theta})} \\ &= \int_0^{\pi/2}  d\theta \, \log{\left [\sqrt{2}\cos{\left (\theta-\frac{\pi}{4} \right )}\right ]} - \int_0^{\pi/2}  d\theta \, \log{(\cos{\theta})} \\ &= \frac{\pi}{4} \log{2} + \int_0^{\pi/2}  d\theta \, \log{\left [\cos{\left (\theta-\frac{\pi}{4} \right )}\right ]} - \int_0^{\pi/2}  d\theta \, \log{(\cos{\theta})}\\ &=  \frac{\pi}{4} \log{2} + \int_{-\pi/4}^{\pi/4}  d\theta \, \log{\left (\cos{\theta}\right )} - \int_0^{\pi/2}  d\theta \, \log{(\cos{\theta})}\\ &= \frac{\pi}{4} \log{2} + \int_{0}^{\pi/4}  d\theta \, \log{\left (\cos{\theta}\right )} - \int_{\pi/4}^{\pi/2}  d\theta \, \log{(\cos{\theta})} \\ &= \frac{\pi}{4} \log{2} + \int_{0}^{\pi/4}  d\theta \, \log{\left (\cos{\theta}\right )} - \int_{0}^{\pi/4}  d\theta \, \log{\left (\sin{\theta}\right )}\end{align} $$
Now use the Fourier series representations:
$$-\log(\sin(\theta))=\sum_{k=1}^\infty\frac{\cos(2k \theta)}{k}+\log(2)$$
and
$$-\log(\cos(\theta))=\sum_{k=1}^\infty(-1)^k\frac{\cos(2k \theta)}{k}+\log(2)$$
Substituting, exchanging the respective sums and integrals, we get 
$$\begin{align}\int_0^{\pi/2}  d\theta \, \log{(1+\tan{\theta})} &= \frac{\pi}{4} \log{2} + \sum_{k=1}^{\infty} \frac1{2 k^2} \left [1-(-1)^k \right ] \sin{\frac{\pi}{2} k} \\ &= \frac{\pi}{4} \log{2} + \sum_{k=1}^{\infty} \frac{(-1)^k}{(2 k+1)^2} \\ &= \frac{\pi}{4} \log{2} + G\end{align} $$
where $G$ is Catalan's constant.
