# Applying Euler's formula

I try to solve the following task:

Show with Euler's formula (from complex analysis) that for $z\neq 2k\pi$ where $k\in\mathbb{Z}$ the following is true: $$\sum\limits_{v=0}^n \cos(vz) = \frac{1}{2}+\frac{1}{2}\frac{\sin(nz+\frac{z}{2})}{\sin \frac{z}{2}}$$

My attempt: $$2\sum\limits_{v=0}^n \cos(vz) = 1+\frac{\sin(nz+\frac{z}{2})}{\sin \frac{z}{2}}$$

$$\sum\limits_{v=0}^n 2\cos(vz)-\sum\limits_{v=0}^n\frac{1}{n} = \frac{\sin(nz+\frac{z}{2})}{\sin \frac{z}{2}}$$

$$\sum\limits_{v=0}^n 2\cos(vz)\sin \frac{z}{2}-\frac{\sin \frac{z}{2}}{n} = \sin(nz+\frac{z}{2})$$

Now I tried using the sinus identity $$\sin ( x \pm y ) = \sin x \cos y \pm \cos x \sin y$$ on the term $\cos(vz)\sin \frac{z}{2}$ but It doesn't seem to make it easier nor help.

My second thought to write cosinus as a series doesn't look like it will help either: $$2\sum\limits_{v=0}^n \sum_{m=0}^\infty (-1)^m\frac{(vz)^{2m}}{(2m)!} = 1+\frac{\sin(nz+\frac{z}{2})}{\sin \frac{z}{2}}$$

I also don't see where I can apply the Euler formula.

Thanks for help

• What "Euler formula"? There must be several hundreds. Mar 21, 2016 at 11:55
• @Joanpemo A wild guess here, but perhaps he means $re^z=e^x(\cos y+ i\sin y)?$ Mar 21, 2016 at 11:59
• @MathematicianByMistake Thank you. I also think so, yet the asker hasn't addressed the comment. Mar 21, 2016 at 12:00
• wiki/Dirichlet_kernel#Proof_of_the_trigonometric_identity Mar 21, 2016 at 12:12
• @Matriz If you just google "Euler's formula", you will find many results. Best to be explicit about your writings. Mar 21, 2016 at 12:25

$$\cos(vz)=\Re e^{ivz}$$
$$\sum_{v=0}^n\cos(vz)=\Re\sum_{v=0}^ne^{ivz}=\Re\sum_{v=0}^n(e^{iz})^v$$
$$=\Re\frac{1-(e^{iz})^{n+1}}{1-e^iz}$$
$2\sum\limits_{v=0}^n \cos(vz) =\sum\limits_{v=0}^n (e^{ivz}+e^{-ivz}) = \frac{1-e^{(n+1)iz}}{1-e^{iz}}+\frac{1-e^{-(n+1)iz}}{1-e^{-iz}} = \frac{e^{\frac{n+1}{2}iz}}{e^{\frac{1}{2}iz}}(\frac{{e^{\frac{n+1}{2}iz}}-e^{\frac{-(n+1)}{2}iz}}{{e^{\frac{1}{2}iz}}-e^{\frac{-1}{2}iz}})+ \frac{e^{\frac{-(n+1)}{2}iz}}{e^{\frac{-1}{2}iz}}(\frac{{e^{\frac{n+1}{2}iz}}-e^{\frac{-(n+1)}{2}iz}}{{e^{\frac{1}{2}iz}}-e^{\frac{-1}{2}iz}}) = 2\cos{(\frac{n}{2}z)}\frac{\sin{\frac{n+1}{2}z}}{\sin{\frac{1}{2}z}}=\frac{\sin(nz+\frac{1}{2}z)+\sin(\frac{z}{2})}{sin{\frac{z}{2}}} = 1+\frac{\sin(nz+\frac{z}{2})}{\sin \frac{z}{2}}$