# Expressing $1 + \cos(x) + \cos(2x) +… + \cos(nx)$ as a sum of two terms

Question in title, my progress:

let $z = \cos(x) + i\sin(x)$

then $1 + \cos(x) + \cos(2x) +\dots + \cos(nx) = Re(1 + z + z^2 +\dots + z^n) = Re\left (\dfrac{1-z^{n+1}}{1-z} \right)$

by geometric series;

multiplying $\dfrac{1-z^{n+1}}{1-z}$ by $\overline{1-z}$ we get $1 + \cos(x) + \cos(2x) +\dots + \cos(nx) = Re \left ( \dfrac{(1-z^{n+1})(\overline{1-z})}{|1-z|^2} \right )$

but I am not sure how to proceed from here.

edit: this is for a complex analysis course, so i'd appreciate a hint using complex analysis without using the exponential function

• – lab bhattacharjee Sep 30 '14 at 16:40
• @labbhattacharjee - Why not vote to close as a duplicate? – nbubis Sep 30 '14 at 16:44
• $z=e^{i\theta}$ $\implies Re \left(\dfrac{(1-z^{n+1})(1-\bar z)}{{\lvert 1-z \rvert}^2}\right)=Re \left(\dfrac{(1-e^{i(n+1)\theta})(1-e^{-\theta})}{{\lvert 1-e^{i\theta} \rvert}^2}\right)$. – user 170039 Sep 30 '14 at 16:44
• @nbubis, Why don't you start? People may follow suit – lab bhattacharjee Sep 30 '14 at 16:48
• @labbhattacharjee - I assumed that if you found the duplicate and didn't vote to close there must have been a good reason. – nbubis Sep 30 '14 at 16:49

$\textbf{Hint:}$Use De Moivre's formula to compute $z^{n+1}$.

$\textbf{Edit:}$ The other way to compute this sum is writing $\cos x$ as:

$$\displaystyle \cos x=\frac{e^{ix}+e^{-ix}}{2}$$

In my opinion it's the easiest way. You simply get two geometric series:

$$\sum_{k=0}^{n}\cos kx=\sum_{k=0}^{n} \frac{e^{ikx}+e^{-ikx}}{2}=\frac{1}{2}\left(\sum_{k=0}^{n}e^{ikx}+\sum_{k=0}^{n}e^{-ikx}\right)= \\ = \frac{1}{2}\left(\frac{1-e^{i(n+1)x}}{1-e^{ix}}+\frac{1-e^{-i(n+1)x}}{1-e^{-ix}}\right)$$

It's equal:

$$\frac{1}{2}\left(\frac{1-e^{i(n+1)x}}{1-e^{ix}}+\frac{1-e^{-i(n+1)x}}{1-e^{-ix}}\right)=\frac{1}{2}\frac{(1-e^{i(n+1)x})(1-e^{-ix})+(1-e^{-i(n+1)x})(1-e^{ix})}{1+1-e^{ix}-e^{-ix}}=\frac{2+(e^{inx}+e^{-inx})-(e^{ix}+e^{-ix})-(e^{-inx}+e^{-inx})}{2-(e^{ix}+e^{-ix})}$$

Using again formula for $\cos$ you get:

$$\frac{1}{2}\frac{2+2\cos nx -2\cos x -2\cos (n+1)x}{2-2\cos x}$$

• It gets very messy if I switch back to cosines/sines – Jonx12 Sep 30 '14 at 16:46
• anymore tips please? – Jonx12 Sep 30 '14 at 21:57
• I added one more approach. – agha Sep 30 '14 at 22:42

Use $\sin(a) \cos(b) = \frac{1}{2} \sin(b+a) - \frac{1}{2} \sin(b-a)$ and multiply your sum with $\sin\left(x/2\right)$. $$\sum_{m=0}^{n} \sin\left(\frac{x}{2}\right) \cos(m x) = \frac{1}{2} \sum_{m=0}^n \left\{\sin \left(\left(m+1-\frac{1}{2}\right)x \right) - \sin\left( \left(m-\frac{1}{2}\right)x \right) \right\}$$ The sum telescopes, i.e. $\sum_{m=0}^n \left(f(m+1)-f(m)\right) = f(n+1)-f(0)$, hence $$\sum_{m=0}^{n} \sin\left(\frac{x}{2}\right) \cos(m x) = \sin \left(\left(n+\frac{1}{2}\right)x \right) - \sin\left(\frac{x}{2} \right)$$ now divide by $\sin\left(\frac{x}{2}\right)$.