Is it possible for the sum of even and neither odd nor even function to be even or odd

algebra-precalculuseven-and-odd-functions

Consider the functions $f(x)$, $g(x)$, $h(x)$, where $f(x)$ is neither odd nor even, $g(x)$ is even and $h(x)$ is odd. Is it possible for $f(x) + g(x)$ to be

  1. even;
  2. odd?

For the second case I can imagine for example $f(x) = x – 1$ and $g(x) = 1$. Then $f$ is neither even nor odd and $g$ is even but their sum is odd, hence it's possible to get odd function from the sum of neither odd nor even and even function.

It feels like $f(x) + g(x)$ can never be even, but I couldn't manage to prove that.

I've tried to do it the following way:
Let $f(x) = – g(x) – h(x)$, which doesn't contradict the initial statement. Then we can express $g(x)$ and $h(x)$ and see whether the facts that they are either even or odd holds, but this always leads to valid equations:

$$
h(x) = \frac{f(-x) – f(x)}{2} \;\;\; \text{is an odd function} \\
g(x) = \frac{-f(x) – f(-x)}{2} \;\;\; \text{is an even function}
$$

I'm stuck at that point.

How can I prove/disprove that $f(x) + g(x)$ may be even?

Best Answer

Well, by definition $f(x)+g(x)$ is even if and only if $f(x)+g(x)=f(-x)+g(-x)$ for all $x$. If $g(x)$ is even, it satisfies $g(x)=g(-x)$ for all $x$. Inserting this into the previous equation gives $f(x)=f(-x)$ for all $x$, hence $f$ must be even.

Why did it work for odd? Here the definition requires $f(x)+g(x)=-f(-x)-g(-x)$. Since $g(x)$ is even, this transforms to $f(x)+g(x)=-f(-x)-g(x)$ i.e. $g(x) = -\frac 12 (f(x)+f(-x))$, which your example satisfies. In other words: if $f$ is not even, subtracting its even part [*] makes it odd.

[*] This refers to the fact that you can decompose every function $f(x)$ into its even part $f_e(x)$ and its odd part $f_o(x)$ such that $f(x) = f_e(x)+f_o(x)$, where $f_e(x) =\frac 12 (f(x)+f(-x))$ and $f_o(x) =\frac 12 (f(x)-f(-x))$.

Related Question