Showing that parts of a contour integral vanish I'm trying to compute the integral $\int_{0}^{\infty}\frac{x}{x^6+1}dx$ using contours in the complex plane. 
To do this I take the function $f(z)=\frac{z}{z^6+1}$ and integrate along the contour consisting of the positive real line, a circle of infinite radius going counter clockwise from the positive real axis to the positive imaginary axis, and a line going back to the origin. Since there is a singularity on the imaginary axis I introduce an additional contour going clockwise around it. Using residues I can compute the integral of $f(z)$ along this contour, however, in order to equate it to the real integral I must show that the integrals along the imaginary axis vanish.
Can this be done by simply applying the ML estimate, as I do to show that the integral along the semicircle vanishes, or am I missing something?
 A: There is a pole at $z=i$ and so we cannot close the contour along the imaginary axis.  
Rather, let's chose a contour $C_R$ to be comprised on $(1)$ the real line segment from $z=0$ to $z=R$, $(2)$ the circular arc described parametrically by $z=Re^{i\phi}$, $\phi \in [0, \pi/3]$, and the straight-line segment from $z=Re^{i\pi/3}$ to $z=0$.  
If $R>1$, then only the pole at $z=e^{i\pi/6}$ is enclosed by $C_R$.  We thus have from the residue theorem
$$\begin{align}
\oint_{C_R} \frac{z}{z^6+1}\,dz&=2\pi i \text{Res}\left(\frac{z}{z^6+1}, z=e^{i\pi/6}\right)\\\\
&=2\pi i \frac{e^{-2\pi/3}}{6} \tag1
\end{align}$$
We also have
$$\begin{align}
\oint_{C_R} \frac{z}{z^6+1}\,dz&=\int_0^R \frac{x}{x^6+1}\,dx+\int_0^{\pi/3}\frac{Re^{i\phi}}{R^6e^{i6\phi}+1}\,iRe^{i\phi}\,d\phi+\int_R^0 \frac{xe^{i2\pi/3}}{x^6+1}\,dx\\\\
&=\left(1-e^{i2\pi/3}\right)\int_0^R \frac{x}{x^6+1}\,dx++\int_0^{\pi/3}\frac{Re^{i\phi}}{R^6e^{i6\phi}+1}\,iRe^{i\phi}\,d\phi\\\\
&=-i2e^{i\pi/3}\sin(\pi/3)\int_0^R \frac{x}{x^6+1}\,dx++\int_0^{\pi/3}\frac{Re^{i\phi}}{R^6e^{i6\phi}+1}\,iRe^{i\phi}\,d\phi\tag2
\end{align}$$
The second integral on the right-hand side of $(2)$ approaches $0$ as $R\to \infty$ and the first integral approaches the integral of interest.
Equating $(1)$ and $(2)$ after letting $R\to \infty$ yields
$$\int_0^\infty \frac{x}{x^6+1}\,dx=\frac{\pi}{3\sqrt 3}$$
