6. (15%) Find the Fourier series of the following periodic function $f(x)$ with period $2\pi$.

$$f(x) = \begin{cases} -1, & -\pi < x < 0 \\ 1, & 0 < x < \pi \end{cases}$$