<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] Use $$x^6+1=(x^2+1)(x^4-x^2+1)$$
$$I={\displaystyle\int}\dfrac{x^4+1}{\left(x-1\right)\left(x+1\right)\left(x^2+1\right)\left(x^2-x+1\right)\left(x^2+x+1\right)\left(x^4-x^2+1\right)}\,\mathrm{d}x$$
Apply partial Factor decomposition you get
$$I={\displaystyle\int}\left(-\dfrac{x^2+1}{6\left(x^4-x^2+1\right)}-\dfrac{2x+1}{12\left(x^2+x+1\right)}+\dfrac{2x-1}{12\left(x^2-x+1\right)}-\dfrac{1}{3\left(x^2+1\right)}-\dfrac{1}{6\left(x+1\right)}+\dfrac{1}{6\left(x-1\right)}\right)\mathrm{d}x$$
$$I=-\class{steps-node}{\cssId{steps-node-1}{\dfrac{1}{6}}}{\displaystyle\int}\dfrac{x^2+1}{x^4-x^2+1}\,\mathrm{d}x-\class{steps-node}{\cssId{steps-node-2}{\dfrac{1}{12}}}{\displaystyle\int}\dfrac{2x+1}{x^2+x+1}\,\mathrm{d}x+\class{steps-node}{\cssId{steps-node-3}{\dfrac{1}{12}}}{\displaystyle\int}\dfrac{2x-1}{x^2-x+1}\,\mathrm{d}x-\class{steps-node}{\cssId{steps-node-4}{\dfrac{1}{3}}}{\displaystyle\int}\dfrac{1}{x^2+1}\,\mathrm{d}x-\class{steps-node}{\cssId{steps-node-5}{\dfrac{1}{6}}}{\displaystyle\int}\dfrac{1}{x+1}\,\mathrm{d}x+\class{steps-node}{\cssId{steps-node-6}{\dfrac{1}{6}}}{\displaystyle\int}\dfrac{1}{x-1}\,\mathrm{d}x$$
</s>