<s>[INST] Evaluating $\int \frac{dx}{x^3+x+1}$ $$\int \frac{dx}{x^3+x+1}$$
I have no idea how to solve this. How do I evaluate it? 
Any advice, hint or well-thought solution will be appreciated.
 [/INST] Let $\zeta_1,\zeta_2,\zeta_3$ be the roots of $x^3+x+1$. We have:
$$ \text{Res}\left(\frac{1}{z^3+z+1},z=\zeta_i\right) = \frac{1}{3\zeta_i^2+1},\tag{1}$$
hence:
$$ \frac{1}{z^3+z+1}=\sum_{i=1}^{3}\frac{1}{3\zeta_i^2+1}\cdot\frac{1}{z-\zeta_i} \tag{2} $$
and:
$$ \int \frac{dz}{z^3+z+1} = C+\sum_{i=1}^{3}\frac{\log(z-\zeta_i)}{3\zeta_i^2+1}.\tag{3}$$
</s>