I came across an integral problem, it was a solved example, which goes something like this.
$$\int \frac{x^4}{x^2-x+1} dx$$ They straight away factored above integral into $$\int x^2+x - \frac{x}{x^2-x+1}dx$$ and went about solving it but what I found difficult was how did they factored from intital to second form
$$\frac{x^4}{x^2-x+1} \Rightarrow x^2+x+\frac{x}{x^2-x+1}$$
Thanks for your help on this.
$\quad\dfrac{x^4}{x^2-x+1} $
$= \dfrac{x^4-x^3+x^2}{x^2-x+1} +\dfrac{x^3-x^2}{x^2-x+1}$
$= \dfrac{x^4-x^3+x^2}{x^2-x+1} +\dfrac{x^3-x^2+x}{x^2-x+1} - \dfrac{x}{x^2-x+1}$
$=\qquad x^2 \qquad\quad+\qquad x \quad\qquad- \dfrac{x}{x^2-x+1}$