I am concerned with the sharp Poincaré-Friedrichs inequality which I can find proof.
Assume $f: [-a,a]\to \Bbb R$ ($a>0$) is $C^1$ such that $f(-a)=f(a)=0$. Then I want to show that
$$\int_{-a}^a|f(t)|^2d t\leq a^2\int_{-a}^a|f'(t)|^2d t.$$
When I use the fundamental theorem of calculus, I get the constant factor $2a^2$ instead of $a^2$.
$$\begin{split} f(t)= \int_t^a f'(s)((a-t) ds \implies |f(t)|^2 \leq (a-t)\int_t^a |f'(s)|^2 ds. \end{split}$$
Integrating both sides over $(-a,a)$ yileds $$\begin{split} \int_{-a}^a|f(t)|^2 dt& \leq \int_{-a}^a(a-t)\int_t^a |f'(s)|^2 dsd t\\ &\leq \int_{-a}^a(a-t)\int_{-a}^a |f'(s)|^2 dsd t\\ &= 2a^2 \int_{-a}^a |f'(s)|^2 ds. \end{split}$$
How can I optimize the above inequality with constant factor $a^2$?
More generally, as stated [https://en.wikipedia.org/wiki/Friedrichs%27s_inequality] assume $f\in C^k(\Bbb R)$ $k\in \Bbb N$ such that $supp \,\,f\subset (-a,a)$ then how can I prove that
$$\int_{-a}^a|f(t)|^2d t\leq a^{2k}\int_{-a}^a|f^{(k)}(t)|^2 d t.$$