## Intermediate Algebra for College Students (7th Edition)

$x^2-x-1+\dfrac{2x+2}{x^2+x+1}$
$\begin{array}{llllllllll} & & x^{2} & -x & -1 & & & \color{red}{ \small{Quotient}} & & \\ & & -- & -- & -- & -- & -- & -- & & \\ x^{2}+x+1 & ) & x^{4} & +0x^{3} & -x^{2} & +0x & +1 & & & \\ & & x^{4} & +x^{3} & +x^{2} & & & \color{red}{\leftarrow \small{ x^{2}(x^{2}+x+1) } } & & \\ & & -- & -- & -- & & & \color{red}{\leftarrow \small{ subtract } } & & \\ & & & -x^{3} & -2x^{2} & +0x & +1 & & & \\ & & & -x^{3} & -x^{2} & -x & & \color{red}{\leftarrow \small{-x(x^{2}+x+1) } } & & \\ & & & -- & -- & -- & & \color{red}{\leftarrow \small{ subtract }} & & \\ & & & & -x^{2} & +x & +1 & & & \\ & & & & -x^{2} & -x & -1 & \color{red}{\leftarrow \small{-x(x^{2}+x+1) } } & & \\ & & & & -- & -- & -- & \color{red}{\leftarrow \small{ subtract }} & & \\ & & & & & 2x & +2 & \color{red}{\leftarrow \small{ Remainder } } & & \end{array}$ $\displaystyle \frac{x^{4}-x^{2}+1}{x^{2}+x+1} = x^2-x-1+\dfrac{2x+2}{x^2+x+1}$