Setup the coefficients of the dividend #color(brown)(2)x^3color(brown(-1)x^2color(brown)(+5)xcolor(brown)(-12)#
and the divisor #color(blue)(2)x- color(red)(+3)#
as indicated below:
#{:
(, " | ", color(brown)(2), color(brown)(-1),color(brown)(+5), color(brown)(-12)),
( ," | ", , , ,),
("-----------","-+-","-----","-----","-----","-----"),
(/color(blue)(2) ," | ", , , , ),
(color(white)("XXX")color(red)(+3), " | ", , , , )
:}#
"Bring down" the first coefficient of the dividend and divide it by the first coefficient of the divisor (as shown
#{:
( , " | ", color(brown)(2), -1, +5, -12),
( , " | ", , , , ),
("-----------","-+-","-----","-----","-----","-----"),
(color(blue)(/2) , " | ", color(brown)(2), , , ),
(color(white)("XXX")+3, " | ", color(white)("X")color(blue)(1), , , )
:}#
Multiply the result just calculated by the second coefficient of the divisor and copy the product under the second coefficient of the dividend..
Add the two numbers in the column for the second dividend coefficient
#{:
( , " | ", 2, color(blue)( -1), +5, -12),
( , " | ", , color(white)("X")color(red)(3), , ),
("-----------","-+-","-----","-----","-----","-----"),
(/2 , " | ", 2, color(white)("X")color(blue)(2), , ),
(color(white)("XXX")color(red)(+3) , " | ", color(white)("X")color(red)(1) , , , )
:}#
Divide the sum just calculated by the first coefficient of the divisor and write the result as shown
#{:
( , " | ", 2, -1, +5, -12),
( , " | ", , color(white)("X")3, color(white)("X") 3, color(white)("X") 12),
("-----------","-+-","-----","-----","-----","-----"),
(color(blue)(/2) , " | ", 2, color(white)("X")color(blue)(2), , ),
(color(white)("XXX")+3 , " | ", color(white)("X")1, color(white)("X")color(blue)(1), , )
:}#
Multiply the result just calculated by the second coefficient of the divisor and copy the product under the third coefficient of the dividend..
Add the two numbers in the column for the third dividend coefficient.
Continue this process until you get:
#{:
( , " | ", 2, -1, +5, -12),
( , " | ", , color(white)("X")3, color(white)("X") 3, color(white)("X") 12),
("-----------","-+-","-----","-----","-----","-----"),
(/2 , " | ", 2, color(white)("X")2, color(white)("X") 8, color(cyan)( 0)),
(color(white)("XXX")+3 , " | ", color(white)("X")color(green)(1), color(white)("X")color(green)(1), color(white)("X")color(green)(4), )
:}#
Result:#color(green)(1)x^2+color(green)(1)x+color(green)(4)# with a remainder of #color(cyan)(0)#