Question 882930
THE SOLUTION:
{{{highlight(Q(x)=x^2-3x+6)}}} , {{{highlight(R(x)=-5)}}} , and P(x) in the form d(x)*Q(x)+R(x), or
{{{P(x)=d(x)*Q(x)+R(x)}}} , is {{{highlight(P(x)=(x+2)(x^2-3x+6)-5)}}} .
 
THE LONG DIVISION:
The format for long division varies from country to country (and maybe even from teacher to teacher. I will use the format my children were taught in the USA.
The first term of quotient {{{Q(x)}}} is the quotient of the first terms {{{x^3/x=red(x^2)}}} .
Then {{{red(x^2)*d(x)=red(x^2)(x+2)=x^2+2x^2}}} is subtracted from {{{P(x)= x^3-x^2+7}}} .
Subtracting {{{x^2+2x^2}}} is adding {{{(-1)(x^2+2x^2)=-x^2-2x^2}}} ,
and the result is
{{{P(x)+(-x^2-2x^2)=x^3-x^2+7-x^2-2x^2=-3x^2+7}}} .
That is shown below, but I am saving room for terms in {{{x}}} by including the term {{{"0"}}}{{{x}}} .
{{{drawing(400,150,-4,12,-4,2,
line(0,0,0,-1),line(0,0,11,0),
locate(1,0,x^3),locate(2.2,-0.4,"-"),
locate(4,0,x^2),locate(5,-0.4,"+"),
locate(6,-0.4,0),locate(7,-0.4,x),
locate(8,-0.4,"+"),locate(10,-0.4,7),
locate(-2,-0.4,x+2),locate(1,1,red(x^2))
)}}}--->{{{drawing(400,150,-4,12,-4,2,
line(0,0,0,-1),line(0,0,11,0),
locate(1,0,x^3),locate(2.2,-0.4,"-"),
locate(4,0,x^2),locate(5,-0.4,"+"),
locate(6,-0.4,0),locate(7,-0.4,x),
locate(8,-0.4,"+"),locate(10,-0.4,7),
locate(-2,-0.4,x+2),locate(1,1,x^2),
line(0.5,-2,11,-2),locate(-0.2,-1.4,"-"),
locate(1,-1,x^3),locate(2.2,-1.4,"-"),
locate(3,-1.4,2),locate(4,-1,x^2),
locate(2.2,-2.4,"-"),locate(3,-2.4,3),
locate(4,-2,x^2),locate(5,-2.4,"+"),
locate(6,-2.4,0),locate(7,-2.4,x),
locate(8,-2.4,"+"),locate(10,-2.4,7)
)}}}
We continue dividing by {{{x+2}}} the remaining {{{-3x^2+7}}} ,
which I wrote as {{{-3x^2+0x+7}}} to save room for the term in {{{x}}} .
The next term in the quotient, which comes from dividing first terms, is
{{{(-3x^2)/x=red(-3x)}}} .
That term, times the divisor is
{{{(red(-3x))*d(x)=(red(-3x))(x+2)=-3x^2-6x}}} , which must be subtracted from 
{{{-3x^2+7=-3x^2+0x+7}}} .
Subtracting {{{-3x^2-6x}}} is adding {{{(-1)(-3x^2-6x)=3x^2+6x}}} ,
and the result is {{{-3x^2+7+3x^2+6x=6x+7}}} .
{{{drawing(400,200,-4,12,-6,2,
line(0,0,0,-1),line(0,0,11,0),
locate(1,0,x^3),locate(2.2,-0.4,"-"),
locate(4,0,x^2),locate(5,-0.4,"+"),
locate(6,-0.4,0),locate(7,-0.4,x),
locate(8,-0.4,"+"),locate(10,-0.4,7),
locate(-2,-0.4,x+2),locate(1,1,x^2),
line(0.5,-2,11,-2),locate(-0.2,-1.4,"-"),
locate(1,-1,x^3),locate(2.2,-1.4,"-"),
locate(3,-1.4,2),locate(4,-1,x^2),
locate(2.2,-2.4,"-"),locate(3,-2.4,3),
locate(4,-2,x^2),locate(5,-2.4,"+"),
locate(6,-2.4,0),locate(7,-2.4,x),
locate(8,-2.4,"+"),locate(10,-2.4,7),
locate(2.2,0.6,red("-")),locate(3,0.6,red(3)),locate(4,0.6,red(x))
)}}}--->{{{drawing(400,200,-4,12,-6,2,
line(0,0,0,-1),line(0,0,11,0),
locate(1,0,x^3),locate(2.2,-0.4,"-"),
locate(4,0,x^2),locate(5,-0.4,"+"),
locate(6,-0.4,0),locate(7,-0.4,x),
locate(8,-0.4,"+"),locate(10,-0.4,7),
locate(-2,-0.4,x+2),locate(1,1,x^2),
line(0.5,-2,11,-2),locate(-0.2,-1.4,"-"),
locate(1,-1,x^3),locate(2.2,-1.4,"-"),
locate(3,-1.4,2),locate(4,-1,x^2),
locate(2.2,-2.4,"-"),locate(3,-2.4,3),
locate(4,-2,x^2),locate(5,-2.4,"+"),
locate(6,-2.4,0),locate(7,-2.4,x),
locate(8,-2.4,"+"),locate(10,-2.4,7),
locate(2.2,0.6,"-"),locate(3,0.6,3),locate(4,0.6,x),
line(2.5,-4,11,-4),locate(2.2,-3.4,"+"),
locate(3,-3.4,3),locate(4,-3,x^2),
locate(5,-3.4,"+"),locate(6,-3.4,6),locate(7,-3.4,x),
locate(6,-4.4,6),locate(7,-4.4,x),
locate(8,-4.4,"+"),locate(10,-4.4,7)
)}}}
To find the next term of {{{Q(x)}}},
we have to divide the first term of the remaining {{{6x+7}}}
by the first term of divisor {{{d(x)=x+2}}} :
{{{6x/x=red(6)}}} .
So the last term of the quotient will be {{{"+"}}}{{{red(6)}}} ,
and we need to subtract the product
{{{red(6)*d(x)=red*(6)*(x+2)=6x+12}}} from the remaining {{{6x+7}}} .
Since subtracting {{{6x+12}}} is adding {{{(-1)(6x+12)=-6x-12}}} ,
I add {{{-6x-12}}} to that remaining {{{6x+7}}} and find the remainder:
{{{R(x)=6x+7+(-6x-12)=6x+7+-6x-12=highlight(red(-5))}}} :
 
{{{drawing(400,250,-4,12,-8,2,
line(0,0,0,-1),line(0,0,11,0),
locate(1,0,x^3),locate(2.2,-0.4,"-"),
locate(4,0,x^2),locate(5,-0.4,"+"),
locate(6,-0.4,0),locate(7,-0.4,x),
locate(8,-0.4,"+"),locate(10,-0.4,7),
locate(-2,-0.4,x+2),locate(1,1,x^2),
line(0.5,-2,11,-2),locate(-0.2,-1.4,"-"),
locate(1,-1,x^3),locate(2.2,-1.4,"-"),
locate(3,-1.4,2),locate(4,-1,x^2),
locate(2.2,-2.4,"-"),locate(3,-2.4,3),
locate(4,-2,x^2),locate(5,-2.4,"+"),
locate(6,-2.4,0),locate(7,-2.4,x),
locate(8,-2.4,"+"),locate(10,-2.4,7),
locate(2.2,0.6,"-"),locate(3,0.6,3),locate(4,0.6,x),
line(2.5,-4,11,-4),locate(2.2,-3.4,"+"),
locate(3,-3.4,3),locate(4,-3,x^2),
locate(5,-3.4,"+"),locate(6,-3.4,6),locate(7,-3.4,x),
locate(6,-4.4,6),locate(7,-4.4,x),
locate(8,-4.4,"+"),
locate(5,0.6,"+"),locate(6,0.6,red(6)),locate(10,-4.4,7)
)}}}--->{{{drawing(400,250,-4,12,-8,2,
line(0,0,0,-1),line(0,0,11,0),
locate(1,0,x^3),locate(2.2,-0.4,"-"),
locate(4,0,x^2),locate(5,-0.4,"+"),
locate(6,-0.4,0),locate(7,-0.4,x),
locate(8,-0.4,"+"),locate(10,-0.4,7),
locate(-2,-0.4,x+2),locate(1,1,x^2),
line(0.5,-2,11,-2),locate(-0.2,-1.4,"-"),
locate(1,-1,x^3),locate(2.2,-1.4,"-"),
locate(3,-1.4,2),locate(4,-1,x^2),
locate(2.2,-2.4,"-"),locate(3,-2.4,3),
locate(4,-2,x^2),locate(5,-2.4,"+"),
locate(6,-2.4,0),locate(7,-2.4,x),
locate(8,-2.4,"+"),locate(10,-2.4,7),
locate(2.2,0.6,"-"),locate(3,0.6,3),locate(4,0.6,x),
line(2.5,-4,11,-4),locate(2.2,-3.4,"+"),
locate(3,-3.4,3),locate(4,-3,x^2),
locate(5,-3.4,"+"),locate(6,-3.4,6),locate(7,-3.4,x),
locate(6,-4.4,6),locate(7,-4.4,x),
locate(8,-4.4,"+"),
locate(5,0.6,"+"),locate(6,0.6,6),
line(5.1,-6,11,-6),locate(10,-4.4,7),
locate(5.2,-5.4,"-"),locate(6,-5.4,6),locate(7,-5.4,x),
locate(8,-5.4,"-"),locate(9.7,-5.4,12),
locate(9,-6.4,red("-")),locate(10,-6.4,red(5))
)}}}