Let $f$ be the $1$-periodic function such that $f(x) =|x|$ for $x \in \Big[ \frac{-1}{2},\frac{1}{2} \Big].$ Determine explicitly a sequence of trigonometric polynomials $(P_N)_N$ such that $P_N \rightarrow f$ uniformly as $N \rightarrow \infty.$
I tried computing the Fourier series coefficients with $\large c_n=\int^{1/2}_{-1/2}|x|e^{-2\pi inx}dx$ and got $\large c_n=\frac{cos(\pi n)-1}{2(\pi n)^2}=\frac{(-1)^n-1}{2(\pi n)^2}$.
So I get the series $\large |x|\thicksim \frac{1}{4}+\sum^{\infty}_{n=1}\frac{1}{\pi^2(2n-1)^2}$. I am having trouble showing that it converges uniformly. And if it doesn't, I'm not sure how to construct such a trigonometric polynomial.
Of course, it is also possible that my calculations were flawed. I'd edit them in if it helps, but wasn't sure if I should given a big page of calculations.
Thoug you have been asked to find polynomials explicitly, you are not required to prove uniform convergence directly. Since $|x|$ is a continuous periodic function of bounded variation the Fourier series does converge uniformly by a well known theorem.