Evaluate $\sum_{n=0}^{\infty} \frac{\cos n \theta}{2^{n}}$, where $\cos \theta=\frac{1}{5}$.
Solution: $\cos n \theta$ is the real part of $e^{i n \theta}$, so the sum is the real part of $\sum_{n=0}^{\infty} \frac{e^{i n \theta}}{2^{n}}$. This is a geometric series with initial term 1 and ratio $\frac{e^{i \theta}}{2}$, so its sum is $\frac{1}{1-e^{i \theta} / 2}$. We are given $\cos \theta=\frac{1}{5}$, so $\sin \theta= \pm \frac{2 \sqrt{6}}{5}$. Thus the sum is $\frac{10}{10-1 \pm 2 i \sqrt{6}}=\frac{90 \pm 20 i \sqrt{6}}{105}$, and the real part is $\frac{6}{7}$.