Rearranging infinite summation sign My textbook contains this step and I can't follow:
First, it gives the definition of cosine as a series:
$$ cos(x)=\sum\limits_{k=0}^{\infty}(-1)^k \frac{x^{2k}}{(2k)!}  $$
Secondly, it proves an identity, where the step happens:
$$ cos(x) * cos(y)=
\sum\limits_{n=0}^{\infty} \sum\limits_{k=0}^{n}(-1)^k \frac{x^{2k}}{(2k)!} (-1)^{n-k} \frac{y^{2(n-k)}}{(2(n-k))!}$$
If you plug in the definition above into $cos(x) * cos(y)$ it should give you 
$$ cos(x)*cos(y)= (\sum\limits_{k=0}^{\infty}(-1)^k \frac{x^{2k}}{(2k)!}) (\sum\limits_{k=0}^{\infty}(-1)^k \frac{y^{2k}}{(2k)!})$$
Therefore, I assume, there has to have been a step, where this happend:
$$ cos(x)*cos(y)= (\sum\limits_{k=0}^{\infty}(-1)^k \frac{x^{2k}}{(2k)!}) (\sum\limits_{k=0}^{\infty}(-1)^k \frac{y^{2k}}{(2k)!})=\sum\limits_{n=0}^{\infty} \sum\limits_{k=0}^{n}(-1)^k \frac{x^{2k}}{(2k)!} (-1)^{n-k} \frac{y^{2(n-k)}}{(2(n-k))!}$$
How are these two terms equal? I tried computing a few specific examples of this kind or rearrangement and it didn't work out. Would we not sum additional things each time, because for every iteration of the first sum signs we sum all the terms up to n again in the second iteration? 
I added the original equation from the book, but it seems to be exactly the one I typed above. I guess the book is just wrong then


This is an application of the Cauchy product of power  series.

We    obtain
  \begin{align*}
\cos (x)\cos(y)&=\left(\sum_{k=0}^\infty (-1)^k\frac{x^{2k}}{(2k)!}\right)
\left(\sum_{l=0}^\infty (-1)^l\frac{y^{2l}}{(2l)!}\right)\\
&=\sum_{n=0}^\infty\left(\sum_{{k+l=n}\atop{k,l\geq 0}}
(-1)^k\frac{x^{2k}}{(2k)!}(-1)^l\frac{y^{2l}}{(2l)!}\right)\tag{1}\\
&=\sum_{n=0}^\infty\left(\sum_{k=0}^n
(-1)^k\frac{x^{2k}}{(2k)!}(-1)^{n-k}\frac{y^{2(n-k)}}{(2n-2k)!}\right)\tag{2}\\
&=\sum_{n=0}^\infty(-1)^n\frac{1}{(2n)!}\left(\sum_{k=0}^n\binom{2n}{2k}
x^{2k}y^{2(n-k)}\right)\tag{3}\\
\end{align*}
  and the claim follows.

Comment:


*

*In (1) we rearrange the terms according to increasing $n$ and the corresponding contributions  from $x$ terms and $y$ terms.

*In (2) we substitute the index $l$ by $n-k$.

*In (3) we collect $(-1)^k$ and $(-1)^{n-k}$ and use the binomial coefficient
\begin{align*}
\binom{2n}{2k}=\frac{(2n)!}{(2k)!(2n-2k)!}
\end{align*}
