A quartic with remainder four
P(x)=x4+6x3+6x2−12x−12,D(x)=x+2
Use −2 and the coefficients 1, 6, 6, −12, −12.
1 ⟶ 4 ⟶ −2 ⟶ −8 ⟶ 4
Bring down 1. Multiply by −2 and add in the next column each time. The final 4 is the remainder.
x3+4x2−2x−8+x+24,x=−2
The quotient and remainder agree with the long-division work.
P(x)=(x+2)(x3+4x2−2x−8)+4
Multiply back to check all coefficients.