It would be helpful to receive comment/feedback on my attempt to prove this problem:
A function $f: \mathbb{R} \to \mathbb{R}$ is called even if $$ f(-x) = f(x) $$ for all $x \in \mathbb{R}$. A function $f: \mathbb{R} \to \mathbb{R}$ is called odd if $$ f(-x) = -f(x) $$ for all $x \in \mathbb{R}$. Let $U_e$ denote the set of real-valued even functions on $\mathbb{R}$ and let $U_o$ denote the set of real-valued odd functions on $\mathbb{R}$. Show that $\mathbb{R}^\mathbb{R} = U_e \oplus U_o$.
Here is my attempt at the solution:
Define $U_{e} = \{f(x) \mid f(-x) = f(x), x \in \mathbb{R}\}$ and $U_{o} = \{g(x) \mid g(-x) = - g(x), x \in \mathbb{R}\}$. Suppose $f_{0} (x) \in U_{e} \cap U_{o}$. By construction, $f_{0}(x) = f_{0}(-x) = -f_{0}(x)$, so $f_{0} (x)= 0$ on $\mathbb{R}$. Then $U_{e} \cap U_{o} = \{0\}$, so $U_{e} + U_{o}$ is a direct sum. Let $h(x) \in \mathbb{R}^{\mathbb{R}}$ be an arbitrary real-valued function. Note that $$ h(x) = \frac{1}{2} (h(x) + h(-x)) + \frac{1}{2} (h(x) - h(-x)) $$
where $\frac{1}{2} (h(x) + h(-x))$ is even and $\frac{1}{2} (h(x) - h(-x))$ is odd. This implies that we can express any arbitrary $h(x)$ as the sum of even and odd functions. Therefore, $$ U_{e} \oplus U_{o} = \{f(x) + g(x) \mid x \in \mathbb{R}\} = \{h(x) \mid x \in \mathbb{R}\} = \mathbb{R}^{\mathbb{R}} $$
as desired.