Evaluate $ \int_{0}^{\infty} \frac{1}{x^3+x+1}dx$ I want to evaluate the following integral
$$ \int_{0}^{\infty} \frac{1}{x^3+x+1}\>dx$$
via Residue theorem. Or, any other methods are welcome!
Actually i just compute this via mathematica, but it seems
the command
Integrate[1/(x^3 + x + 1), {x, 0, Infinity}]
gives some terrible output not a compact or simple form.
My first trial is factor $x^3+x+1$ into linear terms but it does not seem easy,
I have difficulties for finding poles, $i.e$, finding zeros for $x^3+x+1=0$. And having trouble for finding proper contour.

Note that $x^3+x+1$ has only one real root below per the Cardano’s formula
$$r= \sqrt[3]{\frac{\sqrt{93}-9}{18}}-\sqrt[3]{\frac{\sqrt{93}+9}{18}}=  -0.6823
$$
Then, decompose the integrand accordingly to integrate as follows
\begin{align}
&\int_0^\infty \frac{1}{x^3+x+1}dx\\
=&\ \int_0^\infty \frac1{(x-r)(x^2+rx-1/r)}dx\\
=&\ \int_0^\infty \frac r{2r +3}\left(-\frac1{x-r}+\frac{x+2r}{x^2+rx-1/r}\right)dx\\
=&\ \frac r{2r +3}\bigg(-\ln\frac{x-r}{\sqrt{ x^2+rx-1/r}}
+\frac{ 3r \tan^{-1}\frac{2x+r}{\sqrt{1-3/r} } }{\sqrt{1-3/r}}\bigg)_{0}^{\infty}\\
=&\ \frac {3r}{2r +3}\bigg(\ln(-r)^{\frac12}
-\frac{(-r)^{\frac32}}{\sqrt{3-r} } \bigg(\frac\pi2 + \tan^{-1}\frac{(-r)^{\frac32}}{\sqrt{3-r} }\bigg)\bigg) \\ 
\end{align}
