<s>[INST] Calculate $\int \frac{x^4+1}{x^{12}-1} dx$ So I found this problem:

Calculate $$\int \frac{x^4+1}{x^{12}-1} dx$$ where $x\in(1, +\infty)$

and I don't have any ideea how to solve it. I tried to write $$x^{12}-1=(x^6+1)(x+1)(x-1)(x^2+x+1)(x^2-x+1)$$ but with $x^4+1$ I had no idea what to do, an obvious thing would be to add some terms (an $x^5$ would be helpful) and then discard them, but again I couldn't do anything. What should I do? 
 [/INST] You can use that $$x^4+1=(x^2+1)^2-2x^2=…$$
You will get $$\frac{x^4+1}{x^{12}-1}=\frac{-2 x-1}{12 \left(x^2+x+1\right)}-\frac{1}{3 \left(x^2+1\right)}+\frac{2 x-1}{12
   \left(x^2-x+1\right)}+\frac{-x^2-1}{6 \left(x^4-x^2+1\right)}+\frac{1}{6
   (x-1)}-\frac{1}{6 (x+1)}$$
</s>