TITLE: How to compute this difficult looking integral
QUESTION [7 upvotes]: I am having a really difficult time trying to solve $$\int_{0}^{\infty} \frac{dx}{x^3+x+1}$$
So I know I should definitely be wanting to use residue calculus. Moreover it was asked in the context of residue thereom, so if possible that would be my only intrest
It doesn't seem similar to any of the other examples I have because I do not know a simple closed form for the poles, moreover, I dont have any sort of idea of what contour I would need to choose.
I think possibly it can be done using the complex logarithm?  I know the answer is approximately $0.921763$
So any ideas/solutions on how to actually come to that final answer?
Thanks

REPLY [6 votes]: $x^3+x+1$ has a single real root $\alpha$ (close to $-0.7$) and two complex conjugate roots $\beta,\overline{\beta}$.
By Vieta's formulas, $\alpha+\beta+\overline{\beta}=0$, $\alpha\beta\overline{\beta}=-1$ and $\alpha(\beta+\overline{\beta})+\beta\overline{\beta}=1$.
By partial fraction decomposition,
$$ \frac{1}{x^3+x+1}=\frac{1}{(x-\alpha)(x-\beta)(x-\overline{\beta})} = \sum_{\xi\in\{\alpha,\beta,\overline{\beta}\}}\frac{\text{Res}\left(\frac{1}{x^3+x+1},x=\xi\right)}{x-\xi} \tag{1}$$
or:
$$ \frac{1}{x^3+x+1} = \sum_{\xi\in\{\alpha,\beta,\overline{\beta}\}}\frac{1}{(3\xi^2+1)(x-\xi)} \tag{2} $$
so that:
$$ \int_{0}^{M}\frac{dx}{x^3+x+1}=\sum_{\xi\in\{\alpha,\beta,\overline{\beta}\}}\frac{\log(M-\xi)-\log(-\xi)}{(3\xi^2+1)} \tag{3}$$
and since the sum of the residues at $\alpha,\beta,\overline{\beta}$ is zero,
$$ \int_{0}^{+\infty}\frac{dx}{x^3+x+1} = \color{red}{\frac{-\log(-\alpha)}{3\alpha^2+1}-2\log\|\beta\|\cdot\text{Re}\left(\frac{1}{3\beta^2+1}\right)+2\text{Arg}(-\beta)\cdot \text{Im}\left(\frac{1}{3\beta^2+1}\right)}. \tag{4} $$
Numerically, such integral is $0.921763372185057543420173329\ldots$.
It has to be real, obviously.