I'm reading Conway's "Functions of one complex variable". Define
$$e^z =\sum_{n=0}^\infty \frac{z^n}{n!}$$ $$\cos z =\sum_{n=0}^\infty \frac{(-1)^nz^{2n}}{(2n)!}$$
It is already shown that these converge for all $z \in \mathbb{C}$.
I'm asked to show that
$$e^{iz} + e^{-iz} = 2 \cos z$$
I have two questions:
(1) Is my attempt correct? (2) Did I need absolute convergence anywhere? (The author claims that this should be necessary)
$$e^{iz} + z^{-iz} = \sum_{n=0}^\infty \frac{(iz)^n}{n!} + \sum_{n=0}^\infty \frac{(-iz)^n}{n!} \quad (definition)$$ $$= \sum_{k=0}^3 \left(\sum_{n=0}^\infty \frac{(iz)^{4n+k}}{(4n+k)!} + \sum_{n=0}^\infty \frac{(-iz)^{4n+k}}{(4n+k)!}\right) \quad (**, see \ lemma \ down \ with \ k =4)$$
$$= 2 \left( \sum_{n=0}^\infty \frac{z^{4n}}{(4n)!}- \sum_{n=0}^\infty \frac{z^{4n+2}}{(4n+2)!} \right) \quad (simplifying \ sums)$$
$$= 2 \sum_{n=0}^\infty \left(\frac{z^{4n}}{(4n)!}- \frac{z^{4n+2}}{(4n+2)!} \right) \quad (linearity)$$ $$= 2 \sum_{n=0}^\infty \frac{(-1)^n z^{2n}}{(2n)!} = 2\cos z \quad (** \ with \ k =2, definition)$$
Note that I used the following lemma (**):
$$k \geq 2, \sum_{n=0}^\infty a_n \mathrm{\ converges}\implies \sum_{n=0}^\infty a_n = \sum_{n=0}^\infty (a_{kn} + \dots a_{kn+(k-1)})$$
This can be proven by observing that the right series has partial sums that are a subsequence of the partial sums of the left series.
What you did is too complex (although it seems correct). Note that$$e^{iz}=1+iz-\frac{z^2}2-i\frac{z^3}{3!}+\frac{z^4}{4!}+i\frac{z^5}{5!}+\cdots$$and that$$e^{-iz}=1-iz-\frac{z^2}2+i\frac{z^3}{3!}+\frac{z^4}{4!}-i\frac{z^5}{5!}+\cdots$$and therefore\begin{align}e^{iz}+e^{-iz}&=2-2\frac{z^2}2+2\frac{z^4}{4!}-\cdots\\&=2\cos z.\end{align}And absolute convergence is not needed. All I used about series was that if$$a=\sum_{n=0}^\infty a_n\text{ and }b=\sum_{n=0}^\infty b_n,$$then$$a+b=\sum_{n=0}^\infty(a_n+b_n).$$This does not require absolute convergence.