# A sum of Cosines (Fouries series)

1. Dec 1, 2011

### phonic

Dear All,

I wonder how to calculate the sum of the following Cosines:
$\sum_{n=1}^\infty \cos(nx)$

Can anyone give a hint? Thanks a lot!

2. Dec 1, 2011

### micromass

First, use the following formula:

$$\cos \alpha= \frac{e^{i\alpha}+e^{-i\alpha}}{2}.$$

Then apply formulas of geometric series.

3. Dec 1, 2011

### dextercioby

A little simpler is to directly compute

$$\sum_{n=1}^{\infty} (\cos nx + i\sin nx)$$

and at the end separate the real and imaginary parts. Also gives you the sume of sines.