Given $K \subset L^2(\mathbb{R})$, how to determine $K^{\perp}$? Problem: Define $K \subset L^2(\mathbb{R})$ given by $$ K = \left\{f \in L^2(\mathbb{R}) \mid f(-x) = 2f(x) \ \text{for almost all} \ x \geq 0 \right\}. $$ 
I need to give an explicit expression for $K^{\perp}$. 
My attempt: By definition $$K^{\perp} = \left\{f \in L^2(\mathbb{R}) \mid \langle f, g \rangle = 0 \ \text{for all} \ g \in K\right\}.$$ So I take $f \in L^2(\mathbb{R})$ and ask when we have $\langle f, g \rangle = 0$. Now, $$\langle f, g \rangle = \int_{\mathbb{R}} f(x) \overline{g(x)} dx = \int_{-\infty}^{0} f(x) \overline{g(x)} dx +  \int_0^{\infty} f(x) \overline{g(x)}  dx. $$ In the first integral, I do the substitution $x \mapsto -y$. The first integral is then $$ - \int_{\infty}^0 f(-y) \overline{g(-y)} dy = \int_0^{\infty} f(-x) \overline{g(-x)} dx. $$ But $g \in K$, so $g(-x) = 2g(x)$ for almost all $x \geq 0$. So together with the other integral I have $$\langle f, g \rangle = 2 \int_0^{\infty} f(-x) \overline{g(x)} dx + \int_0^{\infty} f(x) \overline{g(x)} dx = \int_{0}^{\infty} \big[ 2f(-x) + f(x) \big] \overline{g(x)} dx = 0 $$ if $f(x) = -2 f(-x) $ for almost all $x \geq 0$. So I would say $$ K^{\perp} = \left\{f \in L^2(\mathbb{R}) \mid f(x) = -2 f(-x) \ \text{for almost all} \ x \geq 0 \right\}. $$ Is this reasoning correct, and the answer? Thank you in advance. 
 A: Hint: Functions of the form $\chi_{(0,a)}+2\chi_{(-a,0)}$ span a dense subspace of $K$. It follows that $f\in K^\perp$ iff for all $a>0$ you have $2\int_{-a}^0 f(t)\,\textrm{d}t+\int_0^af(t)\,\textrm{d}t=0$. Now, take any $f\in K^\perp$ and take a look at $f-f_1$, where $f_1(x)=f(x)$ for $x>0$ and $f_1(x)=-\frac{1}{2}f(-x)$ for $x<0$, noting that $f_1\in K^\perp$.
A: $g \in K^\perp$ iff
$$
       0= \int_{0}^{\infty}g(t)f(t)dt+\int_{-\infty}^{0}2g(t)f(-t)dt \\
      =\int_{0}^{\infty}\{g(t)+2g(-t)\}f(t)dt.
$$
This must hold for all $f \in K$. However $f\in K$ is an arbitrary $L^2$ function on $(0,\infty)$, which forces $g(-t)=-\frac{1}{2}g(t)$ for $t > 0$. This checks because
$$
      (fg)(-t)=-(fg)(t) \mbox{ for } t > 0, \\
     \implies \int_{-\infty}^{\infty}(fg)(t)dt = 0.
$$
Working in the complex space doesn't change the basic argument.
A: That can't be quite right, because given $f$ such that $f(x)=-2f(-x)$ for a.e. $x \geq 0$ and $g \in K$ you have 
$$\int_{-\infty}^\infty f(x) g(x) dx = \int_{-\infty}^0 f(x) g(x) dx + \int_0^\infty f(x) g(x) dx \\ = \int_{-\infty}^0 f(x) g(x) dx - 4 \int_{-\infty}^0 f(x) g(x) dx.$$
Do you see from this calculation I just did how to fix your mistake?
I don't think that you have shown that all of $K^\perp$ must have this nice symmetry. In other words your argument (upon correction) demonstrates a large subset of $K^\perp$ but it does not ensure that this subset is all of $K^\perp$.
