Find a compact (close form) expression based upon the binomial theorem for the polynomials
$\sum\limits_{0 \leq 2k \leq n} {n \choose 2k}{x}^{2k}$ and $\sum\limits_{0 \leq 2k + 1 \leq n} {n \choose 2k + 1}{x}^{2k + 1}$
Here is what I have so far: $$ = \sum\limits_{0 \leq 2k \leq n} {n \choose 2k}{x}^{2k}$$ $$ = \sum\limits_{0 \leq 2k \leq n} {n \choose 2k}{x}^{2k} {1}^{n - 2k}$$ $$ = {(x + 1)}^{n}$$ and $$ = \sum\limits_{0 \leq 2k + 1 \leq n} {n \choose 2k + 1}{x}^{2k + 1}$$ $$ = \sum\limits_{0 \leq 2k + 1 \leq n} {n \choose 2k + 1}{x}^{2k + 1} {1}^{n - 2k - 1}$$ $$ = {(x + 1)}^{n}$$
Should both answers be the same or have I made a mistake?
Note that $(1 +x)^{n} = \sum_{k=0}^n \binom{n}{k}x^k 1^{n-k}$. Note that this is not enough since we are interested only in the even powers of $x$.
Thus, we need to remove the odd powers of $x$. Consider, $(1 - x)^{n} = \sum_{k=0}^n \binom{n}{k}x^k (-1)^{k}$.
Thus, $(1 + x)^{n} + (1 - x)^{n} = \sum_{k=0}^n \binom{n}{k}x^k( 1 + (-1)^{k}) = 2\sum_{k=0}^{n/2} \binom{n}{2k}x^{2k}$.
Thus, we have $\sum_{0 \leq 2k \leq n} \binom{n}{2k}x^{2k} = \frac{1}{2}((1 + x)^{n} + (1 - x)^{n})$.
The formula for $\sum_{0 \leq 2k+1 \leq n} \binom{n}{2k+1}x^{2k+1}$ is obtaine in the same fassion, or using the notion that $\sum_{0 \leq 2k+1 \leq n} \binom{n}{2k+1}x^{2k+1} + \sum_{0 \leq 2k \leq n} \binom{n}{2k}x^{2k} = (1 + x)^n$.
Hope this helps.