I have to integrate following expression (but integration is not the problem): $$\frac{x^2+3x-2}{(x-1)(x^2+x+1)^2}$$
It is pretty obvious that: $$\frac{x^2+3x-2}{(x-1)(x^2+x+1)^2}=\frac{A}{x-1} + \frac{Mx+N}{x^2+x+1} + \frac{Px+Q}{(x^2+x+1)^2}$$
The first and the easiest step is to find an $A$: $$A=\frac{x^2+3x-2}{(x^2+x+1)^2}, x=1$$ $$A=\frac{2}{9}$$
And then there comes a problem - I don't know how to do the rest. I tried to multiply the whole thing by $(x^2+x+1)^2$ and differentiate, but it didn't seem to be useful at all, especially because $(x^2+x+1)^2$ doesn't have real roots.
As popping900 suggested. I can take just four different x values and solve system of for equations, but i would like to see a more elegant or shorter solution, if one exists