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.