# Finding the orthogonal complement

Here's the question

$$V = \{ f: [0,1] \to \mathbb{R} \mid f \text{ continuous} \}.$$ Find the orthogonal complement for $$U = \{f \in V \mid \forall x \in [0,0.5], f(x)=0\}$$ (with the standard inner product $<f,g> = \int_{[0,1]} f(x)g(x)dx)).$

I first thought that the orthogonal complement is $W = \{f \in V \mid f(x)=0 \forall x \in [0.5,1]\}$ but since this and $U$ don't cover all $V$ I knew it's not right, because $V$ should be $V = U + U^\perp$.

Any help ? Thanks :)

With the $W$ you give, clearly any $f\in W$ is orthogonal to all $g\in U$. Assume $f\notin W$. Then $f(a)\ne0$ for some $a\in[0.5,1]$. Wlog. $f(a)>0$. Then $f(x)>0$ in some open interval $(u,v)$ with $0\le u<a<v\le 1$. Especially, $v>0.5$. Let $$g(x)=\max\{0,(v-x)(x-\max\{u,0.5\})\}.$$ Then $g\in U$ and $\langle f,g\rangle >0$, hence $f\notin U^\perp$. (Note that $g(x)>0$ only where $f(x)>0$ and $x>0.5$).
So your guess of $U^\perp$ was correct, it is just the case that $V=U+U^\perp$ does not hold.