Deriving even odd function expressions What is the logic/thinking process behind deriving an expression for even and odd functions in terms of $f(x)$ and $f(-x)$?
I've been pondering about it for a few hours now, and I'm still not sure how one proceeds from the properties of even and odd functions to derive:
$$\begin{align*}
E(x) &= \frac{f(x) + f(-x)}{2}\\
O(x) &= \frac{f(x) - f(-x)}{2}
\end{align*}$$
What is the logic and thought process from using the respective even and odd properties,
$$\begin{align*}
f(-x) &= f(x)\\   
f(-x) &= -f(x)
\end{align*}$$ 
to derive $E(x)$ and $O(x)$?  
The best I get to is:
For even: $f(x)-f(-x)=0$ and for odd: $f(x)+f(-x)=0$
Given the definition of $E(x)$ and $O(x)$, it makes a lot of sense (hindsight usually is) but starting from just the properties. Wow, I feel I'm missing something crucial.

This might be repeating parts of Sivaram's answer, but I think a reorganization might be enlightening.
Suppose we want to break $f$ into even and odd functions: $f(x)=E(x)+O(x)$ where $E(x)$ is even, that is $E(-x)=E(x)$, and $O(x)$ is odd, that is $O(-x)=-O(x)$. Simply from these considerations, we get
$$
\begin{align}
f(x)+f(-x)
&=(E(x)+O(x))+(E(-x)+O(-x))\\
&=(E(x)+O(x))+(E(x)-O(x))\\
&=2E(x)
\end{align}
$$
and
$$
\begin{align}
f(x)-f(-x)
&=(E(x)+O(x))-(E(-x)+O(-x))\\
&=(E(x)+O(x))-(E(x)-O(x))\\
&=2O(x)
\end{align}
$$
Therefore,
$$
\begin{array}{}
E(x)=\frac{f(x)+f(-x)}{2}&\text{and}&O(x)=\frac{f(x)-f(-x)}{2}
\end{array}
$$
