x(x+2)^2 - (x-1)(x^2+x+1)

Check the final answer first, then review the worked steps.

Answer

\(4x^2+4x+1\)

Work

x(x+2)^2 - (x-1)(x^2+x+1) = x(x^2+4x+4) - (x^3-1) = x^3+4x^2+4x - x^3 + 1 = 4x^2+4x+1

Step-by-step solution

Expand $x(x+2)^2$ as $x(x^2+4x+4) = x^3+4x^2+4x$ and subtract the difference of cubes $(x-1)(x^2+x+1) = x^3-1$. The result is $(x^3+4x^2+4x) - (x^3-1) = 4x^2+4x+1$.