Let sum of two functions is\(h\left( x \right) = f\left( x \right) + g\left( x \right)\).
- If f and g both are even functions.
If f is even, then it is written as\(f\left( x \right) = f\left( { - x} \right)\).
If g is even, then it is written as\(g\left( x \right) = g\left( { - x} \right)\).
Then, sum of these functions is written as:
\(\begin{aligned}{l}h\left( { - x} \right) = f\left( { - x} \right) + g\left( { - x} \right)\\h\left( { - x} \right) = f\left( x \right) + g\left( x \right)\\h\left( { - x} \right) = h\left( x \right)\end{aligned}\)
Therefore, h is an even function, hence,\(f + g\)is an even function.
If f is odd, then it is written as\(f\left( x \right) = - f\left( { - x} \right)\)
If g is odd, then it is written as\(g\left( x \right) = - g\left( { - x} \right)\)
Then, sum of these functions is written as:
\(\begin{aligned}{l}h\left( { - x} \right) = f\left( { - x} \right) + g\left( { - x} \right)\\h\left( { - x} \right) = - f\left( x \right) - g\left( x \right)\\h\left( { - x} \right) = - h\left( x \right)\end{aligned}\)
Therefore, h is an odd function, hence,\(f + g\)is an odd function.
- If f is even and g is odd
If f is even, then it is written as\(f\left( x \right) = f\left( { - x} \right)\)
If g is odd, then it is written as\(g\left( x \right) = - g\left( { - x} \right)\)
Then, sum of these functions is written as:
\(\begin{aligned}{l}h\left( { - x} \right) = f\left( { - x} \right) + g\left( { - x} \right)\\h\left( { - x} \right) = f\left( x \right) + - g\left( x \right)\\h\left( { - x} \right) \ne h\left( x \right)\\h\left( { - x} \right) \ne - h\left( x \right)\end{aligned}\)
Therefore, h is neither even not odd, hence,\(f + g\) is neither even nor odd.