Let $I=(0,r) $ for some $r>0$ and $W^{1,2}(I) $ the classical sobolev space of order $1$ with $p=2.$
My question is:
Let $f \in W^{1,2}(I) $ be continuous, continuously extended to $0$ and $r$. Is there a continuous $g \in W^{1,2}(I) $ with $||g||_{1,2}\leq||f||_{1,2}=:\sqrt{||f||_2^2+||f'||_2^2}$and $f(0)=g(0), g(r)=0.$ I think it is not, but I don't know how to show.
Would really appreciate any tips again
Best regards
Edit: I assumed r=1 and tried for 1>a>0 an affine linear function like
$g(x)=(-\frac{1}{a}x+1)f(0)\chi_{[0,a]}$
But this has sobolev norm $||g||^2=f(0)(\frac{a}{3}+\frac{1}{a})$ Where the second factor is not 1 for any real a. So that is not working
Since $W^{1,2}(I)$ is continuously embedded into the space of continuous functions, the restriction to continuous functions is not necessary in the question.
In the definition of $f$, only the value $t:=f(0)$ matters. Now let us determine $f$ such that the $H^1$-norm of $f$ is minimal. This leads to the minimization problem $$ \min_{f\in W^{1,2}(I): \ f(0)=t} \|f\|_{1,2}^2. $$ This problem has a unique solution, call it $f^*$. In order to fulfill the desired inequality, the function $g$ has as small $W^{1,2}$ norm as possible. Hence, $g$ should solve $$ \min_{g\in W^{1,2}(I): \ g(0)=t,\ g(r)=0} \|g\|_{1,2}^2. $$ Also this problem is uniquely solvable with solution $g^*$.
In both minimization problem, the same function is minimized. The set of feasible points of the second problem is smaller than the set of feasible points in the first problem. So $\|g^*\|_{1,2} \ge \|f^*\|_{1,2}$. That is, the desired inequality is actually reversed. Equality would hold if $f^*(r)=0$, which is unlikely.
In fact, it is easy to check that $f^*$ solves the two-point boundary value problem $$ -f''+f =0, \ f(0)=t, \ f'(r) =0, $$ while $g^*$ solves $$ -g''+g =0, \ g(0)=t, \ g(r) =0. $$ These can be explicitly solved, which will give you a counterexample.