I want to determine the following integral:
$$\int_{-\infty}^\infty \frac1{x^6+1} dx$$
by using the following identity:
$$\frac1{x^6+1} = \Im\left[\frac1{x^3-i}\right]$$
How in the world can I do this integral if I need to make use of the above identity?
If I plug the integral in wolphram alpha I get that the answer is $2\pi/3$.
Hint
Assuming that you know how to derive $$\frac1{x^6+1} = \Im\left[\frac1{x^3-i}\right]$$ you could use partial fraction decomposition and obtain $$\frac1{x^3-i}=\frac{x-2 i}{3 \left(x^2-i x-1\right)}-\frac{1}{3 (x+i)}$$ which takes you to much simple integrals.
Added later
The question you asked is related to the integration. Then $$I=\int\frac{dx}{x^3-i}=\int\frac{x-2 i}{3 \left(x^2-i x-1\right)}dx-\int\frac{dx}{3 (x+i)}$$ $$I=\frac16\int\frac{2x- i}{ \left(x^2-i x-1\right)}dx-\frac12\int\frac{i}{ \left(x^2-i x-1\right)}dx-\frac13\int\frac{dx}{ (x+i)}$$ As written, these integrals are very simple. Then, use the bounds; the result is a complex.