$|f(x)|\leq \sqrt{\frac{\pi}{3}\int_0^\pi f'^2}$
Let $f\in C^1([0,\pi],\mathbb R)$ such that $\displaystyle\int_0^\pi f(t) dt=0$
Prove that $\forall x\in [0,\pi],\displaystyle|f(x)|\leq \sqrt{\frac{\pi}{3}\int_0^\pi f'^2(t)dt}$
Failed natural attempt
$\int_0^\pi f(t) dt=0$ tells us that there is some $\beta\in [0,1]$ such that $f(\beta)=0$
Using the fundamental theorem of calculus and Cauchy-Schwarz inequality,
$\displaystyle |f(x)|=|f(x)-f(\beta)|\leq\int_x^\beta |f'(t)|dt\leq \int_0^\pi |f'(t)|dt \leq \sqrt{\pi} \sqrt{\int_0^\pi f'^2}$
It is not sharp enough.
This might have something to do with Fourier series.
Without Fourier series: we have $((t-a)f(t))'=(t-a)f'(t)+f(t)$. Hence $$ \int_0^t\tau f'(\tau)d\tau=tf(t)-\int_0^tf(\tau)d\tau,\qquad \int_t^\pi(\tau-\pi)f'(\tau)d\tau=(\pi-t)f(t)-\int_t^\pi f(\tau)d\tau. $$ By adding these, we obtain $$ \pi f(t)=\int_0^\pi g(\tau)f'(\tau)d\tau,\qquad g(\tau)=\begin{cases}\tau,&\tau<t,\\\tau-\pi,&\tau>t.\end{cases} $$ Now, by Cauchy-Schwarz, $$ \pi |f(t)|\le \sqrt{\int_0^\pi |f'(\tau)|^2d\tau}\sqrt{\frac{t^3}3+\frac{(\pi-t)^3}3}\le \sqrt{\int_0^\pi |f'(\tau)|^2d\tau}\sqrt{\frac{\pi^3}{3}} $$ Dividing by $\pi$, we obtain the desired result. QED
How to guess this proof? It is easy enough: $\frac13$ can only come from $\int t^2 dt$ in this context, so (having in mind Cauchy--Schwarz) we need to estimate $f$ somehow via the integral of $tf'(t)$.
Here's an sketch of a proof using Fourier series. Let $f(x) = \sum_{n=1}^\infty a_n \cos(n x)$, then
$$ \int_0^\pi f'(t)^2dt = \frac{\pi}{2}\sum_{n=1}^\infty \left(n a_n\right)^2 $$ With this in mind, we apply Cauchy-Schwarz as follows: $$ \begin{aligned} |f(x)|^2 &=\left( \sum_{n=1}^\infty \left(n a_n\right)\left(\frac{\cos(n x)}{n}\right) \right)^2\\ &\le \left( \sum_{n=1}^\infty \left(n a_n\right)^2 \right) \left(\sum_{n=1}^\infty\left(\frac{\cos(n x)}{n}\right)^2 \right) \\ &\le \left( \sum_{n=1}^\infty \left(n a_n\right)^2 \right) \left(\sum_{n=1}^\infty\frac{1}{n^2} \right)\\ &= \left( \frac{2}{\pi}\int_0^\pi f'(t)^2dt \right) \left(\frac{\pi^2}{6} \right) \end{aligned} $$