Evaluate $\int_0^\infty \frac {(\log x)^4dx}{(1+x)(1+x^2)}$ Evaluate $$\displaystyle\int_0^\infty \frac {(\log x)^4dx}{(1+x)(1+x^2)}$$
This is a past final term exam problem of a complex analysis course at my university. I am studying for this year’s exam and I found this problem. The examiner assumes us to use residue calculus. Could you please give your valuable suggestions on how to proceed ? 
 A: For $-1\lt a\lt0$,
$$
\begin{align}
&\int_0^\infty\frac{x^a}{(1+x)(1+x^2)}\,\mathrm{d}x\\
&=\int_0^\infty\frac{x^a}2\left(\frac1{1+x}+\frac{1-x}{1+x^2}\right)\mathrm{d}x\\
&=\frac12\int_0^\infty\frac{x^a}{1+x}\,\mathrm{d}x+\frac14\int_0^\infty\frac{x^{\frac{a-1}2}}{1+x}\,\mathrm{d}x-\frac14\int_0^\infty\frac{x^{\frac{a}2}}{1+x}\,\mathrm{d}x\\
&=\frac12\Gamma(1+a)\Gamma(-a)+\frac14\Gamma\!\left(\frac{1+a}2\right)\Gamma\!\left(\frac{1-a}2\right)-\frac14\Gamma\!\left(\frac{2+a}2\right)\Gamma\!\left(-\frac{a}2\right)\\
&=-\frac12\frac\pi{\sin(\pi a)}+\frac14\frac\pi{\cos\left(\frac\pi2a\right)}+\frac14\frac\pi{\sin\left(\frac\pi2a\right)}\\
&=\frac\pi4\frac{1+\cos\left(\frac\pi2a\right)-\sin\left(\frac\pi2a\right)}{\left(1+\cos\left(\frac\pi2a\right)\right)\cos\left(\frac\pi2a\right)}\\
&=\frac\pi2\frac1{1+\cos\left(\frac\pi2a\right)+\sin\left(\frac\pi2a\right)}\\
\end{align}
$$
This can be analytically continued to $-1\lt a\lt 2$.
Taking $4$ derivatives gives
$$
\begin{align}
&\int_0^\infty\frac{\log(x)^4x^a}{(1+x)(1+x^2)}\,\mathrm{d}x\\
&=\frac{\pi^5}{32}\frac{\scriptsize105+45\left(\sin\left(\frac\pi2a\right)+\cos\left(\frac\pi2a\right)\right)-54\sin(\pi a)-11\left(\sin\left(\frac{3\pi}2a\right)-\cos\left(\frac{3\pi}2a\right)\right)-\cos(2\pi a)}{2\left(1+\cos\left(\frac\pi2a\right)+\sin\left(\frac\pi2a\right)\right)^5}
\end{align}
$$
and evaluating at $a=0$ gives
$$
\int_0^\infty\frac{\log(x)^4}{(1+x)(1+x^2)}\,\mathrm{d}x
=\frac{5\pi^5}{64}
$$
A: $$\int_{0}^{+\infty}\frac{(1-x)\log^4 x}{1-x^4}\,dx=\int_{0}^{1}\frac{(1-x)\log^4 x}{1-x^4}\,dx+\int_{0}^{1}\frac{\left(1-\frac{1}{x}\right)\log^4 x}{x^2\left(1-\frac{1}{x^4}\right)}\,dx $$
can be written as
$$ \int_{0}^{1}\frac{\log^4(x)}{1+x^2}\,dx = \sum_{k\geq 0}(-1)^k \int_{0}^{1}x^{2k}\log^4(x)\,dx=\sum_{k\geq 0}\frac{24(-1)^k}{(2k+1)^5} $$
and the RHS is well-known to be related to Euler numbers. The final outcome is
$$ \int_{0}^{+\infty}\frac{\log^4 x}{(1+x)(1+x^2)}\,dx = \color{red}{\frac{5\pi^5}{64}}.$$
