# By considering 1+ cistheta + cis2theta + cis3theta + .... + cisntheta as a geometric series, can you find: sum_(r=0)^n cosrtheta?

Apr 1, 2017

$\frac{\sin \left(\left(n + 1\right) \frac{\theta}{2}\right) \cos \left(n \frac{\theta}{2}\right)}{\sin \left(\frac{\theta}{2}\right)}$

#### Explanation:

Rewording the question, we are asked to find an equation for $1 + \cos \theta + \cos 2 \theta + \ldots + \cos n \theta$

To solve this you need De Moirve's theorem: ${\left(c i s \theta\right)}^{n} = c i s n \theta = \cos n \theta + i \sin n \theta$

Notice that the sum $1 + c i s \theta + c i s 2 \theta + \ldots + c i s n \theta$ is the same as $1 + c i s \theta + {\left(c i s \theta\right)}^{2} + \ldots + {\left(c i s \theta\right)}^{n}$; a geometric series.
Seeing that the first term is $1$, the ratio $c i s \theta$ and the number of terms is $n + 1$, we can represent this neatly:
$1 + c i s \theta + {\left(c i s \theta\right)}^{2} + \ldots + {\left(c i s \theta\right)}^{n} = 1 \frac{{\left(c i s \theta\right)}^{n + 1} - 1}{c i s \theta - 1}$
$1 + c i s \theta + {\left(c i s \theta\right)}^{2} + \ldots + {\left(c i s \theta\right)}^{n} = \frac{\left(c i s \left(n + 1\right) \theta\right) - 1}{c i s \theta - 1}$

I am going to use a trick when simplifying $c i s \theta - 1$ here:
$c i s n \theta - 1 = c$
$= 1 - 2 {\sin}^{2} \left(n \frac{\theta}{2}\right) + i 2 \sin \left(n \frac{\theta}{2}\right) \cos \left(n \frac{\theta}{2}\right) - 1$
$= - 2 \sin \left(n \frac{\theta}{2}\right) \left(\sin \left(n \frac{\theta}{2}\right) + i \cos \left(n \frac{\theta}{2}\right)\right)$
$= - 2 \sin \left(n \frac{\theta}{2}\right) \left(\cos \left(90 - n \frac{\theta}{2}\right) + i \sin \left(90 - n \frac{\theta}{2}\right)\right)$
$= - 2 \sin \left(n \frac{\theta}{2}\right) c i s \left(90 - n \frac{\theta}{2}\right)$

Notice that the left hand side can be expanded to:
$1 + \cos \theta + i \sin \theta + \cos 2 \theta + i \sin 2 \theta + \ldots + \cos n \theta + i \sin n \theta$, and that the real part of this is what we want. Thus, we need to find the real component of $\frac{\left(c i s \left(n + 1\right) \theta\right) - 1}{c i s \theta - 1}$

$\frac{\left(c i s \left(n + 1\right) \theta\right) - 1}{c i s \theta - 1}$
$\frac{- 2 \sin \left(\left(n + 1\right) \frac{\theta}{2}\right) c i s \left(90 - \left(n + 1\right) \frac{\theta}{2}\right)}{- 2 \sin \left(\frac{\theta}{2}\right) c i s \left(90 - \frac{\theta}{2}\right)}$
$\frac{\sin \left(\left(n + 1\right) \frac{\theta}{2}\right) c i s \left(90 - \left(n + 1\right) \frac{\theta}{2} - \left(90 - \frac{\theta}{2}\right)\right)}{\sin \left(\frac{\theta}{2}\right)}$
$\frac{\sin \left(\left(n + 1\right) \frac{\theta}{2}\right) c i s \left(- n \frac{\theta}{2}\right)}{\sin \left(\frac{\theta}{2}\right)}$
Getting the real part, we see get
$\frac{\sin \left(\left(n + 1\right) \frac{\theta}{2}\right) \cos \left(- n \frac{\theta}{2}\right)}{\sin \left(\frac{\theta}{2}\right)}$
$\frac{\sin \left(\left(n + 1\right) \frac{\theta}{2}\right) \cos \left(n \frac{\theta}{2}\right)}{\sin \left(\frac{\theta}{2}\right)}$
and we're done

Apr 1, 2017

${\sum}_{k = 0}^{n} \cos \left(k x\right) = \frac{1}{2} \left(\cos \left(n x\right) + \sin \left(n x\right) \left(\cos \frac{\frac{x}{2}}{\sin} \left(\frac{x}{2}\right)\right) + 1\right)$

#### Explanation:

${\sum}_{k = 0}^{n} {e}^{i k x} = {\sum}_{k = 0}^{n} \cos \left(k x\right) + i {\sum}_{k = 0}^{n} \sin \left(k x\right)$
${\sum}_{k = 0}^{n} {e}^{- i k x} = {\sum}_{k = 0}^{n} \cos \left(k x\right) - i {\sum}_{k = 0}^{n} \sin \left(k x\right)$

so

${\sum}_{k = 0}^{n} \cos \left(k x\right) = \frac{1}{2} \left({\sum}_{k = 0}^{n} {e}^{i k x} + {\sum}_{k = 0}^{n} {e}^{- i k x}\right)$

but

${\sum}_{k = 0}^{n} {e}^{i k x} = \frac{{e}^{i \left(n + 1\right) x} - 1}{{e}^{i x} - 1} = \frac{\cos \left(\left(n + 1\right) x\right) - 1 + i \sin \left(\left(n + 1\right) x\right)}{\cos x - 1 + i \sin x}$

and

${\sum}_{k = 0}^{n} {e}^{- i k x} = \frac{{e}^{- i \left(n + 1\right) x} - 1}{{e}^{- i x} - 1} = \frac{\cos \left(\left(n + 1\right) x\right) - 1 - i \sin \left(\left(n + 1\right) x\right)}{\cos x - 1 - i \sin x}$

so after simplifications

${\sum}_{k = 0}^{n} {e}^{i k x} + {\sum}_{k = 0}^{n} {e}^{- i k x} = \cos \left(n x\right) + \sin \left(n x\right) \left(\cos \frac{\frac{x}{2}}{\sin} \left(\frac{x}{2}\right)\right) + 1$

and finally

${\sum}_{k = 0}^{n} \cos \left(k x\right) = \frac{1}{2} \left(\cos \left(n x\right) + \sin \left(n x\right) \left(\cos \frac{\frac{x}{2}}{\sin} \left(\frac{x}{2}\right)\right) + 1\right)$