<s>[INST] If, in a triangle, $\cos(A) + \cos(B) + 2\cos(C) = 2$ prove that the sides of the triangle are in AP By using the formula : 
$$
\cos(A)+\cos(B)+\cos(C) = 1 + 4 \sin\left(\frac{A}{2}\right)\sin\left(\frac{B}{2}\right) \sin\left(\frac{C}{2}\right)
$$
I've managed to simplify it to : 
$$
2\sin\left(\frac{A}{2}\right)\sin\left(\frac{B}{2}\right)=\sin\left(\frac{C}{2}\right)$$
But I have no idea how to proceed. 
 [/INST] Hint:
Prosthaphaeresis Formulas: $\cos A+\cos B=2\cos\dfrac{A+B}2\cos\dfrac{A-B}2$
Double angle formula: $1-\cos C=2\sin^2\dfrac C2$
$\dfrac{A+B}2=\dfrac\pi2-\dfrac C2\implies\cos\dfrac{A+B}2=\sin\dfrac C2$
As $0<c<\pi, \sin\dfrac C2\ne0$
So, we have $\cos\dfrac{A-B}2=2\cos\dfrac{A+B}2$
Expand $\cos\dfrac{A\pm B}2$ and divide both sides by $\cos\dfrac A2\cos\dfrac B2$
Finally, we have $\tan\dfrac A2=\sqrt{\dfrac{(s-b)(s-c)}{s(s-a)}}$  where $2s=a+b+c$
</s>