<s>[INST] Show that $\sum_{n=0}^\infty r^n e^{i n \theta} = \frac{1- r\cos(\theta)+i r \sin(\theta)}{1+r^2-2r\cos(\theta)}$ Show that $$\sum_{n=0}^\infty r^n e^{i n \theta} = \frac{1- r\cos(\theta)+i r \sin(\theta)}{1+r^2-2r\cos(\theta)},$$ where $0\leq r <1$.
Using this, prove that $\sum_{n=0}^\infty r^n \cos(n\theta)$ and $\sum_{n=0}^\infty r^n \sin(n\theta)$ are convergent.
 [/INST] The first sum is a geometric series
$$\sum_{n=0}^{\infty}{r^ne^{in\theta}} = \sum_{n=0}^{\infty}(re^{i\theta})^n$$ 
$$=\frac{1}{1-re^{i\theta}} = \frac{1}{1-r\cos\theta -ir\sin{\theta}}\cdot\frac{1-r\cos\theta + ir\sin\theta}{1-r\cos\theta + ir\sin\theta} =\frac{1-r\cos\theta + ir\sin\theta}{1+r^2-2r\cos\theta}$$
For the next two sums notice that
$$\sum_{n=0}^{\infty}{r^ne^{in\theta}}=\sum_{n=0}^{\infty}{r^n\cos(n\theta) + i\sum_{n=0}^{\infty}r^n\sin(n\theta)}$$
So $$\displaystyle{\sum_{n=0}^{\infty}{r^n\cos(n\theta)}} = \frac{1-r\cos\theta}{1+r^2-2r\cos\theta}$$ $$\displaystyle{\sum_{n=0}^{\infty}{r^n\sin(n\theta)}} = \frac{r\sin{\theta}}{1+r^2-2r\cos\theta}$$
</s>