Calculate $ \intop_{0}^{\infty}\frac{1}{x^{6}+x^{3}+1}dx $ (Using line integral) (complex analysis) I want to calculate the integral $$ \intop_{0}^{\infty}\frac{1}{x^{6}+x^{3}+1}dx $$  using a line integral $\varGamma $ which is the boundary of an arc of a circle of radius $ R $ and $ 0\leq Arg(z) \leq 2\pi/3 $
Such a path $\gamma $ is sort of a slice of pizza.
Now I'm gonna denote this path $ \gamma $ and decompose it into 3 parts.
One part - the part that lies on the real axis, given by $ x, R\leq x \leq 0 $.
Second part - the arc of the circle which we'll parametrize $ Re^{i\theta},\thinspace\thinspace\thinspace0\leq\theta\leq\frac{2\pi}{3} $
And the last part, a ray from the origin with phase $2\pi/3 $ and length R (the radius of this pizza slice), which we'll parametrize $ xe^{i\frac{2\pi}{3}}\thinspace\thinspace\thinspace0\leq x\leq R $
So we get $$ \intop_{\gamma}\frac{1}{z^{6}+z^{3}+1}dz=\intop_{0}^{R}\frac{1}{x^{6}+x^{3}+1}dx-\intop_{0}^{R}\frac{e^{i\frac{2\pi}{3}}}{x^{6}+x^{3}+1}dx+\intop_{0}^{\frac{2\pi}{3}}\frac{Rie^{i\theta}}{R^{6}e^{6i\theta}+R^{3}e^{3i\theta}+1}d\theta $$
And notice that $$ \intop_{0}^{\frac{2\pi}{3}}\frac{Rie^{i\theta}}{R^{6}e^{6i\theta}+R^{3}e^{3i\theta}+1}d\theta \to 0 $$
When $ R \to \infty $.
Also, by the Residue theorem of Cauchy, we get $$ \intop_{\gamma}\frac{1}{z^{6}+z^{3}+1}dz=2\pi i\text{Res}\left(\frac{1}{z^{6}+z^{3}+1};z_{k}\right) $$
So when $ R \to \infty $, the line integral would be the summation of all the poles of the integrand inside $\gamma$, that is, all the poles with the argument between $ 0 $ and $2\pi/3$.
Now I have checked, and found that the poles of $f $ which satisfies this conditions are $ e^{i\frac{2\pi}{9}},e^{i\frac{4\pi}{9}} $
So that $$ 2\pi i\left(\text{Res}\left(\frac{1}{z^{6}+z^{3}+1};e^{i\frac{2\pi}{9}}\right)+\text{Res}\left(\frac{1}{z^{6}+z^{3}+1};e^{i\frac{4\pi}{9}}\right)\right)=\left(1-i\frac{2\pi}{3}\right)\intop_{0}^{\infty}\frac{1}{x^{6}+x^{3}+1}dx $$
Now, for a function which has a simple pole at $z_k$ we can write the function as $ \frac{A\left(z\right)}{B\left(z\right)} $ where $B$ has a zero at the pole and $ A $ does not have a zero. And the residue is given by $$\lim_{z\to z_{k}}\left(z-z_{k}\right)\frac{A\left(z\right)}{B\left(z\right)}=\frac{A\left(z\right)}{B'\left(z\right)} $$ evaluated at $z_{k}$
So in order to find the residue of my poles, I found the derivative of the denominator and let z= the pole. So finally I got after all the calculations that the integral should be $$ \left(\frac{1}{6e^{i\frac{10}{9}\pi}+3e^{i\frac{4}{9}\pi}+1}+\frac{1}{6e^{i\frac{20}{9}\pi}+3e^{i\frac{4}{9}\pi}+1}\right)2\pi i\frac{1}{1-e^{i\frac{2}{3}\pi}} $$
Which is not real (I checked, unfortunately)
What am I missing? what went wrong?
Thanks in advance.

I had a few calculations mistakes: the correct calculation would be the following:
The residue at the poles I mentioned given by
$$ \text{Res}\left(\frac{1}{z^{6}+z^{3}+1};e^{i\frac{2\pi}{9}}\right)=\frac{1}{\left(z^{6}+z^{3}+1\right)'}|_{z=e^{i\frac{2\pi}{9}}}=\frac{1}{6e^{i\frac{10}{9}\pi}+3e^{i\frac{4\pi}{9}}} $$
And $$ \text{Res}\left(\frac{1}{z^{6}+z^{3}+1};e^{i\frac{4\pi}{9}}\right)=\frac{1}{\left(z^{6}+z^{3}+1\right)'}|_{z=e^{i\frac{4\pi}{9}}}=\frac{1}{6e^{i\frac{20}{9}\pi}+3e^{i\frac{8\pi}{9}}} $$
So we get on the LHS
$$ 2\pi i\left(\frac{1}{6e^{i\frac{10}{9}\pi}+3e^{i\frac{4\pi}{9}}}+\frac{1}{6e^{i\frac{10}{9}\pi}+3e^{i\frac{2\pi}{9}}}\right) $$
and on the RHS $$ \intop_{0}^{\infty}\frac{1}{x^{6}+x^{3}+1}dx+\intop_{0}^{\infty}\frac{-e^{i\frac{2\pi}{3}}}{x^{6}+x^{3}+1}dx $$
So eventually $$ \intop_{0}^{\infty}\frac{1}{x^{6}+x^{3}+1}dx=\left(\frac{1}{6e^{i\frac{10}{9}\pi}+3e^{i\frac{4}{9}\pi}+1}+\frac{1}{6e^{i\frac{20}{9}\pi}+3e^{i\frac{8}{9}\pi}+1}\right)2\pi i\frac{1}{1-e^{i\frac{2}{3}\pi}} $$
Which apparently is a real number which is approximated form is $\approx$ 0.8975
