(Formatting copied from another answer by Truong-Son R.)

How do you use synthetic division to divide #(2x^3 + x^2 - 2x + 2) # by #x+2#?

First, you let the coefficients of each degree be used in the division (#2, 1, -2, 2#).

Then, dividing by #x +2# implies that you use #-2# in your upper left (if it was #x-2#, put #2#). So, draw the bottom and right sides of a square, put #-2# inside it, and then write #"2" " 1" " -2" " 2"# to the right.

#"-2" ||# #"2 " "1 " "-2 " "2 "#

#+#

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

First, bring the #2# down to the bottom, and multiply it by the #-2#. Put that #-4# below #1#.

#"-2" ||# #"2 " "1 " "-2 " "2 "#

#+# #"" " " "" "-4"#

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

#"" " " "2"#

Then add it up:

#"-2" ||# #"2 " "1 " "-2 " "2 "#

#+# #"" " " "" "-4"#

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

#"" " " "2" "" " -3"#

Repeat a few times once you've figured out the simple pattern (#"divisor"*"new sum"#, put result under next-lowest degree term, add to get another #"new sum"#, repeat).

#"-2" ||# #"2 " "1 " "-2 " "2 "#

#+# #"" " " "" "-4" "" " 6"#

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

#"" " " "2" "" " -3" "" " 4"#

#"-2" ||# #"2 " "1 " "-2 " "2 "#

#+# #"" " " "" "-4" "" " 6" " -8"#

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

#"" " " "2" "" " -3" "" " 4"" -6"#

You know you can stop when you reach the far right and you have no spot left below the original dividend (#2, 1, -2, 2#). to insert a product.

Since you started with a cubic, the answer is a quadratic. Thus, you have:

#2x^2 -3x + 4# #(r=-6)#

Indeed, if you multiply them together and add the remainder, you get the original back:

#(2x^2 - 3x + 4)(x+2) = 2x^3 - 3x^2 + 4x^2 + 4x - 6x + 8 +(-6) = 2x^3 + x^2 - 2x + 2#

So you would have:

#(2x^3 + x^2 - 2x + 2)/(x+2) = 2x^2-3x+4 + (-6)/(x+2)#

or

#(2x^3 + x^2 - 2x + 2)/(x+2) = 2x^2-3x+4 - 6/(x+2)#