Compute $\int_{0}^{\infty} \frac{x^\alpha}{x^2+x+1}dx$ So I am asked to integrate:
$\int_{0}^{\infty} \frac{x^{\alpha}}{x^{2}+x+1}dx$, where $-1<\alpha<1$
As this is done in the Complex Analysis course I tried to consider the function 
$f(z)=\frac{z^{\alpha}}{z^{2}+z+1}$ 
and to integrate it over the contour:
$\gamma_{1}$: real line from 0 to R, which is basically our integral
$\gamma_{2}$: the quarter of the circle of radius R, with $\theta$ from 0 to $\pi/2$.
$\gamma_{3}$: line from $iR$ to $0.$
Now my argument is that the integral over this contour is $0$ as the are no singularities of $f$ inside the curve.
I managed to prove that the integral over the quarter of the circle tends to $0$ as $R$ tends to infinity but I do not know how i can compute the integral over the imaginary line.
 A: In order that $\frac{x^{\alpha}}{x^2+x+1}$ is integrable over $\mathbb{R}^+$ we need $-1<\text{Re}(\alpha)<1$. With such assumption
$$ I(\alpha)=\int_{0}^{+\infty}\frac{x^{\alpha}}{x^2+x+1}\,dx = \int_{0}^{+\infty}\frac{x^{\alpha+1}-x^{\alpha}}{x^3-1}\,dx \tag{0}$$
can be written (by splitting the integration range and applying the sub $x\mapsto\frac{1}{x}$ in the second "half") as
$$ I(\alpha)=\int_{0}^{1}\frac{x^{\alpha}-x^{\alpha+1}}{1-x^3}\,dx+\int_{0}^{1}\frac{x^{-\alpha}-x^{1-\alpha}}{1-x^3}\,dx =\int_{0}^{1}(x^{\alpha}+x^{-\alpha})\frac{\!1-x}{\,1-x^3}\,dx\tag{1}$$
By Taylor series and termwise integration,
$$ I(\alpha)=\sum_{k\geq 0}\left(\frac{1}{3k+\alpha+1}-\frac{1}{3k+\alpha+2}+\frac{1}{3k-\alpha+1}-\frac{1}{3k-\alpha+2}\right)\tag{2}$$
or:
$$ I(\alpha)=2\sum_{k\geq 0}\left(\frac{3k+1}{(3k+1)^2-\alpha^2}-\frac{3k+2}{(3k+2)^2-\alpha^2}\right)=2\sum_{n\geq 0}\frac{n\,\chi(n)}{n^2-\alpha^2}\tag{3}$$
with $\chi$ being the non-primitive Dirichlet character $\!\!\pmod{3}$. It also follows:
$$ I(\alpha)=\frac{d}{d\alpha}\log\prod_{k\geq 0}\left(\frac{(3k+1+\alpha)(3k+2-\alpha)}{(3k+1-\alpha)(3k+2+\alpha)}\right)=\frac{d}{d\alpha}\log\frac{\sin\left(\frac{\pi}{3}(\alpha+1)\right)}{\cos\left(\frac{\pi}{6}(2\alpha+1)\right)} \tag{4}$$
by the $\Gamma$ reflection formula. By simplifying:

$$ I(\alpha)=\int_{0}^{+\infty}\frac{x^\alpha\,dx}{x^2+x+1} = \color{red}{\frac{2\pi}{\sqrt{3}\left(1+2\cos\frac{2\pi\alpha}{3}\right)}}.\tag{5}$$

A: Take the function $$f\left(z\right)=\frac{z^{\alpha}}{z^{2}-z+1}$$ and the classic keyhole contour. Then $$\int_{\Gamma}f\left(z\right)dz=2\pi i\left(\underset{z=\frac{1+i\sqrt{3}}{2}}{\textrm{Res}}f\left(z\right)+\underset{z=\frac{1-i\sqrt{3}}{2}}{\textrm{Res}}f\left(z\right)\right)=2\pi\frac{\left(\frac{1+i\sqrt{3}}{2}\right)^{\alpha}}{\sqrt{3}}-2\pi\frac{\left(\frac{1-i\sqrt{3}}{2}\right)^{\alpha}}{\sqrt{3}}$$ and since over the circumferences we have $$\left|iR\int_{0}^{\pi}\frac{R^{\alpha}e^{i\theta\alpha}}{R^{2}e^{2i\theta}-Re^{i\theta}+1}e^{i\theta}d\theta\right|\leq\pi\frac{R^{1+\alpha}}{R^{2}-R-1}\rightarrow0$$ as $R\rightarrow\infty$ or $R\rightarrow0$ since $-1<\alpha<1$, we have $$\int_{0}^{\infty}\frac{x^{\alpha}}{x^{2}+x+1}dx=\frac{2\pi\left(\left(\frac{1+i\sqrt{3}}{2}\right)^{\alpha}-\left(\frac{1-i\sqrt{3}}{2}\right)^{\alpha}\right)}{\sqrt{3}\left(e^{i\pi a}-e^{-i\pi a}\right)}=\color{red}{\frac{2\pi}{\sqrt{3}\left(1+2\cos\left(\frac{2\pi a}{3}\right)\right)}}.$$
