Doing long division is like going to watch Raith Rovers play: you can force yourself do it, but why would you?

I’m not going to show you the long division way. It’s too much fuss to set out, and frankly I can’t be bothered with it. There’s a way I find much easier.

Let’s say you need to work out $\frac{3x^3 - 5x^2 -16x + 12}{x+2}$. First, you check $(x+2)$ is a factor, by putting $x=-2$ in the top: $3(-2)^2 - 5(-2)^2 - 16(-2)+12 = -24 - 20 + 32 + 12 = 0$, so you’re good to go.

Now, the top of the fraction is a cubic (the leading term is in $x^3$) and the bottom is linear (the leading term is in $x$), which means the quotient (i.e., the answer) will be quadratic (in $x^2$). You don’t know what quadratic, so let’s call it $ax^2 + bx + c$.

$\frac{3x^3 - 5x^2 -16x + 12}{x+2} \equiv ax^2 + bx + c$

You can multiply both sides by $x+2$ to get:

$3x^3 - 5x^2 -16x + 12 \equiv (ax^2 + bx + c)(x+2)$, or $3x^3 - 5x^2 -16x + 12 \equiv ax^3 + (b+2a)x^2 + (c+2b)x + 2c$

### What’s with the triple equals sign?

I fear that’s a slight abuse of notation ((Experts: is it?)). It means the left hand side is equivalent to the right - no matter what value of $x$ you put in, it holds true. In particular, it means we can equate coefficients - we need to have the same number of $x^3$s on each side, the same number of $x^2$s, and so on.

Here, that means:

$3 = a$ $-5 = b+2a$ $-16 = c+2b$ $12 = 2c$

You can see right off, $a=3$ (first equation) and $c=6$ (last equation). Subbing those in the middle two equations:

$-5 = b + 6$ $-16 = 6 + 2b$

In both cases, $b=-11$.

The quotient, then, is $3x^2 - 11x + 6$ (which factorises as $(3x - 2)(x-3)$, since you asked nicely).

I like this method much better than mechanical long division - I’m prone to losing minus signs in that method - and recommend you give it a shot if you’re struggling.