# Compute $\int_0^{\infty}\frac{x}{x^4+1}dx$

I should compute the integral $$\displaystyle \int_0^{\infty}\frac{x}{x^4+1}dx.$$

This problem appears in complex analysis in the residue theorem and its consequences of real integrals.

I know the following: Let $p,q$ be polynomials with $\deg p\leq\deg q -2$ so that $q$ has no zeros in the real numbers. Then we have $$\int_{-\infty}^{\infty}\frac{p(x)}{q(x)}dx=2\pi i \sum_{Im~z >0}Res(\frac{p}{q},z).$$

But since $\frac{x}{x^4+1}$ is not axissymmetric I could only compute $$\displaystyle \int_{-\infty}^{\infty}\frac{x}{x^4+1}dx$$ and not $$\displaystyle \int_0^{\infty}\frac{x}{x^4+1}dx.$$

The subsitution $x=\sqrt{y}$ comes in handy here
$$I=\frac{1}{2}\int_0^{\infty}\frac{dy}{1+y^2}=\frac{1}{4}\int_{-\infty}^{\infty}\frac{dy}{1+y^2}$$
An alternative way, just for fun. Through the substitution $x=\frac{1}{z}$ we have: $$\int_{1}^{+\infty}\frac{x\,dx}{1+x^4}=\int_{0}^{1}\frac{z\,dz}{1+z^4}$$ hence: $$\begin{eqnarray*}I=\int_{0}^{+\infty}\frac{x\,dx}{1+x^4}&=&\int_{0}^{1}\frac{2x\,dx}{1+x^4}\\&=&\int_{0}^{1}2\sum_{n\geq 0}(-1)^{n}x^{4n+1}\,dx\\&=&\sum_{n\geq 0}\frac{2(-1)^n}{4n+2}\\&=&\sum_{n\geq 0}\frac{(-1)^n}{2n+1}\\&=&\arctan(1)=\color{red}{\frac{\pi}{4}}.\end{eqnarray*}$$