Write as a long division being sure to include even zero coefficient powers of x
color(white)("XXXxX")underline(color(white)("XXXXXXXXXXXXXXXXXXXX"))
x-1 color(white)("X")")"color(white)("X")x^4color(white)("X")+0x^3color(white)("X")-2x^2color(white)("X")+0xcolor(white)("X")+1
Divide the leading term of the color(red)("divisor") into the leading term of the color(blue)("dividend") and write color(green)("quotient") above the line.
color(white)("XXXxX")underline(color(white)("X")color(green)(x^3)color(white)("XXXXXXXXXXXXXXXXX"))
color(red)(x)-1 color(white)("X")")"color(white)("X")color(blue)(x^4)color(white)("X")+0x^3color(white)("X")-2x^2color(white)("X")+0xcolor(white)("X")+1
Multiply the color(green)("quotient term") just determined and the color(red)("entire divisor"); then subtract the color(brown)("product") from the color(blue)("dividend")
color(white)("XXXxX")underline(color(white)("X")color(green)(x^3)color(white)("XXXXXXXXXXXXXXXXX"))
color(red)(x-1) color(white)("X")")"color(white)("X")color(blue)(x^4color(white)("X")+0x^3)color(white)("X")-2x^2color(white)("X")+0xcolor(white)("X")+1
color(white)("XXXXXX")underline(color(brown)(x^4color(white)("X")-x^3))
color(white)("XXXXXXXXXX")x^3color(white)("X")-2x^2
Repeat this process until all terms of the dividend have been processed.
color(white)("XXXxX")underline(color(white)("X")x^3color(white)("X")+x^2color(white)("XX")-xcolor(white)("XX")-1color(white)("XXXXX"))
x-1 color(white)("X")")"color(white)("X")x^4color(white)("X")+0x^3color(white)("X")-2x^2color(white)("X")+0xcolor(white)("X")+1
color(white)("XXXXXX")underline(x^4color(white)("X")-x^3)
color(white)("XXXXXXXXXX")x^3color(white)("X")-2x^2
color(white)("XXXXXXXXXX")underline(x^3color(white)("Xx")-x^2)
color(white)("XXXXXXXXXXXxXX")-x^2color(white)("X")+0x
color(white)("XXXXXXXXXXXXXx")underline(-x^2color(white)("X")+1x)
color(white)("XXXXXXXXXXXXXXxXXXX")-xcolor(white)("X")+1
color(white)("XXXXXXXXXXXXXXxXXXX")underline(-xcolor(white)("X")+1
color(white)("XXXXXXXXXXXXXXXXXXXxXXXX")0