Evaluating $\int_0^{\infty} \frac{1}{1-x^2+x^4}\ln\left(\frac{x^2}{1-x^2+x^4}\right)dx$ Can we find the exact value expressed by elementary functions of
$$\int_0^{\infty} \frac{1}{1-x^2+x^4}\ln\left(\frac{x^2}{1-x^2+x^4}\right)dx?$$
 A: $$\mathcal I=\int_0^{\infty} \frac{1}{1-x^2+x^4}\ln\left(\frac{x^2}{1-x^2+x^4}\right)dx\overset{x\to \frac{1}{x}}=\int_0^{\infty} \frac{x^2}{1-x^2+x^4}\ln\left(\frac{x^2}{1-x^2+x^4}\right)dx$$
Summing up the two integrals from above and rearranging the logarithm gives:
$$2\mathcal I= -\int_0^{\infty} \frac{1+x^2}{1-x^2+x^4}\ln\left(\frac{1-x^2+x^4}{x^2}\right)dx=-\int_0^\infty \frac{1+\frac{1}{x^2}}{x^2+\frac{1}{x^2}-1}\ln\left(x^2+\frac{1}{x^2}-1\right)dx$$
$$\Rightarrow \mathcal I=-\frac12 \int_0^\infty \frac{\left(x-\frac{1}{x}\right)'}{1+\left(x-\frac{1}{x}\right)^2}\ln\left(1+\left(x-\frac{1}{x}\right)^2\right)dx\overset{x-\frac{1}{x}=u}=-\frac12\int_{-\infty}^\infty \frac{\ln(1+u^2)}{1+u^2}du$$
$$\overset{u=\tan x}=-\int_0^\frac{\pi}{2} \ln(1+\tan^2 x)dx=2\int_0^\frac{\pi}{2} \ln(\cos x)dx=-\pi\ln 2$$
The integral from above can be found here.
Generalization.
$$\mathcal I(n)=\int_0^{\infty} \frac{1}{1-x^2+x^4}\ln^n\left(\frac{x^2}{1-x^2+x^4}\right)dx=\frac{(-1)^n}{2}\int_{-\infty}^\infty \frac{\ln^n(1+x^2)}{1+x^2}dx$$
$$=2^n \int_0^\frac{\pi}{2}\ln^n(\cos x)dx=\sqrt{\pi}2^{n-1} \lim_{s\to 0} \frac{d^n}{ds^n}\frac{\Gamma\left(\frac{s+1}{2}\right)}{\Gamma\left(\frac{s}2 +1\right)}$$
Which gives for example: $$\int_0^{\infty} \frac{1}{1-x^2+x^4}\ln^2\left(\frac{x^2}{1-x^2+x^4}\right)dx=\frac{\pi^3}{6}+2\pi \ln^2 2$$
