Remainder of division of two functions The remainder of the division of $x^3$ by $x^2-x+1$.
I tried doing the traditional simplifying put the answer cannot be a number. The result expected is -1 but I can't seem to reach it.
 A: Hint $\,\ {\rm mod}\,\ x^2\!-\!x\!+\!1\!:\,\ \color{#c00}{x^2\equiv x\!-\!1}\,\Rightarrow\, x(\color{#c00}{x^2})\,\equiv\, x(\color{#c00}{x\!-\!1})\,\equiv\, \color{#c0d}{x^2}\!-x\,\equiv\, (\color{#c0d}{x\!-\!1})-x\,\equiv\, -1$
Remark $\ $ Essentially we rearranged the polynomial to obtain a rewrite rule $\, x^2 \mapsto x\!-\!1,\ $ which, applied iteratively to any polynomial $\,f(x),\,$ allows us to eliminate all powers of $\,x\,$ greater than $1$, resulting in a polynomial $\bar f(x)$ of degree $\,\le 1\,$ such that $\,\bar f (x) \equiv f(x)\pmod{x^2\!-\!x\!+\!1}.\,$ Therefore $\,\bar f(x)\,$  is the sought remainder (by the uniqueness of the remainder in the Division Algorithm). 
This method of modular arithhmetical computation of remainders works very generally, and it is often more convenient than rote applicaton of the polynomial Division Algorithm. Further, it generalizes to multivariate polynomials - see the Grobner basis algorithm and related methods.
A: Hint: Note that $x^3+1=(x+1)(x^2-x+1)$.  
Alternately and somewhat more painfully, we could use polynomial division. 
