<s>[INST] $\int_0^\infty\frac{\ln{(x^8+x^4+2x^2+1)}}{x^2+1}dx$ and $\int_0^\infty\frac{1}{x^2+1}\arctan{\left(\frac{x^2+1}{x^4}\right)}dx$ I derived some integrals a while ago
$$I(t)=\int_0^\infty\frac{\ln{(x^4+t(x^2+1))}}{x^2+1}dx$$
$$I(i)=\int_0^\infty\frac{\ln{(x^4+i(x^2+1)}}{x^2+1}dx=2\pi\ln{(1+\sqrt{i}+\sqrt{i+2\sqrt{i}})}$$
I then took the real and imaginary parts of each side and got interesting results
$$\int_0^\infty\frac{\ln{(x^8+x^4+2x^2+1)}}{x^2+1}dx$$$$=\pi\ln{\left(2+\sqrt2+\sqrt{5+2\sqrt2}+2(46+32\sqrt2)^{1/4}\cos{\left(\frac{\pi}{8}-\frac{1}{2}\arctan{\left(1+\frac{1}{\sqrt2}\right)}\right)}\right)}$$
and
$$\int_0^\infty\frac{1}{x^2+1}\arctan{\left(\frac{x^2+1}{x^4}\right)}dx=\pi\arctan{\left(\frac{1+\sqrt{\sqrt{5+2\sqrt2}-\sqrt2}}{1+\sqrt2+\sqrt{\sqrt{5+2\sqrt2}+\sqrt2}}\right)}$$
I checked the numerical answers on WolframAlpha to ensure that they match my answers.
I am curious as to whether there is any way to directly solve the integrals, and I am most interested in the second integral
 [/INST] We could even compute the antiderivative
$$I=\int\frac{\log{(x^8+x^4+2x^2+1)}}{x^2+1}dx=\sum_{i=1}^4\int\frac{\log(x^2-r_i)}{x^2+1}dx$$
where
$$r_1=\frac{-i-\sqrt{-1-4 i}}{2}\qquad \qquad r_2=\frac{-i+\sqrt{-1-4 i}}{2} $$
$$r_3=\frac{i-\sqrt{-1-4 i}}{2} \qquad \qquad r_4=\frac{i+\sqrt{-1-4 i}}{2} $$
and $$I_a=\int\frac{\log(x^2-a)}{x^2+1}dx$$ is known (have a look here)
For complex $a$ ( provided that $\Re(a)<0$)
$$J_a=\int_0^\infty \frac{\log(x^2-a)}{x^2+1}dx=\frac{\pi}{2}   \left(\log (a+1)+2 i \tan ^{-1}\left(\sqrt{a}\right)\right)$$ and the fact that $r_1+r_4=r_2+r_3=0$ must lead to a lot of simplifications.
$$J_{+a}+J_{-a}=\frac{\pi}{2}   \left(\log \left(1-a^2\right)+2 i \tan ^{-1}\left(\frac{(1+i)
   \sqrt{a}}{1-i a}\right)\right)$$
I did not have the patience to finish the simplications as you did but the results are exactly the same.
</s>