How to show that $\sum_{n=1}^\infty r^n\cos n\theta=\frac{r\cos\theta-r^2}{1-2r\cos\theta+r^2}$? I'm supposed to prove the following series expansion:
$$s_n=\sum_{n=1}^\infty r^n\cos n\theta=\frac{r\cos\theta-r^2}{1-2r\cos\theta+r^2}$$
I first note the following:
$$s_n=\sum_{n=1}^\infty \Re\left[re^{i\theta}\right]^n=\Re\left[\sum_{n=1}^\infty z^n\right]$$
Using geometric series definition:
$$s_n=\Re\left[\frac{1}{1-z}\right]$$
$$s_n=\Re\left[\frac{1-z}{1-2z+z^2}\right]$$
Substituting polar coordinates of $z$:
$$s_n=\Re\left[\frac{1-r\exp(i\theta)}{1-2r\exp(i\theta)+r^2\exp(2i\theta)}\right]$$
Taking real component:
$$s_n=\frac{1-r\cos\theta}{1-2r\cos\theta+r^2\cos2\theta}$$
I can't really seems to do anything beyond here, could someone point out where I've gone wrong?
 A: Notice that $$\sum_{n=1}^\infty z^n=\frac{z}{1-z}\qquad |z|<1$$since the sum starts at $n=1$. Hence, $$\begin{align}\sum_{n=1}^\infty r^n\cos(n\theta)&=\Re\left( \frac{z}{1-z}\right)\\&=\Re\left(\frac{z-|z|^2}{|1-z|^2}\right)\\&=\frac{\Re(z)-|z|^2}{|1-z|^2}\\&=\frac{r\cos(\theta)-r^2}{(1-r\cos(\theta))^2+(-r\sin(\theta))^2}\\&=\frac{r\cos(\theta)-r^2}{1-2r\cos(\theta)+r^2}\end{align}$$
Note, $$\frac{z}{1-z}=\frac{z(1-\bar{z})}{|1-z|^2}$$
A: Note that the sum starts at $1$ so the geometric sum will give
\begin{eqnarray*}
s_n=\Re\left[\frac{z}{1-z}\right]
\end{eqnarray*}
We now multiply top and bottom by the conjugate of the denominator 
\begin{eqnarray*}
\Re\left[\frac{z}{1-z}\right] &=& \Re\left[\frac{r \cos(\theta)+ir \sin(\theta) }{1-r \cos(\theta)-ir \sin(\theta)}\right] \\
&=& \Re\left[\frac{r \cos(\theta)+ir \sin(\theta) }{1-r \cos(\theta)-ir \sin(\theta)}\frac{1-r \cos(\theta)+ir \sin(\theta) }{1-r \cos(\theta)+ir \sin(\theta)}\right] \\
&=& \Re\left[\frac{r \cos(\theta)(1-r \cos(\theta))-(r \sin(\theta))^2 +i(.)}{(1-r \cos(\theta))^2+(r \sin(\theta))^2}\right] \\
&=& \frac{r \cos(\theta)-r^2 }{1-2r \cos(\theta)+r^2}. \\
\end{eqnarray*}
