<s>[INST] The partial fraction decomposition of $\dfrac{x}{x^3-1}$ I was trying to decompose $\dfrac{x}{x^3-1}$ into Partial Fractions. I tried the following:
$$\dfrac{x}{(x-1)(x^2+x+1)}=\dfrac{A}{(x-1)}+\dfrac{B}{(x^2+x+1)}$$
$$\Longrightarrow A(x^2+x+1)+B(x-1)=x$$
Putting $x=1,$
$$A(1+1+1)+B(1-1)=1\Rightarrow A=\dfrac{1}{3}$$
$$\Rightarrow\dfrac{1}{3}(x^2+x+1) +B(x-1)=x$$
$$\Rightarrow (x^2+x+1)+3Bx-3B=x$$
$$x^2+(3B+1)x +(1-3B)=x$$
At this point I gave up thinking I must have done something wrong since there is no $x^2$ on the RHS while it is there in the LHS.
I would be truly grateful if somebody would be so kind to help me understand my mistake. Many, many thanks in advance!
 [/INST] $\frac{x}{x^3-1}=\frac{x}{(x-1)(x^2+x+1)}$
$\frac{x}{(x-1)(x^2+x+1)}=\frac{A}{x-1}+\frac{Bx+C}{x^2+x+1}$
$x=A(x^2+x+1)+(Bx+C)(x-1)$
Let $x=1$
$1=A(1^2+1+1)$
$1=3A$
$A=\frac{1}{3}$
So, $x=\frac{1}{3}(x^2+x+1)+(Bx+C)(x-1)$
$x=\frac{1}{3}x^2+\frac{1}{3}x+\frac{1}{3}+Bx^2-Bx+Cx-C$
$x=(\frac{1}{3}+B)x^2+(\frac{1}{3}-B+C)x+\frac{1}{3}-C$
Compare the coefficient, 
$0x^2=(\frac{1}{3}+B)x^2$
$\frac{1}{3}+B=0$, $B=-\frac{1}{3}$
$x=(\frac{1}{3}-B+C)x$
$\frac{1}{3}-B+C=1$
$\frac{1}{3}-(-\frac{1}{3})+C=1$
$C=\frac{1}{3}$
Therefore, 
$$\frac{x}{(x-1)(x^2+x+1)}=\frac{1}{3(x-1)}+\frac{-\frac{1}{3}x+\frac{1}{3}}
{x^2+x+1}$$
Simplify it and get $\frac{1}{3(x-1)}+\frac{1-x}{3(x^2+x+1)}$
</s>