Fourier Integral problem Let $f(x)= \begin{cases} 3, & x \in [0,\pi]\\ 2x, & x \in(\pi,2\pi]
\\ 0, & x > 2 \pi \end{cases} $
Express $f$ as a Fourier integral.
I don't know which type of integral I'm supposed to use it. Normally I'd think they mean:
$$f(x) = \int_{0}^{\infty} a(u) \cos ux + b(u) \sin ux \ du$$
Where $$a(u) = \frac{1}{\pi} \int_{-\infty}^{\infty} f(x) \cos ux \ dx$$ 
$$b(u) = \frac{1}{\pi} \int_{-\infty}^{\infty} f(x) \sin ux \ dx$$
But since $f$ is undefined for negative $x$, how would I calculate these integrals? Could I just 'forget' the negative bits and calculate that in the bounds between $(0,\infty)$? Or should I perhaps use the even (or odd) extension of $f$ and then express it as:
$$f(x) = \sqrt{\frac{2}{\pi}}\int_{0}^{\infty} F_c (u) \cos ux \ du$$
Where $$F_c (u) = \sqrt{\frac{2}{\pi}}\int_{0}^{\infty} f (x) \cos ux \ dx \ ? $$
I would be inclined to do it the second way because I was under the impression that the first way only makes sense for $f$ defined on whole $\mathbb{R}$ ?

Hint: in order to apply the Fourier series theory to your function $f$ you need to introduce an appropriate periodic extension of $f$. In other words, the given $f$ must be extended periodically to whole $\mathbb R$ before applying the formulae for the Fourier coefficients. The first task is to determine which period and which periodic extension of $f$ you need. 
