# Sum of Even and Odd

## Task

A function $f$ defined for $–a < x < a$ is even if $f(-x) = f(x)$ and is odd if $f(-x) = -f(x)$ when $–a < x < a$. In this task we assume $f$ is defined on such an interval, which might be the full real line (i.e., $a = \infty$).

- Show that $f(x) = x^2$ is even and $g(x) = x^3$ is odd.
- Write $f(x) = 3x^3 + 2x^2 – 5x + 7$ as a sum $f(x) = e(x)+o(x)$, where $e$ is even and $o$ is odd.
- Do the same for the function $\displaystyle f(x) = \frac{1}{1-x}$ on the domain $-1 \lt x \lt 1$. [Hint: multiply numerator and denominator by $1+x$.]
- Parts (b) and (c) suggest that it might always be possible to write $f(x) = e(x) + o(x)$ where $e$ is even and $o$ is odd. Suppose that this is so, and use the definition of even and odd to write an equation expressing $f(-x)$ in terms of $e(x)$ and $o(x)$.
- You now have two equations: $f(x) = e(x) + o(x)$ and the other one you obtained in part (d). Solve this system of equations for $e(x)$ and $o(x)$, and show that the resulting $e(x)$ is even and the resulting $o(x)$ is odd.
- Based on your work in part (e), is it true or is it false that every function defined on the interval $-a \lt x \lt a$ can be expressed as a sum of an even function and an odd function? Why?
- Use your answer to part (e) to express $f(x) = e^x$ as a sum of an even function and an odd function.

## IM Commentary

Parts (d) and (e) constitute a very advanced application of the skill of making use of structure: in (d) students are being asked to use the defining property of even and odd functions to manipulate expressions involving function notation. In (e) they are asked to see the structure in the system of two equations involving functions.

Most students will find parts (d) and (e) challenging without some discussion and guidance from the teacher. In the classroom, this task provides opportunities for students to engage in MP3, Construct viable arguments and critique the reasoning of others.

Another way is to solve (c) is to write the function as an infinite sum using the formula for the sum of a geometric series, split it into even and odd powers and sum the resulting series.

If student have trouble with (e) it might be helpful to ask them to solve the equations

Notice that the equations have been chosen to have rational rather than whole number solutions, to make it less likely they will be able to solve the equations by inspection, but rather by adding and subtracting the two equations. The structure of this system of equations is similar to the structure of the system in (e).

## Solution

- We have $f(-x) = (-x)^2 = x^2 = f(x)$, so $f$ is even, and $g(-x) = (-x)^3 = -x^3 = -g(x)$, so $g$ is odd.
- The reasoning in part (a) generalizes: any even power of $x$ is even, and any odd power of $x$ is odd (that's where the terminology comes from). So we can write $f$ as a sum of even and odd functions by separating out the even and odd powers; $$ f(x) = (2x^2+7) + (3x^3-5x) = e(x) + o(x), $$ where $$ e(x) = 2x^2 + 7 \quad \mbox{and} \quad o(x) = 3x^3-5x. $$
- Multiplying numerator and denominator by $1+x$ gives $$ f(x) = \frac{1+x}{1-x^2} = \frac{1}{1-x^2} + \frac{x}{1-x^2}, $$ which is, again, a sum of an even and an odd function.
- If $f(x) = e(x) + o(x)$ with $e$ even and $o$ odd, then changing $x$ to $–x$ gives $f(-x) = e(-x) + o(-x) = e(x) – o(x)$.
- Consider the system of equations

\begin{align}

f(x) &= e(x) + o(x)\cr g(x) &= e(x) - o(x). \end{align} Adding them gives $f(x) + f(-x) =2e(x)$. Subtracting the second equation from the first gives $f(x) – f(-x) = 2o(x)$. Thus $$e(x) = \frac{f(x) + f(-x)}{2}$$ and $$o(x) = \frac{f(x) - f(-x)}{2}.$$ Notice that since $f$ is defined for $-a \lt x \lt a$, so is $f(-x)$, and therefore so are $e(x)$ and $o(x)$. The expression for $o$ is odd since $$f(-x) – f(-(-x)) = f(-x) – f(x) = -(f(x) – f(-x)),$$ and $e$ is even by a similar argument. - It is true. We check directly that the even and odd functions from part (e) add up to $f$: \begin{align*} e(x) + o(x) &= \frac{f(x) + f(-x)}{2} + \frac{f(x) - f(-x)}{2}\cr &= \frac{2f(x)}{2} \cr &= f(x). \end{align*} Therefore we have expressed $f$ as a sum of an even and an odd function.
- We have $$ e^x = \frac{e^x + e^{-x}}{2} + \frac{e^x - e^{-x}}{2}. $$ The even part is called the hyperbolic cosine, since cosine is an even function, the odd part is call the hyperbolic sine, since sine is an odd function. The word "hyperbolic" comes from these functions satisfying $u^2 - v^2 = 1$, just as the circular functions cosine and sine satisfy $u^2 + v^2 = 1$.

## Sum of Even and Odd

A function $f$ defined for $–a < x < a$ is even if $f(-x) = f(x)$ and is odd if $f(-x) = -f(x)$ when $–a < x < a$. In this task we assume $f$ is defined on such an interval, which might be the full real line (i.e., $a = \infty$).

- Show that $f(x) = x^2$ is even and $g(x) = x^3$ is odd.
- Write $f(x) = 3x^3 + 2x^2 – 5x + 7$ as a sum $f(x) = e(x)+o(x)$, where $e$ is even and $o$ is odd.
- Do the same for the function $\displaystyle f(x) = \frac{1}{1-x}$ on the domain $-1 \lt x \lt 1$. [Hint: multiply numerator and denominator by $1+x$.]
- Parts (b) and (c) suggest that it might always be possible to write $f(x) = e(x) + o(x)$ where $e$ is even and $o$ is odd. Suppose that this is so, and use the definition of even and odd to write an equation expressing $f(-x)$ in terms of $e(x)$ and $o(x)$.
- You now have two equations: $f(x) = e(x) + o(x)$ and the other one you obtained in part (d). Solve this system of equations for $e(x)$ and $o(x)$, and show that the resulting $e(x)$ is even and the resulting $o(x)$ is odd.
- Based on your work in part (e), is it true or is it false that every function defined on the interval $-a \lt x \lt a$ can be expressed as a sum of an even function and an odd function? Why?
- Use your answer to part (e) to express $f(x) = e^x$ as a sum of an even function and an odd function.