$f(a)=f(b)=0, \int_a^b f(x)dx=0$ implies $\int_a^b f^2(t)dt\leq (\frac{b-a}{2\pi})^2 \int_a^b |f'(x)|^2dx$ Let $f$ be continuously differentiable on $[a,b]$, and $f(a)=f(b)=0, \int_a^b f(x)dx=0$ implies $\int_a^b f^2(t)dt\leq (\frac{b-a}{2\pi})^2 \int_a^b |f'(x)|^2dx$
The problem is how to let $\pi$ appears. It is not easy to find a $C>0$ such that $\int_a^b f^2(t)dt\leq C \int_a^b |f'(x)|^2dx$, but $(\frac{b-a}{2\pi})^2$ ...
 A: Without loss of generality, $a=0$ and $b=1.$ Then, because $f(0)=f(1)=0,$ we can identify the unit interval with the unit circle $\mathbb T$. Then,
$\int_{\mathbb T} f^2=\|f\|^2_2=\|\hat f\|^2=\sum_{n\in \mathbb Z}|c_n|^2$, where the $c_n$ are the Fourier coefficients of $f$.
Note that $c_0=0$ because $\int_{\mathbb T}f=0$ so we may omit $n=0$ in the sum. 
Now, $\int_{\mathbb T} f'^2=\|f'\|^2_2=\|\hat f'\|^2=\sum_{n\in \mathbb Z}|d_n|^2$, where 
$d_n=\int_0^1f'(t)e^{2\pi int}dt=f(1)-f(0)-2\pi in\int_0^1f(t)e^{2\pi int}dt=-2\pi inc_n$. Therefore, 
$\int_{\mathbb T}f^2=\sum_{n\in \mathbb Z}|c_n|^2=\frac{1}{4\pi^2}\sum_{n\in \mathbb Z}|\frac{d_n}{n}|^2\le \frac{1}{4\pi^2}\sum_{n\in \mathbb Z}|d_n|^2=\frac{1}{4\pi^2}\int_{\mathbb T} f'^2$
A: I don't think the condition $f(a)=f(b)=0$ is necessary.  I only assume that $f(a)=f(b)$ and $\int_a^bf(x)dx=0$.  By rescaling, I can further take $a$ and $b$ to be $0$ and $2\pi$ so that the inequality to be proved is
$$\int_0^{2\pi}\big|f(t)\big|^2dt\leq \int_0^{2\pi}\big|f'(t)\big|^2dt.$$
Let $$f(t)=\sum_{k=1}^\infty \big(A_k\cos(kt)+B_k\sin(kt)\big)$$ be the Fourier series of $f$ (the constant term is $0$ because of the assumption $\int_0^{2\pi}f(t)dt=0$).  Since $f$ is continuously differentiable
$$f'(t)=\sum_{k=1}^\infty k\big(-A_k\sin(kt)+B_k\cos(kt)\big).$$ 
This shows that
$$\int_0^{2\pi}\big|f(t)\big|^2dt=\pi\sum_{k=1}^\infty \big(|A_k|^2+|B_k|^2\big)$$
and
$$\int_0^{2\pi}\big|f'(t)\big|^2dt=\pi\sum_{k=1}^\infty k^2\big(|A_k|^2+|B_k|^2\big)$$
by Parseval's identity. This proves that
$$\int_0^{2\pi}\big|f'(t)\big|^2dt-\int_0^{2\pi}\big|f(t)\big|^2dt=\pi\sum_{k=1}^\infty(k^2-1)\big(|A_k|^2+|B_k|^2\big)\geq 0.$$
The equality holds iff $f(t)=A\cos(t)+B\sin(t)$ for some constants $A,B$.
