[Math] Taylor Series expansion of cos z

analysiscomplex-analysistaylor expansion

Ok so I have to use Taylor series expansions to show

$e^{iz} + e^{-iz} = 2$ cos $z$ ; $z \in \mathbb{C}$

So I have

$\sum_{n = 0}^\infty$ $\frac{i^n}{n!}z^n$ + $\sum_{n = 0}^\infty$ $\frac{(-1)^ni^n}{n!}z^n$ = 2 $\sum_{n = 0}^\infty$ $(-1)^n$ $\frac{z^{2n}}{(2n)!}$

So I want to say I have to product the terms together? If I do this I am left with (on the left hand side)

$\sum_{n = 0}^\infty$ $\frac{i^{2n}(-1)^n}{2n!}z^{2n}$

so if that $i^{2n}$ comes out of my sum as just a 2, that'd be great haha and I would be finished, what am I missing? I tried finding this on stack exchange but couldn't. I saw similar ones but most swept under the rug that we use Taylor series expansions and assumed it.

I realized that $i^{2n}$ is just $(-1)^n$ so I have 2 $(-1)^n$ terms and half of 2 is 1!!!

Best Answer

Rearranging $$ \sum_{n=0}^\infty \frac{\mathrm{i}^n}{n!} z^n + \sum_{n=0}^\infty \frac{(-1)^n\mathrm{i}^n}{n!} z^n \text{,} $$ we have $$ \sum_{n=0}^\infty \frac{\mathrm{i}^n + (-1)^n\mathrm{i}^n}{n!} z^n \text{.} $$ When $n$ is odd, the numerator of the term is zero, so there is no contribution when $n$ is odd. So let $n = 2k$ be even. For $n$ to range over $[0,\infty)$, $k$ must range over $[0,\infty)$, so we continue manipulating the left-hand side of your proposed equality to $$ \sum_{k=0}^\infty \frac{\mathrm{i}^{2k} + (-1)^{2k}\mathrm{i}^{2k}}{(2k)!} z^{2k} \text{.} $$ Since $(-1)^{2k} = 1^k = 1$ and $\mathrm{i}^{2k} = (-1)^k$, this reduces to $$ \sum_{k=0}^\infty \frac{2(-1)^k}{(2k)!} z^{2k} \text{.} $$

A cautious person would justify the rearrangement at the beginning. However, both series are absolutely uniformly convergent on all of $\mathbb{C}$, so there are many theorems to make this justification.