Dividing one polynomial by another How is this done? For example, how would one simplify the following? 
$$\frac{x^3-12x^2+0x-42}{x^2-2x+1}$$ 
I can do it with long division, but it never makes intuitive sense to me. Either an explanation of the long division algorithm or a new way of solving this would be much appreciated.

The long division algorithm is a way of taking the numerator, and split it into multiples of the denominator, separate those out into their own fractions, and simplify away the denominator. For instance, we have $x(x^2 - 2x+1) = x^3-2x^2+x$, so
$$
\frac{x^3 - 12x^2 + 0x-42}{x^2-2x+1} = \frac{(x^3-2x+x) - 10x^2 - 1x-42}{x^2-2x+1}\\
= \frac{x(x^2-2x+1)}{x^2-2x+1} + \frac{-10x^2-1x-42}{x^2-2x+1}\\
= x + \frac{-10x^2-1x-42}{x^2-2x+1}
$$
So now we've gotten an $x$, and we're left with a new fraction where the degree of the numerator has gone down by 1 compared to where we started. We can keep going, as long as the degree of the numerator is larger than or equal to the degree of the denominator, which in this case means one more step. This time, we see that $-10(x^2-2x+1) = -10x^2+20x-10$ so
$$
\frac{-10x^2-1x-42}{x^2-2x+1} = \frac{(-10x^2+20x - 10) -21x-32}{x^2-2x+1}\\
= -10 + \frac{-21x-32}{x^2-2x+1}
$$
At this point the algorithm stops, and we're left with
$$
\frac{x^3 - 12x^2 + 0x-42}{x^2-2x+1} = x + \frac{-10x^2-1x-42}{x^2-2x+1} = x -10 + \frac{-21x-32}{x^2-2x+1}
$$
This is exactly the long division algorithm, written out with regular fraction notation. If you do the long division algorithm the normal way, you will recognize the different numerators all round, but that technique is designed for ease of calculation, not transparency. So it's difficult to tell what is really going on unless you already know.
