I'm trying to prove this equality (unsuccessfully): $$\sum_{n=0}^\infty \frac{i^nt^n}{n!}=\sum_{n=0}^\infty \frac{(-1)^nt^{2n}}{(2n)!}+i\sum_{n=0}^{\infty}\frac{(-1)^nt^{2n+1}}{(2n+1)!}\ , $$ which I know is true because: the left hand side is $e^{it}$ while the right hand side is $\cos t+i\sin t$.
I have tried to manipulate the RHS of several ways, but I can't see the trick! Thanks in advance.
For every integer $j \geq 0$, $i^{2j} = (-1)^j$ and $i^{2j+1} = (-1)^j i$
Now, separate out the terms with even $n$ and odd $n$; i.e., when $n = 2j$ and when $n = 2j + 1$.
$$\sum_{n=0}^\infty \frac{i^nt^n}{n!} = \sum_{n=0, n \text{ even}}^\infty \frac{i^nt^n}{n!} + \sum_{n=0, n \text{ odd}}^\infty \frac{i^nt^n}{n!}$$
$$ = \sum_{j=0}^\infty \frac{i^{2j}t^{2j}}{(2j)!} + \sum_{j=0}^\infty \frac{i^{2j+1}t^{2j+1}}{(2j+1)!}$$
$$ = \sum_{j=0}^\infty (-1)^j\frac{t^{2j}}{(2j)!} + \sum_{j=0}^\infty i(-1)^j\frac{t^{2j+1}}{(2j+1)!}$$
$$ = \sum_{j=0}^\infty (-1)^j\frac{t^{2j}}{(2j)!} + i\sum_{j=0}^\infty (-1)^j\frac{t^{2j+1}}{(2j+1)!}$$
All that is left to do is to change the summation index from $j$ back to $n$