I recently watched a YouTube video illustrating that using commutativity may change the value of an infinite series (Riemann's paradox, https://www.youtube.com/watch?v=-EtHF5ND3_s).
The identity $e^{i\theta} = \cos\theta + i\sin\theta$ is often proved by taking the infinite Maclaurin series of $\cos\theta$ and $i\sin\theta$ and rearranging the terms to show that the resulting series is equal to the Maclaurin series of $e^{i\theta}$. However, I am now in doubt of the validity of this proof because commutativity may not be valid when dealing with infinite series. Can someone explain why this proof is still valid?