TITLE: Inequality for $C^1$ function: $|f(x)|^2 \le \frac{1}{2}\tanh \frac{1}{2}\int_0^1 (|f(x)|^2+|f'(x)|^2)\,dx$
QUESTION [5 upvotes]: Prove for $f\in C^{1}[0,1]$ such that $f(0) = f(1) = 0$, the following inequality:
$$|f(x)|^2 \le \left(\frac{1}{2}\tanh \frac{1}{2}\right)\left(\int_0^1 (|f(x)|^2+|f'(x)|^2)\,dx\right)$$
This is Problem $4.157$ from Problems in Mathematical Analysis.

REPLY [4 votes]: The following is just heuristics, but indicates that ${1\over2}\tanh{1\over2}$ is the best constant, and that there is some error in Jack d'Aurizios calculations.
On account of symmetry we have to minimize
$$J:=\int_0^{1/2}\bigl(f^2(t)+f'^2(t)\bigr)\>dt$$
under the constraints $f(0)=0$, $f\bigl({1\over2}\bigr)=c>0$. Let $f$ be the minimizing function and consider a variation $t\mapsto \epsilon u(t)$ of $f$ with $u(0)=u\bigl({1\over2}\bigr)=0$. We have to look at
$$J_\epsilon:=\int_0^{1/2}\bigl((f(t)+\epsilon u(t))^2+(f'(t)+\epsilon u'(t))^2\bigr)\>dt$$
and have to ensure that
$$\eqalign{{d\over d\epsilon} J_\epsilon\biggr|_{\epsilon=0}&=2\int_0^{1/2}\bigl(f(t)u(t)+f'(t)u'(t)\bigr)\>dt\cr&=2\int_0^{1/2}\bigl(f(t)-f''(t)\bigr)u(t)\>dt\cr  &=0\ ,\cr}$$
and this for any admissible $u$. It follows that the minimizing function $f$ satisfies the differential equation $f-f''=0$, and together with $f(0)=0$ we obtain $f(t)=\sinh t$, up to a scalar multiple. Computing $$\lambda:={f^2\bigl({1\over2}\bigr)\over 2J(f)}$$for this $f$ results in $\lambda={1\over2}\tanh{1\over2}\doteq0.231059$.