Solution (source code)

= Solution

For the odd two-periodic extensions, $\bar f=\sum b_n\sin(n\pi x)$ with $b_n=2[1+(-1)^n]/(n\pi)$, while $\bar F$ has $b_n=4[1-(-1)^n]/(n^3\pi^3)$. Thus the first has $O(n^{-1})$ convergence because its periodic extension jumps, while the smoother second extension has $O(n^{-3})$ coefficients.