I'm working on pre-Hilbert spaces and there is something that I don't know how to prove in an exercise:
In the pre-Hilbert space $\mathcal{C}([-1,1])$, under the inner product $(f|g)=\displaystyle{\int_{-1}^{1}}f(t)g(t)\thinspace dt$, we consider the subset $M$ of the functions $f$ such that $f(t)=0$ for all $t\ge0$.
Describe the subspace $M^{\perp}$.
Let be $f\in\mathcal{C}([-1,1])$.
$f\in M^{\perp}\Longleftrightarrow \forall g\in M$, $(f|g)=0\Longleftrightarrow\forall g\in M$, $(f|g)=\displaystyle{\int_{-1}^{0}}f(t)g(t)\thinspace dt= 0 \Longleftrightarrow \forall t\leq0,\thinspace f(t)\leq 0$
So, $M^{\perp}=\{f\in \mathcal{C}([-1,1])\thinspace | \thinspace \forall t\le0,\thinspace f(t)=0\}$.
My problem is in the last "if and only if" from the left to right specifically:
As
$\forall g \in M,\thinspace \displaystyle\int_{-1}^{0}f(t)g(t)\thinspace dt=0$, in particular $g(t) = \left\{ \begin{array}{lcc}
f(t) & if & t\in [-1,0) \\
\\ 0 & if & t\in [0,1)
\end{array}
\right.$
So $\displaystyle\int_{-1}^{0}f(t)^2\thinspace dt= 0 \Longleftrightarrow \forall t\in[-1,0),\thinspace f(t)=0.$ And we know that $g$ is continuous, then $f(0)=0 \Longrightarrow f(t) = 0$, for all $t\in[-1,0]$
Is it correct what I have done? Can I define g(t) like this? In addition, I think we can write for all $t\le0$ since we are working in $\mathcal{C}([-1,1])$. If it is wrong, could you tell me how to do it, please? Thanks in advance.
You can define $g$ like that, but it will not be continuous if $f(0)\ne0$. Instead what you can do is define $g$ as $$ g(t)=\begin{cases} f(t),&\ t<-\delta\\[0.3cm] \displaystyle-\frac{t\,f(-\delta)}\delta,&\ -\delta\leq t\leq 0\\[0.3cm] 0,&\ t>0 \end{cases} $$ Then $g$ is continuous and $$ 0=\int_{-1}^{-\delta}f^2+\int_{-\delta}^0 f(t)\,\Big(-\frac{t\,f(-\delta)}\delta\Big)\,dt. $$ Then $$ \int_{-1}^{-\delta}f^2=\int_{-\delta}^0 f(t)\,\Big(\frac{t\,f(-\delta)}\delta\Big)\,dt\leq \delta\,\|f\|_\infty^2. $$ As the integral is continuous on its limits, taking limits as $\delta\to0$ you get $$ \int_{-1}^0f^2=0. $$