# Sum of Series of Product of Power and Cosine

## Theorem

Let $r \in \R$.

Let $x \in \R$ such that $x \ne 2 m \pi$ for any $m \in \Z$.

Then:

 $\displaystyle \sum_{k \mathop = 0}^n r^k \map \cos {k x}$ $=$ $\displaystyle 1 + r \cos x + r^2 \cos 2 x + r^3 \cos 3 x + \cdots + r^n \cos n x$ $\displaystyle$ $=$ $\displaystyle \dfrac {r^{n + 2} \cos n x - r^{n + 1} \map \cos {n + 1} x - r \cos x + 1} {1 - 2 r \cos x + r^2}$

## Proof

From Euler's Formula:

$e^{i \theta} = \cos \theta + i \sin \theta$

Hence:

 $\displaystyle \sum_{k \mathop = 0}^n r^k \map \cos {k x}$ $=$ $\displaystyle \map \Re {\sum_{k \mathop = 0}^n r^k e^{i k x} }$ $\displaystyle$ $=$ $\displaystyle \map \Re {\sum_{k \mathop = 0}^n \paren {r e^{i x} }^k}$ $\displaystyle$ $=$ $\displaystyle \map \Re {\frac {1 - r^{n + 1} e^{i \paren {n + 1} x} } {1 - r e^{i x} } }$ Sum of Geometric Sequence $\displaystyle$ $=$ $\displaystyle \map \Re {\frac {\paren {1 - r^{n + 1} e^{i \paren {n + 1} x} } \paren {1 - r e^{-i x} } } {\paren {1 - r e^{-i x} } \paren {1 - r e^{i x} } } }$ $\displaystyle$ $=$ $\displaystyle \map \Re {\frac {r^{n + 2} e^{i n x} - r^{n + 1} e^{i \paren {n + 1} x} - r e^{-i x} + 1} {1 - r \paren {e^{i x} + e^{- i x} } + r^2} }$ $\displaystyle$ $=$ $\displaystyle \map \Re {\frac {r^{n + 2} \paren {\cos n x + i \sin n x} - r^{n + 1} \paren {\map \cos {n + 1} x + i \map \sin {n + 1} x} - r \paren {\cos x - i \sin x} + 1} {1 - 2 r \cos x + a^2} }$ Euler's Formula and Corollary to Euler's Formula $\displaystyle$ $=$ $\displaystyle \dfrac {r^{n + 2} \cos n x - r^{n + 1} \map \cos {n + 1} x - r \cos x + 1} {1 - 2 r \cos x + r^2}$ after simplification

It is noted that when $x$ is a multiple of $2 \pi$ then:

$1 - 2 r \cos x + r^2 = 1 - 2 + 1 = 0$

leaving the right hand side undefined.

$\blacksquare$