Primitive of $\frac{3x^4-1}{(x^4+x+1)^2}$ How to find primitive of:
$$\frac{3x^4-1}{(x^4+x+1)^2}$$
I am having a faint idea of a type which may or maynot be in the primitve, i.e.:
$$\frac{p(x)}{x^4+x+1}$$
The problem is I am not getting an idea of a substitution to solve this problem.
I might show my work but it is totally useless, atleast in this case.

For reference:


$\bf{My\; Solution::}$ Let $$\displaystyle I = \int\frac{3x^4-1}{(x^4+x+1)^2}dx = \int\frac{3x^4-1}{x^2\cdot \left(x^3+1+x^{-1}\right)^2}dx = \int\frac{(3x^2-x^{-2})}{(x^3+1+x^{-1})^2}dx$$
Now Let $$(x^3+1+x^{-1}) = t\;,$$ Then $$(3x^2-x^{-2})dx = dt$$
So $$\displaystyle I = \int\frac{1}{t^2}dt = -\frac{1}{t}+\mathbb{C} = -\frac{1}{x^3+1+x^{-1}}+\mathbb{C} = -\left(\frac{x}{x^4+x+1}\right)+\mathbb{C}$$
