Divide...
1. x^3+2x^2+x+12/x+3
2. 45a^6b^10/5a^3b^2
Note that x^3+2x^2+x+12 is zero for
x = -3, therefore
(x^3+2x^2+x+12)/(x+3) has no remainder. You can divide using long division, but this is not the preferred method if you are doing the calculation by hand. If you make an error, you'll usually have to start all over again. The following method is more transparant. We put:
x^3+2x^2+x+12 = (a x^2 + b x + c) (x+3)
Work out the right hand side:
(a x^2 + b x + c) (x+3) =
a x^3 + (3 a + b) x^2 + (c + 3 b)x + 3 c
Equate the coefficients of the powers of x on both sides.
Equating coefficient of x^3 yields:
a = 1 (1)
Equating coefficient of x^2 yields:
3 a + b = 2 (2)
Equating coefficient of x yields:
c + 3 b = 1 (3)
Equating constant term yields:
3 c = 12 (4)
Inserting (1) in (2) gives:
b = -1
(4) implies that c = 4 and we see that (3) is already satisfied. The fact that there is an extra equation that is automatically satisfied has to do with the fact that the remainder is zero. If you write down the equation:
x^3+2x^2+x+12 = (a x^2 + b x + c) (x+q)
for arbitrary q, then this can only be valid if the remainder is zero. If you then proceed as above then you can rearrange the four equations into three equations for a b and c and one that says that q^3+2q^2+q+12 = 0, i.e. that q is a zero of the polynomial and that the remainder is thus zero.