[Math] Deriving even odd function expressions

calculusfunctions

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.

Best Answer

A function $g(x)$ is said to be an even function if $\forall x \in \mathbb{R}$, we have $g(-x) = g(x)$. The naming even function arises from the fact that the functions $g(x) = x^{2n}$ where $n \in \mathbb{Z}$ i.e. the function which takes the even powers satisfy this condition since $(-x)^{2n} = x^{2n}$.

Similarly, a function $g(x)$ is said to be an odd function if $\forall x \in \mathbb{R}$, we have $g(-x) = -g(x)$. The naming odd function arises from the fact that the functions $g(x) = x^{2n+1}$ where $n \in \mathbb{Z}$ i.e. the function which takes the odd powers satisfy this condition since $(-x)^{2n+1} = -x^{2n+1}$.

The claim is that any function can be written as a sum of an even function and an odd function.

Note that $$f(x) = \left(\frac{f(x) + f(-x)}{2} \right) + \left(\frac{f(x) - f(-x)}{2} \right)$$

Now note that if we let $$E(x) = \left(\frac{f(x) + f(-x)}{2} \right)$$ then $E(x)$ is an even function since $$E(-x) = \left(\frac{f(-x) + f(-(-x))}{2} \right) = \left( \frac{f(-x) + f(x)}{2} \right) = \left(\frac{f(x) + f(-x)}{2} \right) = E(x)$$

Similarly, if we let $$O(x) = \left(\frac{f(x) - f(-x)}{2} \right)$$ then $O(x)$ is an odd function since $$O(-x) = \left(\frac{f(-x) - f(-(-x))}{2} \right) = \left( \frac{f(-x) - f(x)}{2} \right) = -\left(\frac{f(x) - f(-x)}{2} \right) = -O(x)$$

Hence, we have that $E(x)$ is an even function and $O(x)$ is an odd function such that $f(x) = E(x) + O(x)$. Hence, any function can be written as a sum of an even function and an odd function.

The thought process and the motivation is as follows. We want to write $f(x)$ as $E(x) + O(x)$, where $E(x)$ is an even function and $O(x)$ is an odd function. Hence, we have $E(x) + O(x) = f(x)$. Replacing $x$ by $-x$, we get that $E(-x) + O(-x) = f(-x)$. Since we enforce that $E(x)$ is even and $O(x)$ is odd, we get that $f(-x) = E(x) - O(x)$. Hence, we have that $$\begin{align} E(x) + O(x) & = f(x)\\ E(x) - O(x) & = f(-x) \end{align}$$ Solving the above gives us $$\begin{align}E(x) & = \frac{f(x) + f(-x)}{2}\\ O(x) & = \frac{f(x) - f(-x)}{2}\end{align}$$

Related Question