How to prove whether a polynomial function is even or odd We know that a function is even if $f(-x) = f(x)$ and odd if $f(-x) = -f(x)$. With this reasoning is it possible to prove that a polynomial function such as  $f(x) = a_{2n}x^{2n} + a_{2n-2}x^{2n-2} + ...+a_{2}x^2 + a_{0}$  is even or odd? 
What do you suggest? How do we get started? 
 A: Remember that $-1$ raised to an even power is $1$. With that in mind, we can factor out the $-1$ and see
$$
\begin{align*}
f(-x) &= a_{2n}(-x)^{2n} + a_{2n-2}(-x)^{2n-2} + \cdots + a_2(-x)^2 + a_0\\
&= a_{2n}(-1)^{2n}x^{2n} + a_{2n-2}(-1)^{2n-2}x^{2n-2} + \cdots + a_2(-1)^2x^2 + a_0\\
&= a_{2n}x^{2n} + a_{2n-2}x^{2n-2} + \cdots + a_2x^2 + a_0\\\\
&= f(x).
\end{align*}
$$
Whenever all the powers of $x$ in a polynomial are even, the $-1$s will be "swallowed up" in this way, ensuring the polynomial itself is even.
You could use a similar approach to show that whenever all the powers of $x$ in a polynomial are odd, the polynomial itself is odd.
A: Two polynomials have the same value at every real number if and only if they are identical (exact same coefficients in each and every power of $x$); this follows because a polynomial of degree $n\gt 0$ can have at most $n$ roots. If $f(x)$ and $g(x)$ are the same at every value of $x$, then $f-g$ has infinitely many roots, and so must be the zero polynomial.
So write
$$f(x) = a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x + a_0.$$
Then
$$\begin{align*}
f(-x) &= a_n(-x)^n + x_{n-1}(-x)^{n-1} + \cdots + a_1(-x) + a_0\\
&= a_n (-1)^nx^n + a_{n-1}(-1)^{n-1}x^{n-1} + \cdots + a_1(-1)x + a_0\\
&= \left((-1)^na_n\right)x^n + \left((-1)^{n-1}a_{n-1}\right)x^{n-1} + \cdots + \left(-a_1\right)x + a_0.
\end{align*}$$
Now, $f(x)$ is even if and only if $f(x) = f(-x)$. That means that we need
$$a_nx^n+a_{n-1}x^{n-1} + \cdots + a_1 x + a_0 = (-1)^nx^n + (-1)^{n-1}a_{n-1}x^{n-1}+\cdots +(-a_1)x + a_0.$$
That, in turn, means we need
$$a_n = (-1)^{n}a_n,\quad a_{n-1}=(-1)^{n-1}a_{n-1},\ldots,\quad a_1 = -a_1, \quad a_0=a_0.$$
If $k$ is even, then $(-1)^k = 1$, so we automatically get $a_k=(-1)^ka_k$; that just says we need $a_k=a_k$, which is always true. If $k$ is odd, then $(-1)^k = -1$, so we need $a_k=-a_k$. This can only happen if $a_k=0$.
So $f(x)$ is an even function exactly when all odd terms to have coefficient $0$. So it must be a polynomial in which the only powers of $x$ that "show up" are even powers of $x$ (including $x^0$ which gives the constant term).
For $f(x)$ to be an odd function, we need $-f(x)=f(-x)$. That means that we need:
$$-\Bigl(a_nx^n+a_{n-1}x^{n-1} + \cdots + a_1 x + a_0\Bigr) = (-1)^nx^n + (-1)^{n-1}x^{n-1}+\cdots +(-a_1)x + a_0.$$
That, in turn, means we need
$$-a_n = (-1)^{n}a_n,\quad -a_{n-1}=(-1)^{n-1}a_{n-1},\ldots\quad, -a_1 = -a_1, \quad -a_0=a_0.$$
This time, if $k$ is odd, then we are asking for $-a_k = -a_k$ to be true, which it always is; and if $k$ is even we are asking for $-a_k = a_k$, which is true if and only if $a_k=0$. 
So $f(x)$ is an odd function exactly when all the even coefficients are zero; that is, the only powers that "show up" are odd powers of $x$.
A: let $f(x) = g(x^2)$ then $f(-x) = g((-x)^2) = g(x^2) = f(x)$.
For oddness let $f(x) = xg(x^2)$ then $f(-x) = -x g(x^2) = -f(x)$
