<s>[INST] Find the remainder when $x^{10}+1$ is divided by $(x^2+1)(x^2+x+1)$ Find the remainder when $x^{10}+1$ is divided by $(x^2+1)(x^2+x+1)$
I have done it until the the divisor is of second degree. 
But here the degree of the remainder is $4$
This means the remainder will be of the form.     : $ax^3+bx^2+cx+d$ which makes it difficult to solve. Is it possible to solve $4$ variants with $4$ equations?
 [/INST] Note that: 
$$\frac{x^{10}+1}{(x^2+1)(x^2+x+1)}=\frac{(x^2+1)(x^8-x^6+x^4-x^2+1)}{(\color{green}{x^2+1})(x^2+x+1)}$$
Using long division:
$$
\require{enclose}
\begin{array}{r}
                \color{blue}{x^6-x^5-x^4+2x^3-2x+1}  \\[-3pt]
x^2+x+1 \enclose{longdiv}{x^8-x^6+x^4-x^2+1} \\[-3pt]
     \underline{x^8+x^7+x^6}\phantom{2} \\[-3pt]
                -x^7-2x^6+x^4-x^2+1  \\[-3pt]
     \underline{-x^7-x^6-x^5} \\[-3pt]
                -x^6+x^5+x^4-x^2+1  \\[-3pt]
     \underline{-x^6-x^5-x^4} \\[-3pt]
                2x^5+2x^4-x^2+1  \\[-3pt]
     \underline{2x^5+2x^4+2x^3} \\[-3pt]
                -2x^3-x^2+1  \\[-3pt]
     \underline{-2x^3-2x^2-2x} \\[-3pt]
                x^2+2x+1  \\[-3pt]
     \underline{x^2+x+1} \\[-3pt]
                 \color{red}x  \\[-3pt]
\end{array}
$$
Hence:
$$x^{10}+1=(x^2+1)(x^2+x+1)(\color{blue}{x^6-x^5-x^4+2x^3-2x+1})+\color{red}x(\color{green}{x^2+1}).$$
</s>