Show that $\int^\infty_0 \frac{x^a}{1+x^3}\frac{dx}{x} = \frac{\pi}{3 \sin(\pi a/3)}$ for $0I am stuck on proving that this is true, I am really close but there seems to be an error in my calculation and I am unable to find where I am making a mistake...
Relevant equation
$$\int^\infty_0 f(x) x^a \frac{dx}{x}=-\frac{\pi e^{-\pi i a}}{\sin(\pi a)}\sum(\text{residues of $f(z)z^{a-1}$ except for the pole at 0})$$
From my text book I know the above holds true if there exists $b>a$ and $0<b'<a$ such that $|f(z)|\leq K/|z|^b$ for $|z|$ large and $|f(z)|\leq L/|z|^{b'}$ for $|z|$ small. I have calculated the residues of 
$$\frac{z^{a-1}}{1+z^3},$$
at the simple poles $e^{\pi i},e^{\pi i/3}, e^{-\pi i /3}$ to be
$$-\frac{1}{3}e^{\pi i a},-\frac{1}{3}e^{\pi i a/3},-\frac{1}{3}e^{-\pi i a/3}$$.
I am quite sure that these residues are right. But I am unable to show that 
$$\frac{\pi e^{-\pi i a}}{3\sin(\pi a)}(e^{\pi i a}+e^{-\pi i a/3}+e^{\pi i a/3})=\frac{\pi}{3 \sin(\pi a/3)}.$$
I have tried so many ways to rewrite this, I am suspecting I have made some other error, but I have no idea where...
 A: Recognizing the branch point at $z=0$, we cut the plane along the positive real axis.
We will integrate around a keyhole contour comprised of 
$(i)$ a real-line integral from $(0,0)$ to $(R,0^{+})$ on the upper side of the branch cut;
$(ii)$ a semi-circle of radius $R$ that begins at $(R,0^{+})$ and ends at $(R,0^{-})$;
$(iii)$ a real-line integral from $(R,0^{-})$ to $(0,0)$;


NOTE:
  There is actually a fourth part of the contour, which is a small seim-circle of radius $\epsilon$ around the branch point.  The contribution from this portion is easily seen to go to zero as $\epsilon \to 0$.


Now, the closed-contour integral is 
$$\begin{align}
\oint_C\frac{z^{a-1}\,dz}{z^3+1}&=\int_0^R\frac{x^{a-1}\,dx}{x^3+1}+\int_{C_R}\frac{z^{a-1}\,dz}{z^3+1}+\int_R^0\frac{x^{a-1}e^{i2\pi a}\,dx}{x^3+1}\\\\&=2\pi i\sum\text{Res}\left(\frac{z^{a-1}}{z^3+1}\right)
\end{align}$$
As $R \to \infty$, the integral over $C_R$ is $O(R^{a-3})$, which goes to $0$ for $a<3$.  Thus, we have
$$\begin{align}
\int_0^{\infty}\frac{x^{a-1}\,dx}{x^3+1}=\frac{2\pi i}{1-e^{i2\pi a}}\sum\text{Res}\left(\frac{z^{a-1}}{z^3+1}\right)
\end{align}$$

SUMMING THE RESIDUES
The sum of the residues are 
$$-\frac13(e^{i\pi a/3}+e^{i\pi a}+e^{i5\pi a/3})=-\frac13(e^{i\pi a/3}+e^{i\pi a}+e^{i5\pi a/3})\left(\frac{e^{i\pi a/3}-e^{-i\pi a/3}}{e^{i\pi a/3}-e^{-i\pi a/3}}\right)=-\frac13\frac{e^{i2\pi a}-1}{e^{i\pi a/3}-e^{-i\pi a/3}}$$

PUTTING IT ALL TOGETHER
Thus, we have
$$\begin{align}
\int_0^{\infty}\frac{x^{a-1}\,dx}{x^3+1}&=\frac{2\pi i}{1-e^{i2\pi a}}\left(-\frac13\frac{e^{i2\pi a}-1}{e^{i\pi/3}-e^{-i\pi/3}}\right)\\\\
&=\frac{2\pi i/3}{e^{i\pi a/3}-e^{-i\pi a/3}}\\\\
&=\frac{\pi}{3\sin(\pi a /3)}
\end{align}$$
A: Discaimer: this solution is based on the Laplace transform of the hyperbolic secant.
$$I=\int_{0}^{+\infty}\frac{x^a}{1+x^3}\frac{dx}{x}=\frac{1}{3}\int_{-\infty}^{+\infty}\frac{e^{at/3}}{1+e^t}\,dt=\frac{1}{3}\int_{0}^{+\infty}\frac{e^{\frac{at}{3}}+e^{\frac{(3-a)t}{3}}}{e^t+1}\,dt \tag{1}$$
By expanding $\frac{1}{1+e^x}$ as a geometric series and integrating termwise we have:
$$\mathcal{L}\left(\frac{1}{\cosh x}\right) = \frac{1}{2}\left(\psi\left(\frac{3+s}{4}\right)-\psi\left(\frac{1+s}{4}\right)\right)\tag{2}$$
from:
$$\sum_{n\geq 0}\frac{1}{(n+a)(n+b)}=\frac{\psi(a)-\psi(b)}{a-b}\tag{3}$$
so:
$$ I = \frac{1}{6}\left(\psi\left(\frac{a}{6}+\frac{1}{2}\right)-\psi\left(\frac{a}{6}\right)+\psi\left(1-\frac{a}{6}\right)-\psi\left(\frac{1}{2}-\frac{a}{6}\right)\right)\tag{4}$$
and by the reflection formula:
$$ \Gamma(s)\Gamma(1-s)=\frac{\pi}{\sin(\pi s)} \tag{5}$$
it follows that:
$$ \psi(s)-\psi(1-s) = -\pi \cot(\pi s)\tag{6} $$
so by putting together $(4)$ and $(6)$ we have:
$$ I = \frac{\pi}{6}\left(\cot\frac{a\pi}{6}+\tan\frac{a\pi}{6}\right)=\frac{\pi}{3\sin\frac{a\pi}{3}}\tag{7} $$
as wanted.
A: As in this answer, after substituting $x\mapsto x^{1/3}$ and using the contour shown there, we get
$$
\begin{align}
\frac13\int_0^\infty\frac{x^{a/3}}{1+x}\frac{\mathrm{d}x}{x}
&=\frac1{1-e^{2\pi i(a-3)/3}}\frac13\int_\gamma\frac{z^{(a-3)/3}}{1+z}\,\mathrm{d}z\\
&=\frac{e^{-\pi i(a-3)/3}}{e^{-\pi i(a-3)/3}-e^{\pi i(a-3)/3}}\frac{2\pi i}3e^{\pi i(a-3)/3}\\
&=\frac{2i}{e^{\pi ia/3}-e^{-\pi ia/3}}\frac\pi3\\
&=\frac\pi{3\sin(\pi a/3)}
\end{align}
$$
The integral along the small circular contour vanishes as long as $a\gt0$ and the integral along the large circular contour vanishes as long as $a\lt3$.

The residue of $\frac{z^{a-1}}{1+z^3}$ at $z=w$ is $\frac{w^{a-1}}{3w^2}=\frac{w^{a-3}}3=-\frac13w^a$, since $w^3=-1$. Therefore,
at $w=e^{\pi i/3}$, the residue is $-\frac13e^{\pi ia/3}$
at $w=e^{\pi i}$, the residue is $-\frac13e^{\pi ia}$
at $w=\color{#C00000}{e^{5\pi i/3}}$, the residue is $\color{#C00000}{-\frac13e^{5\pi ia/3}}$
The values for the residues were not correct since we are using the branch cut along the positive real axis, not the one on the negative real axis.
$$
\begin{align}
&-\frac{\pi e^{-\pi ia}}{\sin(\pi a)}\left(-\frac13e^{\pi ia/3}-\frac13e^{\pi ia}-\frac13e^{5\pi ia/3}\right)\\
&=\frac\pi3\frac{e^{-2\pi ia/3}+1+e^{2\pi ia/3}}{\sin(\pi a)}\\
&=\frac\pi3\frac{1+2\cos(2\pi a/3)}{\sin(3\pi a/3)}\\
&=\frac\pi3\frac{1+2(1-2\sin^2(\pi a/3))}{3\sin(\pi a/3)-4\sin^3(\pi a/3)}\\[3pt]
&=\frac\pi{3\sin(\pi a/3)}
\end{align}
$$
