# Complex Fourier Series

1. Aug 10, 2011

### amk5922

What is the complex fourier series of f(x)=x from -pi to pi?

I'm in a complex variables class and we have an extra credit assignment to figure out the complex fourier series of f(x)=x from -pi to pi. We only vaguely covered the topic in class and our book is not very good so I'm not entirely sure what to do. Please help!

2. Aug 10, 2011

### jbunniii

What's the formula for computing the Fourier coefficients?

3. Aug 10, 2011

### amk5922

C_n = 1/2pi int(f(x)*e^-inx)dx

4. Aug 10, 2011

### jbunniii

OK, so you have to calculate

$$\frac{1}{2\pi} \int_{-\pi}^{\pi} x e^{-inx} dx$$

What have you tried so far?

5. Aug 10, 2011

### amk5922

I think I have the correct integration..I have 1/2pi[((x*e^-inx)/-in)+(1/in*1/-in)*e^-inx].
Sorry I'm new and don't know how to properly insert formulas yet!

6. Aug 10, 2011

### jbunniii

Yes, that looks right for the indefinite integral. What's the definite integral from $-\pi$ to $\pi$?

7. Aug 10, 2011

### amk5922

I have 1/2pi[((pi*e^-in*pi)/-in)+(1/n^2)(e^-inx)] - [((-pi*e^in*pi)/-in)+(1/n^2)*e^in*pi]
which would then simplify down to (I think)

1/2pi[(pi/-in)+(1/n^2)(-1^n)]-[(pi/in)+(1/n^2)(1^n)]

And then I'm stuck, I'm not sure what it simplifies down to from here

8. Aug 10, 2011

### jbunniii

You can simplify quite a bit. Do you know Euler's formula:

$$e^{ix} = \cos(x) + i \sin(x)$$

and therefore

$$\frac{1}{2}(e^{ix} + e^{-ix}) = \cos(x)$$
$$\frac{1}{2i}(e^{ix} - e^{-ix}) = \sin(x)$$

You can make heavy use of these identities here.

By the way, there's a short cut which involves using Euler's formula before you integrate. You will get the same answer, but with less effort.