Evaluation of $\int_0^\infty \frac{x^2}{1+x^5} \mathrm{d} x$ by contour integration Consider the following integral:
$$\int_{0}^{\infty} \frac{x^{2}}{1+x^{5}}  \mathrm{d} x \>.$$
I did the following: Since $-1$ is a pole on the real axis, I took $z_{1}=e^{3\pi/5}$  then constructed an arc between  $Rz_{1}$ and $R$ : 
$f(e^{2\pi i /5}z)=f(z)$ it follows that : $(1-e^{2pi i/5})\int_{\alpha}f(z)dz + \int_{\beta}f(z)dz = 2\pi i \text{ Res } z_{2} f $ ,
where $\alpha$ is the way along the eral axis, $\beta$ is the way along the arc and $z_{2}=e^{i\pi/5}$
This gives: $\int_{0}^{\infty}...dx = 2\pi i (\frac{e^{2i\pi/5}}{-5})\cdot \frac{1}{(1-e^{2\pi i/5})}$
The real part of the right side in wolframalpha does not give the same result as the left side. 
 Does anybody see why? Please do tell. 
 A: I think you want to use the curve $e^{2\pi i/5}x$ for the inbound curve circling the pole at $e^{\pi i/5}$, which has residue $\frac1{5e^{2\pi i/5}}$.

Because the integral along $|z|=R$ vanishes as $R\to\infty$, we get
$$
\left(1-e^{6\pi i/5}\right)\int_{0}^{\infty} \frac{x^{2}}{1+x^{5}}\;\mathrm{d}x=2\pi i\frac{1}{5e^{2\pi i/5}}
$$
Which gives
$$
\int_{0}^{\infty} \frac{x^{2}}{1+x^{5}}\;\mathrm{d}x=\frac{2\pi i}{5\left(e^{2\pi i/5}-e^{-2\pi i/5}\right)}=\frac{\pi}{5\sin(2\pi/5)}
$$
A: I ran out of patience, but the partial fraction approach can give an indefinite integral in closed form, as the tenth roots of 1 have real and imaginary parts that can be written with nothing worse than square root signs. I got
$$ \frac{x^2}{1 + x^5}  \; = \; \; \frac{A}{x + 1} + \frac{B_1 x + B_0}{x^2 - \frac{1}{2}(\sqrt 5 + 1)x + 1} + \frac{C_1 x + C_0}{x^2 + \frac{1}{2}(\sqrt 5 - 1)x + 1}.$$
Then I got $$ A = \frac{1}{3}, \; B_0 = B_1 = \frac{1}{6}(\sqrt 5 - 1), \; \; C_0 = C_1 = -\frac{1}{6}(\sqrt 5 + 1).$$
The two quadratic denominators terms are positive over the reals. The rest of the task is also cookbook, you rewrite, for example $B_1 x + B_0$ as $\frac{B_1}{2}$ times the derivative of $x^2 - \frac{1}{2}(\sqrt 5 + 1)x + 1$ plus a constant term , call it $B_3.$ So, for this part, you get the indefinite integral being
$$ \frac{B_1}{2} \log(x^2 - \frac{1}{2}(\sqrt 5 + 1)x + 1) + B_3 \arctan(linear)   $$ 
I imagine you can force your computer algebra system to show all the steps in this calculation while getting the specific numbers right. The beginning is to define
$$ \omega = e^{\pi i / 5} = \frac{1}{4}(1 + \sqrt 5) + \frac{i}{4} \sqrt{10 - 2 \sqrt 5}   $$
with
$$ 1 + x^5 = (x + 1)(x - \omega)(x - \omega^3)(x - \omega^7)(x - \omega^9)    $$
A: $\newcommand{\+}{^{\dagger}}
 \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{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
You can avoid the 5 poles by integrating
\begin{align}
\overbrace{\int_{0}^{\infty}{x^{2} \over 1 + x^{5}}\,\dd x}
^{\ds{\mbox{Set}\ x \equiv t^{1/5}}}&\ =\
\color{#66f}{{1 \over 5}\int_{0}^{\infty}{t^{-2/5} \over t + 1}\,\dd t}
={1 \over 5}\,2\pi\ic\expo{-2\pi\ic/5}
-{1 \over 5}\int_{\infty}^{0}{t^{-2/5}\expo{-4\pi\ic/5} \over t + 1}\,\dd t
\end{align}

such that
  \begin{align}
\color{#66f}{\large\int_{0}^{\infty}{x^{2}\,\dd x \over 1 + x^{5}}}
={1 \over 5}\,2\pi\ic\,{\expo{-2\pi\ic/5} \over 1 - \expo{-4\pi\ic/5}}
={1 \over 5}\,2\pi\ic\,{1 \over \expo{2\pi\ic/5} - \expo{-2\pi\ic/5}}
=\color{#66f}{\large{\pi \over 5\sin\pars{2\pi/5}}}
\end{align}
  The integration contour is the following one:
  

