Show that $\int_{-\pi}^{\pi} (f(x))^2 dx \leq \int_{-\pi}^{\pi} (f'(x))^2 dx$.
So here's my approach to this question:
Assume that $f$ was $2\pi$ continuous and $C^1$. Therefore, we have that $s_n(f)$ converges uniformly to $f$. So let $f(x) = \frac{a_0}{2} + \sum_{n = 1}^{\infty} (a_n \cos (nx) + b_n \sin (nx))$. Since we are given $\int_{-\pi}^{\pi} f(x) dx = 0$, we have that $a_0 = 0$. Now we find $f'$ in terms of coefficients of $f$:
$$f'(x) = \sum_{n = 1}^{\infty} (n b_n \cos(nx) - n a_n \sin (nx))$$
We have that all the eigenfunctions are orthogonal on $[-\pi, \pi]$ and $\int_{-\pi}^{\pi} \sin^2(nx) dx = \pi = \int_{-\pi}^{\pi} \cos^2(nx) dx$
So by Parseval's identity, we have that:
$$\int_{-\pi}^{\pi} (f(x))^2 dx = \pi \sum_{n=1}^{\infty} (a^2_n +b^2_n)$$
$$\int_{-\pi}^{\pi} (f'(x))^2 dx = \pi \sum_{n=1}^{\infty} n^2 (a^2_n +b^2_n)$$
It is clear that $n^2 \geq 1$ for all $n \in \mathbb{N}$, so we have that:
$$\int_{-\pi}^{\pi} (f(x))^2 dx = \pi \sum_{n=1}^{\infty} (a^2_n +b^2_n)\leq \pi \sum_{n=1}^{\infty} n^2 (a^2_n +b^2_n) = \int_{-\pi}^{\pi} (f'(x))^2 dx $$
Some reason I feel like there's something wrong with this. But I can't put my finger on it. Is there a better approach to this?
Your solution is correct. But the fact that $s_n(f)\to f$ uniformly isn't particularly relevant: for $f'$ you don't have such convergence, or even pointwise convergence in general, yet the series for both $f$ and $f'$ get used in the same way. The important fact is that both functions are square integrable and their Fourier coefficients are related.
Also, it would be shorter if you used the complex form of Fourier series. More generally, the inequality holds for complex valued functions in the form $$\int_{-\pi}^{\pi} |f(x)|^2 \,dx \leq \int_{-\pi}^{\pi} |f'(x)|^2\, dx$$ Indeed, if $f(x)\sim \sum_{n\in\mathbb Z}c_n e^{inx}$ then $f'(x)\sim \sum_{n\in\mathbb Z}in c_n e^{inx}$ and since $|c_n|\le |inc_n|$ for all $n$ (thanks to $c_0=0$), the conclusion follows from Parseval's identity.