synthetic division
#{:
(,,6,+9,-2,+2,-7),
(+,,,color(white)("X")3,color(white)("X")6,color(white)("X")2,color(white)("X")2),
(,,"----","----","---","----","---"),
(/ (4),"|",6,12,4,4,color(red)((-5))),
(xx (2),"|",color(blue)(3/2),color(blue)(3),color(blue)(1),color(blue)(1),)
:}#
Polynomial long division
#{:
(,,color(blue)(3/2x^3),color(blue)(+3x^2),color(blue)(+x),color(blue)(+1),),
(,,"----","----","----","----","----"),
(4x-2,")",6x^4,+9x^3,-2x^2,+2x,-7),
(,,6x^4,-3x^3,,,),
(,,"----","-----",,,),
(,,,12x^3,-2x^2,,),
(,,,12x^3,-6x^2,,),
(,,,"-----","-----",,),
(,,,,4x^2,+2x,),
(,,,,4x^2,-2x,),
(,,,,"-----","-----",),
(,,,,,4x,-7),
(,,,,,4x,-2),
(,,,,,"----","----"),
(,,,,,,color(red)(-5))
:}#