How do I prove $\int_a^b |f(x)|^2 dx \leq \frac{(b-a)^2}{2} \int_a^b |f'(x)|^2 dx$. Let $f$ be $C^1[a,b]$ continuously differentiable) with $f(a)=0$. [This may be generalized to $f(b)=0$ or $f(a)f(b)=0$]
I want to show

$$\int_a^b |f(x)|^2\ \mathrm{d}x\ \leq\ \frac{(b-a)^2}{2} \int_a^b
 |f'(x)|^2\ \mathrm{d}x.$$


Since $f$ is differentiable, it is continuous so it is integrable.  And since $f'$ is continuous so it is integrable.  So, L.H.S and R.H.S are well defined.
My first trial was the usage of integration by parts, but since I am dealing with $|\cdot |$, the absolute value of a function, it seems it is not a good direction.
 A: Following @Sumanta comments, Based on the second link, I just make up a solution.
The first link Integral inequality with Cauchy-Schwarz-inequality, use Holder inequality and Cauchy-Schwarz inequality with proper and do integral with proper assumption, and the second link use only Cauchy-Schwarz inequality.
Frankly speaking, it is nothing but a re-arranging(=copy paste) the proof in  the second link
Let $\displaystyle f(x) = \int_a^x f'(t)\ \mathrm{d}t$.  Now from Cauchy-Schwartz   one have
\begin{align}
  \left( \int_a^x |f'(t)|\ \mathrm{d}t \right)^2
  \leq \left( \int_a^x |f'(t) |^2\ \mathrm{d}t \right) \left(\int_a^x 1^2\ \mathrm{d}t \right)  
\end{align}
Since $\displaystyle f(x)^2 =  \left( \int_a^x f'(t)\ \mathrm{d}t \right)^2  \leq  \left( \int_a^x |f'(t)|\ \mathrm{d}t \right)^2$  we have
\begin{align}
  &f^2 (x) = \left( \int_a^x f'(t)\ \mathrm{d}t \right)^2
  \leq \left( \int_a^b |f'(t)|^2\ \mathrm{d}t \right) (x-a)   \\
  &\quad \implies \quad 
  \int_a^b f(x)^2\ \mathrm{d}x \leq \left(\int_a^b |f'(t)|^2\ \mathrm{d}t \right) \int_a^b (t-a)\ \mathrm{d}t   \\
  & \quad \implies \quad 
  \int_a^b |f(t)|^2\ \mathrm{d}t \leq \frac{(b-a)^2}{2} \left( \int_a^b |f'(t) |^2\ \mathrm{d}t \right)  
\end{align}
This inequality is called "Wirtinger's inequality."
