# Complex Fourier Series

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!

Related Calculus and Beyond Homework Help News on Phys.org
jbunniii
Homework Helper
Gold Member
What's the formula for computing the Fourier coefficients?

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

jbunniii
Homework Helper
Gold Member
OK, so you have to calculate

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

What have you tried so far?

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!

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

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

jbunniii
Homework Helper
Gold Member
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.