By some analysis and through Wolfram|Alpha I know that the integral in question is equal to a fascinating $$I=\int\limits_{0}^{\frac{\pi}{4}}x\ln\left(1+\tan x\right)dx=\frac{21}{64}\zeta(3)+\frac{\pi^{2}}{64}\ln 2-\frac{\pi}{8}G$$ where $G$ is Catalan's constant.
However, I have tried many methods to evaluate this integral, all to no avail. Using the Maclaurin series for $\ln(1+\tan x)$ unfortunately produces $$I=\sum\limits_{k=0}^{\infty}\frac{\left(-1\right)^{k}}{k+1}\int\limits_{0}^{\frac{\pi}{4}}x\tan^{k+1}xdx$$ the integral in which is particularly hard to deal with - spawning this question of mine, the answers and comments to which destroyed my dreams of continuing down this path.
Alternatively, differentiating under the integral sign with $$I(n)=\int\limits_{0}^{\frac{\pi}{4}}x\ln\Big(\tan\left(nx\right)+1\Big)dx\Rightarrow I'(n)=\int\limits_{0}^{\frac{\pi}{4}}\frac{x}{n+\tan x}dx$$ looks equally hopeless after a few calculations.
Integration by parts does not seem to work very well because the antiderivative of $\ln\left(1+\tan x\right)$ is absolutely hideous.
Perhaps Clausen functions can help? Or maybe the Fourier series of $\ln\left(1+\tan x\right)$ which I unfortunately am unfamiliar with...
In any case, the existence of $\zeta(3)$ and $G$ in the answer scream an infinite sum, and the fractional coefficients also hint at some substitutions that could aid us along the way - but my ideas stop here.
Any insights are greatly appreciated.
The trick here seems to be the well-known Fourier series $$ \log(2\cos x) = \sum_{k=1}^{\infty} (-1)^{k+1} \frac{\cos(2kx)}{k}, \hspace{0.5cm} -\frac{\pi}{2}<x<\frac{\pi}{2} $$ This can be found by letting $z=re^{ix}$ into the Taylor series for the logarithm, $$ \log(1+z) = \sum_{k=1}^{\infty} (-1)^{k+1} \frac{z^k}{k}, \hspace{0.5cm} |z|<1 $$ and then letting $r \to 1^{-}$. The resuling series converges for $-\frac{\pi}{2}<x<\frac{\pi}{2} $ by Dirichlet's test. Replacing $x$ with $x-\frac{\pi}{4}$ gives the Fourier series $$ \log(2\cos(x-\tfrac{\pi}{4})) = \log(\sqrt{2} (\cos x+\sin x)) = \sum_{k=1}^{\infty} (-1)^{k+1} \frac{\cos(2kx+\frac{\pi k}{2})}{k} $$ $$ = \sum_{k=1}^{\infty} (-1)^{k+1} \frac{\cos(4kx)}{2k} + \sum_{k=0}^{\infty} (-1)^k \frac{\sin(2(2k+1)x)}{2k+1}, \hspace{0.5cm} -\frac{\pi}{4}<x<\frac{3\pi}{4} $$ Subtracting the two series gives the desired expression for $\log(1+\tan x)$: $$ -\frac{1}{2} \log 2 + \log(1+\tan x) = \log \left(\frac{\sqrt{2}}{2} \frac{\cos x+\sin x}{\sin x} \right) $$ $$ = \sum_{k=1}^{\infty} (-1)^{k+1} \frac{\cos(4kx)}{2k} + \sum_{k=0}^{\infty} (-1)^k \frac{\sin(2(2k+1)x)}{2k+1} - \sum_{k=1}^{\infty} (-1)^{k+1} \frac{\cos(2kx)}{k}, \hspace{0.5cm} 0<x<\frac{\pi}{2} $$ Now multiply through by $x$ and integrate term-by-term. Can you finish it from here?