# How do you divide \frac{x^4-2x}{8x+24}?

It's $\frac{{x}^{3} - 3 {x}^{2} + 9 x - 29}{8}$, with remainder $87$.
First way to do it is a standard long division algorithm, I guess you know that. In short, you divide ${x}^{4}$ with $8 x$ (getting ${x}^{3} / 8$), then multiply that with $8 x + 24$ (getting ${x}^{4} + 3 {x}^{3}$), and subtract that from ${x}^{4} - 2 x$ (getting $- 3 {x}^{3} - 2 x$). Then you do the same thing with that result instead of starting numerator, until you get a single number that cannot be divided by $8 x$ - and that number is $87$.
Second way is more interesting, and uses Horner's algorithm. It's easier to apply, but harder to see why it works. It works only when denominator is $x - \alpha$ for some $\alpha$, so we'll divide by $x + 3$ ($\alpha$ being $- 3$), and then divide by $8$ separately.
You make a table with $1 , 0 , 0 , - 2 , 0$ (coefficients of numerator) in the first row, and in the second row, drop $1$, multiply by $\alpha \left(= - 3\right)$ and add $0$ (getting $- 3$, then multiply that by $\alpha$ and add next $0$ (getting $9$), multiply that by $\alpha$ and add $- 2$ (getting $- 29$), and multiply that by $\alpha$ and add the last $0$ (getting $87$). Entries except the last in the second row are the coefficients of quotient (remember that they still have to be divided by 8), and the last entry is the remainder.