# On Sharp Poincaré-Friedrichs inequality

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.$$

For the second part of your question, if $$f\in C^k$$, for $$k>1$$, then $$f'\in C^{k-1}$$ and you can apply the first result to $$\int_{-a}^a\lvert f'\rvert^2dt$$. By induction then, $$\lVert f \rVert_{L^2}^2 \leq a^{2n}\lVert f^{(n)}\rVert_{L^2}^2 \text{, for all } n\leq k.$$
Concerning the first part, I can't find a way to tighten the control, but I think your first inequality is wrong, namely $$f(t)\neq \int_t^a f'(s)(a-t)ds$$. Instead, use Cauchy-Schwarz inequality on $$\lvert f(t)\rvert \leq \int_{-a}^t \vert f'(s)\rvert ds$$ and the fact that $$(t+a)^{1/2} \leq (2a)^{1/2}$$ to get $$\lVert f \rVert_{L^2} \leq 4a^2\lVert f'\rVert_{L^2}.$$