# Theorem of the convergence of the series of fourier! [duplicate]

During the demonstration of the theorem of the convergence of the series of fourier, my teacher wrote :$$\frac{1}{2}+ \sum_{k=1}^{n} \cos(ky)=\frac{\sin((n+\frac{1}{2})y)}{2\sin(\frac{y}{2})}$$

he doesn't explain how to get this for the lack of time, I'm curious so I tried alone, without success. How I can get this equality?

• No wonder you couldn't do it on your own. It is quite hard if you don't know the trick (see my answer). Oct 18, 2014 at 16:44
• This article on the Dirichlet Kernel might help. Oct 18, 2014 at 17:27
• @malloc, See math.stackexchange.com/questions/117114/… Oct 18, 2014 at 17:43

Multiply both sides by $2\sin(\dfrac{y}{2})$ and remark that

$2\sin(\dfrac{y}{2})\cos(ky) = \sin(\dfrac{2k+1}{2}y) - \sin(\dfrac{2k-1}{2}y)$

• I'll give that answer a +1 for avoidance of the complex exponential function. If you do know the complex exponential, however, that is easier to understand. Oct 18, 2014 at 16:57
• @HaraldHanche-Olsen Yeah I agree using complex number is more simple. Oct 18, 2014 at 17:17
• @HaraldHanche-Olsen can you write the complex notation for a more complete answer? Oct 19, 2014 at 17:37
• Okay, I did that, then noticed that the question was closed as a duplicate. I wasn't too sure if the software would accept the edit under these circumstances, but it did. I won't edit it further, though. Oct 19, 2014 at 18:43

Very briefly: Write $$\cos(ky)=\frac{e^{iky}+e^{-iky}}{2}$$ and use the formula for the sum of a finite geometric series.

Edit: To amplify on that a little bit, you can now rearrange the sum on the left to $$\frac12\sum_{k=-n}^n e^{iky}.$$

Edit 2: To sum the above, write it as $$\frac12e^{-iny}\color{blue}{\sum_{j=0}^{2n} e^{ijy}} =\frac12e^{-iny}\color{blue}{\frac{1-e^{i(2n+1)y}}{1-e^{ijy}}} \cdot\color{green}{\frac{e^{-iy/2}}{e^{-iy/2}}} =\frac12\frac{e^{-i(n+1/2)y}-e^{i(n+1/2)y}}{e^{-iy/2}-e^{iy/2}} =\frac12\frac{\sin((n+1/2)y)}{\sin(y/2)}.$$