$$\int \frac{x^2-1}{x^4+x^3+x^2+x+1} dx$$
My attempt:
$$x^4+x^3+x^2+x+1=[2x^2+(1+\sqrt{5})x+2][2x^2+(1-\sqrt{5})x+2]$$
$$ x^4+x^3+x^2+x+1= \frac{ \frac{-4\sqrt{5}}{5}\cdot x -(\frac{\sqrt{5}}{5}+1) }{2x^2+(1+\sqrt{5})x+2}+ \frac{ \frac{4\sqrt{5}}{5}\cdot x +\frac{\sqrt{5}}{5}-1 }{2x^2+(1-\sqrt{5})x+2}$$
$$\int \frac{x^2-1}{x^4+x^3+x^2+x+1} dx= \int \left[\frac{ \frac{-4\sqrt{5}}{5}\cdot x -(\frac{\sqrt{5}}{5}+1) }{2x^2+(1+\sqrt{5})x+2}+ \frac{ \frac{4\sqrt{5}}{5}\cdot x +\frac{\sqrt{5}}{5}-1 }{2x^2+(1-\sqrt{5})x+2}\right]dx$$
When I try to solve the question after this part, I get the wrong answer every time. I would appreciate it if you could show me how to solve the next part.
Answer:$\frac{1}{\sqrt{5}}\cdot ln \left| \frac{2x^2+(1-\sqrt{5})x+2}{2x^2+(1+\sqrt{5})x+2} \right| + C$