first one does the division.
second one check to see that the division was done correctly.
in the division section:
step 1 just puts the division into long division format.
any missing exponential terms in the dividend are inserted as 0 * that term.
the missing term in the dividend was x^2, so a + 0x^2 was inserted.
it can be done without doing this, but inserting the missing terms makes the division a little clearer.
step 2 divides the first term in the dividend by the first term in the divisor to get 2x^3 / 2x = x^2.
x^2 is placed in the quotient area.
the whole dividend is multiplied y x^2 and then subtracted from 2x^3 + 0x^2.
the result of the subtraction is in step 3 and the rest of the dividend is brought down as well.
step 4 divides the first term in the result of step 3 by the first term in the divisor to get -x^2 / 2x = -.5x
the -.5x is brought up into the quotient area.
the whole divisor is then multiplied by -.5x to get -x^2 - .5x.
that is then subtracted froom -x^2 - 5x + 40.
step 5 shows the results of the subtraction.
the remaining term from step 3 is brought down as well.
step 6 divides the first term from step 5 by the first term in the divisor to get -4.5x / 2x = -2.25.
the -2.25 is brought up to the quotient area.
the whole divisor is then multiplied by -2.25 to get -4.5x - 2.25 which is then subtracted from the result in step 5.
step 7 shows the result of the subtraction.
since the largest term in step 7 is less than the largest term in the divisor, the division stops and that is the remainder.
the check section:
step one sets up the multiplication of the quotient and the divisor.
step 2 shows the multiplication being performed.
step 3 shows the result of the multiplication.
then the remainder is added.
step 4 shows the result of the multiplication with the remainder added.
since the result is the original equation of the dividend, the division was performed correctly.
here's a reference on long division you might find helpful.