Đặt $A=cos\frac{\pi }{7} - cos\frac{{2\pi }}{7} + cos\frac{{3\pi }}{7} $. Ta có
$2Asin\frac{\pi}{7} =2sin\frac{\pi}{7}cos\frac{\pi}{7}-2sin\frac{\pi}{7}cos\frac{2\pi}{7}+2sin\frac{\pi}{7}cos\frac{3\pi}{7}$
$=sin\frac{2\pi}{7}-(sin\frac{-\pi}{7}+sin\frac{3\pi}{7})+(sin\frac{-2\pi}{7}+sin\frac{4\pi}{7})$
$=\sin\frac{\pi}{7}+\sin\frac{4\pi}{7}-\sin\frac{3\pi}{7}=\sin\frac{\pi}{7}+2\cos\frac{\pi}{2}\sin\frac{\pi}{14}=\sin\frac{\pi}{7}$
$\Rightarrow A=\frac{1}{2} $