Prove that for all $ f \in C^1[a,b] $
$$ \forall \epsilon >0 : \ \int_{a}^{b} \lvert f^2 \lvert \,dx \ \leq (1+ \epsilon) (\frac{b-a}{\pi})^2\int_{a}^{b} \lvert f' \lvert^2 \,dx \ + (1+ \epsilon^{-1})(b-a)(\lvert f(a) \lvert ^2 +\lvert f(b) \lvert ^2)$$
You may use Wirtinger's inequality: If \begin{equation*} g \in C^1[a,b] , g(a)=g(b)=0 \end{equation*} Then \begin{equation*} \ \int_{a}^{b} \lvert g^2 \lvert \,dx \ \leq (\frac{b-a}{\pi})^2\int_{a}^{b} \lvert g' \lvert^2 \,dx \ \end{equation*}
I'm stuck with this question and I do not even know how to start. I do not really have an idea of the "origin" of this epsilon and how do I get this inequality. I guess that if we want to use Wirtinger's inequality, we have to use a new function vanishing in $a,b$ but I couldn't think of one that works on it.
Thank you very much.