5.
(a) Compute the Fourier sine series for:
$\begin{cases} x, & 0 \le x \le \frac{\pi}{2} \\ \pi - x, & \frac{\pi}{2} \le x \le \pi \end{cases}$
(b) Expand the given function in an appropriate cosine or sine series.
$f(x) = \begin{cases} 2, & -\pi < x < 0 \\ -2, & 0 \le x < \pi \end{cases}$