Evaluate: $u =\int_0^\infty\frac{dx}{x^4 +7x^2+1}$ Evaluate: 

$u =\displaystyle\int_0^\infty\dfrac{dx}{x^4 +7x^2+1}$

Attempt: 
$$u = \int_0^\infty \dfrac{dx}{\left(x^2+ \left(\dfrac{7 - \sqrt {45}}{2}\right)\right)\left(x^2+ \left(\dfrac{7 + \sqrt {45}}{2}\right)\right)}$$
$$u = \int_0^\infty \dfrac{dx}{(x^2+a^2)(x^2+b^2)}$$
After partial fraction decomposition and simplifying I get: 
$u = \dfrac{\pi}{2(a+b)}$
But answer is $\frac \pi 6$.
Where have I gone wrong? 
 A: Hint:  
$$\dfrac2{x^4+ax^2+1}=\dfrac{1-1/x^2}{x^2+a+1/x^2}+\dfrac{1+1/x^2}{x^2+a+1/x^2}$$
$$x^2+1/x^2=(x-1/x)^2+?=(x+1/x)^2-2$$
A: $$\dfrac{7 - \sqrt {45}}{2}=\left(\dfrac{3 - \sqrt {5}}{2}\right)^2$$ and ...
A: $\newcommand{\I}{\mathfrak{I}}$$\newcommand{\dx}{\mathrm dx\,}$Let’s take the time to generalize this. Denote the generalized integral as$$\I=\int\limits_0^{\infty}\dx\frac 1{x^4+ax^2+b^2}$$Now factor out an $x^2$ from the denominator and complete the square to get
$$\I=\int\limits_0^{\infty}\frac {\dx}{x^2}\frac 1{\left(x-\frac bx\right)^2+a+2b}$$Make the transformation $x\mapsto\tfrac bx$ so that$$\I=\frac 1b\int\limits_0^{\infty}\dx\frac 1{\left(x-\frac bx\right)^2+a+2b}$$Therefore, it’s easy to see that
$$b\I=\int\limits_0^{\infty}\frac {\dx}{x^2}\frac b{\left(x-\frac bx\right)^2+a+2b}=\int\limits_0^{\infty}\dx\frac 1{\left(x-\frac bx\right)^2+a+2b}$$
Add the two integrals together to get
$$\begin{align*}\I & =\frac 1{2b}\int\limits_0^{\infty}\dx\left(1+\frac b{x^2}\right)\frac 1{\left(x-\frac bx\right)^2+a+2b}\\ & =\frac 1{2b}\int\limits_{-\infty}^{\infty}\frac {\dx}{x^2+a+2b}\\ & \color{blue}{=\frac {\pi}{2b\sqrt{a+2b}}}\end{align*}$$
Now set $a=7$ and $b=1$ to get the answer.
A: I'm not sure you have done anything wrong. You have $a+b$ in your answer, but $a$ is specifically $\sqrt{\frac{7-\sqrt{45}}{2}}=\frac{3-\sqrt{5}}{2}$. And $b=\frac{3+\sqrt{5}}{2}$. So $a+b=3$, making your answer agree with what you are expecting.
A: A slightly different approach: you have $a^2+b^2=7$ and $a^2 b^2=1$ with $a,b\in\mathbb{R}^+$, such that
$$ \operatorname*{Res}_{x=ia}\frac{1}{(x^2+a^2)(x^2+b^2)} = \lim_{x\to ia}\frac{1}{(x+ia)(x^2+b^2)} = \frac{1}{2i}\cdot \frac{1}{a(b^2-a^2)}$$
and similarly
$$ \operatorname*{Res}_{x=ib}\frac{1}{(x^2+a^2)(x^2+b^2)} = \lim_{x\to ib}\frac{1}{(x+ib)(x^2+a^2)} = \frac{1}{2i}\cdot \frac{1}{b(a^2-b^2)}$$
so $\pi i$ times the sum of the residues at $ia$ and $ib$ equals $\frac{\pi}{2ab(a+b)}$. On the other hand the integral is blatantly positive, such that $ab(a+b)$ is the square root of $a^2 b^2(a^2+b^2+2\sqrt{a^2 b^2}) = 9$ and voilà the wanted outcome $\frac{\pi}{6}$.
