Direct sum problem

vector-spaces

In vector space $\mathbb{R} ^ \mathbb{R} =\left\{ f \mid f \colon \mathbb{R} \to \mathbb{R} \right\} $ let L be a set of even functions $( f(-t)=f(t))$ and and M a set of odd functions
$( f(-t)=-f(t))$ .It's easy to prove that L and M are subspaces of the vector space but how do I prove that
$\mathbb{R} ^ \mathbb{R} = M \oplus L$ ? It's easy to prove that nul function is in the intersection of M and L but how can a function that isn't even or odd be a sum of two functions that are even or odd. For example the exponential function $ e^x$ ?

Best Answer

Suppose you are able to write $f$ as the sum of an even function $g$ and an odd function $h$; then, for every $t\in\mathbb{R}$, \begin{align} f(t)&=g(t)+h(t)\\ f(-t)&=g(-t)+h(-t)=g(t)-h(t) \end{align} Can you go on?