<s>[INST] Integral $\int{\frac{1}{(x^{3} \pm 1)^2}}$ I need to solve the following integrals:
$$\int{\frac{1}{(x^3+1)^2}}dx$$
and
$$\int{\frac{1}{(x^3-1)^2}}dx$$
My first thought was to use a trigonometric substitution but the $x^3$ messed it up. Can you guys suggest another method?
 [/INST] Hint:
Simplify
$$\int{\frac{1}{(x^3+1)^2}}dx=\frac x{3(x^3+1)}+\frac13\int\frac2{x^3+1}dx$$
Then, decompose
$$\frac2{x^3+1}=\frac1{x+1}+\frac{1}{x^2-x+1}- \frac{x^2}{x^3+1}$$
</s>