TITLE: Factorize $a^2-ab-bc\pm c^2$
QUESTION [5 upvotes]: I got this question in a test but it did not specify the variable with respect to which I was supposed to factorize
$$a^2-ab-bc\pm c^2$$
where it could be just $a(a-b)-c(b\pm c)$ but no common factor over all terms. I feel I may be missing something. The $\pm$ is there because I cannot remember whether the last sign was minus or plus.
Is there some trick to factorize this or is this question vacuous? What does it mean to factorize this?

REPLY [3 votes]: We observe that
\begin{eqnarray}
a^2-ab-bc+c^2&=&a^2+c^2-b(a+c)\\
&=&(a+c)^2-b(a+c)-2ac\\
&=&(a+c)^2-b(a+c)+\frac{b^2}{4}-\frac{b^2+8ac}{4}\\
&=&\left(a+c-\frac{b}{2}\right)^2-\frac{b^2+8ac}{4}.
\end{eqnarray}
Hence, if $b^2+8ac\geq 0$ then
$$
a^2-ab-bc+c^2=\left(a+c-\frac{b}{2}+\sqrt{\frac{b^2+8ac}{4}}\right)\left(a+c-\frac{b}{2}-\sqrt{\frac{b^2+8ac}{4}}\right)
$$