<s>[INST] If $a,b,c$ are positive integers, with $a^2+b^2-ab=c^2$ prove that $(a-b)(b-c)\le0$. I have an inequality problem which is as follow:
If $a,b,c$ are positive integers, with $a^2+b^2-ab=c^2$ prove that $(a-b)(b-c)\le0$.
I am not so good in inequalities. So, please give me some hints so that I can proceed.
Thanks.
 [/INST] We have $ a^2+b^2-ab=c^2$, then $ (a-b)^2=c^2-ab\ge 0$. So $ c^2\ge ab $. This implies that at least one of $ c\ge a $ or $ c\ge b $ is true. 
First case: $ c\ge a $. Then $ b^2-ab=b (b-a)=c^2-a^2\ge 0$, so $ b\ge a $. Thus we have $b^2-c^2=ab-a^2=a (b-a)\ge 0$, so $ b\ge c $. Therefore $(a-b)(b-c)\le 0$.
Second case: $ c\ge b$. Then $ a^2-ab=a (a-b)=c^2-b^2\ge 0$, so $ a\ge b $. Hence $(a-b)(b-c)\le 0$.
</s>