# Help finding fourier coefficient

1. Jan 19, 2012

### Kuma

1. The problem statement, all variables and given/known data

Trying to find the Nth degree fourier polynomial of

f(x) =e^x for x between -pi to pi.

2. Relevant equations

3. The attempt at a solution

I'm trying to calculate ak which is given by

1/∏ ∫e^x cos kx dx from -∏ to ∏

I'm getting stuck here trying to use integration by parts. The integral in integration by parts is basically recursive no matter what I set for u or dv.

2. Jan 19, 2012

### jbunniii

It's recursive but you only need to do two iterations due to a nice trick which your calculus teacher did you a disservice if he/she didn't teach it to you.

You'll end up with a second copy of the original integral, which you can then combine with the original one. Try it and if you get stuck, post what you have and I'll give you a hint.

3. Jan 21, 2012

### Kuma

Hmm I looked at the example. I kind of get it but my answer is a bit off. This is for the definite integral. I'm getting a k^2 e^x cos kx for the second term of the answer. Everything else is the same. The answer is