Let $$f(x)=\int\frac{x^7+2}{(x^2+x+1)^2}dx$$ subject to $f(0)=\displaystyle\frac{\pi}{3\sqrt3}.$ Find $|f(-1)|.$
Now I rewrote the integral as $$\int\frac{x(x-1)(x^3-1+2)}{x^2+x+1}+\frac{x+2}{(x^2+x+1)^2}dx$$ and then solved it painstakingly. I cannot even write the whole solution as it is too big and I'm somewhat lazy.
I want to know another approach towards this problem that is concised and less lengthy. Any help is greatly appreciated.
Suggestions: Partial fractionalize the integrand as $$\frac{x^7+2}{(x^2+x+1)^2}=x^3-2x^2+x+2-\frac{4x+1}{x^2+x+1}+\frac{1-x^2}{(x^2+x+1)^2} $$ and then integrate piecewise. In particular \begin{align} &\int \frac{1-x^2}{(x^2+x+1)^2}dx= \frac x{x^2+x+1}\\ &\int \frac{4x+1}{x^2+x+1}dx= 2\ln(x^2+x+1)-\frac2{\sqrt3}\tan^{-1}\frac{2x+1}{\sqrt3}\\ \end{align} As a result $$f(-1)-f(0)=\int_0^{-1}\frac{x^7+2}{(x^2+x+1)^2}dx=-\frac{19}{12}-\frac{2\pi}{3\sqrt3}$$