Indefinite integral $\int^{\infty}_{0}\frac{x}{x^4+1}dx$ via residues I want to compute $\displaystyle \int^{\infty}_{0}\frac{x}{x^4+1}dx$ using the residue theorem.
The poles in the upper half plane are:
location: $\large e^{\frac{\pi i}4}$, order: 1, residue: $\large\frac{1}{4}e^{\frac{3\pi i}2}$
location: $\large e^{\frac{3\pi i}4}$, order: 1, residue: $\large \frac{1}{4}e^{\frac{\pi i}2}$ 
The problem is that the integral from $-\infty$ to $\infty$ vanishes for symmetry reasons, so I cannot apply the standard approach of putting the half of a 1-sphere on top of the real axis and letting its radius go to infinity. If x was replaced with $x^2$ for instance, I could just divide the result by two. Is there another way of contour integration to evaluate the upper expression?
 A: Those integrals were discussed by us in detail already.
To be more explicit you are asking for the special case of Interesting integral formula for $m=2$, $n=4$ and $a=1$. Just directly plugging in those values in the proof you get what you want (they are not really used anyways).
A: Suppose we are interested in 
$$I = \int_0^\infty \frac{x}{1+x^4} dx$$
and evaluate it by integrating
$$f(z) = \frac{z}{1+z^4}$$
around a  pizze slice contour  with the horizontal side  $\Gamma_1$ of
the slice  on the positive real  axis and the  slanted side $\Gamma_3$
parameterized by $z= \exp(2\pi i/4) t = \exp(\pi i/2) t = it$ with the
two  connected by  a circular  arc $\Gamma_2$  parameterized by  $z= R
\exp(it)$ with $0\le t\le \pi i/2.$ We let $R$ go to infinity.
 The integral along $\Gamma_1$ is $I$ in the limit. Furthermore
we have in the limit
$$\int_{\Gamma_3} f(z) dz
= - \int_0^\infty
\frac{\exp(\pi i/2) t}{1+t^4 \exp(2\pi i)} \exp(\pi i/2) dt 
\\ = - \exp(\pi i) \int_0^\infty 
\frac{t}{1+t^4} dt = I.$$
Furthermore
$$\int_{\Gamma_2} f(z) dz \rightarrow 0$$
by the ML bound which yields
$$\lim_{R\rightarrow \infty} \pi i/2 R \frac{R}{R^4-1} = 0.$$
The four poles are at
$$\rho_k = \exp(\pi i/4 + 2\pi i k/4).$$
Considering the one pole $\rho_0$ inside the slice ($\rho_1 = \exp(\pi
i/4 + \pi i/2)  = \exp(3\pi i/4)$ so it is not  inside the contour) we
thus obtain
$$2 I = 2\pi i \mathrm{Res}_{z=\rho_0} f(z)$$
or
$$I = \pi i \frac{\rho_0}{4\rho_0^3}
= \pi i \frac{\rho_0^2}{4\rho_0^4}
= -\frac{1}{4} \pi i \exp(\pi i/2)
= \frac{\pi}{4}.$$
Remark. We see that the pizza slice is in fact a quarter slice and
the parameterization may use the rotation $it$ by $\pi/2$ throughout.
The four poles are centered on the diagonals of the four quadrants.
