Finding complex Fourier coefficients

This is probably an easy question, but I'm a little bit stuck, so any help will be appreciated.

PROBLEM

Find the complex Fourier coefficients of:

$$f(t) = \sin(2\pi t)$$

and

$$f(t) = |\sin(2\pi t)|$$

when $0 \leq t \leq 1$ seconds.

ATTEMPTED SOLUTION

The first problem is quite simple. I wrote:

$$f(t) = \sin(2\pi t) = \frac{e^{i 2\pi t} - e^{-i 2 \pi t}}{2i}$$

And since the complex Fourier series is defined as:

$$f(t) = \sum_{- \infty}^{\infty} c_n \exp(2 \pi i n t/T)$$

we see that $c_{-1} = -\frac{1}{2i}$ and $c_1 = \frac{1}{2i}$ and all the other Fourier coefficients are zero.

I am bit unsure how to approach the second problem though. I get that we must have:

$$f(t) = |\sin(2 \pi t)| = \left|\frac{e^{i 2\pi t} - e^{-i 2 \pi t}}{2i}\right|$$

but I'm not sure how to proceed from here. Any help will be greatly appreciated!

-

Here is how you advance

$$c_n = \int_{0}^{1} |\sin(2\pi t)|e^{-int}dt = \int_{0}^{1/2} \sin(2\pi t)e^{-int} dt + \int_{1/2}^{1} (-\sin(2\pi t))e^{-int}\,dt.$$

Do you know why?

-
Thanks. Yes, I see why we can write the function like this. I will work on solving these integrals, and see if I can get the answer. – Kristian Mar 27 '14 at 20:22
You are welcome. – Mhenni Benghorbal Mar 27 '14 at 23:09

You could just use the integrals that extract each coefficient.

From symmetry it's obvious that all the coefficients are real (even function), but otherwise, the series will be infinite - just look at that $\vee$-shaped discontinuity, no way that can be expressed as a finite sum of smooth functions.

Reference for the formulas is simply the most obvious wiki site: http://en.wikipedia.org/wiki/Fourier_series

-
Thanks. I guess there is no shortcut with this problem! – Kristian Mar 27 '14 at 20:21