a^2(b-c)+b^2(c-a)+c^2(a-b)
=(a^2b-b^2a)-(a^2c-b^2c)+c^2(a-b)
=ab(a-b)-c(a-b)(a+b)+c^2(a-b)
=(a-b)[ab-c(a+b)+c^2]
=(a-b)(ab-ac-bc+c^2)
=(a-b)[a(b-c)-c(b-c)]
=(a-b)(b-c)(a-c)
a^2(b-c)+b^2(c-a)+c^2(a-b)
=(a^2b-b^2a)-(a^2c-b^2c)+c^2(a-b)
=ab(a-b)-c(a-b)(a+b)+c^2(a-b)
=(a-b)[ab-c(a+b)+c^2]
=(a-b)(ab-ac-bc+c^2)
=(a-b)[a(b-c)-c(b-c)]
=(a-b)(b-c)(a-c)