Remainder of a Polynomial when divided by a polynomial with nonreal roots What will be the remainder when $x^{2015}+x^{2016}$ is divided by $x^2+x+1$ without using the fact that $x^2+x+1$ has roots as non real cube roots of unity.
 A: $$x^3-1=(x-1)(x^2+x+1)=?$$
$$x^{2015}=(x^3)^{671}x^2=?$$
$$x^{2016}=(x^3)^{672}=?$$
A: Hint:  using that $a^3-1=(a-1)(a^2+a+1)$ and so $\,x^{3k}-1=(x-1)(x^2+x+1)(\ldots)\,$:
$$
\big(x^{2016}\color{red}{-1}\big)+\big(x^{2015}\color{red}{-x^2}\big)\color{red}{+1+x^2} \\
 =\left(\left(x^3\right)^{672}-1\right)+x^2\left(\left(x^3\right)^{671}-1\right)+\big(x^2\color{blue}{+ x} + 1\big)\color{blue}{- x}
$$
A: Let $K$ be the base field, and consider the more general problem of finding the remainder $r(x)$ of the division of a polynomial $p(x)\in K[x]$  by $(x-a)(x-b)$ ($a\ne b$) in terms of $p,a$ and $b$.
We know that, dividing $p(x)$ by $x-a$, we obtain
$$p(x)=q(x) (x-a)+p(a),\qquad q(x)\in K[x].\tag1$$
Now dividing $q(x)$ by $x-b$ yields similarly $\;q(x)=q_1(x)(x-b)+q(b)$, so
$$p(x)=q_1(x)(x-a)(x-b)+\underbrace{q(b)(x-a)+p(a)}_{\text{remainder}}.$$ 
Now from $(1)$ we deduce $\;q(b)=\dfrac{p(b)-p(a)}{b-a}$, so
\begin{align}
r(x)&=\frac{p(b)-p(a)}{b-a}(x-a)+p(a)=\frac{\bigl(p(b)-p(a)\bigr)(x-a)+(b-a)p(a)}{b-a}\\[1.5ex]
&=\frac{p(b)(x-a)-p(a)(x-b)}{b-a}=\frac1{b-a}\,\begin{vmatrix}x-a &p(a)\\x-b&p(b)\end{vmatrix}.
\end{align}
