Let's consider the linear space $C[a,b]$ but with $L^2$ norm $$ \|f\|=(\int_a^b |f(t)|^2dt)^{\frac{1}{2}} $$
How to prove that the subspace $$ V=\{f\in C[a,b]: f(a)=f(b)\} $$ is dense in this normed space.
Thanks
Let's consider the linear space $C[a,b]$ but with $L^2$ norm $$ \|f\|=(\int_a^b |f(t)|^2dt)^{\frac{1}{2}} $$
How to prove that the subspace $$ V=\{f\in C[a,b]: f(a)=f(b)\} $$ is dense in this normed space.
Thanks
Let $f \in C[a,b].$ Set
$$f_n(x) = f(x)[(x-a)(b-x)]^{1/n}, n = 1,2,\dots .$$
Then $f_n \in V, n= 1,2,\dots$ and $f_n \to f$ uniformly on $[a+\delta, b-\delta]$ for all small $\delta>0.$ This and the uniform boundedness of the $f_n$ will give $f_n\to f$ in the $L^2$-norm.