Given: (x^3+2x^2-2x+24)/(x+4)
Consider the denominator x+4
Set x+4=0 =>color(red)(x=-4)
Now we construct the coefficient manipulation.
color(white)("dddd") x^3+2x^2-2x+24
color(white)("ddd")darrcolor(white)("d.d") darrcolor(white)("ddd")darrcolor(white)("ddd")darr
color(red)(-4)|bar(1color(white)("ddd")2color(white)("ddd")-2color(white)("ddd")24
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bring down the first value of color(magenta)(1)
color(red)(-4)|bar(1color(white)("ddd")2color(white)("ddd")-2color(white)("ddd")24
color(white)("d..d")ul(|color(magenta)(darr )
color(white)("dddd")color(magenta)(1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-4xxcolor(magenta)(1)=color(blue)(-4)
Place the color(blue)(-4) under the 2
color(red)(-4)|bar(1color(white)("ddd")2color(white)("ddd")-2color(white)("ddd")24
color(white)("d..d")ul(|color(magenta)(darr )color(white)("d")color(blue)(-4) )
color(white)("dddd")color(magenta)(1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Add the 2 and the color(blue)(-4)
color(red)(-4)|bar(1color(white)("ddd")2color(white)("ddd")-2color(white)("ddd")24
color(white)("d..d")ul(|color(magenta)(darr )color(white)("d")color(blue)(-4) )
color(white)("dddd")color(magenta)(1)color(white)("d")-2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
color(red)(-4)xx" the new "-2=+8
Place the -8 under the -2
color(red)(-4)|bar(1color(white)("dddd")2color(white)("ddd")-2color(white)("ddd")24
color(white)("d..d")ul(|darr color(white)("d")-4color(white)("ddddd")8 )
color(white)("dddd")1color(white)("dd")-2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Add the -2" and the "8
color(red)(-4)|bar(1color(white)("dddd")2color(white)("ddd")-2color(white)("ddd")24
color(white)("d..d")ul(|darr color(white)("d")-4color(white)("ddddd")8 )
color(white)("dddd")1color(white)("dd")-2color(white)("ddddd")6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
color(red)(-4)xx "the new "6 = -24
Place the -24 under the existing +24
Add and you get the 0 so it is an exact division. No remainder.
color(red)(-4)|bar(1color(white)("dddd")2color(white)("ddd")-2color(white)("ddd")24
color(white)("d..d")ul(|darr color(white)("d")-4color(white)("ddddd")8color(white)("ddd")24 )
color(white)("dddd")1color(white)("dd")-2color(white)("ddddd")6color(white)("ddd")0
color(white)("ddd.")darrcolor(white)("ddd")darrcolor(white)("dddd")darr
color(white)("dddd")x^2color(white)("d")-2xcolor(white)("dd")+6