Prove $\int_{0}^{\infty}\frac{2x}{x^8+2x^4+1}dx=\frac{\pi}{4}$

$$\int_{0}^{\infty}\frac{2x}{x^8+2x^4+1}dx=\frac{\pi}{4}$$

$u=x^4$ $\rightarrow$ $du=4x^3dx$

$x \rightarrow \infty$, $u\rightarrow \infty$

$x\rightarrow 0$, $u\rightarrow 0$

$$=\int_{0}^{\infty}\frac{2x}{u^2+2u+1}\cdot\frac{du}{4x^3}$$

$$=\frac{1}{2}\int_{0}^{\infty}\frac{1}{u^2+2u+1}\cdot\frac{du}{x^2}$$

$$=\frac{1}{2}\int_{0}^{\infty}\frac{1}{u^2+2u+1}\cdot\frac{du} {\sqrt{u}}$$

Convert to partial fractions

$$\int_{0}^{\infty}\frac{1}{\sqrt{u}}-\frac{2}{u+1}+\frac{1}{(u+1)^2}du$$

$$=\left.2\sqrt{u}\right|_{0}^{\infty}-\left.2\ln(1+x)\right|_{0}^{\infty} -\left.\frac{1}{1+u}\right|_{0}^{\infty}$$

Where did I went wrong during my calculation?


Original Solution with Elementary Calculus:

Let $u=x^2, du=2x \ dx.$

Then the integral becomes

$$\int_{0}^{\infty}\frac{1}{u^4+2u^2+1}\ du.$$

Now notice $u^4+2u^2+1=(u^2+1)^2$, so the integral becomes:

$$\int_{0}^{\infty}\frac{1}{(u^2+1)^2}\ du.$$

Let $u=\tan(z),du=\sec^2(z)dz.$

So the integral becomes :

$$\int_{0}^{\frac{\pi}{2}}\frac{\sec^2(z)}{\sec^4(z)}\ dz=\int_{0}^{\frac{\pi}{2}}\cos^2(z)\ dz=\int_{0}^{\frac{\pi}{2}}\frac{1+\cos(2z)}{2}\ dz=\frac{\pi}{4}.$$

Another Solution with Fourier Transform

I also was playing around with Fourier Transforms and came across the identity unexpectedly.

Define the Fourier Cosine Transform, $$\mathcal{F}_{c}(f(x))=\sqrt{\frac{2}{\pi}}\int_{0}^{\infty} f(x) \cos(xy) \ dx.$$

Next, consider the inner product defined on Hilbert space $L^2 (0, +\infty),$ the space of square integrable real valued functions over the interval $(0, +\infty),$ defined $$\langle f(x), g(x) \rangle =\int_{0}^{\infty} f(x)g(x) \ dx.$$ It also turns out $\mathcal{F}_{c}$ is a unitary operator, meaning that $\mathcal{F^*}_{c}=\mathcal{F^{-1}}_{c}$ which is the direct result of the Fourier Inversion Theorem. As a result, we get $$\langle \mathcal{F}_{c}(f(x)), \mathcal{F}_{c}(g(x)) \rangle=\langle f(x), \mathcal{F^*}_{c}\mathcal{F}_{c}(g(x)) \rangle= \langle f(x), g(x) \rangle.$$

Now suppose $f(x)=g(x)=e^{-x}.$ The right hand side gives us $$\langle f(x), g(x) \rangle=\int_{0}^{\infty} e^{-2x} \ dx = \frac{1}{2}.$$ On the other hand, $$\langle \mathcal{F}_{c}(f(x)), \mathcal{F}_{c}(g(x)) \rangle= \frac{2}{\pi} \int_{0}^{\infty} \frac{1}{(1+y^2)^2} \ dy.$$ Equating both sides, we get $$\frac{2}{\pi} \int_{0}^{\infty} \frac{1}{(1+y^2)^2} \ dy=\frac{1}{2},$$ so $$ \int_{0}^{\infty} \frac{1}{(y^2+1)^2} \ dy=\frac{\pi}{4}.$$


By subbing $x=\sqrt{z}$, then $\frac{1}{z^2+1}=u$ $$\int_{0}^{+\infty}\frac{2x}{(x^4+1)^2}\,dx = \int_{0}^{+\infty}\frac{dz}{(z^2+1)^2}=\frac{1}{2}\int_{0}^{1}u^{1/2}(1-u)^{-1/2}\,du$$ that by Euler's beta function and $\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$ equals: $$ \frac{\Gamma\left(\frac{3}{2}\right)\Gamma\left(\frac{1}{2}\right)}{2\,\Gamma(2)} = \color{red}{\frac{\pi}{4}}$$ as wanted.


$\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{\mathrm{i}} \newcommand{\iff}{\Leftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\, #2 \,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ Following @Vivek Kaushik helpful answer:

\begin{align} \color{#f00}{\int_{0}^{\infty}{\dd u \over \pars{u^{2} + 1}^{2}}} & = -\lim_{\beta \to 1}\totald{}{\beta}\int_{0}^{\infty}{\dd u \over u^{2} + \beta} = -\lim_{\beta \to 1}\totald{}{\beta}\bracks{{1 \over \root{\beta}} \int_{0}^{\infty}{\dd u/\!\root{\beta} \over \pars{u/\!\root{\beta}}^{2} + 1}} \\[3mm] & \stackrel{u/\!\root{\beta}\ \to\ u}{=}\ -\lim_{\beta \to 1}\totald{}{\beta}\pars{\beta^{-1/2}% \int_{0}^{\infty}{\dd u \over u^{2} + 1}} = -\pars{-\,\half}\,{\pi \over 2} = \color{#f00}{{\pi \over 4}} \end{align}


Here is an approach using contour integration in case anyone is interested. Suppose we seek to verify that

$$\int_0^\infty \frac{2x}{x^8+2x^4+1} dx = \frac{\pi}{4}$$

or alternatively

$$\int_0^\infty \frac{x}{x^8+2x^4+1} dx = \frac{\pi}{8}.$$

We use a quarter pizza slice contour with the straight components $\Gamma_0$ and $\Gamma_1$ on the positive real axis and the positive imaginary axis and having radius $R$ ($\Gamma_2.$)

The denominator here is $$(x^4+1)^2$$ so the poles are double and located at

$$\rho_{0,1,2,3} = \exp(\pi i/4 + 2\pi i k/4) = \exp(\pi i/4 + \pi i k/2)$$

with $k = 0,1,2,3.$ Fortunately we can see by inspection that only the first pole $\rho_0$ is inside the contour (argument is $\pi/4.$)

For the residue we get

$$\frac{1}{2\pi i} \int_{|z-\rho_0|=\epsilon} \frac{z}{z^8+2z^4+1} \; dz.$$

Exploiting the symmetry put $w=z\exp(-\pi i/4)$ and $z=w\exp(\pi i/4)$ to get

$$\exp(\pi i/2) \frac{1}{2\pi i} \int_{|w\exp(\pi i/4)-1|=\epsilon} \frac{w}{w^8-2w^4+1} \; dw \\ = \frac{i}{2\pi i} \int_{|w-1|=\epsilon} \frac{w}{w^8-2w^4+1} \; dw.$$

The residue is thus given by

$$i\times \lim_{w\rightarrow 1} \left(\frac{(w-1)^2 w}{w^8-2w^4+1}\right)' = i\times \lim_{w\rightarrow 1} \left(\frac{w}{(w+1)^2 (w^2+1)^2}\right)' \\ = i\times \lim_{w\rightarrow 1} \left(\frac{1}{(w+1)^2 (w^2+1)^2} \\ - \frac{w}{(w+1)^4 (w^2+1)^4} (2(w+1)(w^2+1)^2+(w+1)^2 2(w^2+1) 2w\right).$$

This works out to $$i \times \left(\frac{1}{16} - \frac{16+32}{256}\right) = -\frac{i}{8}.$$

Returning to the main computation, on the part of the contour that is on the positive imaginary axis which is $\Gamma_1$ we obtain

$$\int_{\Gamma_1} \frac{z}{8z^8+2z^4+1} \; dz$$

which yields with $z=\exp(\pi i/2) x$

$$- \int_0^R \frac{\exp(\pi i/2) x}{8x^8+2x^4+1} \; \exp(\pi i/2) dx = \int_{\Gamma_0} \frac{z}{8z^8+2z^4+1} \; dz.$$

Finally we have by the ML bound for the circular component

$$\lim_{R\rightarrow\infty} \left|\int_{\Gamma_2} \frac{z}{8z^8+2z^4+1} \; dz\right| \le \lim_{R\rightarrow\infty} 2\pi R/4 \times \frac{R}{8R^8-2R^4+1} = 0.$$

It follows that

$$\int_0^\infty \frac{x}{8x^8+2x^4+1} \; dx = \frac{1}{2}\times 2\pi i \times -\frac{i}{8} = \frac{\pi}{8}$$

which is the claim.


At first - substitution: $$I=\int\limits_0^\infty{2x\,dx\over x^8+2x^4+1} = \int\limits_0^\infty{d(x^2)\over x^8+2x^4+1} = \int\limits_0^\infty{dy\over (y^2+1)^2}.$$ And then - by parts: $$I = \int\limits_0^\infty{1+y^2-y^2\over (y^2+1)^2}\,dy = \int\limits_0^\infty{dy\over y^2+1} + {1\over2}\int\limits_0^\infty y\,d{1\over y^2+1}\,dy$$ $$ = \int\limits_0^\infty {dy\over y^2+1} + {1\over2}{y\over y^2+1}\biggr|_0^\infty - {1\over2}\int\limits_0^\infty {dy\over y^2+1} = {1\over2}\arctan y\biggr|_0^\infty = {\pi\over4}.$$