<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] From : 
$$
\cos(A)+\cos(B)+2\cos(C)=2
\\
\implies \cos(A)+\cos(B)=2-2\cos(C)
\\
\implies \cos(A)+\cos(B)=2[1-\cos(C)]
\\
\\\implies \cos(A)+\cos(B)=4\sin^2\left(\frac{C}{2}\right)
$$
Using Prosthaphaeresis Formulas : 
$$
\cos A+\cos B=2\cos\dfrac{A+B}2\cos\dfrac{A-B}2
$$
And substituting this formula in the first equation, we have :
$$
2\cos\dfrac{A+B}2\cos\dfrac{A-B}2=4\sin^2\left(\frac{C}{2}\right)
$$
Since 
$A+B+C=\pi$
$$
\frac{A+B}{2}=\frac{\pi}{2}-\frac{C}{2}
$$
Taking cosines on both sides :
$$
\cos\left(\frac{A+B}{2}\right)=\cos\left(\frac{\pi}{2}-\frac{C}{2}\right)=\sin\left(\frac{C}{2}\right)
$$
Using this :
$$
2\cos\dfrac{A+B}2\cos\dfrac{A-B}2=4\cos^2\left(\frac{A+B}{2}\right)
\\
\implies \cos\dfrac{A-B}2=2 \cos\dfrac{A+B}2
$$
Multiplying both sides by $2\sin\dfrac{A+B}2$ :
$$
2\sin\dfrac{A+B}2\cos\dfrac{A-B}2=4\sin\dfrac{A+B}2\cos\dfrac{A+B}2
$$
Using Another Prosthaphaeresis Formula :
$$
\sin A+\sin B=2\sin\dfrac{A+B}2\cos\dfrac{A-B}2
$$
Applying the reverse in the obtained equation, we get :
$$
\sin A+\sin B=2\sin\dfrac{A+B}2\cos\dfrac{A-B}2=4\sin\dfrac{A+B}2\cos\dfrac{A+B}2
$$
Using the sine double angle formula $2\sin(\alpha)\cos(\alpha)=\sin(2\alpha)$ :
$$
\sin A+\sin B=2\sin(A+B)=2\sin C
\\
\implies \sin A + \sin B = 2\sin C
$$
Using the sine rule :
$$
a + b = 2c
$$
Hence, the sides of the triangle are in A.P. 
</s>