TITLE: Funny integral inequality
QUESTION [11 upvotes]: Assume $f(x) \in C^1([0,1])$,and $\int_0^{\frac{1}{2}}f(x)\text{d}x=0$,show that:
$$\left(\int_0^1f(x)\text{d}x\right)^2 \leq \frac{1}{12}\int_0^1[f'(x)]^2\text{d}x$$
and how to find the smallest constant $C$ which satisfies 
$$\left(\int_0^1f(x)\text{d}x\right)^2 \leq C\int_0^1[f'(x)]^2\text{d}x$$

REPLY [3 votes]: write $g=f'$ and observe that $f(0)=-\int_0^{1/2}(1-2t)g(t)dt$ from $\int_0^{1/2}f(x)dx=0.$ Therefore $$(\int_0^{1}f(x)dx)^2=(\int_0^1g(t)\min(t,1-t)dt)^2\leq \int_0^{1}g(t)^2dt\times \int_0^1(\min(t,1-t)^2dt$$ from Schwarz.