# Evaluating the sum $\sum_{n = 0}^{n = \infty} a^n cos(n\theta)$

I have seen a similar question to this asked previously:

Proving $\sum\limits_{k=0}^{n}\cos(kx)=\frac{1}{2}+\frac{\sin(\frac{2n+1}{2}x)}{2\sin(x/2)}$

but I was playing around with the sum

$\sum_{n = 0}^{n = \infty} x^n = \frac{1}{1 - x}$

(for $|x| < 1$)

and I was wondering what would happen if I let $x = ae^{i \theta}$, where $a$ is a constant and $|a| < 1$. Here is my work so far: $\sum_{n = 0}^{n = \infty} (ae^{i \theta})^n = (1 - ae^{i \theta})^{-1}$

$= \frac{1}{1 - acos(\theta) - i*asin(\theta)}$

$= \frac{1-acos(\theta) + i*asin(\theta)}{(1 - acos(\theta))^2 + (asin(\theta))^2}$

$= \frac{1-acos(\theta) + i*asin(\theta)}{1 + (acos(\theta))^2 + (asin(\theta))^2 - 2acos(\theta)}$

$= \frac{1-acos(\theta) + i*asin(\theta)}{2 - 2acos(\theta)} = \frac{1}{2} + i \frac{asin(\theta)}{2(1-acos(\theta))}$

So,

$\sum_{n = 0}^{n = \infty} (ae^{i \theta})^n =\sum_{n = 0}^{n = \infty} a^ne^{i n\theta}$

$= \sum_{n = 0}^{n = \infty} a^n (cos(n\theta) + isin(n\theta)) = \frac{1}{2} + i \frac{asin(\theta)}{2(1-acos(\theta))}$

But if I equate the real and imaginary parts I get something that doesn't look right:

$\sum_{n = 0}^{n = \infty} a^n cos(n\theta) = \frac{1}{2}$ and $\sum_{n = 0}^{n = \infty} a^n sin(n\theta) = \frac{asin(\theta)}{2(1-acos(\theta))}$

What went wrong here?

The error is that $1+(a\cos\theta)^2+(a\sin\theta)^2-2a\cos\theta = 1+a^2-2a\cos\theta$ not $2-2a\cos\theta$.
So you get $\displaystyle\sum_{n = 0}^{\infty}(ae^{i\theta})^n = \dfrac{1-a\cos\theta+ia\sin\theta}{1+a^2-2a\cos\theta} = \dfrac{1-a\cos\theta}{1+a^2-2a\cos\theta}+i\dfrac{a\sin\theta}{1+a^2-2a\cos\theta}$.
$\displaystyle\sum_{n = 0}^{\infty}a^n\cos(n\theta) = \dfrac{1-a\cos\theta}{1+a^2-2a\cos\theta}$ and $\displaystyle\sum_{n = 0}^{\infty}a^n\sin(n\theta) = \dfrac{a\sin\theta}{1+a^2-2a\cos\theta}$.
• Oh, I see my mistake. But does this mean that $$\sum_{n=0}^\infty a^n cos(n \theta) = \frac{1 - acos(\theta)}{1 + a^2 - 2acos(\theta)}$$ ? Oct 18, 2017 at 0:42