I'm trying to solve this integral:
$$\int \frac{x}{x^3-1}\,\mathrm dx$$
What I did was: $$\int \frac{x}{(x-1)(x^2+x+1)}\,\mathrm dx.$$
$$\frac{x}{(x-1)(x^2+x+1)} = \frac{a}{x-1}+ \frac{bx+c}{x^2+x+1}$$
Then I got this in the numerator:
$$ax^2+ax+a+bx^2-bx+cx-c $$
$$a+b=0;a-b+c=1; a-c=0 $$
$$a=c=\frac{1}3 \qquad b=-\frac{1}3$$
Then I wrote: $$\frac{1}3\int \frac{1}{x-1}\,\mathrm dx-\frac{1}3\int\frac{x-1}{x^2+x+1} \, \mathrm dx$$
so the first one is just $\frac{1}{3}\ln|x-1|$. Which makes my calculations already wrong, most likely.
With the second one I tried a few different things ( involving u-substitution mostly) and got stuck.
I know I'm supposed to get this: $$\frac{1}6\ln \frac{(x-1)^3}{x^2+x+1}+\frac{1}{\sqrt{3}} \arctan\frac{2x+1}{\sqrt{3}}$$
What have I already done wrong? What am I supposed to do?