<s>[INST] Evaluate $\int_0^\infty \frac{\log(1+x^3)}{(1+x^2)^2}dx$ and $\int_0^\infty \frac{\log(1+x^4)}{(1+x^2)^2}dx$ Background: Evaluation of $\int_0^\infty \frac{\log(1+x^2)}{(1+x^2)^2}dx$
We can prove using the Beta-Function identity that
$$\int_0^\infty \frac{1}{(1+x^2)^\lambda}dx=\sqrt{\pi}\frac{\Gamma \left(\lambda-\frac{1}{2} \right)}{\Gamma(\lambda)} \quad \lambda>\frac{1}{2}$$
Differentiating the above equation with respect to $\lambda$, we obtain an expression involving the Digamma Function $\psi_0(z)$.
$$\int_0^\infty \frac{\log(1+x^2)}{(1+x^2)^\lambda}dx = \sqrt{\pi}\frac{\Gamma \left(\lambda-\frac{1}{2} \right)}{\Gamma(\lambda)} \left(\psi_0(\lambda)-\psi_0 \left( \lambda-\frac{1}{2}\right) \right)$$
Putting $\lambda=2$, we get
$$\int_0^\infty \frac{\log(1+x^2)}{(1+x^2)^2}dx = -\frac{\pi}{4}+\frac{\pi}{2}\log(2)$$

Question:
But, does anybody know how to evaluate $\displaystyle \int_0^\infty \frac{\log(1+x^3)}{(1+x^2)^2}dx$ and $\displaystyle \int_0^\infty \frac{\log(1+x^4)}{(1+x^2)^2}dx$?
Mathematica gives the values

*

*$\displaystyle \int_0^\infty \frac{\log(1+x^3)}{(1+x^2)^2}dx = -\frac{G}{6}+\pi \left(-\frac{3}{8}+\frac{1}{8}\log(2)+\frac{1}{3}\log \left(2+\sqrt{3} \right) \right)$


*$\displaystyle \int_0^\infty \frac{\log(1+x^4)}{(1+x^2)^2}dx = -\frac{\pi}{2}+\frac{\pi \log \left( 6+4\sqrt{2}\right)}{4}$
Here, $G$ denotes the Catalan's Constant.
Initially, my approach was to find closed forms for
$$\int_0^\infty \frac{1}{(1+x^2)^2(1+x^3)^\lambda}dx \ \ , \int_0^\infty \frac{1}{(1+x^2)^2(1+x^4)^\lambda}dx$$
and then differentiate them with respect to $\lambda$ but it didn't prove to be of any help.
Please help me prove these two results.
 [/INST] Another approach for evaluating the second integral using contour integration that avoids having to deform the contour around branch cuts is to consider $$ \displaystyle f(z) = \frac{\log(z+ e^{i \pi /4})}{(1+z^{2})^{2}}$$ and integrate around a contour that consists of the line segment $[-R,R]$ and the upper half of $|z|=R$.
Then  letting $R \to \infty$, 
$$ \begin{align} &\int_{-\infty}^{0} \frac{\log(x+e^{i \pi /4})}{(1+x^{2})^{2}} \ dx + \int_{0}^{\infty} \frac{\log(x+e^{i \pi /4})}{(1+x^{2})^{2}} \ dx \\ &= 2 \pi i \ \text{Res}[f(z),i] \\ &= 2 \pi i \lim_{z \to i} \frac{d}{dz} \frac{\log(z+e^{i \pi /4})}{(z+i)^{2}} \\ &=2 \pi i \lim_{z \to i} \left(\frac{1}{(z+e^{i \pi /4})(z+i)^{2}} - \frac{2 \log(z+e^{i \pi /4})}{(z+i)^{3}} \right) \\ &= 2 \pi i \left(- \frac{1}{4} \frac{\sqrt{2}}{1+i(1+\sqrt{2})} + \frac{\log|i+e^{i \pi /4}| + i \arg (i +e^{i \pi/4}) }{4i}\right)\\ &= 2 \pi i \left(\frac{1-\sqrt{2}+i}{8} + \frac{\frac{1}{2} \log (2+\sqrt{2})+ i \frac{3 \pi}{8}}{4i} \right) \\ &= \frac{\pi}{4} \Big(\log(2+\sqrt{2})-1 \Big) + \frac{i\pi}{4} \left(1-\sqrt{2}+\frac{3 \pi}{4} \right) . \end{align}$$
But notice that $$ \begin{align} &\text{Re} \left( \int_{-\infty}^{0} \frac{\log(z+e^{i \pi /4})}{(1+x^{2})^{2}} \ dx + \int_{0}^{\infty} \frac{\log(z+e^{i \pi /4})}{(1+x^{2})^{2}} \ dx \right) \\ &= \text{Re} \left(\int_{0}^{\infty} \frac{\log(-u + e^{i \pi /4})}{(1+u^{2})^{2}} \ du +  \int_{0}^{\infty} \frac{\log(z+e^{i \pi /4})}{(1+x^{2})^{2}} \ dx \right) \\ &= \int_{0}^{\infty} \frac{\log|-u + e^{i \pi /4}|}{(1+u^{2})^{2}} \ du + \int_{0}^{\infty} \frac{\log |x+e^{i \pi /4}|}{(1+x^{2})^{2}} \ dx\\ &= \int_{0}^{\infty} \frac{\frac{1}{2} \log(x^{2}-\sqrt{2}x+1) + \frac{1}{2} \log(x^{2}+\sqrt{2}x+1)}{(1+x^{2})^{2}} \ dx \\ &= \frac{1}{2} \int_{0}^{\infty} \frac{\log(1+x^{4})}{(1+x^{2})^{2}} \ dx. \end{align}$$
Therefore,
$$ \begin{align} \int_{0}^{\infty} \frac{\log(1+x^{4})}{(1+x^{2})^{2}} \ dx &= \frac{\pi}{2} \Big(\log(2+\sqrt{2}) -1 \Big) \\ &= \frac{\pi}{2} \Big(\frac{1}{2} \log \big((2+\sqrt{2})^{2} \big) -1 \Big)  \\ &= \frac{\pi}{2} \Big(\frac{\log(6+4\sqrt{2})}{2} -1\Big) \\ &= - \frac{\pi}{2} + \frac{\pi \log(6+4\sqrt{2})}{4}. \end{align}$$
</s>