# (3x^4+5x^3-x^2+x-2)/(x-2)#

There are various ways of writing the details Here's one way.

#" " " "##--------#

#x-2 )# #3x^4# #+5x^3# #-x^2# #+x# #-2#

What do we need to multiply the first term on the divisor (#x#) by to get the first term of the dividend (#3x^4#)? Clearly, we need to multiply by #3x^3#

#" " " " " " "3x^3#

#" " " "##--------#

#x-2 )# #3x^4# #+5x^3# #-x^2# #+x# #-2#

Now multiply #3x^3# times the divisor, #x-2#, to get #3x^4-6x^3# and write that under the dividend.

#" " " " " " "3x^3#

#" " " "##--------#

#x-2 )# #3x^4# #+5x^3# #-x^2# #+x# #-2#

# " "" "" " # #3x^4# #-6x^3#

#" " " " ##-----#

Now we need to subtract #3x^4-6x^3# from the dividend. (You may find it simpler to change the signs and add.)

#" " " " " " "" "3x^3#

#" " " "##--------#

#x-2 )" "# #3x^4# #+5x^3# #-x^2# #+x# #-2#

#" " " "# #color(red)(-)3x^4color(red)(+)6x^3#

#" "" "" "##-----#

#" "" "" "" "" "# #11x^3##-x^2# #+x# #-2#

Now, what do we need to multiply #x# (the first term of the divisor) by to get #11x^3# (the first term of the last line)? We need to multiply by #11x^2#

So write #11x^2# on the top line, then multiply #11x^2# times the divisor #x-2#, to get #11x^3-22x^2# and write it underneath.

#" " " " " " "" "3x^3# #+11x^2#

#" " " "##--------#

#x-2 )" "# #3x^4# #+5x^3# #-x^2# #+x# #-2#

#" " " "# #color(red)(-)3x^4color(red)(+)6x^3#

#" "" "" "##-----#

#" "" "" "" "" "# #11x^3##-x^2# #+x# #-2#

#" "" "" "" "" "# #11x^3##-22x^2#

#" " " "" "" "##------#

Now subtract (change the signs and add), to get:

#" " " " " " "" "3x^3# #+11x^2#

#" " " "##--------#

#x-2 )" "# #3x^4# #+5x^3# #-x^2##" "# #+x# #-2#

#" " " "# #color(red)(-)3x^4color(red)(+)6x^3#

#" "" "" "##-----#

#" "" "" "" "" "# #11x^3##-x^2##" "# #+x# #-2#

#" "" "" "" "# #color(red)(-)11x^3##color(red)(+)22x^2#

#" " " "" "" "##------#

#" "" "" "" "" "" "" "" " # #21x^2# ## #+x# #-2#

Repeat to get #21x#, so we put the #9# on top multiply, subtract (change signs and add) to get:

#" " " " " " "" "3x^3# #+11x^2# #+21x#

#" " " "##--------#

#x-2 )" "# #3x^4# #+5x^3# #-x^2##" "# #+x# #-2#

#" " " "# #color(red)(-)3x^4color(red)(+)6x^3#

#" "" "" "##-----#

#" "" "" "" "" "# #11x^3##-x^2##" "# #+x# #-2#

#" "" "" "" "# #color(red)(-)11x^3##color(red)(+)22x^2#

#" " " "" "" "##------#

#" "" "" "" "" "" "" "" " # #21x^2# ## #+x##" "# #-2#

#" "" "" "" "" "" "" "# #color(red)(-)21x^2# #color(red)(+)42x#

#" " " "" "" "" "" "##--------#

#" "" "" "" "" "" "" "" "" "" "" "##43x# #-2#

We'll be done when the last line is #0# or has degree **less than** the degree of the divisor. Which has not happened yet, but we're close.

#" " " " " " "" "3x^3# #+11x^2# #+21x# #+43#

#" " " "##--------#

#x-2 )" "# #3x^4# #+5x^3# #-x^2##" "# #+x# #-2#

#" " " "# #color(red)(-)3x^4color(red)(+)6x^3#

#" "" "" "##-----#

#" "" "" "" "" "# #11x^3##-x^2##" "# #+x# #-2#

#" "" "" "" "# #color(red)(-)11x^3##color(red)(+)22x^2#

#" " " "" "" "##------#

#" "" "" "" "" "" "" "" " # #21x^2# ## #+x##" "# #-2#

#" "" "" "" "" "" "" "# #color(red)(-)21x^2# #color(red)(+)42x#

#" " " "" "" "" "" "##--------#

#" "" "" "" "" "" "" "" "" "" "" "##43x# #-2#

#" "" "" "" "" "" "" "" "" "" "##color(red)(-)43x# #color(red)(+)86#

#" " " "" "" "" "" "##--------#

#" "" "" "" "" "" "" "" "" "" "" "" "" "" "# #84#

Now the last line has degree less than #1#, so we are finished.

The quotient is: #3x^3+11x^2+21x+43# and the remainder is #84#

We can write:

# (3x^4+5x^3-x^2+x-2)/(x-2)= 3x^3+11x^2+21x+43 + 84/(x-2)#

IMPORTANT to understanding what we have done:

If we get a common denominator on the right and simplify we will get exactly the left side.