Show that every polynomial is the sum of an even and odd function. I have been given an optional challenge problem at the end of one of my earlier tutorials that I am unsure how to solve. It is a question with three parts, but I would like to tackle them separately with a little help on part a.
a function $f$ is even if $f(-x) = f(x)$ for all $x$, and odd if $f(-x) = -f(x)$ for all $x$.
Now I am told to show that every polynomial is the sum of both an even and an odd function, but have no idea how to go about this.
Is the key to this question that $f(-x) = x^2$ will always $= f(x)$ $\therefore$ $x^2$ is even? I understand that, and if a secondary function was $g(-x) = x$, where x is only positive, then it would make sense that this is a odd function, but it is for all x, and therefore a negative x value in g(-x) would become positive and it wouldn't be an odd or an even function.
 A: Think about the easiest even (or odd) functions. The first one I will think of is $f(x) = x$ and $f(x) = x^2$. Next you will realize that for $f(x) = x^n$ it is even or odd depending on if $n$ is even or odd. (That also helps you to understand why they are called even (or odd) functions.)
Now that we are only looking at polynomials, we can naturally divide a polynomials into odd and even degrees. The rest would be easy.
A more general construction works for any functions: $\frac{f(x) + f(-x)}{2}$ is always even, and $\frac{f(x) - f(-x)}{2}$ is always odd, and they add up to $f(x)$.
A: I think T. Bongers's answer is the most natural way to solve this problem, seeing as your given function is a polynomial. Here is an alternative method. You have a given function $P(x)$ which you want to express as the sum of an odd function, call it $D(x)$, and an even function, call it $E(x)$. So $P(x),D(x),E(x)$ satisfy the identity $P(x)=D(x)+E(x)$. That's one equation in two unknowns, $D(x)$ and $E(x)$. Now, substituting $-x$ for $x$ in the identity $P(x)=D(x)+E(x)$, you get another identity, $P(-x)=D(-x)+E(-x)=-D(x)+E(x)$. So now you have two equations in two unknowns: $D(x)+E(x)=P(x)$ and $-D(x)+E(x)=P(-x)$. Solving this system of equations, you get formulas for $D(x)$ and $E(x)$ in terms of $P(x)$ and $P(-x)$. You can then verify that $D(x)$ and $E(x)$ are indeed odd and even respectively, and that (assuming $P(x)$ is a polynomial, or even an infinite series in powers of $x$) they are the same functions that T. Bongers hinted at in his answer.
A: Hint: $x$, $x^3$, $x^5$, ... are all odd, while $1$, $x^2$, $x^4$, ... are all even (prove this!). So try decomposing a polynomial into a sum of terms only involving even powers of $x$, and terms only involving odd powers of $x$.
