I'm reading a book on Fourier Series, and the author states that if $f$ is piecewise differentiable ( derivative exists and is piecewise continuous) in $(-\pi,\pi) $, and if f can be written in the following way
$$f\left( x \right) = \frac{{{a_0}}}{2} + \sum\limits_{n = 1}^\infty {\left( {{a_n}\cos nx + {b_n}\sin nx} \right)}$$
then, he states, that the derivative is just
$f'\left( x \right) = \sum\limits_{n = 1}^\infty {\left( {n{b_n}\cos nx - n{a_n}\sin nx} \right)} $. This is just as if one would take the derivatives term by term.
Afterwards, he also states that the Fourier series for $x$,considered in the range $[-\pi, \pi]$ $$\left(\sum_{n\geq 1} \frac{2}{n} (-1)^{n+1}\sin(nx)\right)$$ is not uniformly convergent... and thus there's no point in taking the derivatives term by term. In fact he states that if we did, we would get some nonsense.
However, aren't Fourier Series uniformly convergent? Also, isn't $f(x)=x$ piecewise diff?
Why can't we take derivatives on the fourier representation of $x$?
I'm probably missing something here...