This requires long division or the shorter method of synthetic division.
set #x-2# equal to #0" "rarr x =2#
Write down the coefficients of the #x# terms in descending order.
#" "2|-1" "6" "2" "-7" "-7#
#" "|ul(" "darrcolor(white)(xxxxxxxxxxxxxxxxxxxxx)#
#color(white)(xxxx)-1" "larr # bring down the #-1#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#" "color(blue)(2)|-1" "6" "2" "-7" "-7#
#" "|ul(" "darr" "color(blue)(-2)" "larr (color(blue)(2xx-1))"
"color(white)(xxxxx)#
#color(white)(xxxxx)color(blue)(-1)" "color(red)(4)" "larr# add #6+(-2)#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Repeat the process:
Multiply #2# outside by the new value at the bottom:
Multiply #color(red)(2xx4=8)# and then add #2+8=color(lime)(10)#
#" "color(red)(2)|-1" "6" "2" "-7" "-7#
#" "|ul(color(white)(xxxxx)-2" "color(red)(8) color(white)(xxxxxxxxxxxx)#
#color(white)(xxxxx)-1" "color(red)(4)" "color(lime)(10)#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Multiply #color(lime)(2xx10=20)# and then add #-7+20 = color(magenta)(13)#
#" "color(lime)(2)|-1" "6" "2" "-7" "-7#
#" "|ul(color(white)(xxxxx)-2" "8 " "color(lime)(20) color(white)(xxxxxxxxxxxx)#
#color(white)(xxxxx)-1" "4" "color(lime)(10)" "color(magenta)(13)#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Multiply #color(magenta)(2xx13=26)# and then add #-7+26 = color(forestgreen)(19)#
#" "color(magenta)(2)|-1" "6" "2" "-7" "-7#
#" "|ul(color(white)(xxxxx)-2" "8 " "20"
"color(magenta)(26) color(white)(xxxxxxxxxxxx)#
#color(white)(xxxx)-1" "4" "10" "color(magenta)(13)" "color(forestgreen)(19)" "larr# the remainder
These are the coefficients of the quotient. #(x^4 div x = x^3)#
#=-x^3+4x^2+10x+13" rem " 19#