$12 \cdot 7$ If $\theta$ is a constant satisfying the following conditions: $0<\theta<\pi$, and $x+\frac{1}{x}$ $=2 \cos \theta$. Then for every positive integer $n$, the algebraic expression $x^{n}+\frac{1}{x^{n}}$ equals
(A) $2 \cos \theta$.
(B) $2^{n} \cos \theta$.
(C) $2 \cos ^{n} \theta$.
(D) $2 \cos n \theta$.
(E) $2^{n} \cos ^{n} \theta$.
(32nd American High School Mathematics Examination, 1981)
[Solution] Given $x+\frac{1}{x}=2 \cos \theta$, then we have
$$
x^{2}-2 x \cos \theta+1=0 \text {. }
$$

Solving for $x$, we get $x=\cos \theta \pm \sqrt{\cos ^{2} \theta-1}=\cos \theta \pm i \sin \theta\left(=e^{ \pm i \theta}\right)$.
By De Moivre's formula, $x^{n}=\cos n \theta \pm i \sin n \theta\left(=e^{ \pm i n \theta}\right)$,
and $\frac{1}{x^{n}}=\frac{1}{\cos n \theta \pm i \sin n \theta}=\cos n \theta \mp i \sin n \theta\left(=e^{\mp i n \theta}\right)$,
thus
$$
\begin{aligned}
x^{n}+\frac{1}{x^{n}} & =(\cos n \theta \pm i \sin n \theta)+(\cos n \theta \mp i \sin n \theta) \\
& =2 \cos n \theta .
\end{aligned}
$$

Therefore, the answer is $(D)$.