<s>[INST] Using factor theorem on a multivariable function Q: Use the factor theorem to show that $a + b - c$ is a factor of $f(a, b, c) = (a+b+c)^3 - 6(a + b + c)(a^2 + b^2 + c^2) + 8(a^3 + b^3 + c^3)$ and hence factorise completely.
I know that the factor theorem states for $f(x)$ if $f(a) = 0$ then $x-a$ is a factor but when there are multiple variables how do you use factor theorem?
 [/INST] We are given that
$$ f(a,b,c) := (a+b+c)^3 - 6(a+b+c)(a^2+b^2+c^2) + 8(a^3+b^3+c^3).$$
Define three power sum polynomials
$$ p_1(a,b,c) := a+b+c, \quad p_2(a,b,c) := a^2+b^2+c^2, \quad p_3(a,b,c) := a^3+b^3+c^3. $$
Notice that
$$ p_1(a,b,a+b) = 2(a+b), \qquad p_3(a,b,a+b) = (a+b)(2a^2+ab+2b^2). $$
Define a one variable polynomial $\,P(x) := f(a,b,x)\,$
and rewrite  $\,P(a+b) = f(a,b,a+b)\,$ in terms of power sums to get
$$ P(a+b) = 8(a+b)^3 - 12(a+b)(a^2+b^2+(a+b)^2) + 8(a+b)(2a^2+ab+2b^2) $$
which factors further as
$$ P(a+b) = (a+b)\left( 8(a+b)^2 - 12(-2ab+2(a+b)^2) + 
 8(-3ab+2(a+b)^2)\right) $$
and simplify to get
$$ P(a+b) = (a+b)\left( (8-24+16)(a+b)^2 + (24-24)ab \right) = 0. $$
Use the factor theorem to get that $\, P(x) \,$ is divisible
by $\,x-(a+b).\,$ In particular, this implies that $\,P(c) = f(a,b,c)\,$
is divisible by $\,c-(a+b) = -(a+b-c).\,$
</s>