I'm looking to simplify the following sum of Bessel functions of the first kind: $$\sum_{q=-\infty}^{\infty}\frac{(-)^{q}}{2q+1}e^{iq\theta}I_{q}(\alpha^{2})$$ Motivated by a related question and by taking derivatives w.r.t. the Jacobi-Anger expansion, I've simplified it to this $$\frac{1}{2}e^{-i\theta/2}\left(\intop_{\theta}^{\pi}d\phi\sin\left(\frac{\phi}{2}\right)e^{-\alpha^{2}\cos\phi}+i\intop_{0}^{\theta}d\phi\cos\left(\frac{\phi}{2}\right)e^{-\alpha^{2}\cos\phi}\right)$$ The first integral is actually solvable in Mathematica, so I get $$\frac{1}{2}e^{-i\theta/2}\left(\frac{\sqrt{\pi}e^{\alpha^{2}}\cos\left(\frac{\theta}{2}\right)\text{erf}\left(\alpha\sqrt{\cos\theta+1}\right)}{\alpha\sqrt{\cos\theta+1}}+i\intop_{0}^{\theta}d\phi\cos\left(\frac{\phi}{2}\right)e^{-\alpha^{2}\cos\phi}\right)$$ My questions are
How did Mathematica know how to do the first integral?
Is there a closed form for the closely related second one?