Show that $\mathcal{P}_E$ and $\mathcal{P}_O$ are subspaces of $\mathcal{P_n}$ and $\mathcal{P}_n = \mathcal{P}_E\oplus\mathcal{P}_O$ The question: Let $\mathcal{P}_n$ denote the space of all polynomials of degree less than or equal to $n$ -- all polynomials of the form $p_0 + p_1x + \cdots + p_nx^n$ with all $p_i \in \mathbb{R}$. Let $\mathcal{P}_E \subset \mathcal{P}_n$ denote the set of all even polynomials -- that is, $p(-x) = p(x)$. Similarly, let $\mathcal{P}_O$ denote the subset of odd polynomials with $p(-x) = -p(x)$.

*

*Show that $\mathcal{P}_E$ and $\mathcal{P}_O$ are subspaces of $\mathcal{P_n}$

*Show further that $\mathcal{P}_n = \mathcal{P}_E\oplus\mathcal{P}_O$.

My attempt: Let $p(x), q(x)\in\mathcal{P}_E$ defined as $p(x) = p_0 + p_2x^2 + \cdots + p_{2n}x^{2n}$ and $q(x) = q_0 + q_2x^2 + \cdots + q_{2n}x^{2n}$. Then add them
$$\begin{equation}\begin{split}q(x) + p(x) &= (q_0 + q_2x^2 + \cdots q_{2n}x^{2n}) + (p_0 + p_2x^2 + \cdots p_{2n}x^{2n}) \\ &= (q_0 + p_0) + (q_2 + p_2)x^2 + \cdots + (q_{2n} + p_{2n})x^{2n} \in \mathcal{P}_E \end{split}\end{equation}$$
Now let $k\in\mathbb{R}$.
$$k(p(x)) = k(p_0 + p_2x^2 + \cdots p_{2n}x^{2n}) = kp_0 + kp_2x^2 + \cdots + kp_{2n}x^{2n} \in \mathcal{P}_E$$
Similarly for $\mathcal{P}_O$. Take two vectors $f(x), g(x)\in\mathcal{P}_O$ defined as $f(x) = f_1x + f_3x^3 + \cdots + f_{2n + 1}x^{2n+1}$ and $g(x) = g_1x + g_3x^3 + \cdots + g_{2n + 1}x^{2n+1}$. Now do the same exact thing.
For (2), my attempt is: Note that $p(-x) = p(x) \neq -p(x) = p(-x), \forall x\in\mathbb{R}$ and $x\neq 0$. This implies $\mathcal{P}_O \cap \mathcal{P}_E = \{0\}$. Take all the even and odd polynomials and we get back all polynomials. Thus, $\mathcal{P}_n = \mathcal{P}_E\oplus\mathcal{P}_O$.
 A: $
\newcommand{\P}{\mathcal{P}}
$While more or less correct, I feel you should more explicitly show the decomposition of $p \in \mathcal{P}_n$ into $p_e \in \mathcal{P}_E, p_o \in \P_O$ to properly justify that $\P_E \oplus \P_O = \P$. "Take all the even and odd polynomials and we get back all polynomials" is a vague and unclear statement.
Luckily, doing this is trivial. Consider $p \in \P_n$ given by
$$
p = \sum_{i=0}^n a_i x^i
$$
Then observe that, if $n$ is even, we may take
$$
p_e = \sum_{i=0}^{n/2} a_{2i} x^{2i} \qquad p_o = \sum_{i=0}^{n/2} a_{2i+1} x^{2i+1}$$
to get the desired decomposition, as $p_e \in \P_E$ and $p_o \in \P_O$ trivially. ($x^{2k+1}$ is odd, and linear combinations of odd functions are odd; same for even functions.) You can make a similar argument for $n$ odd.
A: For 1) you can also see that $\mathcal P_E$ is the nullspace of the endomorphism $p\mapsto p(x) - p(-x)$. Similar idea holds for the other $\mathcal P_O$. For 2), you can also use the fact that $$p(x) = \frac12\left(p(x) + p(-x)\right) + \frac12(p(x) - p(-x))$$
This gives you a compact formula to prove what you are aiming for.
