# Homework Help: Sum of Cosines

1. Jun 11, 2012

### matlabber

1. The problem statement, all variables and given/known data
I try to simplify to get rid of sum
$$\sum_{k=0}^{n-1}cos(2 \pi fk)$$

2. Relevant equations

3. The attempt at a solution

I discover I shall use euler equation to form:

$$\sum_{k=0}^{n-1}\frac{1}{2}(e^{2 \pi fki}+e^{-2 \pi fki})$$

but how to sum exponentials?

2. Jun 11, 2012

### vela

Staff Emeritus
Aren't those geometric series?

3. Jun 11, 2012

### matlabber

but do I include exp() when I do geometric series?

4. Jun 11, 2012

### vela

Staff Emeritus
You need to express the terms in the form Ark. Use whatever A and r allow you to do this.

5. Jun 11, 2012

### matlabber

is it $$\frac{1-exp(2 \pi fi)^{t}}{1-exp(2 \pi fi)}$$

6. Jun 11, 2012

### vela

Staff Emeritus
If by t you mean n, that would be twice the sum of the first term. You might find it a little simpler to start with cos x = Re[eix]. Then you only have one term to deal with and no 1/2's floating around.

7. Jun 11, 2012

### matlabber

thank you very much!!