# Show that $\int_{0}^{\infty}{1\over x^{2}-x+1}{\mathrm dx\over \sqrt{x}}=\int_{0}^{\infty}{1\over (x^{2}-x+1)^2}{\mathrm dx\over \sqrt{x}}={\pi}$

Consider these integrals

$$\int_{0}^{\infty}{1\over x^{2}-x+1}\cdot{\mathrm dx\over \sqrt{x}}={\pi}\tag1$$

$$\int_{0}^{\infty}{1\over (x^{2}-x+1)^2}\cdot{\mathrm dx\over \sqrt{x}}={\pi}\tag2$$

An attempt:

Rewrite $$(2)$$ as

$$\int_{0}^{\infty}{16\over [(2x-1)^2+3]^2}\cdot{\mathrm dx\over \sqrt{x}}\tag3$$

$$u=(2x-1)^{1/2}$$, then $$(3)$$ becomes

$$\int_{i}^{\infty}{16u\over (u+3)^2}\mathrm du\tag4$$

$$\int_{i}^{\infty}\left({19\over 6(u+3)}-{3\over (u+3)^2}\right)\mathrm du\tag5$$

I don't think it makes sense to have the limit as an imaginary number.

Another sub: $$u=2x-1$$ then $$(2)$$ becomes

$$8\sqrt{2}\int_{-1}^{\infty}{1\over (u^2+3)^2}\cdot{\mathrm du\over \sqrt{u+1}}\tag6$$

Another sub: $$u=x^2-x+1$$ then $$(2)$$ becomes

$$\int_{1}^{\infty}{\mathrm du\over u^2\sqrt{u-3}}\cdot{\sqrt{2}\over \sqrt{1+\sqrt{u-3}}}\tag7$$

I am not getting anywhere!

How would one show that $$(1)=(2)$$ and verify its closed form?

Hint. By the change of variable $$x=u^2,\qquad u=\sqrt{x},\qquad \frac{dx}{\sqrt{x}}=2du,$$ one has \begin{align} \int_{0}^{\infty}\frac{1}{x^{2}-x+1}\cdot\frac{\mathrm dx}{\sqrt{x}}&=2\int_{0}^{\infty}{1\over u^{4}-u^2+1}\:\mathrm du \\\\&=2\int_{0}^{\infty}\frac{1}{u^2+\frac{1}{u^2}-1}\cdot\frac{du}{u^2} \\\\&=2\int_{0}^{\infty}\frac{1}{u^2+\frac{1}{u^2}-1}\cdot du \\\\&=2\int_{0}^{\infty}\frac{d\left(u-\frac{1}{u} \right)}{(u-\frac{1}{u})^2+1} \\\\&=2\int_{0}^{\infty}\frac{dv}{v^2+1} \\\\&=\pi. \end{align} and by the change of variable $x \to \frac1x$ one may see that the two given integrals are equal (see @xpaul's answer).

Alternative computation.

$\displaystyle J=\int_{0}^{\infty}{1\over x^{2}-x+1}\cdot{\mathrm dx\over \sqrt{x}}$

Perform the change of variable $y=\sqrt{x}$,

\begin{align} J&=2\int_{0}^{\infty}{1\over x^{4}-x^2+1}dx\\ &=2\int_{0}^{\infty}{1+x^2\over x^{6}+1}dx\\ &=2\int_{0}^{\infty}{1\over 1+x^{6}}dx+2\int_{0}^{\infty}{x^2\over x^{6}+1}dx \end{align}

In the last two integrals perform the change of variable $y=x^6$,

\begin{align} J&=\dfrac{1}{3}\int_{0}^{\infty} \dfrac{x^{-\tfrac{5}{6}}}{1+x}dx+\dfrac{1}{3}\int_{0}^{\infty} \dfrac{x^{-\tfrac{1}{2}}}{1+x}dx\\ &=\dfrac{1}{3}\text{B}\left(\tfrac{1}{6},\tfrac{5}{6}\right)+\dfrac{1}{3}\text{B}\left(\tfrac{1}{2},\tfrac{1}{2}\right)\\ &=\dfrac{1}{3}\Gamma\left(\tfrac{1}{2}\right)^2+\dfrac{1}{3}\Gamma\left(\tfrac{1}{6}\right)\Gamma\left(\tfrac{5}{6}\right)\tag 1\\ &=\dfrac{1}{3}\dfrac{\pi}{\sin\left(\tfrac{\pi}{2}\right)}+\dfrac{1}{3}\dfrac{\pi}{\sin\left(\tfrac{\pi}{6}\right)}\tag 2\\ &=\dfrac{1}{3}\pi+\dfrac{2}{3}\pi\\ &=\boxed{\pi} \end{align}

Let $$I=\int_{0}^{\infty}{1\over x^{2}-x+1}\cdot{\mathrm dx\over \sqrt{x}}, J=\int_{0}^{\infty}{1\over (x^{2}-x+1)^2}\cdot{\mathrm dx\over \sqrt{x}}.$$ Then $$I-J=\int_{0}^{\infty}{x^2-x\over (x^{2}-x+1)^2}\cdot{\mathrm dx\over \sqrt{x}}$$ Using $x\to\frac1x$, one has \begin{eqnarray} I-J&=&\int_{0}^{\infty}{\frac{1}{x^2}-\frac{1}x\over (\frac{1}{x^2}-\frac{1}x+1)^2}\cdot{\mathrm dx\over x^2\sqrt{\frac1x}}\\ &=&\int_{0}^{\infty}{x-x^2\over (x^{2}-x+1)^2}\cdot{\mathrm dx\over \sqrt{x}}\\ &=&-(I-J) \end{eqnarray} and hence $I-J=0$ or $I=J$. I will come back soon.