These are difficult to answer because of the way that progressive steps have to be demonstrated and the high level of formatting needed.
The principle is that you progressively divide the highest value in the denominator into each of the 'element' of the numerator. In each instance of division a remainder results. This remainder is then combined with the next 'element' in the numerator and so on.
The process is the same as that adopted for numeric long division.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#color(blue)("Starting point")# #" "x+1bar(|-3x^3+9x^2-12x+4)#
#color(blue)("Step 1")#
Using the #x# from #x+1#
#-3x^3 -: x =color(green)(-3x^2)#
Now write:
#" "color(green)(-3x^2)#
#" "x+1bar(|-3x^3+9x^2-12x+4)#
But #-3x^2xx(x+1) =color(red)( -3x^3 -3x^2)#
Now write:
#" "color(green)(-3x^2)#
#" "x+1bar(|-3x^3+9x^2-12x+4)#
#" "underline(color(red)( -3x^3 -3x^2))#
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#color(blue)("Step 2")#
Carry out the subtraction giving #color(green)(12x^2)#
#" "-3x^2#
#" "x+1bar(|-3x^3+9x^2-12x+4)#
#" "underline( -3x^3 -3x^2)#
#" "0+color(green)(12x^2)#
Bring down the #color(red)(-12x)#
#" "-3x^2#
#" "x+1bar(|-3x^3+9x^2color(red)(-12x)+4)#
#" "underline( -3x^3 -3x^2)#
#" "0+12x^2color(red)(-12x)#
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#color(blue)("Step 3")#
The left most value now is #+12x^2#
Using the #x# from #x+1#
#+12x^2-:x =color(green)( +12x)#
Write:
#" "-3x^2color(green)( +12x)#
#" "x+1bar(|-3x^3+9x^2-12x+4)#
#" "underline( -3x^3 -3x^2)#
#" "0+12x^2-12x#
#color(green)(12x) xx(x+1)=color(red)(12x^2+12x)#
Write:
#" "-3x^2color(green)( +12x)#
#" "x+1bar(|-3x^3+9x^2-12x+4)#
#" "underline( -3x^3 -3x^2)#
#" "0+12x^2-12x#
#" "underline(color(red)(12x^2+12x))#
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#color(blue)("Step 4")#
Do the subtraction and bring down the #color(red)(+4)#
#" "-3x^2 +12x#
#" "x+1bar(|-3x^3+9x^2-12xcolor(red)(+4))#
#" "underline( -3x^3 -3x^2)#
#" "0+12x^2-12x#
#" "underline(12x^2+12x) " "#carry out the subtraction
#" "0" "color(green)(-24x)color(red)(+4)" bring down the "color(red)(+4)#
Using the #x# from #(x+1)" "color(green)(-24x)-:x=color(blue)(-24)#
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#color(blue)("Step 5")#
#" "-3x^2 +12xcolor(blue)(-24)#
#" "x+1bar(|-3x^3+9x^2-12x+4)#
#" "underline( -3x^3 -3x^2)#
#" "0+12x^2-12x#
#" "underline(12x^2+12x) #
#" "0" "-24x+4#
#color(blue)((-24))xx (x+1) = color(red)(-24x-24)#
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#color(blue)("Step 6")#
#" "-3x^2 +12xcolor(blue)(-24)#
#" "x+1bar(|-3x^3+9x^2-12x+4)#
#" "underline( -3x^3 -3x^2)#
#" "0+12x^2-12x#
#" "underline(12x^2+12x) #
#" "0" "-24x+4#
#" "underline(color(red)(-24x-24))#
Subtracting gives#" "0+28#
The final remainder is 28 so the answer is:#-3x^2+12x-24 +28/(x+1)#