<s>[INST] Integrate $\int{\frac{1}{x^2-x+1}dx}$ Original question was to integrate $$\int{\frac{(x+1)}{x^2-x+1}dx}$$ 
But I was able to break it into 2 parts: $$\frac{1}{2}\int{\frac{2x-1}{x^2-x+1}dx}+\frac{3}{2}\int{\frac{1}{x^2-x+1}dx} $$ 
The first part $\frac{1}{2}\int{\frac{2x-1}{x^2-x+1}dx}$ could be easily integrated by substituting $u={x^2-x+1}$ and thus, getting $\frac{\ln(x^2-x+1)}{2}$ as the answer. But I have no idea on how to integrate part 2 of the equation.
Any help will be appreciated.
 [/INST] Here is a shorter path, using your own idea to start:
$$\int \frac{x+1}{x^2-x+1}dx = \dfrac{1}{2}\int \frac{(2x - 1) + 3}{x^2-x+1}dx$$
$$= \dfrac{1}{2}\int \frac{2x - 1}{x^2-x+1}dx + \dfrac{3}{2}\int \frac{1}{(x-\frac 1 2)^2 +(\frac{\sqrt{3}}{2})^2 }dx$$
$$= \frac{1}{2}\ln|x^2-x+1| + \frac{3}{2}\cdot \dfrac{2}{\sqrt{3}}\tan^{-1}\left(\dfrac{x-\frac{1}{2}}{\sqrt{3}/2}\right) +C$$ 
</s>