I am a newbie in Mathematica and is currently using Mathematica v9.0. I would like to consult if anyone knows how can I plot a given functions with conditions as shown below on how they look like.
$$ g(x)= \left\{\begin{split} \frac{(\pi-x)}{2} &\text{, } 0 \leq x \leq \pi \\ -\frac{(\pi+2)}{2} &\text{, } -\pi \leq x < 0 \end{split}\right. $$
Then together in the same graph, I would like to plot its partial sums $S_{4}$ and $S_{8}$ based on the fourier series of the function $\sum^{n}_{k=1} \frac{\sin kx}{k}$.
Note: If there is anyone who can edit the above latex to mathematics form, please do so as I don't know how to convert the above $\LaTeX$ code into mathematical wordings. Sorry about that.
