Example: divide \(2x^3+3x^2-5x+6\) by \(x+2\).
Step 1: Divide the first term:
\[
2x^3 \div x = 2x^2
\]
Put \(2x^2\) in the quotient.
Step 2: Multiply back:
\[
2x^2(x+2)=2x^3+4x^2
\]
Step 3: Subtract:
\[
(2x^3+3x^2-5x+6)-(2x^3+4x^2)=-x^2-5x+6
\]
Step 4: Repeat:
\[
-x^2 \div x = -x
\]
Put \(-x\) in the quotient, then multiply back:
\[
-x(x+2)=-x^2-2x
\]
Subtract:
\[
(-x^2-5x+6)-(-x^2-2x)=-3x+6
\]
Repeat again:
\[
-3x \div x = -3
\]
Multiply back:
\[
-3(x+2)=-3x-6
\]
Subtract:
\[
(-3x+6)-(-3x-6)=12
\]
\[
\frac{2x^3+3x^2-5x+6}{x+2}=2x^2-x-3+\frac{12}{x+2}
\]