<s>[INST] how do I verify that this converges uniformly to $f(x)$? I had to find the fourier series for $f(x)=|x|, -\pi \le x \le \pi$
I got the fourier series as
$$f(x)=\frac{\pi}{2}-\sum_{n=0}^{\infty}\frac{4}{\pi(2n+1)^2}cos((2n+1)x)$$
but now I have to verify that this converges uniformly to $f(x)$ and I have to evaluate the series when $x=0$. I do not know how to show convergence but for evaluating the series at $x=0$ all I have to do is find the first few terms of the sum and substitute $0$ for $x$?
 [/INST] You may find p. 4 here useful.

Anyway,
$$|\frac{\pi}{2}-\sum_{n=0}^{\infty}\frac{4}{\pi(2n+1)^2}cos((2n+1)x)|$$
$$\le \frac{\pi}{2}+|\sum_{n=0}^{\infty}\frac{4}{\pi(2n+1)^2}cos((2n+1)x)|$$
$$\le \frac{\pi}{2}+\sum_{n=0}^{\infty}|\frac{4}{\pi(2n+1)^2}cos((2n+1)x)|$$
$$\le \frac{\pi}{2}+\sum_{n=0}^{\infty}\frac{4}{\pi(2n+1)^2}|cos((2n+1)x)|$$
$$\le \frac{\pi}{2}+\sum_{n=0}^{\infty}\frac{4}{\pi(2n+1)^2}$$
$$\le \frac{\pi}{2}+\frac{4}{\pi}\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2}$$
Now
$$\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2} < \infty$$
Hence
$$\frac{\pi}{2}-\frac{4}{\pi}\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2} < \infty$$
$\therefore$, by the Weierstrass M-test,
$$\frac{\pi}{2}-\sum_{n=0}^{\infty}\frac{4}{\pi(2n+1)^2}cos((2n+1)x)$$
converges uniformly QED
</s>