I know this solution has already been shown but each time I have seen examples of this proof I get lost at the last step.
\begin{align} \cos^2 x + \sin^2 x &= \sum_{r = 0}^{\infty} \frac{(-1)^r}{(2r)!}\biggl(\sum_{k = 0}^r \binom{2r}{2k}(-1)^{2k}\biggr)x^{2r} + \sum_{r = 0}^{\infty} \frac{(-1)^r}{(2r)!}\biggl(\sum_{k = 0}^r \binom{2r}{2k+1}(-1)^{2k+1}\biggr)x^{2r} \\ &= \sum_{r = 0}^{\infty} \frac{(-1)^r}{(2r)!}\biggl(\sum_{k = 0}^r \binom{2r}{2k}(-1)^{2k} + \sum_{k = 0}^{r-1}\binom{2r}{2k+1}(-1)^{2k+1}\biggr)x^{2r}\\ &= \sum_{r = 0}^{\infty} \frac{(-1)^r}{(2r)!}\biggl(\sum_{j = 0}^{2r} \binom{2r}{j}(-1)^j\biggr)x^{2r}. \end{align}
What I do not understand is how the addition of the two sums in the second to last step shown result in \begin{align} \sum_{j = 0}^{2r} \binom{2r}{j}(-1)^j\ \end{align}
I feel like I am missing something obvious but how 2r appears in the sum is really confusing me. Thanks, I appreciate any help.
That's a reasonable confusion :)
On the middle line, the first inner sum has binomials whose lower entry is $2k$ as $k$ runs from $0$ to $r$; this set of lower entries is the same as all the even numbers between $0$ and $2r$ (inclusive). Then, the second inner sum on the middle line has binomials whose lower entry is $2k+1$ as $k$ runs from $0$ to $r-1$; this set of lower entries is the same as all the odd numbers between $1$ and $2r-1$ (inclusive). Together, they make up all possible lower entries (odd or even) between $0$ and $2r$ (inclusive); that's where the range of summation in the bottom line comes from.