I need to prove that $\forall x \in [0, 1]$ and $\forall f \in W_0^{1,2} ([0, 1])$, the following inequality
$$ |f(x)| \leq ||f'||_{L^2} \sqrt{x (1 -x)} $$
holds true.
The same inequality with $\sqrt{x}$ can be easily shown with the Cauchy-Schwarz inequality, but I wasn't able to generalise the proof for this case.
The estimate $|f(x)| \le \sqrt{1-x} \|f'\|_{L^2}$ can be proved just as easily. The idea then is to combine both estimates to squeeze out a little more. Here is how this is done:
We have $f(x) = \int_0^x f'(t) dt = \int_x^1 (-f'(t)) dt$. Let $\alpha \in \mathbb{R}$, to be chosen later, and set $$ I_\alpha(t) = \begin{cases} \alpha \; (0 \le t \le x) \\ \alpha - 1 \; (x < t \le 1) \end{cases} $$ Then $$ f(x) = \alpha \int_0^x f'(t) \, dt + (1 - \alpha) \int_x^1 (-f'(t)) dt = \int_0^1 f'(t) I_\alpha(t) dt $$
By Cauchy-Schwarz, $$ |f(x)| \le \|f'\|_{L^2} \|I_\alpha\|_{L^2} = \|f'\|_{L^2} \sqrt{\alpha^2 x + (1 - \alpha)^2(1-x)} \, . $$ Now set $\alpha = 1-x$ and the estimate follows.