I've learned how to divide a polynomial by a binomial by using the long division trick, and although I get how it works, i'd rather use factoring to get the answer. For example: $(3x^2 + 16x -35)/(x + 7)$ = $(3x^2 + 21x -5x -35)/(x + 7)$ = $((3x^2 + 21x) + (-5x - 35)) / (x + 7)$ = $3x(x + 7) -5(x + 7)) / (x + 7)$ = $(3x - 5)(x + 7)) / (x + 7)$ = $(3x - 5)$. It looks complex but that because I typed every step, it's a lot more simple and easy to understand than the long division trick.
However, I am having trouble factoring out the denominator when there would be a remainder if you did the log division way. For example: $(x^4 - 2x^3 - 42x + 20) / (x - 4)$. I can't find any way to factor out $(x - 4)$. In the long division way, you would put the remainder over the denominator, in this case the answer is $x^3 + 2x^2 +8x - 10 + (-20 / (x - 4))$. Any help would be appreciated, thanks.
Just like in the long division method, each step you should ask "by what do I need to multiply $(x - 4)$ to get the leading coefficient"? In the beginning, you can't necessarily factor out $(x-4)$ (because then there would be no remainder) but you can factor out $(x-4)$ modulo powers of $x^3$ and reduce your problem to a problem in which the nominator has a lower degree and so on.
More explicitly, you have
$$ \frac{x^4 - 2x^3 - 42x + 20}{x - 4} = \frac{(x-4)(x^3) + (4x^3 - 2x^3 - 42x + 20)}{x - 4} = x^3 + \frac{2x^3 - 42x + 20}{x - 4} \\ = x^3 + \frac{2x^2(x-4) + 8x^2 - 42x + 20}{x - 4} \\ = x^3 + 2x^2 + \frac{8x^2 - 42x + 20}{x-4} = x^3 + 2x^2 + \frac{8x(x - 4) -10x + 20}{x - 4} \\ = x^3 + 2x^2 + 8x - \frac{10x - 20}{x-4} = x^3 + 2x^2 + 8x - \frac{10(x-4) + 20}{x-4} \\ = x^3 + 2x^2 + 8x - 10 - \frac{20}{x-4}.$$