Solution (source code)

= Solution
{c}

The truncated <Fourier cosine series> gives the better approximation over the whole closed interval. Its <Fourier coefficients> obey $|a_n|\leq4/(\pi n^2)$, so <absolute convergence> and the tail bound
$$
\boxed{\sup_{0\leq x\leq\pi}|f(x)-C_N(x)|
\leq\frac4\pi\sum_{n>N}\frac1{n^2}
\leq\frac4{\pi N}}
$$
give <uniform convergence>. The even <periodic extension> is continuous; its slope changes only cause corners.

By contrast $b_n=(-1)^{n+1}/n+O(n^{-2})$. The odd <periodic extension> has a jump at $\pi$, giving slower coefficient decay and the <Gibbs phenomenon> near that endpoint. Every truncated <Fourier sine series> satisfies $S_N(\pi)=0$, so
$$
\boxed{|f(\pi)-S_N(\pi)|=\pi/2\quad\text{for every }N.}
$$
It therefore cannot converge uniformly to $f$ on $[0,\pi]$, although it converges at every point of $[0,\pi)$. This comparison concerns approximation across the interval; it does not assert that the cosine truncation has smaller error at every individual interior point for every $N$.