Why dividing by zero still works Today, I was at a class. There was a question:

If $x = 2 +i$, find the value of $x^3 - 3x^2 + 2x - 1$.

What my teacher did was this:
$x = 2 + i \;\Rightarrow \; x - 2 = i \; \Rightarrow \; (x - 2)^2 = -1 \; \Rightarrow \; x^2 - 4x + 4  = -1 \; \Rightarrow \; x^2 - 4x + 5 = 0 $. Now he divided $x^3 - 3x^2 + 2x - 1$ by $x^2 - 4x + 5$.
The quotient was $x + 1$ and the remainder $x - 6$. Now since $\rm dividend = quotient\cdot divisor + remainder$, he concluded that $x^3 - 3x^2 + 2x - 1 = x-6$ since the divisor is $0$.
Plugging $2 + i$ into $x - 6$, we get $-4 + i$.
But my question is, how was he able to divide by zero in the first place? Why did dividing by zero work in this case?

because he's only dividing by zero when $x$ takes that value (or its conjugate) otherwise he's really just figuring out what the next thing he'll need to multiply is. Yes, it may look a little dodgy, think of this as a sort of back-of-the-envelope calculation. It's only a means to find out the next step and since in the final expression we no longer have this factor in the denominator, everything works out fine.
Think for example of Factorizing $x^2+7x+12$. We can similarly divide by $x+4$ and get a result of $x+3$ to conclude that $x^2+7x+12=(x+4)(x+3)$. While we can only technically divide by $x+4$ if $x\not=-4$, the process still works out fine.
