TITLE: How prove this $\int_{a}^{b}f^2(x)dx\le (b-a)^2\int_{a}^{b}[f'(x)]^2dx$
QUESTION [17 upvotes]: let $f\in C^{(1)}[a,b]$,and such that $f(a)=f(b)=0$, show that

$$\int_{a}^{b}f^2(x)dx\le (b-a)^2\int_{a}^{b}[f'(x)]^2dx\cdots\cdots (1)$$

My try: use Cauchy-Schwarz inequality
we have

$$\int_{a}^{b}[f'(x)]^2dx\int_{a}^{b}x^2dx\ge \left(\int_{a}^{b}xf'(x)dx\right)^2$$
  $$\Longrightarrow \int_{a}^{b}[f'(x)]^2dx\ge\dfrac{3\left(\displaystyle\int_{a}^{b}xdf(x)\right)^2}{(b^3-a^3)}=\dfrac{3\left(\displaystyle\int_{a}^{b}f(x)dx\right)^2}{b^3-a^3}$$
  so we only show that following 
  $$\dfrac{3\left(\displaystyle\int_{a}^{b}f(x)dx\right)^2}{b^3-a^3}\ge\dfrac{\displaystyle\int_{a}^{b}f^2(x)dx}{(b-a)^2}$$
  maybe this is not true. so How prove it by (1)

Thank you

REPLY [3 votes]: other solution
let $$F(x)=\int_{a}^{x}f(t)dt$$
then
$$|F(x)|\le\int_{a}^{b}|f(t)|dt\le(b-a)^{\frac{1}{2}}\left(\int_{a}^{b}f^2(t)dt\right)^{\frac{1}{2}}$$
and
$$\int_{a}^{b}f^2(x)dx=-\int_{a}^{b}F(x)f'(x)dx\le (b-a)^2\int_{a}^{b}[f'(x)]^2dx$$