Question 21
For real numbers $x,$ let $$
\begin{aligned} P(x) &= 1 + \cos(x) + i\sin(x) \\ &\quad {}- \cos(2x) - i\sin(2x) \\ &\quad {}+ \cos(3x) + i\sin(3x) \end{aligned}
$$ where $i = \sqrt{-1}.$ For how many values of $x$ with $0 \le x \lt 2\pi$ does $$
P(x) = 0?
$$
\begin{aligned} P(x) &= 1 + \cos(x) + i\sin(x) \\ &\quad {}- \cos(2x) - i\sin(2x) \\ &\quad {}+ \cos(3x) + i\sin(3x) \end{aligned}
$$ where $i = \sqrt{-1}.$ For how many values of $x$ with $0 \le x \lt 2\pi$ does $$
P(x) = 0?
$$