# Let $0 \le a, b, c \le 5$ be integers. For how many ordered triples $(a,b,c)$ is $a^2b+b^2c+c^2a-ab^2-bc^2-ca^2 = 0$?

Let $0 \le a, b, c \le 5$ be integers. For how many ordered triples $(a,b,c)$ is $a^2b+b^2c+c^2a-ab^2-bc^2-ca^2 = 0$?

I'm trying to see how I can find the ordered triples that satisfy this equation and I don't see how to do it other than guesswork. Maybe I can regroup some terms and factor to simplify.

$a^2b + b^2c +c^2a - ab^2 -bc^2 - ca^2 = 0\implies (b-c)a^2 -(b^2-c^2)a + bc(b-c) = 0\implies (b-c)(a^2 - a(b+c)+bc) = 0\implies (b-c)(a-b)(a-c) = 0$. Can you finish it? This is nowhere a solution, but you are fairly close to it at this point.

HINT

While not nearly as elegant as DeepSea's Hint/solution, another way to go about this is to graph the expression as here. $a$ is the x value and $b,c$ are sliders. (Note that the graph initially has $b=c=0$ which causes the expression to be zero for all values of $a$, hence a horizontal line coincident with the X axis). There are 36 combinations of $b,c$ to examine, but that only takes a couple of minutes. You'll see the same set of solutions implied by DeepSea's answer.

$a^2b + b^2c + c^2a - ab^2- bc^2 - ca^2 = 0$

$c^2(a-b) + c(b^2 - a^2) + (a^2b - ab^2) = 0$

Case 1: $a = b$ then $c$ could be any value.

Case 2: $a \ne b$ then

$c^2 - c(a+ b) +ab = 0$. ($(a-b) \ne 0$)

$c = \frac {(a+b) \pm \sqrt {(a+b)^2 - 4ab}}{2} =\frac {(a+b) \pm \sqrt{a^2 + 2ab +b^2 - 4ab}}2= \frac {(a+b) \pm \sqrt{a^2 - 2ab + b^2}}2 = \frac {(a+b) \pm (a-b)}2 = \{a, b\}$.

So if $a\ne b$ then either $c = a$ or $c=b$.

In other words...

Any triple in which at least two of the $a,b,c$ are equal will be a solution and nothing else will be.

So solutions are $(a,b,c) = (x,x,x), (x,x,y),(x,y,x),(y,x,x)$ for any $x,y$

..... Which so for as I can tell is true for all reals; not just the integers between $0$ and $5$.