4. Let $w=\cos \frac{\pi}{5}+i \sin \frac{\pi}{5}$. Then the expanded form of $(x-w)(x$ $\left.-w^{3}\right)\left(x-w^{7}\right)\left(x-w^{9}\right)$ is ( ).
(A) $x^{4}+x^{3}+x^{2}+x+1$
(B) $x^{4}+x^{3}+x+1$
(C) $x^{4}-x^{4}+x^{2}-x+1$
(D) $x^{4}-x^{3}-x+1$
4. (C).
$\because w=\cos \frac{2 \pi}{10}+i \sin \frac{2 \pi}{10}$,
$\therefore(x-w)\left(x-w^{2}\right) \cdots\left(x-w^{3}\right)\left(x-w^{10}\right)$
$$
=x^{10}-1 \text {. }
$$
$$
\begin{array}{l}
\therefore\left(x-w^{2}\right)\left(x-w^{2}\right)(x-w)\left(x-w^{4}\right)\left(x-w^{10}\right) \\
\quad=x^{5}-1 .
\end{array}
$$
$$
\begin{array}{l}
\text { (1) } \div(2) \text { gives } \\
(x-w)\left(x-w^{3}\right)(x-w)\left(x-w^{7}\right)\left(x-w^{9}\right) \\
=x^{5}+1 . \\
\because x-w^{5}=x+1,
\end{array}
$$
$\therefore$ dividing both sides of (3) by $x+1$, we get
$$
\begin{array}{l}
(x-w)\left(x-w^{3}\right)\left(x-w^{7}\right)\left(x-w^{9}\right) \\
=x^{4}-x^{3}+x^{2}-x+1 .
\end{array}
$$