# Thread: Fun with complex numbers

1. ## Fun with complex numbers

By considering ${\Sigma_{n=1}^{N}}$ $z^{2n-1}$ where $z=e^i\theta$, show that
$\Sigma_{n=1}^{N} cos(2n-1)\theta=\frac{2N\theta}{2sin\theta}$

My attempt
Let X be equal to the sum
$X=z+z^3+...+z^{2N-1}$
$\frac{X}{z^2}=z^{-1}+x+...+z^{2N-3}$

$X-\frac{X}{z^2}=z^{2N-1}-z^-1$
$X=\frac{z^{2N+1}-z}{z^2-1}$

Now
$\Sigma_{n=1}^{N}cos(2n-1)\theta + \Sigma_{n=1}^{N}isin(2n-1)\theta=X$

$X=\frac{cos(2N+1)\theta+isin(2N+1)\theta-cos\theta-isin\theta}{cos2\theta+isin2\theta-1}$

Rationalizing with $(cos2\theta-1)-isin2\theta)$

numerator of $X=cos(2N+1)\theta{cos2\theta}$ $-cos(2N-1)\theta+isin(2N+1)\theta{cos2\theta}$ $-isin(2N+1)\theta-cos\theta{cos2\theta}$ $+cos\theta-icos2\theta{sin2\theta}+isin\theta-icos(2N+1)\theta{sin2\theta}$ $+sin{2N+1)\theta{sin2\theta}+icos\theta{sin2\theta }-sin\theta{sin2\theta}}$

Collecting the real terms
$cos(2N+1)\theta{cos2\theta}+sin(2N+1)\theta{sin2\t heta}-(cos\theta{cos2\theta}+sin\theta{sin2\theta}$ $-cos(2N+1)\theta-cos(2N-1)\theta+cos\theta$
which becomes
$cos(2N-1)\theta-cos(2N-1)\theta-cos\theta+cos\theta=0$
Needless to say, I've hit a little snag, so help is politely requested.

2. Originally Posted by I-Think
By considering ${\Sigma_{n=1}^{N}}$ $z^{2n-1}$ where $z=e^i\theta$, show that
$\Sigma_{n=1}^{N} cos(2n-1)\theta=\frac{2N\theta}{2sin\theta}$

My attempt
Let X be equal to the sum
$X=z+z^3+...+z^{2N-1}$
$\frac{X}{z^2}=z^{-1}+x+...+z^{2N-3}$

$X-\frac{X}{z^2}=z^{2N-1}-z^-1$
$X=\frac{z^{2N+1}-z}{z^2-1}$

Now
$\Sigma_{n=1}^{N}cos(2n-1)\theta + \Sigma_{n=1}^{N}isin(2n-1)\theta=X$

$X=\frac{cos(2N+1)\theta+isin(2N+1)\theta-cos\theta-isin\theta}{cos2\theta+isin2\theta-1}$

Rationalizing with $(cos2\theta-1)-isin2\theta)$

numerator of $X=cos(2N+1)\theta{cos2\theta}$ $-cos(2N-1)\theta+isin(2N+1)\theta{cos2\theta}$ $-isin(2N+1)\theta-cos\theta{cos2\theta}$ $+cos\theta-icos2\theta{sin2\theta}+isin\theta-icos(2N+1)\theta{sin2\theta}$ $+sin{2N+1)\theta{sin2\theta}+icos\theta{sin2\theta }-sin\theta{sin2\theta}}$

Collecting the real terms
$cos(2N+1)\theta{cos2\theta}+sin(2N+1)\theta{sin2\t heta}-(cos\theta{cos2\theta}+sin\theta{sin2\theta}$ $-cos(2N+1)\theta-cos(2N-1)\theta+cos\theta$
which becomes
$cos(2N-1)\theta-cos(2N-1)\theta-cos\theta+cos\theta=0$
Needless to say, I've hit a little snag, so help is politely requested.
Note that

$\sum_{n = 1}^N{z^{2n - 1}} = \sum_{n = 1}^N{e^{i(2n - 1)\theta}}$

which is a geometric series, with $N$ terms, $a = e^{i\theta}$ and $r = e^{2i\theta}$.

So $\sum_{n = 1}^N{e^{i(2n - 1)}} = \frac{e^{i\theta}(1 - e^{2Ni\theta})}{1 - e^{2i\theta}}$.

Now convert this to real and imaginary parts and everything should fall into place.