I noticed that the following expression holds true for $k \in \left[-1,1\right]$:
$$ \operatorname{J}_{0}\left(x\right) + 2\sum_{n = 1}^{\infty}{\rm i}^{n}\operatorname{J}_n\left(x\right)\cos\left(n \cos^{-1}\left(k\right)\right) = \operatorname{J}_{0}\left(kx\right) + 2\sum_{n = 1}^{\infty}{\rm i}^{n} \operatorname{J}_{n}\left(kx\right), $$ where $\operatorname{J}_{n}$ is the Bessel function of the first kind and ${\rm i} = \sqrt{-1}$ is the imaginary unit.
It is related to the Jacobi-Anger expansion. I stumbled upon this equality, it fascinates me, and I don't understand how it is equal. I have checked numerically for many values of $x$.
Appreciate any advice or explanation $!$.