The Fourier series expansion of f(x) is
[tex]\displaystyle\frac{a_0}2+\displaystyle\sum_{n=1}^\infty \left(a_n\cos\left(\frac{2\pi nx}P\right)+b_n\sin\left(\frac{2\pi nx}P\right)\right)[/tex]
where P = 4 is the period of f(x), and the coefficients are
[tex]a_0=\displaystyle\frac2P\int_{-2}^2f(x)\,\mathrm dx=2[/tex]
[tex]a_n=\displaystyle\frac2P\int_{-2}^2f(x)\cos\left(\frac{2\pi nx}P\right)\,\mathrm dx=\frac{2\sin(n\pi)}{n\pi}=0[/tex]
[tex]b_n=\displaystyle\frac2P\int_{-2}^2f(x)\sin\left(\frac{2\pi nx}P\right)\,\mathrm dx=\frac{2(\cos(n\pi)-1)}{n\pi}=\begin{cases}0&\text{for }n=2k\\-\frac4{(2k-1)\pi}&\text{for }n=2k-1\end{cases}[/tex]
(where k is a positive integer)
The series for f(x) reduces to
[tex]\displaystyle f(x)=1-\displaystyle\sum_{k=1}^\infty \frac4{(2k-1)\pi}\sin\left(\frac{\pi(2k-1)x}2\right)[/tex]
(I've attached a plot showing the original function in blue and the Fourier expansion with k = 10 terms)