Referring to a question I posted on [MS](https://math.stackexchange.com/questions/241573/questions-about-the-fourier-expansion-of-eiz-cotx), I post it here, as I didn't get an answer:


By analogy with the [Jacobi–Anger expansion](http://en.wikipedia.org/wiki/Jacobi%E2%80%93Anger_expansion), one expects that $e^{iz\cot(x)}$ has a Fourier expansion of the form :
$$e^{iz\cot(\theta)}=\sum\_{n=-\infty}^{\infty}\Lambda\_{n}(z)e^{in\theta}$$
$\Lambda\_{n}(z)$ is given by:
$$\Lambda\_{n}(z)=\frac{1}{\pi}\int\_{-\pi/2}^{\pi/2}e^{iz\cot(\theta)-in\theta}d\theta$$
A simple calculation yields:
$$\Lambda\_{n}(z)=\frac{2}{n\pi}\sin\left(\frac{\pi n}{2} \right )\sum\_{m=0}^{\infty}\frac{z^{m}}{m!}\text{F}\_{1}\left(-\frac{n}{2};-m,m;1-\frac{n}{2};1,-1 \right )$$


Where $\text{F}\_{1}(\alpha;\beta,\beta^{'};\gamma;x,y)$ is the [Appell Hypergeometric Function](http://mathworld.wolfram.com/AppellHypergeometricFunction.html). Now, I have two questions:


1-For a purely imaginary $z$,$\;\;$ $e^{iz\cot(\theta)}$ has essential singularities at $\theta=\pm n\pi$. How is that reflected in the Fourier expansion?


2-Can we express the infinite sum in terms of other special functions? 



Questions about the Fourier expansion of $e^{iz\cot(x)}$
I will try to answer your two questions in reverse order.


$2.$ For real $z$ your Fourier coefficient


$$\Lambda\_{n}(z)=\frac{2}{\pi}\int\_{0}^{\pi/2}\cos(n\theta-z\cot\theta)\;d\theta$$


can be expressed in terms of elementary functions for even $n$ and in terms of the special functions $I\_{m}(z)$ (modified Bessel function of the first kind) and $L\_{-m}(z)$ (modified Struve function) for odd $n$. The first few Fourier coefficients are


$$\Lambda\_0(z)=e^{-|z|}$$


$$\Lambda\_1(z)=\Lambda\_{-1}(-z)=z L\_{-1}(z)+zL\_0(z)-|z|I\_0(z)-|z|I\_1(z)+2/\pi$$


$$\Lambda\_2(z)=\Lambda\_{-2}(-z)=e^{-|z|}(z-|z|)$$


For even $n$ the Fourier coefficient $\Lambda\_n(z)\equiv 0$ for $nz>0$ [\*\*\*]


$1.$ The Fourier coefficients, given above along the real $z$-axis, can be continued analytically into the complex-$z$ plane, but not along the imaginary $z$-axis. The branch cut for imaginary $z$ is a direct consequence of the essential singularity you noticed.




---


[\*\*\*]


*added November 2014 in response to a request for clarification.*


since $\Lambda\_{n}(z)=\Lambda\_{-n}(-z)$, we may take $n>0$. Suppose $n=2m$, $m=1,2,\ldots$ and $z>0$. Then 
$$
\Lambda\_{2m}(z)=\frac{1}{2\pi}{\rm Re}\,\int\_{-\pi}^{\pi}e^{im\theta}e^{-iz\cot(\theta/2)}\,d\theta
=\frac{1}{2\pi i}{\rm Re}\,\oint\_{|\xi|=1^-} \xi^{m-1}e^{-z(1+\xi)/(1-\xi)}\,d\xi=0
$$
For $z<0$ the singularity at $\xi\equiv e^{i\theta}=1$ contributes, so the contour integral does not vanish.


