So, who's going to try to compute the Fourier series of $f(x)=|x|$?
I'll get you started! You want to find coefficients $a_n$ and $b_n$ so that
$$|x| = \frac{1}{2}a_0 + \sum_{n=1}^{\infty} \left(a_n\cos(nx) + b_n\sin(nx)\right).$$
Of course, we expect that the sine coefficients will zero because $|x|$ has even symmetry. You can prove this by multiplying through by $\sin(mx)$, integrating from $-\pi$ to $\pi$, and using the fact that the all but one integral that you see $(b_m\sin^2(mx)$ is manifestly zero. As a result, $b_m=0$ and, in fact, all $b_n$s are zero since $m$ was arbitrary.
Next, multiplying through by $\cos(mx)$ and using the orthogonality of the cosine/sine family, we see that
$$\int_{-\pi}^{\pi} |x|\cos(mx)dx = b_m \int_{-\pi}^{\pi} \cos^2(mx)dx.$$
Note that these integrals are easier if you integrate from $0$ to $\pi$ and multiply by $2$.