TITLE: A nasty integral of a rational function
QUESTION [69 upvotes]: I'm having a hard time proving the following $$\int_0^{\infty} \frac{x^8 - 4x^6 + 9x^4 - 5x^2 + 1}{x^{12} - 10 x^{10} + 37x^8 - 42x^6 + 26x^4 - 8x^2 + 1} \, dx = \frac{\pi}{2}.$$
Mathematica has no problem evaluating it while I haven't the slightest idea how to approach it. Of course, I would like to prove it without the use of a computer. Is this an explicit form of a special function I fail to recognize?

REPLY [12 votes]: Let,
$$I=\int_0^{\infty} \frac{x^8 - 4x^6 + 9x^4 - 5x^2 + 1}{x^{12} - 10 x^{10} + 37x^8 - 42x^6 + 26x^4 - 8x^2 + 1} \, dx$$
As noted by Jon Haussmann,
$$2I=\int_0^{\infty} \frac{(x-1)^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx + \int_0^{\infty}\frac{(x+1)^2}{x^6 +4x^5 + 3x^4 - 4x^3 - 2x^2 + 2x + 1}dx$$
Perform the change of variable $x=\dfrac{1}{u-1}$ in the second integral,
$\begin{align}2I&=\int_0^{\infty} \frac{(x-1)^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx+\int_1^{\infty} \frac{x^2(x-1)^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx\\
&=\left(\int_0^1 \frac{(x-1)^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx+\\
\int_1^{\infty} \frac{(x-1)^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx\right)+\\&\int_1^{\infty} \frac{x^2(x-1)^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx\end{align}$
Perform the change of variable $x=\dfrac{u-1}{u}$ in the first integral of the latter equality,
$\begin{align}2I&=\int_1^{\infty} \frac{x^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx+\int_1^{\infty} \frac{(x-1)^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx+\int_1^{\infty} \frac{x^2(x-1)^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx\\
&=\int_1^{\infty} \frac{x^2+(x-1)^2+x^2(x-1)^2}{x^6-4x^5 + 3x^4 +4x^3 - 2x^2 -2x + 1}dx\\
&=\Big[\arctan\left(\dfrac{x^3-2x^2-x+1}{x(x-1)}\right)\Big]_0^{+\infty}\\
&=\pi
\end{align}$
(Problem found in American Mathematical Monthly, vol. 112, april 2005.
Solution found in vol. 114)