Can someone please tell me why
$$ \frac{x^3+1}{x+1} \neq x^2\;? $$
I thought you could expand the $x^3$ out like so and cancel it out, but I got it wrong on a test and I have not the slightest clue why.
$$ \frac{x\cdot x\cdot x+1}{x+1} $$
I just canceled out the $x+1$ from both the top and the bottom and got $x^2$ but this is wrong somehow?
Thanks for your help.
Order of operations means that you compute $x \cdot x \cdot x$ before adding $1$. It is different from $x \cdot x \cdot (x + 1) = x^2 (x + 1) = x^3 + x^2$.
For an explicit answer, take $x = 0$ and notice that $$\frac{x^3 + 1}{x + 1} = \frac{0^3 + 1}{0 + 1} = \frac{0 + 1}{1} = \frac 1 1 = 1 \ne 0 = 0^2 = x^2.$$ I've included this many many steps so that you can see exactly which operation happens in what order.