If $\displaystyle E$ is any function such that:

$\displaystyle E(x) = E(-x) $

And $\displaystyle O$ is any function such that:

$\displaystyle -O(x) = O(-x)$

Then prove that any given function $\displaystyle f$ can be expressed such that:

$\displaystyle f(x) = E(x) + O(x)$

Now, I will show what work I've done and see if anybody can tell me if I'm on the right track. Lets assume firstly that $\displaystyle f$ is even. Let $\displaystyle h$ be any choosen odd function and $\displaystyle g$ be any choosen even function; then we can set:

$\displaystyle f = g$

Then we know that f can be written as:

$\displaystyle f(x) = g(x) = f(-x) = g(-x)$

Now, if we let:

$\displaystyle h(x) = 0$

then:

$\displaystyle h(x) = h(-x) = -h(x)$

So $\displaystyle h$ is either even or odd, so if $\displaystyle f$ is even we can write it as:

$\displaystyle f(x) = g(x) + h(x) = g(x) + 0 = g(x) = f(x)$

Assuming $\displaystyle f$ is odd then we can set:

$\displaystyle f(x) = h(x)$

And simmiliarly to the above:

$\displaystyle g(x) = 0$

So we know g can be either even or odd. So we let g stand in for our even function, and we can write f as:

$\displaystyle f(x) = h(x) + g(x) = h(x) + 0 = h(x) = f(x)$

But, how do I now prove the cases where we assume $\displaystyle f(x) = 0$ and when $\displaystyle f$ is not even or odd? Any guidance would be appreciated. Thanks