Example 6 Find the value of $\cos ^{5} \frac{\pi}{9}+\cos ^{5} \frac{5 \pi}{9}+\cos ^{5} \frac{7 \pi}{9}$.
Let $\left(x_{1}, x_{2}, x_{3}\right)$
$$
=\left(\cos \frac{\pi}{9}, \cos \frac{5 \pi}{9}, \cos \frac{7 \pi}{9}\right) \text {. }
$$

To reduce the degree, first calculate the basic symmetric polynomials of $x_{1}, x_{2}, x_{3}$
$$
\begin{array}{l}
\left(\sigma_{1}, \sigma_{2}, \sigma_{3}\right) \\
=\left(x_{1}+x_{2}+x_{3}, x_{1} x_{2}+x_{2} x_{3}+x_{3} x_{1}, x_{1} x_{2} x_{3}\right) .
\end{array}
$$

Notice that
$$
\begin{aligned}
\sigma_{1}= & \cos \frac{\pi}{9}+2 \cos \frac{6 \pi}{9} \cdot \cos \frac{\pi}{9} \\
= & \cos \frac{\pi}{9}-\cos \frac{\pi}{9}=0, \\
\sigma_{2}= & \frac{1}{2}\left(\cos \frac{6 \pi}{9}+\cos \frac{4 \pi}{9}\right)+ \\
& \frac{1}{2}\left(\cos \frac{12 \pi}{9}+\cos \frac{2 \pi}{9}\right)+\frac{1}{2}\left(\cos \frac{8 \pi}{9}+\cos \frac{6 \pi}{9}\right) \\
= & \frac{1}{2}\left(-\frac{3}{2}+\cos \frac{4 \pi}{9}+\cos \frac{2 \pi}{9}-\cos \frac{\pi}{9}\right) \\
= & -\frac{3}{4}, \\
\sigma_{3}= & \frac{\sin \frac{2 \pi}{9}}{2 \sin \frac{\pi}{9}} \cdot \frac{\sin \frac{10 \pi}{9}}{2 \sin \frac{5 \pi}{9}} \cdot \frac{\sin \frac{14 \pi}{9}}{2 \sin \frac{7 \pi}{9}}=\frac{1}{8} .
\end{aligned}
$$

Therefore, $\left(\sigma_{1}, \sigma_{2}, \sigma_{3}\right)=\left(0,-\frac{3}{4}, \frac{1}{8}\right)$.
Hence, $x_{1}, x_{2}, x_{3}$ are the roots of the cubic equation $x^{3}-\frac{3}{4} x-\frac{1}{8}=0$.
$$
\text { Let } S_{n}=\cos ^{n} \frac{\pi}{9}+\cos ^{n} \frac{5 \pi}{9}+\cos ^{n} \frac{7 \pi}{9}\left(n \in \mathbf{N}_{+}\right) \text {. }
$$

By Newton's formulas, we get
$$
\begin{array}{l}
S_{1}=\sigma_{1}=0, \\
S_{2}=\sigma_{1} S_{1}-2 \sigma_{2}=-2 \sigma_{2}=\frac{3}{2}, \\
S_{3}=\sigma_{1} S_{2}-\sigma_{2} S_{1}+3 \sigma_{3}=3 \sigma_{3}=\frac{3}{8}, \\
S_{4}=\sigma_{1} S_{3}-\sigma_{2} S_{2}+\sigma_{3} S_{1}=-\frac{3}{2} \sigma_{2}=\frac{9}{8}, \\
S_{5}=\sigma_{1} S_{4}-\sigma_{2} S_{3}+\sigma_{3} S_{2}=-\frac{3}{8} \sigma_{2}+\frac{3}{2} \sigma_{3} \\
=\frac{9}{32}+\frac{3}{16}=\frac{15}{32} .
\end{array}
$$