6. Find $\cos \frac{\pi}{7}+\cos \frac{3 \pi}{7}+\cos \frac{5 \pi}{7}=$
6. Let $x=\cos \frac{\pi}{7}+\cos \frac{3 \pi}{7}+\cos \frac{5 \pi}{7}$,

then
$$
\begin{aligned}
x \cdot \sin \frac{\pi}{7}= & \left(\frac{1}{2} \cdot \sin \frac{2 \pi}{7}-0\right)+\left(\frac{1}{2} \sin \frac{4 \pi}{7}-\frac{1}{2} \sin \frac{2 \pi}{7}\right) \\
& +\left(\frac{1}{2} \sin \frac{6 \pi}{7}-\frac{1}{2} \sin \frac{4 \pi}{7}\right) \\
= & \frac{1}{2} \sin \frac{6 \pi}{7} \\
= & \frac{1}{2} \sin \frac{\pi}{7} .
\end{aligned}
$$

Therefore, $x=\frac{1}{2}$.