<s>[INST] Integrate $\int\frac{1}{x^3+1}dx$ The problem is, as stated:
$$\int\frac{1}{x^3+1}dx$$
I tried using substitution: $t^3 = x^3 + 1$ but didn't get far with that. I also tried setting: $t = x^3 + 1$, with no luck again.
I tried partial decomposition but I didn't know how to integrate $$\int\frac{1}{x^2-x+1}$$ and I kept getting that term when expanding $x^3 + 1$
Any help would be much appreciated.
 [/INST] $$
\begin{aligned}
I &=\int \frac{4}{4 x^2-4 x+1} d x \\
&=4 \int \frac{d x}{(2 x-1)^2+ (\sqrt 3)^2} \\
&=\frac{2}{\sqrt{3}} \tan ^{-1}\left(\frac{2 x-1}{\sqrt{3}}\right)+C
\end{aligned}
$$
</s>