<s>[INST] triangles and trigonometry A triangle has sides $a,b,c$ and angles $\alpha,\beta,\gamma$ such that:
$$ a \,\cos\beta + b \, \cos\gamma+ c \, \cos\alpha = \frac{a+b+c}{2}$$
Prove that the triangle is isosceles.
I tried writing $\cos$ in terms of the sides (using the cosine theorem),
for example $ \cos\alpha= \frac{a^2-b^2-c^2}{2ab}$. 
I get the following equality:
$a^3(b-c)+b^3(c-a)+c^3(a-b)=0$
Maybe if I use the triangle inequality in a smart way, I can prove it, but I don't know.
 [/INST] To continue your proof, write $$a^3\left(b-c\right)+b^3\left(c-b+b-a\right)+c^3\left(a-b\right)=0$$ which implies $$\left(a^3-b^3\right)\left(b-c\right)=\left(b^3-c^3\right)\left(a-b\right).$$
If $b\neq a$ and $b\neq c$ then we can simplify the equation to $$a^2+ab+b^2=b^2+bc+c^2$$ which is equivalent to $$\left(a-c\right)\left(a+c-b\right)=0.$$ Since $a$, $b$, $c$ are sides of a triangle $a+c-b>0$ and thus we must have $a=c$.
</s>