(1)

$\displaystyle u(t)=\left\{\begin{array}{ccc}2,&0\leq t < 1\\1, & 1 \leq t < 2\\0, & 2 \leq t < 3\end{array}\right.$

$\displaystyle \frac{1}{3}\int_{0}^{3}u(t)e^{-in\frac{2\pi}{3}t}dt, n = 0,1,2,...$

(2)

$\displaystyle \frac{1}{\pi}\int_0^{\pi} |\cos t|e^{-i2nt}dt$

I know some rules about odd and even functions but I can't seem to apply them here.